@finsemble/finsemble-core 9.7.2-iocd.2 → 9.7.2-iocd.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/configs/schemas/finsemble.schema.json +5 -0
  2. package/dist/cli/platform/services/Interop/types.d.ts +1 -0
  3. package/dist/cli/platform/services/Interop/types.d.ts.map +1 -1
  4. package/dist/cli/platform/services/Interop/types.js.map +1 -1
  5. package/dist/cli/platform/services/window/types.d.ts +1 -0
  6. package/dist/cli/platform/services/window/types.d.ts.map +1 -1
  7. package/dist/cli/platform/services/window/types.js.map +1 -1
  8. package/dist/cli/tsconfig.cli.tsbuildinfo +1 -1
  9. package/dist/configs/schemas/finsemble.schema.json +5 -0
  10. package/dist/lib/platform/services/Interop/types.d.ts +1 -0
  11. package/dist/lib/platform/services/Interop/types.d.ts.map +1 -1
  12. package/dist/lib/platform/services/Interop/types.js.map +1 -1
  13. package/dist/lib/platform/services/window/types.d.ts +1 -0
  14. package/dist/lib/platform/services/window/types.d.ts.map +1 -1
  15. package/dist/lib/platform/services/window/types.js.map +1 -1
  16. package/dist/lib/tsconfig.lib.tsbuildinfo +1 -1
  17. package/dist/lib/tsconfig.noglobals.tsbuildinfo +1 -1
  18. package/dist/platform/configs/core/config.json +2 -2
  19. package/dist/platform/configs/schemas/finsemble.schema.json +5 -0
  20. package/dist/platform/services/Interop/InteropServiceUI.js +1 -1
  21. package/dist/platform/services/assimilation/assimilationService.js +1 -1
  22. package/dist/platform/services/assimilation/assimilationService.js.map +1 -1
  23. package/dist/platform/services/router/routerService.js +1 -1
  24. package/dist/platform/services/window/windowServiceUI.js +1 -1
  25. package/dist/platform/services/workspace/workspaceService.js.map +1 -1
  26. package/package.json +3 -3
  27. package/types/platform/services/Interop/types.d.ts +1 -0
  28. package/types/platform/services/window/types.d.ts +1 -0
@@ -1,3 +1,3 @@
1
1
  /*! For license information please see assimilationService.js.LICENSE.txt */
2
- (()=>{var e={14744:e=>{"use strict";var t=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===n}(e)}(e)},n="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function r(e,t){return!1!==t.clone&&t.isMergeableObject(e)?a((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function i(e,t,n){return e.concat(t).map((function(e){return r(e,n)}))}function s(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return Object.propertyIsEnumerable.call(e,t)})):[]}(e))}function o(e,t){try{return t in e}catch(e){return!1}}function a(e,n,u){(u=u||{}).arrayMerge=u.arrayMerge||i,u.isMergeableObject=u.isMergeableObject||t,u.cloneUnlessOtherwiseSpecified=r;var l=Array.isArray(n);return l===Array.isArray(e)?l?u.arrayMerge(e,n,u):function(e,t,n){var i={};return n.isMergeableObject(e)&&s(e).forEach((function(t){i[t]=r(e[t],n)})),s(t).forEach((function(s){(function(e,t){return o(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,s)||(o(e,s)&&n.isMergeableObject(t[s])?i[s]=function(e,t){if(!t.customMerge)return a;var n=t.customMerge(e);return"function"==typeof n?n:a}(s,n)(e[s],t[s],n):i[s]=r(t[s],n))})),i}(e,n,u):r(n,u)}a.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return a(e,n,t)}),{})};var u=a;e.exports=u},37007:e=>{"use strict";var t,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,e.exports.once=function(e,t){return new Promise((function(n,r){function i(n){e.removeListener(t,s),r(n)}function s(){"function"==typeof e.removeListener&&e.removeListener("error",i),n([].slice.call(arguments))}h(e,t,s,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&h(e,"error",t,{once:!0})}(e,i)}))},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var o=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function l(e,t,n,r){var i,s,o,l;if(a(n),void 0===(s=e._events)?(s=e._events=Object.create(null),e._eventsCount=0):(void 0!==s.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),s=e._events),o=s[t]),void 0===o)o=s[t]=n,++e._eventsCount;else if("function"==typeof o?o=s[t]=r?[n,o]:[o,n]:r?o.unshift(n):o.push(n),(i=u(e))>0&&o.length>i&&!o.warned){o.warned=!0;var d=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");d.name="MaxListenersExceededWarning",d.emitter=e,d.type=t,d.count=o.length,l=d,console&&console.warn&&console.warn(l)}return e}function d(){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 c(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=d.bind(r);return i.listener=n,r.wrapFn=i,i}function p(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):y(i,i.length)}function f(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function y(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function h(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(s){r.once&&e.removeEventListener(t,i),n(s)}))}}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");o=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return u(this)},s.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i="error"===e,s=this._events;if(void 0!==s)i=i&&void 0===s.error;else if(!i)return!1;if(i){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var u=s[e];if(void 0===u)return!1;if("function"==typeof u)r(u,this,t);else{var l=u.length,d=y(u,l);for(n=0;n<l;++n)r(d[n],this,t)}return!0},s.prototype.addListener=function(e,t){return l(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return l(this,e,t,!0)},s.prototype.once=function(e,t){return a(t),this.on(e,c(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,c(this,e,t)),this},s.prototype.removeListener=function(e,t){var n,r,i,s,o;if(a(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,s=n.length-1;s>=0;s--)if(n[s]===t||n[s].listener===t){o=n[s].listener,i=s;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,o||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,s=Object.keys(n);for(r=0;r<s.length;++r)"removeListener"!==(i=s[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},s.prototype.listeners=function(e){return p(this,e,!0)},s.prototype.rawListeners=function(e){return p(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):f.call(e,t)},s.prototype.listenerCount=f,s.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},55580:(e,t,n)=>{var r=n(56110)(n(9325),"DataView");e.exports=r},21549:(e,t,n)=>{var r=n(22032),i=n(63862),s=n(66721),o=n(12749),a=n(35749);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=s,u.prototype.has=o,u.prototype.set=a,e.exports=u},80079:(e,t,n)=>{var r=n(63702),i=n(70080),s=n(24739),o=n(48655),a=n(31175);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=s,u.prototype.has=o,u.prototype.set=a,e.exports=u},68223:(e,t,n)=>{var r=n(56110)(n(9325),"Map");e.exports=r},53661:(e,t,n)=>{var r=n(63040),i=n(17670),s=n(90289),o=n(4509),a=n(72949);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=s,u.prototype.has=o,u.prototype.set=a,e.exports=u},32804:(e,t,n)=>{var r=n(56110)(n(9325),"Promise");e.exports=r},76545:(e,t,n)=>{var r=n(56110)(n(9325),"Set");e.exports=r},38859:(e,t,n)=>{var r=n(53661),i=n(31380),s=n(51459);function o(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}o.prototype.add=o.prototype.push=i,o.prototype.has=s,e.exports=o},37217:(e,t,n)=>{var r=n(80079),i=n(51420),s=n(90938),o=n(63605),a=n(29817),u=n(80945);function l(e){var t=this.__data__=new r(e);this.size=t.size}l.prototype.clear=i,l.prototype.delete=s,l.prototype.get=o,l.prototype.has=a,l.prototype.set=u,e.exports=l},51873:(e,t,n)=>{var r=n(9325).Symbol;e.exports=r},37828:(e,t,n)=>{var r=n(9325).Uint8Array;e.exports=r},28303:(e,t,n)=>{var r=n(56110)(n(9325),"WeakMap");e.exports=r},91033:e=>{e.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}},83729:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}},79770:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,s=[];++n<r;){var o=e[n];t(o,n,e)&&(s[i++]=o)}return s}},70695:(e,t,n)=>{var r=n(78096),i=n(72428),s=n(56449),o=n(3656),a=n(30361),u=n(37167),l=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=s(e),d=!n&&i(e),c=!n&&!d&&o(e),p=!n&&!d&&!c&&u(e),f=n||d||c||p,y=f?r(e.length,String):[],h=y.length;for(var g in e)!t&&!l.call(e,g)||f&&("length"==g||c&&("offset"==g||"parent"==g)||p&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||a(g,h))||y.push(g);return y}},34932:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}},14528:e=>{e.exports=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}},14248:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},16547:(e,t,n)=>{var r=n(43360),i=n(75288),s=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var o=e[t];s.call(e,t)&&i(o,n)&&(void 0!==n||t in e)||r(e,t,n)}},26025:(e,t,n)=>{var r=n(75288);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},74733:(e,t,n)=>{var r=n(21791),i=n(95950);e.exports=function(e,t){return e&&r(t,i(t),e)}},43838:(e,t,n)=>{var r=n(21791),i=n(37241);e.exports=function(e,t){return e&&r(t,i(t),e)}},43360:(e,t,n)=>{var r=n(93243);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},9999:(e,t,n)=>{var r=n(37217),i=n(83729),s=n(16547),o=n(74733),a=n(43838),u=n(93290),l=n(23007),d=n(92271),c=n(48948),p=n(50002),f=n(83349),y=n(5861),h=n(76189),g=n(77199),m=n(35529),v=n(56449),w=n(3656),b=n(87730),j=n(23805),S=n(38440),C=n(95950),A=n(37241),R="[object Arguments]",I="[object Function]",T="[object Object]",E={};E[R]=E["[object Array]"]=E["[object ArrayBuffer]"]=E["[object DataView]"]=E["[object Boolean]"]=E["[object Date]"]=E["[object Float32Array]"]=E["[object Float64Array]"]=E["[object Int8Array]"]=E["[object Int16Array]"]=E["[object Int32Array]"]=E["[object Map]"]=E["[object Number]"]=E[T]=E["[object RegExp]"]=E["[object Set]"]=E["[object String]"]=E["[object Symbol]"]=E["[object Uint8Array]"]=E["[object Uint8ClampedArray]"]=E["[object Uint16Array]"]=E["[object Uint32Array]"]=!0,E["[object Error]"]=E[I]=E["[object WeakMap]"]=!1,e.exports=function e(t,n,O,_,M,L){var P,N=1&n,W=2&n,k=4&n;if(O&&(P=M?O(t,_,M,L):O(t)),void 0!==P)return P;if(!j(t))return t;var D=v(t);if(D){if(P=h(t),!N)return l(t,P)}else{var x=y(t),F=x==I||"[object GeneratorFunction]"==x;if(w(t))return u(t,N);if(x==T||x==R||F&&!M){if(P=W||F?{}:m(t),!N)return W?c(t,a(P,t)):d(t,o(P,t))}else{if(!E[x])return M?t:{};P=g(t,x,N)}}L||(L=new r);var B=L.get(t);if(B)return B;L.set(t,P),S(t)?t.forEach((function(r){P.add(e(r,n,O,r,t,L))})):b(t)&&t.forEach((function(r,i){P.set(i,e(r,n,O,i,t,L))}));var q=D?void 0:(k?W?f:p:W?A:C)(t);return i(q||t,(function(r,i){q&&(r=t[i=r]),s(P,i,e(r,n,O,i,t,L))})),P}},39344:(e,t,n)=>{var r=n(23805),i=Object.create,s=function(){function e(){}return function(t){if(!r(t))return{};if(i)return i(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=s},83120:(e,t,n)=>{var r=n(14528),i=n(45891);e.exports=function e(t,n,s,o,a){var u=-1,l=t.length;for(s||(s=i),a||(a=[]);++u<l;){var d=t[u];n>0&&s(d)?n>1?e(d,n-1,s,o,a):r(a,d):o||(a[a.length]=d)}return a}},47422:(e,t,n)=>{var r=n(31769),i=n(77797);e.exports=function(e,t){for(var n=0,s=(t=r(t,e)).length;null!=e&&n<s;)e=e[i(t[n++])];return n&&n==s?e:void 0}},82199:(e,t,n)=>{var r=n(14528),i=n(56449);e.exports=function(e,t,n){var s=t(e);return i(e)?s:r(s,n(e))}},72552:(e,t,n)=>{var r=n(51873),i=n(659),s=n(59350),o=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":o&&o in Object(e)?i(e):s(e)}},28077:e=>{e.exports=function(e,t){return null!=e&&t in Object(e)}},27534:(e,t,n)=>{var r=n(72552),i=n(40346);e.exports=function(e){return i(e)&&"[object Arguments]"==r(e)}},60270:(e,t,n)=>{var r=n(87068),i=n(40346);e.exports=function e(t,n,s,o,a){return t===n||(null==t||null==n||!i(t)&&!i(n)?t!=t&&n!=n:r(t,n,s,o,e,a))}},87068:(e,t,n)=>{var r=n(37217),i=n(25911),s=n(21986),o=n(50689),a=n(5861),u=n(56449),l=n(3656),d=n(37167),c="[object Arguments]",p="[object Array]",f="[object Object]",y=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,h,g,m){var v=u(e),w=u(t),b=v?p:a(e),j=w?p:a(t),S=(b=b==c?f:b)==f,C=(j=j==c?f:j)==f,A=b==j;if(A&&l(e)){if(!l(t))return!1;v=!0,S=!1}if(A&&!S)return m||(m=new r),v||d(e)?i(e,t,n,h,g,m):s(e,t,b,n,h,g,m);if(!(1&n)){var R=S&&y.call(e,"__wrapped__"),I=C&&y.call(t,"__wrapped__");if(R||I){var T=R?e.value():e,E=I?t.value():t;return m||(m=new r),g(T,E,n,h,m)}}return!!A&&(m||(m=new r),o(e,t,n,h,g,m))}},29172:(e,t,n)=>{var r=n(5861),i=n(40346);e.exports=function(e){return i(e)&&"[object Map]"==r(e)}},45083:(e,t,n)=>{var r=n(1882),i=n(87296),s=n(23805),o=n(47473),a=/^\[object .+?Constructor\]$/,u=Function.prototype,l=Object.prototype,d=u.toString,c=l.hasOwnProperty,p=RegExp("^"+d.call(c).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!s(e)||i(e))&&(r(e)?p:a).test(o(e))}},16038:(e,t,n)=>{var r=n(5861),i=n(40346);e.exports=function(e){return i(e)&&"[object Set]"==r(e)}},4901:(e,t,n)=>{var r=n(72552),i=n(30294),s=n(40346),o={};o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o["[object Arguments]"]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object DataView]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o["[object Map]"]=o["[object Number]"]=o["[object Object]"]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object WeakMap]"]=!1,e.exports=function(e){return s(e)&&i(e.length)&&!!o[r(e)]}},88984:(e,t,n)=>{var r=n(55527),i=n(3650),s=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=[];for(var n in Object(e))s.call(e,n)&&"constructor"!=n&&t.push(n);return t}},72903:(e,t,n)=>{var r=n(23805),i=n(55527),s=n(90181),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return s(e);var t=i(e),n=[];for(var a in e)("constructor"!=a||!t&&o.call(e,a))&&n.push(a);return n}},76001:(e,t,n)=>{var r=n(97420),i=n(80631);e.exports=function(e,t){return r(e,t,(function(t,n){return i(e,n)}))}},97420:(e,t,n)=>{var r=n(47422),i=n(73170),s=n(31769);e.exports=function(e,t,n){for(var o=-1,a=t.length,u={};++o<a;){var l=t[o],d=r(e,l);n(d,l)&&i(u,s(l,e),d)}return u}},73170:(e,t,n)=>{var r=n(16547),i=n(31769),s=n(30361),o=n(23805),a=n(77797);e.exports=function(e,t,n,u){if(!o(e))return e;for(var l=-1,d=(t=i(t,e)).length,c=d-1,p=e;null!=p&&++l<d;){var f=a(t[l]),y=n;if("__proto__"===f||"constructor"===f||"prototype"===f)return e;if(l!=c){var h=p[f];void 0===(y=u?u(h,f,p):void 0)&&(y=o(h)?h:s(t[l+1])?[]:{})}r(p,f,y),p=p[f]}return e}},19570:(e,t,n)=>{var r=n(37334),i=n(93243),s=n(83488),o=i?function(e,t){return i(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:s;e.exports=o},78096:e=>{e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},77556:(e,t,n)=>{var r=n(51873),i=n(34932),s=n(56449),o=n(44394),a=r?r.prototype:void 0,u=a?a.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(s(t))return i(t,e)+"";if(o(t))return u?u.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},54128:(e,t,n)=>{var r=n(31800),i=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(i,""):e}},27301:e=>{e.exports=function(e){return function(t){return e(t)}}},19219:e=>{e.exports=function(e,t){return e.has(t)}},31769:(e,t,n)=>{var r=n(56449),i=n(28586),s=n(61802),o=n(13222);e.exports=function(e,t){return r(e)?e:i(e,t)?[e]:s(o(e))}},49653:(e,t,n)=>{var r=n(37828);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},93290:(e,t,n)=>{e=n.nmd(e);var r=n(9325),i=t&&!t.nodeType&&t,s=i&&e&&!e.nodeType&&e,o=s&&s.exports===i?r.Buffer:void 0,a=o?o.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=a?a(n):new e.constructor(n);return e.copy(r),r}},76169:(e,t,n)=>{var r=n(49653);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},73201:e=>{var t=/\w*$/;e.exports=function(e){var n=new e.constructor(e.source,t.exec(e));return n.lastIndex=e.lastIndex,n}},93736:(e,t,n)=>{var r=n(51873),i=r?r.prototype:void 0,s=i?i.valueOf:void 0;e.exports=function(e){return s?Object(s.call(e)):{}}},71961:(e,t,n)=>{var r=n(49653);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},23007:e=>{e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},21791:(e,t,n)=>{var r=n(16547),i=n(43360);e.exports=function(e,t,n,s){var o=!n;n||(n={});for(var a=-1,u=t.length;++a<u;){var l=t[a],d=s?s(n[l],e[l],l,n,e):void 0;void 0===d&&(d=e[l]),o?i(n,l,d):r(n,l,d)}return n}},92271:(e,t,n)=>{var r=n(21791),i=n(4664);e.exports=function(e,t){return r(e,i(e),t)}},48948:(e,t,n)=>{var r=n(21791),i=n(86375);e.exports=function(e,t){return r(e,i(e),t)}},55481:(e,t,n)=>{var r=n(9325)["__core-js_shared__"];e.exports=r},93243:(e,t,n)=>{var r=n(56110),i=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=i},25911:(e,t,n)=>{var r=n(38859),i=n(14248),s=n(19219);e.exports=function(e,t,n,o,a,u){var l=1&n,d=e.length,c=t.length;if(d!=c&&!(l&&c>d))return!1;var p=u.get(e),f=u.get(t);if(p&&f)return p==t&&f==e;var y=-1,h=!0,g=2&n?new r:void 0;for(u.set(e,t),u.set(t,e);++y<d;){var m=e[y],v=t[y];if(o)var w=l?o(v,m,y,t,e,u):o(m,v,y,e,t,u);if(void 0!==w){if(w)continue;h=!1;break}if(g){if(!i(t,(function(e,t){if(!s(g,t)&&(m===e||a(m,e,n,o,u)))return g.push(t)}))){h=!1;break}}else if(m!==v&&!a(m,v,n,o,u)){h=!1;break}}return u.delete(e),u.delete(t),h}},21986:(e,t,n)=>{var r=n(51873),i=n(37828),s=n(75288),o=n(25911),a=n(20317),u=n(84247),l=r?r.prototype:void 0,d=l?l.valueOf:void 0;e.exports=function(e,t,n,r,l,c,p){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!c(new i(e),new i(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return s(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var f=a;case"[object Set]":var y=1&r;if(f||(f=u),e.size!=t.size&&!y)return!1;var h=p.get(e);if(h)return h==t;r|=2,p.set(e,t);var g=o(f(e),f(t),r,l,c,p);return p.delete(e),g;case"[object Symbol]":if(d)return d.call(e)==d.call(t)}return!1}},50689:(e,t,n)=>{var r=n(50002),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,s,o,a){var u=1&n,l=r(e),d=l.length;if(d!=r(t).length&&!u)return!1;for(var c=d;c--;){var p=l[c];if(!(u?p in t:i.call(t,p)))return!1}var f=a.get(e),y=a.get(t);if(f&&y)return f==t&&y==e;var h=!0;a.set(e,t),a.set(t,e);for(var g=u;++c<d;){var m=e[p=l[c]],v=t[p];if(s)var w=u?s(v,m,p,t,e,a):s(m,v,p,e,t,a);if(!(void 0===w?m===v||o(m,v,n,s,a):w)){h=!1;break}g||(g="constructor"==p)}if(h&&!g){var b=e.constructor,j=t.constructor;b==j||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof j&&j instanceof j||(h=!1)}return a.delete(e),a.delete(t),h}},38816:(e,t,n)=>{var r=n(35970),i=n(56757),s=n(32865);e.exports=function(e){return s(i(e,void 0,r),e+"")}},34840:(e,t,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},50002:(e,t,n)=>{var r=n(82199),i=n(4664),s=n(95950);e.exports=function(e){return r(e,s,i)}},83349:(e,t,n)=>{var r=n(82199),i=n(86375),s=n(37241);e.exports=function(e){return r(e,s,i)}},12651:(e,t,n)=>{var r=n(74218);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},56110:(e,t,n)=>{var r=n(45083),i=n(10392);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},28879:(e,t,n)=>{var r=n(74335)(Object.getPrototypeOf,Object);e.exports=r},659:(e,t,n)=>{var r=n(51873),i=Object.prototype,s=i.hasOwnProperty,o=i.toString,a=r?r.toStringTag:void 0;e.exports=function(e){var t=s.call(e,a),n=e[a];try{e[a]=void 0;var r=!0}catch(e){}var i=o.call(e);return r&&(t?e[a]=n:delete e[a]),i}},4664:(e,t,n)=>{var r=n(79770),i=n(63345),s=Object.prototype.propertyIsEnumerable,o=Object.getOwnPropertySymbols,a=o?function(e){return null==e?[]:(e=Object(e),r(o(e),(function(t){return s.call(e,t)})))}:i;e.exports=a},86375:(e,t,n)=>{var r=n(14528),i=n(28879),s=n(4664),o=n(63345),a=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,s(e)),e=i(e);return t}:o;e.exports=a},5861:(e,t,n)=>{var r=n(55580),i=n(68223),s=n(32804),o=n(76545),a=n(28303),u=n(72552),l=n(47473),d="[object Map]",c="[object Promise]",p="[object Set]",f="[object WeakMap]",y="[object DataView]",h=l(r),g=l(i),m=l(s),v=l(o),w=l(a),b=u;(r&&b(new r(new ArrayBuffer(1)))!=y||i&&b(new i)!=d||s&&b(s.resolve())!=c||o&&b(new o)!=p||a&&b(new a)!=f)&&(b=function(e){var t=u(e),n="[object Object]"==t?e.constructor:void 0,r=n?l(n):"";if(r)switch(r){case h:return y;case g:return d;case m:return c;case v:return p;case w:return f}return t}),e.exports=b},10392:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},49326:(e,t,n)=>{var r=n(31769),i=n(72428),s=n(56449),o=n(30361),a=n(30294),u=n(77797);e.exports=function(e,t,n){for(var l=-1,d=(t=r(t,e)).length,c=!1;++l<d;){var p=u(t[l]);if(!(c=null!=e&&n(e,p)))break;e=e[p]}return c||++l!=d?c:!!(d=null==e?0:e.length)&&a(d)&&o(p,d)&&(s(e)||i(e))}},22032:(e,t,n)=>{var r=n(81042);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},63862:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},66721:(e,t,n)=>{var r=n(81042),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(t,e)?t[e]:void 0}},12749:(e,t,n)=>{var r=n(81042),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:i.call(t,e)}},35749:(e,t,n)=>{var r=n(81042);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},76189:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e){var n=e.length,r=new e.constructor(n);return n&&"string"==typeof e[0]&&t.call(e,"index")&&(r.index=e.index,r.input=e.input),r}},77199:(e,t,n)=>{var r=n(49653),i=n(76169),s=n(73201),o=n(93736),a=n(71961);e.exports=function(e,t,n){var u=e.constructor;switch(t){case"[object ArrayBuffer]":return r(e);case"[object Boolean]":case"[object Date]":return new u(+e);case"[object DataView]":return i(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return a(e,n);case"[object Map]":case"[object Set]":return new u;case"[object Number]":case"[object String]":return new u(e);case"[object RegExp]":return s(e);case"[object Symbol]":return o(e)}}},35529:(e,t,n)=>{var r=n(39344),i=n(28879),s=n(55527);e.exports=function(e){return"function"!=typeof e.constructor||s(e)?{}:r(i(e))}},45891:(e,t,n)=>{var r=n(51873),i=n(72428),s=n(56449),o=r?r.isConcatSpreadable:void 0;e.exports=function(e){return s(e)||i(e)||!!(o&&e&&e[o])}},30361:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var r=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&t.test(e))&&e>-1&&e%1==0&&e<n}},28586:(e,t,n)=>{var r=n(56449),i=n(44394),s=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!i(e))||o.test(e)||!s.test(e)||null!=t&&e in Object(t)}},74218:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},87296:(e,t,n)=>{var r,i=n(55481),s=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!s&&s in e}},55527:e=>{var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},63702:e=>{e.exports=function(){this.__data__=[],this.size=0}},70080:(e,t,n)=>{var r=n(26025),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0||(n==t.length-1?t.pop():i.call(t,n,1),--this.size,0))}},24739:(e,t,n)=>{var r=n(26025);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},48655:(e,t,n)=>{var r=n(26025);e.exports=function(e){return r(this.__data__,e)>-1}},31175:(e,t,n)=>{var r=n(26025);e.exports=function(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}},63040:(e,t,n)=>{var r=n(21549),i=n(80079),s=n(68223);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(s||i),string:new r}}},17670:(e,t,n)=>{var r=n(12651);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},90289:(e,t,n)=>{var r=n(12651);e.exports=function(e){return r(this,e).get(e)}},4509:(e,t,n)=>{var r=n(12651);e.exports=function(e){return r(this,e).has(e)}},72949:(e,t,n)=>{var r=n(12651);e.exports=function(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}},20317:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},62224:(e,t,n)=>{var r=n(50104);e.exports=function(e){var t=r(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},81042:(e,t,n)=>{var r=n(56110)(Object,"create");e.exports=r},3650:(e,t,n)=>{var r=n(74335)(Object.keys,Object);e.exports=r},90181:e=>{e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},86009:(e,t,n)=>{e=n.nmd(e);var r=n(34840),i=t&&!t.nodeType&&t,s=i&&e&&!e.nodeType&&e,o=s&&s.exports===i&&r.process,a=function(){try{return s&&s.require&&s.require("util").types||o&&o.binding&&o.binding("util")}catch(e){}}();e.exports=a},59350:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},74335:e=>{e.exports=function(e,t){return function(n){return e(t(n))}}},56757:(e,t,n)=>{var r=n(91033),i=Math.max;e.exports=function(e,t,n){return t=i(void 0===t?e.length-1:t,0),function(){for(var s=arguments,o=-1,a=i(s.length-t,0),u=Array(a);++o<a;)u[o]=s[t+o];o=-1;for(var l=Array(t+1);++o<t;)l[o]=s[o];return l[t]=n(u),r(e,this,l)}}},9325:(e,t,n)=>{var r=n(34840),i="object"==typeof self&&self&&self.Object===Object&&self,s=r||i||Function("return this")();e.exports=s},31380:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},51459:e=>{e.exports=function(e){return this.__data__.has(e)}},84247:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},32865:(e,t,n)=>{var r=n(19570),i=n(51811)(r);e.exports=i},51811:e=>{var t=Date.now;e.exports=function(e){var n=0,r=0;return function(){var i=t(),s=16-(i-r);if(r=i,s>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},51420:(e,t,n)=>{var r=n(80079);e.exports=function(){this.__data__=new r,this.size=0}},90938:e=>{e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},63605:e=>{e.exports=function(e){return this.__data__.get(e)}},29817:e=>{e.exports=function(e){return this.__data__.has(e)}},80945:(e,t,n)=>{var r=n(80079),i=n(68223),s=n(53661);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var o=n.__data__;if(!i||o.length<199)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new s(o)}return n.set(e,t),this.size=n.size,this}},61802:(e,t,n)=>{var r=n(62224),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,s=/\\(\\)?/g,o=r((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(i,(function(e,n,r,i){t.push(r?i.replace(s,"$1"):n||e)})),t}));e.exports=o},77797:(e,t,n)=>{var r=n(44394);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},47473:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},31800:e=>{var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},88055:(e,t,n)=>{var r=n(9999);e.exports=function(e){return r(e,5)}},37334:e=>{e.exports=function(e){return function(){return e}}},38221:(e,t,n)=>{var r=n(23805),i=n(10124),s=n(99374),o=Math.max,a=Math.min;e.exports=function(e,t,n){var u,l,d,c,p,f,y=0,h=!1,g=!1,m=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function v(t){var n=u,r=l;return u=l=void 0,y=t,c=e.apply(r,n)}function w(e){var n=e-f;return void 0===f||n>=t||n<0||g&&e-y>=d}function b(){var e=i();if(w(e))return j(e);p=setTimeout(b,function(e){var n=t-(e-f);return g?a(n,d-(e-y)):n}(e))}function j(e){return p=void 0,m&&u?v(e):(u=l=void 0,c)}function S(){var e=i(),n=w(e);if(u=arguments,l=this,f=e,n){if(void 0===p)return function(e){return y=e,p=setTimeout(b,t),h?v(e):c}(f);if(g)return clearTimeout(p),p=setTimeout(b,t),v(f)}return void 0===p&&(p=setTimeout(b,t)),c}return t=s(t)||0,r(n)&&(h=!!n.leading,d=(g="maxWait"in n)?o(s(n.maxWait)||0,t):d,m="trailing"in n?!!n.trailing:m),S.cancel=function(){void 0!==p&&clearTimeout(p),y=0,u=f=l=p=void 0},S.flush=function(){return void 0===p?c:j(i())},S}},75288:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},35970:(e,t,n)=>{var r=n(83120);e.exports=function(e){return null!=e&&e.length?r(e,1):[]}},58156:(e,t,n)=>{var r=n(47422);e.exports=function(e,t,n){var i=null==e?void 0:r(e,t);return void 0===i?n:i}},80631:(e,t,n)=>{var r=n(28077),i=n(49326);e.exports=function(e,t){return null!=e&&i(e,t,r)}},83488:e=>{e.exports=function(e){return e}},72428:(e,t,n)=>{var r=n(27534),i=n(40346),s=Object.prototype,o=s.hasOwnProperty,a=s.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(e){return i(e)&&o.call(e,"callee")&&!a.call(e,"callee")};e.exports=u},56449:e=>{var t=Array.isArray;e.exports=t},64894:(e,t,n)=>{var r=n(1882),i=n(30294);e.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},3656:(e,t,n)=>{e=n.nmd(e);var r=n(9325),i=n(89935),s=t&&!t.nodeType&&t,o=s&&e&&!e.nodeType&&e,a=o&&o.exports===s?r.Buffer:void 0,u=(a?a.isBuffer:void 0)||i;e.exports=u},2404:(e,t,n)=>{var r=n(60270);e.exports=function(e,t){return r(e,t)}},29132:(e,t,n)=>{var r=n(60270);e.exports=function(e,t,n){var i=(n="function"==typeof n?n:void 0)?n(e,t):void 0;return void 0===i?r(e,t,void 0,n):!!i}},1882:(e,t,n)=>{var r=n(72552),i=n(23805);e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},30294:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},87730:(e,t,n)=>{var r=n(29172),i=n(27301),s=n(86009),o=s&&s.isMap,a=o?i(o):r;e.exports=a},23805:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},40346:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},38440:(e,t,n)=>{var r=n(16038),i=n(27301),s=n(86009),o=s&&s.isSet,a=o?i(o):r;e.exports=a},44394:(e,t,n)=>{var r=n(72552),i=n(40346);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},37167:(e,t,n)=>{var r=n(4901),i=n(27301),s=n(86009),o=s&&s.isTypedArray,a=o?i(o):r;e.exports=a},95950:(e,t,n)=>{var r=n(70695),i=n(88984),s=n(64894);e.exports=function(e){return s(e)?r(e):i(e)}},37241:(e,t,n)=>{var r=n(70695),i=n(72903),s=n(64894);e.exports=function(e){return s(e)?r(e,!0):i(e)}},2543:function(e,t,n){var r;e=n.nmd(e),function(){var i,s="Expected a function",o="__lodash_hash_undefined__",a="__lodash_placeholder__",u=32,l=128,d=1/0,c=9007199254740991,p=NaN,f=4294967295,y=[["ary",l],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",u],["partialRight",64],["rearg",256]],h="[object Arguments]",g="[object Array]",m="[object Boolean]",v="[object Date]",w="[object Error]",b="[object Function]",j="[object GeneratorFunction]",S="[object Map]",C="[object Number]",A="[object Object]",R="[object Promise]",I="[object RegExp]",T="[object Set]",E="[object String]",O="[object Symbol]",_="[object WeakMap]",M="[object ArrayBuffer]",L="[object DataView]",P="[object Float32Array]",N="[object Float64Array]",W="[object Int8Array]",k="[object Int16Array]",D="[object Int32Array]",x="[object Uint8Array]",F="[object Uint8ClampedArray]",B="[object Uint16Array]",q="[object Uint32Array]",U=/\b__p \+= '';/g,$=/\b(__p \+=) '' \+/g,J=/(__e\(.*?\)|\b__t\)) \+\n'';/g,H=/&(?:amp|lt|gt|quot|#39);/g,V=/[&<>"']/g,z=RegExp(H.source),G=RegExp(V.source),Y=/<%-([\s\S]+?)%>/g,Q=/<%([\s\S]+?)%>/g,K=/<%=([\s\S]+?)%>/g,Z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,X=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,ne=RegExp(te.source),re=/^\s+/,ie=/\s/,se=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,oe=/\{\n\/\* \[wrapped with (.+)\] \*/,ae=/,? & /,ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,le=/[()=,{}\[\]\/\s]/,de=/\\(\\)?/g,ce=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pe=/\w*$/,fe=/^[-+]0x[0-9a-f]+$/i,ye=/^0b[01]+$/i,he=/^\[object .+?Constructor\]$/,ge=/^0o[0-7]+$/i,me=/^(?:0|[1-9]\d*)$/,ve=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,we=/($^)/,be=/['\n\r\u2028\u2029\\]/g,je="\\ud800-\\udfff",Se="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ce="\\u2700-\\u27bf",Ae="a-z\\xdf-\\xf6\\xf8-\\xff",Re="A-Z\\xc0-\\xd6\\xd8-\\xde",Ie="\\ufe0e\\ufe0f",Te="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ee="["+je+"]",Oe="["+Te+"]",_e="["+Se+"]",Me="\\d+",Le="["+Ce+"]",Pe="["+Ae+"]",Ne="[^"+je+Te+Me+Ce+Ae+Re+"]",We="\\ud83c[\\udffb-\\udfff]",ke="[^"+je+"]",De="(?:\\ud83c[\\udde6-\\uddff]){2}",xe="[\\ud800-\\udbff][\\udc00-\\udfff]",Fe="["+Re+"]",Be="\\u200d",qe="(?:"+Pe+"|"+Ne+")",Ue="(?:"+Fe+"|"+Ne+")",$e="(?:['’](?:d|ll|m|re|s|t|ve))?",Je="(?:['’](?:D|LL|M|RE|S|T|VE))?",He="(?:"+_e+"|"+We+")?",Ve="["+Ie+"]?",ze=Ve+He+"(?:"+Be+"(?:"+[ke,De,xe].join("|")+")"+Ve+He+")*",Ge="(?:"+[Le,De,xe].join("|")+")"+ze,Ye="(?:"+[ke+_e+"?",_e,De,xe,Ee].join("|")+")",Qe=RegExp("['’]","g"),Ke=RegExp(_e,"g"),Ze=RegExp(We+"(?="+We+")|"+Ye+ze,"g"),Xe=RegExp([Fe+"?"+Pe+"+"+$e+"(?="+[Oe,Fe,"$"].join("|")+")",Ue+"+"+Je+"(?="+[Oe,Fe+qe,"$"].join("|")+")",Fe+"?"+qe+"+"+$e,Fe+"+"+Je,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Me,Ge].join("|"),"g"),et=RegExp("["+Be+je+Se+Ie+"]"),tt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,nt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],rt=-1,it={};it[P]=it[N]=it[W]=it[k]=it[D]=it[x]=it[F]=it[B]=it[q]=!0,it[h]=it[g]=it[M]=it[m]=it[L]=it[v]=it[w]=it[b]=it[S]=it[C]=it[A]=it[I]=it[T]=it[E]=it[_]=!1;var st={};st[h]=st[g]=st[M]=st[L]=st[m]=st[v]=st[P]=st[N]=st[W]=st[k]=st[D]=st[S]=st[C]=st[A]=st[I]=st[T]=st[E]=st[O]=st[x]=st[F]=st[B]=st[q]=!0,st[w]=st[b]=st[_]=!1;var ot={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},at=parseFloat,ut=parseInt,lt="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,dt="object"==typeof self&&self&&self.Object===Object&&self,ct=lt||dt||Function("return this")(),pt=t&&!t.nodeType&&t,ft=pt&&e&&!e.nodeType&&e,yt=ft&&ft.exports===pt,ht=yt&&lt.process,gt=function(){try{return ft&&ft.require&&ft.require("util").types||ht&&ht.binding&&ht.binding("util")}catch(e){}}(),mt=gt&&gt.isArrayBuffer,vt=gt&&gt.isDate,wt=gt&&gt.isMap,bt=gt&&gt.isRegExp,jt=gt&&gt.isSet,St=gt&&gt.isTypedArray;function Ct(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function At(e,t,n,r){for(var i=-1,s=null==e?0:e.length;++i<s;){var o=e[i];t(r,o,n(o),e)}return r}function Rt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function It(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function Tt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function Et(e,t){for(var n=-1,r=null==e?0:e.length,i=0,s=[];++n<r;){var o=e[n];t(o,n,e)&&(s[i++]=o)}return s}function Ot(e,t){return!(null==e||!e.length)&&Ft(e,t,0)>-1}function _t(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function Mt(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function Lt(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function Pt(e,t,n,r){var i=-1,s=null==e?0:e.length;for(r&&s&&(n=e[++i]);++i<s;)n=t(n,e[i],i,e);return n}function Nt(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function Wt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var kt=$t("length");function Dt(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r}function xt(e,t,n,r){for(var i=e.length,s=n+(r?1:-1);r?s--:++s<i;)if(t(e[s],s,e))return s;return-1}function Ft(e,t,n){return t==t?function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):xt(e,qt,n)}function Bt(e,t,n,r){for(var i=n-1,s=e.length;++i<s;)if(r(e[i],t))return i;return-1}function qt(e){return e!=e}function Ut(e,t){var n=null==e?0:e.length;return n?Vt(e,t)/n:p}function $t(e){return function(t){return null==t?i:t[e]}}function Jt(e){return function(t){return null==e?i:e[t]}}function Ht(e,t,n,r,i){return i(e,(function(e,i,s){n=r?(r=!1,e):t(n,e,i,s)})),n}function Vt(e,t){for(var n,r=-1,s=e.length;++r<s;){var o=t(e[r]);o!==i&&(n=n===i?o:n+o)}return n}function zt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Gt(e){return e?e.slice(0,pn(e)+1).replace(re,""):e}function Yt(e){return function(t){return e(t)}}function Qt(e,t){return Mt(t,(function(t){return e[t]}))}function Kt(e,t){return e.has(t)}function Zt(e,t){for(var n=-1,r=e.length;++n<r&&Ft(t,e[n],0)>-1;);return n}function Xt(e,t){for(var n=e.length;n--&&Ft(t,e[n],0)>-1;);return n}var en=Jt({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),tn=Jt({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function nn(e){return"\\"+ot[e]}function rn(e){return et.test(e)}function sn(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function on(e,t){return function(n){return e(t(n))}}function an(e,t){for(var n=-1,r=e.length,i=0,s=[];++n<r;){var o=e[n];o!==t&&o!==a||(e[n]=a,s[i++]=n)}return s}function un(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function ln(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function dn(e){return rn(e)?function(e){for(var t=Ze.lastIndex=0;Ze.test(e);)++t;return t}(e):kt(e)}function cn(e){return rn(e)?function(e){return e.match(Ze)||[]}(e):function(e){return e.split("")}(e)}function pn(e){for(var t=e.length;t--&&ie.test(e.charAt(t)););return t}var fn=Jt({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),yn=function e(t){var n,r=(t=null==t?ct:yn.defaults(ct.Object(),t,yn.pick(ct,nt))).Array,ie=t.Date,je=t.Error,Se=t.Function,Ce=t.Math,Ae=t.Object,Re=t.RegExp,Ie=t.String,Te=t.TypeError,Ee=r.prototype,Oe=Se.prototype,_e=Ae.prototype,Me=t["__core-js_shared__"],Le=Oe.toString,Pe=_e.hasOwnProperty,Ne=0,We=(n=/[^.]+$/.exec(Me&&Me.keys&&Me.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",ke=_e.toString,De=Le.call(Ae),xe=ct._,Fe=Re("^"+Le.call(Pe).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Be=yt?t.Buffer:i,qe=t.Symbol,Ue=t.Uint8Array,$e=Be?Be.allocUnsafe:i,Je=on(Ae.getPrototypeOf,Ae),He=Ae.create,Ve=_e.propertyIsEnumerable,ze=Ee.splice,Ge=qe?qe.isConcatSpreadable:i,Ye=qe?qe.iterator:i,Ze=qe?qe.toStringTag:i,et=function(){try{var e=us(Ae,"defineProperty");return e({},"",{}),e}catch(e){}}(),ot=t.clearTimeout!==ct.clearTimeout&&t.clearTimeout,lt=ie&&ie.now!==ct.Date.now&&ie.now,dt=t.setTimeout!==ct.setTimeout&&t.setTimeout,pt=Ce.ceil,ft=Ce.floor,ht=Ae.getOwnPropertySymbols,gt=Be?Be.isBuffer:i,kt=t.isFinite,Jt=Ee.join,hn=on(Ae.keys,Ae),gn=Ce.max,mn=Ce.min,vn=ie.now,wn=t.parseInt,bn=Ce.random,jn=Ee.reverse,Sn=us(t,"DataView"),Cn=us(t,"Map"),An=us(t,"Promise"),Rn=us(t,"Set"),In=us(t,"WeakMap"),Tn=us(Ae,"create"),En=In&&new In,On={},_n=ks(Sn),Mn=ks(Cn),Ln=ks(An),Pn=ks(Rn),Nn=ks(In),Wn=qe?qe.prototype:i,kn=Wn?Wn.valueOf:i,Dn=Wn?Wn.toString:i;function xn(e){if(ea(e)&&!$o(e)&&!(e instanceof Un)){if(e instanceof qn)return e;if(Pe.call(e,"__wrapped__"))return Ds(e)}return new qn(e)}var Fn=function(){function e(){}return function(t){if(!Xo(t))return{};if(He)return He(t);e.prototype=t;var n=new e;return e.prototype=i,n}}();function Bn(){}function qn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function Un(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=f,this.__views__=[]}function $n(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Jn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Hn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Vn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Hn;++t<n;)this.add(e[t])}function zn(e){var t=this.__data__=new Jn(e);this.size=t.size}function Gn(e,t){var n=$o(e),r=!n&&Uo(e),i=!n&&!r&&zo(e),s=!n&&!r&&!i&&ua(e),o=n||r||i||s,a=o?zt(e.length,Ie):[],u=a.length;for(var l in e)!t&&!Pe.call(e,l)||o&&("length"==l||i&&("offset"==l||"parent"==l)||s&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||hs(l,u))||a.push(l);return a}function Yn(e){var t=e.length;return t?e[Hr(0,t-1)]:i}function Qn(e,t){return Ms(Ii(e),sr(t,0,e.length))}function Kn(e){return Ms(Ii(e))}function Zn(e,t,n){(n!==i&&!Fo(e[t],n)||n===i&&!(t in e))&&rr(e,t,n)}function Xn(e,t,n){var r=e[t];Pe.call(e,t)&&Fo(r,n)&&(n!==i||t in e)||rr(e,t,n)}function er(e,t){for(var n=e.length;n--;)if(Fo(e[n][0],t))return n;return-1}function tr(e,t,n,r){return dr(e,(function(e,i,s){t(r,e,n(e),s)})),r}function nr(e,t){return e&&Ti(t,_a(t),e)}function rr(e,t,n){"__proto__"==t&&et?et(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ir(e,t){for(var n=-1,s=t.length,o=r(s),a=null==e;++n<s;)o[n]=a?i:Ra(e,t[n]);return o}function sr(e,t,n){return e==e&&(n!==i&&(e=e<=n?e:n),t!==i&&(e=e>=t?e:t)),e}function or(e,t,n,r,s,o){var a,u=1&t,l=2&t,d=4&t;if(n&&(a=s?n(e,r,s,o):n(e)),a!==i)return a;if(!Xo(e))return e;var c=$o(e);if(c){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Pe.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!u)return Ii(e,a)}else{var p=cs(e),f=p==b||p==j;if(zo(e))return bi(e,u);if(p==A||p==h||f&&!s){if(a=l||f?{}:fs(e),!u)return l?function(e,t){return Ti(e,ds(e),t)}(e,function(e,t){return e&&Ti(t,Ma(t),e)}(a,e)):function(e,t){return Ti(e,ls(e),t)}(e,nr(a,e))}else{if(!st[p])return s?e:{};a=function(e,t,n){var r,i=e.constructor;switch(t){case M:return ji(e);case m:case v:return new i(+e);case L:return function(e,t){var n=t?ji(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case P:case N:case W:case k:case D:case x:case F:case B:case q:return Si(e,n);case S:return new i;case C:case E:return new i(e);case I:return function(e){var t=new e.constructor(e.source,pe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case T:return new i;case O:return r=e,kn?Ae(kn.call(r)):{}}}(e,p,u)}}o||(o=new zn);var y=o.get(e);if(y)return y;o.set(e,a),sa(e)?e.forEach((function(r){a.add(or(r,t,n,r,e,o))})):ta(e)&&e.forEach((function(r,i){a.set(i,or(r,t,n,i,e,o))}));var g=c?i:(d?l?ts:es:l?Ma:_a)(e);return Rt(g||e,(function(r,i){g&&(r=e[i=r]),Xn(a,i,or(r,t,n,i,e,o))})),a}function ar(e,t,n){var r=n.length;if(null==e)return!r;for(e=Ae(e);r--;){var s=n[r],o=t[s],a=e[s];if(a===i&&!(s in e)||!o(a))return!1}return!0}function ur(e,t,n){if("function"!=typeof e)throw new Te(s);return Ts((function(){e.apply(i,n)}),t)}function lr(e,t,n,r){var i=-1,s=Ot,o=!0,a=e.length,u=[],l=t.length;if(!a)return u;n&&(t=Mt(t,Yt(n))),r?(s=_t,o=!1):t.length>=200&&(s=Kt,o=!1,t=new Vn(t));e:for(;++i<a;){var d=e[i],c=null==n?d:n(d);if(d=r||0!==d?d:0,o&&c==c){for(var p=l;p--;)if(t[p]===c)continue e;u.push(d)}else s(t,c,r)||u.push(d)}return u}xn.templateSettings={escape:Y,evaluate:Q,interpolate:K,variable:"",imports:{_:xn}},xn.prototype=Bn.prototype,xn.prototype.constructor=xn,qn.prototype=Fn(Bn.prototype),qn.prototype.constructor=qn,Un.prototype=Fn(Bn.prototype),Un.prototype.constructor=Un,$n.prototype.clear=function(){this.__data__=Tn?Tn(null):{},this.size=0},$n.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},$n.prototype.get=function(e){var t=this.__data__;if(Tn){var n=t[e];return n===o?i:n}return Pe.call(t,e)?t[e]:i},$n.prototype.has=function(e){var t=this.__data__;return Tn?t[e]!==i:Pe.call(t,e)},$n.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Tn&&t===i?o:t,this},Jn.prototype.clear=function(){this.__data__=[],this.size=0},Jn.prototype.delete=function(e){var t=this.__data__,n=er(t,e);return!(n<0||(n==t.length-1?t.pop():ze.call(t,n,1),--this.size,0))},Jn.prototype.get=function(e){var t=this.__data__,n=er(t,e);return n<0?i:t[n][1]},Jn.prototype.has=function(e){return er(this.__data__,e)>-1},Jn.prototype.set=function(e,t){var n=this.__data__,r=er(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Hn.prototype.clear=function(){this.size=0,this.__data__={hash:new $n,map:new(Cn||Jn),string:new $n}},Hn.prototype.delete=function(e){var t=os(this,e).delete(e);return this.size-=t?1:0,t},Hn.prototype.get=function(e){return os(this,e).get(e)},Hn.prototype.has=function(e){return os(this,e).has(e)},Hn.prototype.set=function(e,t){var n=os(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Vn.prototype.add=Vn.prototype.push=function(e){return this.__data__.set(e,o),this},Vn.prototype.has=function(e){return this.__data__.has(e)},zn.prototype.clear=function(){this.__data__=new Jn,this.size=0},zn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},zn.prototype.get=function(e){return this.__data__.get(e)},zn.prototype.has=function(e){return this.__data__.has(e)},zn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Jn){var r=n.__data__;if(!Cn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Hn(r)}return n.set(e,t),this.size=n.size,this};var dr=_i(vr),cr=_i(wr,!0);function pr(e,t){var n=!0;return dr(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function fr(e,t,n){for(var r=-1,s=e.length;++r<s;){var o=e[r],a=t(o);if(null!=a&&(u===i?a==a&&!aa(a):n(a,u)))var u=a,l=o}return l}function yr(e,t){var n=[];return dr(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function hr(e,t,n,r,i){var s=-1,o=e.length;for(n||(n=ys),i||(i=[]);++s<o;){var a=e[s];t>0&&n(a)?t>1?hr(a,t-1,n,r,i):Lt(i,a):r||(i[i.length]=a)}return i}var gr=Mi(),mr=Mi(!0);function vr(e,t){return e&&gr(e,t,_a)}function wr(e,t){return e&&mr(e,t,_a)}function br(e,t){return Et(t,(function(t){return Qo(e[t])}))}function jr(e,t){for(var n=0,r=(t=gi(t,e)).length;null!=e&&n<r;)e=e[Ws(t[n++])];return n&&n==r?e:i}function Sr(e,t,n){var r=t(e);return $o(e)?r:Lt(r,n(e))}function Cr(e){return null==e?e===i?"[object Undefined]":"[object Null]":Ze&&Ze in Ae(e)?function(e){var t=Pe.call(e,Ze),n=e[Ze];try{e[Ze]=i;var r=!0}catch(e){}var s=ke.call(e);return r&&(t?e[Ze]=n:delete e[Ze]),s}(e):function(e){return ke.call(e)}(e)}function Ar(e,t){return e>t}function Rr(e,t){return null!=e&&Pe.call(e,t)}function Ir(e,t){return null!=e&&t in Ae(e)}function Tr(e,t,n){for(var s=n?_t:Ot,o=e[0].length,a=e.length,u=a,l=r(a),d=1/0,c=[];u--;){var p=e[u];u&&t&&(p=Mt(p,Yt(t))),d=mn(p.length,d),l[u]=!n&&(t||o>=120&&p.length>=120)?new Vn(u&&p):i}p=e[0];var f=-1,y=l[0];e:for(;++f<o&&c.length<d;){var h=p[f],g=t?t(h):h;if(h=n||0!==h?h:0,!(y?Kt(y,g):s(c,g,n))){for(u=a;--u;){var m=l[u];if(!(m?Kt(m,g):s(e[u],g,n)))continue e}y&&y.push(g),c.push(h)}}return c}function Er(e,t,n){var r=null==(e=As(e,t=gi(t,e)))?e:e[Ws(Gs(t))];return null==r?i:Ct(r,e,n)}function Or(e){return ea(e)&&Cr(e)==h}function _r(e,t,n,r,s){return e===t||(null==e||null==t||!ea(e)&&!ea(t)?e!=e&&t!=t:function(e,t,n,r,s,o){var a=$o(e),u=$o(t),l=a?g:cs(e),d=u?g:cs(t),c=(l=l==h?A:l)==A,p=(d=d==h?A:d)==A,f=l==d;if(f&&zo(e)){if(!zo(t))return!1;a=!0,c=!1}if(f&&!c)return o||(o=new zn),a||ua(e)?Zi(e,t,n,r,s,o):function(e,t,n,r,i,s,o){switch(n){case L:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case M:return!(e.byteLength!=t.byteLength||!s(new Ue(e),new Ue(t)));case m:case v:case C:return Fo(+e,+t);case w:return e.name==t.name&&e.message==t.message;case I:case E:return e==t+"";case S:var a=sn;case T:var u=1&r;if(a||(a=un),e.size!=t.size&&!u)return!1;var l=o.get(e);if(l)return l==t;r|=2,o.set(e,t);var d=Zi(a(e),a(t),r,i,s,o);return o.delete(e),d;case O:if(kn)return kn.call(e)==kn.call(t)}return!1}(e,t,l,n,r,s,o);if(!(1&n)){var y=c&&Pe.call(e,"__wrapped__"),b=p&&Pe.call(t,"__wrapped__");if(y||b){var j=y?e.value():e,R=b?t.value():t;return o||(o=new zn),s(j,R,n,r,o)}}return!!f&&(o||(o=new zn),function(e,t,n,r,s,o){var a=1&n,u=es(e),l=u.length;if(l!=es(t).length&&!a)return!1;for(var d=l;d--;){var c=u[d];if(!(a?c in t:Pe.call(t,c)))return!1}var p=o.get(e),f=o.get(t);if(p&&f)return p==t&&f==e;var y=!0;o.set(e,t),o.set(t,e);for(var h=a;++d<l;){var g=e[c=u[d]],m=t[c];if(r)var v=a?r(m,g,c,t,e,o):r(g,m,c,e,t,o);if(!(v===i?g===m||s(g,m,n,r,o):v)){y=!1;break}h||(h="constructor"==c)}if(y&&!h){var w=e.constructor,b=t.constructor;w==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof b&&b instanceof b||(y=!1)}return o.delete(e),o.delete(t),y}(e,t,n,r,s,o))}(e,t,n,r,_r,s))}function Mr(e,t,n,r){var s=n.length,o=s,a=!r;if(null==e)return!o;for(e=Ae(e);s--;){var u=n[s];if(a&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++s<o;){var l=(u=n[s])[0],d=e[l],c=u[1];if(a&&u[2]){if(d===i&&!(l in e))return!1}else{var p=new zn;if(r)var f=r(d,c,l,e,t,p);if(!(f===i?_r(c,d,3,r,p):f))return!1}}return!0}function Lr(e){return!(!Xo(e)||(t=e,We&&We in t))&&(Qo(e)?Fe:he).test(ks(e));var t}function Pr(e){return"function"==typeof e?e:null==e?nu:"object"==typeof e?$o(e)?xr(e[0],e[1]):Dr(e):cu(e)}function Nr(e){if(!bs(e))return hn(e);var t=[];for(var n in Ae(e))Pe.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Wr(e,t){return e<t}function kr(e,t){var n=-1,i=Ho(e)?r(e.length):[];return dr(e,(function(e,r,s){i[++n]=t(e,r,s)})),i}function Dr(e){var t=as(e);return 1==t.length&&t[0][2]?Ss(t[0][0],t[0][1]):function(n){return n===e||Mr(n,e,t)}}function xr(e,t){return ms(e)&&js(t)?Ss(Ws(e),t):function(n){var r=Ra(n,e);return r===i&&r===t?Ia(n,e):_r(t,r,3)}}function Fr(e,t,n,r,s){e!==t&&gr(t,(function(o,a){if(s||(s=new zn),Xo(o))!function(e,t,n,r,s,o,a){var u=Rs(e,n),l=Rs(t,n),d=a.get(l);if(d)Zn(e,n,d);else{var c=o?o(u,l,n+"",e,t,a):i,p=c===i;if(p){var f=$o(l),y=!f&&zo(l),h=!f&&!y&&ua(l);c=l,f||y||h?$o(u)?c=u:Vo(u)?c=Ii(u):y?(p=!1,c=bi(l,!0)):h?(p=!1,c=Si(l,!0)):c=[]:ra(l)||Uo(l)?(c=u,Uo(u)?c=ga(u):Xo(u)&&!Qo(u)||(c=fs(l))):p=!1}p&&(a.set(l,c),s(c,l,r,o,a),a.delete(l)),Zn(e,n,c)}}(e,t,a,n,Fr,r,s);else{var u=r?r(Rs(e,a),o,a+"",e,t,s):i;u===i&&(u=o),Zn(e,a,u)}}),Ma)}function Br(e,t){var n=e.length;if(n)return hs(t+=t<0?n:0,n)?e[t]:i}function qr(e,t,n){t=t.length?Mt(t,(function(e){return $o(e)?function(t){return jr(t,1===e.length?e[0]:e)}:e})):[nu];var r=-1;t=Mt(t,Yt(ss()));var i=kr(e,(function(e,n,i){var s=Mt(t,(function(t){return t(e)}));return{criteria:s,index:++r,value:e}}));return function(e){var t=e.length;for(e.sort((function(e,t){return function(e,t,n){for(var r=-1,i=e.criteria,s=t.criteria,o=i.length,a=n.length;++r<o;){var u=Ci(i[r],s[r]);if(u)return r>=a?u:u*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}));t--;)e[t]=e[t].value;return e}(i)}function Ur(e,t,n){for(var r=-1,i=t.length,s={};++r<i;){var o=t[r],a=jr(e,o);n(a,o)&&Qr(s,gi(o,e),a)}return s}function $r(e,t,n,r){var i=r?Bt:Ft,s=-1,o=t.length,a=e;for(e===t&&(t=Ii(t)),n&&(a=Mt(e,Yt(n)));++s<o;)for(var u=0,l=t[s],d=n?n(l):l;(u=i(a,d,u,r))>-1;)a!==e&&ze.call(a,u,1),ze.call(e,u,1);return e}function Jr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==s){var s=i;hs(i)?ze.call(e,i,1):ui(e,i)}}return e}function Hr(e,t){return e+ft(bn()*(t-e+1))}function Vr(e,t){var n="";if(!e||t<1||t>c)return n;do{t%2&&(n+=e),(t=ft(t/2))&&(e+=e)}while(t);return n}function zr(e,t){return Es(Cs(e,t,nu),e+"")}function Gr(e){return Yn(Fa(e))}function Yr(e,t){var n=Fa(e);return Ms(n,sr(t,0,n.length))}function Qr(e,t,n,r){if(!Xo(e))return e;for(var s=-1,o=(t=gi(t,e)).length,a=o-1,u=e;null!=u&&++s<o;){var l=Ws(t[s]),d=n;if("__proto__"===l||"constructor"===l||"prototype"===l)return e;if(s!=a){var c=u[l];(d=r?r(c,l,u):i)===i&&(d=Xo(c)?c:hs(t[s+1])?[]:{})}Xn(u,l,d),u=u[l]}return e}var Kr=En?function(e,t){return En.set(e,t),e}:nu,Zr=et?function(e,t){return et(e,"toString",{configurable:!0,enumerable:!1,value:Xa(t),writable:!0})}:nu;function Xr(e){return Ms(Fa(e))}function ei(e,t,n){var i=-1,s=e.length;t<0&&(t=-t>s?0:s+t),(n=n>s?s:n)<0&&(n+=s),s=t>n?0:n-t>>>0,t>>>=0;for(var o=r(s);++i<s;)o[i]=e[i+t];return o}function ti(e,t){var n;return dr(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function ni(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;r<i;){var s=r+i>>>1,o=e[s];null!==o&&!aa(o)&&(n?o<=t:o<t)?r=s+1:i=s}return i}return ri(e,t,nu,n)}function ri(e,t,n,r){var s=0,o=null==e?0:e.length;if(0===o)return 0;for(var a=(t=n(t))!=t,u=null===t,l=aa(t),d=t===i;s<o;){var c=ft((s+o)/2),p=n(e[c]),f=p!==i,y=null===p,h=p==p,g=aa(p);if(a)var m=r||h;else m=d?h&&(r||f):u?h&&f&&(r||!y):l?h&&f&&!y&&(r||!g):!y&&!g&&(r?p<=t:p<t);m?s=c+1:o=c}return mn(o,4294967294)}function ii(e,t){for(var n=-1,r=e.length,i=0,s=[];++n<r;){var o=e[n],a=t?t(o):o;if(!n||!Fo(a,u)){var u=a;s[i++]=0===o?0:o}}return s}function si(e){return"number"==typeof e?e:aa(e)?p:+e}function oi(e){if("string"==typeof e)return e;if($o(e))return Mt(e,oi)+"";if(aa(e))return Dn?Dn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ai(e,t,n){var r=-1,i=Ot,s=e.length,o=!0,a=[],u=a;if(n)o=!1,i=_t;else if(s>=200){var l=t?null:Vi(e);if(l)return un(l);o=!1,i=Kt,u=new Vn}else u=t?[]:a;e:for(;++r<s;){var d=e[r],c=t?t(d):d;if(d=n||0!==d?d:0,o&&c==c){for(var p=u.length;p--;)if(u[p]===c)continue e;t&&u.push(c),a.push(d)}else i(u,c,n)||(u!==a&&u.push(c),a.push(d))}return a}function ui(e,t){return null==(e=As(e,t=gi(t,e)))||delete e[Ws(Gs(t))]}function li(e,t,n,r){return Qr(e,t,n(jr(e,t)),r)}function di(e,t,n,r){for(var i=e.length,s=r?i:-1;(r?s--:++s<i)&&t(e[s],s,e););return n?ei(e,r?0:s,r?s+1:i):ei(e,r?s+1:0,r?i:s)}function ci(e,t){var n=e;return n instanceof Un&&(n=n.value()),Pt(t,(function(e,t){return t.func.apply(t.thisArg,Lt([e],t.args))}),n)}function pi(e,t,n){var i=e.length;if(i<2)return i?ai(e[0]):[];for(var s=-1,o=r(i);++s<i;)for(var a=e[s],u=-1;++u<i;)u!=s&&(o[s]=lr(o[s]||a,e[u],t,n));return ai(hr(o,1),t,n)}function fi(e,t,n){for(var r=-1,s=e.length,o=t.length,a={};++r<s;){var u=r<o?t[r]:i;n(a,e[r],u)}return a}function yi(e){return Vo(e)?e:[]}function hi(e){return"function"==typeof e?e:nu}function gi(e,t){return $o(e)?e:ms(e,t)?[e]:Ns(ma(e))}var mi=zr;function vi(e,t,n){var r=e.length;return n=n===i?r:n,!t&&n>=r?e:ei(e,t,n)}var wi=ot||function(e){return ct.clearTimeout(e)};function bi(e,t){if(t)return e.slice();var n=e.length,r=$e?$e(n):new e.constructor(n);return e.copy(r),r}function ji(e){var t=new e.constructor(e.byteLength);return new Ue(t).set(new Ue(e)),t}function Si(e,t){var n=t?ji(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Ci(e,t){if(e!==t){var n=e!==i,r=null===e,s=e==e,o=aa(e),a=t!==i,u=null===t,l=t==t,d=aa(t);if(!u&&!d&&!o&&e>t||o&&a&&l&&!u&&!d||r&&a&&l||!n&&l||!s)return 1;if(!r&&!o&&!d&&e<t||d&&n&&s&&!r&&!o||u&&n&&s||!a&&s||!l)return-1}return 0}function Ai(e,t,n,i){for(var s=-1,o=e.length,a=n.length,u=-1,l=t.length,d=gn(o-a,0),c=r(l+d),p=!i;++u<l;)c[u]=t[u];for(;++s<a;)(p||s<o)&&(c[n[s]]=e[s]);for(;d--;)c[u++]=e[s++];return c}function Ri(e,t,n,i){for(var s=-1,o=e.length,a=-1,u=n.length,l=-1,d=t.length,c=gn(o-u,0),p=r(c+d),f=!i;++s<c;)p[s]=e[s];for(var y=s;++l<d;)p[y+l]=t[l];for(;++a<u;)(f||s<o)&&(p[y+n[a]]=e[s++]);return p}function Ii(e,t){var n=-1,i=e.length;for(t||(t=r(i));++n<i;)t[n]=e[n];return t}function Ti(e,t,n,r){var s=!n;n||(n={});for(var o=-1,a=t.length;++o<a;){var u=t[o],l=r?r(n[u],e[u],u,n,e):i;l===i&&(l=e[u]),s?rr(n,u,l):Xn(n,u,l)}return n}function Ei(e,t){return function(n,r){var i=$o(n)?At:tr,s=t?t():{};return i(n,e,ss(r,2),s)}}function Oi(e){return zr((function(t,n){var r=-1,s=n.length,o=s>1?n[s-1]:i,a=s>2?n[2]:i;for(o=e.length>3&&"function"==typeof o?(s--,o):i,a&&gs(n[0],n[1],a)&&(o=s<3?i:o,s=1),t=Ae(t);++r<s;){var u=n[r];u&&e(t,u,r,o)}return t}))}function _i(e,t){return function(n,r){if(null==n)return n;if(!Ho(n))return e(n,r);for(var i=n.length,s=t?i:-1,o=Ae(n);(t?s--:++s<i)&&!1!==r(o[s],s,o););return n}}function Mi(e){return function(t,n,r){for(var i=-1,s=Ae(t),o=r(t),a=o.length;a--;){var u=o[e?a:++i];if(!1===n(s[u],u,s))break}return t}}function Li(e){return function(t){var n=rn(t=ma(t))?cn(t):i,r=n?n[0]:t.charAt(0),s=n?vi(n,1).join(""):t.slice(1);return r[e]()+s}}function Pi(e){return function(t){return Pt(Qa(Ua(t).replace(Qe,"")),e,"")}}function Ni(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Fn(e.prototype),r=e.apply(n,t);return Xo(r)?r:n}}function Wi(e){return function(t,n,r){var s=Ae(t);if(!Ho(t)){var o=ss(n,3);t=_a(t),n=function(e){return o(s[e],e,s)}}var a=e(t,n,r);return a>-1?s[o?t[a]:a]:i}}function ki(e){return Xi((function(t){var n=t.length,r=n,o=qn.prototype.thru;for(e&&t.reverse();r--;){var a=t[r];if("function"!=typeof a)throw new Te(s);if(o&&!u&&"wrapper"==rs(a))var u=new qn([],!0)}for(r=u?r:n;++r<n;){var l=rs(a=t[r]),d="wrapper"==l?ns(a):i;u=d&&vs(d[0])&&424==d[1]&&!d[4].length&&1==d[9]?u[rs(d[0])].apply(u,d[3]):1==a.length&&vs(a)?u[l]():u.thru(a)}return function(){var e=arguments,r=e[0];if(u&&1==e.length&&$o(r))return u.plant(r).value();for(var i=0,s=n?t[i].apply(this,e):r;++i<n;)s=t[i].call(this,s);return s}}))}function Di(e,t,n,s,o,a,u,d,c,p){var f=t&l,y=1&t,h=2&t,g=24&t,m=512&t,v=h?i:Ni(e);return function l(){for(var w=arguments.length,b=r(w),j=w;j--;)b[j]=arguments[j];if(g)var S=is(l),C=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(b,S);if(s&&(b=Ai(b,s,o,g)),a&&(b=Ri(b,a,u,g)),w-=C,g&&w<p){var A=an(b,S);return Ji(e,t,Di,l.placeholder,n,b,A,d,c,p-w)}var R=y?n:this,I=h?R[e]:e;return w=b.length,d?b=function(e,t){for(var n=e.length,r=mn(t.length,n),s=Ii(e);r--;){var o=t[r];e[r]=hs(o,n)?s[o]:i}return e}(b,d):m&&w>1&&b.reverse(),f&&c<w&&(b.length=c),this&&this!==ct&&this instanceof l&&(I=v||Ni(I)),I.apply(R,b)}}function xi(e,t){return function(n,r){return function(e,t,n,r){return vr(e,(function(e,i,s){t(r,n(e),i,s)})),r}(n,e,t(r),{})}}function Fi(e,t){return function(n,r){var s;if(n===i&&r===i)return t;if(n!==i&&(s=n),r!==i){if(s===i)return r;"string"==typeof n||"string"==typeof r?(n=oi(n),r=oi(r)):(n=si(n),r=si(r)),s=e(n,r)}return s}}function Bi(e){return Xi((function(t){return t=Mt(t,Yt(ss())),zr((function(n){var r=this;return e(t,(function(e){return Ct(e,r,n)}))}))}))}function qi(e,t){var n=(t=t===i?" ":oi(t)).length;if(n<2)return n?Vr(t,e):t;var r=Vr(t,pt(e/dn(t)));return rn(t)?vi(cn(r),0,e).join(""):r.slice(0,e)}function Ui(e){return function(t,n,s){return s&&"number"!=typeof s&&gs(t,n,s)&&(n=s=i),t=pa(t),n===i?(n=t,t=0):n=pa(n),function(e,t,n,i){for(var s=-1,o=gn(pt((t-e)/(n||1)),0),a=r(o);o--;)a[i?o:++s]=e,e+=n;return a}(t,n,s=s===i?t<n?1:-1:pa(s),e)}}function $i(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=ha(t),n=ha(n)),e(t,n)}}function Ji(e,t,n,r,s,o,a,l,d,c){var p=8&t;t|=p?u:64,4&(t&=~(p?64:u))||(t&=-4);var f=[e,t,s,p?o:i,p?a:i,p?i:o,p?i:a,l,d,c],y=n.apply(i,f);return vs(e)&&Is(y,f),y.placeholder=r,Os(y,e,t)}function Hi(e){var t=Ce[e];return function(e,n){if(e=ha(e),(n=null==n?0:mn(fa(n),292))&&kt(e)){var r=(ma(e)+"e").split("e");return+((r=(ma(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Vi=Rn&&1/un(new Rn([,-0]))[1]==d?function(e){return new Rn(e)}:au;function zi(e){return function(t){var n=cs(t);return n==S?sn(t):n==T?ln(t):function(e,t){return Mt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Gi(e,t,n,o,d,c,p,f){var y=2&t;if(!y&&"function"!=typeof e)throw new Te(s);var h=o?o.length:0;if(h||(t&=-97,o=d=i),p=p===i?p:gn(fa(p),0),f=f===i?f:fa(f),h-=d?d.length:0,64&t){var g=o,m=d;o=d=i}var v=y?i:ns(e),w=[e,t,n,o,d,g,m,c,p,f];if(v&&function(e,t){var n=e[1],r=t[1],i=n|r,s=i<131,o=r==l&&8==n||r==l&&256==n&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!s&&!o)return e;1&r&&(e[2]=t[2],i|=1&n?0:4);var u=t[3];if(u){var d=e[3];e[3]=d?Ai(d,u,t[4]):u,e[4]=d?an(e[3],a):t[4]}(u=t[5])&&(d=e[5],e[5]=d?Ri(d,u,t[6]):u,e[6]=d?an(e[5],a):t[6]),(u=t[7])&&(e[7]=u),r&l&&(e[8]=null==e[8]?t[8]:mn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i}(w,v),e=w[0],t=w[1],n=w[2],o=w[3],d=w[4],!(f=w[9]=w[9]===i?y?0:e.length:gn(w[9]-h,0))&&24&t&&(t&=-25),t&&1!=t)b=8==t||16==t?function(e,t,n){var s=Ni(e);return function o(){for(var a=arguments.length,u=r(a),l=a,d=is(o);l--;)u[l]=arguments[l];var c=a<3&&u[0]!==d&&u[a-1]!==d?[]:an(u,d);return(a-=c.length)<n?Ji(e,t,Di,o.placeholder,i,u,c,i,i,n-a):Ct(this&&this!==ct&&this instanceof o?s:e,this,u)}}(e,t,f):t!=u&&33!=t||d.length?Di.apply(i,w):function(e,t,n,i){var s=1&t,o=Ni(e);return function t(){for(var a=-1,u=arguments.length,l=-1,d=i.length,c=r(d+u),p=this&&this!==ct&&this instanceof t?o:e;++l<d;)c[l]=i[l];for(;u--;)c[l++]=arguments[++a];return Ct(p,s?n:this,c)}}(e,t,n,o);else var b=function(e,t,n){var r=1&t,i=Ni(e);return function t(){return(this&&this!==ct&&this instanceof t?i:e).apply(r?n:this,arguments)}}(e,t,n);return Os((v?Kr:Is)(b,w),e,t)}function Yi(e,t,n,r){return e===i||Fo(e,_e[n])&&!Pe.call(r,n)?t:e}function Qi(e,t,n,r,s,o){return Xo(e)&&Xo(t)&&(o.set(t,e),Fr(e,t,i,Qi,o),o.delete(t)),e}function Ki(e){return ra(e)?i:e}function Zi(e,t,n,r,s,o){var a=1&n,u=e.length,l=t.length;if(u!=l&&!(a&&l>u))return!1;var d=o.get(e),c=o.get(t);if(d&&c)return d==t&&c==e;var p=-1,f=!0,y=2&n?new Vn:i;for(o.set(e,t),o.set(t,e);++p<u;){var h=e[p],g=t[p];if(r)var m=a?r(g,h,p,t,e,o):r(h,g,p,e,t,o);if(m!==i){if(m)continue;f=!1;break}if(y){if(!Wt(t,(function(e,t){if(!Kt(y,t)&&(h===e||s(h,e,n,r,o)))return y.push(t)}))){f=!1;break}}else if(h!==g&&!s(h,g,n,r,o)){f=!1;break}}return o.delete(e),o.delete(t),f}function Xi(e){return Es(Cs(e,i,$s),e+"")}function es(e){return Sr(e,_a,ls)}function ts(e){return Sr(e,Ma,ds)}var ns=En?function(e){return En.get(e)}:au;function rs(e){for(var t=e.name+"",n=On[t],r=Pe.call(On,t)?n.length:0;r--;){var i=n[r],s=i.func;if(null==s||s==e)return i.name}return t}function is(e){return(Pe.call(xn,"placeholder")?xn:e).placeholder}function ss(){var e=xn.iteratee||ru;return e=e===ru?Pr:e,arguments.length?e(arguments[0],arguments[1]):e}function os(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function as(e){for(var t=_a(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,js(i)]}return t}function us(e,t){var n=function(e,t){return null==e?i:e[t]}(e,t);return Lr(n)?n:i}var ls=ht?function(e){return null==e?[]:(e=Ae(e),Et(ht(e),(function(t){return Ve.call(e,t)})))}:yu,ds=ht?function(e){for(var t=[];e;)Lt(t,ls(e)),e=Je(e);return t}:yu,cs=Cr;function ps(e,t,n){for(var r=-1,i=(t=gi(t,e)).length,s=!1;++r<i;){var o=Ws(t[r]);if(!(s=null!=e&&n(e,o)))break;e=e[o]}return s||++r!=i?s:!!(i=null==e?0:e.length)&&Zo(i)&&hs(o,i)&&($o(e)||Uo(e))}function fs(e){return"function"!=typeof e.constructor||bs(e)?{}:Fn(Je(e))}function ys(e){return $o(e)||Uo(e)||!!(Ge&&e&&e[Ge])}function hs(e,t){var n=typeof e;return!!(t=null==t?c:t)&&("number"==n||"symbol"!=n&&me.test(e))&&e>-1&&e%1==0&&e<t}function gs(e,t,n){if(!Xo(n))return!1;var r=typeof t;return!!("number"==r?Ho(n)&&hs(t,n.length):"string"==r&&t in n)&&Fo(n[t],e)}function ms(e,t){if($o(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!aa(e))||X.test(e)||!Z.test(e)||null!=t&&e in Ae(t)}function vs(e){var t=rs(e),n=xn[t];if("function"!=typeof n||!(t in Un.prototype))return!1;if(e===n)return!0;var r=ns(n);return!!r&&e===r[0]}(Sn&&cs(new Sn(new ArrayBuffer(1)))!=L||Cn&&cs(new Cn)!=S||An&&cs(An.resolve())!=R||Rn&&cs(new Rn)!=T||In&&cs(new In)!=_)&&(cs=function(e){var t=Cr(e),n=t==A?e.constructor:i,r=n?ks(n):"";if(r)switch(r){case _n:return L;case Mn:return S;case Ln:return R;case Pn:return T;case Nn:return _}return t});var ws=Me?Qo:hu;function bs(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||_e)}function js(e){return e==e&&!Xo(e)}function Ss(e,t){return function(n){return null!=n&&n[e]===t&&(t!==i||e in Ae(n))}}function Cs(e,t,n){return t=gn(t===i?e.length-1:t,0),function(){for(var i=arguments,s=-1,o=gn(i.length-t,0),a=r(o);++s<o;)a[s]=i[t+s];s=-1;for(var u=r(t+1);++s<t;)u[s]=i[s];return u[t]=n(a),Ct(e,this,u)}}function As(e,t){return t.length<2?e:jr(e,ei(t,0,-1))}function Rs(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Is=_s(Kr),Ts=dt||function(e,t){return ct.setTimeout(e,t)},Es=_s(Zr);function Os(e,t,n){var r=t+"";return Es(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(se,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Rt(y,(function(n){var r="_."+n[0];t&n[1]&&!Ot(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(oe);return t?t[1].split(ae):[]}(r),n)))}function _s(e){var t=0,n=0;return function(){var r=vn(),s=16-(r-n);if(n=r,s>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Ms(e,t){var n=-1,r=e.length,s=r-1;for(t=t===i?r:t;++n<t;){var o=Hr(n,s),a=e[o];e[o]=e[n],e[n]=a}return e.length=t,e}var Ls,Ps,Ns=(Ls=Po((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,(function(e,n,r,i){t.push(r?i.replace(de,"$1"):n||e)})),t}),(function(e){return 500===Ps.size&&Ps.clear(),e})),Ps=Ls.cache,Ls);function Ws(e){if("string"==typeof e||aa(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ks(e){if(null!=e){try{return Le.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Ds(e){if(e instanceof Un)return e.clone();var t=new qn(e.__wrapped__,e.__chain__);return t.__actions__=Ii(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var xs=zr((function(e,t){return Vo(e)?lr(e,hr(t,1,Vo,!0)):[]})),Fs=zr((function(e,t){var n=Gs(t);return Vo(n)&&(n=i),Vo(e)?lr(e,hr(t,1,Vo,!0),ss(n,2)):[]})),Bs=zr((function(e,t){var n=Gs(t);return Vo(n)&&(n=i),Vo(e)?lr(e,hr(t,1,Vo,!0),i,n):[]}));function qs(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:fa(n);return i<0&&(i=gn(r+i,0)),xt(e,ss(t,3),i)}function Us(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var s=r-1;return n!==i&&(s=fa(n),s=n<0?gn(r+s,0):mn(s,r-1)),xt(e,ss(t,3),s,!0)}function $s(e){return null!=e&&e.length?hr(e,1):[]}function Js(e){return e&&e.length?e[0]:i}var Hs=zr((function(e){var t=Mt(e,yi);return t.length&&t[0]===e[0]?Tr(t):[]})),Vs=zr((function(e){var t=Gs(e),n=Mt(e,yi);return t===Gs(n)?t=i:n.pop(),n.length&&n[0]===e[0]?Tr(n,ss(t,2)):[]})),zs=zr((function(e){var t=Gs(e),n=Mt(e,yi);return(t="function"==typeof t?t:i)&&n.pop(),n.length&&n[0]===e[0]?Tr(n,i,t):[]}));function Gs(e){var t=null==e?0:e.length;return t?e[t-1]:i}var Ys=zr(Qs);function Qs(e,t){return e&&e.length&&t&&t.length?$r(e,t):e}var Ks=Xi((function(e,t){var n=null==e?0:e.length,r=ir(e,t);return Jr(e,Mt(t,(function(e){return hs(e,n)?+e:e})).sort(Ci)),r}));function Zs(e){return null==e?e:jn.call(e)}var Xs=zr((function(e){return ai(hr(e,1,Vo,!0))})),eo=zr((function(e){var t=Gs(e);return Vo(t)&&(t=i),ai(hr(e,1,Vo,!0),ss(t,2))})),to=zr((function(e){var t=Gs(e);return t="function"==typeof t?t:i,ai(hr(e,1,Vo,!0),i,t)}));function no(e){if(!e||!e.length)return[];var t=0;return e=Et(e,(function(e){if(Vo(e))return t=gn(e.length,t),!0})),zt(t,(function(t){return Mt(e,$t(t))}))}function ro(e,t){if(!e||!e.length)return[];var n=no(e);return null==t?n:Mt(n,(function(e){return Ct(t,i,e)}))}var io=zr((function(e,t){return Vo(e)?lr(e,t):[]})),so=zr((function(e){return pi(Et(e,Vo))})),oo=zr((function(e){var t=Gs(e);return Vo(t)&&(t=i),pi(Et(e,Vo),ss(t,2))})),ao=zr((function(e){var t=Gs(e);return t="function"==typeof t?t:i,pi(Et(e,Vo),i,t)})),uo=zr(no),lo=zr((function(e){var t=e.length,n=t>1?e[t-1]:i;return n="function"==typeof n?(e.pop(),n):i,ro(e,n)}));function co(e){var t=xn(e);return t.__chain__=!0,t}function po(e,t){return t(e)}var fo=Xi((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,s=function(t){return ir(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Un&&hs(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:po,args:[s],thisArg:i}),new qn(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(i),e}))):this.thru(s)})),yo=Ei((function(e,t,n){Pe.call(e,n)?++e[n]:rr(e,n,1)})),ho=Wi(qs),go=Wi(Us);function mo(e,t){return($o(e)?Rt:dr)(e,ss(t,3))}function vo(e,t){return($o(e)?It:cr)(e,ss(t,3))}var wo=Ei((function(e,t,n){Pe.call(e,n)?e[n].push(t):rr(e,n,[t])})),bo=zr((function(e,t,n){var i=-1,s="function"==typeof t,o=Ho(e)?r(e.length):[];return dr(e,(function(e){o[++i]=s?Ct(t,e,n):Er(e,t,n)})),o})),jo=Ei((function(e,t,n){rr(e,n,t)}));function So(e,t){return($o(e)?Mt:kr)(e,ss(t,3))}var Co=Ei((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),Ao=zr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&gs(e,t[0],t[1])?t=[]:n>2&&gs(t[0],t[1],t[2])&&(t=[t[0]]),qr(e,hr(t,1),[])})),Ro=lt||function(){return ct.Date.now()};function Io(e,t,n){return t=n?i:t,t=e&&null==t?e.length:t,Gi(e,l,i,i,i,i,t)}function To(e,t){var n;if("function"!=typeof t)throw new Te(s);return e=fa(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=i),n}}var Eo=zr((function(e,t,n){var r=1;if(n.length){var i=an(n,is(Eo));r|=u}return Gi(e,r,t,n,i)})),Oo=zr((function(e,t,n){var r=3;if(n.length){var i=an(n,is(Oo));r|=u}return Gi(t,r,e,n,i)}));function _o(e,t,n){var r,o,a,u,l,d,c=0,p=!1,f=!1,y=!0;if("function"!=typeof e)throw new Te(s);function h(t){var n=r,s=o;return r=o=i,c=t,u=e.apply(s,n)}function g(e){var n=e-d;return d===i||n>=t||n<0||f&&e-c>=a}function m(){var e=Ro();if(g(e))return v(e);l=Ts(m,function(e){var n=t-(e-d);return f?mn(n,a-(e-c)):n}(e))}function v(e){return l=i,y&&r?h(e):(r=o=i,u)}function w(){var e=Ro(),n=g(e);if(r=arguments,o=this,d=e,n){if(l===i)return function(e){return c=e,l=Ts(m,t),p?h(e):u}(d);if(f)return wi(l),l=Ts(m,t),h(d)}return l===i&&(l=Ts(m,t)),u}return t=ha(t)||0,Xo(n)&&(p=!!n.leading,a=(f="maxWait"in n)?gn(ha(n.maxWait)||0,t):a,y="trailing"in n?!!n.trailing:y),w.cancel=function(){l!==i&&wi(l),c=0,r=d=o=l=i},w.flush=function(){return l===i?u:v(Ro())},w}var Mo=zr((function(e,t){return ur(e,1,t)})),Lo=zr((function(e,t,n){return ur(e,ha(t)||0,n)}));function Po(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Te(s);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var o=e.apply(this,r);return n.cache=s.set(i,o)||s,o};return n.cache=new(Po.Cache||Hn),n}function No(e){if("function"!=typeof e)throw new Te(s);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Po.Cache=Hn;var Wo=mi((function(e,t){var n=(t=1==t.length&&$o(t[0])?Mt(t[0],Yt(ss())):Mt(hr(t,1),Yt(ss()))).length;return zr((function(r){for(var i=-1,s=mn(r.length,n);++i<s;)r[i]=t[i].call(this,r[i]);return Ct(e,this,r)}))})),ko=zr((function(e,t){var n=an(t,is(ko));return Gi(e,u,i,t,n)})),Do=zr((function(e,t){var n=an(t,is(Do));return Gi(e,64,i,t,n)})),xo=Xi((function(e,t){return Gi(e,256,i,i,i,t)}));function Fo(e,t){return e===t||e!=e&&t!=t}var Bo=$i(Ar),qo=$i((function(e,t){return e>=t})),Uo=Or(function(){return arguments}())?Or:function(e){return ea(e)&&Pe.call(e,"callee")&&!Ve.call(e,"callee")},$o=r.isArray,Jo=mt?Yt(mt):function(e){return ea(e)&&Cr(e)==M};function Ho(e){return null!=e&&Zo(e.length)&&!Qo(e)}function Vo(e){return ea(e)&&Ho(e)}var zo=gt||hu,Go=vt?Yt(vt):function(e){return ea(e)&&Cr(e)==v};function Yo(e){if(!ea(e))return!1;var t=Cr(e);return t==w||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!ra(e)}function Qo(e){if(!Xo(e))return!1;var t=Cr(e);return t==b||t==j||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ko(e){return"number"==typeof e&&e==fa(e)}function Zo(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=c}function Xo(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ea(e){return null!=e&&"object"==typeof e}var ta=wt?Yt(wt):function(e){return ea(e)&&cs(e)==S};function na(e){return"number"==typeof e||ea(e)&&Cr(e)==C}function ra(e){if(!ea(e)||Cr(e)!=A)return!1;var t=Je(e);if(null===t)return!0;var n=Pe.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Le.call(n)==De}var ia=bt?Yt(bt):function(e){return ea(e)&&Cr(e)==I},sa=jt?Yt(jt):function(e){return ea(e)&&cs(e)==T};function oa(e){return"string"==typeof e||!$o(e)&&ea(e)&&Cr(e)==E}function aa(e){return"symbol"==typeof e||ea(e)&&Cr(e)==O}var ua=St?Yt(St):function(e){return ea(e)&&Zo(e.length)&&!!it[Cr(e)]},la=$i(Wr),da=$i((function(e,t){return e<=t}));function ca(e){if(!e)return[];if(Ho(e))return oa(e)?cn(e):Ii(e);if(Ye&&e[Ye])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Ye]());var t=cs(e);return(t==S?sn:t==T?un:Fa)(e)}function pa(e){return e?(e=ha(e))===d||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function fa(e){var t=pa(e),n=t%1;return t==t?n?t-n:t:0}function ya(e){return e?sr(fa(e),0,f):0}function ha(e){if("number"==typeof e)return e;if(aa(e))return p;if(Xo(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Xo(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Gt(e);var n=ye.test(e);return n||ge.test(e)?ut(e.slice(2),n?2:8):fe.test(e)?p:+e}function ga(e){return Ti(e,Ma(e))}function ma(e){return null==e?"":oi(e)}var va=Oi((function(e,t){if(bs(t)||Ho(t))Ti(t,_a(t),e);else for(var n in t)Pe.call(t,n)&&Xn(e,n,t[n])})),wa=Oi((function(e,t){Ti(t,Ma(t),e)})),ba=Oi((function(e,t,n,r){Ti(t,Ma(t),e,r)})),ja=Oi((function(e,t,n,r){Ti(t,_a(t),e,r)})),Sa=Xi(ir),Ca=zr((function(e,t){e=Ae(e);var n=-1,r=t.length,s=r>2?t[2]:i;for(s&&gs(t[0],t[1],s)&&(r=1);++n<r;)for(var o=t[n],a=Ma(o),u=-1,l=a.length;++u<l;){var d=a[u],c=e[d];(c===i||Fo(c,_e[d])&&!Pe.call(e,d))&&(e[d]=o[d])}return e})),Aa=zr((function(e){return e.push(i,Qi),Ct(Pa,i,e)}));function Ra(e,t,n){var r=null==e?i:jr(e,t);return r===i?n:r}function Ia(e,t){return null!=e&&ps(e,t,Ir)}var Ta=xi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=ke.call(t)),e[t]=n}),Xa(nu)),Ea=xi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=ke.call(t)),Pe.call(e,t)?e[t].push(n):e[t]=[n]}),ss),Oa=zr(Er);function _a(e){return Ho(e)?Gn(e):Nr(e)}function Ma(e){return Ho(e)?Gn(e,!0):function(e){if(!Xo(e))return function(e){var t=[];if(null!=e)for(var n in Ae(e))t.push(n);return t}(e);var t=bs(e),n=[];for(var r in e)("constructor"!=r||!t&&Pe.call(e,r))&&n.push(r);return n}(e)}var La=Oi((function(e,t,n){Fr(e,t,n)})),Pa=Oi((function(e,t,n,r){Fr(e,t,n,r)})),Na=Xi((function(e,t){var n={};if(null==e)return n;var r=!1;t=Mt(t,(function(t){return t=gi(t,e),r||(r=t.length>1),t})),Ti(e,ts(e),n),r&&(n=or(n,7,Ki));for(var i=t.length;i--;)ui(n,t[i]);return n})),Wa=Xi((function(e,t){return null==e?{}:function(e,t){return Ur(e,t,(function(t,n){return Ia(e,n)}))}(e,t)}));function ka(e,t){if(null==e)return{};var n=Mt(ts(e),(function(e){return[e]}));return t=ss(t),Ur(e,n,(function(e,n){return t(e,n[0])}))}var Da=zi(_a),xa=zi(Ma);function Fa(e){return null==e?[]:Qt(e,_a(e))}var Ba=Pi((function(e,t,n){return t=t.toLowerCase(),e+(n?qa(t):t)}));function qa(e){return Ya(ma(e).toLowerCase())}function Ua(e){return(e=ma(e))&&e.replace(ve,en).replace(Ke,"")}var $a=Pi((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Ja=Pi((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Ha=Li("toLowerCase"),Va=Pi((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),za=Pi((function(e,t,n){return e+(n?" ":"")+Ya(t)})),Ga=Pi((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Ya=Li("toUpperCase");function Qa(e,t,n){return e=ma(e),(t=n?i:t)===i?function(e){return tt.test(e)}(e)?function(e){return e.match(Xe)||[]}(e):function(e){return e.match(ue)||[]}(e):e.match(t)||[]}var Ka=zr((function(e,t){try{return Ct(e,i,t)}catch(e){return Yo(e)?e:new je(e)}})),Za=Xi((function(e,t){return Rt(t,(function(t){t=Ws(t),rr(e,t,Eo(e[t],e))})),e}));function Xa(e){return function(){return e}}var eu=ki(),tu=ki(!0);function nu(e){return e}function ru(e){return Pr("function"==typeof e?e:or(e,1))}var iu=zr((function(e,t){return function(n){return Er(n,e,t)}})),su=zr((function(e,t){return function(n){return Er(e,n,t)}}));function ou(e,t,n){var r=_a(t),i=br(t,r);null!=n||Xo(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=br(t,_a(t)));var s=!(Xo(n)&&"chain"in n&&!n.chain),o=Qo(e);return Rt(i,(function(n){var r=t[n];e[n]=r,o&&(e.prototype[n]=function(){var t=this.__chain__;if(s||t){var n=e(this.__wrapped__);return(n.__actions__=Ii(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Lt([this.value()],arguments))})})),e}function au(){}var uu=Bi(Mt),lu=Bi(Tt),du=Bi(Wt);function cu(e){return ms(e)?$t(Ws(e)):function(e){return function(t){return jr(t,e)}}(e)}var pu=Ui(),fu=Ui(!0);function yu(){return[]}function hu(){return!1}var gu,mu=Fi((function(e,t){return e+t}),0),vu=Hi("ceil"),wu=Fi((function(e,t){return e/t}),1),bu=Hi("floor"),ju=Fi((function(e,t){return e*t}),1),Su=Hi("round"),Cu=Fi((function(e,t){return e-t}),0);return xn.after=function(e,t){if("function"!=typeof t)throw new Te(s);return e=fa(e),function(){if(--e<1)return t.apply(this,arguments)}},xn.ary=Io,xn.assign=va,xn.assignIn=wa,xn.assignInWith=ba,xn.assignWith=ja,xn.at=Sa,xn.before=To,xn.bind=Eo,xn.bindAll=Za,xn.bindKey=Oo,xn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return $o(e)?e:[e]},xn.chain=co,xn.chunk=function(e,t,n){t=(n?gs(e,t,n):t===i)?1:gn(fa(t),0);var s=null==e?0:e.length;if(!s||t<1)return[];for(var o=0,a=0,u=r(pt(s/t));o<s;)u[a++]=ei(e,o,o+=t);return u},xn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var s=e[t];s&&(i[r++]=s)}return i},xn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=r(e-1),n=arguments[0],i=e;i--;)t[i-1]=arguments[i];return Lt($o(n)?Ii(n):[n],hr(t,1))},xn.cond=function(e){var t=null==e?0:e.length,n=ss();return e=t?Mt(e,(function(e){if("function"!=typeof e[1])throw new Te(s);return[n(e[0]),e[1]]})):[],zr((function(n){for(var r=-1;++r<t;){var i=e[r];if(Ct(i[0],this,n))return Ct(i[1],this,n)}}))},xn.conforms=function(e){return function(e){var t=_a(e);return function(n){return ar(n,e,t)}}(or(e,1))},xn.constant=Xa,xn.countBy=yo,xn.create=function(e,t){var n=Fn(e);return null==t?n:nr(n,t)},xn.curry=function e(t,n,r){var s=Gi(t,8,i,i,i,i,i,n=r?i:n);return s.placeholder=e.placeholder,s},xn.curryRight=function e(t,n,r){var s=Gi(t,16,i,i,i,i,i,n=r?i:n);return s.placeholder=e.placeholder,s},xn.debounce=_o,xn.defaults=Ca,xn.defaultsDeep=Aa,xn.defer=Mo,xn.delay=Lo,xn.difference=xs,xn.differenceBy=Fs,xn.differenceWith=Bs,xn.drop=function(e,t,n){var r=null==e?0:e.length;return r?ei(e,(t=n||t===i?1:fa(t))<0?0:t,r):[]},xn.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?ei(e,0,(t=r-(t=n||t===i?1:fa(t)))<0?0:t):[]},xn.dropRightWhile=function(e,t){return e&&e.length?di(e,ss(t,3),!0,!0):[]},xn.dropWhile=function(e,t){return e&&e.length?di(e,ss(t,3),!0):[]},xn.fill=function(e,t,n,r){var s=null==e?0:e.length;return s?(n&&"number"!=typeof n&&gs(e,t,n)&&(n=0,r=s),function(e,t,n,r){var s=e.length;for((n=fa(n))<0&&(n=-n>s?0:s+n),(r=r===i||r>s?s:fa(r))<0&&(r+=s),r=n>r?0:ya(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},xn.filter=function(e,t){return($o(e)?Et:yr)(e,ss(t,3))},xn.flatMap=function(e,t){return hr(So(e,t),1)},xn.flatMapDeep=function(e,t){return hr(So(e,t),d)},xn.flatMapDepth=function(e,t,n){return n=n===i?1:fa(n),hr(So(e,t),n)},xn.flatten=$s,xn.flattenDeep=function(e){return null!=e&&e.length?hr(e,d):[]},xn.flattenDepth=function(e,t){return null!=e&&e.length?hr(e,t=t===i?1:fa(t)):[]},xn.flip=function(e){return Gi(e,512)},xn.flow=eu,xn.flowRight=tu,xn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},xn.functions=function(e){return null==e?[]:br(e,_a(e))},xn.functionsIn=function(e){return null==e?[]:br(e,Ma(e))},xn.groupBy=wo,xn.initial=function(e){return null!=e&&e.length?ei(e,0,-1):[]},xn.intersection=Hs,xn.intersectionBy=Vs,xn.intersectionWith=zs,xn.invert=Ta,xn.invertBy=Ea,xn.invokeMap=bo,xn.iteratee=ru,xn.keyBy=jo,xn.keys=_a,xn.keysIn=Ma,xn.map=So,xn.mapKeys=function(e,t){var n={};return t=ss(t,3),vr(e,(function(e,r,i){rr(n,t(e,r,i),e)})),n},xn.mapValues=function(e,t){var n={};return t=ss(t,3),vr(e,(function(e,r,i){rr(n,r,t(e,r,i))})),n},xn.matches=function(e){return Dr(or(e,1))},xn.matchesProperty=function(e,t){return xr(e,or(t,1))},xn.memoize=Po,xn.merge=La,xn.mergeWith=Pa,xn.method=iu,xn.methodOf=su,xn.mixin=ou,xn.negate=No,xn.nthArg=function(e){return e=fa(e),zr((function(t){return Br(t,e)}))},xn.omit=Na,xn.omitBy=function(e,t){return ka(e,No(ss(t)))},xn.once=function(e){return To(2,e)},xn.orderBy=function(e,t,n,r){return null==e?[]:($o(t)||(t=null==t?[]:[t]),$o(n=r?i:n)||(n=null==n?[]:[n]),qr(e,t,n))},xn.over=uu,xn.overArgs=Wo,xn.overEvery=lu,xn.overSome=du,xn.partial=ko,xn.partialRight=Do,xn.partition=Co,xn.pick=Wa,xn.pickBy=ka,xn.property=cu,xn.propertyOf=function(e){return function(t){return null==e?i:jr(e,t)}},xn.pull=Ys,xn.pullAll=Qs,xn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?$r(e,t,ss(n,2)):e},xn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?$r(e,t,i,n):e},xn.pullAt=Ks,xn.range=pu,xn.rangeRight=fu,xn.rearg=xo,xn.reject=function(e,t){return($o(e)?Et:yr)(e,No(ss(t,3)))},xn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],s=e.length;for(t=ss(t,3);++r<s;){var o=e[r];t(o,r,e)&&(n.push(o),i.push(r))}return Jr(e,i),n},xn.rest=function(e,t){if("function"!=typeof e)throw new Te(s);return zr(e,t=t===i?t:fa(t))},xn.reverse=Zs,xn.sampleSize=function(e,t,n){return t=(n?gs(e,t,n):t===i)?1:fa(t),($o(e)?Qn:Yr)(e,t)},xn.set=function(e,t,n){return null==e?e:Qr(e,t,n)},xn.setWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:Qr(e,t,n,r)},xn.shuffle=function(e){return($o(e)?Kn:Xr)(e)},xn.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&gs(e,t,n)?(t=0,n=r):(t=null==t?0:fa(t),n=n===i?r:fa(n)),ei(e,t,n)):[]},xn.sortBy=Ao,xn.sortedUniq=function(e){return e&&e.length?ii(e):[]},xn.sortedUniqBy=function(e,t){return e&&e.length?ii(e,ss(t,2)):[]},xn.split=function(e,t,n){return n&&"number"!=typeof n&&gs(e,t,n)&&(t=n=i),(n=n===i?f:n>>>0)?(e=ma(e))&&("string"==typeof t||null!=t&&!ia(t))&&!(t=oi(t))&&rn(e)?vi(cn(e),0,n):e.split(t,n):[]},xn.spread=function(e,t){if("function"!=typeof e)throw new Te(s);return t=null==t?0:gn(fa(t),0),zr((function(n){var r=n[t],i=vi(n,0,t);return r&&Lt(i,r),Ct(e,this,i)}))},xn.tail=function(e){var t=null==e?0:e.length;return t?ei(e,1,t):[]},xn.take=function(e,t,n){return e&&e.length?ei(e,0,(t=n||t===i?1:fa(t))<0?0:t):[]},xn.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?ei(e,(t=r-(t=n||t===i?1:fa(t)))<0?0:t,r):[]},xn.takeRightWhile=function(e,t){return e&&e.length?di(e,ss(t,3),!1,!0):[]},xn.takeWhile=function(e,t){return e&&e.length?di(e,ss(t,3)):[]},xn.tap=function(e,t){return t(e),e},xn.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new Te(s);return Xo(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),_o(e,t,{leading:r,maxWait:t,trailing:i})},xn.thru=po,xn.toArray=ca,xn.toPairs=Da,xn.toPairsIn=xa,xn.toPath=function(e){return $o(e)?Mt(e,Ws):aa(e)?[e]:Ii(Ns(ma(e)))},xn.toPlainObject=ga,xn.transform=function(e,t,n){var r=$o(e),i=r||zo(e)||ua(e);if(t=ss(t,4),null==n){var s=e&&e.constructor;n=i?r?new s:[]:Xo(e)&&Qo(s)?Fn(Je(e)):{}}return(i?Rt:vr)(e,(function(e,r,i){return t(n,e,r,i)})),n},xn.unary=function(e){return Io(e,1)},xn.union=Xs,xn.unionBy=eo,xn.unionWith=to,xn.uniq=function(e){return e&&e.length?ai(e):[]},xn.uniqBy=function(e,t){return e&&e.length?ai(e,ss(t,2)):[]},xn.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?ai(e,i,t):[]},xn.unset=function(e,t){return null==e||ui(e,t)},xn.unzip=no,xn.unzipWith=ro,xn.update=function(e,t,n){return null==e?e:li(e,t,hi(n))},xn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:li(e,t,hi(n),r)},xn.values=Fa,xn.valuesIn=function(e){return null==e?[]:Qt(e,Ma(e))},xn.without=io,xn.words=Qa,xn.wrap=function(e,t){return ko(hi(t),e)},xn.xor=so,xn.xorBy=oo,xn.xorWith=ao,xn.zip=uo,xn.zipObject=function(e,t){return fi(e||[],t||[],Xn)},xn.zipObjectDeep=function(e,t){return fi(e||[],t||[],Qr)},xn.zipWith=lo,xn.entries=Da,xn.entriesIn=xa,xn.extend=wa,xn.extendWith=ba,ou(xn,xn),xn.add=mu,xn.attempt=Ka,xn.camelCase=Ba,xn.capitalize=qa,xn.ceil=vu,xn.clamp=function(e,t,n){return n===i&&(n=t,t=i),n!==i&&(n=(n=ha(n))==n?n:0),t!==i&&(t=(t=ha(t))==t?t:0),sr(ha(e),t,n)},xn.clone=function(e){return or(e,4)},xn.cloneDeep=function(e){return or(e,5)},xn.cloneDeepWith=function(e,t){return or(e,5,t="function"==typeof t?t:i)},xn.cloneWith=function(e,t){return or(e,4,t="function"==typeof t?t:i)},xn.conformsTo=function(e,t){return null==t||ar(e,t,_a(t))},xn.deburr=Ua,xn.defaultTo=function(e,t){return null==e||e!=e?t:e},xn.divide=wu,xn.endsWith=function(e,t,n){e=ma(e),t=oi(t);var r=e.length,s=n=n===i?r:sr(fa(n),0,r);return(n-=t.length)>=0&&e.slice(n,s)==t},xn.eq=Fo,xn.escape=function(e){return(e=ma(e))&&G.test(e)?e.replace(V,tn):e},xn.escapeRegExp=function(e){return(e=ma(e))&&ne.test(e)?e.replace(te,"\\$&"):e},xn.every=function(e,t,n){var r=$o(e)?Tt:pr;return n&&gs(e,t,n)&&(t=i),r(e,ss(t,3))},xn.find=ho,xn.findIndex=qs,xn.findKey=function(e,t){return Dt(e,ss(t,3),vr)},xn.findLast=go,xn.findLastIndex=Us,xn.findLastKey=function(e,t){return Dt(e,ss(t,3),wr)},xn.floor=bu,xn.forEach=mo,xn.forEachRight=vo,xn.forIn=function(e,t){return null==e?e:gr(e,ss(t,3),Ma)},xn.forInRight=function(e,t){return null==e?e:mr(e,ss(t,3),Ma)},xn.forOwn=function(e,t){return e&&vr(e,ss(t,3))},xn.forOwnRight=function(e,t){return e&&wr(e,ss(t,3))},xn.get=Ra,xn.gt=Bo,xn.gte=qo,xn.has=function(e,t){return null!=e&&ps(e,t,Rr)},xn.hasIn=Ia,xn.head=Js,xn.identity=nu,xn.includes=function(e,t,n,r){e=Ho(e)?e:Fa(e),n=n&&!r?fa(n):0;var i=e.length;return n<0&&(n=gn(i+n,0)),oa(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Ft(e,t,n)>-1},xn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:fa(n);return i<0&&(i=gn(r+i,0)),Ft(e,t,i)},xn.inRange=function(e,t,n){return t=pa(t),n===i?(n=t,t=0):n=pa(n),function(e,t,n){return e>=mn(t,n)&&e<gn(t,n)}(e=ha(e),t,n)},xn.invoke=Oa,xn.isArguments=Uo,xn.isArray=$o,xn.isArrayBuffer=Jo,xn.isArrayLike=Ho,xn.isArrayLikeObject=Vo,xn.isBoolean=function(e){return!0===e||!1===e||ea(e)&&Cr(e)==m},xn.isBuffer=zo,xn.isDate=Go,xn.isElement=function(e){return ea(e)&&1===e.nodeType&&!ra(e)},xn.isEmpty=function(e){if(null==e)return!0;if(Ho(e)&&($o(e)||"string"==typeof e||"function"==typeof e.splice||zo(e)||ua(e)||Uo(e)))return!e.length;var t=cs(e);if(t==S||t==T)return!e.size;if(bs(e))return!Nr(e).length;for(var n in e)if(Pe.call(e,n))return!1;return!0},xn.isEqual=function(e,t){return _r(e,t)},xn.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:i)?n(e,t):i;return r===i?_r(e,t,i,n):!!r},xn.isError=Yo,xn.isFinite=function(e){return"number"==typeof e&&kt(e)},xn.isFunction=Qo,xn.isInteger=Ko,xn.isLength=Zo,xn.isMap=ta,xn.isMatch=function(e,t){return e===t||Mr(e,t,as(t))},xn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:i,Mr(e,t,as(t),n)},xn.isNaN=function(e){return na(e)&&e!=+e},xn.isNative=function(e){if(ws(e))throw new je("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Lr(e)},xn.isNil=function(e){return null==e},xn.isNull=function(e){return null===e},xn.isNumber=na,xn.isObject=Xo,xn.isObjectLike=ea,xn.isPlainObject=ra,xn.isRegExp=ia,xn.isSafeInteger=function(e){return Ko(e)&&e>=-9007199254740991&&e<=c},xn.isSet=sa,xn.isString=oa,xn.isSymbol=aa,xn.isTypedArray=ua,xn.isUndefined=function(e){return e===i},xn.isWeakMap=function(e){return ea(e)&&cs(e)==_},xn.isWeakSet=function(e){return ea(e)&&"[object WeakSet]"==Cr(e)},xn.join=function(e,t){return null==e?"":Jt.call(e,t)},xn.kebabCase=$a,xn.last=Gs,xn.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var s=r;return n!==i&&(s=(s=fa(n))<0?gn(r+s,0):mn(s,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,s):xt(e,qt,s,!0)},xn.lowerCase=Ja,xn.lowerFirst=Ha,xn.lt=la,xn.lte=da,xn.max=function(e){return e&&e.length?fr(e,nu,Ar):i},xn.maxBy=function(e,t){return e&&e.length?fr(e,ss(t,2),Ar):i},xn.mean=function(e){return Ut(e,nu)},xn.meanBy=function(e,t){return Ut(e,ss(t,2))},xn.min=function(e){return e&&e.length?fr(e,nu,Wr):i},xn.minBy=function(e,t){return e&&e.length?fr(e,ss(t,2),Wr):i},xn.stubArray=yu,xn.stubFalse=hu,xn.stubObject=function(){return{}},xn.stubString=function(){return""},xn.stubTrue=function(){return!0},xn.multiply=ju,xn.nth=function(e,t){return e&&e.length?Br(e,fa(t)):i},xn.noConflict=function(){return ct._===this&&(ct._=xe),this},xn.noop=au,xn.now=Ro,xn.pad=function(e,t,n){e=ma(e);var r=(t=fa(t))?dn(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return qi(ft(i),n)+e+qi(pt(i),n)},xn.padEnd=function(e,t,n){e=ma(e);var r=(t=fa(t))?dn(e):0;return t&&r<t?e+qi(t-r,n):e},xn.padStart=function(e,t,n){e=ma(e);var r=(t=fa(t))?dn(e):0;return t&&r<t?qi(t-r,n)+e:e},xn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),wn(ma(e).replace(re,""),t||0)},xn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&gs(e,t,n)&&(t=n=i),n===i&&("boolean"==typeof t?(n=t,t=i):"boolean"==typeof e&&(n=e,e=i)),e===i&&t===i?(e=0,t=1):(e=pa(e),t===i?(t=e,e=0):t=pa(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var s=bn();return mn(e+s*(t-e+at("1e-"+((s+"").length-1))),t)}return Hr(e,t)},xn.reduce=function(e,t,n){var r=$o(e)?Pt:Ht,i=arguments.length<3;return r(e,ss(t,4),n,i,dr)},xn.reduceRight=function(e,t,n){var r=$o(e)?Nt:Ht,i=arguments.length<3;return r(e,ss(t,4),n,i,cr)},xn.repeat=function(e,t,n){return t=(n?gs(e,t,n):t===i)?1:fa(t),Vr(ma(e),t)},xn.replace=function(){var e=arguments,t=ma(e[0]);return e.length<3?t:t.replace(e[1],e[2])},xn.result=function(e,t,n){var r=-1,s=(t=gi(t,e)).length;for(s||(s=1,e=i);++r<s;){var o=null==e?i:e[Ws(t[r])];o===i&&(r=s,o=n),e=Qo(o)?o.call(e):o}return e},xn.round=Su,xn.runInContext=e,xn.sample=function(e){return($o(e)?Yn:Gr)(e)},xn.size=function(e){if(null==e)return 0;if(Ho(e))return oa(e)?dn(e):e.length;var t=cs(e);return t==S||t==T?e.size:Nr(e).length},xn.snakeCase=Va,xn.some=function(e,t,n){var r=$o(e)?Wt:ti;return n&&gs(e,t,n)&&(t=i),r(e,ss(t,3))},xn.sortedIndex=function(e,t){return ni(e,t)},xn.sortedIndexBy=function(e,t,n){return ri(e,t,ss(n,2))},xn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=ni(e,t);if(r<n&&Fo(e[r],t))return r}return-1},xn.sortedLastIndex=function(e,t){return ni(e,t,!0)},xn.sortedLastIndexBy=function(e,t,n){return ri(e,t,ss(n,2),!0)},xn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=ni(e,t,!0)-1;if(Fo(e[n],t))return n}return-1},xn.startCase=za,xn.startsWith=function(e,t,n){return e=ma(e),n=null==n?0:sr(fa(n),0,e.length),t=oi(t),e.slice(n,n+t.length)==t},xn.subtract=Cu,xn.sum=function(e){return e&&e.length?Vt(e,nu):0},xn.sumBy=function(e,t){return e&&e.length?Vt(e,ss(t,2)):0},xn.template=function(e,t,n){var r=xn.templateSettings;n&&gs(e,t,n)&&(t=i),e=ma(e),t=ba({},t,r,Yi);var s,o,a=ba({},t.imports,r.imports,Yi),u=_a(a),l=Qt(a,u),d=0,c=t.interpolate||we,p="__p += '",f=Re((t.escape||we).source+"|"+c.source+"|"+(c===K?ce:we).source+"|"+(t.evaluate||we).source+"|$","g"),y="//# sourceURL="+(Pe.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++rt+"]")+"\n";e.replace(f,(function(t,n,r,i,a,u){return r||(r=i),p+=e.slice(d,u).replace(be,nn),n&&(s=!0,p+="' +\n__e("+n+") +\n'"),a&&(o=!0,p+="';\n"+a+";\n__p += '"),r&&(p+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),d=u+t.length,t})),p+="';\n";var h=Pe.call(t,"variable")&&t.variable;if(h){if(le.test(h))throw new je("Invalid `variable` option passed into `_.template`")}else p="with (obj) {\n"+p+"\n}\n";p=(o?p.replace(U,""):p).replace($,"$1").replace(J,"$1;"),p="function("+(h||"obj")+") {\n"+(h?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(s?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var g=Ka((function(){return Se(u,y+"return "+p).apply(i,l)}));if(g.source=p,Yo(g))throw g;return g},xn.times=function(e,t){if((e=fa(e))<1||e>c)return[];var n=f,r=mn(e,f);t=ss(t),e-=f;for(var i=zt(r,t);++n<e;)t(n);return i},xn.toFinite=pa,xn.toInteger=fa,xn.toLength=ya,xn.toLower=function(e){return ma(e).toLowerCase()},xn.toNumber=ha,xn.toSafeInteger=function(e){return e?sr(fa(e),-9007199254740991,c):0===e?e:0},xn.toString=ma,xn.toUpper=function(e){return ma(e).toUpperCase()},xn.trim=function(e,t,n){if((e=ma(e))&&(n||t===i))return Gt(e);if(!e||!(t=oi(t)))return e;var r=cn(e),s=cn(t);return vi(r,Zt(r,s),Xt(r,s)+1).join("")},xn.trimEnd=function(e,t,n){if((e=ma(e))&&(n||t===i))return e.slice(0,pn(e)+1);if(!e||!(t=oi(t)))return e;var r=cn(e);return vi(r,0,Xt(r,cn(t))+1).join("")},xn.trimStart=function(e,t,n){if((e=ma(e))&&(n||t===i))return e.replace(re,"");if(!e||!(t=oi(t)))return e;var r=cn(e);return vi(r,Zt(r,cn(t))).join("")},xn.truncate=function(e,t){var n=30,r="...";if(Xo(t)){var s="separator"in t?t.separator:s;n="length"in t?fa(t.length):n,r="omission"in t?oi(t.omission):r}var o=(e=ma(e)).length;if(rn(e)){var a=cn(e);o=a.length}if(n>=o)return e;var u=n-dn(r);if(u<1)return r;var l=a?vi(a,0,u).join(""):e.slice(0,u);if(s===i)return l+r;if(a&&(u+=l.length-u),ia(s)){if(e.slice(u).search(s)){var d,c=l;for(s.global||(s=Re(s.source,ma(pe.exec(s))+"g")),s.lastIndex=0;d=s.exec(c);)var p=d.index;l=l.slice(0,p===i?u:p)}}else if(e.indexOf(oi(s),u)!=u){var f=l.lastIndexOf(s);f>-1&&(l=l.slice(0,f))}return l+r},xn.unescape=function(e){return(e=ma(e))&&z.test(e)?e.replace(H,fn):e},xn.uniqueId=function(e){var t=++Ne;return ma(e)+t},xn.upperCase=Ga,xn.upperFirst=Ya,xn.each=mo,xn.eachRight=vo,xn.first=Js,ou(xn,(gu={},vr(xn,(function(e,t){Pe.call(xn.prototype,t)||(gu[t]=e)})),gu),{chain:!1}),xn.VERSION="4.17.21",Rt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){xn[e].placeholder=xn})),Rt(["drop","take"],(function(e,t){Un.prototype[e]=function(n){n=n===i?1:gn(fa(n),0);var r=this.__filtered__&&!t?new Un(this):this.clone();return r.__filtered__?r.__takeCount__=mn(n,r.__takeCount__):r.__views__.push({size:mn(n,f),type:e+(r.__dir__<0?"Right":"")}),r},Un.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Rt(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Un.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ss(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),Rt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Un.prototype[e]=function(){return this[n](1).value()[0]}})),Rt(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Un.prototype[e]=function(){return this.__filtered__?new Un(this):this[n](1)}})),Un.prototype.compact=function(){return this.filter(nu)},Un.prototype.find=function(e){return this.filter(e).head()},Un.prototype.findLast=function(e){return this.reverse().find(e)},Un.prototype.invokeMap=zr((function(e,t){return"function"==typeof e?new Un(this):this.map((function(n){return Er(n,e,t)}))})),Un.prototype.reject=function(e){return this.filter(No(ss(e)))},Un.prototype.slice=function(e,t){e=fa(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Un(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==i&&(n=(t=fa(t))<0?n.dropRight(-t):n.take(t-e)),n)},Un.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Un.prototype.toArray=function(){return this.take(f)},vr(Un.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),s=xn[r?"take"+("last"==t?"Right":""):t],o=r||/^find/.test(t);s&&(xn.prototype[t]=function(){var t=this.__wrapped__,a=r?[1]:arguments,u=t instanceof Un,l=a[0],d=u||$o(t),c=function(e){var t=s.apply(xn,Lt([e],a));return r&&p?t[0]:t};d&&n&&"function"==typeof l&&1!=l.length&&(u=d=!1);var p=this.__chain__,f=!!this.__actions__.length,y=o&&!p,h=u&&!f;if(!o&&d){t=h?t:new Un(this);var g=e.apply(t,a);return g.__actions__.push({func:po,args:[c],thisArg:i}),new qn(g,p)}return y&&h?e.apply(this,a):(g=this.thru(c),y?r?g.value()[0]:g.value():g)})})),Rt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Ee[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);xn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply($o(i)?i:[],e)}return this[n]((function(n){return t.apply($o(n)?n:[],e)}))}})),vr(Un.prototype,(function(e,t){var n=xn[t];if(n){var r=n.name+"";Pe.call(On,r)||(On[r]=[]),On[r].push({name:t,func:n})}})),On[Di(i,2).name]=[{name:"wrapper",func:i}],Un.prototype.clone=function(){var e=new Un(this.__wrapped__);return e.__actions__=Ii(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ii(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ii(this.__views__),e},Un.prototype.reverse=function(){if(this.__filtered__){var e=new Un(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Un.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=$o(e),r=t<0,i=n?e.length:0,s=function(e,t,n){for(var r=-1,i=n.length;++r<i;){var s=n[r],o=s.size;switch(s.type){case"drop":e+=o;break;case"dropRight":t-=o;break;case"take":t=mn(t,e+o);break;case"takeRight":e=gn(e,t-o)}}return{start:e,end:t}}(0,i,this.__views__),o=s.start,a=s.end,u=a-o,l=r?a:o-1,d=this.__iteratees__,c=d.length,p=0,f=mn(u,this.__takeCount__);if(!n||!r&&i==u&&f==u)return ci(e,this.__actions__);var y=[];e:for(;u--&&p<f;){for(var h=-1,g=e[l+=t];++h<c;){var m=d[h],v=m.iteratee,w=m.type,b=v(g);if(2==w)g=b;else if(!b){if(1==w)continue e;break e}}y[p++]=g}return y},xn.prototype.at=fo,xn.prototype.chain=function(){return co(this)},xn.prototype.commit=function(){return new qn(this.value(),this.__chain__)},xn.prototype.next=function(){this.__values__===i&&(this.__values__=ca(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},xn.prototype.plant=function(e){for(var t,n=this;n instanceof Bn;){var r=Ds(n);r.__index__=0,r.__values__=i,t?s.__wrapped__=r:t=r;var s=r;n=n.__wrapped__}return s.__wrapped__=e,t},xn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Un){var t=e;return this.__actions__.length&&(t=new Un(this)),(t=t.reverse()).__actions__.push({func:po,args:[Zs],thisArg:i}),new qn(t,this.__chain__)}return this.thru(Zs)},xn.prototype.toJSON=xn.prototype.valueOf=xn.prototype.value=function(){return ci(this.__wrapped__,this.__actions__)},xn.prototype.first=xn.prototype.head,Ye&&(xn.prototype[Ye]=function(){return this}),xn}();ct._=yn,(r=function(){return yn}.call(t,n,t,e))===i||(e.exports=r)}.call(this)},50104:(e,t,n)=>{var r=n(53661);function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var o=e.apply(this,r);return n.cache=s.set(i,o)||s,o};return n.cache=new(i.Cache||r),n}i.Cache=r,e.exports=i},10124:(e,t,n)=>{var r=n(9325);e.exports=function(){return r.Date.now()}},44383:(e,t,n)=>{var r=n(76001),i=n(38816)((function(e,t){return null==e?{}:r(e,t)}));e.exports=i},63345:e=>{e.exports=function(){return[]}},89935:e=>{e.exports=function(){return!1}},7350:(e,t,n)=>{var r=n(38221),i=n(23805);e.exports=function(e,t,n){var s=!0,o=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return i(n)&&(s="leading"in n?!!n.leading:s,o="trailing"in n?!!n.trailing:o),r(e,t,{leading:s,maxWait:t,trailing:o})}},99374:(e,t,n)=>{var r=n(54128),i=n(23805),s=n(44394),o=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(s(e))return NaN;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=a.test(e);return n||u.test(e)?l(e.slice(2),n?2:8):o.test(e)?NaN:+e}},13222:(e,t,n)=>{var r=n(77556);e.exports=function(e){return null==e?"":r(e)}},90165:(e,t,n)=>{"use strict";const r=n(4693);e.exports=e=>{if(!Number.isInteger(e)&&e!==1/0||!(e>0))throw new TypeError("Expected `concurrency` to be a number from 1 and up");const t=new r;let n=0;const i=async(e,r,...i)=>{n++;const s=(async()=>e(...i))();r(s);try{await s}catch{}n--,t.size>0&&t.dequeue()()},s=(r,...s)=>new Promise((o=>{((r,s,...o)=>{t.enqueue(i.bind(null,r,s,...o)),(async()=>{await Promise.resolve(),n<e&&t.size>0&&t.dequeue()()})()})(r,o,...s)}));return Object.defineProperties(s,{activeCount:{get:()=>n},pendingCount:{get:()=>t.size},clearQueue:{value:()=>{t.clear()}}}),s}},84342:(e,t,n)=>{"use strict";!function(){var t,r,i,s=0,o=[];for(r=0;r<256;r++)o[r]=(r+256).toString(16).substr(1);function a(){var e=((!t||s+16>u.BUFFER_SIZE)&&(s=0,t=u.randomBytes(u.BUFFER_SIZE)),t.slice(s,s+=16));return e[6]=15&e[6]|64,e[8]=63&e[8]|128,e}function u(){var e=a();return o[e[0]]+o[e[1]]+o[e[2]]+o[e[3]]+"-"+o[e[4]]+o[e[5]]+"-"+o[e[6]]+o[e[7]]+"-"+o[e[8]]+o[e[9]]+"-"+o[e[10]]+o[e[11]]+o[e[12]]+o[e[13]]+o[e[14]]+o[e[15]]}u.BUFFER_SIZE=4096,u.bin=a,u.clearBuffer=function(){t=null,s=0},u.test=function(e){return"string"==typeof e&&/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(e)},"undefined"!=typeof crypto?i=crypto:"undefined"!=typeof window&&void 0!==window.msCrypto&&(i=window.msCrypto),i=i||n(60575),e.exports=u,u.randomBytes=function(){if(i){if(i.randomBytes)return i.randomBytes;if(i.getRandomValues)return"function"!=typeof Uint8Array.prototype.slice?function(e){var t=new Uint8Array(e);return i.getRandomValues(t),Array.from(t)}:function(e){var t=new Uint8Array(e);return i.getRandomValues(t),t}}return function(e){var t,n=[];for(t=0;t<e;t++)n.push(Math.floor(256*Math.random()));return n}}()}()},4693:e=>{class t{constructor(e){this.value=e,this.next=void 0}}class n{constructor(){this.clear()}enqueue(e){const n=new t(e);this._head?(this._tail.next=n,this._tail=n):(this._head=n,this._tail=n),this._size++}dequeue(){const e=this._head;if(e)return this._head=this._head.next,this._size--,e.value}clear(){this._head=void 0,this._tail=void 0,this._size=0}get size(){return this._size}*[Symbol.iterator](){let e=this._head;for(;e;)yield e.value,e=e.next}}e.exports=n},60575:()=>{}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var s=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(s.exports,s,s.exports,n),s.loaded=!0,s.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{"use strict";var e={};n.r(e),n.d(e,{APPLICATION_STATE_CHANNEL:()=>nt,CLIENT_SERVER_MAPPING:()=>ut,COMPONENT_STATE_STORAGE_TOPIC:()=>vt,EVENT_INTERRUPT_CHANNEL:()=>ft,HEARTBEAT_TIMEOUT_CHANNEL:()=>wt,INTERRUPTIBLE_EVENTS:()=>yt,LAUNCHER_SERVICE:()=>bt,MOVE_REASON:()=>jt,SERVICES_STATE_CHANNEL:()=>lt,SERVICE_CLOSED_CHANNEL:()=>ot,SERVICE_CLOSING_CHANNEL:()=>st,SERVICE_INITIALIZING_CHANNEL:()=>rt,SERVICE_QUERY_READY_CHANNEL:()=>at,SERVICE_READY_CHANNEL:()=>it,SERVICE_START_CHANNEL:()=>ct,SERVICE_STOP_CHANNEL:()=>pt,WINDOW:()=>ht,WINDOWSTATE:()=>dt,WINDOW_SERVICE_REQUESTS:()=>mt,WORKSPACE:()=>gt,WRAPPERS:()=>tt});var t=n(58156),r=n.n(t);const i=(e,t,n)=>(e[t]||[]).concat([n]),s=(e,t,n)=>(e[t]||[]).filter((e=>e!==n)),o="FSBL.FDC3.Interop.Server",a="(TitleBar)",u={signatureString:"",signatureStringType:"unauthenticated",meta:{name:"Anonymous app",appId:"Anonymous appId"}};let l="undefined"==typeof window?n.g:window,d="undefined"==typeof window?n.g:window;"undefined"==typeof window?n.g:window;var c=n(84342),p=n.n(c);const f=e=>{const t=Symbol.for(`com.finsemble.singleton.${e}`);return Object.getOwnPropertySymbols(n.g).indexOf(t)>-1?n.g[t]:null},y=(e,t,...r)=>{const i=f(e);if(!i){const i=Symbol.for(`com.finsemble.singleton.${e}`);return n.g[i]=new t(...r),n.g[i]}return i},h=`Unknown window-${p()()}`;class g{constructor(){this.isReady=!1,this.onReadyListeners=[],this.currentStartupData={authenticationToken:u,windowName:h,webContentsName:h}}static getInstance(){return g.instance?g.instance:g.instance=y("Startup",g)}getStartupData(){return this.currentStartupData}setStartupData(e){this.currentStartupData=e}onReady(e){return new Promise((t=>{this.isReady?(e&&setTimeout(e,0),t()):this.onReadyListeners.push((()=>{e&&e(),t()}))}))}setReady(){this.isReady=!0,this.onReadyListeners.forEach((e=>{e()}));try{l.dispatchEvent&&l.Event&&l.dispatchEvent(new l.Event("FSBLReady"))}catch(e){console.log(e.toString())}}}g.instance=null;const m={},v={activeTransports:{},liveTransport:null,setTransports(){v.addTransport("SharedWorkerForCoreServices",m.SharedWorkerForCoreServicesTransport),v.addTransport("SharedWorker",m.SharedWorkerTransport),v.addTransport("IPCBus",m.IPCTransport),v.addTransport("FinsembleTransport",m.FinsembleTransport)},addTransport(e,t){this.activeTransports[e]=t},getActiveTransports(e){const t=[],n=e=>{-1===t.indexOf(e)&&t.push(e)};return x.InterApplicationBus&&n("IPCBus"),n("FinsembleTransport"),SharedWorker&&(n("SharedWorker"),n("SharedWorkerForCoreServices")),n(e.sameDomainTransport),n(e.crossDomainTransport),ye.system.log("getActiveTransports",t),t},getTransport:(e,t,n,r,i,s)=>new Promise(((o,a)=>{const u=v.activeTransports[t];if(u)v.liveTransport=new u(e,n,r,i,(e=>{o(e)}),s);else{const e=`routerTransport.getTransport() Unknown router transport name: ${t}`;ye.warn(e),a(e)}})),close(){v.liveTransport&&(v.liveTransport.close(),v.liveTransport=null)}};m.SharedWorkerForCoreServicesTransport=function(e,t,n,r,i){let s;this.send=function(e,t){1===arguments.length?(t=arguments[0],e=null):(e=arguments[0],t=arguments[1]),ye.system.verbose("SharedWorkerForCoreServicesTransport Outgoing Transport",t);try{s.port.postMessage([e,t])}catch(e){ye.system.error(`SharedWorkerForCoreServicesTransport: post message failed: ${JSON.stringify(e)}`,"Probable cause is sending illegal data type (e.g. function).")}},this.identifier=()=>"SharedWorkerForCoreServices";const o=e.transportSettings.SharedWorker&&e.transportSettings.SharedWorker.workerPath?e.transportSettings.SharedWorker.workerPath:`${e.routerDomainRoot}/routerSharedWorkerForCoreServices.js`;ye.console.log(`SharedWorkerForCoreServices Transport Initializing for ${n} using ${o}`),s=new SharedWorker(o,{name:"Finsemble",credentials:"include"}),s.port.onmessage=e=>{const n=e.data[0],r=e.data[1],i={transportID:this.identifier(),port:n};ye.system.verbose("SharedWorkerForCoreServicesTransport Incoming Transport",i,"Message",r),t(i,r)},s.onerror=e=>{ye.console.error(`SharedWorkerForCoreServicesTransport Transport Error ${JSON.stringify(e)}`)},s.port.start(),"RouterService"===n&&s.port.postMessage({data:"connect",source:"RouterService"}),this.close=()=>s.port.close(),null==i||i(this)},m.SharedWorkerTransport=function(e,t,n,r,i){let s;this.send=function(e,t){1===arguments.length?(t=arguments[0],e=null):(e=arguments[0],t=arguments[1]),ye.system.verbose("SharedWorkerTransport Outgoing Transport",t);try{s.port.postMessage([e,t])}catch(e){ye.system.error(`SharedWorkerTransport: post message failed: ${JSON.stringify(e)}`,"Probable cause is sending illegal data type (e.g. function).")}},this.identifier=()=>"SharedWorker";const o=e.transportSettings.SharedWorker&&e.transportSettings.SharedWorker.workerPath?e.transportSettings.SharedWorker.workerPath:`${e.routerDomainRoot}/routerSharedWorker.js`;ye.console.log(`SharedWorker Transport Initializing for ${n} using ${o}`),s=new SharedWorker(o,{name:"Finsemble",credentials:"include"}),s.port.onmessage=e=>{const n=e.data[0],r=e.data[1],i={transportID:this.identifier(),port:n};ye.system.verbose("SharedWorkerTransport Incoming Transport",i,"Message",r),t(i,r)},s.onerror=e=>{ye.console.error(`SharedWorkerTransport Transport Error ${JSON.stringify(e)}`)},s.port.start(),"RouterService"===n&&s.port.postMessage({data:"connect",source:"RouterService"}),this.close=()=>s.port.close(),null==i||i(this)},m.IPCTransport=function(e,t,n,r,i){this.send=function(e,t){let n;1===arguments.length?(n=r,t=arguments[0]):(n=e.name,t=arguments[1]),ye.system.verbose("IPCTransport Outgoing Transport",n,"Message",t),x.InterApplicationBus.publish(n,t,(()=>{}),(()=>{}))},this.identifier=()=>"IPCBus",ye.console.log(`IPCBus Transport Initializing for ${n}`);const s=x.InterApplicationBus.subscribe("*",n,(e=>{const n={transportID:this.identifier(),name:e.header.origin};ye.system.verbose("IPCTransport Incoming Transport",n,"Message",e),t(n,e)}),(()=>{}),(e=>ye.console.error(`IPCBus Subscribe Failure: ${e}`)));this.close=()=>x.InterApplicationBus.unsubscribe(s),null==i||i(this)},m.FinsembleTransport=function(e,t,n,r,i,s){var o,a,u,d,c;const p=`${null!==(c=null!==(u=null===(a=null===(o=null==e?void 0:e.transportSettings)||void 0===o?void 0:o.FinsembleTransport)||void 0===a?void 0:a.serverAddress)&&void 0!==u?u:null===(d=null==e?void 0:e.transportSettings)||void 0===d?void 0:d.serverAddress)&&void 0!==c?c:"ws://127.0.0.1:3376"}/router`;let f,y,h=!0;const g=e=>{if("IAC_KeepaliveHandshake"===e)ye.system.verbose("FinsembleTransport Incoming Message","Message",e),ye.system.verbose("FinsembleTransport keepalive completed"),h=!0;else{const n={transportID:this.identifier(),client:e.clientMessage.header.origin};ye.system.verbose("FinsembleTransport Incoming Transport",n,"Message",e),t(n,e.clientMessage)}},m=()=>{ye.console.log(`FinsembleTransport Transport Initializing for ${n} using ${p} trying to connect to server`),p.startsWith("ws:")||p.startsWith("wss:")||ye.system.error(`Illegal WebSocket address "${p}" (Missing ws:// or wss:// ?)`),f=new l.WebSocket(p),f.addEventListener("open",(()=>{clearInterval(y),ye.console.log("FinsembleTransport connected to server"),f.send(JSON.stringify({dest:"IAC_SERVER",source:n})),"RouterService"!==n&&((()=>{const e=setInterval((()=>{h?(h=!1,f.send(JSON.stringify({dest:"IAC_KEEPALIVE_SERVER",source:n})),ye.system.verbose("FinsembleTransport keepalive sent")):(ye.console.error("FinsembleTransport keepalive handshake failed -- transport is essentially dead",5e3),clearInterval(e),s&&s())}),5e3)})(),ye.console.log("FinsembleTransport keep-alive handshake started")),f.addEventListener("message",(e=>{const t=JSON.parse(e.data);g(t.message)})),null==i||i(this)})),f.addEventListener("error",(()=>{console.log(`Error connecting to websocket server ${p}`)})),f.addEventListener("close",(e=>{console.log(`Websocket is closed with code ${e.code}`),1006===e.code&&(clearInterval(y),y=setInterval(m,1e4))}))};this.send=function(e,t){let n,r;1===arguments.length?(n="ROUTER_SERVICE",r={clientMessage:t=arguments[0]}):(n="ROUTER_CLIENT",t=arguments[1],r={client:e.client,clientMessage:t}),ye.system.verbose("FinsembleTransport Outgoing Transport",n,"NewMessage",r),f.send(JSON.stringify({dest:n,message:r}))},this.identifier=()=>"FinsembleTransport",this.close=()=>{f.close()},y=setInterval(m,1e4),m()};const w=v,b=["microkernel","kernel","pre-authentication","authentication","appd-retrieval","system-preuser","preuser","preuser2","preuser3","preuser4","system-earlyuser","earlyuser","user"];function j(e){return`systemManager.boot.status.${e}`}function S(e,t){return`systemManager.checkpoint.${e}.${t}`}const C=new class{constructor(){this.startedElements={}}publishBootStatus(e,t,n,r){fe.system.debug("publishBootStatus",e,t,n),P.publish(j(e),{name:e,type:t,state:n,error:r})}waitForBootStage(e,t,n=Function.prototype){return new Promise(((r,i)=>{fe.system.debug("SystemManagerClient.waitForBootStage entry",e,t);const s=b.indexOf(e);"microkernel"===e&&"stageEntered"===t&&fe.system.error("Cannot wait on `stageEntered` for microkernel because router isn't up yet. So will instead wait for microkernel stage complete.");const o=P.subscribe("systemManager.boot.stage",((a,u)=>{if(fe.system.debug("SystemManagerClient.waitForBootStage new stage",u.data.stage,o),a)fe.system.error("SystemManagerClient.waitForBootStage subscribe error",a),n(a),i(a);else if(-1===s)a="illegal stage argument",fe.system.debug("SystemManagerClient.waitForBootStage subscribe error",a,e),n(a),i(a);else{const i=b.indexOf(u.data.stage);fe.system.debug("SystemManagerClient.waitForBootStage new stage",u.data,o),"stageEntered"===t&&i+1>=s?(fe.system.debug("SystemManagerClient.waitForBootStage stageEntered",e,o,n.name),n(),r(),P.unsubscribe(o)):"stageCompleted"===t&&i>=s?(fe.system.debug("SystemManagerClient.waitForBootStage completed",e,o),n(),r(),P.unsubscribe(o)):fe.system.debug(`SystemManagerClient.waitForBootStage else currentStageIndex=${i} stageIndex=${s} `,i,s,e,o)}}))}))}waitForStartup(e,t=Function.prototype){return new Promise(((n,r)=>{if(this.startedElements[e])return void n();fe.system.debug(`SystemManagerClient.waitForStartup.${e}`,e);const i=P.subscribe(j(e),((s,o)=>{fe.system.debug("SystemManagerClient.waitForStartup subscribe",e,s,o),s?(fe.system.error("SystemManagerClient.waitForStartup subscribe error",s),t(s),this.startedElements[e]=!1,r(s)):o.data.name===e&&"completed"===o.data.state&&(fe.system.debug("SystemManagerClient.waitForStartup completed",e),this.startedElements[e]=!0,t(),n(),P.unsubscribe(i))}))}))}publishCheckpointState(e,t,n){fe.system.debug("publishCheckpoint",e,t,n,S(e,t)),P.publish(S(e,t),{windowName:e,checkpointName:t,state:n})}showSystemLog(){fe.system.debug("SystemManagerClient.showSystemLog"),P.transmit("systemManager.showSystemlog",!0)}hideSystemLog(){fe.system.debug("SystemManagerClient.hideSystemLog"),P.transmit("systemManager.hideSystemlog",!0)}systemLog(e,t){fe.system.debug("SystemManagerClient.systemLog",e,t),P.transmit("systemManager.systemlog",{params:e,logMessage:t})}},A=C;class R{constructor(){this.alertOnceSinceStartUp={},this.alertCurrentCount={}}}const I=(e,t,n,r,i)=>{const s=y("Toast",R);let o=!1;const a=`toast.${n}`,u=(i=i||{}).duration||864e5;switch(t){case"ONCE-SINCE-STARTUP":a in s.alertOnceSinceStartUp?o=!1:(o=!0,s.alertOnceSinceStartUp[a]=!0);break;case"MAX-COUNT":{let e=0;const t=i.maxCount||1;a in s.alertCurrentCount&&(e=s.alertCurrentCount[a]),s.alertCurrentCount[a]=++e,e<=t&&(o=!0);break}default:o=!0}if(fe.log("toast",e,o,t,n,r,i),o){const t={message:r,timeout:u,...i,devModeOnly:"devModeOnly"===e};t.title||"devModeOnly"!==e||(t.title="Finsemble Developer Notification"),A.systemLog({notification:!0},`Notification: ${r}`),x.Notification.send(t)}};var T;const E={navigationStart:Date.now()},O={now:()=>{var e;return l.performance?null===(e=l.performance)||void 0===e?void 0:e.now():Date.now()},timing:(null===(T=l.performance)||void 0===T?void 0:T.timing)?l.performance.timing:E};function _(e,t={}){if(null===e||"object"!=typeof e)return e;if(e.constructor==Date||e.constructor==RegExp||e.constructor==Function||e.constructor==String||e.constructor==Number||e.constructor==Boolean)return new e.constructor(e);t=t||new e.constructor;for(const n in e)t[n]=void 0===t[n]?_(e[n],null):t[n];return t}class M{constructor(){this.queue=[],this.started=!1,this.clientName="RouterClient.clientName not yet set",this.transport=null,this.isRouterReady=!1,this.isTransportFailed=!1,this.parentReadyCallbackQueue=[],this.parentFailureCallbackQueue=[],this.mapListeners={},this.mapQueryResponders={},this.mapPubSubResponders={},this.mapPubSubResponderState={},this.mapPubSubResponderRegEx={},this.pubsubListOfSubscribers={},this.mapSubscribersID={},this.mapSubscribersTopic={},this.mapQueryResponses={},this.mapQueryResponseTimeOut={}}onReadyCallBack(){for(pe.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient Ready"),this.isRouterReady=!0;this.parentReadyCallbackQueue.length>0;){pe.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient parentReady invoked");const e=this.parentReadyCallbackQueue.shift();null==e||e()}}sendToRouterService(e){this.transport?this.transport.send(e):(pe.system.info("RouterClient: Queuing message since router initialization not complete",e),this.queue.push(e))}originatedHere(e){return e.header.origin===this.clientName}invokeListeners(e){const{channel:t,origin:n}=e.header,r=this.mapListeners[t]||[];Array.isArray(r)&&0!==r.length?(e.originatedHere=()=>this.originatedHere(e),r.forEach((r=>{pe.channelFilter(t)||pe.system.info("RouterClient: incoming transmit","CHANNEL",t,"FROM",n,"MESSAGE",e),r(null,e)}))):pe.system.log(`RouterClient: no listener for incoming transmit on channel ${t} from ${n}. Possibly the listener was removed while this message was in transit.`,e)}invokeResponder(e){const{channel:t,origin:n,queryID:r,error:i}=e.header;pe.system.info("RouterClient: incoming query","CHANNEL",t,"FROM",n,"QUERY MESSAGE",e);const s=(e,n)=>{pe.system.info("RouterClient: outgoing query response","CHANNEL",t,"RESPONSE DATA",n,"QUERY ID",r);let i={header:{origin:this.clientName,queryID:r,type:"queryResponse"},data:n};i.header.error=e?e.toString():null,this.sendToRouterService(i)},o=this.mapQueryResponders[t];void 0===o?e.header.logWhenNoResponder&&pe.system.warn(`RouterClient: No query responder defined on channel ${t} for incoming from ${n}.`,e):i?(pe.system.warn("RouterClient: queryResponder error",e),o(i),delete this.mapQueryResponders[t]):o(null,{...e,originatedHere:()=>this.originatedHere(e),sendQueryResponse:(e,t)=>{s(e,t)}})}invokeQueryResponse(e){var t;pe.system.info("RouterClient: incoming query response","CHANNEL",e.header.channel,"QUERY ID",e.header.queryID,"message",e);const{queryID:n}=e.header,r=this.mapQueryResponseTimeOut[n];delete this.mapQueryResponseTimeOut[n],r&&clearTimeout(r);const i=this.mapQueryResponses[n];i?(delete this.mapQueryResponses[n],i(null!==(t=e.header.error)&&void 0!==t?t:null,e)):pe.system.warn("Invariant: RouterClient: no handler found for incoming query response.",e)}invokeNotifyCallback(e){const{subscribeID:t,error:n}=e.header,r=this.mapSubscribersID[t];r?n?(pe.system.info("RouterClient: incoming PubSub notify error for subscriberID","SUBSCRIBER ID",t,"NOTIFY MESSAGE",e),r(n,e)):(e.originatedHere=()=>this.originatedHere(e),pe.system.info("RouterClient: incoming PubSub notify","SUBSCRIBER ID",t,"NOTIFY MESSAGE",e),r(null,e)):pe.system.info("RouterClient: no subscription handler defined for incoming notify for subscriberID. Possibly the subscription was removed while this publish was in transit.",t,e)}findResponder(e){const t=this.mapPubSubResponders[e];if(t)return t;for(const t in this.mapPubSubResponderRegEx)if(this.mapPubSubResponderRegEx[t].test(e))return this.mapPubSubResponders[t]}invokePublishEvent(e){const{topic:t}=e.header;let n=this.findResponder(t);if(n){const r=(e,n,r)=>{var i;n?pe.system.warn("RouterClient: incoming publish rejected by pubsub responder",n,r):(this.mapPubSubResponderState[t]=r,(null!==(i=this.pubsubListOfSubscribers[t])&&void 0!==i?i:[]).forEach((e=>{pe.system.info("RouterClient: sending pubsub notify","TOPIC",t,"NOTIFY DATA",r);const n={header:{origin:this.clientName,type:"notify",topic:t,subscribeID:e},data:r};this.sendToRouterService(n)})))};if(pe.system.info("RouterClient: incoming PubSub publish "+(n.publishCallback?"(publishCallback hook invoked)":""),"TOPIC",t,"PUBLISH MESSAGE",e),n.publishCallback){const t={...e,sendNotifyToAllSubscribers:(t,n)=>{r(e,t,n)}};n.publishCallback(null,t)}else r(e,null,e.data)}else pe.system.warn("RouterClient: no pubsub responder defined for incoming publish","TOPIC",t,"PUBLISH MESSAGE",e)}invokeSubscribeEvent(e){var t;const{topic:n,error:r}=e.header;pe.system.info("RouterClient: PubSub subscribe","TOPIC",n);let i=this.mapPubSubResponders[n];if(!i)for(const e in this.mapPubSubResponderRegEx)if(this.mapPubSubResponderRegEx[e].test(n)){i=this.mapPubSubResponders[e],this.mapPubSubResponderState[n]=null!==(t=this.mapPubSubResponderState[n])&&void 0!==t?t:this.mapPubSubResponderState[e];break}if(i)if(r)pe.system.warn(`RouterClient: pubsub error received from router service: ${r}`,e);else if(i.subscribeCallback){const t={...e,sendNotifyToSubscriber:(t,n)=>{this.sendNotifyToSubscriber(e,t,n)}};e.data=this.mapPubSubResponderState[n],i.subscribeCallback(null,t)}else this.sendNotifyToSubscriber(e,null,this.mapPubSubResponderState[n]);else pe.system.warn("RouterClient: no pubsub responder defined for incoming subscribe event",e)}invokeUnsubscribeEvent(e){const{topic:t,subscribeID:n}=e.header;let r=this.findResponder(t);if(!r)for(const e in this.mapPubSubResponderRegEx)if(this.mapPubSubResponderRegEx[e].test(t)){r=this.mapPubSubResponders[e];break}if(r)if(pe.system.info("RouterClient: incoming unsubscribe "+(r.unsubscribeCallback?"with unsubscribeCallback hook":""),"TOPIC",t,"UNSUBSCRIBE MESSAGE",e),r.unsubscribeCallback){const i={...e,removeSubscriber:()=>{this.removeSubscribers(t,n)}};r.unsubscribeCallback(null,i)}else this.removeSubscribers(t,n);else pe.system.warn("RouterClient: no pubsub responder defined for incoming unsubscribe event","TOPIC",t,"UNSUBSCRIBE MESSAGE",e)}sendNotifyToSubscriber(e,t,n){const{topic:r,subscribeID:i}=e.header;if(void 0!==n){let e={header:{origin:this.clientName,type:"notify",topic:r,subscribeID:i},data:n};t&&(e.header.error=t),this.sendToRouterService(e)}t?pe.system.warn("RouterClient: incoming subscription rejected by pubsub responder","TOPIC",r,"MESSAGE",this):(r in this.pubsubListOfSubscribers?this.pubsubListOfSubscribers[r].push(i):this.pubsubListOfSubscribers[r]=[i],pe.system.info("RouterClient: incoming subscription added","TOPIC",r,"MESSAGE"))}removeSubscribers(e,t){let n=!1;if(e in this.pubsubListOfSubscribers){const r=this.pubsubListOfSubscribers[e];for(let i=0;i<r.length;i++)if(t===r[i]){r.splice(i,1),0===r.length&&delete this.pubsubListOfSubscribers[e],n=!0,pe.system.info("RouterClient: PubSub removeListener","TOPIC",e,"FROM",t);break}}n||pe.system.warn(`RouterClient: tried to remove non-existent listener on ${e} from ${t}`)}routeIncomingMessage(e){const t=()=>{this.timeCalibrationHandler?this.timeCalibrationHandler(e):setTimeout((()=>{t()}),10)};switch(pe.system.verbose("Incoming Message Type",e.header.type,e),e.header.type){case"transmit":this.invokeListeners(e);break;case"query":this.invokeResponder(e);break;case"queryResponse":this.invokeQueryResponse(e);break;case"notify":this.invokeNotifyCallback(e);break;case"publish":this.invokePublishEvent(e);break;case"subscribe":this.invokeSubscribeEvent(e);break;case"unsubscribe":this.invokeUnsubscribeEvent(e);break;case"timeCalibration":t();break;case"initialHandshakeResponse":this.handshakeHandler()}}asyncConnectToEventRouter(e,t,n){pe.system.debug(`Name of transport to establish: ${t}`);let r=null,i=0,s=!1,o=0,a=null;const u=()=>{const t=Number.MAX_SAFE_INTEGER;pe.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient: sendHandshake",i);const n={header:{origin:this.clientName,type:"initialHandshake"}};this.sendToRouterService(n),i++>t&&(()=>{if(clearInterval(r),o++,o<=3)pe.console.error("WINDOW LIFECYCLE:STARTUP:RouterClient: failure to connect to router service. Retrying...",o,e),null==a||a();else{const t="A cross domain transport has failed to connect. Cross domain components may not work. Please contact your administrator.";pe.console.error(t,e),I("dev","ONCE-SINCE-STARTUP","FSBL-Internal-Transport-Failure",t)}})()},l=()=>{if(!s){pe.system.debug(`WINDOW LIFECYCLE:STARTUP:RouterClient connected: Starting ${this.clientName} with transport ${this.transport.identifier()}`),s=!0,clearInterval(r);for(let e=0;e<this.queue.length;e++){pe.system.debug("RouterClient: releasing queued msg");const t=this.queue[e];this.transport.send({...t,header:{...t.header,origin:this.clientName}})}null==n||n()}},d=e=>{i=0,pe.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient:transport ready","TRANSPORT OBJECT",e),this.transport=e,this.handshakeHandler=l,u(),r=setInterval(u,1e3)},c=()=>{for(pe.system.error("RouterClient Transport Failed -- onFailure() callbacks invoked."),this.isTransportFailed=!0;this.parentFailureCallbackQueue.length>0;){pe.system.debug("RouterClient parentFailure invoked");const e=this.parentFailureCallbackQueue.shift();null==e||e()}};a=()=>{pe.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient:getClientTransport","ROUTER PARAMS:",e),w.getTransport(e,t,((e,t)=>{t.header.lastClient=this.clientName,t.header.incomingTransportInfo=e,this.routeIncomingMessage(t)}),this.clientName,"RouterService",c).then(d).catch((e=>{pe.console.error("RouterClient getTransport error",e)}))},a()}addPubSubResponderCallBack(e,t,n,r){const i=e.toString();return!this.mapPubSubResponders[i]&&(e instanceof RegExp&&(this.mapPubSubResponderRegEx[i]=e,pe.system.info(`RouterClient: PubSub RegEx added for topic ${i}`)),this.mapPubSubResponders[i]={subscribeCallback:t,publishCallback:n,unsubscribeCallback:r},!0)}calibrateTimeWithRouterService(e){let t=0,n=0,r=1/0;const i={header:{origin:this.clientName,type:"timeCalibration"},clientBaseTime:[],serviceBaseTime:[]};this.timeCalibrationHandler=i=>{if(t++,t>5)(t=>{const{clientBaseTime:i,serviceBaseTime:s}=t;let o=0;for(let e=1;e<5;e++){const t=i[e-1],a=i[e]-t,u=s[e-1]-(t+a/2);a<r&&(r=a,n=u),o+=u,pe.system.debug("calibrationCalculation Intermediate Values","lastRRT",a,"lastOffset",u,"fastestOffset",n,"fastestRRT",r)}o/=4,pe.system.debug("RouterClient calibrationCalculation","Average Offset",o,"Chosen FastestOffset",n,t),e(n)})(i);else{i.clientBaseTime.push(O.timing.navigationStart+O.now());const e={header:{origin:this.clientName,type:"timeCalibration"},clientBaseTime:i.clientBaseTime,serviceBaseTime:i.serviceBaseTime};this.sendToRouterService(e)}},this.timeCalibrationHandler(i)}start(e){return new Promise((async t=>{if(this.started){const e="RouterClient.start() called twice. Ignoring second call.";return pe.system.warn(e),t(e)}this.started=!0,this.clientName=`RouterClient.${e.windowName}.${p()()}`;const n=`"RouterClient Check: connecting new client for ${this.clientName}`;pe.system.debug(n),console.debug(n),w.setTransports(),this.asyncConnectToEventRouter(e,e.transportName,(()=>{this.onReadyCallBack(),t(null)}))}))}disconnectFromService(){pe.system.info("RouterClient.disconnectFromService");const e={header:{origin:this.clientName,type:"disconnectFromService"}};this.sendToRouterService(e)}stop(){this.disconnectAll(),w.close(),this.started=!1,this.disconnectFromService()}onReady(e){return new Promise((t=>{const n=()=>{e&&e(),t()};this.isRouterReady?n():this.parentReadyCallbackQueue.push(n)}))}onFailure(e){return new Promise((t=>{const n=()=>{e&&e(),t()};this.isTransportFailed?n():this.parentFailureCallbackQueue.push(n)}))}addListener(e,t){pe.system.info("RouterClient.addListener","CHANNEL",e);const n=this.mapListeners[e];if(n&&0!==n.length)n.some((e=>t===e))?pe.debug("RouterClient.addListener() Ignoring duplicate listener with identical callback",e,t):n.push(t);else{this.mapListeners[e]=[t];const n={header:{origin:this.clientName,type:"addListener",channel:e}};this.sendToRouterService(n)}return()=>{this.removeListener(e,t)}}transmit(e,t,n){pe.channelFilter(e)||pe.system.info("RouterClient.transmit","TO CHANNEL",e,"DATA",t);const r={header:{origin:this.clientName,type:"transmit",channel:e},data:t,options:n};this.sendToRouterService(r)}removeListener(e,t){if(pe.system.info("RouterClient.removeListener","CHANNEL",e,"EVENT HANDLER",t),!this.mapListeners[e])return pe.system.debug("Attempt to remove non existent listener",e,t),void console.log("Attempt to remove non existent listener",e,t);if(this.mapListeners[e]=this.mapListeners[e].flatMap((e=>e===t?[]:[e])),!this.mapListeners[e].length){delete this.mapListeners[e];const t={header:{origin:this.clientName,type:"removeListener",channel:e}};this.sendToRouterService(t)}}addResponder(e,t){if(pe.system.info("RouterClient.addResponder","CHANNEL",e),this.mapQueryResponders[e]){const n=`RouterClient.addResponder: Responder already locally defined for channel ${e}`;pe.system.warn(n),t(n)}else{this.mapQueryResponders[e]=t;const n={header:{origin:this.clientName,type:"addResponder",channel:e}};this.sendToRouterService(n)}}query(e,t,n,r){var i,s;const o=`${this.clientName}.${p()()}.${e}`,a=O.timing.navigationStart+O.now(),u=O.timing.navigationStart,d=O.now();pe.system.info("RouterClient.query","RESPONDER CHANNEL",e,"QUERY EVENT",t,"PARAMS",n,"QUERY ID",o,{timestamp:a,navstart:u,timenow:d});const c=null!=r?r:"function"==typeof n?n:null,f=null!==(i=null==n?void 0:n.timeout)&&void 0!==i?i:2e4,y=null===(s=null==n?void 0:n.logWhenNoResponder)||void 0===s||s;return new Promise((r=>{this.mapQueryResponses[o]=(e,t)=>{null==c||c(e,t),r({err:e,response:t})},!l.runningInFSBLUnitTest&&f>0&&(this.mapQueryResponseTimeOut[o]=setTimeout((()=>{pe.system.warn(`RouterClient: timeout after ${f} ms waiting on query response on channel ${e} for queryID ${o} from client ${this.clientName}`,"from event",t,"with params",n),delete this.mapQueryResponseTimeOut[o]}),f));const i={header:{origin:this.clientName,type:"query",queryID:o,channel:e,logWhenNoResponder:y},data:t};this.sendToRouterService(i)}))}removeResponder(e){if(pe.system.info("RouterClient.removeResponder","RESPONDER CHANNEL",e),this.mapQueryResponders[e]){delete this.mapQueryResponders[e];const t={header:{origin:this.clientName,type:"removeResponder",channel:e}};this.sendToRouterService(t)}}addPubSubResponder(e,t,n,r){let i,s;if(pe.system.info("RouterClient.addPubSubResponder","TOPIC",e,"INITIAL STATE",t,"PARAMS",n),void 0===(n=n||{}).subscribeCallback&&void 0===n.publishCallback&&void 0===n.unsubscribeCallback){t=t||{};const n={header:{origin:this.clientName,type:"addPubSubResponder",topic:e.toString(),handleOnServer:!0},data:t};this.sendToRouterService(n),s="success"}else if(this.addPubSubResponderCallBack(e,n.subscribeCallback,n.publishCallback,n.unsubscribeCallback)){t=t||{},this.mapPubSubResponderState[e.toString()]=_(t);const n={header:{origin:this.clientName,type:"addPubSubResponder",topic:e.toString(),handleOnServer:!1},data:t};this.sendToRouterService(n),s="success"}else i=`RouterClient.addPubSubResponder: Responder already locally defined for topic ${e}`,pe.system.error(i);r&&r(i,s)}removePubSubResponder(e){pe.system.info("RouterClient.removePubSubResponder","TOPIC",e);const t=e.toString();if(this.mapPubSubResponders[t]){delete this.mapPubSubResponders[t],delete this.mapPubSubResponderState[t],delete this.mapPubSubResponderRegEx[t];const n={header:{origin:this.clientName,type:"removePubSubResponder",topic:e}};this.sendToRouterService(n)}else pe.system.warn(`RouterClient.removePubSubResponder failed: Could not find responder for topic ${e}`)}subscribe(e,t){pe.system.info("RouterClient.subscribe","TOPIC",e);const n=`${this.clientName}.${p()()}`;this.mapSubscribersID[n]=t,this.mapSubscribersTopic[n]=e;const r={header:{origin:this.clientName,type:"subscribe",subscribeID:n,topic:e}};return this.sendToRouterService(r),{subscribeID:n,topic:e}}publish(e,t){pe.system.info("RouterClient.publish","TOPIC",e,"EVENT",t);const n={header:{origin:this.clientName,type:"publish",topic:e},data:t};this.sendToRouterService(n)}unsubscribe(e){pe.system.info("RouterClient.unsubscribe","SUBSCRIBE ID",e);const{subscribeID:t}=e;if(this.mapSubscribersID[t]){delete this.mapSubscribersID[t],delete this.mapSubscribersTopic[t];const n={header:{origin:this.clientName,type:"unsubscribe",subscribeID:e.subscribeID,topic:e.topic}};this.sendToRouterService(n)}else pe.system.warn(`RouterClient.unsubscribe: Could not find subscribeID for topic ${e.topic}`)}trustedMessage(e){var t;return pe.system.debug("RouterClient.trustedMessage header",e.header),null===(t=e.header.originMetadata)||void 0===t?void 0:t.transportInfo.transportID.includes("SharedWorker")}disconnectAll(){pe.system.info("RouterClient.disconnectAll"),Object.keys(this.mapListeners).forEach((e=>{Array.from(new Set(this.mapListeners[e])).forEach((t=>{this.removeListener(e,t)}))})),Object.keys(this.mapQueryResponders).forEach((e=>{this.removeResponder(e)})),Object.keys(this.mapPubSubResponders).forEach((e=>{this.removePubSubResponder(e)})),Object.keys(this.mapSubscribersID).forEach((e=>{const t=this.mapSubscribersTopic[e];this.unsubscribe({topic:t,subscribeID:e})}))}}const L={start:e=>{const t=y("RouterClient",M);return pe.setRouterClient(t),t.start(e)},stop:()=>{y("RouterClient",M).stop()},calibrateTimeWithRouterService(e){y("RouterClient",M).calibrateTimeWithRouterService(e)}},P={onReady:e=>(pe.system.deprecated("You no longer need to call RouterClient.onReady()"),y("RouterClient",M).onReady(e)),onFailure:e=>y("RouterClient",M).onFailure(e),addListener:(e,t)=>y("RouterClient",M).addListener(e,t),transmit:(e,t,n)=>{y("RouterClient",M).transmit(e,t,n)},removeListener:(e,t)=>{y("RouterClient",M).removeListener(e,t)},addResponder:(e,t)=>{y("RouterClient",M).addResponder(e,t)},query:(e,t,n,r)=>y("RouterClient",M).query(e,t,n,r),removeResponder:e=>{y("RouterClient",M).removeResponder(e)},addPubSubResponder:(e,t,n,r)=>{y("RouterClient",M).addPubSubResponder(e,t,n,r)},removePubSubResponder:e=>{y("RouterClient",M).removePubSubResponder(e)},subscribe:(e,t)=>y("RouterClient",M).subscribe(e,t),publish:(e,t)=>{y("RouterClient",M).publish(e,t)},unsubscribe:e=>{y("RouterClient",M).unsubscribe(e)},trustedMessage:e=>y("RouterClient",M).trustedMessage(e),disconnectAll:()=>{y("RouterClient",M).disconnectAll()},calibrateTimeWithRouterService:e=>{y("RouterClient",M).calibrateTimeWithRouterService(e)}},N=P;class W{static createNew(e,t){fin.desktop.Window.createNew(e,t)}static getCurrent(){return fin.desktop.Window.getCurrent()}static wrap(e){return fin.desktop.Window.wrap(e)}}class k{static createNew(e,t){t("Cannot create freestanding windows")}static getCurrent(){const{windowName:e}=g.getInstance().getStartupData();return{name:e,uuid:`${e}-uuid`,getOptions:e=>{null==e||e({})},addEventListener:()=>{},removeEventListener:()=>{},updateOptions:()=>{},close:()=>{},startMovingWindow:()=>{},stopMovingWindow:()=>{},isShowing:()=>{},bringToFront:()=>{},show:()=>{},hide:()=>{},setTaskbarIcon:()=>{}}}static wrap(){return this.getCurrent()}}class D{constructor(){return new fin.desktop.System.Clipboard}static writeText(e,t,n,r){return fe.deprecated("FSBL.System.Clipboard.writeText is deprecated"),fin.desktop.System.Clipboard.writeText(e,t,n,r)}static writeHTML(e,t,n,r){return fe.deprecated("FSBL.System.Clipboard.writeHTML is deprecated"),fin.desktop.System.Clipboard.writeHTML(e,t,n,r)}static writeRTF(e,t,n,r){return fe.deprecated("FSBL.System.Clipboard.writeRTF is deprecated"),fin.desktop.System.Clipboard.writeRTF(e,t,n,r)}static readText(e,t,n){return fe.deprecated("FSBL.System.Clipboard.readText is deprecated"),fin.desktop.System.Clipboard.readText(e,t,n)}static readHTML(e,t,n){return fe.deprecated("FSBL.System.Clipboard.readHTML is deprecated"),fin.desktop.System.Clipboard.readHTML(e,t,n)}static readRTF(e,t,n){return fe.deprecated("FSBL.System.Clipboard.readRTF is deprecated"),fin.desktop.System.Clipboard.readRTF(e,t,n)}}class x{static get Application(){return{getCurrent:()=>(fe.deprecated("FSBL.System.Application is deprecated"),{restart:()=>{P.transmit("Application.restart",{})},getWindow:()=>fin.desktop.Window,addEventListener:(e,t,n,r)=>{fin.desktop.Window.addEventListener(e,t,n,r)},close:(e,t,n)=>{fin.desktop.Window.close(e,t,n)},getChildWindows:(e,t)=>{null==e||e([fin.desktop.Window])},getGroups:(e,t)=>{null==e||e([])},getManifest:(e,t)=>{x.getManifest(e)},getParentUuid:(e,t)=>{null==e||e("Finsemble")},getInfo:(e,t)=>{x.getVersion(e)},getTrayIconInfo:(e,t)=>{null==e||e({})},isRunning:(e,t)=>{null==e||e(!0)},registerUser:(e,t,n,r)=>{null==n||n()},removeEventListener:(e,t,n,r)=>{fin.desktop.Window.removeEventListener(e,t,n,r)},removeTrayIcon:(e,t)=>{fin.desktop.Window.removeTrayIcon(e,t)},run:(e,t)=>{},scheduleRestart:(e,t)=>{null==e||e()},setTrayIcon:(e,t,n,r)=>{fin.desktop.Window.setTrayIcon(e,t,n,r)},terminate:(e,t)=>{x.terminate()},wait:(e,t)=>{null==e||e()},window:{name:fin.desktop.Window.name},uuid:"Finsemble"})}}static isFreestanding(){return"undefined"==typeof fin}static get Window(){return x.isFreestanding()?k:W}static get Notification(){return{send:e=>{fin.desktop.Notification.send(e)}}}static get Clipboard(){return D}static getManifest(e){return new Promise((t=>{fin.desktop.System.getManifest((n=>{null==e||e(n),t(n)}))}))}static async getMousePosition(e){return new Promise(((t,n)=>{fin.desktop.System.getMousePosition((n=>{(n.left||0===n.left)&&(n.x=n.left),(n.top||0===n.top)&&(n.y=n.top),null==e||e(null,n),t(n)}),(t=>{null==e||e(t),n(t)}))}))}static async deleteAssets(e){return await fin.desktop.System.deleteAssets(e)}static getSDServerInfo(e=Function.prototype){return new Promise((t=>{fin.desktop.System.getSDServerInfo((n=>{t(n),e(n)}))}))}static getMonitorInfo(e){return new Promise((t=>{fin.desktop.System.getMonitorInfo((n=>{t(n),e&&e(n)}))}))}static isBrowserView(){return!x.isFreestanding()&&fin.isBrowserView()}static getViewId(){return fe.deprecated("FSBL.system.getViewId() is deprecated. Use FSBL.system.getWebContentsId()"),fin.getWebContentsId()}static getWebContentsId(){return fin.getWebContentsId()}static hasBrowserView(){return fe.deprecated("FSBL.system.hasBrowserView() is deprecated. Use FSBL.system.isTitlebarWindow()"),x.isTitlebarWindow()}static isTitlebarWindow(){return!x.isFreestanding()&&fin.isTitlebarWindow()}static get fin(){return fin||{}}static ready(e){return new Promise((t=>{fin.desktop.main((()=>{e&&e(),t()}))}))}static setTrayIcon(e,t){fin.desktop.System.setTrayIcon(e,t)}static getHostSpecs(e=Function.prototype){return new Promise((t=>{fin.desktop.System.getHostSpecs((n=>{t(n),e(n)}))}))}static get InterApplicationBus(){return fin.desktop.InterApplicationBus}static get launchExternalProcess(){return fin.desktop.System.launchExternalProcess}static get terminateExternalProcess(){return fin.desktop.System.terminateExternalProcess}static get exit(){return fin.desktop.System.exit}static async clearCache(e){return fin.desktop.System.clearCache(e)}static get showDeveloperTools(){return fin.desktop.System.showDeveloperTools}static get addEventListener(){return x.isFreestanding()?window.addEventListener:fin.desktop.System.addEventListener}static get addSelectClientCertificateListener(){return fin.desktop.System.addSelectClientCertificateListener}static get addCertificateErrorListener(){return fin.desktop.System.addCertificateErrorListener}static getFEAInfo(e){return new Promise((t=>{fin.desktop.System.getFEAInfo((n=>{null==e||e(n),t(n)}))}))}static get getVersion(){return fin.desktop.System.getVersion}static get getUpdateAvailable(){return fin.desktop.System.getUpdateAvailable}static get openUrlWithBrowser(){return fin.desktop.System.openUrlWithBrowser}static get getProcessList(){return fin.desktop.System.getProcessList}static get getProtocolString(){return fin.desktop.System.getProtocolString}static get hideSplashScreen(){return fin.desktop.System.hideSplashScreen}static notifyLoggerReady(){fin.desktop.System.notifyLoggerReady()}static updateCentralLoggerState(e){fin.desktop.System.updateCentralLoggerState(e)}static startupApplicationHandshake(){fin.desktop.System.startupApplicationHandshake&&fin.desktop.System.startupApplicationHandshake()}static terminate(){fin.desktop.System.terminate()}static restart(){fin.desktop.System.restart()}static getEnvironmentVariable(e,t){return new Promise((n=>{fin.desktop.System.getEnvironmentVariable(e,(e=>{null==t||t(e),n(e)}))}))}}var F=n(2543),B=n.n(F);const q=e=>{if(0===e.length)return"";let t=e[0].replace(".","$DOT$");if(1===e.length)return t;for(let n=1;n<e.length;n++)t=`${t}.${e[n].replace(".","$DOT$")}`;return t};class U{constructor(){this.listeners={},this.subs={}}}let $=!1;const J=async()=>{$||(await A.waitForStartup("configService"),$=!0)},H=()=>y("ConfigClient",U),V="Invalid path - MUST be a path array. e.g. for myObject.property use ['myObj', 'property']",z=(e,t)=>{var n;(null!==(n=H().listeners[e])&&void 0!==n?n:[]).forEach((n=>{ye.system.debug("ConfigClient.triggerListeners",e,t),n(null,{field:e,value:t})}))},G=(e,t)=>{if(e)ye.system.error("ConfigClient handleChanges() error",e);else{t.data.field||(t.data.field=null);const{field:e,storeData:n,value:r}=t.data;z(e||"configService",n||r)}},Y=async e=>{const t=H();if(t.subs||(t.subs={}),!t.subs[e]){t.subs[e]=!0,J();const{err:n}=await P.query("configService.addListener",e);n&&ye.system.error("Error adding listener to config service",n),await P.subscribe(e,G)}},Q=async(e,t)=>{if(ye.system.deprecated("FSBL.Clients.ConfigClient.getValue is deprecated. Use FSBL.Clients.ConfigClient.get() instead."),"string"==typeof e&&(e={field:e}),!e.field){const e="no field provided";return null==t||t(e),{err:e}}J();const{err:n,response:r}=await P.query("configService.getValue",{field:e.field});return null==t||t(n,r.data),{err:n,data:r.data}},K=async(e,t,n)=>{var r;const i=H();let s=null;"function"==typeof e&&(t=e,e={field:null}),Array.isArray(e)?s=q(e):({field:s}=e);const o="configService"+(s?`.${s}`:"");i.listeners[o]=[t].concat(null!==(r=i.listeners[o])&&void 0!==r?r:[]),Y(o),null==n||n()},Z=(e,t,n)=>{const r=H();let i=null;"function"==typeof e&&(n=t,t=e,e={field:i}),Array.isArray(e)?i=q(e):({field:i}=e);const s="configService"+(i?`.${i}`:"");if(r.listeners[s])for(let e=0;e<r.listeners[s].length;e++)if(r.listeners[s][e]===t)return r.listeners[s].splice(e,1),void(null==n||n(null,!0));null==n||n(null,!1)},X={initialize(){ye.deprecated("There is no need to call ConfigClient.initialize() anymore.")},onReady:e=>{ye.system.deprecated("It is no longer necessary to call ConfigClient.onReady()"),null==e||e()},triggerListeners(e,t){ye.deprecated("Calling ConfigClient.triggerListeners() directly is not legal."),z(e,t)},handleChanges(e,t){ye.deprecated("It is illegal to call ConfigClient.handleChanges() directly."),G(e,t)},async changeSub(e){ye.deprecated("Calling ConfigClient.changeSub() directly is not legal."),Y(e)},addListener:K,addListeners:(e,t,n)=>{var r;const i=H();if(!Array.isArray(e))return ye.deprecated("configClient - addListeners() with an object instead of an array is deprecated. Please use addListener() instead."),K(e,t,n);const s="function"==typeof t?t:null;for(let t=0;t<e.length;t++){const n=e[t];let o="";"string"==typeof n?o=n:"object"==typeof n&&Array.isArray(n.field)?o=q(n.field):"object"==typeof n&&"string"==typeof n.field&&(o=n.field);const a="string"!=typeof n?n.listener:s;if(a){const e="configService"+(o?`.${o}`:"");i.listeners[e]=[a].concat(null!==(r=i.listeners[e])&&void 0!==r?r:[]),Y(e)}}null==n||n()},getManifest:async e=>{J();const{err:t,response:n}=await P.query("configService.getValues",{fields:null});return null==e||e(t,n.data),{err:t,data:n.data}},getPreferences:async e=>{await A.waitForBootStage("authentication","stageCompleted");const{err:t,response:n}=await P.query("PreferencesService.getPreferences",{});return ye.system.debug("PreferencesService.getPreferences response",n),null==e||e(t,n.data),{err:t,data:n.data}},getValue:Q,getValues:async(e,t)=>{if(ye.system.deprecated("FSBL.Clients.ConfigClient.getValues is deprecated. Use FSBL.Clients.ConfigClient.getMultiple() instead."),"function"==typeof e&&(t=e,e=null),e&&!Array.isArray(e))return Q(e,t);J();const{err:n,response:r}=await P.query("configService.getValues",{fields:e});return null==t||t(n,r.data),{err:n,data:r.data}},processAndSet:async(e,t)=>{if(ye.system.debug("ConfigClient.processAndSet",e),!e.overwrite&&e.replace){const e="cannot use replace option unless overwrite is also true";return ye.system.warn("ConfigClient.processAndSet:",e),null==t||t(e),{err:e}}{J();const{err:n,response:r}=await P.query("configService.processAndSet",e);return null==t||t(n,r),{err:n,data:r.data}}},removeListener:Z,removeListeners:(e,t,n)=>{const r=H();if(!Array.isArray(e))return"function"==typeof e?Z({},e,n):e.field&&t&&Z(e,t,n),null==n?void 0:n(null,!0);const i="function"==typeof t?t:null;e.forEach((e=>{let t="";"string"==typeof e?t=e:"object"==typeof e&&Array.isArray(e.field)?t=q(e.field):"object"==typeof e&&"string"==typeof e.field&&(t=e.field);const n="string"!=typeof e?e.listener:i,s="configService"+(t?`.${t}`:"");r.listeners[s]=r.listeners[s].filter((e=>e!==n))})),null==n||n(null,!0)},removeValue:async(e,t)=>{if(ye.system.deprecated("FSBL.Clients.ConfigClient.removeValue is deprecated. Use FSBL.Clients.ConfigClient.remove() instead."),"string"==typeof e&&(e={field:e}),!(null==e?void 0:e.field)){const e="No field provided";return null==t||t(e),{err:e}}J();const{err:n}=await P.query("configService.removeValue",e);return null==t||t(n),{err:n}},removeValues:async(e,t)=>{if(ye.system.deprecated("FSBL.Clients.ConfigClient.removeValues is deprecated. Use FSBL.Clients.ConfigClient.removeMultiple() instead."),!e){const e="ConfigClient.removeValues. No params given";return ye.system.error(e),null==t||t(e),{err:e}}if(!Array.isArray(e)){const e="ConfigClient.removeValues. Params must be an array";return ye.system.error(e),null==t||t(e),{err:e}}J();const{err:n}=await P.query("configService.removeValues",e);return null==t||t(n),{err:n}},setPreference:async(e,t)=>{const{err:n,response:r}=await P.query("PreferencesService.setPreference",e);return null==t||t(n,r.data),{err:n,data:r.data}},setValue:async(e,t)=>{ye.system.deprecated("FSBL.Clients.ConfigClient.setValue is deprecated. Use FSBL.Clients.ConfigClient.set() instead.");const n={field:e.field,value:e.value};J();const{err:r}=await P.query("configService.setValue",n);return null==t||t(r),{err:r}},setValues:async(e,t)=>{if(ye.system.deprecated("FSBL.Clients.ConfigClient.setValues is deprecated. Use FSBL.Clients.ConfigClient.setValues() instead."),!e){const e="ConfigClient.SetValues. No params given";return ye.system.error(e),null==t||t(e),{err:e}}if(!Array.isArray(e)){const e="ConfigClient.SetValues. Params must be an array";return ye.system.error(e),null==t||t(e),{err:e}}J();const{err:n}=await P.query("configService.setValues",e);return null==t||t(n),{err:n}},unsetPreference:async(e,t)=>{ye.system.debug("ConfigClient.unsetPreference",e);const{err:n,response:r}=await P.query("PreferencesService.unsetPreference",e);return null==t||t(n,r.data),{err:n,data:r.data}},get:async(e,t)=>{if(null!==e&&!Array.isArray(e))return null==t||t(V),{err:V};J();const{err:n,response:r}=await P.query("configService.getValue",e);return null==t||t(n,r.data),{err:n,data:r.data}},getMultiple:async(e,t)=>{if(!Array.isArray(e))return null==t||t(V),{err:V};await A.waitForStartup("configService");const{err:n,response:r}=await P.query("configService.getValues",{fields:e.length?e:null});return null==t||t(n,r.data),{err:n,data:r.data}},set:async(e,t,n)=>{if(!Array.isArray(e))return null==n||n(V),{err:V};J();const r={field:e,value:t},{err:i,response:s}=await P.query("configService.setValue",r);return null==n||n(i,s.data),{err:i,data:s.data}},setMultiple:async(e,t)=>{if(!Array.isArray(e))return null==t||t(V),{err:V};await A.waitForStartup("configService");const{err:n,response:r}=await P.query("configService.setValues",e);return null==t||t(n,r.data),{err:n,data:r.data}},remove:async(e,t)=>{if(!Array.isArray(e))return null==t||t(V),{err:V};J();const{err:n,response:r}=await P.query("configService.removeValue",e);return null==t||t(n,r.data),{err:n,data:r.data}},removeMultiple:async(e,t)=>{if(!Array.isArray(e))return null==t||t(V),{err:V};await A.waitForStartup("configService");const{err:n,response:r}=await P.query("configService.removeValues",e);return null==t||t(n,r.data),{err:n,data:r.data}}},ee=X;var te=n(7350),ne=n.n(te);const re={Error:!0,Warn:!0,Info:!0,Log:!0,Debug:!0,Verbose:!1,LocalOnly:!1};let ie=5e3;const se=`NOTE: LOG ARG STRIPPED since greater than ${ie/1e3}KB. Check origin's local Console to see output of the complete object.`,oe={console:{Error:!0,Warn:!0,Info:!0,Log:!0,Debug:!0,Verbose:!0,LocalOnly:!1},dev:re,system:re,perf:re},ae=()=>{const{stack:e}=function(){try{throw Error("")}catch(e){return e}}();let t=6;e.includes("console.error")&&t++;const n=(r=t,e.split("\n",r).join("\n").length);var r;return`Log Stack: \n${e.substring(n).substr(1)}`},ue=e=>{const t=ie+1,n=[],r=[e];let i=0,s=0;for(;r.length&&s<=t;){s++;const e=r.pop();if("boolean"==typeof e)i+=4;else if("string"==typeof e)i+=2*e.length;else if("number"==typeof e)i+=8;else if("object"==typeof e&&-1===n.indexOf(e)){n.push(e);for(const t in e)r.push(e[t])}}return i},le=(e,t,n=0,r=1)=>{const i=ie/1.5,s=t/2,o=s/2,a="*STRIPPED*",u=e=>{let t=ue(e);e.length>0&&t>o&&(e[0]=le(e[0],s,n,r+1),e[1]=`${a} from size ${e.length}`,e.length=2)};let l=(0,F.cloneDeep)(e);if("object"!=typeof l)l=a,n+=ue(l);else if(Array.isArray(l))u(l),n+=ue(l);else{let e=Object.getOwnPropertyNames(l);for(let d=0;d<e.length;d++){let c=ue(l[e[d]]);n>s&&c>100&&r>=3&&d>=1||n>i&&c>=10?l[e[d]]=a:c>o&&(Array.isArray(l[e[d]])?u(l[e[d]]):l[e[d]]=le(l[e[d]],t/1.2,n,r+1)),n+=ue(l[e[d]])}}return l};class de{constructor(){this.routerClient=null,this.viewId=null,this.isRegistering=!1,this.isRegistered=!1,this.calibratedTimeStampOffset=0,this.newCalibratedTimeStampOffset=0,this.filteredMessagesCounter=0,this.startupTime=0,this.loggerQueue=[],this.loggerClientName=x.Window.getCurrent().name,this.onLogStateChangeCallback=[],this.currentLogState=oe,this.skipLargeObjects=!0,this.setRouterClient=e=>{this.routerClient=e},this.system={error:(...e)=>{this.logIt("system","Error",e)},warn:(...e)=>{this.logIt("system","Warn",e)},info:(...e)=>{this.logIt("system","Info",e)},log:(...e)=>{this.logIt("system","Log",e)},debug:(...e)=>{this.logIt("system","Debug",e)},verbose:(...e)=>{this.logIt("system","Verbose",e)},deprecated:(...e)=>{this.logIt("system","Error",e)}},this.perf={error:(...e)=>{this.logIt("perf","Error",e)},warn:(...e)=>{this.logIt("perf","Warn",e)},info:(...e)=>{this.logIt("perf","Info",e)},log:(...e)=>{this.logIt("perf","Log",e)},debug:(...e)=>{this.logIt("perf","Debug",e)},verbose:(...e)=>{this.logIt("perf","Verbose",e)},deprecated:(...e)=>{this.logIt("perf","Error",e)}},this.console={error:(...e)=>{this.logIt("console","Error",e)},warn:(...e)=>{this.logIt("console","Warn",e)},info:(...e)=>{this.logIt("console","Info",e)},log:(...e)=>{this.logIt("console","Log",e)},debug:(...e)=>{this.logIt("console","Debug",e)},verbose:(...e)=>{this.logIt("console","Verbose",e)},deprecated:(...e)=>{this.logIt("console","Error",e)}};const e="routerService"===this.loggerClientName?100:125;this.transmitAndClearQueue=ne()((()=>{var e;this.loggerQueue.length>0&&(null===(e=this.routerClient)||void 0===e||e.transmit("logger.service.logMessages",this.loggerQueue),this.loggerQueue=[])}),e,{leading:!1})}updateQueueBasedOnState(e){const{loggerQueue:t,currentLogState:n,calibratedTimeStampOffset:r}=this;this.system.debug("Logger updateQueueBasedOnState",e,r,"QUEUE LENGTH",t.length,n),this.loggerQueue=t.flatMap((t=>{if(n[t.category][t.logType]){if(!n[t.category].LocalOnly)return e&&(t.logTimestamp=t.logTimestamp+r),[t];globalThis.console.log(t.category,t.logType,t.logTimestamp-O.timing.navigationStart,t.logData,"(Previously queued!)")}return[]}))}onStateChanged(e){-1===this.onLogStateChangeCallback.indexOf(e)&&this.onLogStateChangeCallback.push(e)}setLogState(e,t){e&&e.dev&&(this.currentLogState=e,this.onLogStateChangeCallback.forEach((t=>{t(e)}))),this.updateQueueBasedOnState(t)}addToQueue(e){const{loggerQueue:t}=this;if(t.length<2e4)t.push(e);else{globalThis.console.error("Logging Queue Overflowed! Dumping queue here then continuing",t.length);let e,n=0;for(;e=t.shift();)globalThis.console.log("Message "+n++,e);this.system.error("Logging Queue Overflowed! Dumping queue in client then continuing.")}}callStack(){return ae()}setting(){return this.currentLogState}outputToConsole(e,t){var n;const r={Debug:globalThis.console.debug,Info:globalThis.console.info,Warn:globalThis.console.warn,Error:null!==(n=globalThis.console.unwrappedError)&&void 0!==n?n:globalThis.console.error,Log:globalThis.console.log,Verbose:globalThis.console.log};try{r[e](...t)}catch(e){r.Warn("Error outputting log to console",e,ae())}}formatAndQueueMessage(e,t,n){var r;const i="forceObjectsToLogger"===n[0],s=n.flatMap((e=>{const t=ue(e);if(!i&&t>ie){if(this.outputToConsole("Warn",[`Message too large to send to the logger. Max message size:${ie/1e3}KB`,`Approx message size: ${t/1e3}KB`,...n]),this.skipLargeObjects)return[`Log argument greater than ${ie/1e3}KB. Check local Console to see output of the object.`];{const n=le(e,ie),r=ue(n);return r>ie?[`LOG ARG STRIPPED but not logged here still greater than ${ie/1e3}KB. Check local Console to see output of the object. (Tag:Logging-Drop)`]:[se,`OldSize=${t} (Tag:Logging-Strip) NewSize=${r}`,n]}}return e instanceof Error?[e.toString()]:"forceObjectsToLogger"===e?[]:[e]}));let o=null;try{o=JSON.stringify(s)}catch(e){o=`*** Logger error can't JSON.stringify: ${ae()}`}("Error"===t||"Warn"===t||"console"===e)&&!l.runningInFSBLUnitTest&&this.outputToConsole(t,n);const a=null!==(r=this.viewId)&&void 0!==r?r:x.isBrowserView()&&x.getWebContentsId(),u={category:"console"===e?"system":e,logType:t,logClientName:a?`${this.loggerClientName}: view-${a}`:this.loggerClientName,logData:o,logTimestamp:O.timing.navigationStart+O.now()+this.calibratedTimeStampOffset};a&&(u.viewId=a),this.addToQueue(u),this.isRegistered&&this.transmitAndClearQueue()}logIt(e,t,n){var r;if(globalThis.glue42gd)globalThis.FSBL&&(null===(r=globalThis.FSBL.Clients.Logger)||void 0===r||r[t.toLowerCase()](...n));else if(this.currentLogState[e][t])if("Warn"!==t&&"Error"!==t||n.push(ae()),this.currentLogState[e].LocalOnly){const r=t.toLowerCase();n.unshift(`${e} ${r} (${O.now()}):`),this.outputToConsole(t,n)}else this.formatAndQueueMessage(e,t,n)}error(...e){this.logIt("dev","Error",e)}warn(...e){this.logIt("dev","Warn",e)}info(...e){this.logIt("dev","Info",e)}log(...e){this.logIt("dev","Log",e)}debug(...e){this.logIt("dev","Debug",e)}verbose(...e){this.logIt("dev","Verbose",e)}deprecated(...e){this.logIt("dev","Error",e)}completeRegistration(e){ee.get(["finsemble","servicesConfig","logger"],((e,t)=>{var n,r;e||(this.skipLargeObjects=null!==(n=null==t?void 0:t.skipLargeObjects)&&void 0!==n?n:this.skipLargeObjects,ie=null!==(r=null==t?void 0:t.maxLogMessageSize)&&void 0!==r?r:ie)})),this.loggerQueue.forEach((e=>{this.viewId&&(e.viewId=this.viewId)})),this.isRegistered=!0,e?"routerService"!==this.loggerClientName?(this.calibratedTimeStampOffset=this.newCalibratedTimeStampOffset,this.setLogState(e,!0)):this.setLogState(e,!1):globalThis.console.error("Logger.startLogger() Initial state not received from logger service"),this.formatAndQueueMessage("system","Debug",["Logger Registered"]),this.transmitAndClearQueue()}registerWithLoggerService(){var e;const{windowName:t,webContentsName:n}=g.getInstance().getStartupData();this.loggerClientName="undefined"!=typeof window&&window.top!==window?`${t}.Frame`:t;const r=`finsemble.logger.client.${this.loggerClientName}`;!this.viewId&&x.isBrowserView()&&(this.viewId=x.getWebContentsId()),this.system.debug("logger.service.registering",this.loggerClientName),x.Window.getCurrent().getOptions((async e=>{var i,s;const o=null===(s=null===(i=null==e?void 0:e.customData)||void 0===i?void 0:i.component)||void 0===s?void 0:s.centralLoggerNamePrefix;if(!this.routerClient)return;const{err:a,response:u}=await this.routerClient.query("logger.service.register",{clientName:this.loggerClientName,clientChannel:r,displayName:null!=n?n:t,windowName:t,viewId:this.viewId,centralLoggerNamePrefix:o});a?(globalThis.console.warn("Logger service not available. Trying to connect again in 750ms.",a),setTimeout((()=>{this.registerWithLoggerService()}),750)):this.completeRegistration(u.data)})),null===(e=this.routerClient)||void 0===e||e.addListener(r,((e,t)=>{this.system.debug("logger.client.setLogState",t.data),this.setLogState(t.data,!1)}))}unregisterClient(e,t){var n;this.system.debug("logger.service.unregister",this.loggerClientName,e,this.viewId),this.transmitAndClearQueue();const r=e||{clientName:this.loggerClientName,viewId:this.viewId};null===(n=this.routerClient)||void 0===n||n.query("logger.service.unregister",r,t)}async waitForServiceAndCalibrate(){var e;await A.waitForStartup("loggerService"),this.system.debug("Logger onReady",this.loggerClientName),null===(e=this.routerClient)||void 0===e||e.calibrateTimeWithRouterService((e=>{this.newCalibratedTimeStampOffset=e,this.isRegistering||(this.isRegistering=!0,this.startupTime=performance.now()-this.startupTime,this.registerWithLoggerService())}))}async start(e){this.routerClient=null!=e?e:N,this.startupTime=performance.now(),await this.waitForServiceAndCalibrate(),x.isBrowserView()&&l.addEventListener&&l.addEventListener("beforeunload",(()=>{this.unregisterClient()}))}}const ce={error:(...e)=>y("LoggerClient",de).error(...e),warn:(...e)=>y("LoggerClient",de).warn(...e),info:(...e)=>y("LoggerClient",de).info(...e),log:(...e)=>y("LoggerClient",de).log(...e),debug:(...e)=>y("LoggerClient",de).debug(...e),verbose:(...e)=>y("LoggerClient",de).verbose(...e),deprecated:(...e)=>y("LoggerClient",de).deprecated(...e),start:e=>{y("LoggerClient",de).start(e)},channelFilter:e=>(e=>"logger.service.logMessages"===e||"Finsemble.heartbeat"===e)(e),setting:()=>y("LoggerClient",de).setting(),callStack:()=>y("LoggerClient",de).callStack(),unregisterClient:(e,t)=>{y("LoggerClient",de).unregisterClient(e,t)},setRouterClient:e=>{y("LoggerClient",de).setRouterClient(e)},onStateChanged(e){y("LoggerClient",de).onStateChanged(e)},system:{error:(...e)=>y("LoggerClient",de).system.error(...e),warn:(...e)=>y("LoggerClient",de).system.warn(...e),info:(...e)=>y("LoggerClient",de).system.info(...e),log:(...e)=>y("LoggerClient",de).system.log(...e),debug:(...e)=>y("LoggerClient",de).system.debug(...e),verbose:(...e)=>y("LoggerClient",de).system.verbose(...e),deprecated:(...e)=>y("LoggerClient",de).system.deprecated(...e)},perf:{error:(...e)=>y("LoggerClient",de).perf.error(...e),warn:(...e)=>y("LoggerClient",de).perf.warn(...e),info:(...e)=>y("LoggerClient",de).perf.info(...e),log:(...e)=>y("LoggerClient",de).perf.log(...e),debug:(...e)=>y("LoggerClient",de).perf.debug(...e),verbose:(...e)=>y("LoggerClient",de).perf.verbose(...e),deprecated:(...e)=>y("LoggerClient",de).perf.deprecated(...e)},console:{error:(...e)=>y("LoggerClient",de).console.error(...e),warn:(...e)=>y("LoggerClient",de).console.warn(...e),info:(...e)=>y("LoggerClient",de).console.info(...e),log:(...e)=>y("LoggerClient",de).console.log(...e),debug:(...e)=>y("LoggerClient",de).console.debug(...e),verbose:(...e)=>y("LoggerClient",de).console.verbose(...e),deprecated:(...e)=>y("LoggerClient",de).console.deprecated(...e)}},pe=(globalThis.console.warn,globalThis.console.info,globalThis.console.log,globalThis.console.debug,globalThis.console.error,globalThis.console.debug,globalThis.console.error,globalThis.console.warn,globalThis.console.info,globalThis.console.log,globalThis.console.debug,globalThis.console.error,globalThis.console.debug,globalThis.console.error,globalThis.console.warn,globalThis.console.info,globalThis.console.log,globalThis.console.debug,globalThis.console.error,globalThis.console.debug,globalThis.console.error,globalThis.console.warn,globalThis.console.info,globalThis.console.log,globalThis.console.debug,globalThis.console.error,globalThis.console.debug,globalThis.console.error,ce),fe=pe,ye=pe;var he="function"==typeof queueMicrotask&&queueMicrotask,ge="function"==typeof setImmediate&&setImmediate,me="object"==typeof process&&"function"==typeof process.nextTick;function ve(e){setTimeout(e,0)}function we(e){return(t,...n)=>e((()=>t(...n)))}var be=we(he?queueMicrotask:ge?setImmediate:me?process.nextTick:ve);function je(e){return Ae(e)?function(...t){const n=t.pop();return Se(e.apply(this,t),n)}:(t=function(t,n){var r;try{r=e.apply(this,t)}catch(e){return n(e)}if(r&&"function"==typeof r.then)return Se(r,n);n(null,r)},function(...e){var n=e.pop();return t.call(this,e,n)});var t}function Se(e,t){return e.then((e=>{Ce(t,null,e)}),(e=>{Ce(t,e&&(e instanceof Error||e.message)?e:new Error(e))}))}function Ce(e,t,n){try{e(t,n)}catch(e){be((e=>{throw e}),e)}}function Ae(e){return"AsyncFunction"===e[Symbol.toStringTag]}function Re(e){if("function"!=typeof e)throw new Error("expected a function");return Ae(e)?je(e):e}function Ie(e,t){if(t||(t=e.length),!t)throw new Error("arity is undefined");return function(...n){return"function"==typeof n[t-1]?e.apply(this,n):new Promise(((r,i)=>{n[t-1]=(e,...t)=>{if(e)return i(e);r(t.length>1?t:t[0])},e.apply(this,n)}))}}function Te(e){return function(t,...n){return Ie((function(r){var i=this;return e(t,((e,t)=>{Re(e).apply(i,n.concat(t))}),r)}))}}function Ee(e,t,n,r){t=t||[];var i=[],s=0,o=Re(n);return e(t,((e,t,n)=>{var r=s++;o(e,((e,t)=>{i[r]=t,n(e)}))}),(e=>{r(e,i)}))}function Oe(e){return e&&"number"==typeof e.length&&e.length>=0&&e.length%1==0}const _e={};function Me(e){function t(...t){if(null!==e){var n=e;e=null,n.apply(this,t)}}return Object.assign(t,e),t}function Le(e){return function(...t){if(null===e)throw new Error("Callback was already called.");var n=e;e=null,n.apply(this,t)}}function Pe(e,t,n,r){let i=!1,s=!1,o=!1,a=0,u=0;function l(){a>=t||o||i||(o=!0,e.next().then((({value:e,done:t})=>{if(!s&&!i){if(o=!1,t)return i=!0,void(a<=0&&r(null));a++,n(e,u,d),u++,l()}})).catch(c))}function d(e,t){if(a-=1,!s)return e?c(e):!1===e?(i=!0,void(s=!0)):t===_e||i&&a<=0?(i=!0,r(null)):void l()}function c(e){s||(o=!1,i=!0,r(e))}l()}var Ne=e=>(t,n,r)=>{if(r=Me(r),e<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!t)return r(null);if("AsyncGenerator"===t[Symbol.toStringTag])return Pe(t,e,n,r);if(function(e){return"function"==typeof e[Symbol.asyncIterator]}(t))return Pe(t[Symbol.asyncIterator](),e,n,r);var i=function(e){if(Oe(e))return function(e){var t=-1,n=e.length;return function(){return++t<n?{value:e[t],key:t}:null}}(e);var t=function(e){return e[Symbol.iterator]&&e[Symbol.iterator]()}(e);return t?function(e){var t=-1;return function(){var n=e.next();return n.done?null:(t++,{value:n.value,key:t})}}(t):function(e){var t=e?Object.keys(e):[],n=-1,r=t.length;return function i(){var s=t[++n];return"__proto__"===s?i():n<r?{value:e[s],key:s}:null}}(e)}(t),s=!1,o=!1,a=0,u=!1;function l(e,t){if(!o)if(a-=1,e)s=!0,r(e);else if(!1===e)s=!0,o=!0;else{if(t===_e||s&&a<=0)return s=!0,r(null);u||d()}}function d(){for(u=!0;a<e&&!s;){var t=i();if(null===t)return s=!0,void(a<=0&&r(null));a+=1,n(t.value,t.key,Le(l))}u=!1}d()},We=Ie((function(e,t,n,r){return Ne(t)(e,Re(n),r)}),4);function ke(e,t,n){n=Me(n);var r=0,i=0,{length:s}=e,o=!1;function a(e,t){!1===e&&(o=!0),!0!==o&&(e?n(e):++i!==s&&t!==_e||n(null))}for(0===s&&n(null);r<s;r++)t(e[r],r,Le(a))}function De(e,t,n){return We(e,1/0,t,n)}var xe=Ie((function(e,t,n){return(Oe(e)?ke:De)(e,Re(t),n)}),3),Fe=Ie((function(e,t,n){return Ee(xe,e,t,n)}),3);Te(Fe);var Be=Ie((function(e,t,n){return We(e,1,t,n)}),3);Te(Ie((function(e,t,n){return Ee(Be,e,t,n)}),3)),Symbol("promiseCallback"),Symbol.iterator,Ie((function(e,t,n,r){r=Me(r);var i=Re(n);return Be(e,((e,n,r)=>{i(t,e,((e,n)=>{t=n,r(e)}))}),(e=>r(e,t)))}),4);var qe=Ie((function(e,t,n,r){return Ee(Ne(t),e,n,r)}),4),Ue=Ie((function(e,t,n,r){var i=Re(n);return qe(e,t,((e,t)=>{i(e,((e,...n)=>e?t(e):t(e,n)))}),((e,t)=>{for(var n=[],i=0;i<t.length;i++)t[i]&&(n=n.concat(...t[i]));return r(e,n)}))}),4);function $e(e,t){return(n,r,i,s)=>{var o,a=!1;const u=Re(i);n(r,((n,r,i)=>{u(n,((r,s)=>r||!1===r?i(r):e(s)&&!o?(a=!0,o=t(!0,n),i(null,_e)):void i()))}),(e=>{if(e)return s(e);s(null,a?o:t(!1))}))}}function Je(e){return(t,...n)=>Re(t)(...n,((t,...n)=>{"object"==typeof console&&(t?console.error&&console.error(t):console[e]&&n.forEach((t=>console[e](t))))}))}function He(e){return(t,n,r)=>e(t,r)}Ie((function(e,t,n){return Ue(e,1/0,t,n)}),3),Ie((function(e,t,n){return Ue(e,1,t,n)}),3),Ie((function(e,t,n){return $e((e=>e),((e,t)=>t))(xe,e,t,n)}),3),Ie((function(e,t,n,r){return $e((e=>e),((e,t)=>t))(Ne(t),e,n,r)}),4),Ie((function(e,t,n){return $e((e=>e),((e,t)=>t))(Ne(1),e,t,n)}),3),Je("dir"),Ie((function(e,t,n){n=Le(n);var r,i=Re(e),s=Re(t);function o(e,...t){if(e)return n(e);!1!==e&&(r=t,s(...t,a))}function a(e,t){return e?n(e):!1!==e?t?void i(o):n(null,...r):void 0}return a(null,!0)}),3);var Ve=Ie((function(e,t,n){return xe(e,He(Re(t)),n)}),3),ze=Ie((function(e,t,n,r){return Ne(t)(e,He(Re(n)),r)}),4),Ge=Ie((function(e,t,n){return ze(e,1,t,n)}),3);function Ye(e,t,n,r){var i=new Array(t.length);e(t,((e,t,r)=>{n(e,((e,n)=>{i[t]=!!n,r(e)}))}),(e=>{if(e)return r(e);for(var n=[],s=0;s<t.length;s++)i[s]&&n.push(t[s]);r(null,n)}))}function Qe(e,t,n,r){var i=[];e(t,((e,t,r)=>{n(e,((n,s)=>{if(n)return r(n);s&&i.push({index:t,value:e}),r(n)}))}),(e=>{if(e)return r(e);r(null,i.sort(((e,t)=>e.index-t.index)).map((e=>e.value)))}))}function Ke(e,t,n,r){return(Oe(t)?Ye:Qe)(e,t,Re(n),r)}Ie((function(e,t,n){return $e((e=>!e),(e=>!e))(xe,e,t,n)}),3),Ie((function(e,t,n,r){return $e((e=>!e),(e=>!e))(Ne(t),e,n,r)}),4),Ie((function(e,t,n){return $e((e=>!e),(e=>!e))(Be,e,t,n)}),3),Ie((function(e,t,n){return Ke(xe,e,t,n)}),3),Ie((function(e,t,n,r){return Ke(Ne(t),e,n,r)}),4),Ie((function(e,t,n){return Ke(Be,e,t,n)}),3),Ie((function(e,t){var n=Le(t),r=Re(function(e){return Ae(e)?e:function(...t){var n=t.pop(),r=!0;t.push(((...e)=>{r?be((()=>n(...e))):n(...e)})),e.apply(this,t),r=!1}}(e));return function e(t){if(t)return n(t);!1!==t&&r(e)}()}),2),Ie((function(e,t,n,r){var i=Re(n);return qe(e,t,((e,t)=>{i(e,((n,r)=>n?t(n):t(n,{key:r,val:e})))}),((e,t)=>{for(var n={},{hasOwnProperty:i}=Object.prototype,s=0;s<t.length;s++)if(t[s]){var{key:o}=t[s],{val:a}=t[s];i.call(n,o)?n[o].push(a):n[o]=[a]}return r(e,n)}))}),4),Je("log"),Ie((function(e,t,n,r){r=Me(r);var i={},s=Re(n);return Ne(t)(e,((e,t,n)=>{s(e,t,((e,r)=>{if(e)return n(e);i[t]=r,n(e)}))}),(e=>r(e,i)))}),4),we(me?process.nextTick:ge?setImmediate:ve);var Ze=Ie(((e,t,n)=>{var r=Oe(t)?[]:{};e(t,((e,t,n)=>{Re(e)(((e,...i)=>{i.length<2&&([i]=i),r[t]=i,n(e)}))}),(e=>n(e,r)))}),3);function Xe(e,t,n,r){const i=Re(n);return Ke(e,t,((e,t)=>{i(e,((e,n)=>{t(e,!n)}))}),r)}Symbol.iterator,Ie((function(e,t){if(t=Me(t),!Array.isArray(e))return t(new TypeError("First argument to race must be an array of functions"));if(!e.length)return t();for(var n=0,r=e.length;n<r;n++)Re(e[n])(t)}),2),Ie((function(e,t,n){return Xe(xe,e,t,n)}),3),Ie((function(e,t,n,r){return Xe(Ne(t),e,n,r)}),4),Ie((function(e,t,n){return Xe(Be,e,t,n)}),3),Ie((function(e,t,n){return $e(Boolean,(e=>e))(xe,e,t,n)}),3),Ie((function(e,t,n,r){return $e(Boolean,(e=>e))(Ne(t),e,n,r)}),4),Ie((function(e,t,n){return $e(Boolean,(e=>e))(Be,e,t,n)}),3),Ie((function(e,t,n){var r=Re(t);return Fe(e,((e,t)=>{r(e,((n,r)=>{if(n)return t(n);t(n,{value:e,criteria:r})}))}),((e,t)=>{if(e)return n(e);n(null,t.sort(i).map((e=>e.value)))}));function i(e,t){var n=e.criteria,r=t.criteria;return n<r?-1:n>r?1:0}}),3),Ie((function(e,t){var n,r=null;return Ge(e,((e,t)=>{Re(e)(((e,...i)=>{if(!1===e)return t(e);i.length<2?[n]=i:n=i,r=e,t(e?null:{})}))}),(()=>t(r,n)))})),Ie((function(e,t,n){n=Le(n);var r=Re(t),i=Re(e),s=[];function o(e,...t){if(e)return n(e);s=t,!1!==e&&i(a)}function a(e,t){return e?n(e):!1!==e?t?void r(o):n(null,...s):void 0}return i(a)}),3),Ie((function(e,t){if(t=Me(t),!Array.isArray(e))return t(new Error("First argument to waterfall must be an array of functions"));if(!e.length)return t();var n=0;function r(t){Re(e[n++])(...t,Le(i))}function i(i,...s){if(!1!==i)return i||n===e.length?t(i,...s):void r(s)}r([])}));var et=n(37007);const tt={EVENTS:["title-changed","bringToFront","setBounds","alwaysOnTop","setOpacity"]},nt="Finsemble.Application.State",rt="Finsemble.ServiceManager.serviceInitializing",it="Finsemble.ServiceManager.serviceReady",st="Finsemble.ServiceManager.serviceClosing",ot="Finsemble.ServiceManager.serviceClosed",at=e=>`Finsemble.ServiceManager.queryReady.${e}`,ut=e=>({authenticationClient:"authenticationService",configClient:"configService",distributedStoreClient:"dataStoreService",hotkeyClient:"hotkeysService",linkerClient:"linkerService",logger:"loggerService",searchClient:"searchService",storageClient:"storageService",windowClient:"windowService",workspaceClient:"workspaceService"}[e]),lt="Finsemble.State.Services";var dt;!function(e){e[e.NORMAL=0]="NORMAL",e[e.MINIMIZED_WAS_NORMAL=1]="MINIMIZED_WAS_NORMAL",e[e.MAXIMIZED=2]="MAXIMIZED",e[e.MINIMIZED_WAS_MAXIMIZED=3]="MINIMIZED_WAS_MAXIMIZED"}(dt||(dt={}));const ct="Finsemble.Service.Start",pt="Finsemble.Service.Stop",ft="Finsemble.Event.Interrupt",yt=["close-requested","closed","close-complete","_container-close-handlers"],ht={DELAYABLE_EVENTS:["close-requested","closed","close-complete","_container-close-handlers"],CANCELABLE_EVENTS:["close-requested"]},gt={DELAYABLE_EVENTS:["load-requested","close-requested","save-requested"],CANCELABLE_EVENTS:["close-requested"],CLEAN_SHUTDOWN:"Finsemble.Workspace.cleanShutdown",WORKSPACE_UPDATED:"Finsemble.WorkspaceService.update",RELOAD_GROUPS:"Finsemble.WorkspaceService.reloadGroups",STORAGE_TOPIC:"finsemble.workspace",CACHE_STORAGE_TOPIC:"finsemble.workspace.cache",ALL_WORKSPACES:"finsemble.allWorkspaces",ACTIVE_WORKSPACE:"activeWorkspace",LAST_USED_WORKSPACE_TOPIC:"finsemble",LAST_USED_WORKSPACE_NAME:"finsemble.lastUsedWorkspace.name",LAST_USED_WORKSPACE:"finsemble.lastUsedWorkspace",INITIAL_WORKSPACE_PREFERENCE:"finsemble.initialWorkspace",PUBLISH_REASONS:{INIT:"workspace:initialization",LOAD_DATA_RETRIEVED:"workspace:load:dataRetrieved",LOAD_FINISHED:"workspace:load:finished",WINDOW_REMOVED:"window:remove",WINDOW_ADDED:"window:add",LOAD_STARTED:"workspace:load:start",WORKSPACE_REMOVED:"Workspace:remove",WORKSPACE_RENAMED:"rename",SWITCHTO_TERMINATED:"workspace:switchTo:terminated",NEW_WORKSPACE:"new workspace",SAVE_AS:"APPLICATION LIFECYCLE:WORKSPACE LIFECYCLE:SaveAs:Workspace:Save As"},API_CHANNELS:{NEW_WORKSPACE:"Finsemble.Workspace.NewWorkspace",SAVE:"Finsemble.Workspace.Save",RENAME:"Finsemble.Workspace.Rename",SAVE_AS:"Finsemble.Workspace.SaveAs",SWITCH_TO:"Finsemble.Workspace.SwitchTo",IMPORT:"Finsemble.Workspace.Import",EXPORT:"Finsemble.Workspace.Export",REMOVE:"Finsemble.Workspace.Remove",SAVE_GLOBAL_DATA:"Finsemble.Workspace.SaveGlobalData",SAVE_VIEW_DATA:"Finsemble.Workspace.SaveViewData",GET_GLOBAL_DATA:"Finsemble.Workspace.GetGlobalData",GET_VIEW_DATA:"Finsemble.Workspace.GetViewData",GET_WORKSPACES:"Finsemble.Workspace.GetWorkspaces",GET_WORKSPACE_NAMES:"Finsemble.Workspace.GetWorkspaceNames",SET_WORKSPACE_ORDER:"Finsemble.Workspace.SetWorkspaceOrder",GET_ACTIVE_WORKSPACE:"Finsemble.Workspace.GetActiveWorkspace",GET_ACTIVE_WORKSPACE_DIRTY:"Finsemble.Workspace.GetActiveWorkspaceDirty",GET_TEMPLATES:"Finsemble.Workspace.GetTemplates",IMPORT_TEMPLATE:"Finsemble.Workspace.ImportTemplate",EXPORT_TEMPLATE:"Finsemble.Workspace.ExportTemplate",REMOVE_TEMPLATE:"Finsemble.Workspace.RemoveTemplate",SET_WINDOW_STATE:"Finsemble.Workspace.SetWindowData",GET_WINDOW_STATE:"Finsemble.Workspace.GetWindowData",ADD_WINDOW:"WorkspaceService.addWindow",REMOVE_WINDOW:"WorkspaceService.removeWindow",GET_MANY_WINDOW_STATES:"Finsemble.Workspace.GetWindowDataMultiple",SETUP_INITIAL_WORKSPACE:"Finsemble.Workspace.SetupInitialWorkspace"},DEFAULT_WINDOW_PROPS:["name","componentType","windowType","alwaysOnTop","autoShow","minWidth","minHeight","maxWidth","maxHeight","resizable","maximizable","minimizable","opacity","windowState","left","top","width","height","right","bottom","defaultLeft","defaultTop","defaultWidth","defaultHeight","defaultRight","defaultBottom","monitorInfo","icon","cachedBounds","showTaskbarIcon","isEvergreen","launchGroupComponentData","allowAutoArrange"],ADDITIONAL_WINDOW_PROPS:{WebWindow:["url","fullscreen","frame","backgroundColor","transparent","waitForPageLoad","affinity","appUUID"],NativeWindow:["path","alias","arguments","argumentsAsQueryString","isWPF"]}},mt={REMOTE_FOCUS:"WindowService.remoteFocus",SET_ALWAYS_ON_TOP:"WindowService-Request-setAlwaysOnTop",IS_ALWAYS_ON_TOP:"WindowService-Request-isAlwaysOnTop"},vt="finsemble.componentStateStorage",wt="Finsemble.WindowService.HeartbeatTimeout",bt={WINDOW_CLOSED:"LauncherService.WindowClosed"},jt={AERO_KEY:"aero_key",SYSTEM_RESTORED:"system_restored"};class St extends et.EventEmitter{constructor(e){var t;super(),this.callback=e.callback,this.dependencies=e.dependencies,this.startupTimer=null,this.whoAmI=null!==(t=e.whoAmI)&&void 0!==t?t:"Source unknown. Look for `waitFor()` and add third parameter",this.setStartupTimer=this.setStartupTimer.bind(this),this.clearStartupTimer=this.clearStartupTimer.bind(this)}clearStartupTimer(){this.startupTimer&&clearTimeout(this.startupTimer),this.startupTimer=null}setStartupTimer(){const e=this;this.startupTimer=+setTimeout((()=>{e.emit("timeout"),this.callback("StartupDependency timeout error")}),1e4)}}function Ct(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}class At{constructor(){this.servicesAreAllOnline={},this.clientsAreAllOnline={},this.onlineClients=[],this.dependencies={},this.startupTimers={},this.startupTimerFired=!1,this.bindCorrectContext()}waitFor(e,t,n){const r=Ct();e.clients||(e.clients=[]),e.clients.length&&(e.clients=e.clients.map((e=>e.charAt(0).toLowerCase()+e.slice(1))));const i=new St({dependencies:e,callback:t,whoAmI:n});return i.setStartupTimer(),i.on("timeout",(()=>{this.onDependencyTimeout(i)})),this.dependencies[r]=i,this.checkDependencies(),i}onDependencyTimeout(e){const t=this.getOfflineClients();let n=`APPLICATION LIFECYCLE:STARTUP:Dependency (${e.whoAmI}) not online after 10 seconds.`;t.length&&(n=`${n} Waiting for these clients: ${t.join(", ")}.`),fe.system.warn(n),e.emit("err",n)}checkDependencies(){for(const e in this.dependencies){const t=this.dependencies[e],{dependencies:n,callback:r}=t;(!n.clients.length||this.clientsAreAllOnline[e]||(this.clientsAreAllOnline[e]=this.checkClients(n.clients),this.clientsAreAllOnline[e]))&&(delete this.dependencies[e],t.clearStartupTimer(),r&&r())}}getOfflineClients(){let e=[];for(const t in this.dependencies){const{dependencies:n}=this.dependencies[t];e=e.concat(n.clients.filter((e=>!this.onlineClients.includes(e))))}return e.filter(((t,n)=>e.indexOf(t)===n))}checkClients(e){return e.every((e=>this.onlineClients.includes(e)))}setClientOnline(e){this.onlineClients.includes(e)||(this.onlineClients.push(e),this.checkDependencies())}getOnlineClients(){return this.onlineClients}bindCorrectContext(){this.checkDependencies=this.checkDependencies.bind(this),this.checkClients=this.checkClients.bind(this),this.getOfflineClients=this.getOfflineClients.bind(this),this.onDependencyTimeout=this.onDependencyTimeout.bind(this),this.waitFor=this.waitFor.bind(this)}}class Rt{constructor(){this.offlineServices=[],this.dependencies={},this.checkDependencies=this.checkDependencies.bind(this)}waitFor(e,t){fe.system.debug("DependencyManager:waitFor",e),e.services||(e.services=[]);const n=Ct();this.dependencies[n]={dependencies:e,callback:t}}checkDependencies(){if(console.debug("checkDependencies",this.dependencies),Object.keys(this.dependencies))for(const e in this.dependencies){const{dependencies:t,callback:n}=this.dependencies[e];(fe.system.debug("DependencyManager:checkDependency",t.services,this.offlineServices),!t.services.length||this.checkServices(t.services))&&(console.debug("checkDependencies callback"),delete this.dependencies[e],n&&n())}}checkServices(e){return e.every((e=>this.offlineServices.includes(e)))}setServiceOffline(e){fe.system.debug("setServiceOffline",e),console.debug("setServiceOffline",e),this.offlineServices.push(e),this.checkDependencies()}}class It extends et.EventEmitter{constructor(){super(),this.startup=new At,this.shutdown=new Rt,this.RouterClient=P,this.AuthorizationCompleted=!1,this.bindCorrectContext(),this.onAuthorizationCompleted(this.startup.checkDependencies),g.getInstance().onReady(this.listenForServices)}bindCorrectContext(){this.listenForServices=this.listenForServices.bind(this),this.onAuthorizationCompleted=this.onAuthorizationCompleted.bind(this)}setClientOnline(e){this.startup.setClientOnline(e)}onServiceStateChange(e){Object.keys(e).forEach((t=>{const{state:n}=e[t];"closed"===n&&this.shutdown.setServiceOffline(t)}))}listenForServices(){fe.system.debug("DependencyManager:listenForServices before wait"),A.waitForBootStage("kernel","stageEntered",(()=>{fe.system.debug("DependencyManager:listenForServices after wait"),this.RouterClient.subscribe(lt,((e,t)=>{fe.system.debug("DependencyManager:listenForServices SERVICES_STATE_CHANNEL",t.data),this.onServiceStateChange(t.data)})),this.RouterClient.addListener(ot,((e,t)=>{fe.system.debug("DependencyManager:listenForServices SERVICE_CLOSED_CHANNEL",t.data);const n={};n[t.data.name]={state:"closed"},this.onServiceStateChange(n)})),this.RouterClient.subscribe(nt,((e,t)=>{switch(t.data.state){case"authenticated":case"ready":default:break;case"closing":this.shutdown.checkDependencies()}}))}))}onAuthorizationCompleted(e){this.AuthorizationCompleted?e():this.addListener("AuthorizationCompleted",e)}}const Tt=new It,Et=async()=>new Promise((e=>{x.getManifest((t=>{e({err:null,data:t})}))})),Ot=(e,t)=>{var n,r;return null!==(n=e.finsemble[t])&&void 0!==n?n:null===(r=e.finsemble)||void 0===r?void 0:r.custom[t]},_t=(e,t)=>{let n=!1;const r=t.split(/[/\\:?=&\s]/);for(let i=0;i<r.length;i++)if("$"===r[i][0]){const s=r[i].substring(1),o=Ot(e,s);if(void 0===o)ye.system.warn("ConfigUtil.resolveString",`Missing [${s}] variable from finsemble.custom configuration object`);else{const e=t.replace(r[i],o);ye.system.verbose("forceObjectsToLogger","ConfigUtil.resolveManifestMacros:resolveString configString",r[i],s,o,"old value=",t,"value=",e),n=!0,t=e}}return{configString:t,replacedMacro:n}},Mt=(e,t,n)=>{let r=!1;if(n>1e3)return ye.system.error("ConfigUtil resolveArray maxiumum recursion level reached"),{replacedMacro:r};ye.system.verbose("forceObjectsToLogger","resolveArray","recursionLevel",n,"configArray:",t);for(let i=0;i<t.length;i++){const s=t[i];if("string"==typeof s&&s.indexOf("$")>-1){const n=_t(e,s);t[i]=n.configString,r=r||n.replacedMacro}else s instanceof Array?Mt(e,s,n+1):"object"==typeof s&&Lt(e,s,n+1)}return{replacedMacro:r}},Lt=(e,t,n)=>{let r=!1;return n>1e3?(ye.system.error("ConfigUtil resolveObject maxiumum recursion level reached"),{replacedMacro:r}):(t=t||{},ye.system.verbose("forceObjectsToLogger","ConfigUtil.resolveManifestMacros:resolveObject","recursionLevel",n,"configObject:",t),Object.keys(t).forEach((i=>{const s=t[i];if("string"==typeof s&&s.indexOf("$")>-1){const n=_t(e,s);t[i]=n.configString,r=r||n.replacedMacro}else s instanceof Array?Mt(e,s,n+1):"object"==typeof s&&Lt(e,s,n+1)})),{replacedMacro:r})},Pt=new class{resolveManifestMacros(e,t){let n;for(n=0;n<100;n++){const{replacedMacro:n}=Lt(e,t,1);if(!n)break}n>=100&&ye.system.error("forceObjectsToLogger","resolveManifestMacros exceeded maximum passes so continuing -- probably a recursive macro definitions. Look in this config for unresolved macro variables",e)}async getExpandedRawManifest(){ye.system.debug("ConfigUtil.getExpandedRawManifest starting");const{err:e,data:t}=await Et();return e||!t?ye.system.error("ConfigUtil.getExpandedRawManifest:application.getManifest:err",e):(ye.system.debug("forceObjectsToLogger","ConfigUtil.getExpandedRawManifest:getExpandedRawManifest: manifest retrieved. Pre-variable resolution",t),this.resolveManifestMacros(t,t.finsemble),ye.system.debug("forceObjectsToLogger","ConfigUtil.getExpandedRawManifest:getExpandedRawManifest:Complete. post-variable resolution",t)),{err:e,data:t}}async captureAndLogBadFileData(e){let t,n=null;ye.system.debug(`captureAndLogBadFileData for ${e}`);try{const r=await fetch(e,{credentials:"include",cache:"no-cache"});200!=r.status?n=`HTTP get error for ${e}: ${r.status} ${r.statusText}}`:t=await r.text()}catch(t){n=`Failure importing config from ${e} ${t.toString()}`}n?ye.system.error("forceObjectsToLogger",`captureAndLogBadFileData failed for ${e}`,n):ye.system.error("forceObjectsToLogger",`captureAndLogBadFileData successful for ${e}`,t)}async fetchConfigFile(e){let t,n=null;ye.system.debug(`fetching import ${e}`);try{const r=await fetch(e,{credentials:"include",cache:"no-cache"});200!=r.status?n=`HTTP get error for ${e}: ${r.status} ${r.statusText}`:t=await r.json()}catch(t){n=`Failure importing config from ${e} ${t.toString()}`}return n&&(ye.system.error("forceObjectsToLogger",n),this.captureAndLogBadFileData(e)),{err:n,data:t}}graftImportOnToManifest(e,t){Object.keys(t).forEach((n=>{if("importConfig"===n){e.finsemble.importConfig=e.finsemble.importConfig||[];for(let n=0;n<t.importConfig.length;n++)e.finsemble.importConfig.unshift(t.importConfig[n])}else if("importThirdPartyConfig"===n){e.finsemble.importThirdPartyConfig=e.finsemble.importThirdPartyConfig||[];for(let n=0;n<t.importThirdPartyConfig.length;n++)e.finsemble.importThirdPartyConfig.unshift(t.importThirdPartyConfig[n])}else e.finsemble[n]=t[n]})),this.resolveManifestMacros(e,e.finsemble),ye.system.debug("forceObjectsToLogger","ConfigUtil.getInitialManifest:getCoreConfig:Initial Manifest after variables Resolved",e)}async getInitialManifest(){const{err:e,data:t}=await Et();if(!e&&t){t.finsemble=t.finsemble||{},this.resolveManifestMacros(t,t.finsemble),t.finsemble.applicationRoot||ye.system.error("FATAL ERROR: applicationRoot was not defined in manifest file.");const e=`${t.finsemble.moduleRoot}/configs/core/config.json`,{err:n,data:r}=await this.fetchConfigFile(e);!n&&r?this.graftImportOnToManifest(t,r):ye.system.error(`ConfigUtil.getInitialManifest:getCoreConfig:failed importing into finsemble config. $moduleRoot=${t.finsemble.moduleRoot}; Full Path=${e}`,n)}return{err:e,data:t}}promptAndSaveJSONToLocalFile(e,t){ye.system.debug("saveJSONToLocalFile",e,t);const n=JSON.stringify(t,null,"\t"),r=`data:application/json;charset=utf-8,${encodeURIComponent(n)}`,i=`${e}.json`,s=document.createElement("a");s.setAttribute("href",r),s.setAttribute("download",i),s.click()}configFormatForExport(e,t){ye.system.debug("configFormatForExport starting",e,t);let n=B().cloneDeep(t);if("raw"===e);else if("all"===e)delete n.importConfig,delete n.comment;else if("application"===e)delete n.importConfig,delete n.comment,delete n.system,delete n.services;else if("workspace"===e)n={workspace:n};else if("workspaceTemplate"===e){const e={};e[n.name]=n,n={workspaceTemplates:e}}else"services"===e?n=n.services:"components"===e&&(n=n.components);return n}getDefault(e,t,n){let r=n;if(e){try{const n=t.split(".");let i=e;for(let e=1;e<n.length;e++)i=i[n[e]];r=i}catch(e){r=n}void 0===r&&(r=n)}return r}logDeprecation(e){let t=ye.system.warn;return"error"===e&&(t=ye.system.error),t}},Nt={sameDomainTransport:"FinsembleTransport",crossDomainTransport:"FinsembleTransport",transportSettings:{FinsembleTransport:{serverAddress:"ws://127.0.0.1:3376"}},transportName:"FinsembleTransport"},Wt=e=>{if(!e)return fe.system.error("No documentRoot provided to RouterConfig.isCrossDomain(). Check the moduleRoot entry of the manifest."),!0;const t=document.createElement("a");t.href=e;const n=window.location.hostname===t.hostname,r=window.location.protocol===t.protocol,i=(void 0!==window.location.port?window.location.port:80)===(void 0!==t.port?t.port:80),s=n&&i&&r;return fe.system.debug(`Transport crossDomain=${Wt} (${n}:${r}:${i})`),!s},kt=(e,t)=>{const{moduleRoot:n,router:r}=null==e?void 0:e.finsemble,i="IPCBus",s="SharedWorker",{sameDomainTransport:o=s,crossDomainTransport:a=i}=null!=r?r:{};let u=Wt(n)?a:o;return t&&u===s&&(u="SharedWorkerForCoreServices"),u};function Dt(e,t,n,r){void 0===r&&(r="");var i=xt(e),s=r?" on ".concat(r):"",o=n?' for key "'.concat(n,'"'):"";throw Error("Invalid value".concat(o).concat(s,". Expected ").concat(i," but got ").concat(JSON.stringify(t)))}function xt(e){return Array.isArray(e)?2===e.length&&void 0===e[0]?"an optional ".concat(xt(e[1])):"one of [".concat(e.map((function(e){return xt(e)})).join(", "),"]"):"object"==typeof e&&void 0!==e.literal?e.literal:typeof e}function Ft(e){if(void 0===e.jsonToJS){var t={};e.props.forEach((function(e){return t[e.json]={key:e.js,typ:e.typ}})),e.jsonToJS=t}return e.jsonToJS}function Bt(e){if(void 0===e.jsToJSON){var t={};e.props.forEach((function(e){return t[e.js]={key:e.json,typ:e.typ}})),e.jsToJSON=t}return e.jsToJSON}function qt(e,t,n,r,i){if(void 0===r&&(r=""),void 0===i&&(i=""),"any"===t)return e;if(null===t)return null===e?e:Dt(t,e,r,i);if(!1===t)return Dt(t,e,r,i);for(var s=void 0;"object"==typeof t&&void 0!==t.ref;)s=t.ref,t=tn[t.ref];return Array.isArray(t)?function(e,t){return-1!==e.indexOf(t)?t:Dt(e.map((function(e){return Jt(e)})),t,r,i)}(t,e):"object"==typeof t?t.hasOwnProperty("unionMembers")?function(e,t){for(var s=e.length,o=0;o<s;o++){var a=e[o];try{return qt(t,a,n)}catch(e){}}return Dt(e,t,r,i)}(t.unionMembers,e):t.hasOwnProperty("arrayItems")?function(e,t){return Array.isArray(t)?t.map((function(t){return qt(t,e,n)})):Dt(Jt("array"),t,r,i)}(t.arrayItems,e):t.hasOwnProperty("props")?function(e,t,o){if(null===o||"object"!=typeof o||Array.isArray(o))return Dt(Jt(s||"object"),o,r,i);var a={};return Object.getOwnPropertyNames(e).forEach((function(t){var r=e[t],i=Object.prototype.hasOwnProperty.call(o,t)?o[t]:void 0;a[r.key]=qt(i,r.typ,n,t,s)})),Object.getOwnPropertyNames(o).forEach((function(r){Object.prototype.hasOwnProperty.call(e,r)||(a[r]=qt(o[r],t,n,r,s))})),a}(n(t),t.additional,e):Dt(t,e,r,i):t===Date&&"number"!=typeof e?function(e){if(null===e)return null;var t=new Date(e);return isNaN(t.valueOf())?Dt(Jt("Date"),e,r,i):t}(e):function(e,t){return typeof e==typeof t?t:Dt(e,t,r,i)}(t,e)}function Ut(e,t){return qt(e,t,Ft)}function $t(e,t){return qt(e,t,Bt)}function Jt(e){return{literal:e}}function Ht(e){return{arrayItems:e}}function Vt(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return{unionMembers:e}}function zt(e,t){return{props:e,additional:t}}function Gt(e){return{props:[],additional:e}}function Yt(e){return{ref:e}}!function(){function e(){}e.toFDC3DesktopAgentAPISchema=function(e){return Ut(JSON.parse(e),"any")},e.fDC3DesktopAgentAPISchemaToJson=function(e){return JSON.stringify($t(e,"any"),null,2)},e.toAgentErrorResponseMessage=function(e){return Ut(JSON.parse(e),Yt("AgentErrorResponseMessage"))},e.agentErrorResponseMessageToJson=function(e){return JSON.stringify($t(e,Yt("AgentErrorResponseMessage")),null,2)},e.toAgentRequestMessage=function(e){return Ut(JSON.parse(e),Yt("AgentRequestMessage"))},e.agentRequestMessageToJson=function(e){return JSON.stringify($t(e,Yt("AgentRequestMessage")),null,2)},e.toAgentResponseMessage=function(e){return Ut(JSON.parse(e),Yt("AgentResponseMessage"))},e.agentResponseMessageToJson=function(e){return JSON.stringify($t(e,Yt("AgentResponseMessage")),null,2)},e.toBridgeErrorResponseMessage=function(e){return Ut(JSON.parse(e),Yt("BridgeErrorResponseMessage"))},e.bridgeErrorResponseMessageToJson=function(e){return JSON.stringify($t(e,Yt("BridgeErrorResponseMessage")),null,2)},e.toBridgeRequestMessage=function(e){return Ut(JSON.parse(e),Yt("BridgeRequestMessage"))},e.bridgeRequestMessageToJson=function(e){return JSON.stringify($t(e,Yt("BridgeRequestMessage")),null,2)},e.toBridgeResponseMessage=function(e){return Ut(JSON.parse(e),Yt("BridgeResponseMessage"))},e.bridgeResponseMessageToJson=function(e){return JSON.stringify($t(e,Yt("BridgeResponseMessage")),null,2)},e.toBroadcastAgentRequest=function(e){return Ut(JSON.parse(e),Yt("BroadcastAgentRequest"))},e.broadcastAgentRequestToJson=function(e){return JSON.stringify($t(e,Yt("BroadcastAgentRequest")),null,2)},e.toBroadcastBridgeRequest=function(e){return Ut(JSON.parse(e),Yt("BroadcastBridgeRequest"))},e.broadcastBridgeRequestToJson=function(e){return JSON.stringify($t(e,Yt("BroadcastBridgeRequest")),null,2)},e.toBridgingCommons=function(e){return Ut(JSON.parse(e),Gt("any"))},e.bridgingCommonsToJson=function(e){return JSON.stringify($t(e,Gt("any")),null,2)},e.toConnectionStepMessage=function(e){return Ut(JSON.parse(e),Yt("ConnectionStepMessage"))},e.connectionStepMessageToJson=function(e){return JSON.stringify($t(e,Yt("ConnectionStepMessage")),null,2)},e.toConnectionStep2Hello=function(e){return Ut(JSON.parse(e),Yt("ConnectionStep2Hello"))},e.connectionStep2HelloToJson=function(e){return JSON.stringify($t(e,Yt("ConnectionStep2Hello")),null,2)},e.toConnectionStep3Handshake=function(e){return Ut(JSON.parse(e),Yt("ConnectionStep3Handshake"))},e.connectionStep3HandshakeToJson=function(e){return JSON.stringify($t(e,Yt("ConnectionStep3Handshake")),null,2)},e.toConnectionStep4AuthenticationFailed=function(e){return Ut(JSON.parse(e),Yt("ConnectionStep4AuthenticationFailed"))},e.connectionStep4AuthenticationFailedToJson=function(e){return JSON.stringify($t(e,Yt("ConnectionStep4AuthenticationFailed")),null,2)},e.toConnectionStep6ConnectedAgentsUpdate=function(e){return Ut(JSON.parse(e),Yt("ConnectionStep6ConnectedAgentsUpdate"))},e.connectionStep6ConnectedAgentsUpdateToJson=function(e){return JSON.stringify($t(e,Yt("ConnectionStep6ConnectedAgentsUpdate")),null,2)},e.toFindInstancesAgentErrorResponse=function(e){return Ut(JSON.parse(e),Yt("FindInstancesAgentErrorResponse"))},e.findInstancesAgentErrorResponseToJson=function(e){return JSON.stringify($t(e,Yt("FindInstancesAgentErrorResponse")),null,2)},e.toFindInstancesAgentRequest=function(e){return Ut(JSON.parse(e),Yt("FindInstancesAgentRequest"))},e.findInstancesAgentRequestToJson=function(e){return JSON.stringify($t(e,Yt("FindInstancesAgentRequest")),null,2)},e.toFindInstancesAgentResponse=function(e){return Ut(JSON.parse(e),Yt("FindInstancesAgentResponse"))},e.findInstancesAgentResponseToJson=function(e){return JSON.stringify($t(e,Yt("FindInstancesAgentResponse")),null,2)},e.toFindInstancesBridgeErrorResponse=function(e){return Ut(JSON.parse(e),Yt("FindInstancesBridgeErrorResponse"))},e.findInstancesBridgeErrorResponseToJson=function(e){return JSON.stringify($t(e,Yt("FindInstancesBridgeErrorResponse")),null,2)},e.toFindInstancesBridgeRequest=function(e){return Ut(JSON.parse(e),Yt("FindInstancesBridgeRequest"))},e.findInstancesBridgeRequestToJson=function(e){return JSON.stringify($t(e,Yt("FindInstancesBridgeRequest")),null,2)},e.toFindInstancesBridgeResponse=function(e){return Ut(JSON.parse(e),Yt("FindInstancesBridgeResponse"))},e.findInstancesBridgeResponseToJson=function(e){return JSON.stringify($t(e,Yt("FindInstancesBridgeResponse")),null,2)},e.toFindIntentAgentErrorResponse=function(e){return Ut(JSON.parse(e),Yt("FindIntentAgentErrorResponse"))},e.findIntentAgentErrorResponseToJson=function(e){return JSON.stringify($t(e,Yt("FindIntentAgentErrorResponse")),null,2)},e.toFindIntentAgentRequest=function(e){return Ut(JSON.parse(e),Yt("FindIntentAgentRequest"))},e.findIntentAgentRequestToJson=function(e){return JSON.stringify($t(e,Yt("FindIntentAgentRequest")),null,2)},e.toFindIntentAgentResponse=function(e){return Ut(JSON.parse(e),Yt("FindIntentAgentResponse"))},e.findIntentAgentResponseToJson=function(e){return JSON.stringify($t(e,Yt("FindIntentAgentResponse")),null,2)},e.toFindIntentBridgeErrorResponse=function(e){return Ut(JSON.parse(e),Yt("FindIntentBridgeErrorResponse"))},e.findIntentBridgeErrorResponseToJson=function(e){return JSON.stringify($t(e,Yt("FindIntentBridgeErrorResponse")),null,2)},e.toFindIntentBridgeRequest=function(e){return Ut(JSON.parse(e),Yt("FindIntentBridgeRequest"))},e.findIntentBridgeRequestToJson=function(e){return JSON.stringify($t(e,Yt("FindIntentBridgeRequest")),null,2)},e.toFindIntentBridgeResponse=function(e){return Ut(JSON.parse(e),Yt("FindIntentBridgeResponse"))},e.findIntentBridgeResponseToJson=function(e){return JSON.stringify($t(e,Yt("FindIntentBridgeResponse")),null,2)},e.toFindIntentsByContextAgentErrorResponse=function(e){return Ut(JSON.parse(e),Yt("FindIntentsByContextAgentErrorResponse"))},e.findIntentsByContextAgentErrorResponseToJson=function(e){return JSON.stringify($t(e,Yt("FindIntentsByContextAgentErrorResponse")),null,2)},e.toFindIntentsByContextAgentRequest=function(e){return Ut(JSON.parse(e),Yt("FindIntentsByContextAgentRequest"))},e.findIntentsByContextAgentRequestToJson=function(e){return JSON.stringify($t(e,Yt("FindIntentsByContextAgentRequest")),null,2)},e.toFindIntentsByContextAgentResponse=function(e){return Ut(JSON.parse(e),Yt("FindIntentsByContextAgentResponse"))},e.findIntentsByContextAgentResponseToJson=function(e){return JSON.stringify($t(e,Yt("FindIntentsByContextAgentResponse")),null,2)},e.toFindIntentsByContextBridgeErrorResponse=function(e){return Ut(JSON.parse(e),Yt("FindIntentsByContextBridgeErrorResponse"))},e.findIntentsByContextBridgeErrorResponseToJson=function(e){return JSON.stringify($t(e,Yt("FindIntentsByContextBridgeErrorResponse")),null,2)},e.toFindIntentsByContextBridgeRequest=function(e){return Ut(JSON.parse(e),Yt("FindIntentsByContextBridgeRequest"))},e.findIntentsByContextBridgeRequestToJson=function(e){return JSON.stringify($t(e,Yt("FindIntentsByContextBridgeRequest")),null,2)},e.toFindIntentsByContextBridgeResponse=function(e){return Ut(JSON.parse(e),Yt("FindIntentsByContextBridgeResponse"))},e.findIntentsByContextBridgeResponseToJson=function(e){return JSON.stringify($t(e,Yt("FindIntentsByContextBridgeResponse")),null,2)},e.toGetAppMetadataAgentErrorResponse=function(e){return Ut(JSON.parse(e),Yt("GetAppMetadataAgentErrorResponse"))},e.getAppMetadataAgentErrorResponseToJson=function(e){return JSON.stringify($t(e,Yt("GetAppMetadataAgentErrorResponse")),null,2)},e.toGetAppMetadataAgentRequest=function(e){return Ut(JSON.parse(e),Yt("GetAppMetadataAgentRequest"))},e.getAppMetadataAgentRequestToJson=function(e){return JSON.stringify($t(e,Yt("GetAppMetadataAgentRequest")),null,2)},e.toGetAppMetadataAgentResponse=function(e){return Ut(JSON.parse(e),Yt("GetAppMetadataAgentResponse"))},e.getAppMetadataAgentResponseToJson=function(e){return JSON.stringify($t(e,Yt("GetAppMetadataAgentResponse")),null,2)},e.toGetAppMetadataBridgeErrorResponse=function(e){return Ut(JSON.parse(e),Yt("GetAppMetadataBridgeErrorResponse"))},e.getAppMetadataBridgeErrorResponseToJson=function(e){return JSON.stringify($t(e,Yt("GetAppMetadataBridgeErrorResponse")),null,2)},e.toGetAppMetadataBridgeRequest=function(e){return Ut(JSON.parse(e),Yt("GetAppMetadataBridgeRequest"))},e.getAppMetadataBridgeRequestToJson=function(e){return JSON.stringify($t(e,Yt("GetAppMetadataBridgeRequest")),null,2)},e.toGetAppMetadataBridgeResponse=function(e){return Ut(JSON.parse(e),Yt("GetAppMetadataBridgeResponse"))},e.getAppMetadataBridgeResponseToJson=function(e){return JSON.stringify($t(e,Yt("GetAppMetadataBridgeResponse")),null,2)},e.toOpenAgentErrorResponse=function(e){return Ut(JSON.parse(e),Yt("OpenAgentErrorResponse"))},e.openAgentErrorResponseToJson=function(e){return JSON.stringify($t(e,Yt("OpenAgentErrorResponse")),null,2)},e.toOpenAgentRequest=function(e){return Ut(JSON.parse(e),Yt("OpenAgentRequest"))},e.openAgentRequestToJson=function(e){return JSON.stringify($t(e,Yt("OpenAgentRequest")),null,2)},e.toOpenAgentResponse=function(e){return Ut(JSON.parse(e),Yt("OpenAgentResponse"))},e.openAgentResponseToJson=function(e){return JSON.stringify($t(e,Yt("OpenAgentResponse")),null,2)},e.toOpenBridgeErrorResponse=function(e){return Ut(JSON.parse(e),Yt("OpenBridgeErrorResponse"))},e.openBridgeErrorResponseToJson=function(e){return JSON.stringify($t(e,Yt("OpenBridgeErrorResponse")),null,2)},e.toOpenBridgeRequest=function(e){return Ut(JSON.parse(e),Yt("OpenBridgeRequest"))},e.openBridgeRequestToJson=function(e){return JSON.stringify($t(e,Yt("OpenBridgeRequest")),null,2)},e.toOpenBridgeResponse=function(e){return Ut(JSON.parse(e),Yt("OpenBridgeResponse"))},e.openBridgeResponseToJson=function(e){return JSON.stringify($t(e,Yt("OpenBridgeResponse")),null,2)},e.toPrivateChannelBroadcastAgentRequest=function(e){return Ut(JSON.parse(e),Yt("PrivateChannelBroadcastAgentRequest"))},e.privateChannelBroadcastAgentRequestToJson=function(e){return JSON.stringify($t(e,Yt("PrivateChannelBroadcastAgentRequest")),null,2)},e.toPrivateChannelBroadcastBridgeRequest=function(e){return Ut(JSON.parse(e),Yt("PrivateChannelBroadcastBridgeRequest"))},e.privateChannelBroadcastBridgeRequestToJson=function(e){return JSON.stringify($t(e,Yt("PrivateChannelBroadcastBridgeRequest")),null,2)},e.toPrivateChannelEventListenerAddedAgentRequest=function(e){return Ut(JSON.parse(e),Yt("PrivateChannelEventListenerAddedAgentRequest"))},e.privateChannelEventListenerAddedAgentRequestToJson=function(e){return JSON.stringify($t(e,Yt("PrivateChannelEventListenerAddedAgentRequest")),null,2)},e.toPrivateChannelEventListenerAddedBridgeRequest=function(e){return Ut(JSON.parse(e),Yt("PrivateChannelEventListenerAddedBridgeRequest"))},e.privateChannelEventListenerAddedBridgeRequestToJson=function(e){return JSON.stringify($t(e,Yt("PrivateChannelEventListenerAddedBridgeRequest")),null,2)},e.toPrivateChannelEventListenerRemovedAgentRequest=function(e){return Ut(JSON.parse(e),Yt("PrivateChannelEventListenerRemovedAgentRequest"))},e.privateChannelEventListenerRemovedAgentRequestToJson=function(e){return JSON.stringify($t(e,Yt("PrivateChannelEventListenerRemovedAgentRequest")),null,2)},e.toPrivateChannelEventListenerRemovedBridgeRequest=function(e){return Ut(JSON.parse(e),Yt("PrivateChannelEventListenerRemovedBridgeRequest"))},e.privateChannelEventListenerRemovedBridgeRequestToJson=function(e){return JSON.stringify($t(e,Yt("PrivateChannelEventListenerRemovedBridgeRequest")),null,2)},e.toPrivateChannelOnAddContextListenerAgentRequest=function(e){return Ut(JSON.parse(e),Yt("PrivateChannelOnAddContextListenerAgentRequest"))},e.privateChannelOnAddContextListenerAgentRequestToJson=function(e){return JSON.stringify($t(e,Yt("PrivateChannelOnAddContextListenerAgentRequest")),null,2)},e.toPrivateChannelOnAddContextListenerBridgeRequest=function(e){return Ut(JSON.parse(e),Yt("PrivateChannelOnAddContextListenerBridgeRequest"))},e.privateChannelOnAddContextListenerBridgeRequestToJson=function(e){return JSON.stringify($t(e,Yt("PrivateChannelOnAddContextListenerBridgeRequest")),null,2)},e.toPrivateChannelOnDisconnectAgentRequest=function(e){return Ut(JSON.parse(e),Yt("PrivateChannelOnDisconnectAgentRequest"))},e.privateChannelOnDisconnectAgentRequestToJson=function(e){return JSON.stringify($t(e,Yt("PrivateChannelOnDisconnectAgentRequest")),null,2)},e.toPrivateChannelOnDisconnectBridgeRequest=function(e){return Ut(JSON.parse(e),Yt("PrivateChannelOnDisconnectBridgeRequest"))},e.privateChannelOnDisconnectBridgeRequestToJson=function(e){return JSON.stringify($t(e,Yt("PrivateChannelOnDisconnectBridgeRequest")),null,2)},e.toPrivateChannelOnUnsubscribeAgentRequest=function(e){return Ut(JSON.parse(e),Yt("PrivateChannelOnUnsubscribeAgentRequest"))},e.privateChannelOnUnsubscribeAgentRequestToJson=function(e){return JSON.stringify($t(e,Yt("PrivateChannelOnUnsubscribeAgentRequest")),null,2)},e.toPrivateChannelOnUnsubscribeBridgeRequest=function(e){return Ut(JSON.parse(e),Yt("PrivateChannelOnUnsubscribeBridgeRequest"))},e.privateChannelOnUnsubscribeBridgeRequestToJson=function(e){return JSON.stringify($t(e,Yt("PrivateChannelOnUnsubscribeBridgeRequest")),null,2)},e.toRaiseIntentAgentErrorResponse=function(e){return Ut(JSON.parse(e),Yt("RaiseIntentAgentErrorResponse"))},e.raiseIntentAgentErrorResponseToJson=function(e){return JSON.stringify($t(e,Yt("RaiseIntentAgentErrorResponse")),null,2)},e.toRaiseIntentAgentRequest=function(e){return Ut(JSON.parse(e),Yt("RaiseIntentAgentRequest"))},e.raiseIntentAgentRequestToJson=function(e){return JSON.stringify($t(e,Yt("RaiseIntentAgentRequest")),null,2)},e.toRaiseIntentAgentResponse=function(e){return Ut(JSON.parse(e),Yt("RaiseIntentAgentResponse"))},e.raiseIntentAgentResponseToJson=function(e){return JSON.stringify($t(e,Yt("RaiseIntentAgentResponse")),null,2)},e.toRaiseIntentBridgeErrorResponse=function(e){return Ut(JSON.parse(e),Yt("RaiseIntentBridgeErrorResponse"))},e.raiseIntentBridgeErrorResponseToJson=function(e){return JSON.stringify($t(e,Yt("RaiseIntentBridgeErrorResponse")),null,2)},e.toRaiseIntentBridgeRequest=function(e){return Ut(JSON.parse(e),Yt("RaiseIntentBridgeRequest"))},e.raiseIntentBridgeRequestToJson=function(e){return JSON.stringify($t(e,Yt("RaiseIntentBridgeRequest")),null,2)},e.toRaiseIntentBridgeResponse=function(e){return Ut(JSON.parse(e),Yt("RaiseIntentBridgeResponse"))},e.raiseIntentBridgeResponseToJson=function(e){return JSON.stringify($t(e,Yt("RaiseIntentBridgeResponse")),null,2)},e.toRaiseIntentResultAgentErrorResponse=function(e){return Ut(JSON.parse(e),Yt("RaiseIntentResultAgentErrorResponse"))},e.raiseIntentResultAgentErrorResponseToJson=function(e){return JSON.stringify($t(e,Yt("RaiseIntentResultAgentErrorResponse")),null,2)},e.toRaiseIntentResultAgentResponse=function(e){return Ut(JSON.parse(e),Yt("RaiseIntentResultAgentResponse"))},e.raiseIntentResultAgentResponseToJson=function(e){return JSON.stringify($t(e,Yt("RaiseIntentResultAgentResponse")),null,2)},e.toRaiseIntentResultBridgeErrorResponse=function(e){return Ut(JSON.parse(e),Yt("RaiseIntentResultBridgeErrorResponse"))},e.raiseIntentResultBridgeErrorResponseToJson=function(e){return JSON.stringify($t(e,Yt("RaiseIntentResultBridgeErrorResponse")),null,2)},e.toRaiseIntentResultBridgeResponse=function(e){return Ut(JSON.parse(e),Yt("RaiseIntentResultBridgeResponse"))},e.raiseIntentResultBridgeResponseToJson=function(e){return JSON.stringify($t(e,Yt("RaiseIntentResultBridgeResponse")),null,2)},e.toContext=function(e){return Ut(JSON.parse(e),Yt("Context"))},e.contextToJson=function(e){return JSON.stringify($t(e,Yt("Context")),null,2)}}();var Qt,Kt,Zt,Xt,en,tn={AgentErrorResponseMessage:zt([{json:"meta",js:"meta",typ:Yt("AgentResponseMetadata")},{json:"payload",js:"payload",typ:Yt("ErrorResponseMessagePayload")},{json:"type",js:"type",typ:Yt("ResponseMessageType")}],!1),AgentResponseMetadata:zt([{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"timestamp",js:"timestamp",typ:Date}],!1),ErrorResponseMessagePayload:zt([{json:"error",js:"error",typ:Yt("ResponseErrorDetail")}],"any"),AgentRequestMessage:zt([{json:"meta",js:"meta",typ:Yt("AgentRequestMetadata")},{json:"payload",js:"payload",typ:Gt("any")},{json:"type",js:"type",typ:Yt("RequestMessageType")}],!1),AgentRequestMetadata:zt([{json:"destination",js:"destination",typ:Vt(void 0,Yt("BridgeParticipantIdentifier"))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"source",js:"source",typ:Vt(void 0,Yt("SourceIdentifier"))},{json:"timestamp",js:"timestamp",typ:Date}],!1),BridgeParticipantIdentifier:zt([{json:"desktopAgent",js:"desktopAgent",typ:""},{json:"appId",js:"appId",typ:Vt(void 0,"")},{json:"instanceId",js:"instanceId",typ:Vt(void 0,"")}],"any"),SourceIdentifier:zt([{json:"appId",js:"appId",typ:Vt(void 0,"")},{json:"desktopAgent",js:"desktopAgent",typ:Vt(void 0,"")},{json:"instanceId",js:"instanceId",typ:Vt(void 0,"")}],"any"),AgentResponseMessage:zt([{json:"meta",js:"meta",typ:Yt("AgentResponseMetadata")},{json:"payload",js:"payload",typ:Gt("any")},{json:"type",js:"type",typ:Yt("ResponseMessageType")}],!1),BridgeErrorResponseMessage:zt([{json:"meta",js:"meta",typ:Yt("BridgeErrorResponseMessageMeta")},{json:"payload",js:"payload",typ:Yt("ResponseErrorMessagePayload")},{json:"type",js:"type",typ:""}],!1),BridgeErrorResponseMessageMeta:zt([{json:"errorDetails",js:"errorDetails",typ:Ht(Yt("ResponseErrorDetail"))},{json:"errorSources",js:"errorSources",typ:Ht(Yt("DesktopAgentIdentifier"))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"timestamp",js:"timestamp",typ:Date}],!1),DesktopAgentIdentifier:zt([{json:"desktopAgent",js:"desktopAgent",typ:""}],"any"),ResponseErrorMessagePayload:zt([{json:"error",js:"error",typ:Vt(void 0,Yt("ResponseErrorDetail"))}],"any"),BridgeRequestMessage:zt([{json:"meta",js:"meta",typ:Yt("BridgeRequestMetadata")},{json:"payload",js:"payload",typ:Gt("any")},{json:"type",js:"type",typ:""}],!1),BridgeRequestMetadata:zt([{json:"destination",js:"destination",typ:Vt(void 0,Yt("BridgeParticipantIdentifier"))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"source",js:"source",typ:Yt("BridgeParticipantIdentifier")},{json:"timestamp",js:"timestamp",typ:Date}],!1),BridgeResponseMessage:zt([{json:"meta",js:"meta",typ:Yt("BridgeResponseMessageMeta")},{json:"payload",js:"payload",typ:Gt("any")},{json:"type",js:"type",typ:""}],!1),BridgeResponseMessageMeta:zt([{json:"errorDetails",js:"errorDetails",typ:Vt(void 0,Ht(Yt("ResponseErrorDetail")))},{json:"errorSources",js:"errorSources",typ:Vt(void 0,Ht(Yt("DesktopAgentIdentifier")))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"sources",js:"sources",typ:Vt(void 0,Ht(Yt("DesktopAgentIdentifier")))},{json:"timestamp",js:"timestamp",typ:Date}],!1),BroadcastAgentRequest:zt([{json:"meta",js:"meta",typ:Yt("BroadcastAgentRequestMeta")},{json:"payload",js:"payload",typ:Yt("BroadcastAgentRequestPayload")},{json:"type",js:"type",typ:Yt("BroadcastAgentRequestType")}],!1),BroadcastAgentRequestMeta:zt([{json:"requestUuid",js:"requestUuid",typ:""},{json:"source",js:"source",typ:Yt("SourceObject")},{json:"timestamp",js:"timestamp",typ:Date}],!1),SourceObject:zt([{json:"appId",js:"appId",typ:""},{json:"desktopAgent",js:"desktopAgent",typ:Vt(void 0,"")},{json:"instanceId",js:"instanceId",typ:Vt(void 0,"")}],"any"),BroadcastAgentRequestPayload:zt([{json:"channelId",js:"channelId",typ:""},{json:"context",js:"context",typ:Yt("ContextElement")}],!1),ContextElement:zt([{json:"id",js:"id",typ:Vt(void 0,Gt("any"))},{json:"name",js:"name",typ:Vt(void 0,"")},{json:"type",js:"type",typ:""}],"any"),BroadcastBridgeRequest:zt([{json:"meta",js:"meta",typ:Yt("BroadcastBridgeRequestMeta")},{json:"payload",js:"payload",typ:Yt("BroadcastBridgeRequestPayload")},{json:"type",js:"type",typ:Yt("BroadcastAgentRequestType")}],!1),BroadcastBridgeRequestMeta:zt([{json:"requestUuid",js:"requestUuid",typ:""},{json:"source",js:"source",typ:Yt("MetaSource")},{json:"timestamp",js:"timestamp",typ:Date}],!1),MetaSource:zt([{json:"appId",js:"appId",typ:""},{json:"desktopAgent",js:"desktopAgent",typ:""},{json:"instanceId",js:"instanceId",typ:Vt(void 0,"")}],"any"),BroadcastBridgeRequestPayload:zt([{json:"channelId",js:"channelId",typ:""},{json:"context",js:"context",typ:Yt("ContextElement")}],!1),ConnectionStepMessage:zt([{json:"meta",js:"meta",typ:Yt("ConnectionStepMetadata")},{json:"payload",js:"payload",typ:Gt("any")},{json:"type",js:"type",typ:Yt("ConnectionStepMessageType")}],!1),ConnectionStepMetadata:zt([{json:"requestUuid",js:"requestUuid",typ:Vt(void 0,"")},{json:"responseUuid",js:"responseUuid",typ:Vt(void 0,"")},{json:"timestamp",js:"timestamp",typ:Date}],!1),ConnectionStep2Hello:zt([{json:"meta",js:"meta",typ:Yt("ConnectionStep2HelloMeta")},{json:"payload",js:"payload",typ:Yt("ConnectionStep2HelloPayload")},{json:"type",js:"type",typ:Yt("ConnectionStep2HelloType")}],!1),ConnectionStep2HelloMeta:zt([{json:"timestamp",js:"timestamp",typ:Date}],!1),ConnectionStep2HelloPayload:zt([{json:"authRequired",js:"authRequired",typ:!0},{json:"authToken",js:"authToken",typ:Vt(void 0,"")},{json:"desktopAgentBridgeVersion",js:"desktopAgentBridgeVersion",typ:""},{json:"supportedFDC3Versions",js:"supportedFDC3Versions",typ:Ht("")}],!1),ConnectionStep3Handshake:zt([{json:"meta",js:"meta",typ:Yt("ConnectionStep3HandshakeMeta")},{json:"payload",js:"payload",typ:Yt("ConnectionStep3HandshakePayload")},{json:"type",js:"type",typ:Yt("ConnectionStep3HandshakeType")}],!1),ConnectionStep3HandshakeMeta:zt([{json:"requestUuid",js:"requestUuid",typ:""},{json:"timestamp",js:"timestamp",typ:Date}],!1),ConnectionStep3HandshakePayload:zt([{json:"authToken",js:"authToken",typ:Vt(void 0,"")},{json:"channelsState",js:"channelsState",typ:Gt(Ht(Yt("ContextElement")))},{json:"implementationMetadata",js:"implementationMetadata",typ:Yt("ConnectingAgentImplementationMetadata")},{json:"requestedName",js:"requestedName",typ:""}],!1),ConnectingAgentImplementationMetadata:zt([{json:"fdc3Version",js:"fdc3Version",typ:""},{json:"optionalFeatures",js:"optionalFeatures",typ:Yt("OptionalFeatures")},{json:"provider",js:"provider",typ:""},{json:"providerVersion",js:"providerVersion",typ:Vt(void 0,"")}],!1),OptionalFeatures:zt([{json:"DesktopAgentBridging",js:"DesktopAgentBridging",typ:!0},{json:"OriginatingAppMetadata",js:"OriginatingAppMetadata",typ:!0},{json:"UserChannelMembershipAPIs",js:"UserChannelMembershipAPIs",typ:!0}],!1),ConnectionStep4AuthenticationFailed:zt([{json:"meta",js:"meta",typ:Yt("ConnectionStep4AuthenticationFailedMeta")},{json:"payload",js:"payload",typ:Yt("ConnectionStep4AuthenticationFailedPayload")},{json:"type",js:"type",typ:Yt("ConnectionStep4AuthenticationFailedType")}],!1),ConnectionStep4AuthenticationFailedMeta:zt([{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"timestamp",js:"timestamp",typ:Date}],!1),ConnectionStep4AuthenticationFailedPayload:zt([{json:"message",js:"message",typ:Vt(void 0,"")}],!1),ConnectionStep6ConnectedAgentsUpdate:zt([{json:"meta",js:"meta",typ:Yt("ConnectionStep6ConnectedAgentsUpdateMeta")},{json:"payload",js:"payload",typ:Yt("ConnectionStep6ConnectedAgentsUpdatePayload")},{json:"type",js:"type",typ:Yt("ConnectionStep6ConnectedAgentsUpdateType")}],!1),ConnectionStep6ConnectedAgentsUpdateMeta:zt([{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"timestamp",js:"timestamp",typ:Date}],!1),ConnectionStep6ConnectedAgentsUpdatePayload:zt([{json:"addAgent",js:"addAgent",typ:Vt(void 0,"")},{json:"allAgents",js:"allAgents",typ:Ht(Yt("DesktopAgentImplementationMetadata"))},{json:"channelsState",js:"channelsState",typ:Vt(void 0,Gt(Ht(Yt("ContextElement"))))},{json:"removeAgent",js:"removeAgent",typ:Vt(void 0,"")}],!1),DesktopAgentImplementationMetadata:zt([{json:"desktopAgent",js:"desktopAgent",typ:""},{json:"fdc3Version",js:"fdc3Version",typ:""},{json:"optionalFeatures",js:"optionalFeatures",typ:Yt("OptionalFeatures")},{json:"provider",js:"provider",typ:""},{json:"providerVersion",js:"providerVersion",typ:Vt(void 0,"")}],!1),FindInstancesAgentErrorResponse:zt([{json:"meta",js:"meta",typ:Yt("FindInstancesAgentErrorResponseMeta")},{json:"payload",js:"payload",typ:Yt("FindInstancesAgentErrorResponsePayload")},{json:"type",js:"type",typ:Yt("FindInstancesAgentErrorResponseType")}],!1),FindInstancesAgentErrorResponseMeta:zt([{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"timestamp",js:"timestamp",typ:Date}],!1),FindInstancesAgentErrorResponsePayload:zt([{json:"error",js:"error",typ:Yt("ErrorMessage")}],!1),FindInstancesAgentRequest:zt([{json:"meta",js:"meta",typ:Yt("FindInstancesAgentRequestMeta")},{json:"payload",js:"payload",typ:Yt("FindInstancesAgentRequestPayload")},{json:"type",js:"type",typ:Yt("FindInstancesAgentRequestType")}],!1),FindInstancesAgentRequestMeta:zt([{json:"destination",js:"destination",typ:Vt(void 0,Yt("DestinationObject"))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"source",js:"source",typ:Vt(void 0,Yt("SourceIdentifier"))},{json:"timestamp",js:"timestamp",typ:Date}],!1),DestinationObject:zt([{json:"desktopAgent",js:"desktopAgent",typ:""},{json:"appId",js:"appId",typ:Vt(void 0,"")},{json:"instanceId",js:"instanceId",typ:Vt(void 0,"")}],"any"),FindInstancesAgentRequestPayload:zt([{json:"app",js:"app",typ:Yt("AppIdentifier")}],!1),AppIdentifier:zt([{json:"appId",js:"appId",typ:""},{json:"desktopAgent",js:"desktopAgent",typ:Vt(void 0,"")},{json:"instanceId",js:"instanceId",typ:Vt(void 0,"")}],"any"),FindInstancesAgentResponse:zt([{json:"meta",js:"meta",typ:Yt("FindInstancesAgentResponseMeta")},{json:"payload",js:"payload",typ:Yt("FindInstancesAgentResponsePayload")},{json:"type",js:"type",typ:Yt("FindInstancesAgentErrorResponseType")}],!1),FindInstancesAgentResponseMeta:zt([{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"timestamp",js:"timestamp",typ:Date}],!1),FindInstancesAgentResponsePayload:zt([{json:"appIdentifiers",js:"appIdentifiers",typ:Ht(Yt("AppMetadata"))}],!1),AppMetadata:zt([{json:"appId",js:"appId",typ:""},{json:"description",js:"description",typ:Vt(void 0,"")},{json:"desktopAgent",js:"desktopAgent",typ:Vt(void 0,"")},{json:"icons",js:"icons",typ:Vt(void 0,Ht(Yt("Icon")))},{json:"instanceId",js:"instanceId",typ:Vt(void 0,"")},{json:"instanceMetadata",js:"instanceMetadata",typ:Vt(void 0,Gt("any"))},{json:"name",js:"name",typ:Vt(void 0,"")},{json:"resultType",js:"resultType",typ:Vt(void 0,Vt(null,""))},{json:"screenshots",js:"screenshots",typ:Vt(void 0,Ht(Yt("Image")))},{json:"title",js:"title",typ:Vt(void 0,"")},{json:"tooltip",js:"tooltip",typ:Vt(void 0,"")},{json:"version",js:"version",typ:Vt(void 0,"")}],!1),Icon:zt([{json:"size",js:"size",typ:Vt(void 0,"")},{json:"src",js:"src",typ:""},{json:"type",js:"type",typ:Vt(void 0,"")}],!1),Image:zt([{json:"label",js:"label",typ:Vt(void 0,"")},{json:"size",js:"size",typ:Vt(void 0,"")},{json:"src",js:"src",typ:""},{json:"type",js:"type",typ:Vt(void 0,"")}],!1),FindInstancesBridgeErrorResponse:zt([{json:"meta",js:"meta",typ:Yt("FindInstancesBridgeErrorResponseMeta")},{json:"payload",js:"payload",typ:Yt("FindInstancesBridgeErrorResponsePayload")},{json:"type",js:"type",typ:Yt("FindInstancesAgentErrorResponseType")}],!1),FindInstancesBridgeErrorResponseMeta:zt([{json:"errorDetails",js:"errorDetails",typ:Ht(Yt("ResponseErrorDetail"))},{json:"errorSources",js:"errorSources",typ:Ht(Yt("DesktopAgentIdentifier"))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"timestamp",js:"timestamp",typ:Date}],!1),FindInstancesBridgeErrorResponsePayload:zt([{json:"error",js:"error",typ:Yt("ErrorMessage")}],!1),FindInstancesBridgeRequest:zt([{json:"meta",js:"meta",typ:Yt("FindInstancesBridgeRequestMeta")},{json:"payload",js:"payload",typ:Yt("FindInstancesBridgeRequestPayload")},{json:"type",js:"type",typ:Yt("FindInstancesAgentRequestType")}],!1),FindInstancesBridgeRequestMeta:zt([{json:"destination",js:"destination",typ:Vt(void 0,Yt("DestinationObject"))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"source",js:"source",typ:Yt("MetaSourceObject")},{json:"timestamp",js:"timestamp",typ:Date}],!1),MetaSourceObject:zt([{json:"appId",js:"appId",typ:Vt(void 0,"")},{json:"desktopAgent",js:"desktopAgent",typ:""},{json:"instanceId",js:"instanceId",typ:Vt(void 0,"")}],"any"),FindInstancesBridgeRequestPayload:zt([{json:"app",js:"app",typ:Yt("AppIdentifier")}],!1),FindInstancesBridgeResponse:zt([{json:"meta",js:"meta",typ:Yt("FindInstancesBridgeResponseMeta")},{json:"payload",js:"payload",typ:Yt("FindInstancesBridgeResponsePayload")},{json:"type",js:"type",typ:Yt("FindInstancesAgentErrorResponseType")}],!1),FindInstancesBridgeResponseMeta:zt([{json:"errorDetails",js:"errorDetails",typ:Vt(void 0,Ht(Yt("ResponseErrorDetail")))},{json:"errorSources",js:"errorSources",typ:Vt(void 0,Ht(Yt("DesktopAgentIdentifier")))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"sources",js:"sources",typ:Vt(void 0,Ht(Yt("DesktopAgentIdentifier")))},{json:"timestamp",js:"timestamp",typ:Date}],!1),FindInstancesBridgeResponsePayload:zt([{json:"appIdentifiers",js:"appIdentifiers",typ:Ht(Yt("AppMetadata"))}],!1),FindIntentAgentErrorResponse:zt([{json:"meta",js:"meta",typ:Yt("FindIntentAgentErrorResponseMeta")},{json:"payload",js:"payload",typ:Yt("FindIntentAgentErrorResponsePayload")},{json:"type",js:"type",typ:Yt("FindIntentAgentErrorResponseType")}],!1),FindIntentAgentErrorResponseMeta:zt([{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"timestamp",js:"timestamp",typ:Date}],!1),FindIntentAgentErrorResponsePayload:zt([{json:"error",js:"error",typ:Yt("ErrorMessage")}],!1),FindIntentAgentRequest:zt([{json:"meta",js:"meta",typ:Yt("FindIntentAgentRequestMeta")},{json:"payload",js:"payload",typ:Yt("FindIntentAgentRequestPayload")},{json:"type",js:"type",typ:Yt("FindIntentAgentRequestType")}],!1),FindIntentAgentRequestMeta:zt([{json:"requestUuid",js:"requestUuid",typ:""},{json:"source",js:"source",typ:Vt(void 0,Yt("SourceIdentifier"))},{json:"timestamp",js:"timestamp",typ:Date},{json:"destination",js:"destination",typ:Vt(void 0,Yt("BridgeParticipantIdentifier"))}],!1),FindIntentAgentRequestPayload:zt([{json:"context",js:"context",typ:Vt(void 0,Yt("ContextElement"))},{json:"intent",js:"intent",typ:""},{json:"resultType",js:"resultType",typ:Vt(void 0,"")}],!1),FindIntentAgentResponse:zt([{json:"meta",js:"meta",typ:Yt("FindIntentAgentResponseMeta")},{json:"payload",js:"payload",typ:Yt("FindIntentAgentResponsePayload")},{json:"type",js:"type",typ:Yt("FindIntentAgentErrorResponseType")}],!1),FindIntentAgentResponseMeta:zt([{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"timestamp",js:"timestamp",typ:Date}],!1),FindIntentAgentResponsePayload:zt([{json:"appIntent",js:"appIntent",typ:Yt("AppIntent")}],!1),AppIntent:zt([{json:"apps",js:"apps",typ:Ht(Yt("AppMetadata"))},{json:"intent",js:"intent",typ:Yt("IntentMetadata")}],!1),IntentMetadata:zt([{json:"displayName",js:"displayName",typ:""},{json:"name",js:"name",typ:""}],!1),FindIntentBridgeErrorResponse:zt([{json:"meta",js:"meta",typ:Yt("FindIntentBridgeErrorResponseMeta")},{json:"payload",js:"payload",typ:Yt("FindIntentBridgeErrorResponsePayload")},{json:"type",js:"type",typ:Yt("FindIntentAgentErrorResponseType")}],!1),FindIntentBridgeErrorResponseMeta:zt([{json:"errorDetails",js:"errorDetails",typ:Ht(Yt("ResponseErrorDetail"))},{json:"errorSources",js:"errorSources",typ:Ht(Yt("DesktopAgentIdentifier"))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"timestamp",js:"timestamp",typ:Date}],!1),FindIntentBridgeErrorResponsePayload:zt([{json:"error",js:"error",typ:Yt("ErrorMessage")}],!1),FindIntentBridgeRequest:zt([{json:"meta",js:"meta",typ:Yt("FindIntentBridgeRequestMeta")},{json:"payload",js:"payload",typ:Yt("FindIntentBridgeRequestPayload")},{json:"type",js:"type",typ:Yt("FindIntentAgentRequestType")}],!1),FindIntentBridgeRequestMeta:zt([{json:"requestUuid",js:"requestUuid",typ:""},{json:"source",js:"source",typ:Yt("BridgeParticipantIdentifier")},{json:"timestamp",js:"timestamp",typ:Date},{json:"destination",js:"destination",typ:Vt(void 0,Yt("BridgeParticipantIdentifier"))}],!1),FindIntentBridgeRequestPayload:zt([{json:"context",js:"context",typ:Vt(void 0,Yt("ContextElement"))},{json:"intent",js:"intent",typ:""},{json:"resultType",js:"resultType",typ:Vt(void 0,"")}],!1),FindIntentBridgeResponse:zt([{json:"meta",js:"meta",typ:Yt("FindIntentBridgeResponseMeta")},{json:"payload",js:"payload",typ:Yt("FindIntentBridgeResponsePayload")},{json:"type",js:"type",typ:Yt("FindIntentAgentErrorResponseType")}],!1),FindIntentBridgeResponseMeta:zt([{json:"errorDetails",js:"errorDetails",typ:Vt(void 0,Ht(Yt("ResponseErrorDetail")))},{json:"errorSources",js:"errorSources",typ:Vt(void 0,Ht(Yt("DesktopAgentIdentifier")))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"sources",js:"sources",typ:Vt(void 0,Ht(Yt("DesktopAgentIdentifier")))},{json:"timestamp",js:"timestamp",typ:Date}],!1),FindIntentBridgeResponsePayload:zt([{json:"appIntent",js:"appIntent",typ:Yt("AppIntent")}],!1),FindIntentsByContextAgentErrorResponse:zt([{json:"meta",js:"meta",typ:Yt("FindIntentsByContextAgentErrorResponseMeta")},{json:"payload",js:"payload",typ:Yt("FindIntentsByContextAgentErrorResponsePayload")},{json:"type",js:"type",typ:Yt("FindIntentsByContextAgentErrorResponseType")}],!1),FindIntentsByContextAgentErrorResponseMeta:zt([{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"timestamp",js:"timestamp",typ:Date}],!1),FindIntentsByContextAgentErrorResponsePayload:zt([{json:"error",js:"error",typ:Yt("ErrorMessage")}],!1),FindIntentsByContextAgentRequest:zt([{json:"meta",js:"meta",typ:Yt("FindIntentsByContextAgentRequestMeta")},{json:"payload",js:"payload",typ:Yt("FindIntentsByContextAgentRequestPayload")},{json:"type",js:"type",typ:Yt("FindIntentsByContextAgentRequestType")}],!1),FindIntentsByContextAgentRequestMeta:zt([{json:"requestUuid",js:"requestUuid",typ:""},{json:"source",js:"source",typ:Vt(void 0,Yt("SourceObject"))},{json:"timestamp",js:"timestamp",typ:Date},{json:"destination",js:"destination",typ:Vt(void 0,Yt("BridgeParticipantIdentifier"))}],!1),FindIntentsByContextAgentRequestPayload:zt([{json:"context",js:"context",typ:Yt("ContextElement")}],!1),FindIntentsByContextAgentResponse:zt([{json:"meta",js:"meta",typ:Yt("FindIntentsByContextAgentResponseMeta")},{json:"payload",js:"payload",typ:Yt("FindIntentsByContextAgentResponsePayload")},{json:"type",js:"type",typ:Yt("FindIntentsByContextAgentErrorResponseType")}],!1),FindIntentsByContextAgentResponseMeta:zt([{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"timestamp",js:"timestamp",typ:Date}],!1),FindIntentsByContextAgentResponsePayload:zt([{json:"appIntents",js:"appIntents",typ:Ht(Yt("AppIntent"))}],!1),FindIntentsByContextBridgeErrorResponse:zt([{json:"meta",js:"meta",typ:Yt("FindIntentsByContextBridgeErrorResponseMeta")},{json:"payload",js:"payload",typ:Yt("FindIntentsByContextBridgeErrorResponsePayload")},{json:"type",js:"type",typ:Yt("FindIntentsByContextAgentErrorResponseType")}],!1),FindIntentsByContextBridgeErrorResponseMeta:zt([{json:"errorDetails",js:"errorDetails",typ:Ht(Yt("ResponseErrorDetail"))},{json:"errorSources",js:"errorSources",typ:Ht(Yt("DesktopAgentIdentifier"))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"timestamp",js:"timestamp",typ:Date}],!1),FindIntentsByContextBridgeErrorResponsePayload:zt([{json:"error",js:"error",typ:Yt("ErrorMessage")}],!1),FindIntentsByContextBridgeRequest:zt([{json:"meta",js:"meta",typ:Yt("FindIntentsByContextBridgeRequestMeta")},{json:"payload",js:"payload",typ:Yt("FindIntentsByContextBridgeRequestPayload")},{json:"type",js:"type",typ:Yt("FindIntentsByContextAgentRequestType")}],!1),FindIntentsByContextBridgeRequestMeta:zt([{json:"requestUuid",js:"requestUuid",typ:""},{json:"source",js:"source",typ:Yt("MetaSource")},{json:"timestamp",js:"timestamp",typ:Date},{json:"destination",js:"destination",typ:Vt(void 0,Yt("BridgeParticipantIdentifier"))}],!1),FindIntentsByContextBridgeRequestPayload:zt([{json:"context",js:"context",typ:Yt("ContextElement")}],!1),FindIntentsByContextBridgeResponse:zt([{json:"meta",js:"meta",typ:Yt("FindIntentsByContextBridgeResponseMeta")},{json:"payload",js:"payload",typ:Yt("FindIntentsByContextBridgeResponsePayload")},{json:"type",js:"type",typ:Yt("FindIntentsByContextAgentErrorResponseType")}],!1),FindIntentsByContextBridgeResponseMeta:zt([{json:"errorDetails",js:"errorDetails",typ:Vt(void 0,Ht(Yt("ResponseErrorDetail")))},{json:"errorSources",js:"errorSources",typ:Vt(void 0,Ht(Yt("DesktopAgentIdentifier")))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"sources",js:"sources",typ:Vt(void 0,Ht(Yt("DesktopAgentIdentifier")))},{json:"timestamp",js:"timestamp",typ:Date}],!1),FindIntentsByContextBridgeResponsePayload:zt([{json:"appIntents",js:"appIntents",typ:Ht(Yt("AppIntent"))}],!1),GetAppMetadataAgentErrorResponse:zt([{json:"meta",js:"meta",typ:Yt("GetAppMetadataAgentErrorResponseMeta")},{json:"payload",js:"payload",typ:Yt("GetAppMetadataAgentErrorResponsePayload")},{json:"type",js:"type",typ:Yt("GetAppMetadataAgentErrorResponseType")}],!1),GetAppMetadataAgentErrorResponseMeta:zt([{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"timestamp",js:"timestamp",typ:Date}],!1),GetAppMetadataAgentErrorResponsePayload:zt([{json:"error",js:"error",typ:Yt("ErrorMessage")}],!1),GetAppMetadataAgentRequest:zt([{json:"meta",js:"meta",typ:Yt("GetAppMetadataAgentRequestMeta")},{json:"payload",js:"payload",typ:Yt("GetAppMetadataAgentRequestPayload")},{json:"type",js:"type",typ:Yt("GetAppMetadataAgentRequestType")}],!1),GetAppMetadataAgentRequestMeta:zt([{json:"destination",js:"destination",typ:Vt(void 0,Yt("DestinationObject"))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"source",js:"source",typ:Vt(void 0,Yt("SourceIdentifier"))},{json:"timestamp",js:"timestamp",typ:Date}],!1),GetAppMetadataAgentRequestPayload:zt([{json:"app",js:"app",typ:Yt("AppDestinationIdentifier")}],!1),AppDestinationIdentifier:zt([{json:"desktopAgent",js:"desktopAgent",typ:""},{json:"appId",js:"appId",typ:""},{json:"instanceId",js:"instanceId",typ:Vt(void 0,"")}],"any"),GetAppMetadataAgentResponse:zt([{json:"meta",js:"meta",typ:Yt("GetAppMetadataAgentResponseMeta")},{json:"payload",js:"payload",typ:Yt("GetAppMetadataAgentResponsePayload")},{json:"type",js:"type",typ:Yt("GetAppMetadataAgentErrorResponseType")}],!1),GetAppMetadataAgentResponseMeta:zt([{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"timestamp",js:"timestamp",typ:Date}],!1),GetAppMetadataAgentResponsePayload:zt([{json:"appMetadata",js:"appMetadata",typ:Yt("AppMetadata")}],!1),GetAppMetadataBridgeErrorResponse:zt([{json:"meta",js:"meta",typ:Yt("GetAppMetadataBridgeErrorResponseMeta")},{json:"payload",js:"payload",typ:Yt("GetAppMetadataBridgeErrorResponsePayload")},{json:"type",js:"type",typ:Yt("GetAppMetadataAgentErrorResponseType")}],!1),GetAppMetadataBridgeErrorResponseMeta:zt([{json:"errorDetails",js:"errorDetails",typ:Ht(Yt("ResponseErrorDetail"))},{json:"errorSources",js:"errorSources",typ:Ht(Yt("DesktopAgentIdentifier"))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"timestamp",js:"timestamp",typ:Date}],!1),GetAppMetadataBridgeErrorResponsePayload:zt([{json:"error",js:"error",typ:Yt("ErrorMessage")}],!1),GetAppMetadataBridgeRequest:zt([{json:"meta",js:"meta",typ:Yt("GetAppMetadataBridgeRequestMeta")},{json:"payload",js:"payload",typ:Yt("GetAppMetadataBridgeRequestPayload")},{json:"type",js:"type",typ:Yt("GetAppMetadataAgentRequestType")}],!1),GetAppMetadataBridgeRequestMeta:zt([{json:"destination",js:"destination",typ:Vt(void 0,Yt("DestinationObject"))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"source",js:"source",typ:Yt("MetaSourceObject")},{json:"timestamp",js:"timestamp",typ:Date}],!1),GetAppMetadataBridgeRequestPayload:zt([{json:"app",js:"app",typ:Yt("AppDestinationIdentifier")}],!1),GetAppMetadataBridgeResponse:zt([{json:"meta",js:"meta",typ:Yt("GetAppMetadataBridgeResponseMeta")},{json:"payload",js:"payload",typ:Yt("GetAppMetadataBridgeResponsePayload")},{json:"type",js:"type",typ:Yt("GetAppMetadataAgentErrorResponseType")}],!1),GetAppMetadataBridgeResponseMeta:zt([{json:"errorDetails",js:"errorDetails",typ:Vt(void 0,Ht(Yt("ResponseErrorDetail")))},{json:"errorSources",js:"errorSources",typ:Vt(void 0,Ht(Yt("DesktopAgentIdentifier")))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"sources",js:"sources",typ:Vt(void 0,Ht(Yt("DesktopAgentIdentifier")))},{json:"timestamp",js:"timestamp",typ:Date}],!1),GetAppMetadataBridgeResponsePayload:zt([{json:"appMetadata",js:"appMetadata",typ:Yt("AppMetadata")}],!1),OpenAgentErrorResponse:zt([{json:"meta",js:"meta",typ:Yt("OpenAgentErrorResponseMeta")},{json:"payload",js:"payload",typ:Yt("OpenAgentErrorResponsePayload")},{json:"type",js:"type",typ:Yt("OpenAgentErrorResponseType")}],!1),OpenAgentErrorResponseMeta:zt([{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"timestamp",js:"timestamp",typ:Date}],!1),OpenAgentErrorResponsePayload:zt([{json:"error",js:"error",typ:Yt("OpenErrorMessage")}],!1),OpenAgentRequest:zt([{json:"meta",js:"meta",typ:Yt("OpenAgentRequestMeta")},{json:"payload",js:"payload",typ:Yt("OpenAgentRequestPayload")},{json:"type",js:"type",typ:Yt("OpenAgentRequestType")}],!1),OpenAgentRequestMeta:zt([{json:"destination",js:"destination",typ:Vt(void 0,Yt("DestinationObject"))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"source",js:"source",typ:Yt("SourceObject")},{json:"timestamp",js:"timestamp",typ:Date}],!1),OpenAgentRequestPayload:zt([{json:"app",js:"app",typ:Yt("AppToOpen")},{json:"context",js:"context",typ:Vt(void 0,Yt("ContextElement"))}],!1),AppToOpen:zt([{json:"desktopAgent",js:"desktopAgent",typ:""},{json:"appId",js:"appId",typ:""},{json:"instanceId",js:"instanceId",typ:Vt(void 0,"")}],"any"),OpenAgentResponse:zt([{json:"meta",js:"meta",typ:Yt("OpenAgentResponseMeta")},{json:"payload",js:"payload",typ:Yt("OpenAgentResponsePayload")},{json:"type",js:"type",typ:Yt("OpenAgentErrorResponseType")}],!1),OpenAgentResponseMeta:zt([{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"timestamp",js:"timestamp",typ:Date}],!1),OpenAgentResponsePayload:zt([{json:"appIdentifier",js:"appIdentifier",typ:Yt("AppIdentifier")}],!1),OpenBridgeErrorResponse:zt([{json:"meta",js:"meta",typ:Yt("OpenBridgeErrorResponseMeta")},{json:"payload",js:"payload",typ:Yt("OpenBridgeErrorResponsePayload")},{json:"type",js:"type",typ:Yt("OpenAgentErrorResponseType")}],!1),OpenBridgeErrorResponseMeta:zt([{json:"errorDetails",js:"errorDetails",typ:Ht(Yt("ResponseErrorDetail"))},{json:"errorSources",js:"errorSources",typ:Ht(Yt("DesktopAgentIdentifier"))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"timestamp",js:"timestamp",typ:Date}],!1),OpenBridgeErrorResponsePayload:zt([{json:"error",js:"error",typ:Yt("OpenErrorMessage")}],!1),OpenBridgeRequest:zt([{json:"meta",js:"meta",typ:Yt("OpenBridgeRequestMeta")},{json:"payload",js:"payload",typ:Yt("OpenBridgeRequestPayload")},{json:"type",js:"type",typ:Yt("OpenAgentRequestType")}],!1),OpenBridgeRequestMeta:zt([{json:"destination",js:"destination",typ:Vt(void 0,Yt("DestinationObject"))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"source",js:"source",typ:Yt("MetaSource")},{json:"timestamp",js:"timestamp",typ:Date}],!1),OpenBridgeRequestPayload:zt([{json:"app",js:"app",typ:Yt("AppToOpen")},{json:"context",js:"context",typ:Vt(void 0,Yt("ContextElement"))}],!1),OpenBridgeResponse:zt([{json:"meta",js:"meta",typ:Yt("OpenBridgeResponseMeta")},{json:"payload",js:"payload",typ:Yt("OpenBridgeResponsePayload")},{json:"type",js:"type",typ:Yt("OpenAgentErrorResponseType")}],!1),OpenBridgeResponseMeta:zt([{json:"errorDetails",js:"errorDetails",typ:Vt(void 0,Ht(Yt("ResponseErrorDetail")))},{json:"errorSources",js:"errorSources",typ:Vt(void 0,Ht(Yt("DesktopAgentIdentifier")))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"sources",js:"sources",typ:Vt(void 0,Ht(Yt("DesktopAgentIdentifier")))},{json:"timestamp",js:"timestamp",typ:Date}],!1),OpenBridgeResponsePayload:zt([{json:"appIdentifier",js:"appIdentifier",typ:Yt("AppIdentifier")}],!1),PrivateChannelBroadcastAgentRequest:zt([{json:"meta",js:"meta",typ:Yt("PrivateChannelBroadcastAgentRequestMeta")},{json:"payload",js:"payload",typ:Yt("PrivateChannelBroadcastAgentRequestPayload")},{json:"type",js:"type",typ:Yt("PrivateChannelBroadcastAgentRequestType")}],!1),PrivateChannelBroadcastAgentRequestMeta:zt([{json:"destination",js:"destination",typ:Vt(void 0,Yt("MetaDestination"))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"source",js:"source",typ:Vt(void 0,Yt("SourceObject"))},{json:"timestamp",js:"timestamp",typ:Date}],!1),MetaDestination:zt([{json:"desktopAgent",js:"desktopAgent",typ:""},{json:"appId",js:"appId",typ:""},{json:"instanceId",js:"instanceId",typ:Vt(void 0,"")}],"any"),PrivateChannelBroadcastAgentRequestPayload:zt([{json:"channelId",js:"channelId",typ:""},{json:"context",js:"context",typ:Yt("ContextElement")}],!1),PrivateChannelBroadcastBridgeRequest:zt([{json:"meta",js:"meta",typ:Yt("PrivateChannelBroadcastBridgeRequestMeta")},{json:"payload",js:"payload",typ:Yt("PrivateChannelBroadcastBridgeRequestPayload")},{json:"type",js:"type",typ:Yt("PrivateChannelBroadcastAgentRequestType")}],!1),PrivateChannelBroadcastBridgeRequestMeta:zt([{json:"destination",js:"destination",typ:Vt(void 0,Yt("MetaDestination"))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"source",js:"source",typ:Yt("MetaSource")},{json:"timestamp",js:"timestamp",typ:Date}],!1),PrivateChannelBroadcastBridgeRequestPayload:zt([{json:"channelId",js:"channelId",typ:""},{json:"context",js:"context",typ:Yt("ContextElement")}],!1),PrivateChannelEventListenerAddedAgentRequest:zt([{json:"meta",js:"meta",typ:Yt("PrivateChannelEventListenerAddedAgentRequestMeta")},{json:"payload",js:"payload",typ:Yt("PrivateChannelEventListenerAddedAgentRequestPayload")},{json:"type",js:"type",typ:Yt("PrivateChannelEventListenerAddedAgentRequestType")}],!1),PrivateChannelEventListenerAddedAgentRequestMeta:zt([{json:"destination",js:"destination",typ:Vt(void 0,Yt("MetaDestination"))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"source",js:"source",typ:Vt(void 0,Yt("SourceObject"))},{json:"timestamp",js:"timestamp",typ:Date}],!1),PrivateChannelEventListenerAddedAgentRequestPayload:zt([{json:"channelId",js:"channelId",typ:""},{json:"listenerType",js:"listenerType",typ:Yt("PrivateChannelEventListenerTypes")}],!1),PrivateChannelEventListenerAddedBridgeRequest:zt([{json:"meta",js:"meta",typ:Yt("PrivateChannelEventListenerAddedBridgeRequestMeta")},{json:"payload",js:"payload",typ:Yt("PrivateChannelEventListenerAddedBridgeRequestPayload")},{json:"type",js:"type",typ:Yt("PrivateChannelEventListenerAddedAgentRequestType")}],!1),PrivateChannelEventListenerAddedBridgeRequestMeta:zt([{json:"destination",js:"destination",typ:Vt(void 0,Yt("MetaDestination"))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"source",js:"source",typ:Yt("MetaSource")},{json:"timestamp",js:"timestamp",typ:Date}],!1),PrivateChannelEventListenerAddedBridgeRequestPayload:zt([{json:"channelId",js:"channelId",typ:""},{json:"listenerType",js:"listenerType",typ:Yt("PrivateChannelEventListenerTypes")}],!1),PrivateChannelEventListenerRemovedAgentRequest:zt([{json:"meta",js:"meta",typ:Yt("PrivateChannelEventListenerRemovedAgentRequestMeta")},{json:"payload",js:"payload",typ:Yt("PrivateChannelEventListenerRemovedAgentRequestPayload")},{json:"type",js:"type",typ:Yt("PrivateChannelEventListenerRemovedAgentRequestType")}],!1),PrivateChannelEventListenerRemovedAgentRequestMeta:zt([{json:"destination",js:"destination",typ:Vt(void 0,Yt("MetaDestination"))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"source",js:"source",typ:Vt(void 0,Yt("SourceObject"))},{json:"timestamp",js:"timestamp",typ:Date}],!1),PrivateChannelEventListenerRemovedAgentRequestPayload:zt([{json:"channelId",js:"channelId",typ:""},{json:"listenerType",js:"listenerType",typ:Yt("PrivateChannelEventListenerTypes")}],!1),PrivateChannelEventListenerRemovedBridgeRequest:zt([{json:"meta",js:"meta",typ:Yt("PrivateChannelEventListenerRemovedBridgeRequestMeta")},{json:"payload",js:"payload",typ:Yt("PrivateChannelEventListenerRemovedBridgeRequestPayload")},{json:"type",js:"type",typ:Yt("PrivateChannelEventListenerRemovedAgentRequestType")}],!1),PrivateChannelEventListenerRemovedBridgeRequestMeta:zt([{json:"destination",js:"destination",typ:Vt(void 0,Yt("MetaDestination"))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"source",js:"source",typ:Yt("MetaSource")},{json:"timestamp",js:"timestamp",typ:Date}],!1),PrivateChannelEventListenerRemovedBridgeRequestPayload:zt([{json:"channelId",js:"channelId",typ:""},{json:"listenerType",js:"listenerType",typ:Yt("PrivateChannelEventListenerTypes")}],!1),PrivateChannelOnAddContextListenerAgentRequest:zt([{json:"meta",js:"meta",typ:Yt("PrivateChannelOnAddContextListenerAgentRequestMeta")},{json:"payload",js:"payload",typ:Yt("PrivateChannelOnAddContextListenerAgentRequestPayload")},{json:"type",js:"type",typ:Yt("PrivateChannelOnAddContextListenerAgentRequestType")}],!1),PrivateChannelOnAddContextListenerAgentRequestMeta:zt([{json:"destination",js:"destination",typ:Vt(void 0,Yt("MetaDestination"))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"source",js:"source",typ:Vt(void 0,Yt("SourceObject"))},{json:"timestamp",js:"timestamp",typ:Date}],!1),PrivateChannelOnAddContextListenerAgentRequestPayload:zt([{json:"channelId",js:"channelId",typ:""},{json:"contextType",js:"contextType",typ:Vt(null,"")}],!1),PrivateChannelOnAddContextListenerBridgeRequest:zt([{json:"meta",js:"meta",typ:Yt("PrivateChannelOnAddContextListenerBridgeRequestMeta")},{json:"payload",js:"payload",typ:Yt("PrivateChannelOnAddContextListenerBridgeRequestPayload")},{json:"type",js:"type",typ:Yt("PrivateChannelOnAddContextListenerAgentRequestType")}],!1),PrivateChannelOnAddContextListenerBridgeRequestMeta:zt([{json:"destination",js:"destination",typ:Vt(void 0,Yt("MetaDestination"))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"source",js:"source",typ:Yt("MetaSource")},{json:"timestamp",js:"timestamp",typ:Date}],!1),PrivateChannelOnAddContextListenerBridgeRequestPayload:zt([{json:"channelId",js:"channelId",typ:""},{json:"contextType",js:"contextType",typ:Vt(null,"")}],!1),PrivateChannelOnDisconnectAgentRequest:zt([{json:"meta",js:"meta",typ:Yt("PrivateChannelOnDisconnectAgentRequestMeta")},{json:"payload",js:"payload",typ:Yt("PrivateChannelOnDisconnectAgentRequestPayload")},{json:"type",js:"type",typ:Yt("PrivateChannelOnDisconnectAgentRequestType")}],!1),PrivateChannelOnDisconnectAgentRequestMeta:zt([{json:"destination",js:"destination",typ:Vt(void 0,Yt("MetaDestination"))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"source",js:"source",typ:Vt(void 0,Yt("SourceObject"))},{json:"timestamp",js:"timestamp",typ:Date}],!1),PrivateChannelOnDisconnectAgentRequestPayload:zt([{json:"channelId",js:"channelId",typ:""}],!1),PrivateChannelOnDisconnectBridgeRequest:zt([{json:"meta",js:"meta",typ:Yt("PrivateChannelOnDisconnectBridgeRequestMeta")},{json:"payload",js:"payload",typ:Yt("PrivateChannelOnDisconnectBridgeRequestPayload")},{json:"type",js:"type",typ:Yt("PrivateChannelOnDisconnectAgentRequestType")}],!1),PrivateChannelOnDisconnectBridgeRequestMeta:zt([{json:"destination",js:"destination",typ:Vt(void 0,Yt("MetaDestination"))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"source",js:"source",typ:Yt("MetaSource")},{json:"timestamp",js:"timestamp",typ:Date}],!1),PrivateChannelOnDisconnectBridgeRequestPayload:zt([{json:"channelId",js:"channelId",typ:""}],!1),PrivateChannelOnUnsubscribeAgentRequest:zt([{json:"meta",js:"meta",typ:Yt("PrivateChannelOnUnsubscribeAgentRequestMeta")},{json:"payload",js:"payload",typ:Yt("PrivateChannelOnUnsubscribeAgentRequestPayload")},{json:"type",js:"type",typ:Yt("PrivateChannelOnUnsubscribeAgentRequestType")}],!1),PrivateChannelOnUnsubscribeAgentRequestMeta:zt([{json:"destination",js:"destination",typ:Vt(void 0,Yt("MetaDestination"))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"source",js:"source",typ:Vt(void 0,Yt("SourceObject"))},{json:"timestamp",js:"timestamp",typ:Date}],!1),PrivateChannelOnUnsubscribeAgentRequestPayload:zt([{json:"channelId",js:"channelId",typ:""},{json:"contextType",js:"contextType",typ:Vt(null,"")}],!1),PrivateChannelOnUnsubscribeBridgeRequest:zt([{json:"meta",js:"meta",typ:Yt("ERequestMetadata")},{json:"payload",js:"payload",typ:Yt("PrivateChannelOnUnsubscribeBridgeRequestPayload")},{json:"type",js:"type",typ:Yt("PrivateChannelOnUnsubscribeAgentRequestType")}],!1),ERequestMetadata:zt([{json:"destination",js:"destination",typ:Vt(void 0,Yt("MetaDestination"))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"source",js:"source",typ:Yt("MetaSource")},{json:"timestamp",js:"timestamp",typ:Date}],!1),PrivateChannelOnUnsubscribeBridgeRequestPayload:zt([{json:"channelId",js:"channelId",typ:""},{json:"contextType",js:"contextType",typ:Vt(null,"")}],!1),RaiseIntentAgentErrorResponse:zt([{json:"meta",js:"meta",typ:Yt("RaiseIntentAgentErrorResponseMeta")},{json:"payload",js:"payload",typ:Yt("RaiseIntentAgentErrorResponsePayload")},{json:"type",js:"type",typ:Yt("RaiseIntentAgentErrorResponseType")}],!1),RaiseIntentAgentErrorResponseMeta:zt([{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"timestamp",js:"timestamp",typ:Date}],!1),RaiseIntentAgentErrorResponsePayload:zt([{json:"error",js:"error",typ:Yt("ErrorMessage")}],!1),RaiseIntentAgentRequest:zt([{json:"meta",js:"meta",typ:Yt("RaiseIntentAgentRequestMeta")},{json:"payload",js:"payload",typ:Yt("RaiseIntentAgentRequestPayload")},{json:"type",js:"type",typ:Yt("RaiseIntentAgentRequestType")}],!1),RaiseIntentAgentRequestMeta:zt([{json:"destination",js:"destination",typ:Yt("MetaDestination")},{json:"requestUuid",js:"requestUuid",typ:""},{json:"source",js:"source",typ:Yt("SourceObject")},{json:"timestamp",js:"timestamp",typ:Date}],!1),RaiseIntentAgentRequestPayload:zt([{json:"app",js:"app",typ:Yt("AppDestinationIdentifier")},{json:"context",js:"context",typ:Yt("ContextElement")},{json:"intent",js:"intent",typ:""}],!1),RaiseIntentAgentResponse:zt([{json:"meta",js:"meta",typ:Yt("RaiseIntentAgentResponseMeta")},{json:"payload",js:"payload",typ:Yt("RaiseIntentAgentResponsePayload")},{json:"type",js:"type",typ:Yt("RaiseIntentAgentErrorResponseType")}],!1),RaiseIntentAgentResponseMeta:zt([{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"timestamp",js:"timestamp",typ:Date}],!1),RaiseIntentAgentResponsePayload:zt([{json:"intentResolution",js:"intentResolution",typ:Yt("IntentResolution")}],!1),IntentResolution:zt([{json:"intent",js:"intent",typ:""},{json:"source",js:"source",typ:Yt("AppIdentifier")},{json:"version",js:"version",typ:Vt(void 0,"")}],!1),RaiseIntentBridgeErrorResponse:zt([{json:"meta",js:"meta",typ:Yt("RaiseIntentBridgeErrorResponseMeta")},{json:"payload",js:"payload",typ:Yt("RaiseIntentBridgeErrorResponsePayload")},{json:"type",js:"type",typ:Yt("RaiseIntentAgentErrorResponseType")}],!1),RaiseIntentBridgeErrorResponseMeta:zt([{json:"errorDetails",js:"errorDetails",typ:Ht(Yt("ResponseErrorDetail"))},{json:"errorSources",js:"errorSources",typ:Ht(Yt("DesktopAgentIdentifier"))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"timestamp",js:"timestamp",typ:Date}],!1),RaiseIntentBridgeErrorResponsePayload:zt([{json:"error",js:"error",typ:Yt("ErrorMessage")}],!1),RaiseIntentBridgeRequest:zt([{json:"meta",js:"meta",typ:Yt("RaiseIntentBridgeRequestMeta")},{json:"payload",js:"payload",typ:Yt("RaiseIntentBridgeRequestPayload")},{json:"type",js:"type",typ:Yt("RaiseIntentAgentRequestType")}],!1),RaiseIntentBridgeRequestMeta:zt([{json:"destination",js:"destination",typ:Yt("MetaDestination")},{json:"requestUuid",js:"requestUuid",typ:""},{json:"source",js:"source",typ:Yt("MetaSource")},{json:"timestamp",js:"timestamp",typ:Date}],!1),RaiseIntentBridgeRequestPayload:zt([{json:"app",js:"app",typ:Yt("AppDestinationIdentifier")},{json:"context",js:"context",typ:Yt("ContextElement")},{json:"intent",js:"intent",typ:""}],!1),RaiseIntentBridgeResponse:zt([{json:"meta",js:"meta",typ:Yt("RaiseIntentBridgeResponseMeta")},{json:"payload",js:"payload",typ:Yt("RaiseIntentBridgeResponsePayload")},{json:"type",js:"type",typ:Yt("RaiseIntentAgentErrorResponseType")}],!1),RaiseIntentBridgeResponseMeta:zt([{json:"errorDetails",js:"errorDetails",typ:Vt(void 0,Ht(Yt("ResponseErrorDetail")))},{json:"errorSources",js:"errorSources",typ:Vt(void 0,Ht(Yt("DesktopAgentIdentifier")))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"sources",js:"sources",typ:Vt(void 0,Ht(Yt("DesktopAgentIdentifier")))},{json:"timestamp",js:"timestamp",typ:Date}],!1),RaiseIntentBridgeResponsePayload:zt([{json:"intentResolution",js:"intentResolution",typ:Yt("IntentResolution")}],!1),RaiseIntentResultAgentErrorResponse:zt([{json:"meta",js:"meta",typ:Yt("RaiseIntentResultAgentErrorResponseMeta")},{json:"payload",js:"payload",typ:Yt("RaiseIntentResultAgentErrorResponsePayload")},{json:"type",js:"type",typ:Yt("RaiseIntentResultAgentErrorResponseType")}],!1),RaiseIntentResultAgentErrorResponseMeta:zt([{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"timestamp",js:"timestamp",typ:Date}],!1),RaiseIntentResultAgentErrorResponsePayload:zt([{json:"error",js:"error",typ:Yt("RaiseIntentResultErrorMessage")}],!1),RaiseIntentResultAgentResponse:zt([{json:"meta",js:"meta",typ:Yt("RaiseIntentResultAgentResponseMeta")},{json:"payload",js:"payload",typ:Yt("RaiseIntentResultAgentResponsePayload")},{json:"type",js:"type",typ:Yt("RaiseIntentResultAgentErrorResponseType")}],!1),RaiseIntentResultAgentResponseMeta:zt([{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"timestamp",js:"timestamp",typ:Date}],!1),RaiseIntentResultAgentResponsePayload:zt([{json:"intentResult",js:"intentResult",typ:Yt("IntentResult")}],!1),IntentResult:zt([{json:"context",js:"context",typ:Vt(void 0,Yt("ContextElement"))},{json:"channel",js:"channel",typ:Vt(void 0,Yt("Channel"))}],!1),Channel:zt([{json:"displayMetadata",js:"displayMetadata",typ:Vt(void 0,Yt("DisplayMetadata"))},{json:"id",js:"id",typ:""},{json:"type",js:"type",typ:Yt("Type")}],!1),DisplayMetadata:zt([{json:"color",js:"color",typ:Vt(void 0,"")},{json:"glyph",js:"glyph",typ:Vt(void 0,"")},{json:"name",js:"name",typ:Vt(void 0,"")}],!1),RaiseIntentResultBridgeErrorResponse:zt([{json:"meta",js:"meta",typ:Yt("RaiseIntentResultBridgeErrorResponseMeta")},{json:"payload",js:"payload",typ:Yt("RaiseIntentResultBridgeErrorResponsePayload")},{json:"type",js:"type",typ:Yt("RaiseIntentResultAgentErrorResponseType")}],!1),RaiseIntentResultBridgeErrorResponseMeta:zt([{json:"errorDetails",js:"errorDetails",typ:Ht(Yt("ResponseErrorDetail"))},{json:"errorSources",js:"errorSources",typ:Ht(Yt("DesktopAgentIdentifier"))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"timestamp",js:"timestamp",typ:Date}],!1),RaiseIntentResultBridgeErrorResponsePayload:zt([{json:"error",js:"error",typ:Yt("RaiseIntentResultErrorMessage")}],!1),RaiseIntentResultBridgeResponse:zt([{json:"meta",js:"meta",typ:Yt("RaiseIntentResultBridgeResponseMeta")},{json:"payload",js:"payload",typ:Yt("RaiseIntentResultBridgeResponsePayload")},{json:"type",js:"type",typ:Yt("RaiseIntentResultAgentErrorResponseType")}],!1),RaiseIntentResultBridgeResponseMeta:zt([{json:"errorDetails",js:"errorDetails",typ:Vt(void 0,Ht(Yt("ResponseErrorDetail")))},{json:"errorSources",js:"errorSources",typ:Vt(void 0,Ht(Yt("DesktopAgentIdentifier")))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"sources",js:"sources",typ:Vt(void 0,Ht(Yt("DesktopAgentIdentifier")))},{json:"timestamp",js:"timestamp",typ:Date}],!1),RaiseIntentResultBridgeResponsePayload:zt([{json:"intentResult",js:"intentResult",typ:Yt("IntentResult")}],!1),Context:zt([{json:"id",js:"id",typ:Vt(void 0,Gt("any"))},{json:"name",js:"name",typ:Vt(void 0,"")},{json:"type",js:"type",typ:""}],"any"),ResponseErrorDetail:["AccessDenied","AgentDisconnected","AppNotFound","AppTimeout","CreationFailed","DesktopAgentNotFound","ErrorOnLaunch","IntentDeliveryFailed","IntentHandlerRejected","MalformedContext","MalformedMessage","NoAppsFound","NoChannelFound","NoResultReturned","NotConnectedToBridge","ResolverTimeout","ResolverUnavailable","ResponseToBridgeTimedOut","TargetAppUnavailable","TargetInstanceUnavailable","UserCancelledResolution"],ResponseMessageType:["findInstancesResponse","findIntentResponse","findIntentsByContextResponse","getAppMetadataResponse","openResponse","raiseIntentResponse","raiseIntentResultResponse"],RequestMessageType:["broadcastRequest","findInstancesRequest","findIntentRequest","findIntentsByContextRequest","getAppMetadataRequest","openRequest","PrivateChannel.broadcast","PrivateChannel.eventListenerAdded","PrivateChannel.eventListenerRemoved","PrivateChannel.onAddContextListener","PrivateChannel.onDisconnect","PrivateChannel.onUnsubscribe","raiseIntentRequest"],BroadcastAgentRequestType:["broadcastRequest"],ConnectionStepMessageType:["authenticationFailed","connectedAgentsUpdate","handshake","hello"],ConnectionStep2HelloType:["hello"],ConnectionStep3HandshakeType:["handshake"],ConnectionStep4AuthenticationFailedType:["authenticationFailed"],ConnectionStep6ConnectedAgentsUpdateType:["connectedAgentsUpdate"],ErrorMessage:["AgentDisconnected","DesktopAgentNotFound","IntentDeliveryFailed","MalformedContext","MalformedMessage","NoAppsFound","NotConnectedToBridge","ResolverTimeout","ResolverUnavailable","ResponseToBridgeTimedOut","TargetAppUnavailable","TargetInstanceUnavailable","UserCancelledResolution"],FindInstancesAgentErrorResponseType:["findInstancesResponse"],FindInstancesAgentRequestType:["findInstancesRequest"],FindIntentAgentErrorResponseType:["findIntentResponse"],FindIntentAgentRequestType:["findIntentRequest"],FindIntentsByContextAgentErrorResponseType:["findIntentsByContextResponse"],FindIntentsByContextAgentRequestType:["findIntentsByContextRequest"],GetAppMetadataAgentErrorResponseType:["getAppMetadataResponse"],GetAppMetadataAgentRequestType:["getAppMetadataRequest"],OpenErrorMessage:["AgentDisconnected","AppNotFound","AppTimeout","DesktopAgentNotFound","ErrorOnLaunch","MalformedContext","MalformedMessage","NotConnectedToBridge","ResolverUnavailable","ResponseToBridgeTimedOut"],OpenAgentErrorResponseType:["openResponse"],OpenAgentRequestType:["openRequest"],PrivateChannelBroadcastAgentRequestType:["PrivateChannel.broadcast"],PrivateChannelEventListenerTypes:["onAddContextListener","onDisconnect","onUnsubscribe"],PrivateChannelEventListenerAddedAgentRequestType:["PrivateChannel.eventListenerAdded"],PrivateChannelEventListenerRemovedAgentRequestType:["PrivateChannel.eventListenerRemoved"],PrivateChannelOnAddContextListenerAgentRequestType:["PrivateChannel.onAddContextListener"],PrivateChannelOnDisconnectAgentRequestType:["PrivateChannel.onDisconnect"],PrivateChannelOnUnsubscribeAgentRequestType:["PrivateChannel.onUnsubscribe"],RaiseIntentAgentErrorResponseType:["raiseIntentResponse"],RaiseIntentAgentRequestType:["raiseIntentRequest"],RaiseIntentResultErrorMessage:["AgentDisconnected","IntentHandlerRejected","MalformedMessage","NoResultReturned","NotConnectedToBridge","ResponseToBridgeTimedOut"],RaiseIntentResultAgentErrorResponseType:["raiseIntentResultResponse"],Type:["app","private","user"]};!function(e){e.AppNotFound="AppNotFound",e.ErrorOnLaunch="ErrorOnLaunch",e.AppTimeout="AppTimeout",e.ResolverUnavailable="ResolverUnavailable",e.MalformedContext="MalformedContext",e.DesktopAgentNotFound="DesktopAgentNotFound"}(Qt||(Qt={})),function(e){e.NoAppsFound="NoAppsFound",e.ResolverUnavailable="ResolverUnavailable",e.UserCancelled="UserCancelledResolution",e.ResolverTimeout="ResolverTimeout",e.TargetAppUnavailable="TargetAppUnavailable",e.TargetInstanceUnavailable="TargetInstanceUnavailable",e.IntentDeliveryFailed="IntentDeliveryFailed",e.MalformedContext="MalformedContext",e.DesktopAgentNotFound="DesktopAgentNotFound"}(Kt||(Kt={})),function(e){e.NoResultReturned="NoResultReturned",e.IntentHandlerRejected="IntentHandlerRejected"}(Zt||(Zt={})),function(e){e.NoChannelFound="NoChannelFound",e.AccessDenied="AccessDenied",e.CreationFailed="CreationFailed",e.MalformedContext="MalformedContext"}(Xt||(Xt={})),function(e){e.ResponseTimedOut="ResponseToBridgeTimedOut",e.AgentDisconnected="AgentDisconnected",e.NotConnectedToBridge="NotConnectedToBridge",e.MalformedMessage="MalformedMessage"}(en||(en={})),"function"==typeof SuppressedError&&SuppressedError;var nn,rn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e}("fdc3.action","fdc3.chart","fdc3.chat.initSettings","fdc3.chat.message","fdc3.chat.room","fdc3.chat.searchCriteria","fdc3.contact","fdc3.contactList","fdc3.country","fdc3.currency","fdc3.email","fdc3.instrument","fdc3.instrumentList","fdc3.interaction","fdc3.message","fdc3.organization","fdc3.portfolio","fdc3.position","fdc3.nothing","fdc3.timeRange","fdc3.transactionResult","fdc3.valuation"),sn=(new Set(rn),function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e}("CreateInteraction","SendChatMessage","StartCall","StartChat","StartEmail","ViewAnalysis","ViewChat","ViewChart","ViewContact","ViewHoldings","ViewInstrument","ViewInteractions","ViewMessages","ViewNews","ViewOrders","ViewProfile","ViewQuote","ViewResearch"));function on(e,t,n,r){void 0===r&&(r="");var i=an(e),s=r?" on ".concat(r):"",o=n?' for key "'.concat(n,'"'):"";throw Error("Invalid value".concat(o).concat(s,". Expected ").concat(i," but got ").concat(JSON.stringify(t)))}function an(e){return Array.isArray(e)?2===e.length&&void 0===e[0]?"an optional ".concat(an(e[1])):"one of [".concat(e.map((function(e){return an(e)})).join(", "),"]"):"object"==typeof e&&void 0!==e.literal?e.literal:typeof e}function un(e){if(void 0===e.jsonToJS){var t={};e.props.forEach((function(e){return t[e.json]={key:e.js,typ:e.typ}})),e.jsonToJS=t}return e.jsonToJS}function ln(e){if(void 0===e.jsToJSON){var t={};e.props.forEach((function(e){return t[e.js]={key:e.json,typ:e.typ}})),e.jsToJSON=t}return e.jsToJSON}function dn(e,t,n,r,i){if(void 0===r&&(r=""),void 0===i&&(i=""),"any"===t)return e;if(null===t)return null===e?e:on(t,e,r,i);if(!1===t)return on(t,e,r,i);for(var s=void 0;"object"==typeof t&&void 0!==t.ref;)s=t.ref,t=bn[t.ref];return Array.isArray(t)?function(e,t){return-1!==e.indexOf(t)?t:on(e.map((function(e){return fn(e)})),t,r,i)}(t,e):"object"==typeof t?t.hasOwnProperty("unionMembers")?function(e,t){for(var s=e.length,o=0;o<s;o++){var a=e[o];try{return dn(t,a,n)}catch(e){}}return on(e,t,r,i)}(t.unionMembers,e):t.hasOwnProperty("arrayItems")?function(e,t){return Array.isArray(t)?t.map((function(t){return dn(t,e,n)})):on(fn("array"),t,r,i)}(t.arrayItems,e):t.hasOwnProperty("props")?function(e,t,o){if(null===o||"object"!=typeof o||Array.isArray(o))return on(fn(s||"object"),o,r,i);var a={};return Object.getOwnPropertyNames(e).forEach((function(t){var r=e[t],i=Object.prototype.hasOwnProperty.call(o,t)?o[t]:void 0;a[r.key]=dn(i,r.typ,n,t,s)})),Object.getOwnPropertyNames(o).forEach((function(r){Object.prototype.hasOwnProperty.call(e,r)||(a[r]=dn(o[r],t,n,r,s))})),a}(n(t),t.additional,e):on(t,e,r,i):t===Date&&"number"!=typeof e?function(e){if(null===e)return null;var t=new Date(e);return isNaN(t.valueOf())?on(fn("Date"),e,r,i):t}(e):function(e,t){return typeof e==typeof t?t:on(e,t,r,i)}(t,e)}function cn(e,t){return dn(e,t,un)}function pn(e,t){return dn(e,t,ln)}function fn(e){return{literal:e}}function yn(e){return{arrayItems:e}}function hn(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return{unionMembers:e}}function gn(e,t){return{props:e,additional:t}}function mn(e){return{props:[],additional:e}}function vn(e){return{ref:e}}new Set(sn),new Error("FDC3 DesktopAgent not available at `window.fdc3`."),new Error("Timed out waiting for `fdc3Ready` event."),new Error("`fdc3Ready` event fired, but `window.fdc3` not set to DesktopAgent."),function(e){e.Chart="fdc3.chart",e.ChatInitSettings="fdc3.chat.initSettings",e.ChatRoom="fdc3.chat.room",e.Contact="fdc3.contact",e.ContactList="fdc3.contactList",e.Country="fdc3.country",e.Currency="fdc3.currency",e.Email="fdc3.email",e.Instrument="fdc3.instrument",e.InstrumentList="fdc3.instrumentList",e.Interaction="fdc3.interaction",e.Nothing="fdc3.nothing",e.Organization="fdc3.organization",e.Portfolio="fdc3.portfolio",e.Position="fdc3.position",e.ChatSearchCriteria="fdc3.chat.searchCriteria",e.TimeRange="fdc3.timeRange",e.TransactionResult="fdc3.transactionResult",e.Valuation="fdc3.valuation"}(nn||(nn={})),function(){function e(){}e.toAction=function(e){return cn(JSON.parse(e),vn("Action"))},e.actionToJson=function(e){return JSON.stringify(pn(e,vn("Action")),null,2)},e.toChart=function(e){return cn(JSON.parse(e),vn("Chart"))},e.chartToJson=function(e){return JSON.stringify(pn(e,vn("Chart")),null,2)},e.toChatInitSettings=function(e){return cn(JSON.parse(e),vn("ChatInitSettings"))},e.chatInitSettingsToJson=function(e){return JSON.stringify(pn(e,vn("ChatInitSettings")),null,2)},e.toChatMessage=function(e){return cn(JSON.parse(e),vn("ChatMessage"))},e.chatMessageToJson=function(e){return JSON.stringify(pn(e,vn("ChatMessage")),null,2)},e.toChatRoom=function(e){return cn(JSON.parse(e),vn("ChatRoom"))},e.chatRoomToJson=function(e){return JSON.stringify(pn(e,vn("ChatRoom")),null,2)},e.toChatSearchCriteria=function(e){return cn(JSON.parse(e),vn("ChatSearchCriteria"))},e.chatSearchCriteriaToJson=function(e){return JSON.stringify(pn(e,vn("ChatSearchCriteria")),null,2)},e.toContact=function(e){return cn(JSON.parse(e),vn("Contact"))},e.contactToJson=function(e){return JSON.stringify(pn(e,vn("Contact")),null,2)},e.toContactList=function(e){return cn(JSON.parse(e),vn("ContactList"))},e.contactListToJson=function(e){return JSON.stringify(pn(e,vn("ContactList")),null,2)},e.toContext=function(e){return cn(JSON.parse(e),vn("Context"))},e.contextToJson=function(e){return JSON.stringify(pn(e,vn("Context")),null,2)},e.toCountry=function(e){return cn(JSON.parse(e),vn("Country"))},e.countryToJson=function(e){return JSON.stringify(pn(e,vn("Country")),null,2)},e.toCurrency=function(e){return cn(JSON.parse(e),vn("Currency"))},e.currencyToJson=function(e){return JSON.stringify(pn(e,vn("Currency")),null,2)},e.toEmail=function(e){return cn(JSON.parse(e),vn("Email"))},e.emailToJson=function(e){return JSON.stringify(pn(e,vn("Email")),null,2)},e.toInstrument=function(e){return cn(JSON.parse(e),vn("Instrument"))},e.instrumentToJson=function(e){return JSON.stringify(pn(e,vn("Instrument")),null,2)},e.toInstrumentList=function(e){return cn(JSON.parse(e),vn("InstrumentList"))},e.instrumentListToJson=function(e){return JSON.stringify(pn(e,vn("InstrumentList")),null,2)},e.toInteraction=function(e){return cn(JSON.parse(e),vn("Interaction"))},e.interactionToJson=function(e){return JSON.stringify(pn(e,vn("Interaction")),null,2)},e.toMessage=function(e){return cn(JSON.parse(e),vn("Message"))},e.messageToJson=function(e){return JSON.stringify(pn(e,vn("Message")),null,2)},e.toNothing=function(e){return cn(JSON.parse(e),vn("Nothing"))},e.nothingToJson=function(e){return JSON.stringify(pn(e,vn("Nothing")),null,2)},e.toOrder=function(e){return cn(JSON.parse(e),vn("Order"))},e.orderToJson=function(e){return JSON.stringify(pn(e,vn("Order")),null,2)},e.toOrderList=function(e){return cn(JSON.parse(e),vn("OrderList"))},e.orderListToJson=function(e){return JSON.stringify(pn(e,vn("OrderList")),null,2)},e.toOrganization=function(e){return cn(JSON.parse(e),vn("Organization"))},e.organizationToJson=function(e){return JSON.stringify(pn(e,vn("Organization")),null,2)},e.toPortfolio=function(e){return cn(JSON.parse(e),vn("Portfolio"))},e.portfolioToJson=function(e){return JSON.stringify(pn(e,vn("Portfolio")),null,2)},e.toPosition=function(e){return cn(JSON.parse(e),vn("Position"))},e.positionToJson=function(e){return JSON.stringify(pn(e,vn("Position")),null,2)},e.toProduct=function(e){return cn(JSON.parse(e),vn("Product"))},e.productToJson=function(e){return JSON.stringify(pn(e,vn("Product")),null,2)},e.toTimeRange=function(e){return cn(JSON.parse(e),vn("TimeRange"))},e.timeRangeToJson=function(e){return JSON.stringify(pn(e,vn("TimeRange")),null,2)},e.toTrade=function(e){return cn(JSON.parse(e),vn("Trade"))},e.tradeToJson=function(e){return JSON.stringify(pn(e,vn("Trade")),null,2)},e.toTradeList=function(e){return cn(JSON.parse(e),vn("TradeList"))},e.tradeListToJson=function(e){return JSON.stringify(pn(e,vn("TradeList")),null,2)},e.toTransactionResult=function(e){return cn(JSON.parse(e),vn("TransactionResult"))},e.transactionResultToJson=function(e){return JSON.stringify(pn(e,vn("TransactionResult")),null,2)},e.toValuation=function(e){return cn(JSON.parse(e),vn("Valuation"))},e.valuationToJson=function(e){return JSON.stringify(pn(e,vn("Valuation")),null,2)}}();var wn,bn={Action:gn([{json:"app",js:"app",typ:hn(void 0,vn("ActionTargetApp"))},{json:"context",js:"context",typ:vn("ContextElement")},{json:"intent",js:"intent",typ:hn(void 0,"")},{json:"title",js:"title",typ:""},{json:"type",js:"type",typ:vn("ActionType")},{json:"id",js:"id",typ:hn(void 0,mn("any"))},{json:"name",js:"name",typ:hn(void 0,"")}],"any"),ActionTargetApp:gn([{json:"appId",js:"appId",typ:""},{json:"desktopAgent",js:"desktopAgent",typ:hn(void 0,"")},{json:"instanceId",js:"instanceId",typ:hn(void 0,"")}],"any"),ContextElement:gn([{json:"id",js:"id",typ:hn(void 0,mn("any"))},{json:"name",js:"name",typ:hn(void 0,"")},{json:"type",js:"type",typ:""}],"any"),Chart:gn([{json:"instruments",js:"instruments",typ:yn(vn("InstrumentElement"))},{json:"otherConfig",js:"otherConfig",typ:hn(void 0,yn(vn("ContextElement")))},{json:"range",js:"range",typ:hn(void 0,vn("TimeRangeObject"))},{json:"style",js:"style",typ:hn(void 0,vn("ChartStyle"))},{json:"type",js:"type",typ:vn("ChartType")},{json:"id",js:"id",typ:hn(void 0,mn("any"))},{json:"name",js:"name",typ:hn(void 0,"")}],"any"),InstrumentElement:gn([{json:"id",js:"id",typ:vn("PurpleInstrumentIdentifiers")},{json:"market",js:"market",typ:hn(void 0,vn("OrganizationMarket"))},{json:"type",js:"type",typ:vn("PurpleInteractionType")},{json:"name",js:"name",typ:hn(void 0,"")}],"any"),PurpleInstrumentIdentifiers:gn([{json:"BBG",js:"BBG",typ:hn(void 0,"")},{json:"CUSIP",js:"CUSIP",typ:hn(void 0,"")},{json:"FDS_ID",js:"FDS_ID",typ:hn(void 0,"")},{json:"FIGI",js:"FIGI",typ:hn(void 0,"")},{json:"ISIN",js:"ISIN",typ:hn(void 0,"")},{json:"PERMID",js:"PERMID",typ:hn(void 0,"")},{json:"RIC",js:"RIC",typ:hn(void 0,"")},{json:"SEDOL",js:"SEDOL",typ:hn(void 0,"")},{json:"ticker",js:"ticker",typ:hn(void 0,"")}],"any"),OrganizationMarket:gn([{json:"BBG",js:"BBG",typ:hn(void 0,"")},{json:"COUNTRY_ISOALPHA2",js:"COUNTRY_ISOALPHA2",typ:hn(void 0,"")},{json:"MIC",js:"MIC",typ:hn(void 0,"")},{json:"name",js:"name",typ:hn(void 0,"")}],"any"),TimeRangeObject:gn([{json:"endTime",js:"endTime",typ:hn(void 0,Date)},{json:"startTime",js:"startTime",typ:hn(void 0,Date)},{json:"type",js:"type",typ:vn("TimeRangeType")},{json:"id",js:"id",typ:hn(void 0,mn("any"))},{json:"name",js:"name",typ:hn(void 0,"")}],"any"),ChatInitSettings:gn([{json:"chatName",js:"chatName",typ:hn(void 0,"")},{json:"members",js:"members",typ:hn(void 0,vn("ContactListObject"))},{json:"message",js:"message",typ:hn(void 0,hn(vn("MessageObject"),""))},{json:"options",js:"options",typ:hn(void 0,vn("ChatOptions"))},{json:"type",js:"type",typ:vn("ChatInitSettingsType")},{json:"id",js:"id",typ:hn(void 0,mn("any"))},{json:"name",js:"name",typ:hn(void 0,"")}],"any"),ContactListObject:gn([{json:"contacts",js:"contacts",typ:yn(vn("ContactElement"))},{json:"type",js:"type",typ:vn("ContactListType")},{json:"id",js:"id",typ:hn(void 0,mn("any"))},{json:"name",js:"name",typ:hn(void 0,"")}],"any"),ContactElement:gn([{json:"id",js:"id",typ:vn("PurpleContactIdentifiers")},{json:"type",js:"type",typ:vn("FluffyInteractionType")},{json:"name",js:"name",typ:hn(void 0,"")}],"any"),PurpleContactIdentifiers:gn([{json:"email",js:"email",typ:hn(void 0,"")},{json:"FDS_ID",js:"FDS_ID",typ:hn(void 0,"")}],"any"),MessageObject:gn([{json:"entities",js:"entities",typ:hn(void 0,mn(vn("PurpleAction")))},{json:"text",js:"text",typ:hn(void 0,vn("PurpleMessageText"))},{json:"type",js:"type",typ:vn("MessageType")},{json:"id",js:"id",typ:hn(void 0,mn("any"))},{json:"name",js:"name",typ:hn(void 0,"")}],"any"),PurpleAction:gn([{json:"app",js:"app",typ:hn(void 0,vn("ActionTargetApp"))},{json:"context",js:"context",typ:hn(void 0,vn("ContextElement"))},{json:"intent",js:"intent",typ:hn(void 0,"")},{json:"title",js:"title",typ:hn(void 0,"")},{json:"type",js:"type",typ:vn("EntityType")},{json:"id",js:"id",typ:hn(void 0,mn("any"))},{json:"name",js:"name",typ:hn(void 0,"")},{json:"data",js:"data",typ:hn(void 0,vn("PurpleData"))}],"any"),PurpleData:gn([{json:"dataUri",js:"dataUri",typ:""},{json:"name",js:"name",typ:""}],"any"),PurpleMessageText:gn([{json:"text/markdown",js:"text/markdown",typ:hn(void 0,"")},{json:"text/plain",js:"text/plain",typ:hn(void 0,"")}],"any"),ChatOptions:gn([{json:"allowAddUser",js:"allowAddUser",typ:hn(void 0,!0)},{json:"allowHistoryBrowsing",js:"allowHistoryBrowsing",typ:hn(void 0,!0)},{json:"allowMessageCopy",js:"allowMessageCopy",typ:hn(void 0,!0)},{json:"groupRecipients",js:"groupRecipients",typ:hn(void 0,!0)},{json:"isPublic",js:"isPublic",typ:hn(void 0,!0)}],"any"),ChatMessage:gn([{json:"chatRoom",js:"chatRoom",typ:vn("ChatRoomObject")},{json:"message",js:"message",typ:vn("MessageObject")},{json:"type",js:"type",typ:vn("ChatMessageType")},{json:"id",js:"id",typ:hn(void 0,mn("any"))},{json:"name",js:"name",typ:hn(void 0,"")}],"any"),ChatRoomObject:gn([{json:"id",js:"id",typ:mn("any")},{json:"name",js:"name",typ:hn(void 0,"")},{json:"providerName",js:"providerName",typ:""},{json:"type",js:"type",typ:vn("ChatRoomType")},{json:"url",js:"url",typ:hn(void 0,"")}],"any"),ChatRoom:gn([{json:"id",js:"id",typ:mn("any")},{json:"name",js:"name",typ:hn(void 0,"")},{json:"providerName",js:"providerName",typ:""},{json:"type",js:"type",typ:vn("ChatRoomType")},{json:"url",js:"url",typ:hn(void 0,"")}],"any"),ChatSearchCriteria:gn([{json:"criteria",js:"criteria",typ:yn(hn(vn("OrganizationObject"),""))},{json:"type",js:"type",typ:vn("ChatSearchCriteriaType")},{json:"id",js:"id",typ:hn(void 0,mn("any"))},{json:"name",js:"name",typ:hn(void 0,"")}],"any"),OrganizationObject:gn([{json:"id",js:"id",typ:vn("Identifiers")},{json:"market",js:"market",typ:hn(void 0,vn("OrganizationMarket"))},{json:"type",js:"type",typ:vn("TentacledInteractionType")},{json:"name",js:"name",typ:hn(void 0,"")}],"any"),Identifiers:gn([{json:"BBG",js:"BBG",typ:hn(void 0,"")},{json:"CUSIP",js:"CUSIP",typ:hn(void 0,"")},{json:"FDS_ID",js:"FDS_ID",typ:hn(void 0,"")},{json:"FIGI",js:"FIGI",typ:hn(void 0,"")},{json:"ISIN",js:"ISIN",typ:hn(void 0,"")},{json:"PERMID",js:"PERMID",typ:hn(void 0,"")},{json:"RIC",js:"RIC",typ:hn(void 0,"")},{json:"SEDOL",js:"SEDOL",typ:hn(void 0,"")},{json:"ticker",js:"ticker",typ:hn(void 0,"")},{json:"LEI",js:"LEI",typ:hn(void 0,"")},{json:"email",js:"email",typ:hn(void 0,"")}],"any"),Contact:gn([{json:"id",js:"id",typ:vn("FluffyContactIdentifiers")},{json:"type",js:"type",typ:vn("FluffyInteractionType")},{json:"name",js:"name",typ:hn(void 0,"")}],"any"),FluffyContactIdentifiers:gn([{json:"email",js:"email",typ:hn(void 0,"")},{json:"FDS_ID",js:"FDS_ID",typ:hn(void 0,"")}],"any"),ContactList:gn([{json:"contacts",js:"contacts",typ:yn(vn("ContactElement"))},{json:"type",js:"type",typ:vn("ContactListType")},{json:"id",js:"id",typ:hn(void 0,mn("any"))},{json:"name",js:"name",typ:hn(void 0,"")}],"any"),Context:gn([{json:"id",js:"id",typ:hn(void 0,mn("any"))},{json:"name",js:"name",typ:hn(void 0,"")},{json:"type",js:"type",typ:""}],"any"),Country:gn([{json:"id",js:"id",typ:vn("CountryID")},{json:"type",js:"type",typ:vn("CountryType")},{json:"name",js:"name",typ:hn(void 0,"")}],"any"),CountryID:gn([{json:"COUNTRY_ISOALPHA2",js:"COUNTRY_ISOALPHA2",typ:hn(void 0,"")},{json:"COUNTRY_ISOALPHA3",js:"COUNTRY_ISOALPHA3",typ:hn(void 0,"")},{json:"ISOALPHA2",js:"ISOALPHA2",typ:hn(void 0,"")},{json:"ISOALPHA3",js:"ISOALPHA3",typ:hn(void 0,"")}],"any"),Currency:gn([{json:"id",js:"id",typ:vn("CurrencyID")},{json:"name",js:"name",typ:hn(void 0,"")},{json:"type",js:"type",typ:vn("CurrencyType")}],"any"),CurrencyID:gn([{json:"CURRENCY_ISOCODE",js:"CURRENCY_ISOCODE",typ:hn(void 0,"")}],"any"),Email:gn([{json:"recipients",js:"recipients",typ:vn("EmailRecipients")},{json:"subject",js:"subject",typ:hn(void 0,"")},{json:"textBody",js:"textBody",typ:hn(void 0,"")},{json:"type",js:"type",typ:vn("EmailType")},{json:"id",js:"id",typ:hn(void 0,mn("any"))},{json:"name",js:"name",typ:hn(void 0,"")}],"any"),EmailRecipients:gn([{json:"id",js:"id",typ:hn(void 0,vn("EmailRecipientsID"))},{json:"type",js:"type",typ:vn("EmailRecipientsType")},{json:"name",js:"name",typ:hn(void 0,"")},{json:"contacts",js:"contacts",typ:hn(void 0,yn(vn("ContactElement")))}],"any"),EmailRecipientsID:gn([{json:"email",js:"email",typ:hn(void 0,"")},{json:"FDS_ID",js:"FDS_ID",typ:hn(void 0,"")}],"any"),Instrument:gn([{json:"id",js:"id",typ:vn("FluffyInstrumentIdentifiers")},{json:"market",js:"market",typ:hn(void 0,vn("PurpleMarket"))},{json:"type",js:"type",typ:vn("PurpleInteractionType")},{json:"name",js:"name",typ:hn(void 0,"")}],"any"),FluffyInstrumentIdentifiers:gn([{json:"BBG",js:"BBG",typ:hn(void 0,"")},{json:"CUSIP",js:"CUSIP",typ:hn(void 0,"")},{json:"FDS_ID",js:"FDS_ID",typ:hn(void 0,"")},{json:"FIGI",js:"FIGI",typ:hn(void 0,"")},{json:"ISIN",js:"ISIN",typ:hn(void 0,"")},{json:"PERMID",js:"PERMID",typ:hn(void 0,"")},{json:"RIC",js:"RIC",typ:hn(void 0,"")},{json:"SEDOL",js:"SEDOL",typ:hn(void 0,"")},{json:"ticker",js:"ticker",typ:hn(void 0,"")}],"any"),PurpleMarket:gn([{json:"BBG",js:"BBG",typ:hn(void 0,"")},{json:"COUNTRY_ISOALPHA2",js:"COUNTRY_ISOALPHA2",typ:hn(void 0,"")},{json:"MIC",js:"MIC",typ:hn(void 0,"")},{json:"name",js:"name",typ:hn(void 0,"")}],"any"),InstrumentList:gn([{json:"instruments",js:"instruments",typ:yn(vn("InstrumentElement"))},{json:"type",js:"type",typ:vn("InstrumentListType")},{json:"id",js:"id",typ:hn(void 0,mn("any"))},{json:"name",js:"name",typ:hn(void 0,"")}],"any"),Interaction:gn([{json:"description",js:"description",typ:""},{json:"id",js:"id",typ:hn(void 0,vn("InteractionID"))},{json:"initiator",js:"initiator",typ:hn(void 0,vn("ContactElement"))},{json:"interactionType",js:"interactionType",typ:""},{json:"origin",js:"origin",typ:hn(void 0,"")},{json:"participants",js:"participants",typ:vn("ContactListObject")},{json:"timeRange",js:"timeRange",typ:vn("TimeRangeObject")},{json:"type",js:"type",typ:vn("InteractionType")},{json:"name",js:"name",typ:hn(void 0,"")}],"any"),InteractionID:gn([{json:"SALESFORCE",js:"SALESFORCE",typ:hn(void 0,"")},{json:"SINGLETRACK",js:"SINGLETRACK",typ:hn(void 0,"")},{json:"URI",js:"URI",typ:hn(void 0,"")}],"any"),Message:gn([{json:"entities",js:"entities",typ:hn(void 0,mn(vn("FluffyAction")))},{json:"text",js:"text",typ:hn(void 0,vn("FluffyMessageText"))},{json:"type",js:"type",typ:vn("MessageType")},{json:"id",js:"id",typ:hn(void 0,mn("any"))},{json:"name",js:"name",typ:hn(void 0,"")}],"any"),FluffyAction:gn([{json:"app",js:"app",typ:hn(void 0,vn("ActionTargetApp"))},{json:"context",js:"context",typ:hn(void 0,vn("ContextElement"))},{json:"intent",js:"intent",typ:hn(void 0,"")},{json:"title",js:"title",typ:hn(void 0,"")},{json:"type",js:"type",typ:vn("EntityType")},{json:"id",js:"id",typ:hn(void 0,mn("any"))},{json:"name",js:"name",typ:hn(void 0,"")},{json:"data",js:"data",typ:hn(void 0,vn("FluffyData"))}],"any"),FluffyData:gn([{json:"dataUri",js:"dataUri",typ:""},{json:"name",js:"name",typ:""}],"any"),FluffyMessageText:gn([{json:"text/markdown",js:"text/markdown",typ:hn(void 0,"")},{json:"text/plain",js:"text/plain",typ:hn(void 0,"")}],"any"),Nothing:gn([{json:"type",js:"type",typ:vn("NothingType")},{json:"id",js:"id",typ:hn(void 0,mn("any"))},{json:"name",js:"name",typ:hn(void 0,"")}],"any"),Order:gn([{json:"details",js:"details",typ:hn(void 0,vn("PurpleOrderDetails"))},{json:"id",js:"id",typ:mn("")},{json:"name",js:"name",typ:hn(void 0,"")},{json:"type",js:"type",typ:vn("OrderType")}],"any"),PurpleOrderDetails:gn([{json:"product",js:"product",typ:hn(void 0,vn("ProductObject"))}],"any"),ProductObject:gn([{json:"id",js:"id",typ:mn("")},{json:"instrument",js:"instrument",typ:hn(void 0,vn("InstrumentElement"))},{json:"name",js:"name",typ:hn(void 0,"")},{json:"type",js:"type",typ:vn("ProductType")}],"any"),OrderList:gn([{json:"orders",js:"orders",typ:yn(vn("OrderElement"))},{json:"type",js:"type",typ:vn("OrderListType")},{json:"id",js:"id",typ:hn(void 0,mn("any"))},{json:"name",js:"name",typ:hn(void 0,"")}],"any"),OrderElement:gn([{json:"details",js:"details",typ:hn(void 0,vn("FluffyOrderDetails"))},{json:"id",js:"id",typ:mn("")},{json:"name",js:"name",typ:hn(void 0,"")},{json:"type",js:"type",typ:vn("OrderType")}],"any"),FluffyOrderDetails:gn([{json:"product",js:"product",typ:hn(void 0,vn("ProductObject"))}],"any"),Organization:gn([{json:"id",js:"id",typ:vn("OrganizationIdentifiers")},{json:"type",js:"type",typ:vn("StickyInteractionType")},{json:"name",js:"name",typ:hn(void 0,"")}],"any"),OrganizationIdentifiers:gn([{json:"FDS_ID",js:"FDS_ID",typ:hn(void 0,"")},{json:"LEI",js:"LEI",typ:hn(void 0,"")},{json:"PERMID",js:"PERMID",typ:hn(void 0,"")}],"any"),Portfolio:gn([{json:"positions",js:"positions",typ:yn(vn("PositionElement"))},{json:"type",js:"type",typ:vn("PortfolioType")},{json:"id",js:"id",typ:hn(void 0,mn("any"))},{json:"name",js:"name",typ:hn(void 0,"")}],"any"),PositionElement:gn([{json:"holding",js:"holding",typ:3.14},{json:"instrument",js:"instrument",typ:vn("InstrumentElement")},{json:"type",js:"type",typ:vn("PositionType")},{json:"id",js:"id",typ:hn(void 0,mn("any"))},{json:"name",js:"name",typ:hn(void 0,"")}],"any"),Position:gn([{json:"holding",js:"holding",typ:3.14},{json:"instrument",js:"instrument",typ:vn("InstrumentElement")},{json:"type",js:"type",typ:vn("PositionType")},{json:"id",js:"id",typ:hn(void 0,mn("any"))},{json:"name",js:"name",typ:hn(void 0,"")}],"any"),Product:gn([{json:"id",js:"id",typ:mn("")},{json:"instrument",js:"instrument",typ:hn(void 0,vn("InstrumentElement"))},{json:"name",js:"name",typ:hn(void 0,"")},{json:"type",js:"type",typ:vn("ProductType")}],"any"),TimeRange:gn([{json:"endTime",js:"endTime",typ:hn(void 0,Date)},{json:"startTime",js:"startTime",typ:hn(void 0,Date)},{json:"type",js:"type",typ:vn("TimeRangeType")},{json:"id",js:"id",typ:hn(void 0,mn("any"))},{json:"name",js:"name",typ:hn(void 0,"")}],"any"),Trade:gn([{json:"id",js:"id",typ:mn("")},{json:"name",js:"name",typ:hn(void 0,"")},{json:"product",js:"product",typ:vn("ProductObject")},{json:"type",js:"type",typ:vn("TradeType")}],"any"),TradeList:gn([{json:"trades",js:"trades",typ:yn(vn("TradeElement"))},{json:"type",js:"type",typ:vn("TradeListType")},{json:"id",js:"id",typ:hn(void 0,mn("any"))},{json:"name",js:"name",typ:hn(void 0,"")}],"any"),TradeElement:gn([{json:"id",js:"id",typ:mn("")},{json:"name",js:"name",typ:hn(void 0,"")},{json:"product",js:"product",typ:vn("ProductObject")},{json:"type",js:"type",typ:vn("TradeType")}],"any"),TransactionResult:gn([{json:"context",js:"context",typ:hn(void 0,vn("ContextElement"))},{json:"message",js:"message",typ:hn(void 0,"")},{json:"status",js:"status",typ:vn("TransactionStatus")},{json:"type",js:"type",typ:vn("TransactionResultType")},{json:"id",js:"id",typ:hn(void 0,mn("any"))},{json:"name",js:"name",typ:hn(void 0,"")}],"any"),Valuation:gn([{json:"CURRENCY_ISOCODE",js:"CURRENCY_ISOCODE",typ:""},{json:"expiryTime",js:"expiryTime",typ:hn(void 0,Date)},{json:"price",js:"price",typ:hn(void 0,3.14)},{json:"type",js:"type",typ:vn("ValuationType")},{json:"valuationTime",js:"valuationTime",typ:hn(void 0,Date)},{json:"value",js:"value",typ:3.14},{json:"id",js:"id",typ:hn(void 0,mn("any"))},{json:"name",js:"name",typ:hn(void 0,"")}],"any"),ActionType:["fdc3.action"],PurpleInteractionType:["fdc3.instrument"],TimeRangeType:["fdc3.timeRange"],ChartStyle:["bar","candle","custom","heatmap","histogram","line","mountain","pie","scatter","stacked-bar"],ChartType:["fdc3.chart"],FluffyInteractionType:["fdc3.contact"],ContactListType:["fdc3.contactList"],EntityType:["fdc3.action","fdc3.entity.fileAttachment"],MessageType:["fdc3.message"],ChatInitSettingsType:["fdc3.chat.initSettings"],ChatRoomType:["fdc3.chat.room"],ChatMessageType:["fdc3.chat.message"],TentacledInteractionType:["fdc3.contact","fdc3.instrument","fdc3.organization"],ChatSearchCriteriaType:["fdc3.chat.searchCriteria"],CountryType:["fdc3.country"],CurrencyType:["fdc3.currency"],EmailRecipientsType:["fdc3.contact","fdc3.contactList"],EmailType:["fdc3.email"],InstrumentListType:["fdc3.instrumentList"],InteractionType:["fdc3.interaction"],NothingType:["fdc3.nothing"],ProductType:["fdc3.product"],OrderType:["fdc3.order"],OrderListType:["fdc3.orderList"],StickyInteractionType:["fdc3.organization"],PositionType:["fdc3.position"],PortfolioType:["fdc3.portfolio"],TradeType:["fdc3.trade"],TradeListType:["fdc3.tradeList"],TransactionStatus:["Created","Deleted","Failed","Updated"],TransactionResultType:["fdc3.transactionResult"],ValuationType:["fdc3.valuation"]};!function(e){e.CreateInteraction="CreateInteraction",e.SendChatMessage="SendChatMessage",e.StartCall="StartCall",e.StartChat="StartChat",e.StartEmail="StartEmail",e.ViewAnalysis="ViewAnalysis",e.ViewChat="ViewChat",e.ViewChart="ViewChart",e.ViewContact="ViewContact",e.ViewHoldings="ViewHoldings",e.ViewInstrument="ViewInstrument",e.ViewInteractions="ViewInteractions",e.ViewMessages="ViewMessages",e.ViewNews="ViewNews",e.ViewOrders="ViewOrders",e.ViewProfile="ViewProfile",e.ViewQuote="ViewQuote",e.ViewResearch="ViewResearch"}(wn||(wn={}));var jn,Sn,Cn,An,Rn,In,Tn,En,On,_n,Mn,Ln,Pn,Nn,Wn,kn,Dn,xn,Fn,Bn,qn,Un=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},$n=function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n};const Jn="Private-Channel-Id";class Hn{constructor(){jn.set(this,12e4),Sn.set(this,null),Cn.set(this,[])}start(){this.registerHeartbeat()}registerHeartbeat(){clearTimeout(Un(this,Sn,"f")),ye.system.debug("FinsembleDesktopAgent: heartbeat received"),$n(this,Sn,setTimeout((()=>{ye.system.warn(`FinsembleDesktopAgent: No heartbeat received within ${Un(this,jn,"f")} milliseconds`),this.notifyDisconnect()}),Un(this,jn,"f")),"f")}notifyDisconnect(){console.warn("fdc3 has lost connectivity to the interop service. You may need to restart this app."),Un(this,Cn,"f").forEach((e=>{e("fdc3 has lost connectivity to the interop service")}))}onDisconnect(e){$n(this,Cn,Un(this,Cn,"f").concat(e),"f")}stop(){clearTimeout(Un(this,Sn,"f"))}}jn=new WeakMap,Sn=new WeakMap,Cn=new WeakMap;class Vn{constructor(e,t,n="app",r){An.set(this,void 0),$n(this,An,e,"f"),this.id=t,this.type=n,this.displayMetadata=r}async broadcast(e){if(!e||!e.type)throw new Error("Invalid arguments. An FDC3 Context object (i.e. an Object with a type field) is required.");await Un(this,An,"f").channelBroadcast(this.id,e,this.type)}getCurrentContext(e){return Un(this,An,"f").channelGetCurrentContext(this.id,e)}addContextListener(e,t){if(void 0===e)throw new Error("Invalid arguments. The contextTypeOrHandler parameter shouldn't be undefined.");if("function"!=typeof e&&!t){const n="channel addContextListener Invalid arguments. The required handler parameter is missing.";throw console.error(n,e,t),ye.system.error(n),new Error(n)}const{exchangePromise:n,unsubscribe:r}=Un(this,An,"f").channelAddContextListener(this.id,e,t);let i=new Promise((e=>{n.then((()=>{e({unsubscribe:r})}))}));return i.unsubscribe=()=>{ye.system.deprecated("Use of the synchronous version of addContextListener from FDC3 1.2 is deprecated. Please switch to `await addContextListener`."),r()},i}onAddContextListener(e){return Un(this,An,"f").channelOnAddContextListener(this.id,e)}onUnsubscribe(e){return Un(this,An,"f").channelOnUnsubscribe(this.id,e)}onDisconnect(e){return Un(this,An,"f").channelOnDisconnect(this.id,e)}disconnect(){return Un(this,An,"f").channelDisconnect(this.id)}}An=new WeakMap;class zn{constructor({routerClient:e,startup:t}){if(Rn.set(this,!1),In.set(this,new Hn),Tn.set(this,!1),En.set(this,"undefined"),On.set(this,"undefined"),_n.set(this,`FSBL.FDC3.Client.${p()()}`),Mn.set(this,{}),Ln.set(this,{}),Pn.set(this,{}),Nn.set(this,{}),Wn.set(this,{}),kn.set(this,[]),Dn.set(this,void 0),xn.set(this,void 0),Fn.set(this,{}),Bn.set(this,"8.6"),qn.set(this,null),$n(this,Dn,e,"f"),$n(this,xn,t,"f"),Un(this,Dn,"f").onFailure((()=>{ye.console.error("Router failure: transport timeout error"),Un(this,In,"f").notifyDisconnect()})),l.Event&&l.dispatchEvent){const e=new l.Event("fdc3Ready");l.dispatchEvent(e)}ee.get(["finsemble","system","FSBLVersion"],((e,t)=>{$n(this,Bn,t,"f")}))}privateChannelId(){return`${Jn}-${p()()}`}async isUserChannel(e){return null===Un(this,qn,"f")&&$n(this,qn,await this.getUserChannels(),"f"),void 0!==Un(this,qn,"f").find((t=>t.id===e))}async fetchStartupData(){await Un(this,xn,"f").onReady();const e=Un(this,xn,"f").getStartupData(),{authenticationToken:t,windowName:n}=e,r=e.webContentsName.includes(a)?a:"";"undefined"===Un(this,En,"f")&&($n(this,En,`fdc3-instanceId-${r}${t.meta.appId}=${p()()}`,"f"),$n(this,On,t.meta.appId,"f"));const i={...t.meta,instanceId:Un(this,En,"f")};return ye.system.debug("fetchStartupData",e,n,t,i),{windowName:n,authenticationToken:t,appMetadata:i}}meta(){return{appId:Un(this,On,"f"),uuid:Un(this,En,"f"),href:window.document?document.location.href:""}}handleHeartbeat(){Un(this,In,"f").registerHeartbeat()}triggerContextListeners(e){var t,n;const{context:r}=e.payload;let i,s;if(e.meta.originatorAppId&&e.meta.originatorUuid&&(i={source:{appId:e.meta.originatorAppId,instanceId:e.meta.originatorUuid}}),e.meta.targetSubscriberId){let t;Object.values(Un(this,Ln,"f")).every((n=>(t=n.find((t=>t.targetSubscriberId===e.meta.targetSubscriberId)),void 0===t))),s=t?[t]:[]}else s=(null!==(t=Un(this,Ln,"f")[null==r?void 0:r.type])&&void 0!==t?t:[]).concat(null!==(n=Un(this,Ln,"f")["*"])&&void 0!==n?n:[]);s.forEach((async({handler:t,channel:n})=>{var s,o;e.meta.channel&&e.meta.channel===n||!e.meta.channel&&!n||!e.meta.channel&&await this.isUserChannel(n)&&(null===(s=await this.getCurrentChannels())||void 0===s?void 0:s.find((e=>e.id===n)))||e.meta.channel&&!n&&await this.isUserChannel(e.meta.channel)&&(null===(o=await this.getCurrentChannels())||void 0===o?void 0:o.find((t=>t.id===e.meta.channel)))?(ye.system.debug(`FDC3 Client: triggerContextListeners for all on ${null!=n?n:"default"} channel`,e.type,e),t(r,i)):ye.system.debug(`FDC3 Client: triggerContextListeners skipped for all on ${null!=n?n:"default"} channel`,e.type,e)}))}async triggerIntentListener(e){const{intent:t,context:n,requestId:r}=e.payload;let i;const s=Un(this,Mn,"f")[t];let o,a,u=null;if(e.meta.originatorAppId&&e.meta.originatorUuid&&(i={source:{appId:e.meta.originatorAppId,instanceId:e.meta.originatorUuid}}),"function"==typeof s){let l=setInterval((()=>{ye.system.warn(`tag:FDC3:raiseIntent No intent result has been returned yet for intent ${t} -- will continue to wait`,e.payload)}),5e3);ye.system.log(`tag:FDC3:raiseIntent triggering intent listener for intent ${t}`,e.payload);try{a=await s(n,i)}catch(i){ye.system.error(`tag:FDC3:raiseIntent -- error thrown in handler for intent ${t}`,i,n,e.payload),o=Zt.IntentHandlerRejected,u={type:"intentResult",meta:this.meta(),payload:{intentResultError:o,intent:t,requestId:r}},this.exchange(u)}if(clearInterval(l),!o){const e=(null==a?void 0:a.addContextListener)?{channelId:null==a?void 0:a.id,type:a.type}:a;!e||"object"==typeof e&&e.type||(ye.system.error(`IntentResult returned by FDC3 client app for intent ${t} is rejected since it doesn't match expected channel or context definition`,e),o=Zt.NoResultReturned),u={type:"intentResult",meta:this.meta(),payload:{intentResult:e,intentResultError:o,intent:t,requestId:r}},this.exchange(u)}}else ye.system.error(`Legal listener not found for intent ${t}`),u={type:"intentResult",meta:this.meta(),payload:{intentResultError:Zt.IntentHandlerRejected,intent:t,requestId:r}},this.exchange(u);ye.system.log(`tag:FDC3:raiseIntent handler response for intent ${t}`,u)}async handlePrivateChannelEvent(e){const{channel:t,context:n,targetSubscriberId:r}=e.payload,i=Un(this,Pn,"f")[t],s=i.find((e=>e.targetSubscriberId===r));if(s)switch(s.subscribeType){case"onAddContextListener":case"onUnsubscribe":s.handler(n);break;case"onDisconnect":s.handler();break;default:ye.system.error("FDC3 Client: unknown subscribeType in matching targetSubscription",s)}else ye.system.error("FDC3 Client: could not find target subscription",r,i)}async handleIntentResult(e){const{intent:t,intentResult:n,requestId:r,intentResultError:i}=e.payload;"function"==typeof Un(this,Wn,"f")[r]?(ye.system.log(`tag:FDC3:raiseIntent result message received for intent ${t}`,e),Un(this,Wn,"f")[r]({errorResult:i,intentResult:n})):ye.system.error("Legal internal handler for intent result not found",e,Un(this,Wn,"f"))}handleIncoming(e){switch("heartbeat"===e.type?ye.system.debug("Client heartbeat",e):ye.system.debug("FDC3 Client: incoming",e.type,e),e.type){case"broadcast":this.triggerContextListeners(e);break;case"intent":this.triggerIntentListener(e);break;case"privateChannelEvent":this.handlePrivateChannelEvent(e);break;case"intentResult":this.handleIntentResult(e);break;case"heartbeat":this.handleHeartbeat()}}releaseQueue(){const e=e=>{var t;return void 0!==(null===(t=null==e?void 0:e.meta)||void 0===t?void 0:t.uuid)&&(e.meta.uuid=Un(this,En,"f")),e};Un(this,kn,"f").forEach((async t=>{ye.system.log("fdc3.releaseQueue",t);const{message:n,handler:r,resolve:i}=t,{err:s,receiveMessage:o}=await this.exchange(e(n),r);i({err:s,receiveMessage:o})})),$n(this,kn,[],"f")}exchange(e,t=()=>{}){return new Promise((async n=>{if(Un(this,Rn,"f")){ye.system.debug("FDC3 Client: outgoing",e.type,e);const{err:r,response:i}=await Un(this,Dn,"f").query(o,e,t),s=null==i?void 0:i.data;s&&ye.system.log("FDC3 Client: incoming",s),n({err:r,receiveMessage:s})}else Un(this,kn,"f").push({message:e,handler:t,resolve:n}),this.start()}))}async connect(){const{windowName:e,authenticationToken:t}=await this.fetchStartupData();ye.system.log(`fdc3.connect StartupData for ${e}`);const n={type:"register",meta:this.meta(),payload:{clientChannel:Un(this,_n,"f"),windowName:e,authenticationToken:t}};A.waitForBootStage("kernel","stageCompleted",(t=>{t?ye.system.error("connect error waitingForBootStage",t):Un(this,Dn,"f").query(o,n,(t=>{t?ye.system.error("connect error",t):(Un(this,Dn,"f").addResponder(Un(this,_n,"f"),((e,t)=>{if(e||!t){const t=(e=>{var t,n;return null!==(n=null!==(t=null==e?void 0:e.message)&&void 0!==t?t:e)&&void 0!==n?n:null})(null!=e?e:"No request received on responder");ye.system.error(`FinsembleDesktopAgent can't listen on channel ${Un(this,_n,"f")} : ${t}`)}else t.data&&this.handleIncoming(t.data),t.sendQueryResponse(null)})),$n(this,Rn,!0,"f"),ye.system.log(`FDC3 client connected for window ${e}`),this.releaseQueue(),Un(this,In,"f").start())}))}))}async start(){Un(this,Tn,"f")||($n(this,Tn,!0,"f"),await Un(this,xn,"f").onReady(),this.connect())}async stop(){Un(this,In,"f").stop();const e={type:"unregister",meta:this.meta()};await this.exchange(e),$n(this,Tn,!1,"f"),Un(this,Dn,"f").removeResponder(Un(this,_n,"f")),$n(this,Rn,!1,"f")}onDisconnect(e){Un(this,In,"f").onDisconnect(e)}async channelGetCurrentContext(e,t){const n={type:"currentContextRequest",meta:{...this.meta(),channel:e},payload:{contextType:t}},{err:r,receiveMessage:i}=await this.exchange(n);return r?null:"currentContext"===(null==i?void 0:i.type)?i.payload.context:null}async broadcast(e){if(!e||!e.type)throw new Error("Invalid arguments. An FDC3 Context object (i.e. an Object with a type field) is required.");const t={type:"broadcast",meta:this.meta(),payload:{context:e,channelType:"user"}};await this.exchange(t)}async channelBroadcast(e,t,n){const r={type:"broadcast",meta:{...this.meta(),channel:e},payload:{context:t,channelType:n}};await this.exchange(r)}async getUserChannels(){var e;const t={type:"systemChannelRequest",meta:this.meta()},{err:n,receiveMessage:r}=await this.exchange(t);return n?[]:("systemChannels"===(null==r?void 0:r.type)?null===(e=null==r?void 0:r.payload)||void 0===e?void 0:e.channels:[]).map((e=>{var t,n,i;let s;return"systemChannels"===(null==r?void 0:r.type)&&(null===(t=null==r?void 0:r.payload)||void 0===t?void 0:t.systemChannelMeta)&&(s=null===(i=null===(n=null==r?void 0:r.payload)||void 0===n?void 0:n.systemChannelMeta[e])||void 0===i?void 0:i.displayMetaData),new Vn(this,e,"user",s)}))}async getSystemChannels(){return this.getUserChannels()}async open(e,t){var n;if(!e)throw new Error("Invalid arguments. The required 'app' parameter is missing.");const{appMetadata:r}=await this.fetchStartupData(),i={type:"open",meta:this.meta(),payload:{requestingAppId:r.appId,app:e,context:t}},{err:s,receiveMessage:o}=await this.exchange(i),a=o;if(s)throw new Error(Qt.ResolverUnavailable);if(a.payload.error)throw new Error(a.payload.error);return null!==(n=a.payload.appIdentifier)&&void 0!==n?n:{appId:"unknown-open-appIdentifier"}}async findIntent(e,t,n){if(!e)throw new Error("Invalid arguments. The required intent parameter is missing.");if(t&&!t.type)throw new Error("Invalid arguments. Second parameter must be a valid context.");if(n&&"string"!=typeof n)throw new Error("Invalid arguments. Third parameter must be a string.");const r={type:"findIntent",meta:this.meta(),payload:{intent:e,context:t,resultType:n}},{err:i,receiveMessage:s}=await this.exchange(r),o=s;if(i)throw new Error(Kt.ResolverUnavailable);if(o.payload.error)throw new Error(o.payload.error);if(!o.payload.appIntent)throw new Error("Invalid response returned from InteropService for findIntent. No appIntent and no error.");return o.payload.appIntent}async findIntentsByContext(e,t){if(!e)throw new Error("Invalid arguments. The required context parameter is missing.");if(!e.type)throw new Error("Invalid arguments. Second parameter must be a valid context.");if(t&&"string"!=typeof t)throw new Error("Invalid arguments. Second parameter must be a string to identify result type.");const n={type:"findIntentsByContext",meta:this.meta(),payload:{context:e,resultType:t}},{receiveMessage:r}=await this.exchange(n),i=r;if(i.payload.error)throw new Error(i.payload.error);return i.payload.intents||[]}async createPrivateChannel(){return new Vn(this,this.privateChannelId(),"private")}async raiseIntentInternal(e,t,n,r=!1){if(t&&!t.type)throw new Error("Invalid arguments. Second parameter must be a valid context.");const i=`raise-intent-request-Id-${p()()}`;ye.system.log(`tag:FDC3:raiseIntent initiated for intent ${e} with ${t?" context type ":"no context"}${null==t?void 0:t.type}`,t,n,i,r);const s={type:"raiseIntent",meta:this.meta(),payload:{intent:e,context:t,target:n,requestId:i,forContext:r}};ye.system.log(`tag:FDC3:raiseIntent request sent to InteropService for intent ${e}`,s);const{err:o,receiveMessage:a}=await this.exchange(s),u=a;if(ye.system.log(`tag:FDC3:raiseIntent intent resolution received for intent ${e}`,o,a),o)throw new Error(Kt.ResolverUnavailable);if(u.payload.error)throw new Error(u.payload.error);if(!u.payload.data)throw new Error("Invalid response returned from InteropService for raiseIntent. No data.");return Un(this,Nn,"f")[i]=new Promise((e=>{Un(this,Wn,"f")[i]=e})),{source:u.payload.data.source,intent:u.payload.data.intent,version:u.payload.data.version,getResult:async()=>{let t,n;if(ye.system.log(`tag:FDC3:raiseIntent getResult initiated for intent ${e}`,s),"function"==typeof Un(this,Wn,"f")[i]?({errorResult:t,intentResult:n}=await Un(this,Nn,"f")[i]):t="could not fulfill intent resolution due to no corresponding result promise",ye.system.log(`tag:FDC3:raiseIntent result for intent ${e}`,{errorResult:t,intentResult:n}),t)throw new Error(t);const r=null==n?void 0:n.channelId,o=null==n?void 0:n.type,a=r?new Vn(this,r,o):null!=n?n:void 0;return ye.system.log(`tag:FDC3:raiseIntent getResult() returned for intent ${e}`,a),a}}}async raiseIntent(e,t,n){if(!e)throw new Error("Invalid arguments. The required intent parameter is missing.");if(!t)throw new Error("Invalid arguments. The required context parameter is missing.");if(!t.type)throw new Error("Invalid arguments. Second parameter must be a valid context.");return this.raiseIntentInternal(e,t,n)}async raiseIntentForContext(e,t){if(!e)throw new Error("Invalid arguments. The required context parameter is missing.");return this.raiseIntentInternal(null,e,t,!0)}addIntentListener(e,t){if(!e)throw new Error("Invalid arguments. The required intent parameter is missing.");if(!t)throw new Error("addIntentListener Invalid arguments. The required handler parameter is missing.");if(Un(this,Mn,"f")[e])throw new Error(`Intent listener already defined for intent ${e}`);Un(this,Mn,"f")[e]=t;const n={type:"subscribeIntent",meta:this.meta(),payload:{intent:e}},r=this.exchange(n),i={unsubscribe:()=>{const t={type:"unsubscribeIntent",meta:this.meta(),payload:{intent:e}};this.exchange(t),delete Un(this,Mn,"f")[e]}};let s=new Promise((e=>{r.then((()=>{e(i)}))}));return s.unsubscribe=()=>{ye.system.deprecated("Use of the synchronous version of addIntentListener from FDC3 1.2 is deprecated. Please switch to `await addIntentListener`."),i.unsubscribe()},s}listenerForPrivateChannelEvent(e,t,n){const r=`subscriberId.${t}.${e}.${Date.now()}_${Math.random()}`,o={subscribeType:e,handler:n,channel:t,targetSubscriberId:r};Un(this,Pn,"f")[t]=i(Un(this,Pn,"f"),t,o);let a={type:"subscribePrivateChannelEvent",payload:{subscribeType:e,channel:t,targetSubscriberId:r},meta:this.meta()};return this.exchange(a),{unsubscribe:()=>{let n={type:"unsubscribePrivateChannelEvent",payload:{subscribeType:e,channel:t,targetSubscriberId:r},meta:this.meta()};Un(this,Pn,"f")[t]=s(Un(this,Pn,"f"),t,o),this.exchange(n)}}}channelOnAddContextListener(e,t){return this.listenerForPrivateChannelEvent("onAddContextListener",e,t)}channelOnUnsubscribe(e,t){return this.listenerForPrivateChannelEvent("onUnsubscribe",e,t)}channelOnDisconnect(e,t){return this.listenerForPrivateChannelEvent("onDisconnect",e,t)}channelDisconnect(e){let t={type:"channelDisconnect",meta:{...this.meta(),channel:e}};this.exchange(t)}channelAddContextListener(e,t,n){const r=n&&t||"*";n||(n=t);const o=`subscriberId.${Date.now()}_${Math.random()}`,a={handler:n,channel:e,targetSubscriberId:o};Un(this,Ln,"f")[r]=i(Un(this,Ln,"f"),r,a);let u={type:"subscribeContext",meta:{...this.meta(),targetSubscriberId:o},payload:{contextType:r}};return e&&(u.meta.channel=e),{exchangePromise:this.exchange(u),unsubscribe:()=>{let t={type:"unsubscribeContext",meta:this.meta(),payload:{contextType:r}};e&&(t.meta.channel=e),Un(this,Ln,"f")[r]=s(Un(this,Ln,"f"),r,a),this.exchange(t)}}}addContextListener(e,t){if(void 0===e)throw new Error("addContextListener Invalid arguments. The contextTypeOrHandler parameter shouldn't be undefined.");if("function"!=typeof e&&!t){const n="addContextListener Invalid arguments. The required handler parameter is missing.";throw console.error(n,e,t),ye.system.error(n),new Error(n)}const{exchangePromise:n,unsubscribe:r}=this.channelAddContextListener(null,e,t);let i=new Promise((e=>{n.then((()=>{e({unsubscribe:r})}))}));return i.unsubscribe=()=>{ye.system.deprecated("Use of the synchronous version of addContextListener from FDC3 1.2 is deprecated. Please switch to `await addContextListener`."),r()},i}async joinUserChannel(e){if(!e)throw new Error("Invalid arguments. The required channelId parameter is missing.");if(!await this.isUserChannel(e))throw ye.system.error("Invalid arguments. The channel being joined must be a user channel."),new Error(Xt.AccessDenied);const t={type:"joinChannels",meta:this.meta(),payload:{channels:[e]}},{err:n,receiveMessage:r}=await this.exchange(t),i=r;if(n)throw new Error(n);if(i.payload.error)throw new Error(i.payload.error)}async joinChannel(e){return this.joinUserChannel(e)}async getOrCreateChannel(e){if(!e)throw ye.system.debug("getOrCreateChannel: The required channelId parameter is missing."),new Error(Xt.CreationFailed);if((e=>e.includes(Jn))(e))throw new Error(Xt.AccessDenied);let t=Un(this,Fn,"f")[e];return t||(t=new Vn(this,e),Un(this,Fn,"f")[e]=t),t}async getCurrentChannels(){const e={type:"getCurrentChannels",meta:this.meta()},{err:t,receiveMessage:n}=await this.exchange(e),r=n;if(t)throw new Error(t);if(r.payload.error)throw new Error(r.payload.error);if(!r.payload.data)throw new Error("Invalid response returned from InteropService for getCurrentChannels. No data.");return r.payload.data.map((e=>{var t,r,i;let s;return"interopGetCurrentChannelsResponse"===(null==n?void 0:n.type)&&(null===(t=null==n?void 0:n.payload)||void 0===t?void 0:t.systemChannelMeta)&&(s=null===(i=null===(r=null==n?void 0:n.payload)||void 0===r?void 0:r.systemChannelMeta[e.channel])||void 0===i?void 0:i.displayMetaData),new Vn(this,e.channel,"user",s)}))}async getCurrentChannel(){const e=await this.getCurrentChannels();return e&&e.length?e[0]:null}async leaveCurrentChannel(){const e={type:"leaveChannels",meta:this.meta(),payload:{}};await this.exchange(e)}async leaveChannel(e){const t={type:"leaveChannels",meta:this.meta(),payload:{channels:[e]}};await this.exchange(t)}async getAppMetadata(e){var t;if(!e||!(null==e?void 0:e.appId))throw new Error("getAppMetadata: The required app parameter is missing or not an AppIdentifier.");const n={type:"getAppMetadata",app:e,meta:this.meta()},{err:r,receiveMessage:i}=await this.exchange(n),s=i;if(r)throw new Error(r);if(s.payload.error)throw new Error(s.payload.error);if(!s.payload.appMetadata)throw new Error("Invalid response returned from InteropService for getAppMetadata. No data.");return null===(t=s.payload)||void 0===t?void 0:t.appMetadata}async findInstances(e){let t=[];const n={type:"findInstances",app:e,meta:this.meta()};if(null==e?void 0:e.appId){const{err:e,receiveMessage:r}=await this.exchange(n),i=r;if(e)throw new Error(e);if(i.payload.error)throw new Error(i.payload.error);if(!i.payload.instances)throw new Error("Invalid response returned from InteropService for findInstances. No data.");({instances:t}=i.payload)}return t}getInfo(){let e=new Promise((async e=>{const{data:t}=await ee.get(["finsemble","system","FSBLVersion"]),{appMetadata:n}=await this.fetchStartupData();e({fdc3Version:"2.1",provider:"Finsemble",providerVersion:t,appMetadata:await this.getAppMetadata({appId:n.appId,instanceId:Un(this,En,"f")}),optionalFeatures:{OriginatingAppMetadata:!0,UserChannelMembershipAPIs:!0}})}));return e.fdc3Version="1.2",e.provider="Finsemble",e.providerVersion=Un(this,Bn,"f"),e}}Rn=new WeakMap,In=new WeakMap,Tn=new WeakMap,En=new WeakMap,On=new WeakMap,_n=new WeakMap,Mn=new WeakMap,Ln=new WeakMap,Pn=new WeakMap,Nn=new WeakMap,Wn=new WeakMap,kn=new WeakMap,Dn=new WeakMap,xn=new WeakMap,Fn=new WeakMap,Bn=new WeakMap,qn=new WeakMap;class Gn{async startApp(){var e,t,n,r,i,s,o,a;const u=await(async()=>new Promise((e=>{x.Window.getCurrent().getOptions((t=>{e(t)}))})))(),d=x.Window.getCurrent(),c=null!==(n=null!==(e=d.name)&&void 0!==e?e:null===(t=null===document||void 0===document?void 0:document.location)||void 0===t?void 0:t.href)&&void 0!==n?n:"Unknown App",f=null!==(s=null!==(r=d.name)&&void 0!==r?r:null===(i=null===document||void 0===document?void 0:document.location)||void 0===i?void 0:i.href)&&void 0!==s?s:`Unknown window-${p()()}`,y=null!==(o=d.webContentsName)&&void 0!==o?o:f,h=null!==(a=(e=>{let t=null==e?void 0:e.manifest;return(null==t?void 0:t.finsemble)&&Pt.resolveManifestMacros(t,t.finsemble),t})(u))&&void 0!==a?a:{},m=(({windowName:e,systemManifest:t,transportSettings:n,isFSBLService:r})=>t?((e,t,n=!1)=>{var r,i,s;if(fe.system.log("WINDOW LIFECYCLE:STARTUP:RouterClient:routerConfigFromManifest",t,n),e&&"string"!=typeof e){const o=e.finsemble,a=null!==(s=null!==(i=null===(r=null==o?void 0:o.router)||void 0===r?void 0:r.transportSettings)&&void 0!==i?i:null==o?void 0:o.IAC)&&void 0!==s?s:{};return{windowName:t,routerDomainRoot:o.moduleRoot,transportName:kt(e,n),transportSettings:a}}return fe.system.error("WINDOW LIFECYCLE:STARTUP:RouterClient:routerConfigFromManifest failed -- fatal error. No manifest found.",e),{...Nt,windowName:t}})(t,e,r):{...Nt,windowName:e,transportSettings:null!=n?n:{}})({windowName:f,systemManifest:h,isFSBLService:!0});await L.start(m);const v=g.getInstance();v.setStartupData({windowName:f,webContentsName:y,authenticationToken:{signatureString:"",signatureStringType:"unauthenticated",meta:{name:c,appId:c}}}),l.fdc3=new zn({routerClient:P,startup:v}),v.setReady()}async stopApp(){L.stop()}}l.addEventListener&&l.addEventListener("error",(e=>{(null==e?void 0:e.message)&&(null==e?void 0:e.filename)?fe.console.error(`Logger client caught ErrorEvent. Error: ${e.message}`,`File: ${e.filename}`,`Line number: ${e.lineno}`):(fe.console.warn(`Logger client caught what is likely a DOM error event where type=${null==e?void 0:e.type} and target=${null==e?void 0:e.target}. Probably due to <img> or <script> failing to load. See component's browserView window for more details.`),globalThis.console.warn("Event Details (for above message)",e))}),!0),l.addEventListener&&l.addEventListener("unhandledrejection",(e=>{fe.console.error("Logger client caught Unhandled rejection","reason",e.reason,JSON.stringify(e))}),!0),(()=>{if(globalThis.console.unwrappedError)return;if(globalThis.glue42gd)return;if(x.isBrowserView())return void fe.console.log("Logger client console.error is not wrapped to capture logs.");fe.console.log("Logger client console.error is wrapped to capture logs.");const e=globalThis.console.error.bind(globalThis.console);globalThis.console.unwrappedError=globalThis.console.error,globalThis.console.error=function(...t){let n;t.push("(console error)");try{n=JSON.parse(JSON.stringify(t))}catch(r){n="console.error: arguments could not be serialized for logging",t.push("arguments could not be serialized to send to Central Logger"),e(...t)}fe.console.error(...n)}})();const{SERVICE_INITIALIZING_CHANNEL:Yn,SERVICE_READY_CHANNEL:Qn,SERVICE_QUERY_READY_CHANNEL:Kn,SERVICE_CLOSING_CHANNEL:Zn,SERVICE_CLOSED_CHANNEL:Xn,SERVICE_STOP_CHANNEL:er}=e,tr={startupDependencies:{services:[],clients:[]},shutdownDependencies:{services:[]},name:window.name};class nr{async initialize(e){e()}constructor(e=tr){!function(e){e.startupDependencies?(e.startupDependencies.services||(e.startupDependencies.services=tr.startupDependencies.services),e.startupDependencies.clients||(e.startupDependencies.clients=tr.startupDependencies.clients)):e.startupDependencies=tr.startupDependencies,e.shutdownDependencies?e.shutdownDependencies.services||(e.shutdownDependencies.services=tr.shutdownDependencies.services):e.shutdownDependencies=tr.shutdownDependencies}(e),this.name=e.name?e.name:window.name,this.startupDependencies=e.startupDependencies,this.shutdownDependencies=e.shutdownDependencies,this.Logger=fe,this.RouterClient=P,this.onBaseServiceReadyCB=null,this.setOnConnectionCompleteCB=null,this.listeners={},this.start=()=>{},this.started=!1,this.status="initializing",this.setOnline=this.setOnline.bind(this),this.onBaseServiceReady=this.onBaseServiceReady.bind(this),this.handleShutdown=this.handleShutdown.bind(this),this.waitForDependencies(),l.finsembleServices?l.finsembleServices.push(this):l.finsembleServices=[this]}waitForDependencies(){const e=this;if(this.started)return;this.started=!0;const t=this;function n(e){fe.system.debug("BaseService.start.setParentUUID"),x.Window.getCurrent().getOptions((n=>{t.customData=n.customData,e()}))}async function r(){await(new Gn).startApp(),P.addResponder(Kn(e.name),((t,n)=>{(e.status="ready")?null==n||n.sendQueryResponse(null):null==n||n.sendQueryResponse("service not ready")})),"routerService"!==t.name&&P.transmit(Yn,{name:t.name}),window.addEventListener("beforeunload",t.RouterClient.disconnectAll),fe.system.debug("APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.onRouterReady")}function i(e){const n=t.customData.debugServiceDelay||0;if(fe.system.debug(`Custom Data: ${t.name} custom data`,t.customData),Number.isInteger(n))n>0&&fe.system.debug(`APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.debugDelay: ${t.name} startup will delayed by ${n} milliseconds for debugging`);else{const e=`debugDelay has an illegal value ("${n}") for ${t.name}. Value must be an integer.`;fe.system.error(`APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start: ${e}`),A.systemLog({error:!0},e)}setTimeout(e,n)}function s(e){fe.system.debug(`APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.readyToGo ${t.name}`),fe.console.log("Startup Dependencies for",t.name,t.startupDependencies),fe.console.log("Shutdown Dependencies for",t.name,t.shutdownDependencies),Tt.shutdown.waitFor(t.shutdownDependencies,t.handleShutdown),fe.system.debug(`APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.readyToGo after wait ${t.name}`),P.transmit(`${x.Window.getCurrent().name}.onSpawned`,{name:x.Window.getCurrent().name},{suppressWarnings:!0}),Tt.startup.waitFor(t.startupDependencies,e,t.name).on("err",(e=>{fe.system.error(e)}))}function o(e){const n=x.Window.getCurrent();n.isShowing((r=>{r&&!1!==t.customData.showDevConsoleOnVisible?x.showDeveloperTools(n.name,null,e):(fe.system.debug("APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.delayStartup done"),e())}))}return fe.system.debug(`${this.name} starting`),new Promise((e=>{Ze(Be,[r,n,o,i,s],(t=>{t&&console.log("waitForDependencies async.series results",t),e(),this.onDependenciesReady()}))}))}setOnline(){"ready"!==this.status&&(this.RouterClient.addListener(`${er}.${this.name}`,(()=>{Tt.shutdown.checkDependencies()})),this.status="ready",P.transmit(Qn,{serviceName:this.name},{suppressWarnings:!0}),fe.system.log("APPLICATION LIFECYCLE:STARTUP:SERVICE ONLINE",this.name),A.publishBootStatus(this.name,"services","completed"))}onDependenciesReady(){fe.system.debug("APPLICATION LIFECYCLE:STARTUP:BaseService onDependenciesReady",this.name),this.status="initializing",this.onBaseServiceReadyCB?this.onBaseServiceReadyCB(this.setOnline):this.initialize?this.initialize(this.setOnline):setTimeout((()=>{"ready"!==this.status&&"routerService"!==this.name&&(console.error("No onBaseServiceReadyCB on initialize function defined on your service. Ensure that service.setOnline is called"),fe.system.error("No onBaseServiceReadyCB on initialize function defined on your service. Ensure that service.setOnline is called"))}),3e3)}onBaseServiceReady(e){"initializing"===this.status?this.onBaseServiceReadyCB=()=>{e(this.setOnline)}:e(this.setOnline)}addEventListener(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)}onShutdown(e){this.addEventListener("onShutdown",e)}handleShutdown(){fe.system.debug("BaseService.handleShutdown");const e=this;this.listeners.onShutdown?(P.transmit(Zn,{waitForMe:!0,name:this.name}),Ve(this.listeners.onShutdown,(function(e,t){je(e)(null,t)}),(function(t){t&&fe.system.error(t),e.shutdownComplete()}))):(P.transmit(Zn,{waitForMe:!1,name:this.name}),e.shutdownComplete())}shutdownComplete(){fe.system.info(`"APPLICATION LIFECYCLE:SHUTDOWN:SERVICE SHUTDOWN: ${this.name}`),P.transmit(Xn,{name:this.name})}}class rr{constructor(){this.id="",this.buttonText="",this.type=""}}var ir,sr;!function(e){e.DISMISS="DISMISS",e.SNOOZE="SNOOZE",e.SPAWN="SPAWN",e.QUERY="QUERY",e.PUBLISH="PUBLISH",e.TRANSMIT="TRANSMIT"}(ir||(ir={})),function(e){e.MARK_AS_UNREAD="MARK_AS_UNREAD",e.MARK_AS_READ="MARK_AS_READ",e.SNOOZE="SNOOZE",e.DISMISS="DISMISS",e.SETTINGS="SETTINGS",e.DETAILS="DETAILS"}(sr||(sr={}));class or{}class ar{constructor(){this.actions=[],this.isRead=!1,this.isSnoozed=!1,this.isMuted=!1,this.isDeleted=!1,this.actionsHistory=[],this.meta=new or,this.stateHistory=[],this.issuedAt="",this.title="",this.devModeOnly=!1}}const ur=class{constructor(t,n){var r;this.allowDelay=!1,this.delayed=!1,this.allowCancel=!1,this.canceled=!1,this.completed=!1,this.event=t.event,this.source=t.source,this.sourceType=t.sourceType,this.listenerGuid=t.listenerGuid,e[this.sourceType.toUpperCase()]&&e[this.sourceType.toUpperCase()].DELAYABLE_EVENTS.includes(this.event)&&(this.allowDelay=!0),e[this.sourceType.toUpperCase()]&&e[this.sourceType.toUpperCase()].CANCELABLE_EVENTS.includes(this.event)&&(this.allowCancel=!0),this.handler=t.handler,this.queryMessage=n,this.guid=null===(r=null==n?void 0:n.data)||void 0===r?void 0:r.guid,this.internalHandler()}async internalHandler(){var e,t;this.data=null===(t=null===(e=this.queryMessage)||void 0===e?void 0:e.data)||void 0===t?void 0:t.data,this.handler&&await this.handler(this),this.delayed||this.canceled||this.completed||this.done()}cancel(){this.allowCancel&&(this.canceled=!0,this.done())}wait(){var e;this.allowDelay?(this.delayed=!0,null===(e=this.queryMessage)||void 0===e||e.sendQueryResponse(null,{wait:!0})):this.done()}done(e){var t;this.completed=!0,this.delayed?P.transmit(`Finsemble.Listener.Done.${this.guid}.${this.listenerGuid}`,{canceled:this.canceled,data:e}):null===(t=this.queryMessage)||void 0===t||t.sendQueryResponse(null,{canceled:this.canceled,data:e})}},lr=class{constructor(e){var t;this.eventList=[],this.cleanedUp=!1,this.openResponders=[],this.closedHandlersExecuted=0,this.handlers=[],this.closeFinalHandler=null,this.name=e.name,this.thisWindowName=window.name,this.sourceType=null!==(t=e.sourceType)&&void 0!==t?t:"undefined",window.addEventListener("beforeunload",(()=>{this.cleanup()})),this.currentWindow=x.Window.getCurrent()}addListener(e,t){return this.addEventListener(e,t)}removeListener(e,t){return this.removeEventListener(e,t)}closeFinal(e){this.closeFinalHandler=e;const t=`${this.name}_public_${Date.now()}_${Math.random()}`;P.transmit(`Finsemble.RegisterInterruptibleEvent.${this.name}`,{event:"closed",listenerGuid:t,windowName:this.thisWindowName});const n=(...e)=>{this.howManyClosedHandlers()||(this.closeFinalHandler&&this.closeFinalHandler(...e),this.closeFinalHandler=null)},r=`Finsemble.Interrupt.${t}`;P.addResponder(r,((e,r)=>{new ur({source:this.name,sourceType:this.sourceType,listenerGuid:t,handler:n,event:"closed"},r)})),this.openResponders.push(r)}howManyClosedHandlers(){return this.handlers.filter((e=>"closed"===e.event)).length}addEventListener(e,t){fe.system.debug("PublicEventManager.addEventListener:",e);const n=`${this.name}_public_${Date.now()}_${Math.random()}`,r="closed"!==e?t:(...e)=>{t(...e),this.closedHandlersExecuted++,this.closedHandlersExecuted===this.howManyClosedHandlers()&&this.closeFinalHandler&&(this.closeFinalHandler(),this.closeFinalHandler=null)};this.handlers.push({event:e,handler:r,listenerGuid:n}),P.transmit(`Finsemble.RegisterInterruptibleEvent.${this.name}`,{event:e,listenerGuid:n,windowName:this.thisWindowName});const i=`Finsemble.Interrupt.${n}`;return P.addResponder(i,((t,i)=>{new ur({source:this.name,sourceType:this.sourceType,listenerGuid:n,handler:r,event:e},i)})),this.openResponders.push(i),"close-requested"===e&&this.currentWindow.addListener("close-requested",r),()=>{this.removeEventListener(e,t)}}removeEventListener(e,t,n=!0){if(fe.system.debug("PublicEventManager.removeEventListener:",e),this.cleanedUp)return;const r=this.handlers.findIndex((n=>n.event===e&&n.handler===t));if(-1===r)return void(n&&fe.system.warn(`PublicEventManager.removeEventListener() attempt to remove unregistered event "${e}"`));const{listenerGuid:i}=this.handlers[r];P.transmit(`Finsemble.UnregisterInterruptibleEvent.${this.name}`,{event:e,listenerGuid:i,windowName:this.thisWindowName}),P.removeResponder(`Finsemble.Interrupt.${i}`),"close-requested"===e&&this.currentWindow.removeListener("close-requested",t),this.handlers.splice(r,1)}cleanup(){this.cleanedUp=!0,this.handlers=[],this.openResponders.forEach((e=>{P.removeResponder(e)}))}};function dr(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+e+(n.length?" "+n.map((function(e){return"'"+e+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function cr(e){return!!e&&!!e[Kr]}function pr(e){var t;return!!e&&(function(e){if(!e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;var n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===Zr}(e)||Array.isArray(e)||!!e[Qr]||!!(null===(t=e.constructor)||void 0===t?void 0:t[Qr])||vr(e)||wr(e))}function fr(e,t,n){void 0===n&&(n=!1),0===yr(e)?(n?Object.keys:Xr)(e).forEach((function(r){n&&"symbol"==typeof r||t(r,e[r],e)})):e.forEach((function(n,r){return t(r,n,e)}))}function yr(e){var t=e[Kr];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:vr(e)?2:wr(e)?3:0}function hr(e,t){return 2===yr(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function gr(e,t,n){var r=yr(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function mr(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function vr(e){return Vr&&e instanceof Map}function wr(e){return zr&&e instanceof Set}function br(e){return e.o||e.t}function jr(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=ei(e);delete t[Kr];for(var n=Xr(t),r=0;r<n.length;r++){var i=n[r],s=t[i];!1===s.writable&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(t[i]={configurable:!0,writable:!0,enumerable:s.enumerable,value:e[i]})}return Object.create(Object.getPrototypeOf(e),t)}function Sr(e,t){return void 0===t&&(t=!1),Ar(e)||cr(e)||!pr(e)||(yr(e)>1&&(e.set=e.add=e.clear=e.delete=Cr),Object.freeze(e),t&&fr(e,(function(e,t){return Sr(t,!0)}),!0)),e}function Cr(){dr(2)}function Ar(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function Rr(e){var t=ti[e];return t||dr(18,e),t}function Ir(){return Jr}function Tr(e,t){t&&(Rr("Patches"),e.u=[],e.s=[],e.v=t)}function Er(e){Or(e),e.p.forEach(Mr),e.p=null}function Or(e){e===Jr&&(Jr=e.l)}function _r(e){return Jr={p:[],l:Jr,h:e,m:!0,_:0}}function Mr(e){var t=e[Kr];0===t.i||1===t.i?t.j():t.g=!0}function Lr(e,t){t._=t.p.length;var n=t.p[0],r=void 0!==e&&e!==n;return t.h.O||Rr("ES5").S(t,e,r),r?(n[Kr].P&&(Er(t),dr(4)),pr(e)&&(e=Pr(t,e),t.l||Wr(t,e)),t.u&&Rr("Patches").M(n[Kr].t,e,t.u,t.s)):e=Pr(t,n,[]),Er(t),t.u&&t.v(t.u,t.s),e!==Yr?e:void 0}function Pr(e,t,n){if(Ar(t))return t;var r=t[Kr];if(!r)return fr(t,(function(i,s){return Nr(e,r,t,i,s,n)}),!0),t;if(r.A!==e)return t;if(!r.P)return Wr(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=4===r.i||5===r.i?r.o=jr(r.k):r.o,s=i,o=!1;3===r.i&&(s=new Set(i),i.clear(),o=!0),fr(s,(function(t,s){return Nr(e,r,i,t,s,n,o)})),Wr(e,i,!1),n&&e.u&&Rr("Patches").N(r,n,e.u,e.s)}return r.o}function Nr(e,t,n,r,i,s,o){if(cr(i)){var a=Pr(e,i,s&&t&&3!==t.i&&!hr(t.R,r)?s.concat(r):void 0);if(gr(n,r,a),!cr(a))return;e.m=!1}else o&&n.add(i);if(pr(i)&&!Ar(i)){if(!e.h.D&&e._<1)return;Pr(e,i),t&&t.A.l||Wr(e,i)}}function Wr(e,t,n){void 0===n&&(n=!1),!e.l&&e.h.D&&e.m&&Sr(t,n)}function kr(e,t){var n=e[Kr];return(n?br(n):e)[t]}function Dr(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function xr(e){e.P||(e.P=!0,e.l&&xr(e.l))}function Fr(e){e.o||(e.o=jr(e.t))}function Br(e,t,n){var r=vr(t)?Rr("MapSet").F(t,n):wr(t)?Rr("MapSet").T(t,n):e.O?function(e,t){var n=Array.isArray(e),r={i:n?1:0,A:t?t.A:Ir(),P:!1,I:!1,R:{},l:t,t:e,k:null,o:null,j:null,C:!1},i=r,s=ni;n&&(i=[r],s=ri);var o=Proxy.revocable(i,s),a=o.revoke,u=o.proxy;return r.k=u,r.j=a,u}(t,n):Rr("ES5").J(t,n);return(n?n.A:Ir()).p.push(r),r}function qr(e){return cr(e)||dr(22,e),function e(t){if(!pr(t))return t;var n,r=t[Kr],i=yr(t);if(r){if(!r.P&&(r.i<4||!Rr("ES5").K(r)))return r.t;r.I=!0,n=Ur(t,i),r.I=!1}else n=Ur(t,i);return fr(n,(function(t,i){r&&function(e,t){return 2===yr(e)?e.get(t):e[t]}(r.t,t)===i||gr(n,t,e(i))})),3===i?new Set(n):n}(e)}function Ur(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return jr(e)}var $r,Jr,Hr="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),Vr="undefined"!=typeof Map,zr="undefined"!=typeof Set,Gr="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,Yr=Hr?Symbol.for("immer-nothing"):(($r={})["immer-nothing"]=!0,$r),Qr=Hr?Symbol.for("immer-draftable"):"__$immer_draftable",Kr=Hr?Symbol.for("immer-state"):"__$immer_state",Zr=("undefined"!=typeof Symbol&&Symbol.iterator,""+Object.prototype.constructor),Xr="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,ei=Object.getOwnPropertyDescriptors||function(e){var t={};return Xr(e).forEach((function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)})),t},ti={},ni={get:function(e,t){if(t===Kr)return e;var n=br(e);if(!hr(n,t))return function(e,t,n){var r,i=Dr(t,n);return i?"value"in i?i.value:null===(r=i.get)||void 0===r?void 0:r.call(e.k):void 0}(e,n,t);var r=n[t];return e.I||!pr(r)?r:r===kr(e.t,t)?(Fr(e),e.o[t]=Br(e.A.h,r,e)):r},has:function(e,t){return t in br(e)},ownKeys:function(e){return Reflect.ownKeys(br(e))},set:function(e,t,n){var r=Dr(br(e),t);if(null==r?void 0:r.set)return r.set.call(e.k,n),!0;if(!e.P){var i=kr(br(e),t),s=null==i?void 0:i[Kr];if(s&&s.t===n)return e.o[t]=n,e.R[t]=!1,!0;if(mr(n,i)&&(void 0!==n||hr(e.t,t)))return!0;Fr(e),xr(e)}return e.o[t]===n&&(void 0!==n||t in e.o)||Number.isNaN(n)&&Number.isNaN(e.o[t])||(e.o[t]=n,e.R[t]=!0),!0},deleteProperty:function(e,t){return void 0!==kr(e.t,t)||t in e.t?(e.R[t]=!1,Fr(e),xr(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=br(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.i||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty:function(){dr(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){dr(12)}},ri={};fr(ni,(function(e,t){ri[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),ri.deleteProperty=function(e,t){return ri.set.call(this,e,t,void 0)},ri.set=function(e,t,n){return ni.set.call(this,e[0],t,n,e[0])};var ii=function(){function e(e){var t=this;this.O=Gr,this.D=!0,this.produce=function(e,n,r){if("function"==typeof e&&"function"!=typeof n){var i=n;n=e;var s=t;return function(e){var t=this;void 0===e&&(e=i);for(var r=arguments.length,o=Array(r>1?r-1:0),a=1;a<r;a++)o[a-1]=arguments[a];return s.produce(e,(function(e){var r;return(r=n).call.apply(r,[t,e].concat(o))}))}}var o;if("function"!=typeof n&&dr(6),void 0!==r&&"function"!=typeof r&&dr(7),pr(e)){var a=_r(t),u=Br(t,e,void 0),l=!0;try{o=n(u),l=!1}finally{l?Er(a):Or(a)}return"undefined"!=typeof Promise&&o instanceof Promise?o.then((function(e){return Tr(a,r),Lr(e,a)}),(function(e){throw Er(a),e})):(Tr(a,r),Lr(o,a))}if(!e||"object"!=typeof e){if(void 0===(o=n(e))&&(o=e),o===Yr&&(o=void 0),t.D&&Sr(o,!0),r){var d=[],c=[];Rr("Patches").M(e,o,d,c),r(d,c)}return o}dr(21,e)},this.produceWithPatches=function(e,n){if("function"==typeof e)return function(n){for(var r=arguments.length,i=Array(r>1?r-1:0),s=1;s<r;s++)i[s-1]=arguments[s];return t.produceWithPatches(n,(function(t){return e.apply(void 0,[t].concat(i))}))};var r,i,s=t.produce(e,n,(function(e,t){r=e,i=t}));return"undefined"!=typeof Promise&&s instanceof Promise?s.then((function(e){return[e,r,i]})):[s,r,i]},"boolean"==typeof(null==e?void 0:e.useProxies)&&this.setUseProxies(e.useProxies),"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze)}var t=e.prototype;return t.createDraft=function(e){pr(e)||dr(8),cr(e)&&(e=qr(e));var t=_r(this),n=Br(this,e,void 0);return n[Kr].C=!0,Or(t),n},t.finishDraft=function(e,t){var n=(e&&e[Kr]).A;return Tr(n,t),Lr(void 0,n)},t.setAutoFreeze=function(e){this.D=e},t.setUseProxies=function(e){e&&!Gr&&dr(20),this.O=e},t.applyPatches=function(e,t){var n;for(n=t.length-1;n>=0;n--){var r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));var i=Rr("Patches").$;return cr(e)?i(e,t):this.produce(e,(function(e){return i(e,t)}))},e}(),si=new ii;function oi(e){return oi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},oi(e)}function ai(e,t,n){return(t=function(e){var t=function(e){if("object"!=oi(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=oi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==oi(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ui(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function li(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ui(Object(n),!0).forEach((function(t){ai(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ui(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function di(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}si.produce,si.produceWithPatches.bind(si),si.setAutoFreeze.bind(si),si.setUseProxies.bind(si),si.applyPatches.bind(si),si.createDraft.bind(si),si.finishDraft.bind(si);var ci="function"==typeof Symbol&&Symbol.observable||"@@observable",pi=function(){return Math.random().toString(36).substring(7).split("").join(".")},fi={INIT:"@@redux/INIT"+pi(),REPLACE:"@@redux/REPLACE"+pi(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+pi()}};function yi(e,t,n){var r;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(di(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(di(1));return n(yi)(e,t)}if("function"!=typeof e)throw new Error(di(2));var i=e,s=t,o=[],a=o,u=!1;function l(){a===o&&(a=o.slice())}function d(){if(u)throw new Error(di(3));return s}function c(e){if("function"!=typeof e)throw new Error(di(4));if(u)throw new Error(di(5));var t=!0;return l(),a.push(e),function(){if(t){if(u)throw new Error(di(6));t=!1,l();var n=a.indexOf(e);a.splice(n,1),o=null}}}function p(e){if(!function(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e))throw new Error(di(7));if(void 0===e.type)throw new Error(di(8));if(u)throw new Error(di(9));try{u=!0,s=i(s,e)}finally{u=!1}for(var t=o=a,n=0;n<t.length;n++)(0,t[n])();return e}return p({type:fi.INIT}),(r={dispatch:p,subscribe:c,getState:d,replaceReducer:function(e){if("function"!=typeof e)throw new Error(di(10));i=e,p({type:fi.REPLACE})}})[ci]=function(){var e,t=c;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(di(11));function n(){e.next&&e.next(d())}return n(),{unsubscribe:t(n)}}})[ci]=function(){return this},e},r}function hi(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}function gi(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(){var n=e.apply(void 0,arguments),r=function(){throw new Error(di(15))},i={getState:n.getState,dispatch:function(){return r.apply(void 0,arguments)}},s=t.map((function(e){return e(i)}));return r=hi.apply(void 0,s)(n.dispatch),li(li({},n),{},{dispatch:r})}}}function mi(e){return function(t){var n=t.dispatch,r=t.getState;return function(t){return function(i){return"function"==typeof i?i(n,r,e):t(i)}}}}var vi=mi();vi.withExtraArgument=mi;const wi=vi;var bi,ji=(bi=function(e,t){return bi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},bi(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}bi(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),Si=function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e},Ci=Object.defineProperty,Ai=Object.defineProperties,Ri=Object.getOwnPropertyDescriptors,Ii=Object.getOwnPropertySymbols,Ti=Object.prototype.hasOwnProperty,Ei=Object.prototype.propertyIsEnumerable,Oi=function(e,t,n){return t in e?Ci(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},_i=function(e,t){for(var n in t||(t={}))Ti.call(t,n)&&Oi(e,n,t[n]);if(Ii)for(var r=0,i=Ii(t);r<i.length;r++)n=i[r],Ei.call(t,n)&&Oi(e,n,t[n]);return e},Mi=function(e,t){return Ai(e,Ri(t))},Li="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?hi:hi.apply(null,arguments)};"undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;var Pi=function(e){function t(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=e.apply(this,n)||this;return Object.setPrototypeOf(i,t.prototype),i}return ji(t,e),Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.prototype.concat.apply(this,t)},t.prototype.prepend=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return 1===e.length&&Array.isArray(e[0])?new(t.bind.apply(t,Si([void 0],e[0].concat(this)))):new(t.bind.apply(t,Si([void 0],e.concat(this))))},t}(Array),Ni=function(e){function t(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=e.apply(this,n)||this;return Object.setPrototypeOf(i,t.prototype),i}return ji(t,e),Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.prototype.concat.apply(this,t)},t.prototype.prepend=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return 1===e.length&&Array.isArray(e[0])?new(t.bind.apply(t,Si([void 0],e[0].concat(this)))):new(t.bind.apply(t,Si([void 0],e.concat(this))))},t}(Array);function Wi(e){var t,n=function(e){return function(e){void 0===e&&(e={});var t=e.thunk,n=void 0===t||t,r=(e.immutableCheck,e.serializableCheck,new Pi);return n&&(function(e){return"boolean"==typeof e}(n)?r.push(wi):r.push(wi.withExtraArgument(n.extraArgument))),r}(e)},r=e||{},i=r.reducer,s=void 0===i?void 0:i,o=r.middleware,a=void 0===o?n():o,u=r.devTools,l=void 0===u||u,d=r.preloadedState,c=void 0===d?void 0:d,p=r.enhancers,f=void 0===p?void 0:p;if("function"==typeof s)t=s;else{if(!function(e){if("object"!=typeof e||null===e)return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;for(var n=t;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return t===n}(s))throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');t=function(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var i=t[r];"function"==typeof e[i]&&(n[i]=e[i])}var s,o=Object.keys(n);try{!function(e){Object.keys(e).forEach((function(t){var n=e[t];if(void 0===n(void 0,{type:fi.INIT}))throw new Error(di(12));if(void 0===n(void 0,{type:fi.PROBE_UNKNOWN_ACTION()}))throw new Error(di(13))}))}(n)}catch(e){s=e}return function(e,t){if(void 0===e&&(e={}),s)throw s;for(var r=!1,i={},a=0;a<o.length;a++){var u=o[a],l=n[u],d=e[u],c=l(d,t);if(void 0===c)throw t&&t.type,new Error(di(14));i[u]=c,r=r||c!==d}return(r=r||o.length!==Object.keys(e).length)?i:e}}(s)}var y=a;"function"==typeof y&&(y=y(n));var h=gi.apply(void 0,y),g=hi;l&&(g=Li(_i({trace:!1},"object"==typeof l&&l)));var m=new Ni(h),v=m;return Array.isArray(f)?v=Si([h],f):"function"==typeof f&&(v=f(m)),yi(t,c,g.apply(void 0,v))}function ki(e,t){function n(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];if(t){var i=t.apply(void 0,n);if(!i)throw new Error("prepareAction did not return an object");return _i(_i({type:e,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:e,payload:n[0]}}return n.toString=function(){return""+e},n.type=e,n.match=function(t){return t.type===e},n}var Di=["name","message","stack","code"],xi=function(e,t){this.payload=e,this.meta=t},Fi=function(e,t){this.payload=e,this.meta=t},Bi=function(e){if("object"==typeof e&&null!==e){for(var t={},n=0,r=Di;n<r.length;n++){var i=r[n];"string"==typeof e[i]&&(t[i]=e[i])}return t}return{message:String(e)}};function qi(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}!function(){function e(e,t,n){var r=ki(e+"/fulfilled",(function(e,t,n,r){return{payload:e,meta:Mi(_i({},r||{}),{arg:n,requestId:t,requestStatus:"fulfilled"})}})),i=ki(e+"/pending",(function(e,t,n){return{payload:void 0,meta:Mi(_i({},n||{}),{arg:t,requestId:e,requestStatus:"pending"})}})),s=ki(e+"/rejected",(function(e,t,r,i,s){return{payload:i,error:(n&&n.serializeError||Bi)(e||"Rejected"),meta:Mi(_i({},s||{}),{arg:r,requestId:t,rejectedWithValue:!!i,requestStatus:"rejected",aborted:"AbortError"===(null==e?void 0:e.name),condition:"ConditionError"===(null==e?void 0:e.name)})}})),o="undefined"!=typeof AbortController?AbortController:function(){function e(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return e.prototype.abort=function(){},e}();return Object.assign((function(e){return function(a,u,l){var d,c=(null==n?void 0:n.idGenerator)?n.idGenerator(e):function(e){void 0===e&&(e=21);for(var t="",n=e;n--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t}(),p=new o;function f(e){d=e,p.abort()}var y=function(){return o=this,y=null,h=function(){var o,y,h,g,m,v;return function(e,t){var n,r,i,s,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}}(this,(function(w){switch(w.label){case 0:return w.trys.push([0,4,,5]),null===(b=g=null==(o=null==n?void 0:n.condition)?void 0:o.call(n,e,{getState:u,extra:l}))||"object"!=typeof b||"function"!=typeof b.then?[3,2]:[4,g];case 1:g=w.sent(),w.label=2;case 2:if(!1===g||p.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return m=new Promise((function(e,t){return p.signal.addEventListener("abort",(function(){return t({name:"AbortError",message:d||"Aborted"})}))})),a(i(c,e,null==(y=null==n?void 0:n.getPendingMeta)?void 0:y.call(n,{requestId:c,arg:e},{getState:u,extra:l}))),[4,Promise.race([m,Promise.resolve(t(e,{dispatch:a,getState:u,extra:l,requestId:c,signal:p.signal,abort:f,rejectWithValue:function(e,t){return new xi(e,t)},fulfillWithValue:function(e,t){return new Fi(e,t)}})).then((function(t){if(t instanceof xi)throw t;return t instanceof Fi?r(t.payload,c,e,t.meta):r(t,c,e)}))])];case 3:return h=w.sent(),[3,5];case 4:return v=w.sent(),h=v instanceof xi?s(null,c,e,v.payload,v.meta):s(v,c,e),[3,5];case 5:return n&&!n.dispatchConditionRejection&&s.match(h)&&h.meta.condition||a(h),[2,h]}var b}))},new Promise((function(e,t){var n=function(e){try{i(h.next(e))}catch(e){t(e)}},r=function(e){try{i(h.throw(e))}catch(e){t(e)}},i=function(t){return t.done?e(t.value):Promise.resolve(t.value).then(n,r)};i((h=h.apply(o,y)).next())}));var o,y,h}();return Object.assign(y,{abort:f,requestId:c,arg:e,unwrap:function(){return y.then(qi)}})}}),{pending:i,rejected:s,fulfilled:r,typePrefix:e})}e.withTypes=function(){return e}}(),Object.assign;var Ui="listenerMiddleware";ki(Ui+"/add"),ki(Ui+"/removeAll"),ki(Ui+"/remove"),"function"==typeof queueMicrotask&&queueMicrotask.bind("undefined"!=typeof window?window:void 0!==n.g?n.g:globalThis);"undefined"!=typeof window&&window.requestAnimationFrame&&window.requestAnimationFrame,function(){function e(e,t){var n=i[e];return n?n.enumerable=t:i[e]=n={configurable:!0,enumerable:t,get:function(){var t=this[Kr];return ni.get(t,e)},set:function(t){var n=this[Kr];ni.set(n,e,t)}},n}function t(e){for(var t=e.length-1;t>=0;t--){var i=e[t][Kr];if(!i.P)switch(i.i){case 5:r(i)&&xr(i);break;case 4:n(i)&&xr(i)}}}function n(e){for(var t=e.t,n=e.k,r=Xr(n),i=r.length-1;i>=0;i--){var s=r[i];if(s!==Kr){var o=t[s];if(void 0===o&&!hr(t,s))return!0;var a=n[s],u=a&&a[Kr];if(u?u.t!==o:!mr(a,o))return!0}}var l=!!t[Kr];return r.length!==Xr(t).length+(l?0:1)}function r(e){var t=e.k;if(t.length!==e.t.length)return!0;var n=Object.getOwnPropertyDescriptor(t,t.length-1);if(n&&!n.get)return!0;for(var r=0;r<t.length;r++)if(!t.hasOwnProperty(r))return!0;return!1}var i={};!function(e,t){ti[e]||(ti[e]=t)}("ES5",{J:function(t,n){var r=Array.isArray(t),i=function(t,n){if(t){for(var r=Array(n.length),i=0;i<n.length;i++)Object.defineProperty(r,""+i,e(i,!0));return r}var s=ei(n);delete s[Kr];for(var o=Xr(s),a=0;a<o.length;a++){var u=o[a];s[u]=e(u,t||!!s[u].enumerable)}return Object.create(Object.getPrototypeOf(n),s)}(r,t),s={i:r?5:4,A:n?n.A:Ir(),P:!1,I:!1,R:{},l:n,t,k:i,o:null,g:!1,C:!1};return Object.defineProperty(i,Kr,{value:s,writable:!0}),i},S:function(e,n,i){i?cr(n)&&n[Kr].A===e&&t(e.p):(e.u&&function e(t){if(t&&"object"==typeof t){var n=t[Kr];if(n){var i=n.t,s=n.k,o=n.R,a=n.i;if(4===a)fr(s,(function(t){t!==Kr&&(void 0!==i[t]||hr(i,t)?o[t]||e(s[t]):(o[t]=!0,xr(n)))})),fr(i,(function(e){void 0!==s[e]||hr(s,e)||(o[e]=!1,xr(n))}));else if(5===a){if(r(n)&&(xr(n),o.length=!0),s.length<i.length)for(var u=s.length;u<i.length;u++)o[u]=!1;else for(var l=i.length;l<s.length;l++)o[l]=!0;for(var d=Math.min(s.length,i.length),c=0;c<d;c++)s.hasOwnProperty(c)||(o[c]=!0),void 0===o[c]&&e(s[c])}}}}(e.p[0]),t(e.p))},K:function(e){return 4===e.i?n(e):r(e)}})}();const $i={windows:{},dragging:null,tabCollections:{},useDOMBasedMovement:!0,closingTabs:null},Ji={clone:ki("windowTitleBar/clone"),close:ki("windowTitleBar/close"),closeTab:ki("windowTitleBar/closeTab"),disableDOMBasedMovement:ki("windowTitleBar/disableDOMBasedMovement"),setMaximize:ki("windowTitleBar/maximize"),minimize:ki("windowTitleBar/minimize"),promoteTab:ki("windowTitleBar/promoteTab"),register:ki("windowTitleBar/register"),removeFromTabCollection:ki("windowTitleBar/removeFromTabCollection"),scroll:ki("windowTitleBar/scrollTabCollection"),setAlwaysOnTop:ki("windowTitleBar/setAlwaysOnTop"),setGrouped:ki("windowTitleBar/setGrouped"),setUserDefinedTitle:ki("windowTitleBar/setUserDefinedTitle"),setDraggingStatus:ki("windowTitlebar/setDraggingStatus"),stopDragging:ki("windowTitlebar/stopDragging"),shiftPromotedTab:ki("windowTitleBar/shiftPromotedTab"),setClosingTabStatus:ki("windowTitleBar/setClosingTabStatus"),removeClosingTabs:ki("windowTitleBar/removeClosingTabs"),createTabCollection:ki("api/createTabCollection"),addTabsToTabCollection:ki("api/addTabsToTabCollection"),removeTabsFromTabCollection:ki("api/removeTabsFromTabCollection"),showScrim:ki("ux/showScrim"),hideScrim:ki("ux/hideScrim"),setScrimSafetyTimeout:ki("ux/setScrimSafetyTimeout"),addLaunchData:ki("main/addLaunchData"),dockingOperation:ki("main/dockingOperation"),loadWorkspace:ki("main/loadWorkspace"),setEmulatedMaximization:ki("main/setEmulatedMaximization"),enableDND:ki("main/enableDND"),loadUserDefinedTitle:ki("main/loadUserDefinedTitle"),saveSpawnTabTitleToWorkspace:ki("main/saveSpawnTabTitleToWorkspace"),setDocumentTitle:ki("main/updatedDocumentTitle"),setAPITitle:ki("main/updatedAPITitle"),updateGroupedWindows:ki("main/updateGroupedWindows"),windowEvent:ki("main/windowEvent"),updateMaximizedBounds:ki("main/updateMaximizedBounds"),workspaceClosing:ki("main/workspaceClosing"),setTabCollectionForEvergreen:ki("main/setTabCollectionForEvergreen"),updateEvergreenAfterWorkspaceLoading:ki("main/updateEvergreenAfterWorkspaceLoading"),createDefaultWindowTitleBar:ki("main/createDefaultWindowTitleBar")};var Hi;function Vi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Array.prototype.concat;var zi=Symbol("isCmd"),Gi=(Symbol("dispatch"),Symbol("getState"),"NONE");Object.freeze((Vi(Hi={},zi,!0),Vi(Hi,"type",Gi),Vi(Hi,"simulate",(function(){return null})),Hi));const Yi=({server:e,slice:t,dispatchOnly:n})=>r=>(i,s)=>{const o=r(((e,t)=>("@@finsemble/updateState"===t.type&&(e=t.newState),{...i(e,t)})),s),a={...o,dispatch:t=>(fe.system.debug(`Interop.remote.${t.type}`,o,t),"@@finsemble/updateState"==t.type?o.dispatch(t):t.type?P.query(e,t):t.then&&t.then(o.dispatch),t)},u=`reduxSlice:${t}:${Date.now()}_${Math.random()}`;return P.addListener(u,((e,t)=>{if(!e&&t){const e={type:"@@finsemble/updateState",newState:null==t?void 0:t.data};a.dispatch(e)}})),n||P.query(e,{"@@finsemble/action":"subscribe","@@finsemble/slice":t,"@@finsemble/routerChannel":u},(()=>{})),a},Qi=e=>e;var Ki=n(88055),Zi=n.n(Ki);class Xi{constructor(e){this.win=e.win,this.id=e.id}async remove(e=Function.prototype){await this.win.removeBrowserView(this,e)}async setBounds(e,t=Function.prototype){await this.win.setViewBounds({view:this,bounds:e},t)}async bringToFront(e=Function.prototype){await this.win.bringViewToFront(this,e)}}class es extends lr{constructor(e){super({name:e.name,sourceType:"Window"}),this.types={},this.wrapState=e.wrapState||"initializing",this.componentState={},this.windowState=dt.NORMAL,this.type=null,this.windowType=null,this.bounds={},this.guid=`${Date.now()}_${Math.random()}`,this.WINDOWSTATE=dt,this.windowOptions={},this.doConstruction(e),this.componentKey=rs("activeWorkspace",this.name,this.name),this.windowKey=rs("activeWorkspace",this.name),es.bindFunctions(this)}standardizeEventName(e){switch(e){case"bounds-set":case"stoppedMoving":return"bounds-change-end";case"startedMoving":return"bounds-change-start";case"bringToFront":return"broughtToFront";default:return e}}addEventListener(e,t){return e=this.standardizeEventName(e),super.addEventListener(e,t)}removeEventListener(e,t,n=!1){if("closed"!==e||!d.finsembleWindow||this.name!==d.finsembleWindow.name)return e=this.standardizeEventName(e),super.removeEventListener(e,t,n)}windowServiceChannelName(e){return`WindowService-Request-${e}`}eventChannelName(e){return`WindowService-Event-${this.name||this.windowName}-${e}`}doConstruction(e){if(e.setWindowType||e.windowType||(e.windowType="WebWindow"),e.windowType)return e.setWindowType=e.windowType,delete e.windowType,new es(e);if(e)for(const t in e)this[t]=e[t];this.name||(this.name=e.windowName),this.windowType=this.setWindowType}static registerType(e,t){const n=es;n.types||(n.types={}),n.types[e]=t}static bindFunctions(e){e.eventChannelName=e.eventChannelName.bind(e),e.windowServiceChannelName=e.windowServiceChannelName.bind(e),e.handleWrapRemoveRequest=e.handleWrapRemoveRequest.bind(e),e.reload=e.reload.bind(e)}static async createWrapFromUUIDAndName(e,t){var n;const{uuid:r,windowType:i}=t;if(!1!==t.waitForReady)try{await es._windowReady(e),t.wrapState="ready"}catch(e){return{err:e}}fe.system.debug("WRAP LIFECYCLE:",e,"All information for wrap passed in, creating wrap locally");const s=es.cache[e];return s?(fe.system.debug("WRAP LIFECYCLE:",e,"Window found in the cache, returning without going to the Launcher"),{data:s}):{data:(await es._createWrap({...t,windowIdentifier:null!==(n=t.windowIdentifier)&&void 0!==n?n:{uuid:r,name:e,windowName:e,windowType:i}})).wrap}}static getInstance(e,t){var n;const r=x.Window.getCurrent().name,i=null!==(n=null==(e=Zi()(e))?void 0:e.windowName)&&void 0!==n?n:null==e?void 0:e.name;return new Promise((async(n,s)=>{if(!i){const e='"name" is a required param';return null==t||t(e),void s(e)}e.windowName=i;let o=es.cache[i];if(o)return fe.system.debug("WRAP LIFECYCLE:",i,"Window found in the cache, returning without going to the Launcher"),null==t||t(null,o),void n({wrap:o});if(e.name){const{err:r,data:o}=await es.createWrapFromUUIDAndName(i,e);return r||!o?(null==t||t(r),void s(r)):(null==t||t(null,o),void n({wrap:o}))}if(!1!==e.waitForReady)try{await es._windowReady(i),e.wrapState="ready"}catch(a){return null==t||t(a,null),void s(a)}const{err:a,response:u}=await P.query("WindowService-Request-getWindowIdentifier",{windowName:i,requester:r});if(a)return fe.system.error(a),null==t||t(a,null),void s(a);if(o=es.cache[i],o)return fe.system.debug("WRAP LIFECYCLE:",e.name,"Information received from launcher, but wrap exists in cache. Returning cached wrap."),null==t||t(null,o),void n({wrap:o});fe.system.debug("WRAP LIFECYCLE:",i,"Information received from launcher. Creating wrap.");const{identifier:l}=u.data;l.windowName&&(l.name=l.windowName),e.retrievedIdentifier=l,({wrap:o}=await es._createWrap(e)),u.data.descriptor&&(o.descriptor=u.data.descriptor),null==t||t(null,o),n({wrap:o})}))}static _createWrap(e){return new Promise((async t=>{const n=e.retrievedIdentifier||e.windowIdentifier;(e.setWindowType||n.windowType)&&"WebApplication"!==n.windowType||(n.windowType="WebWindow");let r={...n};r=Object.assign(r,e),r.setWindowType=r.windowType,delete r.windowType,fe.system.debug("WRAP LIFECYCLE: Placing wrap into the local cache.",n.windowName);let i=new es(r);es.cache[n.windowName]=i,i.windowType=n.windowType,i.identifier=n,i.closeFinal(i.handleWrapRemoveRequest),i.addEventListener("maximized",(async()=>{i.windowState=dt.MAXIMIZED,i.windowOptions.windowState=dt.MAXIMIZED;const{data:e}=await i.getBounds();e&&(i.windowOptions.left=e.left,i.windowOptions.top=e.top,i.windowOptions.height=e.height,i.windowOptions.width=e.width,i.windowOptions.right=e.right,i.windowOptions.bottom=e.bottom,i.windowOptions.opacity=1,i.saveCompleteWindowState(i.windowOptions))})),i.addEventListener("minimized",(()=>{i.windowState===dt.MAXIMIZED?(i.windowState=dt.MINIMIZED_WAS_MAXIMIZED,i.windowOptions.windowState=dt.MINIMIZED_WAS_MAXIMIZED):i.windowState===dt.NORMAL?(i.windowState=dt.MINIMIZED_WAS_NORMAL,i.windowOptions.windowState=dt.MINIMIZED_WAS_NORMAL):fe.system.warn("Invalid window state received listening to window minimize",i.windowState)})),i.addEventListener("restored",(()=>{i.windowState=dt.NORMAL,i.windowOptions.windowState=dt.NORMAL}));const s=P.subscribe(`Finsemble.Component.State.${n.windowName}`,((e,t)=>{if(e)fe.system.error("Finsemble component state change error",e);else{const{state:e}=t.data;i.wrapState=e,P.unsubscribe(s)}}));t({wrap:i})}))}static _getRemoveWrapChannel(e){return`${x.Window.getCurrent().name}.removeWrap.${e}`}async handleWrapRemoveRequest(e){e&&e.wait(),fe.system.debug("WRAP Destructor. Removing cached window",this.name,"in ",window.name),this.removeListeners&&this.removeListeners(),this.cleanupRouter(),this.cleanup(),this.name!==d.name&&this.name&&delete es.cache[this.name],e&&e.done()}static closeAllWraps(){Object.values(es.cache).forEach((e=>{e.handleWrapRemoveRequest()}))}cleanupRouter(){const e=es._getRemoveWrapChannel(this.name);P.removeResponder(e)}onReady(e){return new Promise((t=>{if("ready"===this.wrapState)return null==e||e(),void t();this.addEventListener("ready",(()=>{null==e||e(),t()}))}))}queryWindowService(e,t,n=Function.prototype){return"function"==typeof t&&(n=t,t={}),t={...t,windowIdentifier:this.identifier},fe.setting().system.Debug&&(t.callstack=fe.callStack()),new Promise((async(r,i)=>{var s;if("close"!==e&&"ready"!==this.wrapState)return await this.onReady(),this.wrapState="ready",void r(await this.queryWindowService(e,t));fe.system.debug("FinsembleWindow.queryWindowService",this.windowServiceChannelName(e),t);const{err:o,response:a}=await P.query(this.windowServiceChannelName(e),t);let u=null!==(s=a.data)&&void 0!==s?s:null;if(o){if(fe.system.debug(`WindowService.${e}: failed`,o),console.debug(`WindowService.${e}: failed`,o),"getComponentState"!==e&&"Not found"!==o)return void i(o)}else fe.system.debug(`${this.windowServiceChannelName(e)} successful`,u),console.debug(`${this.windowServiceChannelName(e)} successful`,u);r(u),n(o,u)}))}minimize(e=null,t){return new Promise((n=>{this.queryWindowService("minimize",e,(e=>{null==t||t(e),n({err:e})}))}))}maximize(e=null,t){return new Promise((n=>{this.getBounds(((r,i)=>{r||!i?fe.system.warn(`Error getting bounds, cached bounds will not be set: ${r}`):this.updateOptions({options:{left:i.left,top:i.top,width:i.width,height:i.height}}),this.queryWindowService("maximize",e,(e=>{null==t||t(e),n({err:e})}))}))}))}restore(e=null,t){return new Promise((n=>{this.queryWindowService("restore",e,(e=>{null==t||t(e),n({err:e})}))}))}blur(e=null,t){return new Promise((n=>{this.queryWindowService("blur",e,(e=>{null==t||t(e),n({err:e})}))}))}focus(e=null,t){return new Promise((n=>{this.queryWindowService("focus",e,(e=>{null==t||t(e),n({err:e})}))}))}bringToFront(e=null,t){return new Promise((n=>{this.queryWindowService("bringToFront",e,(e=>{null==t||t(e),n({err:e})}))}))}setAlwaysOnTop(e={alwaysOnTop:!0},t){return new Promise((n=>{this.queryWindowService("setAlwaysOnTop",e,(e=>{null==t||t(e),n({err:e})}))}))}isAlwaysOnTop(e={},t){this.queryWindowService("isAlwaysOnTop",e,t)}isShowing(e={},t){this.queryWindowService("isShowing",e,t)}setIgnoreMouseEvents(e,t,n=Function.prototype){const r={ignore:new Boolean(e).valueOf(),options:new Boolean(t).valueOf()?t:{forward:!1}};this.queryWindowService("setIgnoreMouseEvents",r,n)}setShape(e,t=Function.prototype){this.queryWindowService("setShape",e,t)}async addBrowserView(e,t=Function.prototype){const n=await this.queryWindowService("addBrowserView",e,t);return new Xi({id:n,win:this})}async removeBrowserView(e,t=Function.prototype){await this.queryWindowService("removeBrowserView",{viewId:e.id},t)}async bringViewToFront(e,t=Function.prototype){await this.queryWindowService("bringViewToFront",{viewId:e.id},t)}async setViewBounds(e,t=Function.prototype){await this.queryWindowService("setViewBounds",{viewId:e.view.id,bounds:e.bounds},t)}setBounds(e={bounds:{}},t){return new Promise((n=>{"function"==typeof e||e.bounds||(e={bounds:e}),this.queryWindowService("setBounds",e,(e=>{null==t||t(e),n({err:e})}))}))}getBounds(e,t){return new Promise((n=>{const r="function"==typeof e?e:t;this.queryWindowService("getBounds",{},((e,t)=>{null==r||r(e,t),n({err:e,data:t})}))}))}updateOptions(e,t=Function.prototype){this.queryWindowService("updateOptions",e,t)}hide(e={},t){return new Promise((n=>{this.queryWindowService("hide",e,((e,r)=>{null==t||t(e,r),n({err:e})}))}))}reload(e={},t=Function.prototype){this.queryWindowService("reload",e,t)}show(e={},t){return new Promise((n=>{this.queryWindowService("show",e,((e,r)=>{null==t||t(e,r),n({err:e})}))}))}showAt(e={},t=Function.prototype){this.queryWindowService("showAt",e,t)}close(e={},t){return new Promise((n=>{fe.system.debug("WRAP CLOSE. Public close initiated for",this.name,e),this.queryWindowService("close",e,(e=>{fe.system.debug("WRAP CLOSE. Public close initiated for",this.name),null==t||t(e),n({err:e})}))}))}animate(e={},t=Function.prototype){this.queryWindowService("animate",e,t)}registerWithDocking(e={},t){this.onReady((()=>{P.query("DockingService.registerWindow",e,t)}))}showNativeOpenDialog(e={},t){this.queryWindowService("showNativeOpenDialog",e,t)}unRegisterWithDocking(){P.transmit("DockingService.deregisterWindow",{name:this.windowName})}initializeWindow({manageWindowMovement:e,identifier:t},n=Function.prototype){const r=()=>{P.publish(`Finsemble.${this.windowName}.componentReady`,{name:this.windowName}),n()};e?this.registerWithDocking(t,r):r()}wrapReady(){P.publish(`Finsemble.${this.windowName}.wrapReady`,{name:this.windowName,state:"open"})}setOpacity(e,t=Function.prototype){this.queryWindowService("setOpacity",e,t)}startTabTileMonitoring(e={}){fe.system.debug("FinsembleWindow.startTabTileMonitoring",e),P.transmit("TabTile.startTabTile",{params:e})}stopTabTileMonitoring(e={},t=Function.prototype){fe.system.debug("FinsembleWindow.stopTabTileMonitoring",e),P.query("TabTile.stopTabTile",{params:e},(function(e,n){e?fe.system.warn("TabTile.stopTabTile: query failed",e):fe.system.debug("TabTile.stopTabTile results",n.data);const r=n.data;t?t(e,r,this.defaultStopTrackingAction):this.defaultTabTileAction(r)}))}defaultTabTileAction(e){const t=this;switch(fe.system.debug("FinsembleWindow.defaultTabTileAction",e),e.stoppedLocation){case"OutsideWindow":case"TabSection":break;case"InsideWindow":e.tileGroupId?t.Group.addWindow(this.identifier,e.tileGroupId,e.dropCoordinates):t.Group.createGroup((function(n){t.Group.addWindow(this.identifier,n,e.dropCoordinates,{startingWindowIdentifier:e.droppedOnWindowIdentifier})}));break;default:fe.system.error("stopTracking returned an unknown stoppedLocation result",e)}}mergeBounds(e){e.right=e.left+e.width;const t={left:e.left,right:e.right,width:e.width,top:e.top,bottom:e.top+e.height,height:e.height},n={defaultLeft:e.left,defaultWidth:e.width,defaultTop:e.top,defaultHeight:e.height};Object.assign(this.windowOptions,t),Object.assign(this.windowOptions,n),this.windowOptions.bounds=t}startMove(e={}){fe.system.debug("FinsembleWindow.startMove",e),e.windowIdentifier=this.identifier,P.transmit(this.eventChannelName("startedMoving"),{})}stopMove(e={}){fe.system.debug("FinsembleWindow.stopMove",e),e.windowIdentifier=this.identifier,P.transmit(this.eventChannelName("stoppedMoving"),{})}getMonitor(e){P.query("DockingService.getMonitorForWindow",{windowIdentifier:this.identifier},((t,n)=>n?e(n.data):e()))}getComponentState(e,t){return new Promise((n=>{this.queryWindowService("getComponentState",e,((e,r)=>{null==t||t(e,r),n({err:e,data:r})}))}))}getWindowState(e,t){this.queryWindowService("getWindowState",e,t)}setComponentState(e,t=()=>{}){this.queryWindowService("setComponentState",e,t)}removeComponentState(e,t=()=>{}){this.queryWindowService("removeComponentState",e,t)}setWindowState(e,t=()=>{}){this.queryWindowService("setWindowState",e,t)}saveCompleteWindowState(e={},t=Function.prototype){this.queryWindowService("saveCompleteWindowState",e,t)}cancelTabTileMonitoring(e={}){fe.system.debug("FinsembleWindow.cancelTabTileMonitoring",e),P.transmit("TabTile.cancelTabTile",{params:e})}setTitle(e){(({singletonName:e,server:t,slice:r,emptyStore:i,dispatchOnly:s=!1})=>((e,t,...r)=>{const i=f(e);if(!i){const i=Symbol.for(`com.finsemble.singleton.${e}`);return n.g[i]=t(...r),n.g[i]}return i})(e,(()=>(({server:e,slice:t,emptyStore:n,dispatchOnly:r=!1})=>Wi({preloadedState:n,reducer:Qi,enhancers:[Yi({server:e,slice:t,dispatchOnly:r})]}))({server:t,slice:r,emptyStore:i,dispatchOnly:s}))))({singletonName:"WindowClient::setWindowTitle",server:"@@finsemble/remoteRedux/WindowServiceStore",slice:"windowTitleBar",emptyStore:$i,dispatchOnly:!0}).dispatch(Ji.setAPITitle({title:e}))}getOptions(e){return new Promise((t=>{this.queryWindowService("getOptions",{},((n,r)=>{null==e||e(n,r),t({err:n,data:r})}))}))}formGroup(){P.transmit("DockingService.formGroup",{windowName:this.name})}ejectFromGroup(){P.query("DockingService.leaveGroup",{name:this.name},(()=>{}))}}es.WINDOWSTATE=dt,es.wrap=es.getInstance,es.cache={},es._windowReady=function(e){let t;return fe.system.debug(`windowServiceReady: ${e} starting`),new Promise((async n=>{fe.system.debug(`windowServiceReady: ${e} waiting`),t=P.subscribe(`Finsemble.Component.State.${e}`,((r,i)=>{const{state:s}=i.data;switch(fe.system.debug(`windowServiceReady: ${e} state change: ${s}`),s){case"ready":case"reloading":case"closing":fe.system.debug(`windowServiceReady: ${e} ${s}`),P.unsubscribe(t),n()}}))}))},n(44383),n(2404);var ts=n(29132),ns=n.n(ts);function rs(...e){let t="";for(let n=0;n<e.length;n++)t=`${t} ${e[n]}`;return t.replace(/\s(.)/g,(e=>e.toUpperCase())).replace(/\s/g,"").replace(/^(.)/,(e=>e.toLowerCase()))}const is=e=>{if(!e)return e;if(Array.isArray(e))return e.slice();try{return JSON.parse(JSON.stringify(e))}catch(e){fe.error("fastClone error, falling back to structured clone",e)}try{return structuredClone(e)}catch(e){fe.error("fastClone error, structured clone failed",e)}};function ss(e,t=!1){return new Promise(((n,r)=>{t?setTimeout((()=>{try{r("timeout expired")}catch(e){}}),e):setTimeout(n,e)}))}const os="notification.",as="unsubscribe";class us{constructor(){this.subscriptions=[]}}const ls=()=>y("NotificationClient",us),ds=(e,t,n,r)=>new Promise((async(i,s)=>{try{null==n&&(n=os),fe.system.info(`sending message on ${n+e} channel`,t);const o=await P.query(n+e,t);o.err?(fe.system.error("Error: ",o.err),s(o.err)):(fe.system.log(`${e} raw response: `,o),r&&r(null,o.response.data.data),i(o.response.data.data))}catch(e){fe.system.error("Error: ",e),r&&r(e),s(e)}})),cs=async e=>{fe.system.info("notify() called with params: ",e);try{await ds("notify",Array.isArray(e)?e:[e])}catch(t){if(!t.includes("No responder"))throw t;await ss(500),await cs(e)}},ps=(e,t)=>new Promise((n=>{fe.system.info("Listening for messages on channel",e),((e,n,r)=>{null==r&&(r=os),fe.system.info(`Adding responder for endpoint: ${r+e}`),P.addResponder(r+e,((n,r)=>{if(fe.system.info(`Message received on ${e}: `,r),!n&&r)try{fe.system.info(`Processing message on channel ${e}: `,r);const n=(e=>{fe.system.info("Notification received: ",e.id);try{t(e)}catch(e){fe.system.error("Error thrown in the subscription.onNotification()",e)}return{message:"success"}})(r.data);fe.system.info(`Message response on ${e}: `,n),r.sendQueryResponse(null,{status:"success",data:n})}catch(e){fe.system.error("Failed to process query",e),r.sendQueryResponse(e)}else fe.system.error(`Failed to setup ${e} responder`,n)}))})(e),n()})),fs=(e,t)=>{null==t&&(t=os),P.removeResponder(t+e)},ys=()=>{const e=ls();fe.system.info("unsubscribeAll() called"),e.subscriptions.forEach((e=>{ds(as,e.id).then(),fs(e.id)})),e.subscriptions=[]},hs={initialize:()=>{fe.system.deprecated("It is no longer necessary to call NotificationClient.initialize()")},onReady:e=>{fe.system.deprecated("It is no longer necessary to call NotificationClient.onReady()"),null==e||e()},fetchHistory:async(e,t)=>(fe.system.info("FetchHistory() called with params: ",e,t),await ds("fetch_history",{options:e,filter:t})),getLastIssuedAt:async e=>(fe.system.info("getLastIssued called with params: ",e),await ds("last_issued",e)),performAction:async(e,t)=>(fe.system.info("performAction() called with params: ",e,t),Array.isArray(e)||(e=[e]),await ds("perform_action",{notifications:e,action:t})),markRead:async e=>{fe.system.info("markRead() called with params: ",e),Array.isArray(e)||(e=[e]),await ds("mark_read",{notifications:e,isRead:!0})},markUnread:async e=>{fe.system.info("markUnread() called with params: ",e),Array.isArray(e)||(e=[e]),await ds("mark_unread",{notifications:e,isRead:!1})},deleteNotifications:e=>(fe.system.info("deleteNotifications() called with params: ",e),new Promise((async(t,n)=>{try{t(ds("delete",e))}catch(e){n(e)}}))),notify:cs,subscribe:async(e,t)=>{const n=ls();fe.system.info("subscribe() called with params: ",e,t);const r=await ds("subscribe",JSON.parse(JSON.stringify(e)));return fe.system.info("Got a return value containing a channel",r),await ps(r.channel,t),n.subscriptions.push(r),r},unsubscribe:async e=>{fe.system.info("unsubscribe() called with params: ",e),await ds(as,e),(e=>{const t=ls(),n=t.subscriptions.findIndex((t=>t.id===e));n>-1&&(fs(t.subscriptions[n].channel),t.subscriptions.splice(n,1))})(e)},unsubscribeAll:ys,mute:async e=>(fe.system.info("mute() called with params: ",e),await ds("mute",{filter:e})),unmute:async e=>(fe.system.info("unmute() called with params: ",e),await ds("unmute",{filter:e})),getPreferences:async()=>(fe.system.info("getPreferences() called"),await ds("preferences",{})),getMuteFilters:async()=>(fe.system.info("getMuteFilters() called"),await ds("mute_filters",{})),getSources:async()=>(fe.system.info("getSources() called"),await ds("sources",{})),onClose:e=>{ys(),null==e||e()},Notification:ar,ActionTypes:ir,Subscription:class{constructor(e,t){this.id=e||null,this.filter=t,this.channel=""}},Action:rr,Filter:class{constructor(){this.include=[],this.exclude=[]}},actionTypes:ir},gs={x:-1,y:-1},ms={left:-1,top:-1,bottom:-1,right:-1,x:-1,y:-1,width:-1,height:-1,resizeType:"None"},vs={top:-1,left:-1};class ws{constructor(e){this.edge=null,this.direction="None",this.window=e,this.mouseLocation=gs,this.mouseOffset=vs,this.startBounds=ms,this.location=e.location}setStartBounds(e){e.resizeType&&(this.direction=e.resizeType),this.startBounds={left:e.left,top:e.top,bottom:e.bottom,right:e.right,x:e.x,y:e.y,width:e.width||e.right-e.left,height:e.height||e.bottom-e.top,resizeType:e.resizeType||this.direction},this.location=this.startBounds,this.setMouseLocation(e),this.setMouseOffset(this.startBounds)}setMouseLocation(e){this.mouseLocation={x:Number(e.x),y:Number(e.y)}}setMouseOffset(e){this.mouseOffset={left:e.x-e.left,top:e.y-e.top}}calculateWindowLocation(e){const t={x:Math.round(Number(e.x)),y:Math.round(Number(e.y))};this.edge||(this.edge=this.getResizeEdge(this.startBounds,t,this.direction));let n,r,{left:i,right:s=0,top:o,bottom:a=0}=this.location,u=0;if(this.edge){switch(u=1,this.edge){case"left":i=t.x;break;case"right":s=t.x;break;case"top":o=t.y;break;case"bottom":a=t.y;break;case"top-left":i=t.x,o=t.y;break;case"top-right":s=t.x,o=t.y;break;case"bottom-left":i=t.x,a=t.y;break;case"bottom-right":s=t.x,a=t.y}r=s-i,n=a-o}else i=t.x-Number(this.mouseOffset.left),o=t.y-Number(this.mouseOffset.top),a=Number(a)-(t.y-this.mouseLocation.y),s=Number(s)-(t.x-this.mouseLocation.x),n=Number(this.location.height),r=Number(this.location.width);const l=this.location;return l.changeType=u,l.left=Number(i),l.top=Number(o),l.bottom=Number(a),l.right=Number(s),l.height=Number(n),l.width=Number(r),this.mouseLocation=t,this.location=l,l}getResizeEdge(e,t,n){if("None"===n)return null;let r=null;switch(n){case"WE":r=Math.abs(t.x-e.left)<Math.abs(t.x-e.right)?"left":"right";break;case"NS":r=Math.abs(t.y-e.bottom)<Math.abs(t.y-e.top)?"bottom":"top";break;case"NESW":r=Math.abs(t.y-e.top)<Math.abs(t.y-e.bottom)?"top-right":"bottom-left";break;case"NWSE":r=Math.abs(t.y-e.top)<Math.abs(t.y-e.bottom)?"top-left":"bottom-right"}return r}}const bs=class{constructor(t){this.allowDelay=!1,this.delayed=!1,this.allowCancel=!1,this.canceled=!1,this.completed=!1,this.event=t.event,this.source=t.source,this.sourceType=t.sourceType,this.data=t.data,this.guid=t.guid,e[this.sourceType.toUpperCase()]&&e[this.sourceType.toUpperCase()].DELAYABLE_EVENTS.includes(this.event)&&(this.allowDelay=!0),e[this.sourceType.toUpperCase()]&&e[this.sourceType.toUpperCase()].CANCELABLE_EVENTS.includes(this.event)&&(this.allowCancel=!0),this.handler=t.handler,this.complete=new Promise(((e,t)=>{this.eventCanceled=t,this.eventComplete=e})),this.internalHandler()}async internalHandler(){this.handler&&await this.handler(this),this.delayed||this.canceled||this.completed||this.done()}cancel(){this.allowCancel&&(this.canceled=!0,this.done())}wait(){this.allowDelay?this.delayed=!0:this.done()}done(e){this.completed=!0,this.canceled?this.eventCanceled&&this.eventCanceled():this.eventComplete&&this.eventComplete(e)}};var js,Ss=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};js=new WeakMap;const Cs=class extends lr{constructor(e){super(e),js.set(this,void 0),this.eventList=[],this.eventInternalHandlerMap={},this.remoteListenerEventMap={},this.windowToGuidsMap={},this.waitList={},this.unsubscribes=[],this.unsubscribes.push(P.addListener(`Finsemble.RegisterInterruptibleEvent.${this.name}`,((e,t)=>{this.registerRemoteEventHandler(t.data.event,t.data.listenerGuid,t.data.windowName)}))),this.unsubscribes.push(P.addListener(`Finsemble.UnregisterInterruptibleEvent.${this.name}`,((e,t)=>{this.unregisterRemoteEventHandler(t.data.event,t.data.listenerGuid,t.data.windowName)}))),function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===r?i.call(e,n):i?i.value=n:t.set(e,n)}(this,js,P.addListener(bt.WINDOW_CLOSED,((e,t)=>{if(e)fe.system.error(`PrivateEventManager: Error listening for ${bt.WINDOW_CLOSED}: ${e}`);else{const{name:e}=t.data;this.removeWindow(e)}})),"f")}removeWindow(e){var t;(null!==(t=this.windowToGuidsMap[e])&&void 0!==t?t:[]).forEach((e=>{this.removeGuid(e)})),delete this.windowToGuidsMap[e]}removeGuid(e){Object.keys(this.remoteListenerEventMap).forEach((t=>{this.remoteListenerEventMap[t]=this.remoteListenerEventMap[t].filter((t=>t!==e))}))}registerRemoteEventHandler(e,t,n){var r;this.remoteListenerEventMap[e]||(this.remoteListenerEventMap[e]=[]),this.remoteListenerEventMap[e].push(t),this.windowToGuidsMap[n]=[t].concat(null!==(r=this.windowToGuidsMap[n])&&void 0!==r?r:[])}unregisterRemoteEventHandler(e,t,n){var r;this.remoteListenerEventMap[e]?(this.remoteListenerEventMap[e]=this.remoteListenerEventMap[e].filter((e=>e!==t)),this.windowToGuidsMap[n]=(null!==(r=this.windowToGuidsMap[n])&&void 0!==r?r:[]).filter((e=>e!==t)),0===this.windowToGuidsMap[n].length&&delete this.windowToGuidsMap[n]):this.windowToGuidsMap[n]&&fe.system.warn(`PrivateEventManager.unregisterListener() attempt to remove unregistered event "${e}" for window ${n}`)}awaitRemoteDelayer(e,t){return new Promise(((n,r)=>{const i=(s,o)=>{P.removeListener(`Finsemble.Listener.Done.${e}.${t}`,i),!0===o.data.canceled?r("canceled"):n(o.data.data)};this.waitList[e]=i,P.addListener(`Finsemble.Listener.Done.${e}.${t}`,i)}))}async queryRemoteListener(e,t,n,r){const i=`${this.name}_private_${Date.now()}_${Math.random()}`,s={event:e,guid:i,data:n},o=this.awaitRemoteDelayer(i,t),{err:a,response:u}=await Promise.race([P.query(`Finsemble.Interrupt.${t}`,s,{timeout:0,logWhenNoResponder:!1},(()=>{})),ss(r.initialQueryTimeout,!0)]).catch((()=>{throw P.removeListener(`Finsemble.Listener.Done.${i}.${t}`,this.waitList[i]),"eventHandler failed initial response"}));if(a||!u.data)return;let l=!0;if(!0===u.data.wait)try{return l=!1,await o}catch(e){if("canceled"===e)throw"event was canceled";l=!0}if(!0===u.data.delayed)try{return l=!1,await Promise.race([o,ss(r.timeout,!0)])}catch(e){if("timeout expired"!==e)throw"event was canceled";l=!0}if(l&&P.removeListener(`Finsemble.Listener.Done.${i}.${t}`,this.waitList[i]),!0===u.data.canceled)throw"event was canceled";return u.data.data}async trigger(e,t=null,n={initialQueryTimeout:1e3,timeout:1e4}){fe.verbose(`Triggering ${e} for ${this.name}`,t);const r=[];if(this.remoteListenerEventMap[e])for(let i of this.remoteListenerEventMap[e])r.push(this.queryRemoteListener(e,i,t,n));this.handlers.filter((t=>t.event===e)).forEach((n=>{const i=new bs({source:this.name,sourceType:this.sourceType,handler:n.handler,event:e,data:t,guid:n.listenerGuid});r.push(i.complete)}));try{return await Promise.all(r)}catch(t){if("eventHandler failed initial response"!==t)throw"event was canceled";console.debug(`No response for interrupt on event ${e}. Window is probably already closed.`)}}addEventListener(e,t){fe.system.debug("PrivateEventManager.addEventListener:",e);const n=`${this.name}_public_${Date.now()}_${Math.random()}`;return this.handlers.push({event:e,handler:t,listenerGuid:n}),()=>{this.removeEventListener(e,t)}}removeEventListener(e,t){fe.system.debug("PrivateEventManager.removeEventListener:",e);const n=this.handlers.findIndex((n=>n.event===e&&n.handler===t));-1!=n?this.handlers.splice(n,1):fe.system.warn(`PrivateEventManager.removeEventListener() attempt to remove unregistered event "${e}"`)}cleanup(){Ss(this,js,"f")&&Ss(this,js,"f").call(this),this.unsubscribes.forEach((e=>{e()})),this.unsubscribes=[]}};var As=n(90165);n.n(As)()(1);const Rs=(e,...t)=>{(e?fe.system.error:fe.system.info)(...t,e)},Is=async(e,t)=>{if("string"!=typeof e.key||"string"!=typeof e.topic)throw new Error("Values for key and topic must be strings.");await A.waitForStartup("storageService");const{err:n,response:r}=await P.query("Storage.get",e);return Rs(n,"Storage.get",r.data),null==t||t(n,r.data),{err:n,data:r.data}},Ts=Is;class Es{constructor(){this.workspaces=[],this.publicEventManager=new lr({name:"workspaceClient",sourceType:"workspace"}),P.subscribe(gt.WORKSPACE_UPDATED,((e,t)=>{fe.system.debug(`${gt.WORKSPACE_UPDATED} response`,e,t),e?fe.system.error(e):(this.activeWorkspace=t.data.activeWorkspace,this.workspaces=t.data.workspaces)}))}}const Os=()=>y("WorkspaceClient",Es);Os();const _s=async e=>{var t,n;const r=Os(),{activeWorkspace:i}=r;if(fe.system.debug("WorkspaceClient.getActiveWorkspace"),i)return fe.system.info("WorkspaceClient.getActiveWorkspace - returning from cache"),e&&e(null,{data:i}),{data:i};const{response:s}=await P.query(gt.API_CHANNELS.GET_ACTIVE_WORKSPACE,{});r.activeWorkspace=s.data;const o=(null===(t=s.data)||void 0===t?void 0:t.err)||s.header.error;if(o)throw e&&e(o),new Error(o);return e&&e(null,{data:null!==(n=s.data)&&void 0!==n?n:{}}),{data:s.data}},Ms=async e=>{var t,n;const r=Os(),{activeWorkspace:i}=r;if(!i)throw"Workspace is not yet ready";if(!i.windows.includes(e.windowName))throw"Cannot set state for Window not in workspace";fe.system.debug("WorkspaceClient.setWindowData",e);const{response:s}=await P.query(gt.API_CHANNELS.SET_WINDOW_STATE,e);return{...s,data:null!==(t=s.data)&&void 0!==t?t:{},header:null!==(n=s.header)&&void 0!==n?n:{}}};class Ls{constructor(){this.gatePromises=[]}async runOldest(){var e;const t=this.gatePromises[this.gatePromises.length-1];await t.func(),this.gatePromises=this.gatePromises.filter((e=>e!==t)),null===(e=t.resolve)||void 0===e||e.call(t),this.gatePromises.length&&this.runOldest()}async wait(e){const t={func:e};return t.gatePromise=new Promise((e=>{t.resolve=e})),this.gatePromises=this.gatePromises.concat(t),1===this.gatePromises.length&&this.runOldest(),t.gatePromise}}var Ps,Ns=n(14744),Ws=n.n(Ns);class ks{constructor(e){this.name="Unknown window",this.windowName="Unknown window",this.eventlistenerHandlerMap={},this.gate=new Ls,this.handleWrapStateChange=(e,t)=>{const{state:n}=t.data;n&&n!==this.wrapState&&"closed"!==n&&(this.wrapState=n,this.eventManager.trigger(n),this.eventManager.trigger("wrap-state-changed",{state:n}))},this.types={},this.guid=p()(),this.wrapState="initializing",this.componentState={},this.windowState=Ps.WINDOWSTATE.NORMAL,this.type=null,this.windowType=null,this.windowOptions={},this.bounds={},this.name,this.enableWindowsAeroSnap=!1,this.doConstruction(e),this.componentKey=rs("activeWorkspace",this.name,this.name),this.windowKey=rs("activeWorkspace",this.name),Ps.bindFunctions(this),this.wrapStateChangeSubscription=P.subscribe(`Finsemble.Component.State.${this.name}`,this.handleWrapStateChange),this.eventManager=new Cs({name:this.name,sourceType:"Window"}),this.finishedMove=!0,this.oldState={}}windowServiceChannelName(e){return`WindowService-Request-${e}`}eventChannelName(e){return`WindowService-Event-${this.name||this.windowName}-${e}`}_startMove(e=0){window.aeroMode=!1,0===e&&(this.finishedMove=!1)}_stopMove(){this.finishedMove=!0}doConstruction(e){if(e.setWindowType||e.windowType||(e.windowType="WebWindow"),e.windowType)return e.setWindowType=e.windowType,delete e.windowType,new Ps.types[e.setWindowType](e);if(e)for(const t in e)this[t]=e[t];this.name||(this.name=e.windowName),this.windowType=this.setWindowType}static registerType(e,t){const n=Ps;n.types||(n.types={}),n.types[e]=t}static bindFunctions(e){e.eventChannelName=e.eventChannelName.bind(e),e.windowServiceChannelName=e.windowServiceChannelName.bind(e),e.setupListeners=e.setupListeners.bind(e),e.handleWrapRemoveRequest=e.handleWrapRemoveRequest.bind(e)}setupListeners(e){}static async getInstanceStandardized(e){try{return{data:(await Ps.getInstance(e)).wrap}}catch(e){return{err:e}}}static getInstance(e,t){return new Promise((async(n,r)=>{var i,s;const o=x.Window.getCurrent().name,a=null!==(i=null==e?void 0:e.name)&&void 0!==i?i:null==e?void 0:e.windowName,{waitForReady:u,uuid:l,windowType:d}=e;if(!a){const e='"name" is a required parameter';return null==t||t(e),void r(e)}if(e.windowName=a,!1!==u&&(fe.system.debug("WRAP LIFECYCLE:WAIT FOR READY",a),await Ps._windowReady(a),fe.system.debug("WRAP LIFECYCLE:WAIT DONE -- READY",a)),Ps.cache[a]){fe.system.debug("WRAP LIFECYCLE:",a,"Window found in the cache, returning without going to the Launcher");const e=Ps.cache[a];return n({wrap:e}),void(null==t||t(null,e))}if(l&&a){const r={uuid:l,name:a,windowName:a,windowType:d};fe.system.debug("WRAP LIFECYCLE:",a,"All information for wrap passed in, creating wrap locally");const{wrap:i}=await Ps._createWrap({...e,windowIdentifier:null!==(s=e.windowIdentifier)&&void 0!==s?s:r});return n({wrap:i}),void(null==t||t(null,i))}P.query("WindowService-Request-getWindowIdentifier",{windowName:e.name,requester:o},(async(i,s)=>{var o;if(i||!s.data)return fe.system.error(i),r(i),void(null==t||t(i));if(Ps.cache[a]){const e=Ps.cache[a];return fe.system.debug("WRAP LIFECYCLE:",a,"Information received from launcher, but wrap exists in cache. Returning cached wrap."),n({wrap:e}),void(null==t||t(null,e))}const{identifier:u}=s.data;fe.system.debug("WRAP LIFECYCLE:",a,"Information received from launcher. Creating wrap.");const{wrap:l}=await Ps._createWrap({...e,retrievedIdentifier:{...u,name:null!==(o=u.windowName)&&void 0!==o?o:u.name}});n({wrap:l}),null==t||t(null,l)}))}))}static _createWrap(e){return new Promise((t=>{const n=e.retrievedIdentifier||e.windowIdentifier;let r={...n};(e.setWindowType||n.windowType)&&"WebApplication"!==n.windowType||(n.windowType="WebWindow"),r=Object.assign(r,e),r=Object.assign(r,n),r.setWindowType=r.windowType,delete r.windowType,fe.system.debug("WRAP LIFECYCLE: Placing wrap into the local cache.",n.windowName);const i=Ps;Ps.cache.hasOwnProperty(n.windowName)?fe.system.warn("DUPLICATE WRAPPER for",n.windowName):Ps.cache[n.windowName]=new i.types[r.setWindowType](r);let s=Ps.cache[n.windowName];s.windowType=n.windowType,s.identifier=n,s.setupListeners(n.windowName),t({wrap:s})}))}static _getRemoveWrapChannel(e){return`${x.Window.getCurrent().name}.removeWrap.${e}`}handleWrapRemoveRequest(){this.removeListeners&&this.removeListeners(),this.eventManager.cleanup();for(const e in this.eventlistenerHandlerMap)for(let t=0;t<this.eventlistenerHandlerMap[e].length;t++)this.eventlistenerHandlerMap[e][t].interceptor.removeAllListeners();this.eventManager.cleanup(),fe.system.debug("WRAP CLOSE. Deleting cached wrap."),delete Ps.cache[this.name],this.cleanupRouter()}cleanupRouter(){const e=Ps._getRemoveWrapChannel(this.name);P.removeResponder(e),P.unsubscribe(this.wrapStateChangeSubscription)}onReady(e){return new Promise((t=>{"ready"===this.wrapState?(null==e||e(),t()):this.addEventListener("ready",(()=>{null==e||e(),t()}))}))}queryWindowService(e,t,n=Function.prototype){"function"==typeof t&&(n=t,t={}),(t=t||{}).windowIdentifier=this.identifier,fe.system.debug("FinsembleWindow.queryWindowService",this.windowServiceChannelName(e),t),console.debug("FinsembleWindow.queryWindowService",this,this.windowServiceChannelName(e),t);let r=null;P.query(this.windowServiceChannelName(e),t,((t,i)=>{t?(fe.system.warn(`WindowService.${e}: failed`,t),console.debug(`WindowService.${e}: failed`,t)):(r=i.data,fe.system.debug(`${this.windowServiceChannelName(e)} successful`,r),console.debug(`${this.windowServiceChannelName(e)} successful`,r)),n&&n(t,r)}))}addEventListener(e,t){this.eventManager.addEventListener(e,t)}removeEventListener(e,t){return this.eventManager.removeEventListener(e,t)}registerWithDocking(e,t){P.query("DockingService.registerWindow",{type:this.type,windowType:this.windowType,windowMsg:e,name:this.windowName},t)}unRegisterWithDocking(){P.transmit("DockingService.deregisterWindow",{name:this.windowName})}initializeWindow(e){this.registerWithDocking(e,(()=>{P.publish(`Finsemble.${this.windowName}.componentReady`,{name:this.windowName})}))}wrapReady(){P.publish(`Finsemble.${this.windowName}.wrapReady`,{name:this.windowName,state:"open"})}_minimize(e,t=Function.prototype){fe.system.debug("BaseWindow._minimize",e),e=e||{},t(null,{shouldContinue:!0})}_maximize(e,t=Function.prototype){fe.system.debug("BaseWindow._maximize",e),t(null,{shouldContinue:!0})}_restore(e,t){return new Promise((n=>{fe.system.debug("BaseWindow._restore",e),e=e||{},null==t||t(null,{shouldContinue:!0}),n({data:{shouldContinue:!0}})}))}_blur(e,t=Function.prototype){fe.system.debug("BaseWindow._blur",e),e=e||{},t(null,{shouldContinue:!0})}_focus(e,t=Function.prototype){fe.system.debug("BaseWindow._focus",e),e=e||{},t(null,{shouldContinue:!0})}_bringToFront(e,t=Function.prototype){fe.system.debug("BaseWindow._bringToFront",e),e=e||{},t(null,{shouldContinue:!0})}_isShowing(e,t=Function.prototype){fe.system.debug("BaseWindow._isShowing",e),e=e||{},t(null,{shouldContinue:!0})}disableFrame(e){null==e||e()}_setBounds(e,t=Function.prototype){fe.system.verbose("BaseWindow._setBounds",e),e=e||{};const{bounds:n}=e;this.mergeBounds(n),t(null,{shouldContinue:!0})}_getBounds(e,t){return new Promise((n=>{fe.system.verbose("BaseWindow._getBounds",e),e=e||{},null==t||t(null,{shouldContinue:!0}),n({data:{shouldContinue:!0}})}))}_getBoundsFromSystem(e,t){fe.system.debug("BaseWindow._getBoundsFromSystem",e),e=e||{},t(null,{shouldContinue:!0})}_updateOptions(e,t=Function.prototype){fe.system.debug("BaseWindow._updateOptions",e),e=e||{},t(null,{shouldContinue:!0})}_hide(e,t=Function.prototype){fe.system.debug("BaseWindow._hide",e),e=e||{},t(null,{shouldContinue:!0})}async _show(e,t){return fe.system.debug("BaseWindow._show",e),e=e||{},null==t||t(null,{shouldContinue:!0}),{data:{shouldContinue:!0}}}_showAt(e,t=Function.prototype){fe.system.debug("BaseWindow._showAt",e),e=e||{},t(null,{shouldContinue:!0})}_close(e={},t){return new Promise((n=>{fe.system.debug("WRAP CLOSE. BaseWindow._close",this.name,e),null==t||t(null,{shouldContinue:!0}),n({data:{shouldContinue:!0}})}))}_alwaysOnTop(e,t=Function.prototype){fe.system.debug("BaseWindow._alwaysOnTop",e),e=e||{},t(null,{shouldContinue:!0})}_isAlwaysOnTop(e,t=Function.prototype){return t(null,Boolean(this.windowOptions.alwaysOnTop)),Boolean(this.windowOptions.alwaysOnTop)}async _setOpacity(e,t=Function.prototype){fe.system.debug("BaseWindow._setOpacity",e),e=e||{},t(null,{shouldContinue:!0})}_saveWindowOptions(e,t=Function.prototype){fe.system.debug("BaseWindow._saveWindowOptions",e),e=e||{},t(null,{shouldContinue:!0})}_getOptions(e,t=Function.prototype){return t(null,{})}startTabTileMonitoring(e){fe.system.debug("BaseWindow.startTabTileMonitoring",e),P.transmit("TabTile.startTabTile",{params:e})}stopTabTileMonitoring(e,t){fe.system.debug("BaseWindow.stopTabTileMonitoring",e),P.query("TabTile.stopTabTile",{params:e},(function(e,n){e?fe.system.warn("TabTile.stopTabTile: query failed",e):fe.system.debug("TabTile.stopTabTile results",n.data);const r=n.data;t?t(e,r,this.defaultStopTrackingAction):this.defaultTabTileAction(r)}))}defaultTabTileAction(e){const t=this;switch(fe.system.debug("BaseWindow.defaultTabTileAction",e),e.stoppedLocation){case"OutsideWindow":case"TabSection":break;case"InsideWindow":e.tileGroupId?t.Group.addWindow(this.identifier,e.tileGroupId,e.dropCoordinates):t.Group.createGroup((function(n){t.Group.addWindow(this.identifier,n,e.dropCoordinates,{startingWindowIdentifier:e.droppedOnWindowIdentifier})}));break;default:fe.system.error("stopTracking returned an unknown stoppedLocation result",e)}}mergeBounds(e){if(!e||!Number.isInteger(e.top))return console.error("Invalid bounds",e),void fe.system.warn("BaseWindow.mergeBounds Invalid bounds","bounds=",e);const t={top:Math.round(e.top),left:Math.round(e.left),width:Math.round(e.width),height:Math.round(e.height)};t.bottom=t.top+t.height,t.right=t.left+t.width;const n={defaultLeft:t.left,defaultWidth:t.width,defaultTop:t.top,defaultHeight:t.height};Object.assign(this.windowOptions,t),Object.assign(this.windowOptions,n),this.windowOptions.bounds=t}startMove(e){fe.system.debug("BaseWindow.startMove",e),(e=e||{}).windowIdentifier=this.identifier,this.eventManager.trigger("bounds-change-start",{...this.windowOptions.bounds})}stopMove(e){fe.system.debug("BaseWindow.stopMove",e),(e=e||{}).windowIdentifier=this.identifier,this.eventManager.trigger("bounds-change-end",{name:this.name,eventName:"bounds-change-end",dockedPosition:this.dockedPosition,...this.windowOptions.bounds})}async getFSBLState(e,t){fe.system.debug("BaseWindow.getState",e);const{err:n,data:r}=await Ts({topic:gt.CACHE_STORAGE_TOPIC,key:e.key});"componentState"===e.stateVar&&(this.componentState=r);const{field:i,fields:s}=e;if(!n&&r){if(i)return null==t||t(n,r[i]),{data:r[i]};if(s){const e={};for(let t=0;t<s.length;t++)r[s[t]]&&(e[s[t]]=r[s[t]]);return null==t||t(null,e),{data:e}}return null==t||t(null,r),{data:r}}{const i="Not found";return fe.system.info("WindowClient:getComponentState:error, response, params",n,r,e),null==t||t(i,r),{err:i}}}getComponentState(e,t){return e||(e={}),e.fields&&!Array.isArray(e.fields)&&(e.fields=[e.fields]),this.getFSBLState({...e,key:this.componentKey,stateVar:"componentState"},t)}getWindowState(e,t){return e||(e={}),e.fields&&!Array.isArray(e.fields)&&(e.fields=[e.fields]),e.key=this.windowKey,e.stateVar="windowData",this.getFSBLState(e,t)}setComponentState(e,t=Function.prototype){return e||(e={}),e.fields&&!Array.isArray(e.fields)&&(e.fields=[e.fields]),this.setFSBLState({...e,key:this.componentKey,stateVar:"componentState"},t)}removeComponentState(e,t=()=>{}){return e.fields&&!Array.isArray(e.fields)&&(e.fields=[e.fields]),this.removeFSBLState({...e,key:this.componentKey,stateVar:"componentState"},t)}setWindowState(e,t){return e||(e={}),e.fields&&!Array.isArray(e.fields)&&(e.fields=[e.fields]),this.setFSBLState({...e,key:this.windowKey,stateVar:"windowData"},t)}saveWindowState(e){this.windowState=e}static async cleanupState(e){const t={componentType:e.componentType,name:e.name};if(!Ps.additionalWorkspaceFields)try{const e=await X.get(["finsemble","servicesConfig","window","additionalWorkspaceFields"]);Ps.additionalWorkspaceFields=e.data||[]}catch(e){Ps.additionalWorkspaceFields=[]}let n;n=gt.ADDITIONAL_WINDOW_PROPS[e.windowType]?gt.ADDITIONAL_WINDOW_PROPS[e.windowType]:gt.ADDITIONAL_WINDOW_PROPS.WebWindow,"WebApplication"===e.windowType&&(e.windowType="WebWindow");const r=[...gt.DEFAULT_WINDOW_PROPS,...n,...Ps.additionalWorkspaceFields];for(const n of r)void 0!==e[n]&&null!==e[n]&&(t[n]=e[n]);return t}async saveCompleteWindowState(e,t=Function.prototype){if(fe.system.debug("COMPONENT LIFECYCLE:SAVING STATE:",e.name),e){const n=await Ps.cleanupState(e);if(((e,t)=>{const n=is(e),r=is(t);return ns()(n,r,((e,t)=>{if(Array.isArray(e)&&Array.isArray(t))return ns()(e.sort(),t.sort())}))})(this.oldState,n))fe.system.debug("saveCompleteWindowState -- deep equal"),t();else{fe.system.debug("saveCompleteWindowState -- not deep equal",this.oldState,n),this.oldState=Zi()(n);try{await Ms({windowName:this.windowName,state:{windowData:n}})}catch(e){}t()}}else t("No State Provided")}async setFSBLState(e,t){await this.gate.wait((async()=>{await this.setFSBLStateInternal(e,t)}))}async setFSBLStateInternal(e,t){const n={key:e.key,stateVar:e.stateVar};n.key||("componentState"===n.stateVar?n.key=this.componentKey:"windowData"===n.stateVar&&(n.key=this.windowKey));const r="componentState"===e.stateVar?"componentState":"windowOptions";await this.getFSBLState(n),fe.system.debug("BaseWindow.getState",e);let i=Ws()(this[r],{}),{fields:s}=e;e.field&&(s=[{field:e.field,value:e.value}]);for(let e=0;e<s.length;e++){const t=s[e];t.field&&void 0!==t.value&&(i[t.field]=t.value)}e.value=i,fe.system.debug(`COMPONENT LIFECYCLE: SAVING ${e.stateVar}:`,i),"windowData"===e.stateVar&&(i=await Ps.cleanupState(i));try{await Ms({windowName:this.windowName,state:{[e.stateVar]:i}})}catch(e){}this[r]=i,null==t||t()}removeFSBLState(e,t=()=>{}){var n;const r={key:e.key,stateVar:e.stateVar},i="componentState"===r.stateVar?this.componentKey:this.windowKey,s=null!==(n=r.key)&&void 0!==n?n:i,o="componentState"===e.stateVar?"componentState":"windowOptions";this.getFSBLState({...r,key:s},(async()=>{var n;fe.system.debug("BaseWindow.getState",e);let r=Ws()(this[o],{}),{fields:i=[]}=e;e.field&&(i=[{field:e.field}]);for(let e=0;e<i.length;e++){const t=i[e];t.field&&delete r[t.field]}e.value=r,fe.system.debug(`COMPONENT LIFECYCLE: SAVING ${e.stateVar}:`,r),"windowData"===e.stateVar&&(r=await Ps.cleanupState(r));const s=null!==(n=e.stateVar)&&void 0!==n?n:"windowData";try{await Ms({windowName:this.windowName,state:{[s]:r}})}catch(e){}this[o]=r,t(null)}))}cancelTabTileMonitoring(e){fe.system.debug("BaseWindow.cancelTabTileMonitoring",e),P.transmit("TabTile.cancelTabTile",{params:e})}close(e={},t){return new Promise((n=>{this.queryWindowService("close",e,((e,r)=>{null==t||t(e,r),n({err:e})}))}))}_animate(e,t){"function"==typeof e&&(t=e,e=null),t("Method not implemented for window",{shouldContinue:!0})}}Ps=ks,ks.cache={},ks.WINDOWSTATE=dt,ks.wrap=Ps.getInstance,ks._windowReady=e=>new Promise((async t=>{fe.system.debug(`windowServiceReady: ${e} waiting`);const n=P.subscribe(`Finsemble.Component.State.${e}`,((r,i)=>{const{state:s}=i.data;switch(fe.system.debug(`windowServiceReady: ${e} state change: ${s}`),s){case"ready":case"reloading":case"closing":fe.system.debug(`windowServiceReady: ${e} ${s}`),P.unsubscribe(n),t();break;default:fe.system.debug(`windowServiceReady default: ${e} ${s}`)}}))}));class Ds{constructor(e){this.assimilationHelper=e,this.activeWindows={},this.awaitingAssimilationSpawn={},this.awaitingSpawn={},this.allWindows={},this.movingWindow=null,this.floatingTitlebar=null,this.updateActiveWindowHeartbeats(),this.dockedToolbarOnStart=!1}setWebsocket(e){this.ws=e}sendSocketMessage(e){if(!this.ws)return setTimeout((()=>{this.sendSocketMessage(e)}),100);fe.system.verbose("Assimilation.AssimilationWindowManager.sendSocketMessage",e),this.ws.send(e)}setMovingWindow(e){return fe.system.debug("Assimilation.AssimilationWindowManager.setMovingWindow",e),this.movingWindow=new ws(e)}getMovingWindow(){return fe.system.debug("Assimilation.AssimilationWindowManager.getMovingWindow"),this.movingWindow}getWindowByUUID(e){return fe.system.debug("Assimilation.AssimilationWindowManager.getWindowByUUID:",e),this.activeWindows[e]}getWindowByName(e){fe.system.debug("Assimilation.AssimilationWindowManager.getWindowByName:",e);const t=Object.keys(this.activeWindows);for(let n=0;n<t.length;n++){const r=this.activeWindows[t[n]];if(r.windowName===e)return r}}updateSpawningWindow(e,t){fe.system.debug("Assimilation.AssimilationWindowManager.updateSpawningWindow:",e,t);const n=this.awaitingAssimilationSpawn[e];if(n)return t||(n.windowLess=!0,t=e),n.uuid=t,this.activeWindows[t]=n,delete this.awaitingAssimilationSpawn[e],n}updateSpawningWindowFromWindowObject(e){const t=e.data,n={name:e.data.name,windowType:"native"};return es.getInstance(n,(async(e,n)=>{n&&n.descriptor&&(n.descriptor.hideTitleBar=!0),n.uuid=parseInt(t.windowHandle,10).toString(16),this.activeWindows[n.uuid]=n;const r=await n.getBounds();r.data&&this.handleSpawnComplete(n,r.data)}))}handleSpawnComplete(e,t){var n,i,s,o;if(fe.system.debug("Assimilation.AssimilationWindowManager.handleSpawnComplete:",e,t),!e)return fe.system.error("no window reference found");const a=r()(e,"descriptor.customData.foreign.services.windowService.manageWindowMovement",!0);if(t&&a&&this.assimilationHelper.canHookWindow(e)){fe.system.debug("Assimilation.AssimilationWindowManager.handleSpawnComplete:canHook window",e),e.location=t;let r=null;const a=()=>{fe.system.debug("Assimilation.AssimilationWindowManager.handleSpawnComplete:afterSpawn",e),P.transmit(`${e.name}.endMovement`,{location:e.location}),P.transmit("assimilation.WindowEventStream",{windowName:e.name,eventName:"opened",open:!0,bounds:{height:e.location.height,width:e.location.width,x:e.location.left,y:e.location.top}}),null==r||r()};"ready"!==e.wrapState&&(null===(o=null===(s=null===(i=null===(n=e.descriptor)||void 0===n?void 0:n.params)||void 0===i?void 0:i.customData)||void 0===s?void 0:s.window)||void 0===o?void 0:o.addToWorkspace)?es._windowReady(e.windowName).then((async()=>{let t=await _s(),n=0;for(;!t.data.windows.includes(e.windowName)&&n<5;)await new Promise((e=>setTimeout(e,200))),n+=1,t=await _s();a()})):e.onReady(a)}this.registerWindow(e,e)}addNativeWindow(e){fe.system.debug("Assimilation.AssimilationWindowManager.addNativeWindow:",e),this.allWindows[e.uuid]=e;let t=this;t.assimilationHelper.canHookWindow(e)?(fe.system.debug("Assimilation.AssimilationWindowManager.addNativeWindow: executableInConfig",e),this.assimilationHelper.executableInConfig(e,((n,r)=>{r?fe.system.debug("assimilationHelper.executableInConfig: returning, executable is in config",e):(e.windowName=e.name,P.query("LauncherService.createWrap",{name:e.uuid},((n,r)=>{n&&fe.system.error("Error inside of createWrap:",n),es.getInstance(r.data,((n,r)=>{if(n)return fe.system.error("Could not create wrap for window",e);t.activeWindows[e.uuid]=r,r.uuid=e.uuid;const{top:i,left:s,right:o,bottom:a}=e,u={top:i,left:s,width:o-s,height:a-i};fe.system.debug("assimilationHelper.executableInConfig:getInstance: created window wrap",e,r),t.handleSpawnComplete(r,u)}))})))}))):fe.system.debug("Assimilation.AssimilationWindowManager.addNativeWindow: cannot hook",e)}moveWindow(e){var t,n,r,i;if(fe.system.debug("Assimilation.AssimilationWindowManager.moveWindow:",e),!e.location)return;if(!e.name)return;let s=this.getWindowByUUID(e.key);if(!s){if(s=this.getWindowByName(e.name),!s)return void fe.system.error("MoveWindow - could not find window. Name:",e.name,"Handle:",e.key);fe.system.warn("MoveWindow - Could not find window by UUID, but did find window by name. Name:",e.name,"Handle:",e.key)}e.location.width=Math.round(e.location.width),e.location.bottom=Math.round(e.location.bottom),e.location.height=Math.round(e.location.height),e.location.left=Math.round(e.location.left),e.location.right=Math.round(e.location.right),isNaN(e.location.left)||(isNaN(e.location.height)&&(e.location.height=e.location.bottom-e.location.top,e.location.width=e.location.right-e.location.left),s.location={...e.location},this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"moveWindow",uuid:s.uuid,windowId:s.uuid,location:e.location})),P.transmit("assimilation.WindowEventStream",{eventName:"moved",windowName:s.name,bounds:{height:(null===(t=null==s?void 0:s.location)||void 0===t?void 0:t.height)||600,width:(null===(n=null==s?void 0:s.location)||void 0===n?void 0:n.width)||800,x:(null===(r=null==s?void 0:s.location)||void 0===r?void 0:r.left)||0,y:(null===(i=null==s?void 0:s.location)||void 0===i?void 0:i.top)||0}}))}showWindow(e){var t,n,r,i;if(fe.system.debug("Assimilation.AssimilationWindowManager.showWindow:",e),e.data.name){const s=this.getWindowByName(e.data.name);e.data.key=s.uuid,P.transmit("assimilation.WindowEventStream",{windowName:s.name,eventName:"show",bounds:{height:(null===(t=null==s?void 0:s.location)||void 0===t?void 0:t.height)||600,width:(null===(n=null==s?void 0:s.location)||void 0===n?void 0:n.width)||800,x:(null===(r=null==s?void 0:s.location)||void 0===r?void 0:r.left)||0,y:(null===(i=null==s?void 0:s.location)||void 0===i?void 0:i.top)||0}})}this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"showWindow",uuid:e.data.key,windowId:e.data.key}))}hideWindow(e){var t,n,r,i;if(fe.system.debug("Assimilation.AssimilationWindowManager.hideWindow:",e),e.data.name){const s=this.getWindowByName(e.data.name);e.data.key=s.uuid,P.transmit("assimilation.WindowEventStream",{eventName:"hide",windowName:s.name,bounds:{height:(null===(t=null==s?void 0:s.location)||void 0===t?void 0:t.height)||600,width:(null===(n=null==s?void 0:s.location)||void 0===n?void 0:n.width)||800,x:(null===(r=null==s?void 0:s.location)||void 0===r?void 0:r.left)||0,y:(null===(i=null==s?void 0:s.location)||void 0===i?void 0:i.top)||0},visible:!1})}this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"hideWindow",uuid:e.data.key,windowId:e.data.key}))}dockWindow(e){if(!e.data.init||!this.dockedToolbarOnStart){const t=`00000000${e.data.key}`.substr(-8);this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"dockWindow",uuid:t,windowId:t,edge:e.data.edge,bounds:e.data.bounds})),this.dockedToolbarOnStart=!0}}undockWindow(e){const t=`00000000${e.data.key}`.substr(-8);this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"undockWindow",uuid:t,windowId:t}))}closeWindow(e){fe.system.debug("Assimilation.AssimilationWindowManager.closeWindow:",e);const t=this.getWindowByName(e.data.name);if(!t)return null==e?void 0:e.sendQueryResponse(null,null);if(t.windowLess){const{removeFromWorkspace:n=!1}=e.data;P.transmit(`Finsemble.Assimilation.close.${t.windowName}`,{}),t.queryResponder=e.sendQueryResponse,this.removeWindow(t.uuid,n)}else t.spawnedByFea?this._closeSpawned(t.finUUID,e.sendQueryResponse):(P.transmit(`Finsemble.Assimilation.close.${t.windowName}`,{}),t.queryResponder=e.sendQueryResponse,this._closeAssimilationSpawned(t.uuid))}_closeAssimilationSpawned(e){fe.system.debug("Assimilation.AssimilationWindowManager._closeAssimilationSpawned:",e),this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"closeWindow",uuid:e,windowId:e})),setTimeout((()=>{this.getWindowByUUID(e)&&this._closeAssimilationSpawned(e)}),1e3)}_closeSpawned(e,t){fe.system.debug("Assimilation.AssimilationWindowManager._closeSpawned:",e),x.terminateExternalProcess(e,0,(e=>{t&&t(null,null),fe.system.debug("Assimilation window closed:",e)}),(e=>{t&&t(null,null),fe.system.error("Assimilation window closed error:",e)}))}closeAllWindows(e){fe.system.debug("Assimilation.AssimilationWindowManager.closeAllWindows:",e),Object.keys(this.activeWindows).forEach((e=>{P.transmit("LauncherService.shutdownResponse",{waitForMe:!1,name:this.activeWindows[e].windowName}),this.removeWindow(e,!1),this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"closeWindow",uuid:e,windowId:e}))}))}bringToFront(e){var t;let n;if(fe.system.debug("Assimilation.AssimilationWindowManager.bringToFront:",e),e.data.name){if(n=this.getWindowByName(e.data.name),!n)return void fe.system.debug("Failed to get window",e.data.name);e.data.key=n.uuid}else n=this.getWindowByUUID(e.data.key);"minimize"===n.state&&this.showWindow(e),(null===(t=n.descriptor)||void 0===t?void 0:t.alwaysOnTop)||this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"bringToFront",uuid:e.data.key,windowId:e.data.key}))}minimizeWindow(e){fe.system.debug("Assimilation.AssimilationWindowManager.minimizeWindow:",e);const t=this.getWindowByName(e.data.name);e.data.name&&(e.data.key=t.uuid),t.state="minimize",t.lastMinimized=Date.now(),this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"minimize",uuid:e.data.key,windowId:e.data.key}))}maximizeWindow(e){if(fe.system.debug("Assimilation.AssimilationWindowManager.maximizeWindow:",e),e.data.name){const t=this.getWindowByName(e.data.name);e.data.key=t.uuid,t.state="maximize"}this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"maximize",uuid:e.data.key,windowId:e.data.key})),this.bringToFront(e)}restoreWindow(e){if(fe.system.debug("Assimilation.AssimilationWindowManager.restoreWindow:",e),e.data.name){const t=this.getWindowByName(e.data.name);e.data.key=t.uuid}this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"restore",uuid:e.data.key,windowId:e.data.key})),P.transmit(`${e.data.name}.restored`,{})}alwaysOnTop(e){let t;t=e.data.name&&!e.data.key?this.getWindowByName(e.data.name):this.getWindowByUUID(e.data.key),(t||e.data.key)&&(fe.system.debug("Assimilation.AssimilationWindowManager.alwaysOnTop:",e),P.transmit("assimilation.WindowEventStream",{eventName:"always-on-top-changed",windowName:t.name,isAlwaysOnTop:e.data.alwaysonTop}),this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"alwaysOnTop",uuid:e.data.key||t.uuid,alwaysOnTop:e.data.alwaysonTop})),t.descriptor&&t.descriptor.alwaysOnTop!==e.data.alwaysonTop&&t.updateOptions({alwaysOnTop:e.data.alwaysonTop},Function.prototype))}removeWindow(e,t){fe.system.debug("Assimilation.AssimilationWindowManager.removeWindow:",e);const n=this.getWindowByUUID(e);if(!n)return delete this.activeWindows[e],void delete this.allWindows[e];n.queryResponder?(n.queryResponder(null,null),delete n.queryResponder):n.close({fromAssimilation:!0,removeFromWorkspace:t}),delete this.activeWindows[e],delete this.allWindows[e],P.query("Launcher.removeComponent",{name:n.windowName},(()=>{}))}parseApplicationList(e){fe.system.debug("Assimilation.AssimilationWindowManager.parseApplicationList:",e);const t=JSON.parse(e);this.checkForRemoved(t);for(let e=0;e<t.length;e++){const n=t[e];this.allWindows[n.uuid]||(fe.system.debug("Assimilation.AssimilationWindowManager.parseApplicationList invoking addNativeWindow:",n),this.addNativeWindow(n))}}checkForRemoved(e){fe.system.debug("Assimilation.AssimilationWindowManager.checkForRemoved:",e);let t=!1;for(const n in this.allWindows)if(t=!1,!this.allWindows[n].windowLess){for(let r=0;r<e.length;r++)if(e[r].uuid===this.allWindows[n].uuid){t=!0;break}t||(this.activeWindows[n]&&this.activeWindows[n].unRegisterWithDocking(),delete this.activeWindows[n],delete this.allWindows[n])}}registerWindow(e,t){var n,r,i,s,o,a,u,l,d,c,p,f,y,h;fe.system.debug("Assimilation.AssimilationWindowManager.registerWindow:",t.windowName,e,t),e.name=t.windowName;const g={name:t.windowName,uuid:t.uuid,windowType:"NativeWindow",windowMsg:{location:e.location?e.location:null},options:{minWidth:(null===(n=t.descriptor)||void 0===n?void 0:n.minWidth)||0,minHeight:(null===(r=t.descriptor)||void 0===r?void 0:r.minHeight)||0,maxWidth:(null===(i=t.descriptor)||void 0===i?void 0:i.maxWidth)||1/0,maxHeight:(null===(s=t.descriptor)||void 0===s?void 0:s.maxHeight)||1/0,snapping:null===(d=null===(l=null===(u=null===(a=null===(o=t.descriptor)||void 0===o?void 0:o.customData)||void 0===a?void 0:a.foreign)||void 0===u?void 0:u.services)||void 0===l?void 0:l.windowService)||void 0===d?void 0:d.allowSnapping,grouping:null===(h=null===(y=null===(f=null===(p=null===(c=t.descriptor)||void 0===c?void 0:c.customData)||void 0===p?void 0:p.foreign)||void 0===f?void 0:f.services)||void 0===y?void 0:y.windowService)||void 0===h?void 0:h.allowGrouping}};let m=`Finsemble.${t.windowName}.wrapReady`,v=P.subscribe(m,((n,r)=>{var i,s,o,a;if(t.wrapState="ready",t.initializeWindow({identifier:g,manageWindowMovement:Boolean(e.location)}),!r.data||r.data.name!==g.name)return;if("closed"===r.data.state)return;P.transmit(`${e.name}.onSpawned`,g);const u=null===(a=null===(o=null===(s=null===(i=null==t?void 0:t.descriptor)||void 0===i?void 0:i.customData)||void 0===s?void 0:s.appConfig)||void 0===o?void 0:o.hostManifests)||void 0===a?void 0:a.Finsemble;!0!==(null==u?void 0:u.waitForInitialization)&&A.publishBootStatus(t.componentType,"components","completed"),P.unsubscribe(v)}));e.location&&this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"hookWindow",uuid:t.uuid}))}unRegisterAllWindows(){if(fe.system.debug("Assimilation.AssimilationWindowManager.unRegisterAllWindows:"),Object.keys(this.activeWindows).length>0)for(const e in this.activeWindows)this.activeWindows[e].unRegisterWithDocking();this.activeWindows={}}spawnWindow(e){fe.system.debug("Assimilation.AssimilationWindowManager.spawnWindow:",e);const t=this.assimilationHelper.manifest.useFeaSpawn,n=e.descriptor.customData.window.hasOwnProperty("useFeaSpawn")?e.descriptor.customData.window.useFeaSpawn:t;if(e.descriptor.alias)return n?this._spawnByAlias(e):this._SpawnByAlias(e);n?this._spawnByPathThroughContainer(e):this._spawnByPath(e)}async saveWindow(e){var t,n,r;fe.system.debug("Assimilation.AssimilationWindowManager.saveWindow:",e);const i=this.getWindowByUUID(e.data.key);if(i&&(e.data.location&&(i.location=e.data.location,i.location.width||(i.location.width=i.location.right-i.location.left),i.location.height||(i.location.height=i.location.bottom-i.location.top),i.descriptor.defaultLeft=i.location.left,i.descriptor.defaultTop=i.location.top,i.descriptor.defaultWidth=i.location.width,i.descriptor.defaultHeight=i.location.height,i.descriptor.defaultRight=i.location.left+i.location.width,i.descriptor.defaultBottom=i.location.top+i.location.height,i.descriptor.left=i.location.left,i.descriptor.top=i.location.top,i.descriptor.width=i.location.width,i.descriptor.height=i.location.height,i.descriptor.right=i.descriptor.defaultRight,i.descriptor.bottom=i.descriptor.defaultBottom),i.descriptor.cacheLocation=i.restoreBounds,e.data.options&&e.data.options.autoShow&&(i.descriptor.autoShow=e.data.options.autoShow),i.descriptor=Object.assign(i.descriptor,e.data),i.descriptor.customData&&delete i.descriptor.customData.manifest,delete i.descriptor.url,!i.outsideOfFinsemble&&!0===(null===(r=null===(n=null===(t=null==i?void 0:i.descriptor)||void 0===t?void 0:t.customData)||void 0===n?void 0:n.window)||void 0===r?void 0:r.addToWorkspace))){const e=await ks.cleanupState(i.descriptor);try{await Ms({windowName:i.descriptor.name,state:{windowData:e}})}catch(e){fe.system.warn("AssimilationWindowManager setWindowState",e)}}}setFloatingTitlebar(e){this.floatingTitlebar=e}getFloatingTitlebar(){return this.floatingTitlebar}updateActiveWindowHeartbeats(){setInterval((()=>{for(const e in this.activeWindows){const t=this.activeWindows[e];t.descriptor&&!t.descriptor.isWPF&&P.transmit("Finsemble.heartbeat",{type:"component",windowName:t.windowName})}}),1e3)}updateCmdArgumentsByWindowDescriptor(e,t){return t&&e?(void 0!==(null==t?void 0:t.defaultLeft)&&(e=e.replace(/"left=\d+"/,`"left=${t.defaultLeft}"`)),void 0!==(null==t?void 0:t.defaultTop)&&(e=e.replace(/"top=\d+"/,`"top=${t.defaultTop}"`)),void 0!==(null==t?void 0:t.defaultWidth)&&(e=e.replace(/"width=\d+"/,`"width=${t.defaultWidth}"`)),void 0!==(null==t?void 0:t.defaultHeight)&&(e=e.replace(/"height=\d+"/,`"height=${t.defaultHeight}"`)),fe.system.debug("Assimilation.AssimilationWindowManager.updateCmdArgumentsByWindowDescriptor:","new arguments",e),e):e}_spawnByPath(e){fe.system.log("Assimilation.AssimilationWindowManager._spawnByPath:",e);const t=p()();e.ref=t,this.awaitingAssimilationSpawn[t]=e;const n=e.descriptor.generatedArguments||e.descriptor.arguments,i={topic:"openNewApp",env:e.descriptor.env,path:e.descriptor.generatedPath||e.descriptor.path,arguments:this.updateCmdArgumentsByWindowDescriptor(n,e.descriptor),autoShow:!e.descriptor.hasOwnProperty("autoShow")||e.descriptor.autoShow,alwaysOnTop:!!e.descriptor.hasOwnProperty("alwaysOnTop")&&e.descriptor.alwaysOnTop,spawnDefaultViewer:!!e.descriptor.hasOwnProperty("spawnDefaultViewer")&&e.descriptor.spawnDefaultViewer,ref:t,location:{left:e.descriptor.defaultLeft,top:e.descriptor.defaultTop,height:e.descriptor.defaultHeight,width:e.descriptor.defaultWidth},windowTitleWhiteList:r()(e,"descriptor.customData.window.windowTitleWhiteList"),windowTitleBlackList:r()(e,"descriptor.customData.window.windowTitleBlackList"),windowSpawnTimeout:r()(e,"descriptor.customData.window.options.windowSpawnTimeout")||r()(e,"descriptor.customData.window.windowSpawnTimeout")},s=JSON.stringify(i);fe.system.log("Assimilation.AssimilationWindowManager._spawnByPath:json:",s),this.sendSocketMessage(s)}_SpawnByAlias(e){fe.system.log("Assimilation.AssimilationWindowManager._SpawnByAlias:",e);const t=p()();e.ref=t,this.awaitingAssimilationSpawn[t]=e;const n=this.assimilationHelper.findAssetByAlias(e.descriptor.alias||e.descriptor.generatedPath||e.descriptor.path);if(!n)return fe.system.error("The alias or path for this asset is missing",e.descriptor.alias);const i=e.descriptor.generatedArguments||e.descriptor.arguments,s={topic:"openAssetApp",alias:n.alias,env:e.descriptor.env,arguments:this.updateCmdArgumentsByWindowDescriptor(i,e.descriptor),version:n.version,target:n.target,autoShow:!e.descriptor.hasOwnProperty("autoShow")||e.descriptor.autoShow,spawnDefaultViewer:!!e.descriptor.hasOwnProperty("spawnDefaultViewer")&&e.descriptor.spawnDefaultViewer,ref:t,location:{left:e.descriptor.defaultLeft,top:e.descriptor.defaultTop,height:e.descriptor.defaultHeight,width:e.descriptor.defaultWidth},windowTitleWhiteList:r()(e,"descriptor.customData.window.windowTitleWhiteList"),windowTitleBlackList:r()(e,"descriptor.customData.window.windowTitleBlackList"),windowSpawnTimeout:r()(e,"descriptor.customData.window.options.windowSpawnTimeout")||r()(e,"descriptor.customData.window.windowSpawnTimeout")},o=JSON.stringify(s);fe.system.log("Assimilation.AssimilationWindowManager._SpawnByAlias:json:",o),this.sendSocketMessage(o)}_spawnByPathThroughContainer(e){fe.system.log("Assimilation.AssimilationWindowManager._spawnByPath:",e);const t=p()();e.ref=t,e.spawnedByFea=!0,this.awaitingSpawn[t]=e;const n=e.descriptor.generatedArguments||e.descriptor.arguments;x.launchExternalProcess({path:e.descriptor.generatedPath||e.descriptor.path,arguments:this.updateCmdArgumentsByWindowDescriptor(n,e.descriptor),listener:t=>{"exited"===t.topic?(this.removeWindow(e.uuid,!0),fe.system.log("Assimilation.AssimilationWindowManager:Exited External Process",t)):fe.system.log("Assimilation.AssimilationWindowManager:Running External Process",t)}},(t=>{e.finUUID=t.uuid}),(e=>{fe.system.error("Error in spawnByPath",e)}))}_spawnByAlias(e){fe.system.log("Assimilation.AssimilationWindowManager._spawnByAlias:",e);const t=p()();e.ref=t,e.spawnedByFea=!0,e.appAsset=this.assimilationHelper.findAssetByAlias(e.descriptor.alias),this.awaitingSpawn[t]=e;const n=e.descriptor.generatedArguments||e.descriptor.arguments;x.launchExternalProcess({alias:e.descriptor.alias,arguments:this.updateCmdArgumentsByWindowDescriptor(n,e.descriptor),listener:t=>{"exited"===t.topic?(this.removeWindow(e.uuid,!0),fe.system.log("Assimilation.AssimilationWindowManager:Exited External Process",t)):fe.system.log("Assimilation.AssimilationWindowManager:Running External Process",t)}},(t=>{e.finUUID=t.uuid}),(e=>{fe.system.error(e)}))}}class xs{constructor(e){this.appAssets=e.appAssets,this.manifest=e.manifest,this.blacklist=this.manifest.blacklist.map((e=>e.toUpperCase())),this.whitelist=this.manifest.whitelist.map((e=>e.toUpperCase()))}canHookWindow(e){const t=this.manifest.onlySpawned;return!(t&&!e.descriptor||(t&&e.descriptor&&!this.checkBlacklist(e)?(ye.system.debug("Assimilation.canHookWindow: true"),0):this.checkBlacklist(e)?(ye.system.debug("Assimilation.canHookWindow: false (in disallow list)"),1):this.checkWhitelist(e)?(ye.system.debug("Assimilation.canHookWindow: true (in allow list)"),0):0!==this.whitelist.length))}executableInConfig(e,t){if(!e.executablePath)return t("not found",!1);const n=e.executablePath.replace(/^.*[\\\/]/,"").toUpperCase();ee.get(["finsemble","components"],((r,i)=>{const s=Object.keys(i);for(let r=0;r<s.length;r++){const o=i[s[r]];if(o.window&&o.window.path){const r=o.window.path.replace(/^.*[\\\/]/,"").toUpperCase();if(e.executablePath&&r===n)return t(null,!0)}}return this.executableInAssets(e,t)}))}executableInAssets(e,t){for(let n=0;n<this.appAssets.length;n++)if(this.appAssets[n].target.toUpperCase()===e.executablePath.replace(/^.*[\\\/]/,"").toUpperCase())return t(null,!0);return t(null,!1)}checkBlacklist(e){if(!e.windowName)return!1;if(this.blacklist.length>0&&this.blacklist.includes(e.windowName.toUpperCase()))return!0;for(let t=0;t<this.blacklist.length;t++){const n=new RegExp(`^.*\\${this.blacklist[t]}$`);if(n.test(e.windowName.toUpperCase()))return!1;if(e.executablePath&&n.test(e.executablePath.toUpperCase()))return!1}return!1}checkWhitelist(e){if(!e.windowName)return!1;for(let t=0;t<this.whitelist.length;t++){const n=new RegExp(`^.*\\${this.whitelist[t]}$`);if(n.test(e.windowName.toUpperCase()))return!0;if(e.executablePath&&n.test(e.executablePath.toUpperCase()))return!0}return!1}prepareAction(e){const t=p()();e.ref=t;const n=JSON.stringify(e);return e.expiry=Date.now()+3e3,n}findAssetByAlias(e){if(!Array.isArray(this.appAssets))return null;for(let t=0;t<this.appAssets.length;t++)if(this.appAssets[t].alias===e||this.appAssets[t].path===e)return this.appAssets[t];return null}}class Fs extends et.EventEmitter{constructor(e){super(),this.ws=null,this.port=e||8392}connect(){if(this.ws&&(0===this.ws.readyState||1===this.ws.readyState))return;if(this.ws&&2===this.ws.readyState){const e=setTimeout((()=>{clearTimeout(e),this.connect()}),1e3);return}ye.system.debug("Assimilation connecting to :",`ws://127.0.0.1:${this.port}`);const e=this.ws=new WebSocket(`ws://127.0.0.1:${this.port}`);e.onopen=()=>{ye.system.debug("Assimilation connected to socket"),this.emit("socketOpen")},e.onerror=e=>{this.emit("socketError",e)},e.onmessage=e=>{let t;try{if(t=JSON.parse(e.data),!(null==t?void 0:t.topic))return}catch(t){ye.system.error("Assimilation:Socket.onMessage:err:",t,e)}return this.emit(t.topic,t)},e.onclose=()=>{this.emit("socketClosed"),ye.system.log("SERVICE LIFECYCLE:Web socket closed")}}send(e){(!this.ws||this.ws.readyState>1)&&this.connect(),this.ws&&1===this.ws.readyState?this.ws.send(e):this.on("socketOpen",(()=>this.send(e)))}}const{REMOTE_FOCUS:Bs}=mt,qs=e=>r()(e,"window.descriptor.isWPF",r()(e,"descriptor.isWPF"));class Us extends Fs{constructor(e,t){super(),this.notifySocketConnectionFailure=!1,this.port=e.port,this.manifest=e,this.assimilationWindowManager=t,this.setupListeners(),this.keyboard={}}setupListeners(){this.addListener("startMove",this.onWindowStartMove.bind(this)),this.addListener("moveUpdate",this.onWindowMoveUpdate.bind(this)),this.addListener("moveEnd",this.onMoveEnd.bind(this)),this.addListener("windowClicked",this.onWindowClicked.bind(this)),this.addListener("locationResponse",this.onLocationResponse.bind(this)),this.addListener("addWindow",this.onAddWindow.bind(this)),this.addListener("removeWindow",this.onRemoveWindow.bind(this)),this.addListener("applicationList",this.onApplicationList.bind(this)),this.addListener("keyDown",this.onKeyDown.bind(this)),this.addListener("keyUp",this.onKeyUp.bind(this)),this.addListener("focus",this.onWindowFocused.bind(this)),this.addListener("maximize",this.onWindowMaximize.bind(this)),this.addListener("restore",this.onWindowRestore.bind(this)),this.addListener("minimize",this.onWindowMinimize.bind(this)),this.addListener("openNewApp",this.onNewApp.bind(this)),this.addListener("openAssetApp",this.onNewApp.bind(this)),this.addListener("socketError",this.onSocketError.bind(this)),this.addListener("socketClosed",this.onSocketClosed.bind(this)),this.addListener("socketOpen",this.onSocketOpened.bind(this)),this.addListener("closeWindow",this.onCloseWindow.bind(this)),this.addListener("getBounds",this.onGetBoundsReturned.bind(this)),this.addListener("hookWindow",this.onWindowHooked.bind(this)),this.addListener("onLog",this.onLog.bind(this))}onGetBoundsReturned(e){fe.system.verbose("APPLICATION LIFECYCLE:Assimilation:onGetBoundsReturned",e.ref,e),P.transmit(`${e.ref}-Assimilation.boundsUpdate`,e)}onWindowHooked(e){var t;const n=this.assimilationWindowManager.getWindowByUUID(e.uuid);(null===(t=null==n?void 0:n.descriptor)||void 0===t?void 0:t.alwaysOnTop)&&this.assimilationWindowManager.alwaysOnTop({data:{alwaysonTop:n.descriptor.alwaysOnTop,key:e.uuid}})}onLog(e){let{type:t="warn",content:n}=e;"function"==typeof fe.system[t]?fe.system[t](`Assimilation EXE: ${n}`):fe.system.warn(`Assimilation unable to log type ${t} from EXE. Defaulting to warn: ${n}`)}onNewApp(e){if(fe.system.info("APPLICATION LIFECYCLE:Assimilation:openNewApp",e),e.error&&!e.error.startsWith("The operation completed successfully"))return fe.system.error(e.error);try{const t=JSON.parse(e.window),n=this.assimilationWindowManager.updateSpawningWindow(e.ref,t.uuid);this.assimilationWindowManager.handleSpawnComplete(n,t)}catch(e){return void fe.system.error("No Window found. Either the executable path is wrong or it has no window")}}onCloseWindow(e){const{uuid:t}=e.data?JSON.parse(e.data):e,n=this.assimilationWindowManager.getWindowByUUID(t);n&&(P.transmit("assimilation.WindowEventStream",{eventName:"closed",windowName:n.name,open:!1}),fe.system.debug("APPLICATION LIFECYCLE:Assimilation:closeWindow",e))}onWindowStartMove(e){fe.system.debug("APPLICATION LIFECYCLE:Assimilation:onWindowStartMove",e),e.uuid?this.assimilationWindowManager.setMovingWindow(this.assimilationWindowManager.getWindowByUUID(e.uuid)).setStartBounds(e):fe.system.error("window is missing uuid",e)}onWindowMoveUpdate(e){fe.system.debug("APPLICATION LIFECYCLE:Assimilation:onWindowMoveUpdate",e);const t=this.assimilationWindowManager.getMovingWindow();t&&(t.calculateWindowLocation(e),P.transmit(`AssimilationService.bounds-change-request.${null==t?void 0:t.window.name}`,{...t.location}))}onWindowMaximize(e){var t,n,r,i;fe.system.info("APPLICATION LIFECYCLE:Assimilation:onWindowMaximize",e);const{uuid:s}=e.data?JSON.parse(e.data):e,o=this.assimilationWindowManager.getWindowByUUID(s);if(!o)return;const a={height:(null===(t=null==o?void 0:o.cachedLocation)||void 0===t?void 0:t.height)||600,width:(null===(n=null==o?void 0:o.cachedLocation)||void 0===n?void 0:n.width)||800,x:(null===(r=null==o?void 0:o.cachedLocation)||void 0===r?void 0:r.left)||0,y:(null===(i=null==o?void 0:o.cachedLocation)||void 0===i?void 0:i.top)||0};o.maximize({fromAssimilation:!0}),P.transmit("assimilation.WindowEventStream",{eventName:"maximize",windowName:o.name,windowState:"maximized",normalBounds:a})}onWindowMinimize(e){fe.system.info("APPLICATION LIFECYCLE:Assimilation:onWindowMinimize",e);const{uuid:t}=e.data?JSON.parse(e.data):e,n=this.assimilationWindowManager.getWindowByUUID(t);n&&(n.cachedLocation={...n.location},n.minimize({fromAssimilation:!0}),P.transmit("assimilation.WindowEventStream",{eventName:"minimize",windowName:n.name,windowState:"minimized"}))}onWindowRestore(e){var t,n,r,i;fe.system.info("APPLICATION LIFECYCLE:Assimilation:onWindowRestore",e);const{uuid:s}=e.data?JSON.parse(e.data):e,o=this.assimilationWindowManager.getWindowByUUID(s);if(!o)return;const a=o.windowState===dt.MAXIMIZED||"maximize"===o.state?"unmaximize":"restore";P.transmit("assimilation.WindowEventStream",{eventName:a,windowName:o.name,bounds:{height:(null===(t=null==o?void 0:o.cachedLocation)||void 0===t?void 0:t.height)||600,width:(null===(n=null==o?void 0:o.cachedLocation)||void 0===n?void 0:n.width)||800,x:(null===(r=null==o?void 0:o.cachedLocation)||void 0===r?void 0:r.left)||0,y:(null===(i=null==o?void 0:o.cachedLocation)||void 0===i?void 0:i.top)||0},windowState:"normal"}),o.state="restore",Date.now()-o.lastMinimized<this.assimilationWindowManager.assimilationHelper.manifest.eventIgnore||o.restore({fromAssimilation:!0})}onWindowFocused(e){fe.system.debug("APPLICATION LIFECYCLE:Assimilation:onWindowFocused",e);const t=JSON.parse(e.data),n=this.assimilationWindowManager.getWindowByUUID(t.uuid),r={name:n&&n.name||t.name,windowHandle:t.uuid};P.transmit(Bs,r),n&&setTimeout((()=>{"minimize"!==n.state&&(Date.now()-n.lastRestored<this.assimilationWindowManager.assimilationHelper.manifest.eventIgnore||n.focus({fromAssimilation:!0}))}),this.assimilationWindowManager.assimilationHelper.manifest.focusDelay)}onRemoveWindow(e){const t=JSON.parse(e.window);this.assimilationWindowManager.removeWindow(t.uuid,!0)}onWindowClicked(e){fe.system.debug("APPLICATION LIFECYCLE:Assimilation:onWindowClicked",e);const t=JSON.parse(e.data);this.onWindowFocused(e);const n=this.assimilationWindowManager.getWindowByUUID(t.uuid);if(n&&!qs(n)){if(this.keyboard[162]){const e=n.windowName;P.query("DockingService.getGroupObjectsForWindow",{name:e},((t,n)=>{let r=!1;for(let e=0;e<n.data.length;e++)if(n.data[e].isMovable){r=!0;break}return r?P.query("DockingService.leaveGroup",{name:e},(()=>{})):P.transmit("DockingService.formGroup",{windowName:e})}))}}else fe.system.debug("APPLICATION LIFECYCLE:Assimilation:onWindowClicked no window found for window UUID",t.uuid)}onApplicationList(e){fe.system.debug("APPLICATION LIFECYCLE:Assimilation:onApplicationList",e),this.assimilationWindowManager.parseApplicationList(e.list)}onLocationResponse(e){if(!e.window)return;const t=JSON.parse(e.window),n=this.assimilationWindowManager.getWindowByUUID(t.uuid);n&&P.transmit("DockingService.updateWindowLocation",{windowName:n.windowName,location:{left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top}})}onAddWindow(e){const t=JSON.parse(e.window);t.uuid&&(fe.system.debug("Assimilation.AssimilationWindowManager.onAddWindow invoking addNativeWindow:",t),this.assimilationWindowManager.addNativeWindow(t))}onMoveEnd(e){fe.system.info("moveEnd",e);const t=this.assimilationWindowManager.getMovingWindow();if(t){if(this.keyboard[162]&&!qs(t)){if(t.window.grouped)return P.query("DockingService.leaveGroup",{name:t.window.windowName},(()=>{}));P.transmit("DockingService.formGroup",{windowName:t.window.windowName})}e.location=t.window.location,P.transmit(`${t.window.name}.endMovement`,e),this.assimilationWindowManager.saveWindow({data:{key:t.window.uuid,location:t.window.location}})}}onKeyUp(e){fe.system.verbose("APPLICATION LIFECYCLE:Assimilation:onKeyUp",e),e.key=Number(e.key),clearTimeout(this.keyboard[e.key]),delete this.keyboard[e.key],160===e.key&&(self.shift=!1),P.transmit("finsemble.assimilation.keyup",{key:e.key})}onKeyDown(e){fe.system.verbose("APPLICATION LIFECYCLE:Assimilation:onKeyDown",e),e.key=Number(e.key),this.keyboard[e.key]&&clearTimeout(this.keyboard[e.key]),this.keyboard[e.key]=setTimeout((()=>this.onKeyUp(e)),this.manifest.hotkeyTimeout),160===e.key&&(self.shift=!0),P.transmit("finsemble.assimilation.keydown",{key:e.key})}onSocketConnected(e=Function.prototype){this.enableAppHooks(),this.getMonitorInfo(),this.connectCallback&&(this.notifySocketConnectionFailure=!0,this.connectCallback({connected:!0,error:null}),this.connectCallback=null),e()}onSocketError(e){fe.system.log("APPLICATION LIFECYCLE:Assimilation:onSocketError",e);const t=setTimeout((()=>{clearTimeout(t),this.connectCallback&&this.notifySocketConnectionFailure&&this.connectCallback({error:e,connected:!1}),this.notifySocketConnectionFailure=!1,this.connect()}),5e3)}onSocketClosed(){fe.system.log("APPLICATION LIFECYCLE:Assimilation:onSocketClosed"),this.connect()}onSocketOpened(){fe.system.log("APPLICATION LIFECYCLE:Assimilation:onSocketOpened"),clearTimeout(this.wsConnectionFailureTimeout),this.onSocketConnected()}setThrottle(e){fe.system.log("APPLICATION LIFECYCLE:Assimilation:enable move throttle",e),this.send(this.prepareAction({topic:"throttle",throttle:e}))}enableAppHooks(){fe.system.info("APPLICATION LIFECYCLE:Assimilation:Enable Assimilation hooks"),this.send(this.prepareAction({topic:"enableHooks",data:{whitelist:[],blacklist:[]}}))}connect(e){fe.system.debug("APPLICATION LIFECYCLE:Assimilation:connect to websocket"),e&&(this.connectCallback=e),this.ws&&this.ws.readyState<2||(this.wsConnectionFailureTimeout||(this.wsConnectionFailureTimeout=window.setTimeout((()=>{console.error("APPLICATION LIFECYCLE: STARTUP: Assimilation service failed to connect to websocket within 7500 milliseconds"),fe.system.error("APPLICATION LIFECYCLE: STARTUP: Assimilation service failed to connect to websocket within 7500 milliseconds"),this.notifySocketConnectionFailure=!1,this.connectCallback&&this.connectCallback({connected:!1,error:"Unable to connect to websocket"})}),7500)),super.connect())}prepareAction(e){const t=p()();e.ref=t;const n=JSON.stringify(e);return e.expiry=Date.now()+3e3,n}getMonitorInfo(){fe.system.debug("APPLICATION LIFECYCLE:Assimilation:getMonitorInfo"),x.getMonitorInfo((e=>{this.send(JSON.stringify({topic:"monitorInfo",data:e}))}))}setMonitorInfo(e){fe.system.debug("APPLICATION LIFECYCLE:Assimilation:setMonitorInfo"),this.send(JSON.stringify({topic:"monitorInfo",data:e}))}getApplicationList(){this.send(this.prepareAction({topic:"applicationList"}))}}fe.start(),new class extends nr{constructor(e){super({name:e,startupDependencies:{},shutdownDependencies:{services:["windowService"]}}),this.assimilationWindowManager=null,this.port=8392,this.readyFunction=null,this.appAssets=null,this.assimilationManifest=null,this.fullManifest=null,this.configCache={},this.uuidByName={},this.ws=null,this.version="",this.assimilationHelper=null,this.serverAddress="",this.routerClient=P,this.load=this.load.bind(this),this.getApplicationList=this.getApplicationList.bind(this),this.onBaseServiceReady((async e=>{fe.system.debug("assimilation.onBaseServiceReady"),x.getFEAInfo((e=>{this.version=e.FEA})),P.addPubSubResponder(/.*humanInterface.*/,{}),A.waitForBootStage("earlyuser","stageEntered",this.getApplicationList),await this.load()?this.readyFunction=e:e()})),this.start()}convertHandle(e){let t=e.replace("native@0x","").toUpperCase();return t=`00000000${t}`,t=t.substring(t.length-8),t}registerFreestandingWindow(e){const t=e.windowHandle?this.convertHandle(e.windowHandle):e.windowName;P.query("Finsemble.NewNativeWindow",{appUUID:t,name:e.windowName,appName:e.appName,windowType:"NativeWindow"},(async()=>{var n;if(e.windowHandle){const{wrap:r}=await es.getInstance({name:e.windowName,windowType:"NativeWindow"});r.uuid=t,r.outsideOfFinsemble=!0,null!==(n=r.descriptor)&&void 0!==n||(r.descriptor={}),this.assimilationWindowManager.activeWindows[t]=r;const i=`${Date.now()}_${Math.random()}`;P.addListener(`${i}-Assimilation.boundsUpdate`,((e,t)=>{this.assimilationWindowManager.handleSpawnComplete(r,null==t?void 0:t.data)}));const{bounds:s}=e;s?(s.top=Number.parseInt(null==s?void 0:s.top)||0,s.left=Number.parseInt(null==s?void 0:s.left)||0,s.height=Number.parseInt(null==s?void 0:s.height)||600,s.width=Number.parseInt(null==s?void 0:s.width)||800,s.right=s.left+s.width,s.bottom=s.top+s.height,this.assimilationWindowManager.handleSpawnComplete(r,s)):this.assimilationWindowManager.sendSocketMessage(JSON.stringify({handle:t,ref:i,uuid:r.uuid,topic:"getBounds"}))}}))}createRouterEndpoints(){P.addResponder("Assimilation.setMonitorInfo",((e,t)=>{let n=null;if(this.ws)try{this.ws.setMonitorInfo(null==t?void 0:t.data)}catch(e){n=new Error(`assimilation_setMonitorInfo_failed - ${e.message}`)}else n=new Error("assimilation_missing_socket_connection - Assimilation socket connection does not exist, cannot set Monitor Info");n?null==t||t.sendQueryResponse(n,null):null==t||t.sendQueryResponse(null,null)})),P.addResponder("Assimilation.alwaysOnTop",((e,t)=>{this.assimilationWindowManager.alwaysOnTop(t),null==t||t.sendQueryResponse(null,null)})),P.addResponder("Assimilation.moveWindow",((e,t)=>{this.assimilationWindowManager.moveWindow(null==t?void 0:t.data,this.ws),null==t||t.sendQueryResponse(null,null)})),P.addListener("Assimilation.saveWindow",((e,t)=>{this.assimilationWindowManager.saveWindow(t)})),P.addResponder("Assimilation.showWindow",((e,t)=>{this.assimilationWindowManager.showWindow(t),null==t||t.sendQueryResponse(null,null)})),P.addResponder("Assimilation.maximizeWindow",((e,t)=>{this.assimilationWindowManager.maximizeWindow(t),null==t||t.sendQueryResponse(null,null)})),P.addResponder("Assimilation.restoreWindow",((e,t)=>{this.assimilationWindowManager.restoreWindow(t),null==t||t.sendQueryResponse(null,null)})),P.addResponder("Assimilation.minimizeWindow",((e,t)=>{this.assimilationWindowManager.minimizeWindow(t),null==t||t.sendQueryResponse(null,null)})),P.addResponder("Assimilation.hideWindow",((e,t)=>{this.assimilationWindowManager.hideWindow(t),null==t||t.sendQueryResponse(null,null)})),P.addResponder("Assimilation.dockWindow",((e,t)=>{this.assimilationWindowManager.dockWindow(t),null==t||t.sendQueryResponse(null,null)})),P.addResponder("Assimilation.undockWindow",((e,t)=>{this.assimilationWindowManager.undockWindow(t),null==t||t.sendQueryResponse(null,null)})),P.addResponder("Assimilation.bringToFront",((e,t)=>{this.assimilationWindowManager.bringToFront(t),null==t||t.sendQueryResponse(null,null)})),P.addResponder("Assimilation.closeWindow",((e,t)=>{this.assimilationWindowManager.closeWindow(t)})),P.addListener("Assimilation.hookWindowByHandle",((e,t)=>{this.assimilationWindowManager.updateSpawningWindowFromWindowObject(t)})),P.addResponder("Assimilation.getWindowLocation",((e,t)=>{if(!(null==t?void 0:t.data.windowName))return null==t?void 0:t.sendQueryResponse(null,null);const n=this.assimilationWindowManager.getWindowByName(t.data.windowName);if(!n)return null==t?void 0:t.sendQueryResponse("no window found");if(n.outsideOfFinsemble||t.data.force){const e=`${Date.now()}_${Math.random()}`;P.addListener(`${e}-Assimilation.boundsUpdate`,((e,n)=>{null==t||t.sendQueryResponse(null,{location:null==n?void 0:n.data})})),this.assimilationWindowManager.sendSocketMessage(JSON.stringify({ref:e,uuid:n.uuid,topic:"getBounds"}))}else null==t||t.sendQueryResponse(null,{location:n.location})})),P.addResponder("Assimilation.spawnNative",((e,t)=>{t&&this.spawnAsset(this.constructNativeWindowParams(t),(()=>{null==t||t.sendQueryResponse(e,!0)}))})),P.addListener("Assimilation.windowClosed",((e,t)=>{fe.system.debug("APPLICATION LIFECYCLE:Assimilation:windowClosed",t)})),P.addListener("Finsemble.Assimilation.register",((e,t)=>{var n,r,i,s,o,a;const u=null==t?void 0:t.data,l=this.assimilationWindowManager.awaitingAssimilationSpawn;let d=!0;for(const e in l)if(l[e].name==u.windowName){if(d=!1,u.windowHandle){const t=this.convertHandle(u.windowHandle),l=this.assimilationWindowManager.updateSpawningWindow(e,t),d={left:null===(n=l.descriptor)||void 0===n?void 0:n.left,top:null===(r=l.descriptor)||void 0===r?void 0:r.top,right:null===(i=l.descriptor)||void 0===i?void 0:i.right,bottom:null===(s=l.descriptor)||void 0===s?void 0:s.bottom,width:null===(o=l.descriptor)||void 0===o?void 0:o.width,height:null===(a=l.descriptor)||void 0===a?void 0:a.height};this.assimilationWindowManager.handleSpawnComplete(l,d)}else{const t=this.assimilationWindowManager.updateSpawningWindow(e,null);this.assimilationWindowManager.handleSpawnComplete(t,null)}break}const c=Object.keys(this.assimilationWindowManager.activeWindows).find((e=>this.assimilationWindowManager.activeWindows[e].windowName===u.windowName));d&&c&&(d=!1),d&&u.processId?(fe.system.error(`The spawned ${u.windowName} window doesn't have the expected windowName property. Please ensure that windowName received from Finsemble as command line args is passed to the constructor without changes.`),fe.system.warn(`The spawned ${u.windowName} window has been registered as freestanding.`)):d&&this.registerFreestandingWindow(u)}))}shouldHideTitleBar(e,t){var n;return!!e||r()(t,"customData.foreign.services.assimilationService.hideTitleBar",null===(n=this.assimilationHelper)||void 0===n?void 0:n.manifest.hideTitleBars)}constructNativeWindowParams(e){let t=e.data;const n=t.isWPF||r()(t,"customData.window.argumentsAsQueryString");return t.hideTitleBar=this.shouldHideTitleBar(n,t),n&&(t={params:t,...this.getArgumentsWPF(e)},t.spawnDefaultViewer=!0),this.constructPath(t),t}getArgumentsWPF(e){var t,n;const r={...e.data};r.generatedArguments=r.arguments||"",this.uuidByName[r.name]||(this.uuidByName[r.name]=`uuid${Date.now()}_${Math.round(1e4*Math.random())}`),r.uuid||(r.uuid=this.uuidByName[r.name]);const i=new Map([["finsembleWindowName",r.name],["componentType",r.customData.component.type],["uuid",this.uuidByName[r.name]],["left",r.defaultLeft],["top",r.defaultTop],["width",r.defaultWidth],["height",r.defaultHeight],["iac",!0],["serverAddress",this.serverAddress],["hostType","finsemble"]]);return(null===(n=null===(t=r.customData)||void 0===t?void 0:t.appConfig)||void 0===n?void 0:n.appId)&&i.set("appId",r.customData.appConfig.appId),r.path&&r.customData.window.argumentsAsQueryString?i.forEach(((e,t)=>{r.generatedArguments=`${r.generatedArguments}&${t}=${e}`})):i.forEach(((e,t)=>{r.generatedArguments=`${r.generatedArguments} "${t}=${e}"`})),r.alias||r.path||(r.path=r.customData.window.path,r.alias=r.customData.window.alias),r.componentType=r.customData.component.type,this.configCache[r.name]=r,r}constructPath(e){if(void 0===e.path||e.customData&&e.customData.window&&!1===Boolean(e.customData.window.argumentsAsQueryString))return;const t=new URL(e.path),n=new URLSearchParams(e.generatedArguments),r=new URLSearchParams("");[...t.searchParams.entries(),...n.entries()].forEach((function(e){r.append(e[0],e[1])})),t.search=r.toString(),e.generatedPath=t.toString(),e.generatedArguments=""}launchAssimilationExe(){x.launchExternalProcess({alias:"assimilation",arguments:`PORT=${this.port}`,listener:e=>{"exited"===e.topic?(fe.system.log("APPLICATION LIFECYCLE:Exited Assimilation Process",e),fe.system.debug("APPLICATION LIFECYCLE:Exited Assimilation Process")):(fe.system.log("APPLICATION LIFECYCLE:Running Assimilation Process",e),fe.system.debug("APPLICATION LIFECYCLE:Running Assimilation Process"))}},(e=>{fe.system.log("APPLICATION LIFECYCLE:Assimilation process successfully launched"),fe.system.debug("APPLICATION LIFECYCLE:Assimilation process successfully launched",e.uuid),this.connectSockets()}),(e=>{this.notifyAssimilationLaunchFailure(e),this.readyFunction&&this.readyFunction()}))}async getAllConfigs(){var e;const{err:t,data:n}=await X.getManifest();if(!t&&n){this.fullManifest=n;const t=null==n?void 0:n.finsemble.services.assimilationService.config,r=null==n?void 0:n.finsemble.servicesConfig.assimilation,i=null==n?void 0:n.finsemble.betaFeatures.assimilation;i&&fe.system.error("Assimilation is no longer a beta feature. Move assimilation under serviceConfigs."),this.assimilationManifest=Object.assign(t,r||i),this.appAssets=null!==(e=null==n?void 0:n.appAssets)&&void 0!==e?e:null,this.assimilationHelper=new xs({appAssets:null==n?void 0:n.appAssets,manifest:this.assimilationManifest}),this.assimilationWindowManager=new Ds(this.assimilationHelper);const s="ws://127.0.0.1:3376";this.serverAddress=Pt.getDefault(n,"fullManifest.finsemble.router.transportSettings.FinsembleTransport.serverAddress",s)}}async load(){var e;fe.system.debug("APPLICATION LIFECYCLE:Assimilation:load"),await this.getAllConfigs();const t=this.assimilationManifest;return(null==t?void 0:t.port)&&(this.port=t.port),t.enabled?-1==navigator.platform.indexOf("Win")?(fe.system.warn("APPLICATION LIFECYCLE:Assimilation disabled due to incompatible platform",navigator.platform),!1):(fe.system.debug("APPLICATION LIFECYCLE:Assimilation: Is Enabled"),(null===(e=this.assimilationHelper)||void 0===e?void 0:e.findAssetByAlias("assimilation"))?(this.assimilationWindowManager.setFloatingTitlebar(r()(this.fullManifest,"finsemble.Window Manager.floatingTitlebarComponent","floatingTitlebar")),this.createRouterEndpoints(),fe.system.log("APPLICATION LIFECYCLE:Assimilation Enabled"),this.launchAssimilationExe(),!0):(I("dev","ONCE-SINCE-STARTUP","assimilationService-not-found","Could not find assimilation asset. Ensure that appAssets is properly formatted in your application's manifest."),fe.system.error("APPLICATION LIFECYCLE:Assimilation Error:","assimilationService-not-found","Could not find assimilation asset. Ensure that appAssets is properly formatted in your application's manifest."),!1)):(fe.system.log("APPLICATION LIFECYCLE:Assimilation Not Enabled"),!1)}onLoggerStateChanged(e){var t,n;let r={topic:"onLogLevel"};["Error","Warn","Log","Info","Debug","Verbose"].forEach((t=>{r[t.toLowerCase()]=e.system[t]})),this.assimilationHelper&&(null===(t=this.ws)||void 0===t||t.send(null===(n=this.assimilationHelper)||void 0===n?void 0:n.prepareAction(r)))}socketConnectionHandler(e){var t,n,r;e.connected?(this.assimilationWindowManager.setWebsocket(this.ws),null===(t=this.ws)||void 0===t||t.setThrottle((null===(n=this.assimilationManifest)||void 0===n?void 0:n.throttle)>=0?null===(r=this.assimilationManifest)||void 0===r?void 0:r.throttle:20)):this.notifyAssimilationLaunchFailure(e.error),this.onLoggerStateChanged(fe.setting()),this.readyFunction&&this.readyFunction()}notifyAssimilationLaunchFailure(e){fe.system.error("Assimilation.launchAssimilationExe Error:",e),X.set(["finsemble","servicesConfig","assimilation","enabled"],!1),P.transmit("assimilation.status.changed",{enabled:!1});const t=new ar,n=new rr;n.buttonText="Dismiss",n.type=ir.DISMISS,t.title="Critical Failure in Assimilation Service",t.details="Assimilation failed To launch. Native applications will not work. Check the Central Logger for additional details.",t.actions=[n],hs.notify(t)}connectSockets(){var e;(null===(e=this.assimilationManifest)||void 0===e?void 0:e.port)&&(this.port=this.assimilationManifest.port),this.ws=new Us(this.assimilationManifest,this.assimilationWindowManager),this.ws.connect(this.socketConnectionHandler.bind(this)),void 0!==fe.onStateChanged&&fe.onStateChanged((e=>{this.onLoggerStateChanged(e)}))}compareVersion(e,t){if(!e)return 1;if(!t)return-1;const n=e.split("."),r=t.split(".");for(let e=0;e<Math.max(n.length,r.length);e++){if(e==n.length&&e==r.length)return 0;if(e>=r.length)return-1;if(e>=n.length)return 1;const t=parseInt(n[e]),i=parseInt(r[e]);if(t>i)return-1;if(i>t)return 1}return 0}spawnAsset(e,t){const n={name:e.name,uuid:e.uuid,componentType:e.componentType,windowType:"NativeWindow",waitForReady:!1};return es.getInstance(n,((n,r)=>{e.minWidth=(null==e?void 0:e.minWidth)>100?e.minWidth:100,e.minHeight=(null==e?void 0:e.minHeight)>25?e.minHeight:25,e.maxWidth=(null==e?void 0:e.maxWidth)>100?e.maxWidth:1/0,e.maxHeight=(null==e?void 0:e.maxHeight)>25?e.maxHeight:1/0,e.maxWidth<e.defaultWidth&&(e.defaultWidth=e.maxWidth),e.minWidth>e.defaultWidth&&(e.defaultWidth=e.minWidth),e.maxHeight<e.defaultHeight&&(e.defaultHeight=e.maxHeight),e.minHeight>e.defaultHeight&&(e.defaultHeight=e.minHeight),e.width<e.minWidth&&(e.width=e.minWidth),e.width>e.maxWidth&&(e.width=e.maxWidth),e.height<e.minHeight&&(e.height=e.minHeight),e.height>e.maxHeight&&(e.height=e.maxHeight);const i=P.addListener(`Finsemble.RegisterInterruptibleEvent.${r.name}`,((e,t)=>{i(),r.closeFinal(r.handleWrapRemoveRequest)}));return e.right=e.left+e.width,e.bottom=e.top+e.height,r.descriptor=e,this.assimilationWindowManager.spawnWindow(r,this.ws),t()}))}getApplicationList(){this.ws&&this.ws.getApplicationList()}}("assimilationService")})()})();
2
+ (()=>{var e={14744:e=>{"use strict";var t=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===n}(e)}(e)},n="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function r(e,t){return!1!==t.clone&&t.isMergeableObject(e)?a((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function i(e,t,n){return e.concat(t).map((function(e){return r(e,n)}))}function s(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return Object.propertyIsEnumerable.call(e,t)})):[]}(e))}function o(e,t){try{return t in e}catch(e){return!1}}function a(e,n,u){(u=u||{}).arrayMerge=u.arrayMerge||i,u.isMergeableObject=u.isMergeableObject||t,u.cloneUnlessOtherwiseSpecified=r;var l=Array.isArray(n);return l===Array.isArray(e)?l?u.arrayMerge(e,n,u):function(e,t,n){var i={};return n.isMergeableObject(e)&&s(e).forEach((function(t){i[t]=r(e[t],n)})),s(t).forEach((function(s){(function(e,t){return o(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,s)||(o(e,s)&&n.isMergeableObject(t[s])?i[s]=function(e,t){if(!t.customMerge)return a;var n=t.customMerge(e);return"function"==typeof n?n:a}(s,n)(e[s],t[s],n):i[s]=r(t[s],n))})),i}(e,n,u):r(n,u)}a.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return a(e,n,t)}),{})};var u=a;e.exports=u},37007:e=>{"use strict";var t,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,e.exports.once=function(e,t){return new Promise((function(n,r){function i(n){e.removeListener(t,s),r(n)}function s(){"function"==typeof e.removeListener&&e.removeListener("error",i),n([].slice.call(arguments))}h(e,t,s,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&h(e,"error",t,{once:!0})}(e,i)}))},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var o=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function l(e,t,n,r){var i,s,o,l;if(a(n),void 0===(s=e._events)?(s=e._events=Object.create(null),e._eventsCount=0):(void 0!==s.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),s=e._events),o=s[t]),void 0===o)o=s[t]=n,++e._eventsCount;else if("function"==typeof o?o=s[t]=r?[n,o]:[o,n]:r?o.unshift(n):o.push(n),(i=u(e))>0&&o.length>i&&!o.warned){o.warned=!0;var d=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");d.name="MaxListenersExceededWarning",d.emitter=e,d.type=t,d.count=o.length,l=d,console&&console.warn&&console.warn(l)}return e}function d(){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 c(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=d.bind(r);return i.listener=n,r.wrapFn=i,i}function p(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):y(i,i.length)}function f(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function y(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function h(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(s){r.once&&e.removeEventListener(t,i),n(s)}))}}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");o=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return u(this)},s.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i="error"===e,s=this._events;if(void 0!==s)i=i&&void 0===s.error;else if(!i)return!1;if(i){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var u=s[e];if(void 0===u)return!1;if("function"==typeof u)r(u,this,t);else{var l=u.length,d=y(u,l);for(n=0;n<l;++n)r(d[n],this,t)}return!0},s.prototype.addListener=function(e,t){return l(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return l(this,e,t,!0)},s.prototype.once=function(e,t){return a(t),this.on(e,c(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,c(this,e,t)),this},s.prototype.removeListener=function(e,t){var n,r,i,s,o;if(a(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,s=n.length-1;s>=0;s--)if(n[s]===t||n[s].listener===t){o=n[s].listener,i=s;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,o||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,s=Object.keys(n);for(r=0;r<s.length;++r)"removeListener"!==(i=s[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},s.prototype.listeners=function(e){return p(this,e,!0)},s.prototype.rawListeners=function(e){return p(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):f.call(e,t)},s.prototype.listenerCount=f,s.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},55580:(e,t,n)=>{var r=n(56110)(n(9325),"DataView");e.exports=r},21549:(e,t,n)=>{var r=n(22032),i=n(63862),s=n(66721),o=n(12749),a=n(35749);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=s,u.prototype.has=o,u.prototype.set=a,e.exports=u},80079:(e,t,n)=>{var r=n(63702),i=n(70080),s=n(24739),o=n(48655),a=n(31175);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=s,u.prototype.has=o,u.prototype.set=a,e.exports=u},68223:(e,t,n)=>{var r=n(56110)(n(9325),"Map");e.exports=r},53661:(e,t,n)=>{var r=n(63040),i=n(17670),s=n(90289),o=n(4509),a=n(72949);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=s,u.prototype.has=o,u.prototype.set=a,e.exports=u},32804:(e,t,n)=>{var r=n(56110)(n(9325),"Promise");e.exports=r},76545:(e,t,n)=>{var r=n(56110)(n(9325),"Set");e.exports=r},38859:(e,t,n)=>{var r=n(53661),i=n(31380),s=n(51459);function o(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}o.prototype.add=o.prototype.push=i,o.prototype.has=s,e.exports=o},37217:(e,t,n)=>{var r=n(80079),i=n(51420),s=n(90938),o=n(63605),a=n(29817),u=n(80945);function l(e){var t=this.__data__=new r(e);this.size=t.size}l.prototype.clear=i,l.prototype.delete=s,l.prototype.get=o,l.prototype.has=a,l.prototype.set=u,e.exports=l},51873:(e,t,n)=>{var r=n(9325).Symbol;e.exports=r},37828:(e,t,n)=>{var r=n(9325).Uint8Array;e.exports=r},28303:(e,t,n)=>{var r=n(56110)(n(9325),"WeakMap");e.exports=r},91033:e=>{e.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}},83729:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}},79770:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,s=[];++n<r;){var o=e[n];t(o,n,e)&&(s[i++]=o)}return s}},70695:(e,t,n)=>{var r=n(78096),i=n(72428),s=n(56449),o=n(3656),a=n(30361),u=n(37167),l=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=s(e),d=!n&&i(e),c=!n&&!d&&o(e),p=!n&&!d&&!c&&u(e),f=n||d||c||p,y=f?r(e.length,String):[],h=y.length;for(var g in e)!t&&!l.call(e,g)||f&&("length"==g||c&&("offset"==g||"parent"==g)||p&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||a(g,h))||y.push(g);return y}},34932:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}},14528:e=>{e.exports=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}},14248:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},16547:(e,t,n)=>{var r=n(43360),i=n(75288),s=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var o=e[t];s.call(e,t)&&i(o,n)&&(void 0!==n||t in e)||r(e,t,n)}},26025:(e,t,n)=>{var r=n(75288);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},74733:(e,t,n)=>{var r=n(21791),i=n(95950);e.exports=function(e,t){return e&&r(t,i(t),e)}},43838:(e,t,n)=>{var r=n(21791),i=n(37241);e.exports=function(e,t){return e&&r(t,i(t),e)}},43360:(e,t,n)=>{var r=n(93243);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},9999:(e,t,n)=>{var r=n(37217),i=n(83729),s=n(16547),o=n(74733),a=n(43838),u=n(93290),l=n(23007),d=n(92271),c=n(48948),p=n(50002),f=n(83349),y=n(5861),h=n(76189),g=n(77199),m=n(35529),v=n(56449),w=n(3656),b=n(87730),j=n(23805),S=n(38440),C=n(95950),A=n(37241),R="[object Arguments]",I="[object Function]",T="[object Object]",E={};E[R]=E["[object Array]"]=E["[object ArrayBuffer]"]=E["[object DataView]"]=E["[object Boolean]"]=E["[object Date]"]=E["[object Float32Array]"]=E["[object Float64Array]"]=E["[object Int8Array]"]=E["[object Int16Array]"]=E["[object Int32Array]"]=E["[object Map]"]=E["[object Number]"]=E[T]=E["[object RegExp]"]=E["[object Set]"]=E["[object String]"]=E["[object Symbol]"]=E["[object Uint8Array]"]=E["[object Uint8ClampedArray]"]=E["[object Uint16Array]"]=E["[object Uint32Array]"]=!0,E["[object Error]"]=E[I]=E["[object WeakMap]"]=!1,e.exports=function e(t,n,O,_,M,L){var P,W=1&n,N=2&n,k=4&n;if(O&&(P=M?O(t,_,M,L):O(t)),void 0!==P)return P;if(!j(t))return t;var D=v(t);if(D){if(P=h(t),!W)return l(t,P)}else{var x=y(t),F=x==I||"[object GeneratorFunction]"==x;if(w(t))return u(t,W);if(x==T||x==R||F&&!M){if(P=N||F?{}:m(t),!W)return N?c(t,a(P,t)):d(t,o(P,t))}else{if(!E[x])return M?t:{};P=g(t,x,W)}}L||(L=new r);var B=L.get(t);if(B)return B;L.set(t,P),S(t)?t.forEach((function(r){P.add(e(r,n,O,r,t,L))})):b(t)&&t.forEach((function(r,i){P.set(i,e(r,n,O,i,t,L))}));var q=D?void 0:(k?N?f:p:N?A:C)(t);return i(q||t,(function(r,i){q&&(r=t[i=r]),s(P,i,e(r,n,O,i,t,L))})),P}},39344:(e,t,n)=>{var r=n(23805),i=Object.create,s=function(){function e(){}return function(t){if(!r(t))return{};if(i)return i(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=s},83120:(e,t,n)=>{var r=n(14528),i=n(45891);e.exports=function e(t,n,s,o,a){var u=-1,l=t.length;for(s||(s=i),a||(a=[]);++u<l;){var d=t[u];n>0&&s(d)?n>1?e(d,n-1,s,o,a):r(a,d):o||(a[a.length]=d)}return a}},47422:(e,t,n)=>{var r=n(31769),i=n(77797);e.exports=function(e,t){for(var n=0,s=(t=r(t,e)).length;null!=e&&n<s;)e=e[i(t[n++])];return n&&n==s?e:void 0}},82199:(e,t,n)=>{var r=n(14528),i=n(56449);e.exports=function(e,t,n){var s=t(e);return i(e)?s:r(s,n(e))}},72552:(e,t,n)=>{var r=n(51873),i=n(659),s=n(59350),o=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":o&&o in Object(e)?i(e):s(e)}},28077:e=>{e.exports=function(e,t){return null!=e&&t in Object(e)}},27534:(e,t,n)=>{var r=n(72552),i=n(40346);e.exports=function(e){return i(e)&&"[object Arguments]"==r(e)}},60270:(e,t,n)=>{var r=n(87068),i=n(40346);e.exports=function e(t,n,s,o,a){return t===n||(null==t||null==n||!i(t)&&!i(n)?t!=t&&n!=n:r(t,n,s,o,e,a))}},87068:(e,t,n)=>{var r=n(37217),i=n(25911),s=n(21986),o=n(50689),a=n(5861),u=n(56449),l=n(3656),d=n(37167),c="[object Arguments]",p="[object Array]",f="[object Object]",y=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,h,g,m){var v=u(e),w=u(t),b=v?p:a(e),j=w?p:a(t),S=(b=b==c?f:b)==f,C=(j=j==c?f:j)==f,A=b==j;if(A&&l(e)){if(!l(t))return!1;v=!0,S=!1}if(A&&!S)return m||(m=new r),v||d(e)?i(e,t,n,h,g,m):s(e,t,b,n,h,g,m);if(!(1&n)){var R=S&&y.call(e,"__wrapped__"),I=C&&y.call(t,"__wrapped__");if(R||I){var T=R?e.value():e,E=I?t.value():t;return m||(m=new r),g(T,E,n,h,m)}}return!!A&&(m||(m=new r),o(e,t,n,h,g,m))}},29172:(e,t,n)=>{var r=n(5861),i=n(40346);e.exports=function(e){return i(e)&&"[object Map]"==r(e)}},45083:(e,t,n)=>{var r=n(1882),i=n(87296),s=n(23805),o=n(47473),a=/^\[object .+?Constructor\]$/,u=Function.prototype,l=Object.prototype,d=u.toString,c=l.hasOwnProperty,p=RegExp("^"+d.call(c).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!s(e)||i(e))&&(r(e)?p:a).test(o(e))}},16038:(e,t,n)=>{var r=n(5861),i=n(40346);e.exports=function(e){return i(e)&&"[object Set]"==r(e)}},4901:(e,t,n)=>{var r=n(72552),i=n(30294),s=n(40346),o={};o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o["[object Arguments]"]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object DataView]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o["[object Map]"]=o["[object Number]"]=o["[object Object]"]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object WeakMap]"]=!1,e.exports=function(e){return s(e)&&i(e.length)&&!!o[r(e)]}},88984:(e,t,n)=>{var r=n(55527),i=n(3650),s=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=[];for(var n in Object(e))s.call(e,n)&&"constructor"!=n&&t.push(n);return t}},72903:(e,t,n)=>{var r=n(23805),i=n(55527),s=n(90181),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return s(e);var t=i(e),n=[];for(var a in e)("constructor"!=a||!t&&o.call(e,a))&&n.push(a);return n}},76001:(e,t,n)=>{var r=n(97420),i=n(80631);e.exports=function(e,t){return r(e,t,(function(t,n){return i(e,n)}))}},97420:(e,t,n)=>{var r=n(47422),i=n(73170),s=n(31769);e.exports=function(e,t,n){for(var o=-1,a=t.length,u={};++o<a;){var l=t[o],d=r(e,l);n(d,l)&&i(u,s(l,e),d)}return u}},73170:(e,t,n)=>{var r=n(16547),i=n(31769),s=n(30361),o=n(23805),a=n(77797);e.exports=function(e,t,n,u){if(!o(e))return e;for(var l=-1,d=(t=i(t,e)).length,c=d-1,p=e;null!=p&&++l<d;){var f=a(t[l]),y=n;if("__proto__"===f||"constructor"===f||"prototype"===f)return e;if(l!=c){var h=p[f];void 0===(y=u?u(h,f,p):void 0)&&(y=o(h)?h:s(t[l+1])?[]:{})}r(p,f,y),p=p[f]}return e}},19570:(e,t,n)=>{var r=n(37334),i=n(93243),s=n(83488),o=i?function(e,t){return i(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:s;e.exports=o},78096:e=>{e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},77556:(e,t,n)=>{var r=n(51873),i=n(34932),s=n(56449),o=n(44394),a=r?r.prototype:void 0,u=a?a.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(s(t))return i(t,e)+"";if(o(t))return u?u.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},54128:(e,t,n)=>{var r=n(31800),i=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(i,""):e}},27301:e=>{e.exports=function(e){return function(t){return e(t)}}},19219:e=>{e.exports=function(e,t){return e.has(t)}},31769:(e,t,n)=>{var r=n(56449),i=n(28586),s=n(61802),o=n(13222);e.exports=function(e,t){return r(e)?e:i(e,t)?[e]:s(o(e))}},49653:(e,t,n)=>{var r=n(37828);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},93290:(e,t,n)=>{e=n.nmd(e);var r=n(9325),i=t&&!t.nodeType&&t,s=i&&e&&!e.nodeType&&e,o=s&&s.exports===i?r.Buffer:void 0,a=o?o.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=a?a(n):new e.constructor(n);return e.copy(r),r}},76169:(e,t,n)=>{var r=n(49653);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},73201:e=>{var t=/\w*$/;e.exports=function(e){var n=new e.constructor(e.source,t.exec(e));return n.lastIndex=e.lastIndex,n}},93736:(e,t,n)=>{var r=n(51873),i=r?r.prototype:void 0,s=i?i.valueOf:void 0;e.exports=function(e){return s?Object(s.call(e)):{}}},71961:(e,t,n)=>{var r=n(49653);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},23007:e=>{e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},21791:(e,t,n)=>{var r=n(16547),i=n(43360);e.exports=function(e,t,n,s){var o=!n;n||(n={});for(var a=-1,u=t.length;++a<u;){var l=t[a],d=s?s(n[l],e[l],l,n,e):void 0;void 0===d&&(d=e[l]),o?i(n,l,d):r(n,l,d)}return n}},92271:(e,t,n)=>{var r=n(21791),i=n(4664);e.exports=function(e,t){return r(e,i(e),t)}},48948:(e,t,n)=>{var r=n(21791),i=n(86375);e.exports=function(e,t){return r(e,i(e),t)}},55481:(e,t,n)=>{var r=n(9325)["__core-js_shared__"];e.exports=r},93243:(e,t,n)=>{var r=n(56110),i=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=i},25911:(e,t,n)=>{var r=n(38859),i=n(14248),s=n(19219);e.exports=function(e,t,n,o,a,u){var l=1&n,d=e.length,c=t.length;if(d!=c&&!(l&&c>d))return!1;var p=u.get(e),f=u.get(t);if(p&&f)return p==t&&f==e;var y=-1,h=!0,g=2&n?new r:void 0;for(u.set(e,t),u.set(t,e);++y<d;){var m=e[y],v=t[y];if(o)var w=l?o(v,m,y,t,e,u):o(m,v,y,e,t,u);if(void 0!==w){if(w)continue;h=!1;break}if(g){if(!i(t,(function(e,t){if(!s(g,t)&&(m===e||a(m,e,n,o,u)))return g.push(t)}))){h=!1;break}}else if(m!==v&&!a(m,v,n,o,u)){h=!1;break}}return u.delete(e),u.delete(t),h}},21986:(e,t,n)=>{var r=n(51873),i=n(37828),s=n(75288),o=n(25911),a=n(20317),u=n(84247),l=r?r.prototype:void 0,d=l?l.valueOf:void 0;e.exports=function(e,t,n,r,l,c,p){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!c(new i(e),new i(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return s(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var f=a;case"[object Set]":var y=1&r;if(f||(f=u),e.size!=t.size&&!y)return!1;var h=p.get(e);if(h)return h==t;r|=2,p.set(e,t);var g=o(f(e),f(t),r,l,c,p);return p.delete(e),g;case"[object Symbol]":if(d)return d.call(e)==d.call(t)}return!1}},50689:(e,t,n)=>{var r=n(50002),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,s,o,a){var u=1&n,l=r(e),d=l.length;if(d!=r(t).length&&!u)return!1;for(var c=d;c--;){var p=l[c];if(!(u?p in t:i.call(t,p)))return!1}var f=a.get(e),y=a.get(t);if(f&&y)return f==t&&y==e;var h=!0;a.set(e,t),a.set(t,e);for(var g=u;++c<d;){var m=e[p=l[c]],v=t[p];if(s)var w=u?s(v,m,p,t,e,a):s(m,v,p,e,t,a);if(!(void 0===w?m===v||o(m,v,n,s,a):w)){h=!1;break}g||(g="constructor"==p)}if(h&&!g){var b=e.constructor,j=t.constructor;b==j||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof j&&j instanceof j||(h=!1)}return a.delete(e),a.delete(t),h}},38816:(e,t,n)=>{var r=n(35970),i=n(56757),s=n(32865);e.exports=function(e){return s(i(e,void 0,r),e+"")}},34840:(e,t,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},50002:(e,t,n)=>{var r=n(82199),i=n(4664),s=n(95950);e.exports=function(e){return r(e,s,i)}},83349:(e,t,n)=>{var r=n(82199),i=n(86375),s=n(37241);e.exports=function(e){return r(e,s,i)}},12651:(e,t,n)=>{var r=n(74218);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},56110:(e,t,n)=>{var r=n(45083),i=n(10392);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},28879:(e,t,n)=>{var r=n(74335)(Object.getPrototypeOf,Object);e.exports=r},659:(e,t,n)=>{var r=n(51873),i=Object.prototype,s=i.hasOwnProperty,o=i.toString,a=r?r.toStringTag:void 0;e.exports=function(e){var t=s.call(e,a),n=e[a];try{e[a]=void 0;var r=!0}catch(e){}var i=o.call(e);return r&&(t?e[a]=n:delete e[a]),i}},4664:(e,t,n)=>{var r=n(79770),i=n(63345),s=Object.prototype.propertyIsEnumerable,o=Object.getOwnPropertySymbols,a=o?function(e){return null==e?[]:(e=Object(e),r(o(e),(function(t){return s.call(e,t)})))}:i;e.exports=a},86375:(e,t,n)=>{var r=n(14528),i=n(28879),s=n(4664),o=n(63345),a=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,s(e)),e=i(e);return t}:o;e.exports=a},5861:(e,t,n)=>{var r=n(55580),i=n(68223),s=n(32804),o=n(76545),a=n(28303),u=n(72552),l=n(47473),d="[object Map]",c="[object Promise]",p="[object Set]",f="[object WeakMap]",y="[object DataView]",h=l(r),g=l(i),m=l(s),v=l(o),w=l(a),b=u;(r&&b(new r(new ArrayBuffer(1)))!=y||i&&b(new i)!=d||s&&b(s.resolve())!=c||o&&b(new o)!=p||a&&b(new a)!=f)&&(b=function(e){var t=u(e),n="[object Object]"==t?e.constructor:void 0,r=n?l(n):"";if(r)switch(r){case h:return y;case g:return d;case m:return c;case v:return p;case w:return f}return t}),e.exports=b},10392:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},49326:(e,t,n)=>{var r=n(31769),i=n(72428),s=n(56449),o=n(30361),a=n(30294),u=n(77797);e.exports=function(e,t,n){for(var l=-1,d=(t=r(t,e)).length,c=!1;++l<d;){var p=u(t[l]);if(!(c=null!=e&&n(e,p)))break;e=e[p]}return c||++l!=d?c:!!(d=null==e?0:e.length)&&a(d)&&o(p,d)&&(s(e)||i(e))}},22032:(e,t,n)=>{var r=n(81042);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},63862:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},66721:(e,t,n)=>{var r=n(81042),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(t,e)?t[e]:void 0}},12749:(e,t,n)=>{var r=n(81042),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:i.call(t,e)}},35749:(e,t,n)=>{var r=n(81042);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},76189:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e){var n=e.length,r=new e.constructor(n);return n&&"string"==typeof e[0]&&t.call(e,"index")&&(r.index=e.index,r.input=e.input),r}},77199:(e,t,n)=>{var r=n(49653),i=n(76169),s=n(73201),o=n(93736),a=n(71961);e.exports=function(e,t,n){var u=e.constructor;switch(t){case"[object ArrayBuffer]":return r(e);case"[object Boolean]":case"[object Date]":return new u(+e);case"[object DataView]":return i(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return a(e,n);case"[object Map]":case"[object Set]":return new u;case"[object Number]":case"[object String]":return new u(e);case"[object RegExp]":return s(e);case"[object Symbol]":return o(e)}}},35529:(e,t,n)=>{var r=n(39344),i=n(28879),s=n(55527);e.exports=function(e){return"function"!=typeof e.constructor||s(e)?{}:r(i(e))}},45891:(e,t,n)=>{var r=n(51873),i=n(72428),s=n(56449),o=r?r.isConcatSpreadable:void 0;e.exports=function(e){return s(e)||i(e)||!!(o&&e&&e[o])}},30361:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var r=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&t.test(e))&&e>-1&&e%1==0&&e<n}},28586:(e,t,n)=>{var r=n(56449),i=n(44394),s=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!i(e))||o.test(e)||!s.test(e)||null!=t&&e in Object(t)}},74218:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},87296:(e,t,n)=>{var r,i=n(55481),s=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!s&&s in e}},55527:e=>{var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},63702:e=>{e.exports=function(){this.__data__=[],this.size=0}},70080:(e,t,n)=>{var r=n(26025),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0||(n==t.length-1?t.pop():i.call(t,n,1),--this.size,0))}},24739:(e,t,n)=>{var r=n(26025);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},48655:(e,t,n)=>{var r=n(26025);e.exports=function(e){return r(this.__data__,e)>-1}},31175:(e,t,n)=>{var r=n(26025);e.exports=function(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}},63040:(e,t,n)=>{var r=n(21549),i=n(80079),s=n(68223);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(s||i),string:new r}}},17670:(e,t,n)=>{var r=n(12651);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},90289:(e,t,n)=>{var r=n(12651);e.exports=function(e){return r(this,e).get(e)}},4509:(e,t,n)=>{var r=n(12651);e.exports=function(e){return r(this,e).has(e)}},72949:(e,t,n)=>{var r=n(12651);e.exports=function(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}},20317:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},62224:(e,t,n)=>{var r=n(50104);e.exports=function(e){var t=r(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},81042:(e,t,n)=>{var r=n(56110)(Object,"create");e.exports=r},3650:(e,t,n)=>{var r=n(74335)(Object.keys,Object);e.exports=r},90181:e=>{e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},86009:(e,t,n)=>{e=n.nmd(e);var r=n(34840),i=t&&!t.nodeType&&t,s=i&&e&&!e.nodeType&&e,o=s&&s.exports===i&&r.process,a=function(){try{return s&&s.require&&s.require("util").types||o&&o.binding&&o.binding("util")}catch(e){}}();e.exports=a},59350:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},74335:e=>{e.exports=function(e,t){return function(n){return e(t(n))}}},56757:(e,t,n)=>{var r=n(91033),i=Math.max;e.exports=function(e,t,n){return t=i(void 0===t?e.length-1:t,0),function(){for(var s=arguments,o=-1,a=i(s.length-t,0),u=Array(a);++o<a;)u[o]=s[t+o];o=-1;for(var l=Array(t+1);++o<t;)l[o]=s[o];return l[t]=n(u),r(e,this,l)}}},9325:(e,t,n)=>{var r=n(34840),i="object"==typeof self&&self&&self.Object===Object&&self,s=r||i||Function("return this")();e.exports=s},31380:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},51459:e=>{e.exports=function(e){return this.__data__.has(e)}},84247:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},32865:(e,t,n)=>{var r=n(19570),i=n(51811)(r);e.exports=i},51811:e=>{var t=Date.now;e.exports=function(e){var n=0,r=0;return function(){var i=t(),s=16-(i-r);if(r=i,s>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},51420:(e,t,n)=>{var r=n(80079);e.exports=function(){this.__data__=new r,this.size=0}},90938:e=>{e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},63605:e=>{e.exports=function(e){return this.__data__.get(e)}},29817:e=>{e.exports=function(e){return this.__data__.has(e)}},80945:(e,t,n)=>{var r=n(80079),i=n(68223),s=n(53661);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var o=n.__data__;if(!i||o.length<199)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new s(o)}return n.set(e,t),this.size=n.size,this}},61802:(e,t,n)=>{var r=n(62224),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,s=/\\(\\)?/g,o=r((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(i,(function(e,n,r,i){t.push(r?i.replace(s,"$1"):n||e)})),t}));e.exports=o},77797:(e,t,n)=>{var r=n(44394);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},47473:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},31800:e=>{var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},88055:(e,t,n)=>{var r=n(9999);e.exports=function(e){return r(e,5)}},37334:e=>{e.exports=function(e){return function(){return e}}},38221:(e,t,n)=>{var r=n(23805),i=n(10124),s=n(99374),o=Math.max,a=Math.min;e.exports=function(e,t,n){var u,l,d,c,p,f,y=0,h=!1,g=!1,m=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function v(t){var n=u,r=l;return u=l=void 0,y=t,c=e.apply(r,n)}function w(e){var n=e-f;return void 0===f||n>=t||n<0||g&&e-y>=d}function b(){var e=i();if(w(e))return j(e);p=setTimeout(b,function(e){var n=t-(e-f);return g?a(n,d-(e-y)):n}(e))}function j(e){return p=void 0,m&&u?v(e):(u=l=void 0,c)}function S(){var e=i(),n=w(e);if(u=arguments,l=this,f=e,n){if(void 0===p)return function(e){return y=e,p=setTimeout(b,t),h?v(e):c}(f);if(g)return clearTimeout(p),p=setTimeout(b,t),v(f)}return void 0===p&&(p=setTimeout(b,t)),c}return t=s(t)||0,r(n)&&(h=!!n.leading,d=(g="maxWait"in n)?o(s(n.maxWait)||0,t):d,m="trailing"in n?!!n.trailing:m),S.cancel=function(){void 0!==p&&clearTimeout(p),y=0,u=f=l=p=void 0},S.flush=function(){return void 0===p?c:j(i())},S}},75288:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},35970:(e,t,n)=>{var r=n(83120);e.exports=function(e){return null!=e&&e.length?r(e,1):[]}},58156:(e,t,n)=>{var r=n(47422);e.exports=function(e,t,n){var i=null==e?void 0:r(e,t);return void 0===i?n:i}},80631:(e,t,n)=>{var r=n(28077),i=n(49326);e.exports=function(e,t){return null!=e&&i(e,t,r)}},83488:e=>{e.exports=function(e){return e}},72428:(e,t,n)=>{var r=n(27534),i=n(40346),s=Object.prototype,o=s.hasOwnProperty,a=s.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(e){return i(e)&&o.call(e,"callee")&&!a.call(e,"callee")};e.exports=u},56449:e=>{var t=Array.isArray;e.exports=t},64894:(e,t,n)=>{var r=n(1882),i=n(30294);e.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},3656:(e,t,n)=>{e=n.nmd(e);var r=n(9325),i=n(89935),s=t&&!t.nodeType&&t,o=s&&e&&!e.nodeType&&e,a=o&&o.exports===s?r.Buffer:void 0,u=(a?a.isBuffer:void 0)||i;e.exports=u},2404:(e,t,n)=>{var r=n(60270);e.exports=function(e,t){return r(e,t)}},29132:(e,t,n)=>{var r=n(60270);e.exports=function(e,t,n){var i=(n="function"==typeof n?n:void 0)?n(e,t):void 0;return void 0===i?r(e,t,void 0,n):!!i}},1882:(e,t,n)=>{var r=n(72552),i=n(23805);e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},30294:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},87730:(e,t,n)=>{var r=n(29172),i=n(27301),s=n(86009),o=s&&s.isMap,a=o?i(o):r;e.exports=a},23805:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},40346:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},38440:(e,t,n)=>{var r=n(16038),i=n(27301),s=n(86009),o=s&&s.isSet,a=o?i(o):r;e.exports=a},44394:(e,t,n)=>{var r=n(72552),i=n(40346);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},37167:(e,t,n)=>{var r=n(4901),i=n(27301),s=n(86009),o=s&&s.isTypedArray,a=o?i(o):r;e.exports=a},95950:(e,t,n)=>{var r=n(70695),i=n(88984),s=n(64894);e.exports=function(e){return s(e)?r(e):i(e)}},37241:(e,t,n)=>{var r=n(70695),i=n(72903),s=n(64894);e.exports=function(e){return s(e)?r(e,!0):i(e)}},2543:function(e,t,n){var r;e=n.nmd(e),function(){var i,s="Expected a function",o="__lodash_hash_undefined__",a="__lodash_placeholder__",u=32,l=128,d=1/0,c=9007199254740991,p=NaN,f=4294967295,y=[["ary",l],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",u],["partialRight",64],["rearg",256]],h="[object Arguments]",g="[object Array]",m="[object Boolean]",v="[object Date]",w="[object Error]",b="[object Function]",j="[object GeneratorFunction]",S="[object Map]",C="[object Number]",A="[object Object]",R="[object Promise]",I="[object RegExp]",T="[object Set]",E="[object String]",O="[object Symbol]",_="[object WeakMap]",M="[object ArrayBuffer]",L="[object DataView]",P="[object Float32Array]",W="[object Float64Array]",N="[object Int8Array]",k="[object Int16Array]",D="[object Int32Array]",x="[object Uint8Array]",F="[object Uint8ClampedArray]",B="[object Uint16Array]",q="[object Uint32Array]",U=/\b__p \+= '';/g,$=/\b(__p \+=) '' \+/g,J=/(__e\(.*?\)|\b__t\)) \+\n'';/g,H=/&(?:amp|lt|gt|quot|#39);/g,V=/[&<>"']/g,z=RegExp(H.source),G=RegExp(V.source),Y=/<%-([\s\S]+?)%>/g,Q=/<%([\s\S]+?)%>/g,K=/<%=([\s\S]+?)%>/g,Z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,X=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,ne=RegExp(te.source),re=/^\s+/,ie=/\s/,se=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,oe=/\{\n\/\* \[wrapped with (.+)\] \*/,ae=/,? & /,ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,le=/[()=,{}\[\]\/\s]/,de=/\\(\\)?/g,ce=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pe=/\w*$/,fe=/^[-+]0x[0-9a-f]+$/i,ye=/^0b[01]+$/i,he=/^\[object .+?Constructor\]$/,ge=/^0o[0-7]+$/i,me=/^(?:0|[1-9]\d*)$/,ve=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,we=/($^)/,be=/['\n\r\u2028\u2029\\]/g,je="\\ud800-\\udfff",Se="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ce="\\u2700-\\u27bf",Ae="a-z\\xdf-\\xf6\\xf8-\\xff",Re="A-Z\\xc0-\\xd6\\xd8-\\xde",Ie="\\ufe0e\\ufe0f",Te="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ee="["+je+"]",Oe="["+Te+"]",_e="["+Se+"]",Me="\\d+",Le="["+Ce+"]",Pe="["+Ae+"]",We="[^"+je+Te+Me+Ce+Ae+Re+"]",Ne="\\ud83c[\\udffb-\\udfff]",ke="[^"+je+"]",De="(?:\\ud83c[\\udde6-\\uddff]){2}",xe="[\\ud800-\\udbff][\\udc00-\\udfff]",Fe="["+Re+"]",Be="\\u200d",qe="(?:"+Pe+"|"+We+")",Ue="(?:"+Fe+"|"+We+")",$e="(?:['’](?:d|ll|m|re|s|t|ve))?",Je="(?:['’](?:D|LL|M|RE|S|T|VE))?",He="(?:"+_e+"|"+Ne+")?",Ve="["+Ie+"]?",ze=Ve+He+"(?:"+Be+"(?:"+[ke,De,xe].join("|")+")"+Ve+He+")*",Ge="(?:"+[Le,De,xe].join("|")+")"+ze,Ye="(?:"+[ke+_e+"?",_e,De,xe,Ee].join("|")+")",Qe=RegExp("['’]","g"),Ke=RegExp(_e,"g"),Ze=RegExp(Ne+"(?="+Ne+")|"+Ye+ze,"g"),Xe=RegExp([Fe+"?"+Pe+"+"+$e+"(?="+[Oe,Fe,"$"].join("|")+")",Ue+"+"+Je+"(?="+[Oe,Fe+qe,"$"].join("|")+")",Fe+"?"+qe+"+"+$e,Fe+"+"+Je,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Me,Ge].join("|"),"g"),et=RegExp("["+Be+je+Se+Ie+"]"),tt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,nt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],rt=-1,it={};it[P]=it[W]=it[N]=it[k]=it[D]=it[x]=it[F]=it[B]=it[q]=!0,it[h]=it[g]=it[M]=it[m]=it[L]=it[v]=it[w]=it[b]=it[S]=it[C]=it[A]=it[I]=it[T]=it[E]=it[_]=!1;var st={};st[h]=st[g]=st[M]=st[L]=st[m]=st[v]=st[P]=st[W]=st[N]=st[k]=st[D]=st[S]=st[C]=st[A]=st[I]=st[T]=st[E]=st[O]=st[x]=st[F]=st[B]=st[q]=!0,st[w]=st[b]=st[_]=!1;var ot={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},at=parseFloat,ut=parseInt,lt="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,dt="object"==typeof self&&self&&self.Object===Object&&self,ct=lt||dt||Function("return this")(),pt=t&&!t.nodeType&&t,ft=pt&&e&&!e.nodeType&&e,yt=ft&&ft.exports===pt,ht=yt&&lt.process,gt=function(){try{return ft&&ft.require&&ft.require("util").types||ht&&ht.binding&&ht.binding("util")}catch(e){}}(),mt=gt&&gt.isArrayBuffer,vt=gt&&gt.isDate,wt=gt&&gt.isMap,bt=gt&&gt.isRegExp,jt=gt&&gt.isSet,St=gt&&gt.isTypedArray;function Ct(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function At(e,t,n,r){for(var i=-1,s=null==e?0:e.length;++i<s;){var o=e[i];t(r,o,n(o),e)}return r}function Rt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function It(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function Tt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function Et(e,t){for(var n=-1,r=null==e?0:e.length,i=0,s=[];++n<r;){var o=e[n];t(o,n,e)&&(s[i++]=o)}return s}function Ot(e,t){return!(null==e||!e.length)&&Ft(e,t,0)>-1}function _t(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function Mt(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function Lt(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function Pt(e,t,n,r){var i=-1,s=null==e?0:e.length;for(r&&s&&(n=e[++i]);++i<s;)n=t(n,e[i],i,e);return n}function Wt(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function Nt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var kt=$t("length");function Dt(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r}function xt(e,t,n,r){for(var i=e.length,s=n+(r?1:-1);r?s--:++s<i;)if(t(e[s],s,e))return s;return-1}function Ft(e,t,n){return t==t?function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):xt(e,qt,n)}function Bt(e,t,n,r){for(var i=n-1,s=e.length;++i<s;)if(r(e[i],t))return i;return-1}function qt(e){return e!=e}function Ut(e,t){var n=null==e?0:e.length;return n?Vt(e,t)/n:p}function $t(e){return function(t){return null==t?i:t[e]}}function Jt(e){return function(t){return null==e?i:e[t]}}function Ht(e,t,n,r,i){return i(e,(function(e,i,s){n=r?(r=!1,e):t(n,e,i,s)})),n}function Vt(e,t){for(var n,r=-1,s=e.length;++r<s;){var o=t(e[r]);o!==i&&(n=n===i?o:n+o)}return n}function zt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Gt(e){return e?e.slice(0,pn(e)+1).replace(re,""):e}function Yt(e){return function(t){return e(t)}}function Qt(e,t){return Mt(t,(function(t){return e[t]}))}function Kt(e,t){return e.has(t)}function Zt(e,t){for(var n=-1,r=e.length;++n<r&&Ft(t,e[n],0)>-1;);return n}function Xt(e,t){for(var n=e.length;n--&&Ft(t,e[n],0)>-1;);return n}var en=Jt({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),tn=Jt({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function nn(e){return"\\"+ot[e]}function rn(e){return et.test(e)}function sn(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function on(e,t){return function(n){return e(t(n))}}function an(e,t){for(var n=-1,r=e.length,i=0,s=[];++n<r;){var o=e[n];o!==t&&o!==a||(e[n]=a,s[i++]=n)}return s}function un(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function ln(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function dn(e){return rn(e)?function(e){for(var t=Ze.lastIndex=0;Ze.test(e);)++t;return t}(e):kt(e)}function cn(e){return rn(e)?function(e){return e.match(Ze)||[]}(e):function(e){return e.split("")}(e)}function pn(e){for(var t=e.length;t--&&ie.test(e.charAt(t)););return t}var fn=Jt({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),yn=function e(t){var n,r=(t=null==t?ct:yn.defaults(ct.Object(),t,yn.pick(ct,nt))).Array,ie=t.Date,je=t.Error,Se=t.Function,Ce=t.Math,Ae=t.Object,Re=t.RegExp,Ie=t.String,Te=t.TypeError,Ee=r.prototype,Oe=Se.prototype,_e=Ae.prototype,Me=t["__core-js_shared__"],Le=Oe.toString,Pe=_e.hasOwnProperty,We=0,Ne=(n=/[^.]+$/.exec(Me&&Me.keys&&Me.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",ke=_e.toString,De=Le.call(Ae),xe=ct._,Fe=Re("^"+Le.call(Pe).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Be=yt?t.Buffer:i,qe=t.Symbol,Ue=t.Uint8Array,$e=Be?Be.allocUnsafe:i,Je=on(Ae.getPrototypeOf,Ae),He=Ae.create,Ve=_e.propertyIsEnumerable,ze=Ee.splice,Ge=qe?qe.isConcatSpreadable:i,Ye=qe?qe.iterator:i,Ze=qe?qe.toStringTag:i,et=function(){try{var e=us(Ae,"defineProperty");return e({},"",{}),e}catch(e){}}(),ot=t.clearTimeout!==ct.clearTimeout&&t.clearTimeout,lt=ie&&ie.now!==ct.Date.now&&ie.now,dt=t.setTimeout!==ct.setTimeout&&t.setTimeout,pt=Ce.ceil,ft=Ce.floor,ht=Ae.getOwnPropertySymbols,gt=Be?Be.isBuffer:i,kt=t.isFinite,Jt=Ee.join,hn=on(Ae.keys,Ae),gn=Ce.max,mn=Ce.min,vn=ie.now,wn=t.parseInt,bn=Ce.random,jn=Ee.reverse,Sn=us(t,"DataView"),Cn=us(t,"Map"),An=us(t,"Promise"),Rn=us(t,"Set"),In=us(t,"WeakMap"),Tn=us(Ae,"create"),En=In&&new In,On={},_n=ks(Sn),Mn=ks(Cn),Ln=ks(An),Pn=ks(Rn),Wn=ks(In),Nn=qe?qe.prototype:i,kn=Nn?Nn.valueOf:i,Dn=Nn?Nn.toString:i;function xn(e){if(ea(e)&&!$o(e)&&!(e instanceof Un)){if(e instanceof qn)return e;if(Pe.call(e,"__wrapped__"))return Ds(e)}return new qn(e)}var Fn=function(){function e(){}return function(t){if(!Xo(t))return{};if(He)return He(t);e.prototype=t;var n=new e;return e.prototype=i,n}}();function Bn(){}function qn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function Un(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=f,this.__views__=[]}function $n(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Jn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Hn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Vn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Hn;++t<n;)this.add(e[t])}function zn(e){var t=this.__data__=new Jn(e);this.size=t.size}function Gn(e,t){var n=$o(e),r=!n&&Uo(e),i=!n&&!r&&zo(e),s=!n&&!r&&!i&&ua(e),o=n||r||i||s,a=o?zt(e.length,Ie):[],u=a.length;for(var l in e)!t&&!Pe.call(e,l)||o&&("length"==l||i&&("offset"==l||"parent"==l)||s&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||hs(l,u))||a.push(l);return a}function Yn(e){var t=e.length;return t?e[Hr(0,t-1)]:i}function Qn(e,t){return Ms(Ii(e),sr(t,0,e.length))}function Kn(e){return Ms(Ii(e))}function Zn(e,t,n){(n!==i&&!Fo(e[t],n)||n===i&&!(t in e))&&rr(e,t,n)}function Xn(e,t,n){var r=e[t];Pe.call(e,t)&&Fo(r,n)&&(n!==i||t in e)||rr(e,t,n)}function er(e,t){for(var n=e.length;n--;)if(Fo(e[n][0],t))return n;return-1}function tr(e,t,n,r){return dr(e,(function(e,i,s){t(r,e,n(e),s)})),r}function nr(e,t){return e&&Ti(t,_a(t),e)}function rr(e,t,n){"__proto__"==t&&et?et(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ir(e,t){for(var n=-1,s=t.length,o=r(s),a=null==e;++n<s;)o[n]=a?i:Ra(e,t[n]);return o}function sr(e,t,n){return e==e&&(n!==i&&(e=e<=n?e:n),t!==i&&(e=e>=t?e:t)),e}function or(e,t,n,r,s,o){var a,u=1&t,l=2&t,d=4&t;if(n&&(a=s?n(e,r,s,o):n(e)),a!==i)return a;if(!Xo(e))return e;var c=$o(e);if(c){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Pe.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!u)return Ii(e,a)}else{var p=cs(e),f=p==b||p==j;if(zo(e))return bi(e,u);if(p==A||p==h||f&&!s){if(a=l||f?{}:fs(e),!u)return l?function(e,t){return Ti(e,ds(e),t)}(e,function(e,t){return e&&Ti(t,Ma(t),e)}(a,e)):function(e,t){return Ti(e,ls(e),t)}(e,nr(a,e))}else{if(!st[p])return s?e:{};a=function(e,t,n){var r,i=e.constructor;switch(t){case M:return ji(e);case m:case v:return new i(+e);case L:return function(e,t){var n=t?ji(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case P:case W:case N:case k:case D:case x:case F:case B:case q:return Si(e,n);case S:return new i;case C:case E:return new i(e);case I:return function(e){var t=new e.constructor(e.source,pe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case T:return new i;case O:return r=e,kn?Ae(kn.call(r)):{}}}(e,p,u)}}o||(o=new zn);var y=o.get(e);if(y)return y;o.set(e,a),sa(e)?e.forEach((function(r){a.add(or(r,t,n,r,e,o))})):ta(e)&&e.forEach((function(r,i){a.set(i,or(r,t,n,i,e,o))}));var g=c?i:(d?l?ts:es:l?Ma:_a)(e);return Rt(g||e,(function(r,i){g&&(r=e[i=r]),Xn(a,i,or(r,t,n,i,e,o))})),a}function ar(e,t,n){var r=n.length;if(null==e)return!r;for(e=Ae(e);r--;){var s=n[r],o=t[s],a=e[s];if(a===i&&!(s in e)||!o(a))return!1}return!0}function ur(e,t,n){if("function"!=typeof e)throw new Te(s);return Ts((function(){e.apply(i,n)}),t)}function lr(e,t,n,r){var i=-1,s=Ot,o=!0,a=e.length,u=[],l=t.length;if(!a)return u;n&&(t=Mt(t,Yt(n))),r?(s=_t,o=!1):t.length>=200&&(s=Kt,o=!1,t=new Vn(t));e:for(;++i<a;){var d=e[i],c=null==n?d:n(d);if(d=r||0!==d?d:0,o&&c==c){for(var p=l;p--;)if(t[p]===c)continue e;u.push(d)}else s(t,c,r)||u.push(d)}return u}xn.templateSettings={escape:Y,evaluate:Q,interpolate:K,variable:"",imports:{_:xn}},xn.prototype=Bn.prototype,xn.prototype.constructor=xn,qn.prototype=Fn(Bn.prototype),qn.prototype.constructor=qn,Un.prototype=Fn(Bn.prototype),Un.prototype.constructor=Un,$n.prototype.clear=function(){this.__data__=Tn?Tn(null):{},this.size=0},$n.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},$n.prototype.get=function(e){var t=this.__data__;if(Tn){var n=t[e];return n===o?i:n}return Pe.call(t,e)?t[e]:i},$n.prototype.has=function(e){var t=this.__data__;return Tn?t[e]!==i:Pe.call(t,e)},$n.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Tn&&t===i?o:t,this},Jn.prototype.clear=function(){this.__data__=[],this.size=0},Jn.prototype.delete=function(e){var t=this.__data__,n=er(t,e);return!(n<0||(n==t.length-1?t.pop():ze.call(t,n,1),--this.size,0))},Jn.prototype.get=function(e){var t=this.__data__,n=er(t,e);return n<0?i:t[n][1]},Jn.prototype.has=function(e){return er(this.__data__,e)>-1},Jn.prototype.set=function(e,t){var n=this.__data__,r=er(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Hn.prototype.clear=function(){this.size=0,this.__data__={hash:new $n,map:new(Cn||Jn),string:new $n}},Hn.prototype.delete=function(e){var t=os(this,e).delete(e);return this.size-=t?1:0,t},Hn.prototype.get=function(e){return os(this,e).get(e)},Hn.prototype.has=function(e){return os(this,e).has(e)},Hn.prototype.set=function(e,t){var n=os(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Vn.prototype.add=Vn.prototype.push=function(e){return this.__data__.set(e,o),this},Vn.prototype.has=function(e){return this.__data__.has(e)},zn.prototype.clear=function(){this.__data__=new Jn,this.size=0},zn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},zn.prototype.get=function(e){return this.__data__.get(e)},zn.prototype.has=function(e){return this.__data__.has(e)},zn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Jn){var r=n.__data__;if(!Cn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Hn(r)}return n.set(e,t),this.size=n.size,this};var dr=_i(vr),cr=_i(wr,!0);function pr(e,t){var n=!0;return dr(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function fr(e,t,n){for(var r=-1,s=e.length;++r<s;){var o=e[r],a=t(o);if(null!=a&&(u===i?a==a&&!aa(a):n(a,u)))var u=a,l=o}return l}function yr(e,t){var n=[];return dr(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function hr(e,t,n,r,i){var s=-1,o=e.length;for(n||(n=ys),i||(i=[]);++s<o;){var a=e[s];t>0&&n(a)?t>1?hr(a,t-1,n,r,i):Lt(i,a):r||(i[i.length]=a)}return i}var gr=Mi(),mr=Mi(!0);function vr(e,t){return e&&gr(e,t,_a)}function wr(e,t){return e&&mr(e,t,_a)}function br(e,t){return Et(t,(function(t){return Qo(e[t])}))}function jr(e,t){for(var n=0,r=(t=gi(t,e)).length;null!=e&&n<r;)e=e[Ns(t[n++])];return n&&n==r?e:i}function Sr(e,t,n){var r=t(e);return $o(e)?r:Lt(r,n(e))}function Cr(e){return null==e?e===i?"[object Undefined]":"[object Null]":Ze&&Ze in Ae(e)?function(e){var t=Pe.call(e,Ze),n=e[Ze];try{e[Ze]=i;var r=!0}catch(e){}var s=ke.call(e);return r&&(t?e[Ze]=n:delete e[Ze]),s}(e):function(e){return ke.call(e)}(e)}function Ar(e,t){return e>t}function Rr(e,t){return null!=e&&Pe.call(e,t)}function Ir(e,t){return null!=e&&t in Ae(e)}function Tr(e,t,n){for(var s=n?_t:Ot,o=e[0].length,a=e.length,u=a,l=r(a),d=1/0,c=[];u--;){var p=e[u];u&&t&&(p=Mt(p,Yt(t))),d=mn(p.length,d),l[u]=!n&&(t||o>=120&&p.length>=120)?new Vn(u&&p):i}p=e[0];var f=-1,y=l[0];e:for(;++f<o&&c.length<d;){var h=p[f],g=t?t(h):h;if(h=n||0!==h?h:0,!(y?Kt(y,g):s(c,g,n))){for(u=a;--u;){var m=l[u];if(!(m?Kt(m,g):s(e[u],g,n)))continue e}y&&y.push(g),c.push(h)}}return c}function Er(e,t,n){var r=null==(e=As(e,t=gi(t,e)))?e:e[Ns(Gs(t))];return null==r?i:Ct(r,e,n)}function Or(e){return ea(e)&&Cr(e)==h}function _r(e,t,n,r,s){return e===t||(null==e||null==t||!ea(e)&&!ea(t)?e!=e&&t!=t:function(e,t,n,r,s,o){var a=$o(e),u=$o(t),l=a?g:cs(e),d=u?g:cs(t),c=(l=l==h?A:l)==A,p=(d=d==h?A:d)==A,f=l==d;if(f&&zo(e)){if(!zo(t))return!1;a=!0,c=!1}if(f&&!c)return o||(o=new zn),a||ua(e)?Zi(e,t,n,r,s,o):function(e,t,n,r,i,s,o){switch(n){case L:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case M:return!(e.byteLength!=t.byteLength||!s(new Ue(e),new Ue(t)));case m:case v:case C:return Fo(+e,+t);case w:return e.name==t.name&&e.message==t.message;case I:case E:return e==t+"";case S:var a=sn;case T:var u=1&r;if(a||(a=un),e.size!=t.size&&!u)return!1;var l=o.get(e);if(l)return l==t;r|=2,o.set(e,t);var d=Zi(a(e),a(t),r,i,s,o);return o.delete(e),d;case O:if(kn)return kn.call(e)==kn.call(t)}return!1}(e,t,l,n,r,s,o);if(!(1&n)){var y=c&&Pe.call(e,"__wrapped__"),b=p&&Pe.call(t,"__wrapped__");if(y||b){var j=y?e.value():e,R=b?t.value():t;return o||(o=new zn),s(j,R,n,r,o)}}return!!f&&(o||(o=new zn),function(e,t,n,r,s,o){var a=1&n,u=es(e),l=u.length;if(l!=es(t).length&&!a)return!1;for(var d=l;d--;){var c=u[d];if(!(a?c in t:Pe.call(t,c)))return!1}var p=o.get(e),f=o.get(t);if(p&&f)return p==t&&f==e;var y=!0;o.set(e,t),o.set(t,e);for(var h=a;++d<l;){var g=e[c=u[d]],m=t[c];if(r)var v=a?r(m,g,c,t,e,o):r(g,m,c,e,t,o);if(!(v===i?g===m||s(g,m,n,r,o):v)){y=!1;break}h||(h="constructor"==c)}if(y&&!h){var w=e.constructor,b=t.constructor;w==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof b&&b instanceof b||(y=!1)}return o.delete(e),o.delete(t),y}(e,t,n,r,s,o))}(e,t,n,r,_r,s))}function Mr(e,t,n,r){var s=n.length,o=s,a=!r;if(null==e)return!o;for(e=Ae(e);s--;){var u=n[s];if(a&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++s<o;){var l=(u=n[s])[0],d=e[l],c=u[1];if(a&&u[2]){if(d===i&&!(l in e))return!1}else{var p=new zn;if(r)var f=r(d,c,l,e,t,p);if(!(f===i?_r(c,d,3,r,p):f))return!1}}return!0}function Lr(e){return!(!Xo(e)||(t=e,Ne&&Ne in t))&&(Qo(e)?Fe:he).test(ks(e));var t}function Pr(e){return"function"==typeof e?e:null==e?nu:"object"==typeof e?$o(e)?xr(e[0],e[1]):Dr(e):cu(e)}function Wr(e){if(!bs(e))return hn(e);var t=[];for(var n in Ae(e))Pe.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Nr(e,t){return e<t}function kr(e,t){var n=-1,i=Ho(e)?r(e.length):[];return dr(e,(function(e,r,s){i[++n]=t(e,r,s)})),i}function Dr(e){var t=as(e);return 1==t.length&&t[0][2]?Ss(t[0][0],t[0][1]):function(n){return n===e||Mr(n,e,t)}}function xr(e,t){return ms(e)&&js(t)?Ss(Ns(e),t):function(n){var r=Ra(n,e);return r===i&&r===t?Ia(n,e):_r(t,r,3)}}function Fr(e,t,n,r,s){e!==t&&gr(t,(function(o,a){if(s||(s=new zn),Xo(o))!function(e,t,n,r,s,o,a){var u=Rs(e,n),l=Rs(t,n),d=a.get(l);if(d)Zn(e,n,d);else{var c=o?o(u,l,n+"",e,t,a):i,p=c===i;if(p){var f=$o(l),y=!f&&zo(l),h=!f&&!y&&ua(l);c=l,f||y||h?$o(u)?c=u:Vo(u)?c=Ii(u):y?(p=!1,c=bi(l,!0)):h?(p=!1,c=Si(l,!0)):c=[]:ra(l)||Uo(l)?(c=u,Uo(u)?c=ga(u):Xo(u)&&!Qo(u)||(c=fs(l))):p=!1}p&&(a.set(l,c),s(c,l,r,o,a),a.delete(l)),Zn(e,n,c)}}(e,t,a,n,Fr,r,s);else{var u=r?r(Rs(e,a),o,a+"",e,t,s):i;u===i&&(u=o),Zn(e,a,u)}}),Ma)}function Br(e,t){var n=e.length;if(n)return hs(t+=t<0?n:0,n)?e[t]:i}function qr(e,t,n){t=t.length?Mt(t,(function(e){return $o(e)?function(t){return jr(t,1===e.length?e[0]:e)}:e})):[nu];var r=-1;t=Mt(t,Yt(ss()));var i=kr(e,(function(e,n,i){var s=Mt(t,(function(t){return t(e)}));return{criteria:s,index:++r,value:e}}));return function(e){var t=e.length;for(e.sort((function(e,t){return function(e,t,n){for(var r=-1,i=e.criteria,s=t.criteria,o=i.length,a=n.length;++r<o;){var u=Ci(i[r],s[r]);if(u)return r>=a?u:u*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}));t--;)e[t]=e[t].value;return e}(i)}function Ur(e,t,n){for(var r=-1,i=t.length,s={};++r<i;){var o=t[r],a=jr(e,o);n(a,o)&&Qr(s,gi(o,e),a)}return s}function $r(e,t,n,r){var i=r?Bt:Ft,s=-1,o=t.length,a=e;for(e===t&&(t=Ii(t)),n&&(a=Mt(e,Yt(n)));++s<o;)for(var u=0,l=t[s],d=n?n(l):l;(u=i(a,d,u,r))>-1;)a!==e&&ze.call(a,u,1),ze.call(e,u,1);return e}function Jr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==s){var s=i;hs(i)?ze.call(e,i,1):ui(e,i)}}return e}function Hr(e,t){return e+ft(bn()*(t-e+1))}function Vr(e,t){var n="";if(!e||t<1||t>c)return n;do{t%2&&(n+=e),(t=ft(t/2))&&(e+=e)}while(t);return n}function zr(e,t){return Es(Cs(e,t,nu),e+"")}function Gr(e){return Yn(Fa(e))}function Yr(e,t){var n=Fa(e);return Ms(n,sr(t,0,n.length))}function Qr(e,t,n,r){if(!Xo(e))return e;for(var s=-1,o=(t=gi(t,e)).length,a=o-1,u=e;null!=u&&++s<o;){var l=Ns(t[s]),d=n;if("__proto__"===l||"constructor"===l||"prototype"===l)return e;if(s!=a){var c=u[l];(d=r?r(c,l,u):i)===i&&(d=Xo(c)?c:hs(t[s+1])?[]:{})}Xn(u,l,d),u=u[l]}return e}var Kr=En?function(e,t){return En.set(e,t),e}:nu,Zr=et?function(e,t){return et(e,"toString",{configurable:!0,enumerable:!1,value:Xa(t),writable:!0})}:nu;function Xr(e){return Ms(Fa(e))}function ei(e,t,n){var i=-1,s=e.length;t<0&&(t=-t>s?0:s+t),(n=n>s?s:n)<0&&(n+=s),s=t>n?0:n-t>>>0,t>>>=0;for(var o=r(s);++i<s;)o[i]=e[i+t];return o}function ti(e,t){var n;return dr(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function ni(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;r<i;){var s=r+i>>>1,o=e[s];null!==o&&!aa(o)&&(n?o<=t:o<t)?r=s+1:i=s}return i}return ri(e,t,nu,n)}function ri(e,t,n,r){var s=0,o=null==e?0:e.length;if(0===o)return 0;for(var a=(t=n(t))!=t,u=null===t,l=aa(t),d=t===i;s<o;){var c=ft((s+o)/2),p=n(e[c]),f=p!==i,y=null===p,h=p==p,g=aa(p);if(a)var m=r||h;else m=d?h&&(r||f):u?h&&f&&(r||!y):l?h&&f&&!y&&(r||!g):!y&&!g&&(r?p<=t:p<t);m?s=c+1:o=c}return mn(o,4294967294)}function ii(e,t){for(var n=-1,r=e.length,i=0,s=[];++n<r;){var o=e[n],a=t?t(o):o;if(!n||!Fo(a,u)){var u=a;s[i++]=0===o?0:o}}return s}function si(e){return"number"==typeof e?e:aa(e)?p:+e}function oi(e){if("string"==typeof e)return e;if($o(e))return Mt(e,oi)+"";if(aa(e))return Dn?Dn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ai(e,t,n){var r=-1,i=Ot,s=e.length,o=!0,a=[],u=a;if(n)o=!1,i=_t;else if(s>=200){var l=t?null:Vi(e);if(l)return un(l);o=!1,i=Kt,u=new Vn}else u=t?[]:a;e:for(;++r<s;){var d=e[r],c=t?t(d):d;if(d=n||0!==d?d:0,o&&c==c){for(var p=u.length;p--;)if(u[p]===c)continue e;t&&u.push(c),a.push(d)}else i(u,c,n)||(u!==a&&u.push(c),a.push(d))}return a}function ui(e,t){return null==(e=As(e,t=gi(t,e)))||delete e[Ns(Gs(t))]}function li(e,t,n,r){return Qr(e,t,n(jr(e,t)),r)}function di(e,t,n,r){for(var i=e.length,s=r?i:-1;(r?s--:++s<i)&&t(e[s],s,e););return n?ei(e,r?0:s,r?s+1:i):ei(e,r?s+1:0,r?i:s)}function ci(e,t){var n=e;return n instanceof Un&&(n=n.value()),Pt(t,(function(e,t){return t.func.apply(t.thisArg,Lt([e],t.args))}),n)}function pi(e,t,n){var i=e.length;if(i<2)return i?ai(e[0]):[];for(var s=-1,o=r(i);++s<i;)for(var a=e[s],u=-1;++u<i;)u!=s&&(o[s]=lr(o[s]||a,e[u],t,n));return ai(hr(o,1),t,n)}function fi(e,t,n){for(var r=-1,s=e.length,o=t.length,a={};++r<s;){var u=r<o?t[r]:i;n(a,e[r],u)}return a}function yi(e){return Vo(e)?e:[]}function hi(e){return"function"==typeof e?e:nu}function gi(e,t){return $o(e)?e:ms(e,t)?[e]:Ws(ma(e))}var mi=zr;function vi(e,t,n){var r=e.length;return n=n===i?r:n,!t&&n>=r?e:ei(e,t,n)}var wi=ot||function(e){return ct.clearTimeout(e)};function bi(e,t){if(t)return e.slice();var n=e.length,r=$e?$e(n):new e.constructor(n);return e.copy(r),r}function ji(e){var t=new e.constructor(e.byteLength);return new Ue(t).set(new Ue(e)),t}function Si(e,t){var n=t?ji(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Ci(e,t){if(e!==t){var n=e!==i,r=null===e,s=e==e,o=aa(e),a=t!==i,u=null===t,l=t==t,d=aa(t);if(!u&&!d&&!o&&e>t||o&&a&&l&&!u&&!d||r&&a&&l||!n&&l||!s)return 1;if(!r&&!o&&!d&&e<t||d&&n&&s&&!r&&!o||u&&n&&s||!a&&s||!l)return-1}return 0}function Ai(e,t,n,i){for(var s=-1,o=e.length,a=n.length,u=-1,l=t.length,d=gn(o-a,0),c=r(l+d),p=!i;++u<l;)c[u]=t[u];for(;++s<a;)(p||s<o)&&(c[n[s]]=e[s]);for(;d--;)c[u++]=e[s++];return c}function Ri(e,t,n,i){for(var s=-1,o=e.length,a=-1,u=n.length,l=-1,d=t.length,c=gn(o-u,0),p=r(c+d),f=!i;++s<c;)p[s]=e[s];for(var y=s;++l<d;)p[y+l]=t[l];for(;++a<u;)(f||s<o)&&(p[y+n[a]]=e[s++]);return p}function Ii(e,t){var n=-1,i=e.length;for(t||(t=r(i));++n<i;)t[n]=e[n];return t}function Ti(e,t,n,r){var s=!n;n||(n={});for(var o=-1,a=t.length;++o<a;){var u=t[o],l=r?r(n[u],e[u],u,n,e):i;l===i&&(l=e[u]),s?rr(n,u,l):Xn(n,u,l)}return n}function Ei(e,t){return function(n,r){var i=$o(n)?At:tr,s=t?t():{};return i(n,e,ss(r,2),s)}}function Oi(e){return zr((function(t,n){var r=-1,s=n.length,o=s>1?n[s-1]:i,a=s>2?n[2]:i;for(o=e.length>3&&"function"==typeof o?(s--,o):i,a&&gs(n[0],n[1],a)&&(o=s<3?i:o,s=1),t=Ae(t);++r<s;){var u=n[r];u&&e(t,u,r,o)}return t}))}function _i(e,t){return function(n,r){if(null==n)return n;if(!Ho(n))return e(n,r);for(var i=n.length,s=t?i:-1,o=Ae(n);(t?s--:++s<i)&&!1!==r(o[s],s,o););return n}}function Mi(e){return function(t,n,r){for(var i=-1,s=Ae(t),o=r(t),a=o.length;a--;){var u=o[e?a:++i];if(!1===n(s[u],u,s))break}return t}}function Li(e){return function(t){var n=rn(t=ma(t))?cn(t):i,r=n?n[0]:t.charAt(0),s=n?vi(n,1).join(""):t.slice(1);return r[e]()+s}}function Pi(e){return function(t){return Pt(Qa(Ua(t).replace(Qe,"")),e,"")}}function Wi(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Fn(e.prototype),r=e.apply(n,t);return Xo(r)?r:n}}function Ni(e){return function(t,n,r){var s=Ae(t);if(!Ho(t)){var o=ss(n,3);t=_a(t),n=function(e){return o(s[e],e,s)}}var a=e(t,n,r);return a>-1?s[o?t[a]:a]:i}}function ki(e){return Xi((function(t){var n=t.length,r=n,o=qn.prototype.thru;for(e&&t.reverse();r--;){var a=t[r];if("function"!=typeof a)throw new Te(s);if(o&&!u&&"wrapper"==rs(a))var u=new qn([],!0)}for(r=u?r:n;++r<n;){var l=rs(a=t[r]),d="wrapper"==l?ns(a):i;u=d&&vs(d[0])&&424==d[1]&&!d[4].length&&1==d[9]?u[rs(d[0])].apply(u,d[3]):1==a.length&&vs(a)?u[l]():u.thru(a)}return function(){var e=arguments,r=e[0];if(u&&1==e.length&&$o(r))return u.plant(r).value();for(var i=0,s=n?t[i].apply(this,e):r;++i<n;)s=t[i].call(this,s);return s}}))}function Di(e,t,n,s,o,a,u,d,c,p){var f=t&l,y=1&t,h=2&t,g=24&t,m=512&t,v=h?i:Wi(e);return function l(){for(var w=arguments.length,b=r(w),j=w;j--;)b[j]=arguments[j];if(g)var S=is(l),C=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(b,S);if(s&&(b=Ai(b,s,o,g)),a&&(b=Ri(b,a,u,g)),w-=C,g&&w<p){var A=an(b,S);return Ji(e,t,Di,l.placeholder,n,b,A,d,c,p-w)}var R=y?n:this,I=h?R[e]:e;return w=b.length,d?b=function(e,t){for(var n=e.length,r=mn(t.length,n),s=Ii(e);r--;){var o=t[r];e[r]=hs(o,n)?s[o]:i}return e}(b,d):m&&w>1&&b.reverse(),f&&c<w&&(b.length=c),this&&this!==ct&&this instanceof l&&(I=v||Wi(I)),I.apply(R,b)}}function xi(e,t){return function(n,r){return function(e,t,n,r){return vr(e,(function(e,i,s){t(r,n(e),i,s)})),r}(n,e,t(r),{})}}function Fi(e,t){return function(n,r){var s;if(n===i&&r===i)return t;if(n!==i&&(s=n),r!==i){if(s===i)return r;"string"==typeof n||"string"==typeof r?(n=oi(n),r=oi(r)):(n=si(n),r=si(r)),s=e(n,r)}return s}}function Bi(e){return Xi((function(t){return t=Mt(t,Yt(ss())),zr((function(n){var r=this;return e(t,(function(e){return Ct(e,r,n)}))}))}))}function qi(e,t){var n=(t=t===i?" ":oi(t)).length;if(n<2)return n?Vr(t,e):t;var r=Vr(t,pt(e/dn(t)));return rn(t)?vi(cn(r),0,e).join(""):r.slice(0,e)}function Ui(e){return function(t,n,s){return s&&"number"!=typeof s&&gs(t,n,s)&&(n=s=i),t=pa(t),n===i?(n=t,t=0):n=pa(n),function(e,t,n,i){for(var s=-1,o=gn(pt((t-e)/(n||1)),0),a=r(o);o--;)a[i?o:++s]=e,e+=n;return a}(t,n,s=s===i?t<n?1:-1:pa(s),e)}}function $i(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=ha(t),n=ha(n)),e(t,n)}}function Ji(e,t,n,r,s,o,a,l,d,c){var p=8&t;t|=p?u:64,4&(t&=~(p?64:u))||(t&=-4);var f=[e,t,s,p?o:i,p?a:i,p?i:o,p?i:a,l,d,c],y=n.apply(i,f);return vs(e)&&Is(y,f),y.placeholder=r,Os(y,e,t)}function Hi(e){var t=Ce[e];return function(e,n){if(e=ha(e),(n=null==n?0:mn(fa(n),292))&&kt(e)){var r=(ma(e)+"e").split("e");return+((r=(ma(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Vi=Rn&&1/un(new Rn([,-0]))[1]==d?function(e){return new Rn(e)}:au;function zi(e){return function(t){var n=cs(t);return n==S?sn(t):n==T?ln(t):function(e,t){return Mt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Gi(e,t,n,o,d,c,p,f){var y=2&t;if(!y&&"function"!=typeof e)throw new Te(s);var h=o?o.length:0;if(h||(t&=-97,o=d=i),p=p===i?p:gn(fa(p),0),f=f===i?f:fa(f),h-=d?d.length:0,64&t){var g=o,m=d;o=d=i}var v=y?i:ns(e),w=[e,t,n,o,d,g,m,c,p,f];if(v&&function(e,t){var n=e[1],r=t[1],i=n|r,s=i<131,o=r==l&&8==n||r==l&&256==n&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!s&&!o)return e;1&r&&(e[2]=t[2],i|=1&n?0:4);var u=t[3];if(u){var d=e[3];e[3]=d?Ai(d,u,t[4]):u,e[4]=d?an(e[3],a):t[4]}(u=t[5])&&(d=e[5],e[5]=d?Ri(d,u,t[6]):u,e[6]=d?an(e[5],a):t[6]),(u=t[7])&&(e[7]=u),r&l&&(e[8]=null==e[8]?t[8]:mn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i}(w,v),e=w[0],t=w[1],n=w[2],o=w[3],d=w[4],!(f=w[9]=w[9]===i?y?0:e.length:gn(w[9]-h,0))&&24&t&&(t&=-25),t&&1!=t)b=8==t||16==t?function(e,t,n){var s=Wi(e);return function o(){for(var a=arguments.length,u=r(a),l=a,d=is(o);l--;)u[l]=arguments[l];var c=a<3&&u[0]!==d&&u[a-1]!==d?[]:an(u,d);return(a-=c.length)<n?Ji(e,t,Di,o.placeholder,i,u,c,i,i,n-a):Ct(this&&this!==ct&&this instanceof o?s:e,this,u)}}(e,t,f):t!=u&&33!=t||d.length?Di.apply(i,w):function(e,t,n,i){var s=1&t,o=Wi(e);return function t(){for(var a=-1,u=arguments.length,l=-1,d=i.length,c=r(d+u),p=this&&this!==ct&&this instanceof t?o:e;++l<d;)c[l]=i[l];for(;u--;)c[l++]=arguments[++a];return Ct(p,s?n:this,c)}}(e,t,n,o);else var b=function(e,t,n){var r=1&t,i=Wi(e);return function t(){return(this&&this!==ct&&this instanceof t?i:e).apply(r?n:this,arguments)}}(e,t,n);return Os((v?Kr:Is)(b,w),e,t)}function Yi(e,t,n,r){return e===i||Fo(e,_e[n])&&!Pe.call(r,n)?t:e}function Qi(e,t,n,r,s,o){return Xo(e)&&Xo(t)&&(o.set(t,e),Fr(e,t,i,Qi,o),o.delete(t)),e}function Ki(e){return ra(e)?i:e}function Zi(e,t,n,r,s,o){var a=1&n,u=e.length,l=t.length;if(u!=l&&!(a&&l>u))return!1;var d=o.get(e),c=o.get(t);if(d&&c)return d==t&&c==e;var p=-1,f=!0,y=2&n?new Vn:i;for(o.set(e,t),o.set(t,e);++p<u;){var h=e[p],g=t[p];if(r)var m=a?r(g,h,p,t,e,o):r(h,g,p,e,t,o);if(m!==i){if(m)continue;f=!1;break}if(y){if(!Nt(t,(function(e,t){if(!Kt(y,t)&&(h===e||s(h,e,n,r,o)))return y.push(t)}))){f=!1;break}}else if(h!==g&&!s(h,g,n,r,o)){f=!1;break}}return o.delete(e),o.delete(t),f}function Xi(e){return Es(Cs(e,i,$s),e+"")}function es(e){return Sr(e,_a,ls)}function ts(e){return Sr(e,Ma,ds)}var ns=En?function(e){return En.get(e)}:au;function rs(e){for(var t=e.name+"",n=On[t],r=Pe.call(On,t)?n.length:0;r--;){var i=n[r],s=i.func;if(null==s||s==e)return i.name}return t}function is(e){return(Pe.call(xn,"placeholder")?xn:e).placeholder}function ss(){var e=xn.iteratee||ru;return e=e===ru?Pr:e,arguments.length?e(arguments[0],arguments[1]):e}function os(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function as(e){for(var t=_a(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,js(i)]}return t}function us(e,t){var n=function(e,t){return null==e?i:e[t]}(e,t);return Lr(n)?n:i}var ls=ht?function(e){return null==e?[]:(e=Ae(e),Et(ht(e),(function(t){return Ve.call(e,t)})))}:yu,ds=ht?function(e){for(var t=[];e;)Lt(t,ls(e)),e=Je(e);return t}:yu,cs=Cr;function ps(e,t,n){for(var r=-1,i=(t=gi(t,e)).length,s=!1;++r<i;){var o=Ns(t[r]);if(!(s=null!=e&&n(e,o)))break;e=e[o]}return s||++r!=i?s:!!(i=null==e?0:e.length)&&Zo(i)&&hs(o,i)&&($o(e)||Uo(e))}function fs(e){return"function"!=typeof e.constructor||bs(e)?{}:Fn(Je(e))}function ys(e){return $o(e)||Uo(e)||!!(Ge&&e&&e[Ge])}function hs(e,t){var n=typeof e;return!!(t=null==t?c:t)&&("number"==n||"symbol"!=n&&me.test(e))&&e>-1&&e%1==0&&e<t}function gs(e,t,n){if(!Xo(n))return!1;var r=typeof t;return!!("number"==r?Ho(n)&&hs(t,n.length):"string"==r&&t in n)&&Fo(n[t],e)}function ms(e,t){if($o(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!aa(e))||X.test(e)||!Z.test(e)||null!=t&&e in Ae(t)}function vs(e){var t=rs(e),n=xn[t];if("function"!=typeof n||!(t in Un.prototype))return!1;if(e===n)return!0;var r=ns(n);return!!r&&e===r[0]}(Sn&&cs(new Sn(new ArrayBuffer(1)))!=L||Cn&&cs(new Cn)!=S||An&&cs(An.resolve())!=R||Rn&&cs(new Rn)!=T||In&&cs(new In)!=_)&&(cs=function(e){var t=Cr(e),n=t==A?e.constructor:i,r=n?ks(n):"";if(r)switch(r){case _n:return L;case Mn:return S;case Ln:return R;case Pn:return T;case Wn:return _}return t});var ws=Me?Qo:hu;function bs(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||_e)}function js(e){return e==e&&!Xo(e)}function Ss(e,t){return function(n){return null!=n&&n[e]===t&&(t!==i||e in Ae(n))}}function Cs(e,t,n){return t=gn(t===i?e.length-1:t,0),function(){for(var i=arguments,s=-1,o=gn(i.length-t,0),a=r(o);++s<o;)a[s]=i[t+s];s=-1;for(var u=r(t+1);++s<t;)u[s]=i[s];return u[t]=n(a),Ct(e,this,u)}}function As(e,t){return t.length<2?e:jr(e,ei(t,0,-1))}function Rs(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Is=_s(Kr),Ts=dt||function(e,t){return ct.setTimeout(e,t)},Es=_s(Zr);function Os(e,t,n){var r=t+"";return Es(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(se,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Rt(y,(function(n){var r="_."+n[0];t&n[1]&&!Ot(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(oe);return t?t[1].split(ae):[]}(r),n)))}function _s(e){var t=0,n=0;return function(){var r=vn(),s=16-(r-n);if(n=r,s>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Ms(e,t){var n=-1,r=e.length,s=r-1;for(t=t===i?r:t;++n<t;){var o=Hr(n,s),a=e[o];e[o]=e[n],e[n]=a}return e.length=t,e}var Ls,Ps,Ws=(Ls=Po((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,(function(e,n,r,i){t.push(r?i.replace(de,"$1"):n||e)})),t}),(function(e){return 500===Ps.size&&Ps.clear(),e})),Ps=Ls.cache,Ls);function Ns(e){if("string"==typeof e||aa(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ks(e){if(null!=e){try{return Le.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Ds(e){if(e instanceof Un)return e.clone();var t=new qn(e.__wrapped__,e.__chain__);return t.__actions__=Ii(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var xs=zr((function(e,t){return Vo(e)?lr(e,hr(t,1,Vo,!0)):[]})),Fs=zr((function(e,t){var n=Gs(t);return Vo(n)&&(n=i),Vo(e)?lr(e,hr(t,1,Vo,!0),ss(n,2)):[]})),Bs=zr((function(e,t){var n=Gs(t);return Vo(n)&&(n=i),Vo(e)?lr(e,hr(t,1,Vo,!0),i,n):[]}));function qs(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:fa(n);return i<0&&(i=gn(r+i,0)),xt(e,ss(t,3),i)}function Us(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var s=r-1;return n!==i&&(s=fa(n),s=n<0?gn(r+s,0):mn(s,r-1)),xt(e,ss(t,3),s,!0)}function $s(e){return null!=e&&e.length?hr(e,1):[]}function Js(e){return e&&e.length?e[0]:i}var Hs=zr((function(e){var t=Mt(e,yi);return t.length&&t[0]===e[0]?Tr(t):[]})),Vs=zr((function(e){var t=Gs(e),n=Mt(e,yi);return t===Gs(n)?t=i:n.pop(),n.length&&n[0]===e[0]?Tr(n,ss(t,2)):[]})),zs=zr((function(e){var t=Gs(e),n=Mt(e,yi);return(t="function"==typeof t?t:i)&&n.pop(),n.length&&n[0]===e[0]?Tr(n,i,t):[]}));function Gs(e){var t=null==e?0:e.length;return t?e[t-1]:i}var Ys=zr(Qs);function Qs(e,t){return e&&e.length&&t&&t.length?$r(e,t):e}var Ks=Xi((function(e,t){var n=null==e?0:e.length,r=ir(e,t);return Jr(e,Mt(t,(function(e){return hs(e,n)?+e:e})).sort(Ci)),r}));function Zs(e){return null==e?e:jn.call(e)}var Xs=zr((function(e){return ai(hr(e,1,Vo,!0))})),eo=zr((function(e){var t=Gs(e);return Vo(t)&&(t=i),ai(hr(e,1,Vo,!0),ss(t,2))})),to=zr((function(e){var t=Gs(e);return t="function"==typeof t?t:i,ai(hr(e,1,Vo,!0),i,t)}));function no(e){if(!e||!e.length)return[];var t=0;return e=Et(e,(function(e){if(Vo(e))return t=gn(e.length,t),!0})),zt(t,(function(t){return Mt(e,$t(t))}))}function ro(e,t){if(!e||!e.length)return[];var n=no(e);return null==t?n:Mt(n,(function(e){return Ct(t,i,e)}))}var io=zr((function(e,t){return Vo(e)?lr(e,t):[]})),so=zr((function(e){return pi(Et(e,Vo))})),oo=zr((function(e){var t=Gs(e);return Vo(t)&&(t=i),pi(Et(e,Vo),ss(t,2))})),ao=zr((function(e){var t=Gs(e);return t="function"==typeof t?t:i,pi(Et(e,Vo),i,t)})),uo=zr(no),lo=zr((function(e){var t=e.length,n=t>1?e[t-1]:i;return n="function"==typeof n?(e.pop(),n):i,ro(e,n)}));function co(e){var t=xn(e);return t.__chain__=!0,t}function po(e,t){return t(e)}var fo=Xi((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,s=function(t){return ir(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Un&&hs(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:po,args:[s],thisArg:i}),new qn(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(i),e}))):this.thru(s)})),yo=Ei((function(e,t,n){Pe.call(e,n)?++e[n]:rr(e,n,1)})),ho=Ni(qs),go=Ni(Us);function mo(e,t){return($o(e)?Rt:dr)(e,ss(t,3))}function vo(e,t){return($o(e)?It:cr)(e,ss(t,3))}var wo=Ei((function(e,t,n){Pe.call(e,n)?e[n].push(t):rr(e,n,[t])})),bo=zr((function(e,t,n){var i=-1,s="function"==typeof t,o=Ho(e)?r(e.length):[];return dr(e,(function(e){o[++i]=s?Ct(t,e,n):Er(e,t,n)})),o})),jo=Ei((function(e,t,n){rr(e,n,t)}));function So(e,t){return($o(e)?Mt:kr)(e,ss(t,3))}var Co=Ei((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),Ao=zr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&gs(e,t[0],t[1])?t=[]:n>2&&gs(t[0],t[1],t[2])&&(t=[t[0]]),qr(e,hr(t,1),[])})),Ro=lt||function(){return ct.Date.now()};function Io(e,t,n){return t=n?i:t,t=e&&null==t?e.length:t,Gi(e,l,i,i,i,i,t)}function To(e,t){var n;if("function"!=typeof t)throw new Te(s);return e=fa(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=i),n}}var Eo=zr((function(e,t,n){var r=1;if(n.length){var i=an(n,is(Eo));r|=u}return Gi(e,r,t,n,i)})),Oo=zr((function(e,t,n){var r=3;if(n.length){var i=an(n,is(Oo));r|=u}return Gi(t,r,e,n,i)}));function _o(e,t,n){var r,o,a,u,l,d,c=0,p=!1,f=!1,y=!0;if("function"!=typeof e)throw new Te(s);function h(t){var n=r,s=o;return r=o=i,c=t,u=e.apply(s,n)}function g(e){var n=e-d;return d===i||n>=t||n<0||f&&e-c>=a}function m(){var e=Ro();if(g(e))return v(e);l=Ts(m,function(e){var n=t-(e-d);return f?mn(n,a-(e-c)):n}(e))}function v(e){return l=i,y&&r?h(e):(r=o=i,u)}function w(){var e=Ro(),n=g(e);if(r=arguments,o=this,d=e,n){if(l===i)return function(e){return c=e,l=Ts(m,t),p?h(e):u}(d);if(f)return wi(l),l=Ts(m,t),h(d)}return l===i&&(l=Ts(m,t)),u}return t=ha(t)||0,Xo(n)&&(p=!!n.leading,a=(f="maxWait"in n)?gn(ha(n.maxWait)||0,t):a,y="trailing"in n?!!n.trailing:y),w.cancel=function(){l!==i&&wi(l),c=0,r=d=o=l=i},w.flush=function(){return l===i?u:v(Ro())},w}var Mo=zr((function(e,t){return ur(e,1,t)})),Lo=zr((function(e,t,n){return ur(e,ha(t)||0,n)}));function Po(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Te(s);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var o=e.apply(this,r);return n.cache=s.set(i,o)||s,o};return n.cache=new(Po.Cache||Hn),n}function Wo(e){if("function"!=typeof e)throw new Te(s);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Po.Cache=Hn;var No=mi((function(e,t){var n=(t=1==t.length&&$o(t[0])?Mt(t[0],Yt(ss())):Mt(hr(t,1),Yt(ss()))).length;return zr((function(r){for(var i=-1,s=mn(r.length,n);++i<s;)r[i]=t[i].call(this,r[i]);return Ct(e,this,r)}))})),ko=zr((function(e,t){var n=an(t,is(ko));return Gi(e,u,i,t,n)})),Do=zr((function(e,t){var n=an(t,is(Do));return Gi(e,64,i,t,n)})),xo=Xi((function(e,t){return Gi(e,256,i,i,i,t)}));function Fo(e,t){return e===t||e!=e&&t!=t}var Bo=$i(Ar),qo=$i((function(e,t){return e>=t})),Uo=Or(function(){return arguments}())?Or:function(e){return ea(e)&&Pe.call(e,"callee")&&!Ve.call(e,"callee")},$o=r.isArray,Jo=mt?Yt(mt):function(e){return ea(e)&&Cr(e)==M};function Ho(e){return null!=e&&Zo(e.length)&&!Qo(e)}function Vo(e){return ea(e)&&Ho(e)}var zo=gt||hu,Go=vt?Yt(vt):function(e){return ea(e)&&Cr(e)==v};function Yo(e){if(!ea(e))return!1;var t=Cr(e);return t==w||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!ra(e)}function Qo(e){if(!Xo(e))return!1;var t=Cr(e);return t==b||t==j||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ko(e){return"number"==typeof e&&e==fa(e)}function Zo(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=c}function Xo(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ea(e){return null!=e&&"object"==typeof e}var ta=wt?Yt(wt):function(e){return ea(e)&&cs(e)==S};function na(e){return"number"==typeof e||ea(e)&&Cr(e)==C}function ra(e){if(!ea(e)||Cr(e)!=A)return!1;var t=Je(e);if(null===t)return!0;var n=Pe.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Le.call(n)==De}var ia=bt?Yt(bt):function(e){return ea(e)&&Cr(e)==I},sa=jt?Yt(jt):function(e){return ea(e)&&cs(e)==T};function oa(e){return"string"==typeof e||!$o(e)&&ea(e)&&Cr(e)==E}function aa(e){return"symbol"==typeof e||ea(e)&&Cr(e)==O}var ua=St?Yt(St):function(e){return ea(e)&&Zo(e.length)&&!!it[Cr(e)]},la=$i(Nr),da=$i((function(e,t){return e<=t}));function ca(e){if(!e)return[];if(Ho(e))return oa(e)?cn(e):Ii(e);if(Ye&&e[Ye])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Ye]());var t=cs(e);return(t==S?sn:t==T?un:Fa)(e)}function pa(e){return e?(e=ha(e))===d||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function fa(e){var t=pa(e),n=t%1;return t==t?n?t-n:t:0}function ya(e){return e?sr(fa(e),0,f):0}function ha(e){if("number"==typeof e)return e;if(aa(e))return p;if(Xo(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Xo(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Gt(e);var n=ye.test(e);return n||ge.test(e)?ut(e.slice(2),n?2:8):fe.test(e)?p:+e}function ga(e){return Ti(e,Ma(e))}function ma(e){return null==e?"":oi(e)}var va=Oi((function(e,t){if(bs(t)||Ho(t))Ti(t,_a(t),e);else for(var n in t)Pe.call(t,n)&&Xn(e,n,t[n])})),wa=Oi((function(e,t){Ti(t,Ma(t),e)})),ba=Oi((function(e,t,n,r){Ti(t,Ma(t),e,r)})),ja=Oi((function(e,t,n,r){Ti(t,_a(t),e,r)})),Sa=Xi(ir),Ca=zr((function(e,t){e=Ae(e);var n=-1,r=t.length,s=r>2?t[2]:i;for(s&&gs(t[0],t[1],s)&&(r=1);++n<r;)for(var o=t[n],a=Ma(o),u=-1,l=a.length;++u<l;){var d=a[u],c=e[d];(c===i||Fo(c,_e[d])&&!Pe.call(e,d))&&(e[d]=o[d])}return e})),Aa=zr((function(e){return e.push(i,Qi),Ct(Pa,i,e)}));function Ra(e,t,n){var r=null==e?i:jr(e,t);return r===i?n:r}function Ia(e,t){return null!=e&&ps(e,t,Ir)}var Ta=xi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=ke.call(t)),e[t]=n}),Xa(nu)),Ea=xi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=ke.call(t)),Pe.call(e,t)?e[t].push(n):e[t]=[n]}),ss),Oa=zr(Er);function _a(e){return Ho(e)?Gn(e):Wr(e)}function Ma(e){return Ho(e)?Gn(e,!0):function(e){if(!Xo(e))return function(e){var t=[];if(null!=e)for(var n in Ae(e))t.push(n);return t}(e);var t=bs(e),n=[];for(var r in e)("constructor"!=r||!t&&Pe.call(e,r))&&n.push(r);return n}(e)}var La=Oi((function(e,t,n){Fr(e,t,n)})),Pa=Oi((function(e,t,n,r){Fr(e,t,n,r)})),Wa=Xi((function(e,t){var n={};if(null==e)return n;var r=!1;t=Mt(t,(function(t){return t=gi(t,e),r||(r=t.length>1),t})),Ti(e,ts(e),n),r&&(n=or(n,7,Ki));for(var i=t.length;i--;)ui(n,t[i]);return n})),Na=Xi((function(e,t){return null==e?{}:function(e,t){return Ur(e,t,(function(t,n){return Ia(e,n)}))}(e,t)}));function ka(e,t){if(null==e)return{};var n=Mt(ts(e),(function(e){return[e]}));return t=ss(t),Ur(e,n,(function(e,n){return t(e,n[0])}))}var Da=zi(_a),xa=zi(Ma);function Fa(e){return null==e?[]:Qt(e,_a(e))}var Ba=Pi((function(e,t,n){return t=t.toLowerCase(),e+(n?qa(t):t)}));function qa(e){return Ya(ma(e).toLowerCase())}function Ua(e){return(e=ma(e))&&e.replace(ve,en).replace(Ke,"")}var $a=Pi((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Ja=Pi((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Ha=Li("toLowerCase"),Va=Pi((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),za=Pi((function(e,t,n){return e+(n?" ":"")+Ya(t)})),Ga=Pi((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Ya=Li("toUpperCase");function Qa(e,t,n){return e=ma(e),(t=n?i:t)===i?function(e){return tt.test(e)}(e)?function(e){return e.match(Xe)||[]}(e):function(e){return e.match(ue)||[]}(e):e.match(t)||[]}var Ka=zr((function(e,t){try{return Ct(e,i,t)}catch(e){return Yo(e)?e:new je(e)}})),Za=Xi((function(e,t){return Rt(t,(function(t){t=Ns(t),rr(e,t,Eo(e[t],e))})),e}));function Xa(e){return function(){return e}}var eu=ki(),tu=ki(!0);function nu(e){return e}function ru(e){return Pr("function"==typeof e?e:or(e,1))}var iu=zr((function(e,t){return function(n){return Er(n,e,t)}})),su=zr((function(e,t){return function(n){return Er(e,n,t)}}));function ou(e,t,n){var r=_a(t),i=br(t,r);null!=n||Xo(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=br(t,_a(t)));var s=!(Xo(n)&&"chain"in n&&!n.chain),o=Qo(e);return Rt(i,(function(n){var r=t[n];e[n]=r,o&&(e.prototype[n]=function(){var t=this.__chain__;if(s||t){var n=e(this.__wrapped__);return(n.__actions__=Ii(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Lt([this.value()],arguments))})})),e}function au(){}var uu=Bi(Mt),lu=Bi(Tt),du=Bi(Nt);function cu(e){return ms(e)?$t(Ns(e)):function(e){return function(t){return jr(t,e)}}(e)}var pu=Ui(),fu=Ui(!0);function yu(){return[]}function hu(){return!1}var gu,mu=Fi((function(e,t){return e+t}),0),vu=Hi("ceil"),wu=Fi((function(e,t){return e/t}),1),bu=Hi("floor"),ju=Fi((function(e,t){return e*t}),1),Su=Hi("round"),Cu=Fi((function(e,t){return e-t}),0);return xn.after=function(e,t){if("function"!=typeof t)throw new Te(s);return e=fa(e),function(){if(--e<1)return t.apply(this,arguments)}},xn.ary=Io,xn.assign=va,xn.assignIn=wa,xn.assignInWith=ba,xn.assignWith=ja,xn.at=Sa,xn.before=To,xn.bind=Eo,xn.bindAll=Za,xn.bindKey=Oo,xn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return $o(e)?e:[e]},xn.chain=co,xn.chunk=function(e,t,n){t=(n?gs(e,t,n):t===i)?1:gn(fa(t),0);var s=null==e?0:e.length;if(!s||t<1)return[];for(var o=0,a=0,u=r(pt(s/t));o<s;)u[a++]=ei(e,o,o+=t);return u},xn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var s=e[t];s&&(i[r++]=s)}return i},xn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=r(e-1),n=arguments[0],i=e;i--;)t[i-1]=arguments[i];return Lt($o(n)?Ii(n):[n],hr(t,1))},xn.cond=function(e){var t=null==e?0:e.length,n=ss();return e=t?Mt(e,(function(e){if("function"!=typeof e[1])throw new Te(s);return[n(e[0]),e[1]]})):[],zr((function(n){for(var r=-1;++r<t;){var i=e[r];if(Ct(i[0],this,n))return Ct(i[1],this,n)}}))},xn.conforms=function(e){return function(e){var t=_a(e);return function(n){return ar(n,e,t)}}(or(e,1))},xn.constant=Xa,xn.countBy=yo,xn.create=function(e,t){var n=Fn(e);return null==t?n:nr(n,t)},xn.curry=function e(t,n,r){var s=Gi(t,8,i,i,i,i,i,n=r?i:n);return s.placeholder=e.placeholder,s},xn.curryRight=function e(t,n,r){var s=Gi(t,16,i,i,i,i,i,n=r?i:n);return s.placeholder=e.placeholder,s},xn.debounce=_o,xn.defaults=Ca,xn.defaultsDeep=Aa,xn.defer=Mo,xn.delay=Lo,xn.difference=xs,xn.differenceBy=Fs,xn.differenceWith=Bs,xn.drop=function(e,t,n){var r=null==e?0:e.length;return r?ei(e,(t=n||t===i?1:fa(t))<0?0:t,r):[]},xn.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?ei(e,0,(t=r-(t=n||t===i?1:fa(t)))<0?0:t):[]},xn.dropRightWhile=function(e,t){return e&&e.length?di(e,ss(t,3),!0,!0):[]},xn.dropWhile=function(e,t){return e&&e.length?di(e,ss(t,3),!0):[]},xn.fill=function(e,t,n,r){var s=null==e?0:e.length;return s?(n&&"number"!=typeof n&&gs(e,t,n)&&(n=0,r=s),function(e,t,n,r){var s=e.length;for((n=fa(n))<0&&(n=-n>s?0:s+n),(r=r===i||r>s?s:fa(r))<0&&(r+=s),r=n>r?0:ya(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},xn.filter=function(e,t){return($o(e)?Et:yr)(e,ss(t,3))},xn.flatMap=function(e,t){return hr(So(e,t),1)},xn.flatMapDeep=function(e,t){return hr(So(e,t),d)},xn.flatMapDepth=function(e,t,n){return n=n===i?1:fa(n),hr(So(e,t),n)},xn.flatten=$s,xn.flattenDeep=function(e){return null!=e&&e.length?hr(e,d):[]},xn.flattenDepth=function(e,t){return null!=e&&e.length?hr(e,t=t===i?1:fa(t)):[]},xn.flip=function(e){return Gi(e,512)},xn.flow=eu,xn.flowRight=tu,xn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},xn.functions=function(e){return null==e?[]:br(e,_a(e))},xn.functionsIn=function(e){return null==e?[]:br(e,Ma(e))},xn.groupBy=wo,xn.initial=function(e){return null!=e&&e.length?ei(e,0,-1):[]},xn.intersection=Hs,xn.intersectionBy=Vs,xn.intersectionWith=zs,xn.invert=Ta,xn.invertBy=Ea,xn.invokeMap=bo,xn.iteratee=ru,xn.keyBy=jo,xn.keys=_a,xn.keysIn=Ma,xn.map=So,xn.mapKeys=function(e,t){var n={};return t=ss(t,3),vr(e,(function(e,r,i){rr(n,t(e,r,i),e)})),n},xn.mapValues=function(e,t){var n={};return t=ss(t,3),vr(e,(function(e,r,i){rr(n,r,t(e,r,i))})),n},xn.matches=function(e){return Dr(or(e,1))},xn.matchesProperty=function(e,t){return xr(e,or(t,1))},xn.memoize=Po,xn.merge=La,xn.mergeWith=Pa,xn.method=iu,xn.methodOf=su,xn.mixin=ou,xn.negate=Wo,xn.nthArg=function(e){return e=fa(e),zr((function(t){return Br(t,e)}))},xn.omit=Wa,xn.omitBy=function(e,t){return ka(e,Wo(ss(t)))},xn.once=function(e){return To(2,e)},xn.orderBy=function(e,t,n,r){return null==e?[]:($o(t)||(t=null==t?[]:[t]),$o(n=r?i:n)||(n=null==n?[]:[n]),qr(e,t,n))},xn.over=uu,xn.overArgs=No,xn.overEvery=lu,xn.overSome=du,xn.partial=ko,xn.partialRight=Do,xn.partition=Co,xn.pick=Na,xn.pickBy=ka,xn.property=cu,xn.propertyOf=function(e){return function(t){return null==e?i:jr(e,t)}},xn.pull=Ys,xn.pullAll=Qs,xn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?$r(e,t,ss(n,2)):e},xn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?$r(e,t,i,n):e},xn.pullAt=Ks,xn.range=pu,xn.rangeRight=fu,xn.rearg=xo,xn.reject=function(e,t){return($o(e)?Et:yr)(e,Wo(ss(t,3)))},xn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],s=e.length;for(t=ss(t,3);++r<s;){var o=e[r];t(o,r,e)&&(n.push(o),i.push(r))}return Jr(e,i),n},xn.rest=function(e,t){if("function"!=typeof e)throw new Te(s);return zr(e,t=t===i?t:fa(t))},xn.reverse=Zs,xn.sampleSize=function(e,t,n){return t=(n?gs(e,t,n):t===i)?1:fa(t),($o(e)?Qn:Yr)(e,t)},xn.set=function(e,t,n){return null==e?e:Qr(e,t,n)},xn.setWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:Qr(e,t,n,r)},xn.shuffle=function(e){return($o(e)?Kn:Xr)(e)},xn.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&gs(e,t,n)?(t=0,n=r):(t=null==t?0:fa(t),n=n===i?r:fa(n)),ei(e,t,n)):[]},xn.sortBy=Ao,xn.sortedUniq=function(e){return e&&e.length?ii(e):[]},xn.sortedUniqBy=function(e,t){return e&&e.length?ii(e,ss(t,2)):[]},xn.split=function(e,t,n){return n&&"number"!=typeof n&&gs(e,t,n)&&(t=n=i),(n=n===i?f:n>>>0)?(e=ma(e))&&("string"==typeof t||null!=t&&!ia(t))&&!(t=oi(t))&&rn(e)?vi(cn(e),0,n):e.split(t,n):[]},xn.spread=function(e,t){if("function"!=typeof e)throw new Te(s);return t=null==t?0:gn(fa(t),0),zr((function(n){var r=n[t],i=vi(n,0,t);return r&&Lt(i,r),Ct(e,this,i)}))},xn.tail=function(e){var t=null==e?0:e.length;return t?ei(e,1,t):[]},xn.take=function(e,t,n){return e&&e.length?ei(e,0,(t=n||t===i?1:fa(t))<0?0:t):[]},xn.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?ei(e,(t=r-(t=n||t===i?1:fa(t)))<0?0:t,r):[]},xn.takeRightWhile=function(e,t){return e&&e.length?di(e,ss(t,3),!1,!0):[]},xn.takeWhile=function(e,t){return e&&e.length?di(e,ss(t,3)):[]},xn.tap=function(e,t){return t(e),e},xn.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new Te(s);return Xo(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),_o(e,t,{leading:r,maxWait:t,trailing:i})},xn.thru=po,xn.toArray=ca,xn.toPairs=Da,xn.toPairsIn=xa,xn.toPath=function(e){return $o(e)?Mt(e,Ns):aa(e)?[e]:Ii(Ws(ma(e)))},xn.toPlainObject=ga,xn.transform=function(e,t,n){var r=$o(e),i=r||zo(e)||ua(e);if(t=ss(t,4),null==n){var s=e&&e.constructor;n=i?r?new s:[]:Xo(e)&&Qo(s)?Fn(Je(e)):{}}return(i?Rt:vr)(e,(function(e,r,i){return t(n,e,r,i)})),n},xn.unary=function(e){return Io(e,1)},xn.union=Xs,xn.unionBy=eo,xn.unionWith=to,xn.uniq=function(e){return e&&e.length?ai(e):[]},xn.uniqBy=function(e,t){return e&&e.length?ai(e,ss(t,2)):[]},xn.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?ai(e,i,t):[]},xn.unset=function(e,t){return null==e||ui(e,t)},xn.unzip=no,xn.unzipWith=ro,xn.update=function(e,t,n){return null==e?e:li(e,t,hi(n))},xn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:li(e,t,hi(n),r)},xn.values=Fa,xn.valuesIn=function(e){return null==e?[]:Qt(e,Ma(e))},xn.without=io,xn.words=Qa,xn.wrap=function(e,t){return ko(hi(t),e)},xn.xor=so,xn.xorBy=oo,xn.xorWith=ao,xn.zip=uo,xn.zipObject=function(e,t){return fi(e||[],t||[],Xn)},xn.zipObjectDeep=function(e,t){return fi(e||[],t||[],Qr)},xn.zipWith=lo,xn.entries=Da,xn.entriesIn=xa,xn.extend=wa,xn.extendWith=ba,ou(xn,xn),xn.add=mu,xn.attempt=Ka,xn.camelCase=Ba,xn.capitalize=qa,xn.ceil=vu,xn.clamp=function(e,t,n){return n===i&&(n=t,t=i),n!==i&&(n=(n=ha(n))==n?n:0),t!==i&&(t=(t=ha(t))==t?t:0),sr(ha(e),t,n)},xn.clone=function(e){return or(e,4)},xn.cloneDeep=function(e){return or(e,5)},xn.cloneDeepWith=function(e,t){return or(e,5,t="function"==typeof t?t:i)},xn.cloneWith=function(e,t){return or(e,4,t="function"==typeof t?t:i)},xn.conformsTo=function(e,t){return null==t||ar(e,t,_a(t))},xn.deburr=Ua,xn.defaultTo=function(e,t){return null==e||e!=e?t:e},xn.divide=wu,xn.endsWith=function(e,t,n){e=ma(e),t=oi(t);var r=e.length,s=n=n===i?r:sr(fa(n),0,r);return(n-=t.length)>=0&&e.slice(n,s)==t},xn.eq=Fo,xn.escape=function(e){return(e=ma(e))&&G.test(e)?e.replace(V,tn):e},xn.escapeRegExp=function(e){return(e=ma(e))&&ne.test(e)?e.replace(te,"\\$&"):e},xn.every=function(e,t,n){var r=$o(e)?Tt:pr;return n&&gs(e,t,n)&&(t=i),r(e,ss(t,3))},xn.find=ho,xn.findIndex=qs,xn.findKey=function(e,t){return Dt(e,ss(t,3),vr)},xn.findLast=go,xn.findLastIndex=Us,xn.findLastKey=function(e,t){return Dt(e,ss(t,3),wr)},xn.floor=bu,xn.forEach=mo,xn.forEachRight=vo,xn.forIn=function(e,t){return null==e?e:gr(e,ss(t,3),Ma)},xn.forInRight=function(e,t){return null==e?e:mr(e,ss(t,3),Ma)},xn.forOwn=function(e,t){return e&&vr(e,ss(t,3))},xn.forOwnRight=function(e,t){return e&&wr(e,ss(t,3))},xn.get=Ra,xn.gt=Bo,xn.gte=qo,xn.has=function(e,t){return null!=e&&ps(e,t,Rr)},xn.hasIn=Ia,xn.head=Js,xn.identity=nu,xn.includes=function(e,t,n,r){e=Ho(e)?e:Fa(e),n=n&&!r?fa(n):0;var i=e.length;return n<0&&(n=gn(i+n,0)),oa(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Ft(e,t,n)>-1},xn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:fa(n);return i<0&&(i=gn(r+i,0)),Ft(e,t,i)},xn.inRange=function(e,t,n){return t=pa(t),n===i?(n=t,t=0):n=pa(n),function(e,t,n){return e>=mn(t,n)&&e<gn(t,n)}(e=ha(e),t,n)},xn.invoke=Oa,xn.isArguments=Uo,xn.isArray=$o,xn.isArrayBuffer=Jo,xn.isArrayLike=Ho,xn.isArrayLikeObject=Vo,xn.isBoolean=function(e){return!0===e||!1===e||ea(e)&&Cr(e)==m},xn.isBuffer=zo,xn.isDate=Go,xn.isElement=function(e){return ea(e)&&1===e.nodeType&&!ra(e)},xn.isEmpty=function(e){if(null==e)return!0;if(Ho(e)&&($o(e)||"string"==typeof e||"function"==typeof e.splice||zo(e)||ua(e)||Uo(e)))return!e.length;var t=cs(e);if(t==S||t==T)return!e.size;if(bs(e))return!Wr(e).length;for(var n in e)if(Pe.call(e,n))return!1;return!0},xn.isEqual=function(e,t){return _r(e,t)},xn.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:i)?n(e,t):i;return r===i?_r(e,t,i,n):!!r},xn.isError=Yo,xn.isFinite=function(e){return"number"==typeof e&&kt(e)},xn.isFunction=Qo,xn.isInteger=Ko,xn.isLength=Zo,xn.isMap=ta,xn.isMatch=function(e,t){return e===t||Mr(e,t,as(t))},xn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:i,Mr(e,t,as(t),n)},xn.isNaN=function(e){return na(e)&&e!=+e},xn.isNative=function(e){if(ws(e))throw new je("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Lr(e)},xn.isNil=function(e){return null==e},xn.isNull=function(e){return null===e},xn.isNumber=na,xn.isObject=Xo,xn.isObjectLike=ea,xn.isPlainObject=ra,xn.isRegExp=ia,xn.isSafeInteger=function(e){return Ko(e)&&e>=-9007199254740991&&e<=c},xn.isSet=sa,xn.isString=oa,xn.isSymbol=aa,xn.isTypedArray=ua,xn.isUndefined=function(e){return e===i},xn.isWeakMap=function(e){return ea(e)&&cs(e)==_},xn.isWeakSet=function(e){return ea(e)&&"[object WeakSet]"==Cr(e)},xn.join=function(e,t){return null==e?"":Jt.call(e,t)},xn.kebabCase=$a,xn.last=Gs,xn.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var s=r;return n!==i&&(s=(s=fa(n))<0?gn(r+s,0):mn(s,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,s):xt(e,qt,s,!0)},xn.lowerCase=Ja,xn.lowerFirst=Ha,xn.lt=la,xn.lte=da,xn.max=function(e){return e&&e.length?fr(e,nu,Ar):i},xn.maxBy=function(e,t){return e&&e.length?fr(e,ss(t,2),Ar):i},xn.mean=function(e){return Ut(e,nu)},xn.meanBy=function(e,t){return Ut(e,ss(t,2))},xn.min=function(e){return e&&e.length?fr(e,nu,Nr):i},xn.minBy=function(e,t){return e&&e.length?fr(e,ss(t,2),Nr):i},xn.stubArray=yu,xn.stubFalse=hu,xn.stubObject=function(){return{}},xn.stubString=function(){return""},xn.stubTrue=function(){return!0},xn.multiply=ju,xn.nth=function(e,t){return e&&e.length?Br(e,fa(t)):i},xn.noConflict=function(){return ct._===this&&(ct._=xe),this},xn.noop=au,xn.now=Ro,xn.pad=function(e,t,n){e=ma(e);var r=(t=fa(t))?dn(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return qi(ft(i),n)+e+qi(pt(i),n)},xn.padEnd=function(e,t,n){e=ma(e);var r=(t=fa(t))?dn(e):0;return t&&r<t?e+qi(t-r,n):e},xn.padStart=function(e,t,n){e=ma(e);var r=(t=fa(t))?dn(e):0;return t&&r<t?qi(t-r,n)+e:e},xn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),wn(ma(e).replace(re,""),t||0)},xn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&gs(e,t,n)&&(t=n=i),n===i&&("boolean"==typeof t?(n=t,t=i):"boolean"==typeof e&&(n=e,e=i)),e===i&&t===i?(e=0,t=1):(e=pa(e),t===i?(t=e,e=0):t=pa(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var s=bn();return mn(e+s*(t-e+at("1e-"+((s+"").length-1))),t)}return Hr(e,t)},xn.reduce=function(e,t,n){var r=$o(e)?Pt:Ht,i=arguments.length<3;return r(e,ss(t,4),n,i,dr)},xn.reduceRight=function(e,t,n){var r=$o(e)?Wt:Ht,i=arguments.length<3;return r(e,ss(t,4),n,i,cr)},xn.repeat=function(e,t,n){return t=(n?gs(e,t,n):t===i)?1:fa(t),Vr(ma(e),t)},xn.replace=function(){var e=arguments,t=ma(e[0]);return e.length<3?t:t.replace(e[1],e[2])},xn.result=function(e,t,n){var r=-1,s=(t=gi(t,e)).length;for(s||(s=1,e=i);++r<s;){var o=null==e?i:e[Ns(t[r])];o===i&&(r=s,o=n),e=Qo(o)?o.call(e):o}return e},xn.round=Su,xn.runInContext=e,xn.sample=function(e){return($o(e)?Yn:Gr)(e)},xn.size=function(e){if(null==e)return 0;if(Ho(e))return oa(e)?dn(e):e.length;var t=cs(e);return t==S||t==T?e.size:Wr(e).length},xn.snakeCase=Va,xn.some=function(e,t,n){var r=$o(e)?Nt:ti;return n&&gs(e,t,n)&&(t=i),r(e,ss(t,3))},xn.sortedIndex=function(e,t){return ni(e,t)},xn.sortedIndexBy=function(e,t,n){return ri(e,t,ss(n,2))},xn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=ni(e,t);if(r<n&&Fo(e[r],t))return r}return-1},xn.sortedLastIndex=function(e,t){return ni(e,t,!0)},xn.sortedLastIndexBy=function(e,t,n){return ri(e,t,ss(n,2),!0)},xn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=ni(e,t,!0)-1;if(Fo(e[n],t))return n}return-1},xn.startCase=za,xn.startsWith=function(e,t,n){return e=ma(e),n=null==n?0:sr(fa(n),0,e.length),t=oi(t),e.slice(n,n+t.length)==t},xn.subtract=Cu,xn.sum=function(e){return e&&e.length?Vt(e,nu):0},xn.sumBy=function(e,t){return e&&e.length?Vt(e,ss(t,2)):0},xn.template=function(e,t,n){var r=xn.templateSettings;n&&gs(e,t,n)&&(t=i),e=ma(e),t=ba({},t,r,Yi);var s,o,a=ba({},t.imports,r.imports,Yi),u=_a(a),l=Qt(a,u),d=0,c=t.interpolate||we,p="__p += '",f=Re((t.escape||we).source+"|"+c.source+"|"+(c===K?ce:we).source+"|"+(t.evaluate||we).source+"|$","g"),y="//# sourceURL="+(Pe.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++rt+"]")+"\n";e.replace(f,(function(t,n,r,i,a,u){return r||(r=i),p+=e.slice(d,u).replace(be,nn),n&&(s=!0,p+="' +\n__e("+n+") +\n'"),a&&(o=!0,p+="';\n"+a+";\n__p += '"),r&&(p+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),d=u+t.length,t})),p+="';\n";var h=Pe.call(t,"variable")&&t.variable;if(h){if(le.test(h))throw new je("Invalid `variable` option passed into `_.template`")}else p="with (obj) {\n"+p+"\n}\n";p=(o?p.replace(U,""):p).replace($,"$1").replace(J,"$1;"),p="function("+(h||"obj")+") {\n"+(h?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(s?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var g=Ka((function(){return Se(u,y+"return "+p).apply(i,l)}));if(g.source=p,Yo(g))throw g;return g},xn.times=function(e,t){if((e=fa(e))<1||e>c)return[];var n=f,r=mn(e,f);t=ss(t),e-=f;for(var i=zt(r,t);++n<e;)t(n);return i},xn.toFinite=pa,xn.toInteger=fa,xn.toLength=ya,xn.toLower=function(e){return ma(e).toLowerCase()},xn.toNumber=ha,xn.toSafeInteger=function(e){return e?sr(fa(e),-9007199254740991,c):0===e?e:0},xn.toString=ma,xn.toUpper=function(e){return ma(e).toUpperCase()},xn.trim=function(e,t,n){if((e=ma(e))&&(n||t===i))return Gt(e);if(!e||!(t=oi(t)))return e;var r=cn(e),s=cn(t);return vi(r,Zt(r,s),Xt(r,s)+1).join("")},xn.trimEnd=function(e,t,n){if((e=ma(e))&&(n||t===i))return e.slice(0,pn(e)+1);if(!e||!(t=oi(t)))return e;var r=cn(e);return vi(r,0,Xt(r,cn(t))+1).join("")},xn.trimStart=function(e,t,n){if((e=ma(e))&&(n||t===i))return e.replace(re,"");if(!e||!(t=oi(t)))return e;var r=cn(e);return vi(r,Zt(r,cn(t))).join("")},xn.truncate=function(e,t){var n=30,r="...";if(Xo(t)){var s="separator"in t?t.separator:s;n="length"in t?fa(t.length):n,r="omission"in t?oi(t.omission):r}var o=(e=ma(e)).length;if(rn(e)){var a=cn(e);o=a.length}if(n>=o)return e;var u=n-dn(r);if(u<1)return r;var l=a?vi(a,0,u).join(""):e.slice(0,u);if(s===i)return l+r;if(a&&(u+=l.length-u),ia(s)){if(e.slice(u).search(s)){var d,c=l;for(s.global||(s=Re(s.source,ma(pe.exec(s))+"g")),s.lastIndex=0;d=s.exec(c);)var p=d.index;l=l.slice(0,p===i?u:p)}}else if(e.indexOf(oi(s),u)!=u){var f=l.lastIndexOf(s);f>-1&&(l=l.slice(0,f))}return l+r},xn.unescape=function(e){return(e=ma(e))&&z.test(e)?e.replace(H,fn):e},xn.uniqueId=function(e){var t=++We;return ma(e)+t},xn.upperCase=Ga,xn.upperFirst=Ya,xn.each=mo,xn.eachRight=vo,xn.first=Js,ou(xn,(gu={},vr(xn,(function(e,t){Pe.call(xn.prototype,t)||(gu[t]=e)})),gu),{chain:!1}),xn.VERSION="4.17.21",Rt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){xn[e].placeholder=xn})),Rt(["drop","take"],(function(e,t){Un.prototype[e]=function(n){n=n===i?1:gn(fa(n),0);var r=this.__filtered__&&!t?new Un(this):this.clone();return r.__filtered__?r.__takeCount__=mn(n,r.__takeCount__):r.__views__.push({size:mn(n,f),type:e+(r.__dir__<0?"Right":"")}),r},Un.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Rt(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Un.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ss(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),Rt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Un.prototype[e]=function(){return this[n](1).value()[0]}})),Rt(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Un.prototype[e]=function(){return this.__filtered__?new Un(this):this[n](1)}})),Un.prototype.compact=function(){return this.filter(nu)},Un.prototype.find=function(e){return this.filter(e).head()},Un.prototype.findLast=function(e){return this.reverse().find(e)},Un.prototype.invokeMap=zr((function(e,t){return"function"==typeof e?new Un(this):this.map((function(n){return Er(n,e,t)}))})),Un.prototype.reject=function(e){return this.filter(Wo(ss(e)))},Un.prototype.slice=function(e,t){e=fa(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Un(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==i&&(n=(t=fa(t))<0?n.dropRight(-t):n.take(t-e)),n)},Un.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Un.prototype.toArray=function(){return this.take(f)},vr(Un.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),s=xn[r?"take"+("last"==t?"Right":""):t],o=r||/^find/.test(t);s&&(xn.prototype[t]=function(){var t=this.__wrapped__,a=r?[1]:arguments,u=t instanceof Un,l=a[0],d=u||$o(t),c=function(e){var t=s.apply(xn,Lt([e],a));return r&&p?t[0]:t};d&&n&&"function"==typeof l&&1!=l.length&&(u=d=!1);var p=this.__chain__,f=!!this.__actions__.length,y=o&&!p,h=u&&!f;if(!o&&d){t=h?t:new Un(this);var g=e.apply(t,a);return g.__actions__.push({func:po,args:[c],thisArg:i}),new qn(g,p)}return y&&h?e.apply(this,a):(g=this.thru(c),y?r?g.value()[0]:g.value():g)})})),Rt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Ee[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);xn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply($o(i)?i:[],e)}return this[n]((function(n){return t.apply($o(n)?n:[],e)}))}})),vr(Un.prototype,(function(e,t){var n=xn[t];if(n){var r=n.name+"";Pe.call(On,r)||(On[r]=[]),On[r].push({name:t,func:n})}})),On[Di(i,2).name]=[{name:"wrapper",func:i}],Un.prototype.clone=function(){var e=new Un(this.__wrapped__);return e.__actions__=Ii(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ii(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ii(this.__views__),e},Un.prototype.reverse=function(){if(this.__filtered__){var e=new Un(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Un.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=$o(e),r=t<0,i=n?e.length:0,s=function(e,t,n){for(var r=-1,i=n.length;++r<i;){var s=n[r],o=s.size;switch(s.type){case"drop":e+=o;break;case"dropRight":t-=o;break;case"take":t=mn(t,e+o);break;case"takeRight":e=gn(e,t-o)}}return{start:e,end:t}}(0,i,this.__views__),o=s.start,a=s.end,u=a-o,l=r?a:o-1,d=this.__iteratees__,c=d.length,p=0,f=mn(u,this.__takeCount__);if(!n||!r&&i==u&&f==u)return ci(e,this.__actions__);var y=[];e:for(;u--&&p<f;){for(var h=-1,g=e[l+=t];++h<c;){var m=d[h],v=m.iteratee,w=m.type,b=v(g);if(2==w)g=b;else if(!b){if(1==w)continue e;break e}}y[p++]=g}return y},xn.prototype.at=fo,xn.prototype.chain=function(){return co(this)},xn.prototype.commit=function(){return new qn(this.value(),this.__chain__)},xn.prototype.next=function(){this.__values__===i&&(this.__values__=ca(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},xn.prototype.plant=function(e){for(var t,n=this;n instanceof Bn;){var r=Ds(n);r.__index__=0,r.__values__=i,t?s.__wrapped__=r:t=r;var s=r;n=n.__wrapped__}return s.__wrapped__=e,t},xn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Un){var t=e;return this.__actions__.length&&(t=new Un(this)),(t=t.reverse()).__actions__.push({func:po,args:[Zs],thisArg:i}),new qn(t,this.__chain__)}return this.thru(Zs)},xn.prototype.toJSON=xn.prototype.valueOf=xn.prototype.value=function(){return ci(this.__wrapped__,this.__actions__)},xn.prototype.first=xn.prototype.head,Ye&&(xn.prototype[Ye]=function(){return this}),xn}();ct._=yn,(r=function(){return yn}.call(t,n,t,e))===i||(e.exports=r)}.call(this)},50104:(e,t,n)=>{var r=n(53661);function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var o=e.apply(this,r);return n.cache=s.set(i,o)||s,o};return n.cache=new(i.Cache||r),n}i.Cache=r,e.exports=i},10124:(e,t,n)=>{var r=n(9325);e.exports=function(){return r.Date.now()}},44383:(e,t,n)=>{var r=n(76001),i=n(38816)((function(e,t){return null==e?{}:r(e,t)}));e.exports=i},63345:e=>{e.exports=function(){return[]}},89935:e=>{e.exports=function(){return!1}},7350:(e,t,n)=>{var r=n(38221),i=n(23805);e.exports=function(e,t,n){var s=!0,o=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return i(n)&&(s="leading"in n?!!n.leading:s,o="trailing"in n?!!n.trailing:o),r(e,t,{leading:s,maxWait:t,trailing:o})}},99374:(e,t,n)=>{var r=n(54128),i=n(23805),s=n(44394),o=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(s(e))return NaN;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=a.test(e);return n||u.test(e)?l(e.slice(2),n?2:8):o.test(e)?NaN:+e}},13222:(e,t,n)=>{var r=n(77556);e.exports=function(e){return null==e?"":r(e)}},90165:(e,t,n)=>{"use strict";const r=n(4693);e.exports=e=>{if(!Number.isInteger(e)&&e!==1/0||!(e>0))throw new TypeError("Expected `concurrency` to be a number from 1 and up");const t=new r;let n=0;const i=async(e,r,...i)=>{n++;const s=(async()=>e(...i))();r(s);try{await s}catch{}n--,t.size>0&&t.dequeue()()},s=(r,...s)=>new Promise((o=>{((r,s,...o)=>{t.enqueue(i.bind(null,r,s,...o)),(async()=>{await Promise.resolve(),n<e&&t.size>0&&t.dequeue()()})()})(r,o,...s)}));return Object.defineProperties(s,{activeCount:{get:()=>n},pendingCount:{get:()=>t.size},clearQueue:{value:()=>{t.clear()}}}),s}},84342:(e,t,n)=>{"use strict";!function(){var t,r,i,s=0,o=[];for(r=0;r<256;r++)o[r]=(r+256).toString(16).substr(1);function a(){var e=((!t||s+16>u.BUFFER_SIZE)&&(s=0,t=u.randomBytes(u.BUFFER_SIZE)),t.slice(s,s+=16));return e[6]=15&e[6]|64,e[8]=63&e[8]|128,e}function u(){var e=a();return o[e[0]]+o[e[1]]+o[e[2]]+o[e[3]]+"-"+o[e[4]]+o[e[5]]+"-"+o[e[6]]+o[e[7]]+"-"+o[e[8]]+o[e[9]]+"-"+o[e[10]]+o[e[11]]+o[e[12]]+o[e[13]]+o[e[14]]+o[e[15]]}u.BUFFER_SIZE=4096,u.bin=a,u.clearBuffer=function(){t=null,s=0},u.test=function(e){return"string"==typeof e&&/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(e)},"undefined"!=typeof crypto?i=crypto:"undefined"!=typeof window&&void 0!==window.msCrypto&&(i=window.msCrypto),i=i||n(60575),e.exports=u,u.randomBytes=function(){if(i){if(i.randomBytes)return i.randomBytes;if(i.getRandomValues)return"function"!=typeof Uint8Array.prototype.slice?function(e){var t=new Uint8Array(e);return i.getRandomValues(t),Array.from(t)}:function(e){var t=new Uint8Array(e);return i.getRandomValues(t),t}}return function(e){var t,n=[];for(t=0;t<e;t++)n.push(Math.floor(256*Math.random()));return n}}()}()},4693:e=>{class t{constructor(e){this.value=e,this.next=void 0}}class n{constructor(){this.clear()}enqueue(e){const n=new t(e);this._head?(this._tail.next=n,this._tail=n):(this._head=n,this._tail=n),this._size++}dequeue(){const e=this._head;if(e)return this._head=this._head.next,this._size--,e.value}clear(){this._head=void 0,this._tail=void 0,this._size=0}get size(){return this._size}*[Symbol.iterator](){let e=this._head;for(;e;)yield e.value,e=e.next}}e.exports=n},60575:()=>{}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var s=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(s.exports,s,s.exports,n),s.loaded=!0,s.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{"use strict";var e={};n.r(e),n.d(e,{APPLICATION_STATE_CHANNEL:()=>nt,CLIENT_SERVER_MAPPING:()=>ut,COMPONENT_STATE_STORAGE_TOPIC:()=>vt,EVENT_INTERRUPT_CHANNEL:()=>ft,HEARTBEAT_TIMEOUT_CHANNEL:()=>wt,INTERRUPTIBLE_EVENTS:()=>yt,LAUNCHER_SERVICE:()=>bt,MOVE_REASON:()=>jt,SERVICES_STATE_CHANNEL:()=>lt,SERVICE_CLOSED_CHANNEL:()=>ot,SERVICE_CLOSING_CHANNEL:()=>st,SERVICE_INITIALIZING_CHANNEL:()=>rt,SERVICE_QUERY_READY_CHANNEL:()=>at,SERVICE_READY_CHANNEL:()=>it,SERVICE_START_CHANNEL:()=>ct,SERVICE_STOP_CHANNEL:()=>pt,WINDOW:()=>ht,WINDOWSTATE:()=>dt,WINDOW_SERVICE_REQUESTS:()=>mt,WORKSPACE:()=>gt,WRAPPERS:()=>tt});var t=n(58156),r=n.n(t);const i=(e,t,n)=>(e[t]||[]).concat([n]),s=(e,t,n)=>(e[t]||[]).filter((e=>e!==n)),o="FSBL.FDC3.Interop.Server",a="(TitleBar)",u={signatureString:"",signatureStringType:"unauthenticated",meta:{name:"Anonymous app",appId:"Anonymous appId"}};let l="undefined"==typeof window?n.g:window,d="undefined"==typeof window?n.g:window;"undefined"==typeof window?n.g:window;var c=n(84342),p=n.n(c);const f=e=>{const t=Symbol.for(`com.finsemble.singleton.${e}`);return Object.getOwnPropertySymbols(n.g).indexOf(t)>-1?n.g[t]:null},y=(e,t,...r)=>{const i=f(e);if(!i){const i=Symbol.for(`com.finsemble.singleton.${e}`);return n.g[i]=new t(...r),n.g[i]}return i},h=`Unknown window-${p()()}`;class g{constructor(){this.isReady=!1,this.onReadyListeners=[],this.currentStartupData={authenticationToken:u,windowName:h,webContentsName:h}}static getInstance(){return g.instance?g.instance:g.instance=y("Startup",g)}getStartupData(){return this.currentStartupData}setStartupData(e){this.currentStartupData=e}onReady(e){return new Promise((t=>{this.isReady?(e&&setTimeout(e,0),t()):this.onReadyListeners.push((()=>{e&&e(),t()}))}))}setReady(){this.isReady=!0,this.onReadyListeners.forEach((e=>{e()}));try{l.dispatchEvent&&l.Event&&l.dispatchEvent(new l.Event("FSBLReady"))}catch(e){console.log(e.toString())}}}g.instance=null;const m={},v={activeTransports:{},liveTransport:null,setTransports(){v.addTransport("SharedWorkerForCoreServices",m.SharedWorkerForCoreServicesTransport),v.addTransport("SharedWorker",m.SharedWorkerTransport),v.addTransport("IPCBus",m.IPCTransport),v.addTransport("FinsembleTransport",m.FinsembleTransport)},addTransport(e,t){this.activeTransports[e]=t},getActiveTransports(e){const t=[],n=e=>{-1===t.indexOf(e)&&t.push(e)};return x.InterApplicationBus&&n("IPCBus"),n("FinsembleTransport"),SharedWorker&&(n("SharedWorker"),n("SharedWorkerForCoreServices")),n(e.sameDomainTransport),n(e.crossDomainTransport),ye.system.log("getActiveTransports",t),t},getTransport:(e,t,n,r,i,s)=>new Promise(((o,a)=>{const u=v.activeTransports[t];if(u)v.liveTransport=new u(e,n,r,i,(e=>{o(e)}),s);else{const e=`routerTransport.getTransport() Unknown router transport name: ${t}`;ye.warn(e),a(e)}})),close(){v.liveTransport&&(v.liveTransport.close(),v.liveTransport=null)}};m.SharedWorkerForCoreServicesTransport=function(e,t,n,r,i){let s;this.send=function(e,t){1===arguments.length?(t=arguments[0],e=null):(e=arguments[0],t=arguments[1]),ye.system.verbose("SharedWorkerForCoreServicesTransport Outgoing Transport",t);try{s.port.postMessage([e,t])}catch(e){ye.system.error(`SharedWorkerForCoreServicesTransport: post message failed: ${JSON.stringify(e)}`,"Probable cause is sending illegal data type (e.g. function).")}},this.identifier=()=>"SharedWorkerForCoreServices";const o=e.transportSettings.SharedWorker&&e.transportSettings.SharedWorker.workerPath?e.transportSettings.SharedWorker.workerPath:`${e.routerDomainRoot}/routerSharedWorkerForCoreServices.js`;ye.console.log(`SharedWorkerForCoreServices Transport Initializing for ${n} using ${o}`),s=new SharedWorker(o,{name:"Finsemble",credentials:"include"}),s.port.onmessage=e=>{const n=e.data[0],r=e.data[1],i={transportID:this.identifier(),port:n};ye.system.verbose("SharedWorkerForCoreServicesTransport Incoming Transport",i,"Message",r),t(i,r)},s.onerror=e=>{ye.console.error(`SharedWorkerForCoreServicesTransport Transport Error ${JSON.stringify(e)}`)},s.port.start(),"RouterService"===n&&s.port.postMessage({data:"connect",source:"RouterService"}),this.close=()=>s.port.close(),null==i||i(this)},m.SharedWorkerTransport=function(e,t,n,r,i){let s;this.send=function(e,t){1===arguments.length?(t=arguments[0],e=null):(e=arguments[0],t=arguments[1]),ye.system.verbose("SharedWorkerTransport Outgoing Transport",t);try{s.port.postMessage([e,t])}catch(e){ye.system.error(`SharedWorkerTransport: post message failed: ${JSON.stringify(e)}`,"Probable cause is sending illegal data type (e.g. function).")}},this.identifier=()=>"SharedWorker";const o=e.transportSettings.SharedWorker&&e.transportSettings.SharedWorker.workerPath?e.transportSettings.SharedWorker.workerPath:`${e.routerDomainRoot}/routerSharedWorker.js`;ye.console.log(`SharedWorker Transport Initializing for ${n} using ${o}`),s=new SharedWorker(o,{name:"Finsemble",credentials:"include"}),s.port.onmessage=e=>{const n=e.data[0],r=e.data[1],i={transportID:this.identifier(),port:n};ye.system.verbose("SharedWorkerTransport Incoming Transport",i,"Message",r),t(i,r)},s.onerror=e=>{ye.console.error(`SharedWorkerTransport Transport Error ${JSON.stringify(e)}`)},s.port.start(),"RouterService"===n&&s.port.postMessage({data:"connect",source:"RouterService"}),this.close=()=>s.port.close(),null==i||i(this)},m.IPCTransport=function(e,t,n,r,i){this.send=function(e,t){let n;1===arguments.length?(n=r,t=arguments[0]):(n=e.name,t=arguments[1]),ye.system.verbose("IPCTransport Outgoing Transport",n,"Message",t),x.InterApplicationBus.publish(n,t,(()=>{}),(()=>{}))},this.identifier=()=>"IPCBus",ye.console.log(`IPCBus Transport Initializing for ${n}`);const s=x.InterApplicationBus.subscribe("*",n,(e=>{const n={transportID:this.identifier(),name:e.header.origin};ye.system.verbose("IPCTransport Incoming Transport",n,"Message",e),t(n,e)}),(()=>{}),(e=>ye.console.error(`IPCBus Subscribe Failure: ${e}`)));this.close=()=>x.InterApplicationBus.unsubscribe(s),null==i||i(this)},m.FinsembleTransport=function(e,t,n,r,i,s){var o,a,u,d,c;const p=`${null!==(c=null!==(u=null===(a=null===(o=null==e?void 0:e.transportSettings)||void 0===o?void 0:o.FinsembleTransport)||void 0===a?void 0:a.serverAddress)&&void 0!==u?u:null===(d=null==e?void 0:e.transportSettings)||void 0===d?void 0:d.serverAddress)&&void 0!==c?c:"ws://127.0.0.1:3376"}/router`;let f,y,h=!0;const g=e=>{if("IAC_KeepaliveHandshake"===e)ye.system.verbose("FinsembleTransport Incoming Message","Message",e),ye.system.verbose("FinsembleTransport keepalive completed"),h=!0;else{const n={transportID:this.identifier(),client:e.clientMessage.header.origin};ye.system.verbose("FinsembleTransport Incoming Transport",n,"Message",e),t(n,e.clientMessage)}},m=()=>{ye.console.log(`FinsembleTransport Transport Initializing for ${n} using ${p} trying to connect to server`),p.startsWith("ws:")||p.startsWith("wss:")||ye.system.error(`Illegal WebSocket address "${p}" (Missing ws:// or wss:// ?)`),f=new l.WebSocket(p),f.addEventListener("open",(()=>{clearInterval(y),ye.console.log("FinsembleTransport connected to server"),f.send(JSON.stringify({dest:"IAC_SERVER",source:n})),"RouterService"!==n&&((()=>{const e=setInterval((()=>{h?(h=!1,f.send(JSON.stringify({dest:"IAC_KEEPALIVE_SERVER",source:n})),ye.system.verbose("FinsembleTransport keepalive sent")):(ye.console.error("FinsembleTransport keepalive handshake failed -- transport is essentially dead",5e3),clearInterval(e),s&&s())}),5e3)})(),ye.console.log("FinsembleTransport keep-alive handshake started")),f.addEventListener("message",(e=>{const t=JSON.parse(e.data);g(t.message)})),null==i||i(this)})),f.addEventListener("error",(()=>{console.log(`Error connecting to websocket server ${p}`)})),f.addEventListener("close",(e=>{console.log(`Websocket is closed with code ${e.code}`),1006===e.code&&(clearInterval(y),y=setInterval(m,1e4))}))};this.send=function(e,t){let n,r;1===arguments.length?(n="ROUTER_SERVICE",r={clientMessage:t=arguments[0]}):(n="ROUTER_CLIENT",t=arguments[1],r={client:e.client,clientMessage:t}),ye.system.verbose("FinsembleTransport Outgoing Transport",n,"NewMessage",r),f.send(JSON.stringify({dest:n,message:r}))},this.identifier=()=>"FinsembleTransport",this.close=()=>{f.close()},y=setInterval(m,1e4),m()};const w=v,b=["microkernel","kernel","pre-authentication","authentication","appd-retrieval","system-preuser","preuser","preuser2","preuser3","preuser4","system-earlyuser","earlyuser","user"];function j(e){return`systemManager.boot.status.${e}`}function S(e,t){return`systemManager.checkpoint.${e}.${t}`}const C=new class{constructor(){this.startedElements={}}publishBootStatus(e,t,n,r){fe.system.debug("publishBootStatus",e,t,n),P.publish(j(e),{name:e,type:t,state:n,error:r})}waitForBootStage(e,t,n=Function.prototype){return new Promise(((r,i)=>{fe.system.debug("SystemManagerClient.waitForBootStage entry",e,t);const s=b.indexOf(e);"microkernel"===e&&"stageEntered"===t&&fe.system.error("Cannot wait on `stageEntered` for microkernel because router isn't up yet. So will instead wait for microkernel stage complete.");const o=P.subscribe("systemManager.boot.stage",((a,u)=>{if(fe.system.debug("SystemManagerClient.waitForBootStage new stage",u.data.stage,o),a)fe.system.error("SystemManagerClient.waitForBootStage subscribe error",a),n(a),i(a);else if(-1===s)a="illegal stage argument",fe.system.debug("SystemManagerClient.waitForBootStage subscribe error",a,e),n(a),i(a);else{const i=b.indexOf(u.data.stage);fe.system.debug("SystemManagerClient.waitForBootStage new stage",u.data,o),"stageEntered"===t&&i+1>=s?(fe.system.debug("SystemManagerClient.waitForBootStage stageEntered",e,o,n.name),n(),r(),P.unsubscribe(o)):"stageCompleted"===t&&i>=s?(fe.system.debug("SystemManagerClient.waitForBootStage completed",e,o),n(),r(),P.unsubscribe(o)):fe.system.debug(`SystemManagerClient.waitForBootStage else currentStageIndex=${i} stageIndex=${s} `,i,s,e,o)}}))}))}waitForStartup(e,t=Function.prototype){return new Promise(((n,r)=>{if(this.startedElements[e])return void n();fe.system.debug(`SystemManagerClient.waitForStartup.${e}`,e);const i=P.subscribe(j(e),((s,o)=>{fe.system.debug("SystemManagerClient.waitForStartup subscribe",e,s,o),s?(fe.system.error("SystemManagerClient.waitForStartup subscribe error",s),t(s),this.startedElements[e]=!1,r(s)):o.data.name===e&&"completed"===o.data.state&&(fe.system.debug("SystemManagerClient.waitForStartup completed",e),this.startedElements[e]=!0,t(),n(),P.unsubscribe(i))}))}))}publishCheckpointState(e,t,n){fe.system.debug("publishCheckpoint",e,t,n,S(e,t)),P.publish(S(e,t),{windowName:e,checkpointName:t,state:n})}showSystemLog(){fe.system.debug("SystemManagerClient.showSystemLog"),P.transmit("systemManager.showSystemlog",!0)}hideSystemLog(){fe.system.debug("SystemManagerClient.hideSystemLog"),P.transmit("systemManager.hideSystemlog",!0)}systemLog(e,t){fe.system.debug("SystemManagerClient.systemLog",e,t),P.transmit("systemManager.systemlog",{params:e,logMessage:t})}},A=C;class R{constructor(){this.alertOnceSinceStartUp={},this.alertCurrentCount={}}}const I=(e,t,n,r,i)=>{const s=y("Toast",R);let o=!1;const a=`toast.${n}`,u=(i=i||{}).duration||864e5;switch(t){case"ONCE-SINCE-STARTUP":a in s.alertOnceSinceStartUp?o=!1:(o=!0,s.alertOnceSinceStartUp[a]=!0);break;case"MAX-COUNT":{let e=0;const t=i.maxCount||1;a in s.alertCurrentCount&&(e=s.alertCurrentCount[a]),s.alertCurrentCount[a]=++e,e<=t&&(o=!0);break}default:o=!0}if(fe.log("toast",e,o,t,n,r,i),o){const t={message:r,timeout:u,...i,devModeOnly:"devModeOnly"===e};t.title||"devModeOnly"!==e||(t.title="Finsemble Developer Notification"),A.systemLog({notification:!0},`Notification: ${r}`),x.Notification.send(t)}};var T;const E={navigationStart:Date.now()},O={now:()=>{var e;return l.performance?null===(e=l.performance)||void 0===e?void 0:e.now():Date.now()},timing:(null===(T=l.performance)||void 0===T?void 0:T.timing)?l.performance.timing:E};function _(e,t={}){if(null===e||"object"!=typeof e)return e;if(e.constructor==Date||e.constructor==RegExp||e.constructor==Function||e.constructor==String||e.constructor==Number||e.constructor==Boolean)return new e.constructor(e);t=t||new e.constructor;for(const n in e)t[n]=void 0===t[n]?_(e[n],null):t[n];return t}class M{constructor(){this.queue=[],this.started=!1,this.clientName="RouterClient.clientName not yet set",this.transport=null,this.isRouterReady=!1,this.isTransportFailed=!1,this.parentReadyCallbackQueue=[],this.parentFailureCallbackQueue=[],this.mapListeners={},this.mapQueryResponders={},this.mapPubSubResponders={},this.mapPubSubResponderState={},this.mapPubSubResponderRegEx={},this.pubsubListOfSubscribers={},this.mapSubscribersID={},this.mapSubscribersTopic={},this.mapQueryResponses={},this.mapQueryResponseTimeOut={}}onReadyCallBack(){for(pe.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient Ready"),this.isRouterReady=!0;this.parentReadyCallbackQueue.length>0;){pe.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient parentReady invoked");const e=this.parentReadyCallbackQueue.shift();null==e||e()}}sendToRouterService(e){this.transport?this.transport.send(e):(pe.system.info("RouterClient: Queuing message since router initialization not complete",e),this.queue.push(e))}originatedHere(e){return e.header.origin===this.clientName}invokeListeners(e){const{channel:t,origin:n}=e.header,r=this.mapListeners[t]||[];Array.isArray(r)&&0!==r.length?(e.originatedHere=()=>this.originatedHere(e),r.forEach((r=>{pe.channelFilter(t)||pe.system.info("RouterClient: incoming transmit","CHANNEL",t,"FROM",n,"MESSAGE",e),r(null,e)}))):pe.system.log(`RouterClient: no listener for incoming transmit on channel ${t} from ${n}. Possibly the listener was removed while this message was in transit.`,e)}invokeResponder(e){const{channel:t,origin:n,queryID:r,error:i}=e.header;pe.system.info("RouterClient: incoming query","CHANNEL",t,"FROM",n,"QUERY MESSAGE",e);const s=(e,n)=>{pe.system.info("RouterClient: outgoing query response","CHANNEL",t,"RESPONSE DATA",n,"QUERY ID",r);let i={header:{origin:this.clientName,queryID:r,type:"queryResponse"},data:n};i.header.error=e?e.toString():null,this.sendToRouterService(i)},o=this.mapQueryResponders[t];void 0===o?e.header.logWhenNoResponder&&pe.system.warn(`RouterClient: No query responder defined on channel ${t} for incoming from ${n}.`,e):i?(pe.system.warn("RouterClient: queryResponder error",e),o(i),delete this.mapQueryResponders[t]):o(null,{...e,originatedHere:()=>this.originatedHere(e),sendQueryResponse:(e,t)=>{s(e,t)}})}invokeQueryResponse(e){var t;pe.system.info("RouterClient: incoming query response","CHANNEL",e.header.channel,"QUERY ID",e.header.queryID,"message",e);const{queryID:n}=e.header,r=this.mapQueryResponseTimeOut[n];delete this.mapQueryResponseTimeOut[n],r&&clearTimeout(r);const i=this.mapQueryResponses[n];i?(delete this.mapQueryResponses[n],i(null!==(t=e.header.error)&&void 0!==t?t:null,e)):pe.system.warn("Invariant: RouterClient: no handler found for incoming query response.",e)}invokeNotifyCallback(e){const{subscribeID:t,error:n}=e.header,r=this.mapSubscribersID[t];r?n?(pe.system.info("RouterClient: incoming PubSub notify error for subscriberID","SUBSCRIBER ID",t,"NOTIFY MESSAGE",e),r(n,e)):(e.originatedHere=()=>this.originatedHere(e),pe.system.info("RouterClient: incoming PubSub notify","SUBSCRIBER ID",t,"NOTIFY MESSAGE",e),r(null,e)):pe.system.info("RouterClient: no subscription handler defined for incoming notify for subscriberID. Possibly the subscription was removed while this publish was in transit.",t,e)}findResponder(e){const t=this.mapPubSubResponders[e];if(t)return t;for(const t in this.mapPubSubResponderRegEx)if(this.mapPubSubResponderRegEx[t].test(e))return this.mapPubSubResponders[t]}invokePublishEvent(e){const{topic:t}=e.header;let n=this.findResponder(t);if(n){const r=(e,n,r)=>{var i;n?pe.system.warn("RouterClient: incoming publish rejected by pubsub responder",n,r):(this.mapPubSubResponderState[t]=r,(null!==(i=this.pubsubListOfSubscribers[t])&&void 0!==i?i:[]).forEach((e=>{pe.system.info("RouterClient: sending pubsub notify","TOPIC",t,"NOTIFY DATA",r);const n={header:{origin:this.clientName,type:"notify",topic:t,subscribeID:e},data:r};this.sendToRouterService(n)})))};if(pe.system.info("RouterClient: incoming PubSub publish "+(n.publishCallback?"(publishCallback hook invoked)":""),"TOPIC",t,"PUBLISH MESSAGE",e),n.publishCallback){const t={...e,sendNotifyToAllSubscribers:(t,n)=>{r(e,t,n)}};n.publishCallback(null,t)}else r(e,null,e.data)}else pe.system.warn("RouterClient: no pubsub responder defined for incoming publish","TOPIC",t,"PUBLISH MESSAGE",e)}invokeSubscribeEvent(e){var t;const{topic:n,error:r}=e.header;pe.system.info("RouterClient: PubSub subscribe","TOPIC",n);let i=this.mapPubSubResponders[n];if(!i)for(const e in this.mapPubSubResponderRegEx)if(this.mapPubSubResponderRegEx[e].test(n)){i=this.mapPubSubResponders[e],this.mapPubSubResponderState[n]=null!==(t=this.mapPubSubResponderState[n])&&void 0!==t?t:this.mapPubSubResponderState[e];break}if(i)if(r)pe.system.warn(`RouterClient: pubsub error received from router service: ${r}`,e);else if(i.subscribeCallback){const t={...e,sendNotifyToSubscriber:(t,n)=>{this.sendNotifyToSubscriber(e,t,n)}};e.data=this.mapPubSubResponderState[n],i.subscribeCallback(null,t)}else this.sendNotifyToSubscriber(e,null,this.mapPubSubResponderState[n]);else pe.system.warn("RouterClient: no pubsub responder defined for incoming subscribe event",e)}invokeUnsubscribeEvent(e){const{topic:t,subscribeID:n}=e.header;let r=this.findResponder(t);if(!r)for(const e in this.mapPubSubResponderRegEx)if(this.mapPubSubResponderRegEx[e].test(t)){r=this.mapPubSubResponders[e];break}if(r)if(pe.system.info("RouterClient: incoming unsubscribe "+(r.unsubscribeCallback?"with unsubscribeCallback hook":""),"TOPIC",t,"UNSUBSCRIBE MESSAGE",e),r.unsubscribeCallback){const i={...e,removeSubscriber:()=>{this.removeSubscribers(t,n)}};r.unsubscribeCallback(null,i)}else this.removeSubscribers(t,n);else pe.system.warn("RouterClient: no pubsub responder defined for incoming unsubscribe event","TOPIC",t,"UNSUBSCRIBE MESSAGE",e)}sendNotifyToSubscriber(e,t,n){const{topic:r,subscribeID:i}=e.header;if(void 0!==n){let e={header:{origin:this.clientName,type:"notify",topic:r,subscribeID:i},data:n};t&&(e.header.error=t),this.sendToRouterService(e)}t?pe.system.warn("RouterClient: incoming subscription rejected by pubsub responder","TOPIC",r,"MESSAGE",this):(r in this.pubsubListOfSubscribers?this.pubsubListOfSubscribers[r].push(i):this.pubsubListOfSubscribers[r]=[i],pe.system.info("RouterClient: incoming subscription added","TOPIC",r,"MESSAGE"))}removeSubscribers(e,t){let n=!1;if(e in this.pubsubListOfSubscribers){const r=this.pubsubListOfSubscribers[e];for(let i=0;i<r.length;i++)if(t===r[i]){r.splice(i,1),0===r.length&&delete this.pubsubListOfSubscribers[e],n=!0,pe.system.info("RouterClient: PubSub removeListener","TOPIC",e,"FROM",t);break}}n||pe.system.warn(`RouterClient: tried to remove non-existent listener on ${e} from ${t}`)}routeIncomingMessage(e){const t=()=>{this.timeCalibrationHandler?this.timeCalibrationHandler(e):setTimeout((()=>{t()}),10)};switch(pe.system.verbose("Incoming Message Type",e.header.type,e),e.header.type){case"transmit":this.invokeListeners(e);break;case"query":this.invokeResponder(e);break;case"queryResponse":this.invokeQueryResponse(e);break;case"notify":this.invokeNotifyCallback(e);break;case"publish":this.invokePublishEvent(e);break;case"subscribe":this.invokeSubscribeEvent(e);break;case"unsubscribe":this.invokeUnsubscribeEvent(e);break;case"timeCalibration":t();break;case"initialHandshakeResponse":this.handshakeHandler()}}asyncConnectToEventRouter(e,t,n){pe.system.debug(`Name of transport to establish: ${t}`);let r=null,i=0,s=!1,o=0,a=null;const u=()=>{const t=Number.MAX_SAFE_INTEGER;pe.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient: sendHandshake",i);const n={header:{origin:this.clientName,type:"initialHandshake"}};this.sendToRouterService(n),i++>t&&(()=>{if(clearInterval(r),o++,o<=3)pe.console.error("WINDOW LIFECYCLE:STARTUP:RouterClient: failure to connect to router service. Retrying...",o,e),null==a||a();else{const t="A cross domain transport has failed to connect. Cross domain components may not work. Please contact your administrator.";pe.console.error(t,e),I("dev","ONCE-SINCE-STARTUP","FSBL-Internal-Transport-Failure",t)}})()},l=()=>{if(!s){pe.system.debug(`WINDOW LIFECYCLE:STARTUP:RouterClient connected: Starting ${this.clientName} with transport ${this.transport.identifier()}`),s=!0,clearInterval(r);for(let e=0;e<this.queue.length;e++){pe.system.debug("RouterClient: releasing queued msg");const t=this.queue[e];this.transport.send({...t,header:{...t.header,origin:this.clientName}})}null==n||n()}},d=e=>{i=0,pe.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient:transport ready","TRANSPORT OBJECT",e),this.transport=e,this.handshakeHandler=l,u(),r=setInterval(u,1e3)},c=()=>{for(pe.system.error("RouterClient Transport Failed -- onFailure() callbacks invoked."),this.isTransportFailed=!0;this.parentFailureCallbackQueue.length>0;){pe.system.debug("RouterClient parentFailure invoked");const e=this.parentFailureCallbackQueue.shift();null==e||e()}};a=()=>{pe.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient:getClientTransport","ROUTER PARAMS:",e),w.getTransport(e,t,((e,t)=>{t.header.lastClient=this.clientName,t.header.incomingTransportInfo=e,this.routeIncomingMessage(t)}),this.clientName,"RouterService",c).then(d).catch((e=>{pe.console.error("RouterClient getTransport error",e)}))},a()}addPubSubResponderCallBack(e,t,n,r){const i=e.toString();return!this.mapPubSubResponders[i]&&(e instanceof RegExp&&(this.mapPubSubResponderRegEx[i]=e,pe.system.info(`RouterClient: PubSub RegEx added for topic ${i}`)),this.mapPubSubResponders[i]={subscribeCallback:t,publishCallback:n,unsubscribeCallback:r},!0)}calibrateTimeWithRouterService(e){let t=0,n=0,r=1/0;const i={header:{origin:this.clientName,type:"timeCalibration"},clientBaseTime:[],serviceBaseTime:[]};this.timeCalibrationHandler=i=>{if(t++,t>5)(t=>{const{clientBaseTime:i,serviceBaseTime:s}=t;let o=0;for(let e=1;e<5;e++){const t=i[e-1],a=i[e]-t,u=s[e-1]-(t+a/2);a<r&&(r=a,n=u),o+=u,pe.system.debug("calibrationCalculation Intermediate Values","lastRRT",a,"lastOffset",u,"fastestOffset",n,"fastestRRT",r)}o/=4,pe.system.debug("RouterClient calibrationCalculation","Average Offset",o,"Chosen FastestOffset",n,t),e(n)})(i);else{i.clientBaseTime.push(O.timing.navigationStart+O.now());const e={header:{origin:this.clientName,type:"timeCalibration"},clientBaseTime:i.clientBaseTime,serviceBaseTime:i.serviceBaseTime};this.sendToRouterService(e)}},this.timeCalibrationHandler(i)}start(e){return new Promise((async t=>{if(this.started){const e="RouterClient.start() called twice. Ignoring second call.";return pe.system.warn(e),t(e)}this.started=!0,this.clientName=`RouterClient.${e.windowName}.${p()()}`;const n=`"RouterClient Check: connecting new client for ${this.clientName}`;pe.system.debug(n),console.debug(n),w.setTransports(),this.asyncConnectToEventRouter(e,e.transportName,(()=>{this.onReadyCallBack(),t(null)}))}))}disconnectFromService(){pe.system.info("RouterClient.disconnectFromService");const e={header:{origin:this.clientName,type:"disconnectFromService"}};this.sendToRouterService(e)}stop(){this.disconnectAll(),w.close(),this.started=!1,this.disconnectFromService()}onReady(e){return new Promise((t=>{const n=()=>{e&&e(),t()};this.isRouterReady?n():this.parentReadyCallbackQueue.push(n)}))}onFailure(e){return new Promise((t=>{const n=()=>{e&&e(),t()};this.isTransportFailed?n():this.parentFailureCallbackQueue.push(n)}))}addListener(e,t){pe.system.info("RouterClient.addListener","CHANNEL",e);const n=this.mapListeners[e];if(n&&0!==n.length)n.some((e=>t===e))?pe.debug("RouterClient.addListener() Ignoring duplicate listener with identical callback",e,t):n.push(t);else{this.mapListeners[e]=[t];const n={header:{origin:this.clientName,type:"addListener",channel:e}};this.sendToRouterService(n)}return()=>{this.removeListener(e,t)}}transmit(e,t,n){pe.channelFilter(e)||pe.system.info("RouterClient.transmit","TO CHANNEL",e,"DATA",t);const r={header:{origin:this.clientName,type:"transmit",channel:e},data:t,options:n};this.sendToRouterService(r)}removeListener(e,t){if(pe.system.info("RouterClient.removeListener","CHANNEL",e,"EVENT HANDLER",t),!this.mapListeners[e])return pe.system.debug("Attempt to remove non existent listener",e,t),void console.log("Attempt to remove non existent listener",e,t);if(this.mapListeners[e]=this.mapListeners[e].flatMap((e=>e===t?[]:[e])),!this.mapListeners[e].length){delete this.mapListeners[e];const t={header:{origin:this.clientName,type:"removeListener",channel:e}};this.sendToRouterService(t)}}addResponder(e,t){if(pe.system.info("RouterClient.addResponder","CHANNEL",e),this.mapQueryResponders[e]){const n=`RouterClient.addResponder: Responder already locally defined for channel ${e}`;pe.system.warn(n),t(n)}else{this.mapQueryResponders[e]=t;const n={header:{origin:this.clientName,type:"addResponder",channel:e}};this.sendToRouterService(n)}}query(e,t,n,r){var i,s;const o=`${this.clientName}.${p()()}.${e}`,a=O.timing.navigationStart+O.now(),u=O.timing.navigationStart,d=O.now();pe.system.info("RouterClient.query","RESPONDER CHANNEL",e,"QUERY EVENT",t,"PARAMS",n,"QUERY ID",o,{timestamp:a,navstart:u,timenow:d});const c=null!=r?r:"function"==typeof n?n:null,f=null!==(i=null==n?void 0:n.timeout)&&void 0!==i?i:2e4,y=null===(s=null==n?void 0:n.logWhenNoResponder)||void 0===s||s;return new Promise((r=>{this.mapQueryResponses[o]=(e,t)=>{null==c||c(e,t),r({err:e,response:t})},!l.runningInFSBLUnitTest&&f>0&&(this.mapQueryResponseTimeOut[o]=setTimeout((()=>{pe.system.warn(`RouterClient: timeout after ${f} ms waiting on query response on channel ${e} for queryID ${o} from client ${this.clientName}`,"from event",t,"with params",n),delete this.mapQueryResponseTimeOut[o]}),f));const i={header:{origin:this.clientName,type:"query",queryID:o,channel:e,logWhenNoResponder:y},data:t};this.sendToRouterService(i)}))}removeResponder(e){if(pe.system.info("RouterClient.removeResponder","RESPONDER CHANNEL",e),this.mapQueryResponders[e]){delete this.mapQueryResponders[e];const t={header:{origin:this.clientName,type:"removeResponder",channel:e}};this.sendToRouterService(t)}}addPubSubResponder(e,t,n,r){let i,s;if(pe.system.info("RouterClient.addPubSubResponder","TOPIC",e,"INITIAL STATE",t,"PARAMS",n),void 0===(n=n||{}).subscribeCallback&&void 0===n.publishCallback&&void 0===n.unsubscribeCallback){t=t||{};const n={header:{origin:this.clientName,type:"addPubSubResponder",topic:e.toString(),handleOnServer:!0},data:t};this.sendToRouterService(n),s="success"}else if(this.addPubSubResponderCallBack(e,n.subscribeCallback,n.publishCallback,n.unsubscribeCallback)){t=t||{},this.mapPubSubResponderState[e.toString()]=_(t);const n={header:{origin:this.clientName,type:"addPubSubResponder",topic:e.toString(),handleOnServer:!1},data:t};this.sendToRouterService(n),s="success"}else i=`RouterClient.addPubSubResponder: Responder already locally defined for topic ${e}`,pe.system.error(i);r&&r(i,s)}removePubSubResponder(e){pe.system.info("RouterClient.removePubSubResponder","TOPIC",e);const t=e.toString();if(this.mapPubSubResponders[t]){delete this.mapPubSubResponders[t],delete this.mapPubSubResponderState[t],delete this.mapPubSubResponderRegEx[t];const n={header:{origin:this.clientName,type:"removePubSubResponder",topic:e}};this.sendToRouterService(n)}else pe.system.warn(`RouterClient.removePubSubResponder failed: Could not find responder for topic ${e}`)}subscribe(e,t){pe.system.info("RouterClient.subscribe","TOPIC",e);const n=`${this.clientName}.${p()()}`;this.mapSubscribersID[n]=t,this.mapSubscribersTopic[n]=e;const r={header:{origin:this.clientName,type:"subscribe",subscribeID:n,topic:e}};return this.sendToRouterService(r),{subscribeID:n,topic:e}}publish(e,t){pe.system.info("RouterClient.publish","TOPIC",e,"EVENT",t);const n={header:{origin:this.clientName,type:"publish",topic:e},data:t};this.sendToRouterService(n)}unsubscribe(e){pe.system.info("RouterClient.unsubscribe","SUBSCRIBE ID",e);const{subscribeID:t}=e;if(this.mapSubscribersID[t]){delete this.mapSubscribersID[t],delete this.mapSubscribersTopic[t];const n={header:{origin:this.clientName,type:"unsubscribe",subscribeID:e.subscribeID,topic:e.topic}};this.sendToRouterService(n)}else pe.system.warn(`RouterClient.unsubscribe: Could not find subscribeID for topic ${e.topic}`)}trustedMessage(e){var t;return pe.system.debug("RouterClient.trustedMessage header",e.header),null===(t=e.header.originMetadata)||void 0===t?void 0:t.transportInfo.transportID.includes("SharedWorker")}disconnectAll(){pe.system.info("RouterClient.disconnectAll"),Object.keys(this.mapListeners).forEach((e=>{Array.from(new Set(this.mapListeners[e])).forEach((t=>{this.removeListener(e,t)}))})),Object.keys(this.mapQueryResponders).forEach((e=>{this.removeResponder(e)})),Object.keys(this.mapPubSubResponders).forEach((e=>{this.removePubSubResponder(e)})),Object.keys(this.mapSubscribersID).forEach((e=>{const t=this.mapSubscribersTopic[e];this.unsubscribe({topic:t,subscribeID:e})}))}}const L={start:e=>{const t=y("RouterClient",M);return pe.setRouterClient(t),t.start(e)},stop:()=>{y("RouterClient",M).stop()},calibrateTimeWithRouterService(e){y("RouterClient",M).calibrateTimeWithRouterService(e)}},P={onReady:e=>(pe.system.deprecated("You no longer need to call RouterClient.onReady()"),y("RouterClient",M).onReady(e)),onFailure:e=>y("RouterClient",M).onFailure(e),addListener:(e,t)=>y("RouterClient",M).addListener(e,t),transmit:(e,t,n)=>{y("RouterClient",M).transmit(e,t,n)},removeListener:(e,t)=>{y("RouterClient",M).removeListener(e,t)},addResponder:(e,t)=>{y("RouterClient",M).addResponder(e,t)},query:(e,t,n,r)=>y("RouterClient",M).query(e,t,n,r),removeResponder:e=>{y("RouterClient",M).removeResponder(e)},addPubSubResponder:(e,t,n,r)=>{y("RouterClient",M).addPubSubResponder(e,t,n,r)},removePubSubResponder:e=>{y("RouterClient",M).removePubSubResponder(e)},subscribe:(e,t)=>y("RouterClient",M).subscribe(e,t),publish:(e,t)=>{y("RouterClient",M).publish(e,t)},unsubscribe:e=>{y("RouterClient",M).unsubscribe(e)},trustedMessage:e=>y("RouterClient",M).trustedMessage(e),disconnectAll:()=>{y("RouterClient",M).disconnectAll()},calibrateTimeWithRouterService:e=>{y("RouterClient",M).calibrateTimeWithRouterService(e)}},W=P;class N{static createNew(e,t){fin.desktop.Window.createNew(e,t)}static getCurrent(){return fin.desktop.Window.getCurrent()}static wrap(e){return fin.desktop.Window.wrap(e)}}class k{static createNew(e,t){t("Cannot create freestanding windows")}static getCurrent(){const{windowName:e}=g.getInstance().getStartupData();return{name:e,uuid:`${e}-uuid`,getOptions:e=>{null==e||e({})},addEventListener:()=>{},removeEventListener:()=>{},updateOptions:()=>{},close:()=>{},startMovingWindow:()=>{},stopMovingWindow:()=>{},isShowing:()=>{},bringToFront:()=>{},show:()=>{},hide:()=>{},setTaskbarIcon:()=>{}}}static wrap(){return this.getCurrent()}}class D{constructor(){return new fin.desktop.System.Clipboard}static writeText(e,t,n,r){return fe.deprecated("FSBL.System.Clipboard.writeText is deprecated"),fin.desktop.System.Clipboard.writeText(e,t,n,r)}static writeHTML(e,t,n,r){return fe.deprecated("FSBL.System.Clipboard.writeHTML is deprecated"),fin.desktop.System.Clipboard.writeHTML(e,t,n,r)}static writeRTF(e,t,n,r){return fe.deprecated("FSBL.System.Clipboard.writeRTF is deprecated"),fin.desktop.System.Clipboard.writeRTF(e,t,n,r)}static readText(e,t,n){return fe.deprecated("FSBL.System.Clipboard.readText is deprecated"),fin.desktop.System.Clipboard.readText(e,t,n)}static readHTML(e,t,n){return fe.deprecated("FSBL.System.Clipboard.readHTML is deprecated"),fin.desktop.System.Clipboard.readHTML(e,t,n)}static readRTF(e,t,n){return fe.deprecated("FSBL.System.Clipboard.readRTF is deprecated"),fin.desktop.System.Clipboard.readRTF(e,t,n)}}class x{static get Application(){return{getCurrent:()=>(fe.deprecated("FSBL.System.Application is deprecated"),{restart:()=>{P.transmit("Application.restart",{})},getWindow:()=>fin.desktop.Window,addEventListener:(e,t,n,r)=>{fin.desktop.Window.addEventListener(e,t,n,r)},close:(e,t,n)=>{fin.desktop.Window.close(e,t,n)},getChildWindows:(e,t)=>{null==e||e([fin.desktop.Window])},getGroups:(e,t)=>{null==e||e([])},getManifest:(e,t)=>{x.getManifest(e)},getParentUuid:(e,t)=>{null==e||e("Finsemble")},getInfo:(e,t)=>{x.getVersion(e)},getTrayIconInfo:(e,t)=>{null==e||e({})},isRunning:(e,t)=>{null==e||e(!0)},registerUser:(e,t,n,r)=>{null==n||n()},removeEventListener:(e,t,n,r)=>{fin.desktop.Window.removeEventListener(e,t,n,r)},removeTrayIcon:(e,t)=>{fin.desktop.Window.removeTrayIcon(e,t)},run:(e,t)=>{},scheduleRestart:(e,t)=>{null==e||e()},setTrayIcon:(e,t,n,r)=>{fin.desktop.Window.setTrayIcon(e,t,n,r)},terminate:(e,t)=>{x.terminate()},wait:(e,t)=>{null==e||e()},window:{name:fin.desktop.Window.name},uuid:"Finsemble"})}}static isFreestanding(){return"undefined"==typeof fin}static get Window(){return x.isFreestanding()?k:N}static get Notification(){return{send:e=>{fin.desktop.Notification.send(e)}}}static get Clipboard(){return D}static getManifest(e){return new Promise((t=>{fin.desktop.System.getManifest((n=>{null==e||e(n),t(n)}))}))}static async getMousePosition(e){return new Promise(((t,n)=>{fin.desktop.System.getMousePosition((n=>{(n.left||0===n.left)&&(n.x=n.left),(n.top||0===n.top)&&(n.y=n.top),null==e||e(null,n),t(n)}),(t=>{null==e||e(t),n(t)}))}))}static async deleteAssets(e){return await fin.desktop.System.deleteAssets(e)}static getSDServerInfo(e=Function.prototype){return new Promise((t=>{fin.desktop.System.getSDServerInfo((n=>{t(n),e(n)}))}))}static getMonitorInfo(e){return new Promise((t=>{fin.desktop.System.getMonitorInfo((n=>{t(n),e&&e(n)}))}))}static isBrowserView(){return!x.isFreestanding()&&fin.isBrowserView()}static getViewId(){return fe.deprecated("FSBL.system.getViewId() is deprecated. Use FSBL.system.getWebContentsId()"),fin.getWebContentsId()}static getWebContentsId(){return fin.getWebContentsId()}static hasBrowserView(){return fe.deprecated("FSBL.system.hasBrowserView() is deprecated. Use FSBL.system.isTitlebarWindow()"),x.isTitlebarWindow()}static isTitlebarWindow(){return!x.isFreestanding()&&fin.isTitlebarWindow()}static get fin(){return fin||{}}static ready(e){return new Promise((t=>{fin.desktop.main((()=>{e&&e(),t()}))}))}static setTrayIcon(e,t){fin.desktop.System.setTrayIcon(e,t)}static getHostSpecs(e=Function.prototype){return new Promise((t=>{fin.desktop.System.getHostSpecs((n=>{t(n),e(n)}))}))}static get InterApplicationBus(){return fin.desktop.InterApplicationBus}static get launchExternalProcess(){return fin.desktop.System.launchExternalProcess}static get terminateExternalProcess(){return fin.desktop.System.terminateExternalProcess}static get exit(){return fin.desktop.System.exit}static async clearCache(e){return fin.desktop.System.clearCache(e)}static get showDeveloperTools(){return fin.desktop.System.showDeveloperTools}static get addEventListener(){return x.isFreestanding()?window.addEventListener:fin.desktop.System.addEventListener}static get addSelectClientCertificateListener(){return fin.desktop.System.addSelectClientCertificateListener}static get addCertificateErrorListener(){return fin.desktop.System.addCertificateErrorListener}static getFEAInfo(e){return new Promise((t=>{fin.desktop.System.getFEAInfo((n=>{null==e||e(n),t(n)}))}))}static get getVersion(){return fin.desktop.System.getVersion}static get getUpdateAvailable(){return fin.desktop.System.getUpdateAvailable}static get openUrlWithBrowser(){return fin.desktop.System.openUrlWithBrowser}static get getProcessList(){return fin.desktop.System.getProcessList}static get getProtocolString(){return fin.desktop.System.getProtocolString}static get hideSplashScreen(){return fin.desktop.System.hideSplashScreen}static notifyLoggerReady(){fin.desktop.System.notifyLoggerReady()}static updateCentralLoggerState(e){fin.desktop.System.updateCentralLoggerState(e)}static startupApplicationHandshake(){fin.desktop.System.startupApplicationHandshake&&fin.desktop.System.startupApplicationHandshake()}static terminate(){fin.desktop.System.terminate()}static restart(){fin.desktop.System.restart()}static getEnvironmentVariable(e,t){return new Promise((n=>{fin.desktop.System.getEnvironmentVariable(e,(e=>{null==t||t(e),n(e)}))}))}}var F=n(2543),B=n.n(F);const q=e=>{if(0===e.length)return"";let t=e[0].replace(".","$DOT$");if(1===e.length)return t;for(let n=1;n<e.length;n++)t=`${t}.${e[n].replace(".","$DOT$")}`;return t};class U{constructor(){this.listeners={},this.subs={}}}let $=!1;const J=async()=>{$||(await A.waitForStartup("configService"),$=!0)},H=()=>y("ConfigClient",U),V="Invalid path - MUST be a path array. e.g. for myObject.property use ['myObj', 'property']",z=(e,t)=>{var n;(null!==(n=H().listeners[e])&&void 0!==n?n:[]).forEach((n=>{ye.system.debug("ConfigClient.triggerListeners",e,t),n(null,{field:e,value:t})}))},G=(e,t)=>{if(e)ye.system.error("ConfigClient handleChanges() error",e);else{t.data.field||(t.data.field=null);const{field:e,storeData:n,value:r}=t.data;z(e||"configService",n||r)}},Y=async e=>{const t=H();if(t.subs||(t.subs={}),!t.subs[e]){t.subs[e]=!0,J();const{err:n}=await P.query("configService.addListener",e);n&&ye.system.error("Error adding listener to config service",n),await P.subscribe(e,G)}},Q=async(e,t)=>{if(ye.system.deprecated("FSBL.Clients.ConfigClient.getValue is deprecated. Use FSBL.Clients.ConfigClient.get() instead."),"string"==typeof e&&(e={field:e}),!e.field){const e="no field provided";return null==t||t(e),{err:e}}J();const{err:n,response:r}=await P.query("configService.getValue",{field:e.field});return null==t||t(n,r.data),{err:n,data:r.data}},K=async(e,t,n)=>{var r;const i=H();let s=null;"function"==typeof e&&(t=e,e={field:null}),Array.isArray(e)?s=q(e):({field:s}=e);const o="configService"+(s?`.${s}`:"");i.listeners[o]=[t].concat(null!==(r=i.listeners[o])&&void 0!==r?r:[]),Y(o),null==n||n()},Z=(e,t,n)=>{const r=H();let i=null;"function"==typeof e&&(n=t,t=e,e={field:i}),Array.isArray(e)?i=q(e):({field:i}=e);const s="configService"+(i?`.${i}`:"");if(r.listeners[s])for(let e=0;e<r.listeners[s].length;e++)if(r.listeners[s][e]===t)return r.listeners[s].splice(e,1),void(null==n||n(null,!0));null==n||n(null,!1)},X={initialize(){ye.deprecated("There is no need to call ConfigClient.initialize() anymore.")},onReady:e=>{ye.system.deprecated("It is no longer necessary to call ConfigClient.onReady()"),null==e||e()},triggerListeners(e,t){ye.deprecated("Calling ConfigClient.triggerListeners() directly is not legal."),z(e,t)},handleChanges(e,t){ye.deprecated("It is illegal to call ConfigClient.handleChanges() directly."),G(e,t)},async changeSub(e){ye.deprecated("Calling ConfigClient.changeSub() directly is not legal."),Y(e)},addListener:K,addListeners:(e,t,n)=>{var r;const i=H();if(!Array.isArray(e))return ye.deprecated("configClient - addListeners() with an object instead of an array is deprecated. Please use addListener() instead."),K(e,t,n);const s="function"==typeof t?t:null;for(let t=0;t<e.length;t++){const n=e[t];let o="";"string"==typeof n?o=n:"object"==typeof n&&Array.isArray(n.field)?o=q(n.field):"object"==typeof n&&"string"==typeof n.field&&(o=n.field);const a="string"!=typeof n?n.listener:s;if(a){const e="configService"+(o?`.${o}`:"");i.listeners[e]=[a].concat(null!==(r=i.listeners[e])&&void 0!==r?r:[]),Y(e)}}null==n||n()},getManifest:async e=>{J();const{err:t,response:n}=await P.query("configService.getValues",{fields:null});return null==e||e(t,n.data),{err:t,data:n.data}},getPreferences:async e=>{await A.waitForBootStage("authentication","stageCompleted");const{err:t,response:n}=await P.query("PreferencesService.getPreferences",{});return ye.system.debug("PreferencesService.getPreferences response",n),null==e||e(t,n.data),{err:t,data:n.data}},getValue:Q,getValues:async(e,t)=>{if(ye.system.deprecated("FSBL.Clients.ConfigClient.getValues is deprecated. Use FSBL.Clients.ConfigClient.getMultiple() instead."),"function"==typeof e&&(t=e,e=null),e&&!Array.isArray(e))return Q(e,t);J();const{err:n,response:r}=await P.query("configService.getValues",{fields:e});return null==t||t(n,r.data),{err:n,data:r.data}},processAndSet:async(e,t)=>{if(ye.system.debug("ConfigClient.processAndSet",e),!e.overwrite&&e.replace){const e="cannot use replace option unless overwrite is also true";return ye.system.warn("ConfigClient.processAndSet:",e),null==t||t(e),{err:e}}{J();const{err:n,response:r}=await P.query("configService.processAndSet",e);return null==t||t(n,r),{err:n,data:r.data}}},removeListener:Z,removeListeners:(e,t,n)=>{const r=H();if(!Array.isArray(e))return"function"==typeof e?Z({},e,n):e.field&&t&&Z(e,t,n),null==n?void 0:n(null,!0);const i="function"==typeof t?t:null;e.forEach((e=>{let t="";"string"==typeof e?t=e:"object"==typeof e&&Array.isArray(e.field)?t=q(e.field):"object"==typeof e&&"string"==typeof e.field&&(t=e.field);const n="string"!=typeof e?e.listener:i,s="configService"+(t?`.${t}`:"");r.listeners[s]=r.listeners[s].filter((e=>e!==n))})),null==n||n(null,!0)},removeValue:async(e,t)=>{if(ye.system.deprecated("FSBL.Clients.ConfigClient.removeValue is deprecated. Use FSBL.Clients.ConfigClient.remove() instead."),"string"==typeof e&&(e={field:e}),!(null==e?void 0:e.field)){const e="No field provided";return null==t||t(e),{err:e}}J();const{err:n}=await P.query("configService.removeValue",e);return null==t||t(n),{err:n}},removeValues:async(e,t)=>{if(ye.system.deprecated("FSBL.Clients.ConfigClient.removeValues is deprecated. Use FSBL.Clients.ConfigClient.removeMultiple() instead."),!e){const e="ConfigClient.removeValues. No params given";return ye.system.error(e),null==t||t(e),{err:e}}if(!Array.isArray(e)){const e="ConfigClient.removeValues. Params must be an array";return ye.system.error(e),null==t||t(e),{err:e}}J();const{err:n}=await P.query("configService.removeValues",e);return null==t||t(n),{err:n}},setPreference:async(e,t)=>{const{err:n,response:r}=await P.query("PreferencesService.setPreference",e);return null==t||t(n,r.data),{err:n,data:r.data}},setValue:async(e,t)=>{ye.system.deprecated("FSBL.Clients.ConfigClient.setValue is deprecated. Use FSBL.Clients.ConfigClient.set() instead.");const n={field:e.field,value:e.value};J();const{err:r}=await P.query("configService.setValue",n);return null==t||t(r),{err:r}},setValues:async(e,t)=>{if(ye.system.deprecated("FSBL.Clients.ConfigClient.setValues is deprecated. Use FSBL.Clients.ConfigClient.setValues() instead."),!e){const e="ConfigClient.SetValues. No params given";return ye.system.error(e),null==t||t(e),{err:e}}if(!Array.isArray(e)){const e="ConfigClient.SetValues. Params must be an array";return ye.system.error(e),null==t||t(e),{err:e}}J();const{err:n}=await P.query("configService.setValues",e);return null==t||t(n),{err:n}},unsetPreference:async(e,t)=>{ye.system.debug("ConfigClient.unsetPreference",e);const{err:n,response:r}=await P.query("PreferencesService.unsetPreference",e);return null==t||t(n,r.data),{err:n,data:r.data}},get:async(e,t)=>{if(null!==e&&!Array.isArray(e))return null==t||t(V),{err:V};J();const{err:n,response:r}=await P.query("configService.getValue",e);return null==t||t(n,r.data),{err:n,data:r.data}},getMultiple:async(e,t)=>{if(!Array.isArray(e))return null==t||t(V),{err:V};await A.waitForStartup("configService");const{err:n,response:r}=await P.query("configService.getValues",{fields:e.length?e:null});return null==t||t(n,r.data),{err:n,data:r.data}},set:async(e,t,n)=>{if(!Array.isArray(e))return null==n||n(V),{err:V};J();const r={field:e,value:t},{err:i,response:s}=await P.query("configService.setValue",r);return null==n||n(i,s.data),{err:i,data:s.data}},setMultiple:async(e,t)=>{if(!Array.isArray(e))return null==t||t(V),{err:V};await A.waitForStartup("configService");const{err:n,response:r}=await P.query("configService.setValues",e);return null==t||t(n,r.data),{err:n,data:r.data}},remove:async(e,t)=>{if(!Array.isArray(e))return null==t||t(V),{err:V};J();const{err:n,response:r}=await P.query("configService.removeValue",e);return null==t||t(n,r.data),{err:n,data:r.data}},removeMultiple:async(e,t)=>{if(!Array.isArray(e))return null==t||t(V),{err:V};await A.waitForStartup("configService");const{err:n,response:r}=await P.query("configService.removeValues",e);return null==t||t(n,r.data),{err:n,data:r.data}}},ee=X;var te=n(7350),ne=n.n(te);const re={Error:!0,Warn:!0,Info:!0,Log:!0,Debug:!0,Verbose:!1,LocalOnly:!1};let ie=5e3;const se=`NOTE: LOG ARG STRIPPED since greater than ${ie/1e3}KB. Check origin's local Console to see output of the complete object.`,oe={console:{Error:!0,Warn:!0,Info:!0,Log:!0,Debug:!0,Verbose:!0,LocalOnly:!1},dev:re,system:re,perf:re},ae=()=>{const{stack:e}=function(){try{throw Error("")}catch(e){return e}}();let t=6;e.includes("console.error")&&t++;const n=(r=t,e.split("\n",r).join("\n").length);var r;return`Log Stack: \n${e.substring(n).substr(1)}`},ue=e=>{const t=ie+1,n=[],r=[e];let i=0,s=0;for(;r.length&&s<=t;){s++;const e=r.pop();if("boolean"==typeof e)i+=4;else if("string"==typeof e)i+=2*e.length;else if("number"==typeof e)i+=8;else if("object"==typeof e&&-1===n.indexOf(e)){n.push(e);for(const t in e)r.push(e[t])}}return i},le=(e,t,n=0,r=1)=>{const i=ie/1.5,s=t/2,o=s/2,a="*STRIPPED*",u=e=>{let t=ue(e);e.length>0&&t>o&&(e[0]=le(e[0],s,n,r+1),e[1]=`${a} from size ${e.length}`,e.length=2)};let l=(0,F.cloneDeep)(e);if("object"!=typeof l)l=a,n+=ue(l);else if(Array.isArray(l))u(l),n+=ue(l);else{let e=Object.getOwnPropertyNames(l);for(let d=0;d<e.length;d++){let c=ue(l[e[d]]);n>s&&c>100&&r>=3&&d>=1||n>i&&c>=10?l[e[d]]=a:c>o&&(Array.isArray(l[e[d]])?u(l[e[d]]):l[e[d]]=le(l[e[d]],t/1.2,n,r+1)),n+=ue(l[e[d]])}}return l};class de{constructor(){this.routerClient=null,this.viewId=null,this.isRegistering=!1,this.isRegistered=!1,this.calibratedTimeStampOffset=0,this.newCalibratedTimeStampOffset=0,this.filteredMessagesCounter=0,this.startupTime=0,this.loggerQueue=[],this.loggerClientName=x.Window.getCurrent().name,this.onLogStateChangeCallback=[],this.currentLogState=oe,this.skipLargeObjects=!0,this.setRouterClient=e=>{this.routerClient=e},this.system={error:(...e)=>{this.logIt("system","Error",e)},warn:(...e)=>{this.logIt("system","Warn",e)},info:(...e)=>{this.logIt("system","Info",e)},log:(...e)=>{this.logIt("system","Log",e)},debug:(...e)=>{this.logIt("system","Debug",e)},verbose:(...e)=>{this.logIt("system","Verbose",e)},deprecated:(...e)=>{this.logIt("system","Error",e)}},this.perf={error:(...e)=>{this.logIt("perf","Error",e)},warn:(...e)=>{this.logIt("perf","Warn",e)},info:(...e)=>{this.logIt("perf","Info",e)},log:(...e)=>{this.logIt("perf","Log",e)},debug:(...e)=>{this.logIt("perf","Debug",e)},verbose:(...e)=>{this.logIt("perf","Verbose",e)},deprecated:(...e)=>{this.logIt("perf","Error",e)}},this.console={error:(...e)=>{this.logIt("console","Error",e)},warn:(...e)=>{this.logIt("console","Warn",e)},info:(...e)=>{this.logIt("console","Info",e)},log:(...e)=>{this.logIt("console","Log",e)},debug:(...e)=>{this.logIt("console","Debug",e)},verbose:(...e)=>{this.logIt("console","Verbose",e)},deprecated:(...e)=>{this.logIt("console","Error",e)}};const e="routerService"===this.loggerClientName?100:125;this.transmitAndClearQueue=ne()((()=>{var e;this.loggerQueue.length>0&&(null===(e=this.routerClient)||void 0===e||e.transmit("logger.service.logMessages",this.loggerQueue),this.loggerQueue=[])}),e,{leading:!1})}updateQueueBasedOnState(e){const{loggerQueue:t,currentLogState:n,calibratedTimeStampOffset:r}=this;this.system.debug("Logger updateQueueBasedOnState",e,r,"QUEUE LENGTH",t.length,n),this.loggerQueue=t.flatMap((t=>{if(n[t.category][t.logType]){if(!n[t.category].LocalOnly)return e&&(t.logTimestamp=t.logTimestamp+r),[t];globalThis.console.log(t.category,t.logType,t.logTimestamp-O.timing.navigationStart,t.logData,"(Previously queued!)")}return[]}))}onStateChanged(e){-1===this.onLogStateChangeCallback.indexOf(e)&&this.onLogStateChangeCallback.push(e)}setLogState(e,t){e&&e.dev&&(this.currentLogState=e,this.onLogStateChangeCallback.forEach((t=>{t(e)}))),this.updateQueueBasedOnState(t)}addToQueue(e){const{loggerQueue:t}=this;if(t.length<2e4)t.push(e);else{globalThis.console.error("Logging Queue Overflowed! Dumping queue here then continuing",t.length);let e,n=0;for(;e=t.shift();)globalThis.console.log("Message "+n++,e);this.system.error("Logging Queue Overflowed! Dumping queue in client then continuing.")}}callStack(){return ae()}setting(){return this.currentLogState}outputToConsole(e,t){var n;const r={Debug:globalThis.console.debug,Info:globalThis.console.info,Warn:globalThis.console.warn,Error:null!==(n=globalThis.console.unwrappedError)&&void 0!==n?n:globalThis.console.error,Log:globalThis.console.log,Verbose:globalThis.console.log};try{r[e](...t)}catch(e){r.Warn("Error outputting log to console",e,ae())}}formatAndQueueMessage(e,t,n){var r;const i="forceObjectsToLogger"===n[0],s=n.flatMap((e=>{const t=ue(e);if(!i&&t>ie){if(this.outputToConsole("Warn",[`Message too large to send to the logger. Max message size:${ie/1e3}KB`,`Approx message size: ${t/1e3}KB`,...n]),this.skipLargeObjects)return[`Log argument greater than ${ie/1e3}KB. Check local Console to see output of the object.`];{const n=le(e,ie),r=ue(n);return r>ie?[`LOG ARG STRIPPED but not logged here still greater than ${ie/1e3}KB. Check local Console to see output of the object. (Tag:Logging-Drop)`]:[se,`OldSize=${t} (Tag:Logging-Strip) NewSize=${r}`,n]}}return e instanceof Error?[e.toString()]:"forceObjectsToLogger"===e?[]:[e]}));let o=null;try{o=JSON.stringify(s)}catch(e){o=`*** Logger error can't JSON.stringify: ${ae()}`}("Error"===t||"Warn"===t||"console"===e)&&!l.runningInFSBLUnitTest&&this.outputToConsole(t,n);const a=null!==(r=this.viewId)&&void 0!==r?r:x.isBrowserView()&&x.getWebContentsId(),u={category:"console"===e?"system":e,logType:t,logClientName:a?`${this.loggerClientName}: view-${a}`:this.loggerClientName,logData:o,logTimestamp:O.timing.navigationStart+O.now()+this.calibratedTimeStampOffset};a&&(u.viewId=a),this.addToQueue(u),this.isRegistered&&this.transmitAndClearQueue()}logIt(e,t,n){var r;if(globalThis.glue42gd)globalThis.FSBL&&(null===(r=globalThis.FSBL.Clients.Logger)||void 0===r||r[t.toLowerCase()](...n));else if(this.currentLogState[e][t])if("Warn"!==t&&"Error"!==t||n.push(ae()),this.currentLogState[e].LocalOnly){const r=t.toLowerCase();n.unshift(`${e} ${r} (${O.now()}):`),this.outputToConsole(t,n)}else this.formatAndQueueMessage(e,t,n)}error(...e){this.logIt("dev","Error",e)}warn(...e){this.logIt("dev","Warn",e)}info(...e){this.logIt("dev","Info",e)}log(...e){this.logIt("dev","Log",e)}debug(...e){this.logIt("dev","Debug",e)}verbose(...e){this.logIt("dev","Verbose",e)}deprecated(...e){this.logIt("dev","Error",e)}completeRegistration(e){ee.get(["finsemble","servicesConfig","logger"],((e,t)=>{var n,r;e||(this.skipLargeObjects=null!==(n=null==t?void 0:t.skipLargeObjects)&&void 0!==n?n:this.skipLargeObjects,ie=null!==(r=null==t?void 0:t.maxLogMessageSize)&&void 0!==r?r:ie)})),this.loggerQueue.forEach((e=>{this.viewId&&(e.viewId=this.viewId)})),this.isRegistered=!0,e?"routerService"!==this.loggerClientName?(this.calibratedTimeStampOffset=this.newCalibratedTimeStampOffset,this.setLogState(e,!0)):this.setLogState(e,!1):globalThis.console.error("Logger.startLogger() Initial state not received from logger service"),this.formatAndQueueMessage("system","Debug",["Logger Registered"]),this.transmitAndClearQueue()}registerWithLoggerService(){var e;const{windowName:t,webContentsName:n}=g.getInstance().getStartupData();this.loggerClientName="undefined"!=typeof window&&window.top!==window?`${t}.Frame`:t;const r=`finsemble.logger.client.${this.loggerClientName}`;!this.viewId&&x.isBrowserView()&&(this.viewId=x.getWebContentsId()),this.system.debug("logger.service.registering",this.loggerClientName),x.Window.getCurrent().getOptions((async e=>{var i,s;const o=null===(s=null===(i=null==e?void 0:e.customData)||void 0===i?void 0:i.component)||void 0===s?void 0:s.centralLoggerNamePrefix;if(!this.routerClient)return;const{err:a,response:u}=await this.routerClient.query("logger.service.register",{clientName:this.loggerClientName,clientChannel:r,displayName:null!=n?n:t,windowName:t,viewId:this.viewId,centralLoggerNamePrefix:o});a?(globalThis.console.warn("Logger service not available. Trying to connect again in 750ms.",a),setTimeout((()=>{this.registerWithLoggerService()}),750)):this.completeRegistration(u.data)})),null===(e=this.routerClient)||void 0===e||e.addListener(r,((e,t)=>{this.system.debug("logger.client.setLogState",t.data),this.setLogState(t.data,!1)}))}unregisterClient(e,t){var n;this.system.debug("logger.service.unregister",this.loggerClientName,e,this.viewId),this.transmitAndClearQueue();const r=e||{clientName:this.loggerClientName,viewId:this.viewId};null===(n=this.routerClient)||void 0===n||n.query("logger.service.unregister",r,t)}async waitForServiceAndCalibrate(){var e;await A.waitForStartup("loggerService"),this.system.debug("Logger onReady",this.loggerClientName),null===(e=this.routerClient)||void 0===e||e.calibrateTimeWithRouterService((e=>{this.newCalibratedTimeStampOffset=e,this.isRegistering||(this.isRegistering=!0,this.startupTime=performance.now()-this.startupTime,this.registerWithLoggerService())}))}async start(e){this.routerClient=null!=e?e:W,this.startupTime=performance.now(),await this.waitForServiceAndCalibrate(),x.isBrowserView()&&l.addEventListener&&l.addEventListener("beforeunload",(()=>{this.unregisterClient()}))}}const ce={error:(...e)=>y("LoggerClient",de).error(...e),warn:(...e)=>y("LoggerClient",de).warn(...e),info:(...e)=>y("LoggerClient",de).info(...e),log:(...e)=>y("LoggerClient",de).log(...e),debug:(...e)=>y("LoggerClient",de).debug(...e),verbose:(...e)=>y("LoggerClient",de).verbose(...e),deprecated:(...e)=>y("LoggerClient",de).deprecated(...e),start:e=>{y("LoggerClient",de).start(e)},channelFilter:e=>(e=>"logger.service.logMessages"===e||"Finsemble.heartbeat"===e)(e),setting:()=>y("LoggerClient",de).setting(),callStack:()=>y("LoggerClient",de).callStack(),unregisterClient:(e,t)=>{y("LoggerClient",de).unregisterClient(e,t)},setRouterClient:e=>{y("LoggerClient",de).setRouterClient(e)},onStateChanged(e){y("LoggerClient",de).onStateChanged(e)},system:{error:(...e)=>y("LoggerClient",de).system.error(...e),warn:(...e)=>y("LoggerClient",de).system.warn(...e),info:(...e)=>y("LoggerClient",de).system.info(...e),log:(...e)=>y("LoggerClient",de).system.log(...e),debug:(...e)=>y("LoggerClient",de).system.debug(...e),verbose:(...e)=>y("LoggerClient",de).system.verbose(...e),deprecated:(...e)=>y("LoggerClient",de).system.deprecated(...e)},perf:{error:(...e)=>y("LoggerClient",de).perf.error(...e),warn:(...e)=>y("LoggerClient",de).perf.warn(...e),info:(...e)=>y("LoggerClient",de).perf.info(...e),log:(...e)=>y("LoggerClient",de).perf.log(...e),debug:(...e)=>y("LoggerClient",de).perf.debug(...e),verbose:(...e)=>y("LoggerClient",de).perf.verbose(...e),deprecated:(...e)=>y("LoggerClient",de).perf.deprecated(...e)},console:{error:(...e)=>y("LoggerClient",de).console.error(...e),warn:(...e)=>y("LoggerClient",de).console.warn(...e),info:(...e)=>y("LoggerClient",de).console.info(...e),log:(...e)=>y("LoggerClient",de).console.log(...e),debug:(...e)=>y("LoggerClient",de).console.debug(...e),verbose:(...e)=>y("LoggerClient",de).console.verbose(...e),deprecated:(...e)=>y("LoggerClient",de).console.deprecated(...e)}},pe=(globalThis.console.warn,globalThis.console.info,globalThis.console.log,globalThis.console.debug,globalThis.console.error,globalThis.console.debug,globalThis.console.error,globalThis.console.warn,globalThis.console.info,globalThis.console.log,globalThis.console.debug,globalThis.console.error,globalThis.console.debug,globalThis.console.error,globalThis.console.warn,globalThis.console.info,globalThis.console.log,globalThis.console.debug,globalThis.console.error,globalThis.console.debug,globalThis.console.error,globalThis.console.warn,globalThis.console.info,globalThis.console.log,globalThis.console.debug,globalThis.console.error,globalThis.console.debug,globalThis.console.error,ce),fe=pe,ye=pe;var he="function"==typeof queueMicrotask&&queueMicrotask,ge="function"==typeof setImmediate&&setImmediate,me="object"==typeof process&&"function"==typeof process.nextTick;function ve(e){setTimeout(e,0)}function we(e){return(t,...n)=>e((()=>t(...n)))}var be=we(he?queueMicrotask:ge?setImmediate:me?process.nextTick:ve);function je(e){return Ae(e)?function(...t){const n=t.pop();return Se(e.apply(this,t),n)}:(t=function(t,n){var r;try{r=e.apply(this,t)}catch(e){return n(e)}if(r&&"function"==typeof r.then)return Se(r,n);n(null,r)},function(...e){var n=e.pop();return t.call(this,e,n)});var t}function Se(e,t){return e.then((e=>{Ce(t,null,e)}),(e=>{Ce(t,e&&(e instanceof Error||e.message)?e:new Error(e))}))}function Ce(e,t,n){try{e(t,n)}catch(e){be((e=>{throw e}),e)}}function Ae(e){return"AsyncFunction"===e[Symbol.toStringTag]}function Re(e){if("function"!=typeof e)throw new Error("expected a function");return Ae(e)?je(e):e}function Ie(e,t){if(t||(t=e.length),!t)throw new Error("arity is undefined");return function(...n){return"function"==typeof n[t-1]?e.apply(this,n):new Promise(((r,i)=>{n[t-1]=(e,...t)=>{if(e)return i(e);r(t.length>1?t:t[0])},e.apply(this,n)}))}}function Te(e){return function(t,...n){return Ie((function(r){var i=this;return e(t,((e,t)=>{Re(e).apply(i,n.concat(t))}),r)}))}}function Ee(e,t,n,r){t=t||[];var i=[],s=0,o=Re(n);return e(t,((e,t,n)=>{var r=s++;o(e,((e,t)=>{i[r]=t,n(e)}))}),(e=>{r(e,i)}))}function Oe(e){return e&&"number"==typeof e.length&&e.length>=0&&e.length%1==0}const _e={};function Me(e){function t(...t){if(null!==e){var n=e;e=null,n.apply(this,t)}}return Object.assign(t,e),t}function Le(e){return function(...t){if(null===e)throw new Error("Callback was already called.");var n=e;e=null,n.apply(this,t)}}function Pe(e,t,n,r){let i=!1,s=!1,o=!1,a=0,u=0;function l(){a>=t||o||i||(o=!0,e.next().then((({value:e,done:t})=>{if(!s&&!i){if(o=!1,t)return i=!0,void(a<=0&&r(null));a++,n(e,u,d),u++,l()}})).catch(c))}function d(e,t){if(a-=1,!s)return e?c(e):!1===e?(i=!0,void(s=!0)):t===_e||i&&a<=0?(i=!0,r(null)):void l()}function c(e){s||(o=!1,i=!0,r(e))}l()}var We=e=>(t,n,r)=>{if(r=Me(r),e<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!t)return r(null);if("AsyncGenerator"===t[Symbol.toStringTag])return Pe(t,e,n,r);if(function(e){return"function"==typeof e[Symbol.asyncIterator]}(t))return Pe(t[Symbol.asyncIterator](),e,n,r);var i=function(e){if(Oe(e))return function(e){var t=-1,n=e.length;return function(){return++t<n?{value:e[t],key:t}:null}}(e);var t=function(e){return e[Symbol.iterator]&&e[Symbol.iterator]()}(e);return t?function(e){var t=-1;return function(){var n=e.next();return n.done?null:(t++,{value:n.value,key:t})}}(t):function(e){var t=e?Object.keys(e):[],n=-1,r=t.length;return function i(){var s=t[++n];return"__proto__"===s?i():n<r?{value:e[s],key:s}:null}}(e)}(t),s=!1,o=!1,a=0,u=!1;function l(e,t){if(!o)if(a-=1,e)s=!0,r(e);else if(!1===e)s=!0,o=!0;else{if(t===_e||s&&a<=0)return s=!0,r(null);u||d()}}function d(){for(u=!0;a<e&&!s;){var t=i();if(null===t)return s=!0,void(a<=0&&r(null));a+=1,n(t.value,t.key,Le(l))}u=!1}d()},Ne=Ie((function(e,t,n,r){return We(t)(e,Re(n),r)}),4);function ke(e,t,n){n=Me(n);var r=0,i=0,{length:s}=e,o=!1;function a(e,t){!1===e&&(o=!0),!0!==o&&(e?n(e):++i!==s&&t!==_e||n(null))}for(0===s&&n(null);r<s;r++)t(e[r],r,Le(a))}function De(e,t,n){return Ne(e,1/0,t,n)}var xe=Ie((function(e,t,n){return(Oe(e)?ke:De)(e,Re(t),n)}),3),Fe=Ie((function(e,t,n){return Ee(xe,e,t,n)}),3);Te(Fe);var Be=Ie((function(e,t,n){return Ne(e,1,t,n)}),3);Te(Ie((function(e,t,n){return Ee(Be,e,t,n)}),3)),Symbol("promiseCallback"),Symbol.iterator,Ie((function(e,t,n,r){r=Me(r);var i=Re(n);return Be(e,((e,n,r)=>{i(t,e,((e,n)=>{t=n,r(e)}))}),(e=>r(e,t)))}),4);var qe=Ie((function(e,t,n,r){return Ee(We(t),e,n,r)}),4),Ue=Ie((function(e,t,n,r){var i=Re(n);return qe(e,t,((e,t)=>{i(e,((e,...n)=>e?t(e):t(e,n)))}),((e,t)=>{for(var n=[],i=0;i<t.length;i++)t[i]&&(n=n.concat(...t[i]));return r(e,n)}))}),4);function $e(e,t){return(n,r,i,s)=>{var o,a=!1;const u=Re(i);n(r,((n,r,i)=>{u(n,((r,s)=>r||!1===r?i(r):e(s)&&!o?(a=!0,o=t(!0,n),i(null,_e)):void i()))}),(e=>{if(e)return s(e);s(null,a?o:t(!1))}))}}function Je(e){return(t,...n)=>Re(t)(...n,((t,...n)=>{"object"==typeof console&&(t?console.error&&console.error(t):console[e]&&n.forEach((t=>console[e](t))))}))}function He(e){return(t,n,r)=>e(t,r)}Ie((function(e,t,n){return Ue(e,1/0,t,n)}),3),Ie((function(e,t,n){return Ue(e,1,t,n)}),3),Ie((function(e,t,n){return $e((e=>e),((e,t)=>t))(xe,e,t,n)}),3),Ie((function(e,t,n,r){return $e((e=>e),((e,t)=>t))(We(t),e,n,r)}),4),Ie((function(e,t,n){return $e((e=>e),((e,t)=>t))(We(1),e,t,n)}),3),Je("dir"),Ie((function(e,t,n){n=Le(n);var r,i=Re(e),s=Re(t);function o(e,...t){if(e)return n(e);!1!==e&&(r=t,s(...t,a))}function a(e,t){return e?n(e):!1!==e?t?void i(o):n(null,...r):void 0}return a(null,!0)}),3);var Ve=Ie((function(e,t,n){return xe(e,He(Re(t)),n)}),3),ze=Ie((function(e,t,n,r){return We(t)(e,He(Re(n)),r)}),4),Ge=Ie((function(e,t,n){return ze(e,1,t,n)}),3);function Ye(e,t,n,r){var i=new Array(t.length);e(t,((e,t,r)=>{n(e,((e,n)=>{i[t]=!!n,r(e)}))}),(e=>{if(e)return r(e);for(var n=[],s=0;s<t.length;s++)i[s]&&n.push(t[s]);r(null,n)}))}function Qe(e,t,n,r){var i=[];e(t,((e,t,r)=>{n(e,((n,s)=>{if(n)return r(n);s&&i.push({index:t,value:e}),r(n)}))}),(e=>{if(e)return r(e);r(null,i.sort(((e,t)=>e.index-t.index)).map((e=>e.value)))}))}function Ke(e,t,n,r){return(Oe(t)?Ye:Qe)(e,t,Re(n),r)}Ie((function(e,t,n){return $e((e=>!e),(e=>!e))(xe,e,t,n)}),3),Ie((function(e,t,n,r){return $e((e=>!e),(e=>!e))(We(t),e,n,r)}),4),Ie((function(e,t,n){return $e((e=>!e),(e=>!e))(Be,e,t,n)}),3),Ie((function(e,t,n){return Ke(xe,e,t,n)}),3),Ie((function(e,t,n,r){return Ke(We(t),e,n,r)}),4),Ie((function(e,t,n){return Ke(Be,e,t,n)}),3),Ie((function(e,t){var n=Le(t),r=Re(function(e){return Ae(e)?e:function(...t){var n=t.pop(),r=!0;t.push(((...e)=>{r?be((()=>n(...e))):n(...e)})),e.apply(this,t),r=!1}}(e));return function e(t){if(t)return n(t);!1!==t&&r(e)}()}),2),Ie((function(e,t,n,r){var i=Re(n);return qe(e,t,((e,t)=>{i(e,((n,r)=>n?t(n):t(n,{key:r,val:e})))}),((e,t)=>{for(var n={},{hasOwnProperty:i}=Object.prototype,s=0;s<t.length;s++)if(t[s]){var{key:o}=t[s],{val:a}=t[s];i.call(n,o)?n[o].push(a):n[o]=[a]}return r(e,n)}))}),4),Je("log"),Ie((function(e,t,n,r){r=Me(r);var i={},s=Re(n);return We(t)(e,((e,t,n)=>{s(e,t,((e,r)=>{if(e)return n(e);i[t]=r,n(e)}))}),(e=>r(e,i)))}),4),we(me?process.nextTick:ge?setImmediate:ve);var Ze=Ie(((e,t,n)=>{var r=Oe(t)?[]:{};e(t,((e,t,n)=>{Re(e)(((e,...i)=>{i.length<2&&([i]=i),r[t]=i,n(e)}))}),(e=>n(e,r)))}),3);function Xe(e,t,n,r){const i=Re(n);return Ke(e,t,((e,t)=>{i(e,((e,n)=>{t(e,!n)}))}),r)}Symbol.iterator,Ie((function(e,t){if(t=Me(t),!Array.isArray(e))return t(new TypeError("First argument to race must be an array of functions"));if(!e.length)return t();for(var n=0,r=e.length;n<r;n++)Re(e[n])(t)}),2),Ie((function(e,t,n){return Xe(xe,e,t,n)}),3),Ie((function(e,t,n,r){return Xe(We(t),e,n,r)}),4),Ie((function(e,t,n){return Xe(Be,e,t,n)}),3),Ie((function(e,t,n){return $e(Boolean,(e=>e))(xe,e,t,n)}),3),Ie((function(e,t,n,r){return $e(Boolean,(e=>e))(We(t),e,n,r)}),4),Ie((function(e,t,n){return $e(Boolean,(e=>e))(Be,e,t,n)}),3),Ie((function(e,t,n){var r=Re(t);return Fe(e,((e,t)=>{r(e,((n,r)=>{if(n)return t(n);t(n,{value:e,criteria:r})}))}),((e,t)=>{if(e)return n(e);n(null,t.sort(i).map((e=>e.value)))}));function i(e,t){var n=e.criteria,r=t.criteria;return n<r?-1:n>r?1:0}}),3),Ie((function(e,t){var n,r=null;return Ge(e,((e,t)=>{Re(e)(((e,...i)=>{if(!1===e)return t(e);i.length<2?[n]=i:n=i,r=e,t(e?null:{})}))}),(()=>t(r,n)))})),Ie((function(e,t,n){n=Le(n);var r=Re(t),i=Re(e),s=[];function o(e,...t){if(e)return n(e);s=t,!1!==e&&i(a)}function a(e,t){return e?n(e):!1!==e?t?void r(o):n(null,...s):void 0}return i(a)}),3),Ie((function(e,t){if(t=Me(t),!Array.isArray(e))return t(new Error("First argument to waterfall must be an array of functions"));if(!e.length)return t();var n=0;function r(t){Re(e[n++])(...t,Le(i))}function i(i,...s){if(!1!==i)return i||n===e.length?t(i,...s):void r(s)}r([])}));var et=n(37007);const tt={EVENTS:["title-changed","bringToFront","setBounds","alwaysOnTop","setOpacity"]},nt="Finsemble.Application.State",rt="Finsemble.ServiceManager.serviceInitializing",it="Finsemble.ServiceManager.serviceReady",st="Finsemble.ServiceManager.serviceClosing",ot="Finsemble.ServiceManager.serviceClosed",at=e=>`Finsemble.ServiceManager.queryReady.${e}`,ut=e=>({authenticationClient:"authenticationService",configClient:"configService",distributedStoreClient:"dataStoreService",hotkeyClient:"hotkeysService",linkerClient:"linkerService",logger:"loggerService",searchClient:"searchService",storageClient:"storageService",windowClient:"windowService",workspaceClient:"workspaceService"}[e]),lt="Finsemble.State.Services";var dt;!function(e){e[e.NORMAL=0]="NORMAL",e[e.MINIMIZED_WAS_NORMAL=1]="MINIMIZED_WAS_NORMAL",e[e.MAXIMIZED=2]="MAXIMIZED",e[e.MINIMIZED_WAS_MAXIMIZED=3]="MINIMIZED_WAS_MAXIMIZED"}(dt||(dt={}));const ct="Finsemble.Service.Start",pt="Finsemble.Service.Stop",ft="Finsemble.Event.Interrupt",yt=["close-requested","closed","close-complete","_container-close-handlers"],ht={DELAYABLE_EVENTS:["close-requested","closed","close-complete","_container-close-handlers"],CANCELABLE_EVENTS:["close-requested"]},gt={DELAYABLE_EVENTS:["load-requested","close-requested","save-requested"],CANCELABLE_EVENTS:["close-requested"],CLEAN_SHUTDOWN:"Finsemble.Workspace.cleanShutdown",WORKSPACE_UPDATED:"Finsemble.WorkspaceService.update",RELOAD_GROUPS:"Finsemble.WorkspaceService.reloadGroups",STORAGE_TOPIC:"finsemble.workspace",CACHE_STORAGE_TOPIC:"finsemble.workspace.cache",ALL_WORKSPACES:"finsemble.allWorkspaces",ACTIVE_WORKSPACE:"activeWorkspace",LAST_USED_WORKSPACE_TOPIC:"finsemble",LAST_USED_WORKSPACE_NAME:"finsemble.lastUsedWorkspace.name",LAST_USED_WORKSPACE:"finsemble.lastUsedWorkspace",INITIAL_WORKSPACE_PREFERENCE:"finsemble.initialWorkspace",PUBLISH_REASONS:{INIT:"workspace:initialization",LOAD_DATA_RETRIEVED:"workspace:load:dataRetrieved",LOAD_FINISHED:"workspace:load:finished",WINDOW_REMOVED:"window:remove",WINDOW_ADDED:"window:add",LOAD_STARTED:"workspace:load:start",WORKSPACE_REMOVED:"Workspace:remove",WORKSPACE_RENAMED:"rename",SWITCHTO_TERMINATED:"workspace:switchTo:terminated",NEW_WORKSPACE:"new workspace",SAVE_AS:"APPLICATION LIFECYCLE:WORKSPACE LIFECYCLE:SaveAs:Workspace:Save As"},API_CHANNELS:{NEW_WORKSPACE:"Finsemble.Workspace.NewWorkspace",SAVE:"Finsemble.Workspace.Save",RENAME:"Finsemble.Workspace.Rename",SAVE_AS:"Finsemble.Workspace.SaveAs",SWITCH_TO:"Finsemble.Workspace.SwitchTo",IMPORT:"Finsemble.Workspace.Import",EXPORT:"Finsemble.Workspace.Export",REMOVE:"Finsemble.Workspace.Remove",SAVE_GLOBAL_DATA:"Finsemble.Workspace.SaveGlobalData",SAVE_VIEW_DATA:"Finsemble.Workspace.SaveViewData",GET_GLOBAL_DATA:"Finsemble.Workspace.GetGlobalData",GET_VIEW_DATA:"Finsemble.Workspace.GetViewData",GET_WORKSPACES:"Finsemble.Workspace.GetWorkspaces",GET_WORKSPACE_NAMES:"Finsemble.Workspace.GetWorkspaceNames",SET_WORKSPACE_ORDER:"Finsemble.Workspace.SetWorkspaceOrder",GET_ACTIVE_WORKSPACE:"Finsemble.Workspace.GetActiveWorkspace",GET_ACTIVE_WORKSPACE_DIRTY:"Finsemble.Workspace.GetActiveWorkspaceDirty",GET_TEMPLATES:"Finsemble.Workspace.GetTemplates",IMPORT_TEMPLATE:"Finsemble.Workspace.ImportTemplate",EXPORT_TEMPLATE:"Finsemble.Workspace.ExportTemplate",REMOVE_TEMPLATE:"Finsemble.Workspace.RemoveTemplate",SET_WINDOW_STATE:"Finsemble.Workspace.SetWindowData",GET_WINDOW_STATE:"Finsemble.Workspace.GetWindowData",ADD_WINDOW:"WorkspaceService.addWindow",REMOVE_WINDOW:"WorkspaceService.removeWindow",GET_MANY_WINDOW_STATES:"Finsemble.Workspace.GetWindowDataMultiple",SETUP_INITIAL_WORKSPACE:"Finsemble.Workspace.SetupInitialWorkspace"},DEFAULT_WINDOW_PROPS:["name","componentType","windowType","alwaysOnTop","autoShow","minWidth","minHeight","maxWidth","maxHeight","resizable","maximizable","minimizable","opacity","windowState","left","top","width","height","right","bottom","defaultLeft","defaultTop","defaultWidth","defaultHeight","defaultRight","defaultBottom","monitorInfo","icon","cachedBounds","showTaskbarIcon","isEvergreen","launchGroupComponentData","allowAutoArrange"],ADDITIONAL_WINDOW_PROPS:{WebWindow:["url","fullscreen","frame","backgroundColor","transparent","waitForPageLoad","affinity","appUUID"],NativeWindow:["path","alias","arguments","argumentsAsQueryString","isWPF"]}},mt={REMOTE_FOCUS:"WindowService.remoteFocus",SET_ALWAYS_ON_TOP:"WindowService-Request-setAlwaysOnTop",IS_ALWAYS_ON_TOP:"WindowService-Request-isAlwaysOnTop"},vt="finsemble.componentStateStorage",wt="Finsemble.WindowService.HeartbeatTimeout",bt={WINDOW_CLOSED:"LauncherService.WindowClosed"},jt={AERO_KEY:"aero_key",SYSTEM_RESTORED:"system_restored"};class St extends et.EventEmitter{constructor(e){var t;super(),this.callback=e.callback,this.dependencies=e.dependencies,this.startupTimer=null,this.whoAmI=null!==(t=e.whoAmI)&&void 0!==t?t:"Source unknown. Look for `waitFor()` and add third parameter",this.setStartupTimer=this.setStartupTimer.bind(this),this.clearStartupTimer=this.clearStartupTimer.bind(this)}clearStartupTimer(){this.startupTimer&&clearTimeout(this.startupTimer),this.startupTimer=null}setStartupTimer(){const e=this;this.startupTimer=+setTimeout((()=>{e.emit("timeout"),this.callback("StartupDependency timeout error")}),1e4)}}function Ct(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}class At{constructor(){this.servicesAreAllOnline={},this.clientsAreAllOnline={},this.onlineClients=[],this.dependencies={},this.startupTimers={},this.startupTimerFired=!1,this.bindCorrectContext()}waitFor(e,t,n){const r=Ct();e.clients||(e.clients=[]),e.clients.length&&(e.clients=e.clients.map((e=>e.charAt(0).toLowerCase()+e.slice(1))));const i=new St({dependencies:e,callback:t,whoAmI:n});return i.setStartupTimer(),i.on("timeout",(()=>{this.onDependencyTimeout(i)})),this.dependencies[r]=i,this.checkDependencies(),i}onDependencyTimeout(e){const t=this.getOfflineClients();let n=`APPLICATION LIFECYCLE:STARTUP:Dependency (${e.whoAmI}) not online after 10 seconds.`;t.length&&(n=`${n} Waiting for these clients: ${t.join(", ")}.`),fe.system.warn(n),e.emit("err",n)}checkDependencies(){for(const e in this.dependencies){const t=this.dependencies[e],{dependencies:n,callback:r}=t;(!n.clients.length||this.clientsAreAllOnline[e]||(this.clientsAreAllOnline[e]=this.checkClients(n.clients),this.clientsAreAllOnline[e]))&&(delete this.dependencies[e],t.clearStartupTimer(),r&&r())}}getOfflineClients(){let e=[];for(const t in this.dependencies){const{dependencies:n}=this.dependencies[t];e=e.concat(n.clients.filter((e=>!this.onlineClients.includes(e))))}return e.filter(((t,n)=>e.indexOf(t)===n))}checkClients(e){return e.every((e=>this.onlineClients.includes(e)))}setClientOnline(e){this.onlineClients.includes(e)||(this.onlineClients.push(e),this.checkDependencies())}getOnlineClients(){return this.onlineClients}bindCorrectContext(){this.checkDependencies=this.checkDependencies.bind(this),this.checkClients=this.checkClients.bind(this),this.getOfflineClients=this.getOfflineClients.bind(this),this.onDependencyTimeout=this.onDependencyTimeout.bind(this),this.waitFor=this.waitFor.bind(this)}}class Rt{constructor(){this.offlineServices=[],this.dependencies={},this.checkDependencies=this.checkDependencies.bind(this)}waitFor(e,t){fe.system.debug("DependencyManager:waitFor",e),e.services||(e.services=[]);const n=Ct();this.dependencies[n]={dependencies:e,callback:t}}checkDependencies(){if(console.debug("checkDependencies",this.dependencies),Object.keys(this.dependencies))for(const e in this.dependencies){const{dependencies:t,callback:n}=this.dependencies[e];(fe.system.debug("DependencyManager:checkDependency",t.services,this.offlineServices),!t.services.length||this.checkServices(t.services))&&(console.debug("checkDependencies callback"),delete this.dependencies[e],n&&n())}}checkServices(e){return e.every((e=>this.offlineServices.includes(e)))}setServiceOffline(e){fe.system.debug("setServiceOffline",e),console.debug("setServiceOffline",e),this.offlineServices.push(e),this.checkDependencies()}}class It extends et.EventEmitter{constructor(){super(),this.startup=new At,this.shutdown=new Rt,this.RouterClient=P,this.AuthorizationCompleted=!1,this.bindCorrectContext(),this.onAuthorizationCompleted(this.startup.checkDependencies),g.getInstance().onReady(this.listenForServices)}bindCorrectContext(){this.listenForServices=this.listenForServices.bind(this),this.onAuthorizationCompleted=this.onAuthorizationCompleted.bind(this)}setClientOnline(e){this.startup.setClientOnline(e)}onServiceStateChange(e){Object.keys(e).forEach((t=>{const{state:n}=e[t];"closed"===n&&this.shutdown.setServiceOffline(t)}))}listenForServices(){fe.system.debug("DependencyManager:listenForServices before wait"),A.waitForBootStage("kernel","stageEntered",(()=>{fe.system.debug("DependencyManager:listenForServices after wait"),this.RouterClient.subscribe(lt,((e,t)=>{fe.system.debug("DependencyManager:listenForServices SERVICES_STATE_CHANNEL",t.data),this.onServiceStateChange(t.data)})),this.RouterClient.addListener(ot,((e,t)=>{fe.system.debug("DependencyManager:listenForServices SERVICE_CLOSED_CHANNEL",t.data);const n={};n[t.data.name]={state:"closed"},this.onServiceStateChange(n)})),this.RouterClient.subscribe(nt,((e,t)=>{switch(t.data.state){case"authenticated":case"ready":default:break;case"closing":this.shutdown.checkDependencies()}}))}))}onAuthorizationCompleted(e){this.AuthorizationCompleted?e():this.addListener("AuthorizationCompleted",e)}}const Tt=new It,Et=async()=>new Promise((e=>{x.getManifest((t=>{e({err:null,data:t})}))})),Ot=(e,t)=>{var n,r;return null!==(n=e.finsemble[t])&&void 0!==n?n:null===(r=e.finsemble)||void 0===r?void 0:r.custom[t]},_t=(e,t)=>{let n=!1;const r=t.split(/[/\\:?=&\s]/);for(let i=0;i<r.length;i++)if("$"===r[i][0]){const s=r[i].substring(1),o=Ot(e,s);if(void 0===o)ye.system.warn("ConfigUtil.resolveString",`Missing [${s}] variable from finsemble.custom configuration object`);else{const e=t.replace(r[i],o);ye.system.verbose("forceObjectsToLogger","ConfigUtil.resolveManifestMacros:resolveString configString",r[i],s,o,"old value=",t,"value=",e),n=!0,t=e}}return{configString:t,replacedMacro:n}},Mt=(e,t,n)=>{let r=!1;if(n>1e3)return ye.system.error("ConfigUtil resolveArray maxiumum recursion level reached"),{replacedMacro:r};ye.system.verbose("forceObjectsToLogger","resolveArray","recursionLevel",n,"configArray:",t);for(let i=0;i<t.length;i++){const s=t[i];if("string"==typeof s&&s.indexOf("$")>-1){const n=_t(e,s);t[i]=n.configString,r=r||n.replacedMacro}else s instanceof Array?Mt(e,s,n+1):"object"==typeof s&&Lt(e,s,n+1)}return{replacedMacro:r}},Lt=(e,t,n)=>{let r=!1;return n>1e3?(ye.system.error("ConfigUtil resolveObject maxiumum recursion level reached"),{replacedMacro:r}):(t=t||{},ye.system.verbose("forceObjectsToLogger","ConfigUtil.resolveManifestMacros:resolveObject","recursionLevel",n,"configObject:",t),Object.keys(t).forEach((i=>{const s=t[i];if("string"==typeof s&&s.indexOf("$")>-1){const n=_t(e,s);t[i]=n.configString,r=r||n.replacedMacro}else s instanceof Array?Mt(e,s,n+1):"object"==typeof s&&Lt(e,s,n+1)})),{replacedMacro:r})},Pt=new class{resolveManifestMacros(e,t){let n;for(n=0;n<100;n++){const{replacedMacro:n}=Lt(e,t,1);if(!n)break}n>=100&&ye.system.error("forceObjectsToLogger","resolveManifestMacros exceeded maximum passes so continuing -- probably a recursive macro definitions. Look in this config for unresolved macro variables",e)}async getExpandedRawManifest(){ye.system.debug("ConfigUtil.getExpandedRawManifest starting");const{err:e,data:t}=await Et();return e||!t?ye.system.error("ConfigUtil.getExpandedRawManifest:application.getManifest:err",e):(ye.system.debug("forceObjectsToLogger","ConfigUtil.getExpandedRawManifest:getExpandedRawManifest: manifest retrieved. Pre-variable resolution",t),this.resolveManifestMacros(t,t.finsemble),ye.system.debug("forceObjectsToLogger","ConfigUtil.getExpandedRawManifest:getExpandedRawManifest:Complete. post-variable resolution",t)),{err:e,data:t}}async captureAndLogBadFileData(e){let t,n=null;ye.system.debug(`captureAndLogBadFileData for ${e}`);try{const r=await fetch(e,{credentials:"include",cache:"no-cache"});200!=r.status?n=`HTTP get error for ${e}: ${r.status} ${r.statusText}}`:t=await r.text()}catch(t){n=`Failure importing config from ${e} ${t.toString()}`}n?ye.system.error("forceObjectsToLogger",`captureAndLogBadFileData failed for ${e}`,n):ye.system.error("forceObjectsToLogger",`captureAndLogBadFileData successful for ${e}`,t)}async fetchConfigFile(e){let t,n=null;ye.system.debug(`fetching import ${e}`);try{const r=await fetch(e,{credentials:"include",cache:"no-cache"});200!=r.status?n=`HTTP get error for ${e}: ${r.status} ${r.statusText}`:t=await r.json()}catch(t){n=`Failure importing config from ${e} ${t.toString()}`}return n&&(ye.system.error("forceObjectsToLogger",n),this.captureAndLogBadFileData(e)),{err:n,data:t}}graftImportOnToManifest(e,t){Object.keys(t).forEach((n=>{if("importConfig"===n){e.finsemble.importConfig=e.finsemble.importConfig||[];for(let n=0;n<t.importConfig.length;n++)e.finsemble.importConfig.unshift(t.importConfig[n])}else if("importThirdPartyConfig"===n){e.finsemble.importThirdPartyConfig=e.finsemble.importThirdPartyConfig||[];for(let n=0;n<t.importThirdPartyConfig.length;n++)e.finsemble.importThirdPartyConfig.unshift(t.importThirdPartyConfig[n])}else e.finsemble[n]=t[n]})),this.resolveManifestMacros(e,e.finsemble),ye.system.debug("forceObjectsToLogger","ConfigUtil.getInitialManifest:getCoreConfig:Initial Manifest after variables Resolved",e)}async getInitialManifest(){const{err:e,data:t}=await Et();if(!e&&t){t.finsemble=t.finsemble||{},this.resolveManifestMacros(t,t.finsemble),t.finsemble.applicationRoot||ye.system.error("FATAL ERROR: applicationRoot was not defined in manifest file.");const e=`${t.finsemble.moduleRoot}/configs/core/config.json`,{err:n,data:r}=await this.fetchConfigFile(e);!n&&r?this.graftImportOnToManifest(t,r):ye.system.error(`ConfigUtil.getInitialManifest:getCoreConfig:failed importing into finsemble config. $moduleRoot=${t.finsemble.moduleRoot}; Full Path=${e}`,n)}return{err:e,data:t}}promptAndSaveJSONToLocalFile(e,t){ye.system.debug("saveJSONToLocalFile",e,t);const n=JSON.stringify(t,null,"\t"),r=`data:application/json;charset=utf-8,${encodeURIComponent(n)}`,i=`${e}.json`,s=document.createElement("a");s.setAttribute("href",r),s.setAttribute("download",i),s.click()}configFormatForExport(e,t){ye.system.debug("configFormatForExport starting",e,t);let n=B().cloneDeep(t);if("raw"===e);else if("all"===e)delete n.importConfig,delete n.comment;else if("application"===e)delete n.importConfig,delete n.comment,delete n.system,delete n.services;else if("workspace"===e)n={workspace:n};else if("workspaceTemplate"===e){const e={};e[n.name]=n,n={workspaceTemplates:e}}else"services"===e?n=n.services:"components"===e&&(n=n.components);return n}getDefault(e,t,n){let r=n;if(e){try{const n=t.split(".");let i=e;for(let e=1;e<n.length;e++)i=i[n[e]];r=i}catch(e){r=n}void 0===r&&(r=n)}return r}logDeprecation(e){let t=ye.system.warn;return"error"===e&&(t=ye.system.error),t}},Wt={sameDomainTransport:"FinsembleTransport",crossDomainTransport:"FinsembleTransport",transportSettings:{FinsembleTransport:{serverAddress:"ws://127.0.0.1:3376"}},transportName:"FinsembleTransport"},Nt=e=>{if(!e)return fe.system.error("No documentRoot provided to RouterConfig.isCrossDomain(). Check the moduleRoot entry of the manifest."),!0;const t=document.createElement("a");t.href=e;const n=window.location.hostname===t.hostname,r=window.location.protocol===t.protocol,i=(void 0!==window.location.port?window.location.port:80)===(void 0!==t.port?t.port:80),s=n&&i&&r;return fe.system.debug(`Transport crossDomain=${Nt} (${n}:${r}:${i})`),!s},kt=(e,t)=>{const{moduleRoot:n,router:r}=null==e?void 0:e.finsemble,i="IPCBus",s="SharedWorker",{sameDomainTransport:o=s,crossDomainTransport:a=i}=null!=r?r:{};let u=Nt(n)?a:o;return t&&u===s&&(u="SharedWorkerForCoreServices"),u};function Dt(e,t,n,r){void 0===r&&(r="");var i=xt(e),s=r?" on ".concat(r):"",o=n?' for key "'.concat(n,'"'):"";throw Error("Invalid value".concat(o).concat(s,". Expected ").concat(i," but got ").concat(JSON.stringify(t)))}function xt(e){return Array.isArray(e)?2===e.length&&void 0===e[0]?"an optional ".concat(xt(e[1])):"one of [".concat(e.map((function(e){return xt(e)})).join(", "),"]"):"object"==typeof e&&void 0!==e.literal?e.literal:typeof e}function Ft(e){if(void 0===e.jsonToJS){var t={};e.props.forEach((function(e){return t[e.json]={key:e.js,typ:e.typ}})),e.jsonToJS=t}return e.jsonToJS}function Bt(e){if(void 0===e.jsToJSON){var t={};e.props.forEach((function(e){return t[e.js]={key:e.json,typ:e.typ}})),e.jsToJSON=t}return e.jsToJSON}function qt(e,t,n,r,i){if(void 0===r&&(r=""),void 0===i&&(i=""),"any"===t)return e;if(null===t)return null===e?e:Dt(t,e,r,i);if(!1===t)return Dt(t,e,r,i);for(var s=void 0;"object"==typeof t&&void 0!==t.ref;)s=t.ref,t=tn[t.ref];return Array.isArray(t)?function(e,t){return-1!==e.indexOf(t)?t:Dt(e.map((function(e){return Jt(e)})),t,r,i)}(t,e):"object"==typeof t?t.hasOwnProperty("unionMembers")?function(e,t){for(var s=e.length,o=0;o<s;o++){var a=e[o];try{return qt(t,a,n)}catch(e){}}return Dt(e,t,r,i)}(t.unionMembers,e):t.hasOwnProperty("arrayItems")?function(e,t){return Array.isArray(t)?t.map((function(t){return qt(t,e,n)})):Dt(Jt("array"),t,r,i)}(t.arrayItems,e):t.hasOwnProperty("props")?function(e,t,o){if(null===o||"object"!=typeof o||Array.isArray(o))return Dt(Jt(s||"object"),o,r,i);var a={};return Object.getOwnPropertyNames(e).forEach((function(t){var r=e[t],i=Object.prototype.hasOwnProperty.call(o,t)?o[t]:void 0;a[r.key]=qt(i,r.typ,n,t,s)})),Object.getOwnPropertyNames(o).forEach((function(r){Object.prototype.hasOwnProperty.call(e,r)||(a[r]=qt(o[r],t,n,r,s))})),a}(n(t),t.additional,e):Dt(t,e,r,i):t===Date&&"number"!=typeof e?function(e){if(null===e)return null;var t=new Date(e);return isNaN(t.valueOf())?Dt(Jt("Date"),e,r,i):t}(e):function(e,t){return typeof e==typeof t?t:Dt(e,t,r,i)}(t,e)}function Ut(e,t){return qt(e,t,Ft)}function $t(e,t){return qt(e,t,Bt)}function Jt(e){return{literal:e}}function Ht(e){return{arrayItems:e}}function Vt(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return{unionMembers:e}}function zt(e,t){return{props:e,additional:t}}function Gt(e){return{props:[],additional:e}}function Yt(e){return{ref:e}}!function(){function e(){}e.toFDC3DesktopAgentAPISchema=function(e){return Ut(JSON.parse(e),"any")},e.fDC3DesktopAgentAPISchemaToJson=function(e){return JSON.stringify($t(e,"any"),null,2)},e.toAgentErrorResponseMessage=function(e){return Ut(JSON.parse(e),Yt("AgentErrorResponseMessage"))},e.agentErrorResponseMessageToJson=function(e){return JSON.stringify($t(e,Yt("AgentErrorResponseMessage")),null,2)},e.toAgentRequestMessage=function(e){return Ut(JSON.parse(e),Yt("AgentRequestMessage"))},e.agentRequestMessageToJson=function(e){return JSON.stringify($t(e,Yt("AgentRequestMessage")),null,2)},e.toAgentResponseMessage=function(e){return Ut(JSON.parse(e),Yt("AgentResponseMessage"))},e.agentResponseMessageToJson=function(e){return JSON.stringify($t(e,Yt("AgentResponseMessage")),null,2)},e.toBridgeErrorResponseMessage=function(e){return Ut(JSON.parse(e),Yt("BridgeErrorResponseMessage"))},e.bridgeErrorResponseMessageToJson=function(e){return JSON.stringify($t(e,Yt("BridgeErrorResponseMessage")),null,2)},e.toBridgeRequestMessage=function(e){return Ut(JSON.parse(e),Yt("BridgeRequestMessage"))},e.bridgeRequestMessageToJson=function(e){return JSON.stringify($t(e,Yt("BridgeRequestMessage")),null,2)},e.toBridgeResponseMessage=function(e){return Ut(JSON.parse(e),Yt("BridgeResponseMessage"))},e.bridgeResponseMessageToJson=function(e){return JSON.stringify($t(e,Yt("BridgeResponseMessage")),null,2)},e.toBroadcastAgentRequest=function(e){return Ut(JSON.parse(e),Yt("BroadcastAgentRequest"))},e.broadcastAgentRequestToJson=function(e){return JSON.stringify($t(e,Yt("BroadcastAgentRequest")),null,2)},e.toBroadcastBridgeRequest=function(e){return Ut(JSON.parse(e),Yt("BroadcastBridgeRequest"))},e.broadcastBridgeRequestToJson=function(e){return JSON.stringify($t(e,Yt("BroadcastBridgeRequest")),null,2)},e.toBridgingCommons=function(e){return Ut(JSON.parse(e),Gt("any"))},e.bridgingCommonsToJson=function(e){return JSON.stringify($t(e,Gt("any")),null,2)},e.toConnectionStepMessage=function(e){return Ut(JSON.parse(e),Yt("ConnectionStepMessage"))},e.connectionStepMessageToJson=function(e){return JSON.stringify($t(e,Yt("ConnectionStepMessage")),null,2)},e.toConnectionStep2Hello=function(e){return Ut(JSON.parse(e),Yt("ConnectionStep2Hello"))},e.connectionStep2HelloToJson=function(e){return JSON.stringify($t(e,Yt("ConnectionStep2Hello")),null,2)},e.toConnectionStep3Handshake=function(e){return Ut(JSON.parse(e),Yt("ConnectionStep3Handshake"))},e.connectionStep3HandshakeToJson=function(e){return JSON.stringify($t(e,Yt("ConnectionStep3Handshake")),null,2)},e.toConnectionStep4AuthenticationFailed=function(e){return Ut(JSON.parse(e),Yt("ConnectionStep4AuthenticationFailed"))},e.connectionStep4AuthenticationFailedToJson=function(e){return JSON.stringify($t(e,Yt("ConnectionStep4AuthenticationFailed")),null,2)},e.toConnectionStep6ConnectedAgentsUpdate=function(e){return Ut(JSON.parse(e),Yt("ConnectionStep6ConnectedAgentsUpdate"))},e.connectionStep6ConnectedAgentsUpdateToJson=function(e){return JSON.stringify($t(e,Yt("ConnectionStep6ConnectedAgentsUpdate")),null,2)},e.toFindInstancesAgentErrorResponse=function(e){return Ut(JSON.parse(e),Yt("FindInstancesAgentErrorResponse"))},e.findInstancesAgentErrorResponseToJson=function(e){return JSON.stringify($t(e,Yt("FindInstancesAgentErrorResponse")),null,2)},e.toFindInstancesAgentRequest=function(e){return Ut(JSON.parse(e),Yt("FindInstancesAgentRequest"))},e.findInstancesAgentRequestToJson=function(e){return JSON.stringify($t(e,Yt("FindInstancesAgentRequest")),null,2)},e.toFindInstancesAgentResponse=function(e){return Ut(JSON.parse(e),Yt("FindInstancesAgentResponse"))},e.findInstancesAgentResponseToJson=function(e){return JSON.stringify($t(e,Yt("FindInstancesAgentResponse")),null,2)},e.toFindInstancesBridgeErrorResponse=function(e){return Ut(JSON.parse(e),Yt("FindInstancesBridgeErrorResponse"))},e.findInstancesBridgeErrorResponseToJson=function(e){return JSON.stringify($t(e,Yt("FindInstancesBridgeErrorResponse")),null,2)},e.toFindInstancesBridgeRequest=function(e){return Ut(JSON.parse(e),Yt("FindInstancesBridgeRequest"))},e.findInstancesBridgeRequestToJson=function(e){return JSON.stringify($t(e,Yt("FindInstancesBridgeRequest")),null,2)},e.toFindInstancesBridgeResponse=function(e){return Ut(JSON.parse(e),Yt("FindInstancesBridgeResponse"))},e.findInstancesBridgeResponseToJson=function(e){return JSON.stringify($t(e,Yt("FindInstancesBridgeResponse")),null,2)},e.toFindIntentAgentErrorResponse=function(e){return Ut(JSON.parse(e),Yt("FindIntentAgentErrorResponse"))},e.findIntentAgentErrorResponseToJson=function(e){return JSON.stringify($t(e,Yt("FindIntentAgentErrorResponse")),null,2)},e.toFindIntentAgentRequest=function(e){return Ut(JSON.parse(e),Yt("FindIntentAgentRequest"))},e.findIntentAgentRequestToJson=function(e){return JSON.stringify($t(e,Yt("FindIntentAgentRequest")),null,2)},e.toFindIntentAgentResponse=function(e){return Ut(JSON.parse(e),Yt("FindIntentAgentResponse"))},e.findIntentAgentResponseToJson=function(e){return JSON.stringify($t(e,Yt("FindIntentAgentResponse")),null,2)},e.toFindIntentBridgeErrorResponse=function(e){return Ut(JSON.parse(e),Yt("FindIntentBridgeErrorResponse"))},e.findIntentBridgeErrorResponseToJson=function(e){return JSON.stringify($t(e,Yt("FindIntentBridgeErrorResponse")),null,2)},e.toFindIntentBridgeRequest=function(e){return Ut(JSON.parse(e),Yt("FindIntentBridgeRequest"))},e.findIntentBridgeRequestToJson=function(e){return JSON.stringify($t(e,Yt("FindIntentBridgeRequest")),null,2)},e.toFindIntentBridgeResponse=function(e){return Ut(JSON.parse(e),Yt("FindIntentBridgeResponse"))},e.findIntentBridgeResponseToJson=function(e){return JSON.stringify($t(e,Yt("FindIntentBridgeResponse")),null,2)},e.toFindIntentsByContextAgentErrorResponse=function(e){return Ut(JSON.parse(e),Yt("FindIntentsByContextAgentErrorResponse"))},e.findIntentsByContextAgentErrorResponseToJson=function(e){return JSON.stringify($t(e,Yt("FindIntentsByContextAgentErrorResponse")),null,2)},e.toFindIntentsByContextAgentRequest=function(e){return Ut(JSON.parse(e),Yt("FindIntentsByContextAgentRequest"))},e.findIntentsByContextAgentRequestToJson=function(e){return JSON.stringify($t(e,Yt("FindIntentsByContextAgentRequest")),null,2)},e.toFindIntentsByContextAgentResponse=function(e){return Ut(JSON.parse(e),Yt("FindIntentsByContextAgentResponse"))},e.findIntentsByContextAgentResponseToJson=function(e){return JSON.stringify($t(e,Yt("FindIntentsByContextAgentResponse")),null,2)},e.toFindIntentsByContextBridgeErrorResponse=function(e){return Ut(JSON.parse(e),Yt("FindIntentsByContextBridgeErrorResponse"))},e.findIntentsByContextBridgeErrorResponseToJson=function(e){return JSON.stringify($t(e,Yt("FindIntentsByContextBridgeErrorResponse")),null,2)},e.toFindIntentsByContextBridgeRequest=function(e){return Ut(JSON.parse(e),Yt("FindIntentsByContextBridgeRequest"))},e.findIntentsByContextBridgeRequestToJson=function(e){return JSON.stringify($t(e,Yt("FindIntentsByContextBridgeRequest")),null,2)},e.toFindIntentsByContextBridgeResponse=function(e){return Ut(JSON.parse(e),Yt("FindIntentsByContextBridgeResponse"))},e.findIntentsByContextBridgeResponseToJson=function(e){return JSON.stringify($t(e,Yt("FindIntentsByContextBridgeResponse")),null,2)},e.toGetAppMetadataAgentErrorResponse=function(e){return Ut(JSON.parse(e),Yt("GetAppMetadataAgentErrorResponse"))},e.getAppMetadataAgentErrorResponseToJson=function(e){return JSON.stringify($t(e,Yt("GetAppMetadataAgentErrorResponse")),null,2)},e.toGetAppMetadataAgentRequest=function(e){return Ut(JSON.parse(e),Yt("GetAppMetadataAgentRequest"))},e.getAppMetadataAgentRequestToJson=function(e){return JSON.stringify($t(e,Yt("GetAppMetadataAgentRequest")),null,2)},e.toGetAppMetadataAgentResponse=function(e){return Ut(JSON.parse(e),Yt("GetAppMetadataAgentResponse"))},e.getAppMetadataAgentResponseToJson=function(e){return JSON.stringify($t(e,Yt("GetAppMetadataAgentResponse")),null,2)},e.toGetAppMetadataBridgeErrorResponse=function(e){return Ut(JSON.parse(e),Yt("GetAppMetadataBridgeErrorResponse"))},e.getAppMetadataBridgeErrorResponseToJson=function(e){return JSON.stringify($t(e,Yt("GetAppMetadataBridgeErrorResponse")),null,2)},e.toGetAppMetadataBridgeRequest=function(e){return Ut(JSON.parse(e),Yt("GetAppMetadataBridgeRequest"))},e.getAppMetadataBridgeRequestToJson=function(e){return JSON.stringify($t(e,Yt("GetAppMetadataBridgeRequest")),null,2)},e.toGetAppMetadataBridgeResponse=function(e){return Ut(JSON.parse(e),Yt("GetAppMetadataBridgeResponse"))},e.getAppMetadataBridgeResponseToJson=function(e){return JSON.stringify($t(e,Yt("GetAppMetadataBridgeResponse")),null,2)},e.toOpenAgentErrorResponse=function(e){return Ut(JSON.parse(e),Yt("OpenAgentErrorResponse"))},e.openAgentErrorResponseToJson=function(e){return JSON.stringify($t(e,Yt("OpenAgentErrorResponse")),null,2)},e.toOpenAgentRequest=function(e){return Ut(JSON.parse(e),Yt("OpenAgentRequest"))},e.openAgentRequestToJson=function(e){return JSON.stringify($t(e,Yt("OpenAgentRequest")),null,2)},e.toOpenAgentResponse=function(e){return Ut(JSON.parse(e),Yt("OpenAgentResponse"))},e.openAgentResponseToJson=function(e){return JSON.stringify($t(e,Yt("OpenAgentResponse")),null,2)},e.toOpenBridgeErrorResponse=function(e){return Ut(JSON.parse(e),Yt("OpenBridgeErrorResponse"))},e.openBridgeErrorResponseToJson=function(e){return JSON.stringify($t(e,Yt("OpenBridgeErrorResponse")),null,2)},e.toOpenBridgeRequest=function(e){return Ut(JSON.parse(e),Yt("OpenBridgeRequest"))},e.openBridgeRequestToJson=function(e){return JSON.stringify($t(e,Yt("OpenBridgeRequest")),null,2)},e.toOpenBridgeResponse=function(e){return Ut(JSON.parse(e),Yt("OpenBridgeResponse"))},e.openBridgeResponseToJson=function(e){return JSON.stringify($t(e,Yt("OpenBridgeResponse")),null,2)},e.toPrivateChannelBroadcastAgentRequest=function(e){return Ut(JSON.parse(e),Yt("PrivateChannelBroadcastAgentRequest"))},e.privateChannelBroadcastAgentRequestToJson=function(e){return JSON.stringify($t(e,Yt("PrivateChannelBroadcastAgentRequest")),null,2)},e.toPrivateChannelBroadcastBridgeRequest=function(e){return Ut(JSON.parse(e),Yt("PrivateChannelBroadcastBridgeRequest"))},e.privateChannelBroadcastBridgeRequestToJson=function(e){return JSON.stringify($t(e,Yt("PrivateChannelBroadcastBridgeRequest")),null,2)},e.toPrivateChannelEventListenerAddedAgentRequest=function(e){return Ut(JSON.parse(e),Yt("PrivateChannelEventListenerAddedAgentRequest"))},e.privateChannelEventListenerAddedAgentRequestToJson=function(e){return JSON.stringify($t(e,Yt("PrivateChannelEventListenerAddedAgentRequest")),null,2)},e.toPrivateChannelEventListenerAddedBridgeRequest=function(e){return Ut(JSON.parse(e),Yt("PrivateChannelEventListenerAddedBridgeRequest"))},e.privateChannelEventListenerAddedBridgeRequestToJson=function(e){return JSON.stringify($t(e,Yt("PrivateChannelEventListenerAddedBridgeRequest")),null,2)},e.toPrivateChannelEventListenerRemovedAgentRequest=function(e){return Ut(JSON.parse(e),Yt("PrivateChannelEventListenerRemovedAgentRequest"))},e.privateChannelEventListenerRemovedAgentRequestToJson=function(e){return JSON.stringify($t(e,Yt("PrivateChannelEventListenerRemovedAgentRequest")),null,2)},e.toPrivateChannelEventListenerRemovedBridgeRequest=function(e){return Ut(JSON.parse(e),Yt("PrivateChannelEventListenerRemovedBridgeRequest"))},e.privateChannelEventListenerRemovedBridgeRequestToJson=function(e){return JSON.stringify($t(e,Yt("PrivateChannelEventListenerRemovedBridgeRequest")),null,2)},e.toPrivateChannelOnAddContextListenerAgentRequest=function(e){return Ut(JSON.parse(e),Yt("PrivateChannelOnAddContextListenerAgentRequest"))},e.privateChannelOnAddContextListenerAgentRequestToJson=function(e){return JSON.stringify($t(e,Yt("PrivateChannelOnAddContextListenerAgentRequest")),null,2)},e.toPrivateChannelOnAddContextListenerBridgeRequest=function(e){return Ut(JSON.parse(e),Yt("PrivateChannelOnAddContextListenerBridgeRequest"))},e.privateChannelOnAddContextListenerBridgeRequestToJson=function(e){return JSON.stringify($t(e,Yt("PrivateChannelOnAddContextListenerBridgeRequest")),null,2)},e.toPrivateChannelOnDisconnectAgentRequest=function(e){return Ut(JSON.parse(e),Yt("PrivateChannelOnDisconnectAgentRequest"))},e.privateChannelOnDisconnectAgentRequestToJson=function(e){return JSON.stringify($t(e,Yt("PrivateChannelOnDisconnectAgentRequest")),null,2)},e.toPrivateChannelOnDisconnectBridgeRequest=function(e){return Ut(JSON.parse(e),Yt("PrivateChannelOnDisconnectBridgeRequest"))},e.privateChannelOnDisconnectBridgeRequestToJson=function(e){return JSON.stringify($t(e,Yt("PrivateChannelOnDisconnectBridgeRequest")),null,2)},e.toPrivateChannelOnUnsubscribeAgentRequest=function(e){return Ut(JSON.parse(e),Yt("PrivateChannelOnUnsubscribeAgentRequest"))},e.privateChannelOnUnsubscribeAgentRequestToJson=function(e){return JSON.stringify($t(e,Yt("PrivateChannelOnUnsubscribeAgentRequest")),null,2)},e.toPrivateChannelOnUnsubscribeBridgeRequest=function(e){return Ut(JSON.parse(e),Yt("PrivateChannelOnUnsubscribeBridgeRequest"))},e.privateChannelOnUnsubscribeBridgeRequestToJson=function(e){return JSON.stringify($t(e,Yt("PrivateChannelOnUnsubscribeBridgeRequest")),null,2)},e.toRaiseIntentAgentErrorResponse=function(e){return Ut(JSON.parse(e),Yt("RaiseIntentAgentErrorResponse"))},e.raiseIntentAgentErrorResponseToJson=function(e){return JSON.stringify($t(e,Yt("RaiseIntentAgentErrorResponse")),null,2)},e.toRaiseIntentAgentRequest=function(e){return Ut(JSON.parse(e),Yt("RaiseIntentAgentRequest"))},e.raiseIntentAgentRequestToJson=function(e){return JSON.stringify($t(e,Yt("RaiseIntentAgentRequest")),null,2)},e.toRaiseIntentAgentResponse=function(e){return Ut(JSON.parse(e),Yt("RaiseIntentAgentResponse"))},e.raiseIntentAgentResponseToJson=function(e){return JSON.stringify($t(e,Yt("RaiseIntentAgentResponse")),null,2)},e.toRaiseIntentBridgeErrorResponse=function(e){return Ut(JSON.parse(e),Yt("RaiseIntentBridgeErrorResponse"))},e.raiseIntentBridgeErrorResponseToJson=function(e){return JSON.stringify($t(e,Yt("RaiseIntentBridgeErrorResponse")),null,2)},e.toRaiseIntentBridgeRequest=function(e){return Ut(JSON.parse(e),Yt("RaiseIntentBridgeRequest"))},e.raiseIntentBridgeRequestToJson=function(e){return JSON.stringify($t(e,Yt("RaiseIntentBridgeRequest")),null,2)},e.toRaiseIntentBridgeResponse=function(e){return Ut(JSON.parse(e),Yt("RaiseIntentBridgeResponse"))},e.raiseIntentBridgeResponseToJson=function(e){return JSON.stringify($t(e,Yt("RaiseIntentBridgeResponse")),null,2)},e.toRaiseIntentResultAgentErrorResponse=function(e){return Ut(JSON.parse(e),Yt("RaiseIntentResultAgentErrorResponse"))},e.raiseIntentResultAgentErrorResponseToJson=function(e){return JSON.stringify($t(e,Yt("RaiseIntentResultAgentErrorResponse")),null,2)},e.toRaiseIntentResultAgentResponse=function(e){return Ut(JSON.parse(e),Yt("RaiseIntentResultAgentResponse"))},e.raiseIntentResultAgentResponseToJson=function(e){return JSON.stringify($t(e,Yt("RaiseIntentResultAgentResponse")),null,2)},e.toRaiseIntentResultBridgeErrorResponse=function(e){return Ut(JSON.parse(e),Yt("RaiseIntentResultBridgeErrorResponse"))},e.raiseIntentResultBridgeErrorResponseToJson=function(e){return JSON.stringify($t(e,Yt("RaiseIntentResultBridgeErrorResponse")),null,2)},e.toRaiseIntentResultBridgeResponse=function(e){return Ut(JSON.parse(e),Yt("RaiseIntentResultBridgeResponse"))},e.raiseIntentResultBridgeResponseToJson=function(e){return JSON.stringify($t(e,Yt("RaiseIntentResultBridgeResponse")),null,2)},e.toContext=function(e){return Ut(JSON.parse(e),Yt("Context"))},e.contextToJson=function(e){return JSON.stringify($t(e,Yt("Context")),null,2)}}();var Qt,Kt,Zt,Xt,en,tn={AgentErrorResponseMessage:zt([{json:"meta",js:"meta",typ:Yt("AgentResponseMetadata")},{json:"payload",js:"payload",typ:Yt("ErrorResponseMessagePayload")},{json:"type",js:"type",typ:Yt("ResponseMessageType")}],!1),AgentResponseMetadata:zt([{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"timestamp",js:"timestamp",typ:Date}],!1),ErrorResponseMessagePayload:zt([{json:"error",js:"error",typ:Yt("ResponseErrorDetail")}],"any"),AgentRequestMessage:zt([{json:"meta",js:"meta",typ:Yt("AgentRequestMetadata")},{json:"payload",js:"payload",typ:Gt("any")},{json:"type",js:"type",typ:Yt("RequestMessageType")}],!1),AgentRequestMetadata:zt([{json:"destination",js:"destination",typ:Vt(void 0,Yt("BridgeParticipantIdentifier"))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"source",js:"source",typ:Vt(void 0,Yt("SourceIdentifier"))},{json:"timestamp",js:"timestamp",typ:Date}],!1),BridgeParticipantIdentifier:zt([{json:"desktopAgent",js:"desktopAgent",typ:""},{json:"appId",js:"appId",typ:Vt(void 0,"")},{json:"instanceId",js:"instanceId",typ:Vt(void 0,"")}],"any"),SourceIdentifier:zt([{json:"appId",js:"appId",typ:Vt(void 0,"")},{json:"desktopAgent",js:"desktopAgent",typ:Vt(void 0,"")},{json:"instanceId",js:"instanceId",typ:Vt(void 0,"")}],"any"),AgentResponseMessage:zt([{json:"meta",js:"meta",typ:Yt("AgentResponseMetadata")},{json:"payload",js:"payload",typ:Gt("any")},{json:"type",js:"type",typ:Yt("ResponseMessageType")}],!1),BridgeErrorResponseMessage:zt([{json:"meta",js:"meta",typ:Yt("BridgeErrorResponseMessageMeta")},{json:"payload",js:"payload",typ:Yt("ResponseErrorMessagePayload")},{json:"type",js:"type",typ:""}],!1),BridgeErrorResponseMessageMeta:zt([{json:"errorDetails",js:"errorDetails",typ:Ht(Yt("ResponseErrorDetail"))},{json:"errorSources",js:"errorSources",typ:Ht(Yt("DesktopAgentIdentifier"))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"timestamp",js:"timestamp",typ:Date}],!1),DesktopAgentIdentifier:zt([{json:"desktopAgent",js:"desktopAgent",typ:""}],"any"),ResponseErrorMessagePayload:zt([{json:"error",js:"error",typ:Vt(void 0,Yt("ResponseErrorDetail"))}],"any"),BridgeRequestMessage:zt([{json:"meta",js:"meta",typ:Yt("BridgeRequestMetadata")},{json:"payload",js:"payload",typ:Gt("any")},{json:"type",js:"type",typ:""}],!1),BridgeRequestMetadata:zt([{json:"destination",js:"destination",typ:Vt(void 0,Yt("BridgeParticipantIdentifier"))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"source",js:"source",typ:Yt("BridgeParticipantIdentifier")},{json:"timestamp",js:"timestamp",typ:Date}],!1),BridgeResponseMessage:zt([{json:"meta",js:"meta",typ:Yt("BridgeResponseMessageMeta")},{json:"payload",js:"payload",typ:Gt("any")},{json:"type",js:"type",typ:""}],!1),BridgeResponseMessageMeta:zt([{json:"errorDetails",js:"errorDetails",typ:Vt(void 0,Ht(Yt("ResponseErrorDetail")))},{json:"errorSources",js:"errorSources",typ:Vt(void 0,Ht(Yt("DesktopAgentIdentifier")))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"sources",js:"sources",typ:Vt(void 0,Ht(Yt("DesktopAgentIdentifier")))},{json:"timestamp",js:"timestamp",typ:Date}],!1),BroadcastAgentRequest:zt([{json:"meta",js:"meta",typ:Yt("BroadcastAgentRequestMeta")},{json:"payload",js:"payload",typ:Yt("BroadcastAgentRequestPayload")},{json:"type",js:"type",typ:Yt("BroadcastAgentRequestType")}],!1),BroadcastAgentRequestMeta:zt([{json:"requestUuid",js:"requestUuid",typ:""},{json:"source",js:"source",typ:Yt("SourceObject")},{json:"timestamp",js:"timestamp",typ:Date}],!1),SourceObject:zt([{json:"appId",js:"appId",typ:""},{json:"desktopAgent",js:"desktopAgent",typ:Vt(void 0,"")},{json:"instanceId",js:"instanceId",typ:Vt(void 0,"")}],"any"),BroadcastAgentRequestPayload:zt([{json:"channelId",js:"channelId",typ:""},{json:"context",js:"context",typ:Yt("ContextElement")}],!1),ContextElement:zt([{json:"id",js:"id",typ:Vt(void 0,Gt("any"))},{json:"name",js:"name",typ:Vt(void 0,"")},{json:"type",js:"type",typ:""}],"any"),BroadcastBridgeRequest:zt([{json:"meta",js:"meta",typ:Yt("BroadcastBridgeRequestMeta")},{json:"payload",js:"payload",typ:Yt("BroadcastBridgeRequestPayload")},{json:"type",js:"type",typ:Yt("BroadcastAgentRequestType")}],!1),BroadcastBridgeRequestMeta:zt([{json:"requestUuid",js:"requestUuid",typ:""},{json:"source",js:"source",typ:Yt("MetaSource")},{json:"timestamp",js:"timestamp",typ:Date}],!1),MetaSource:zt([{json:"appId",js:"appId",typ:""},{json:"desktopAgent",js:"desktopAgent",typ:""},{json:"instanceId",js:"instanceId",typ:Vt(void 0,"")}],"any"),BroadcastBridgeRequestPayload:zt([{json:"channelId",js:"channelId",typ:""},{json:"context",js:"context",typ:Yt("ContextElement")}],!1),ConnectionStepMessage:zt([{json:"meta",js:"meta",typ:Yt("ConnectionStepMetadata")},{json:"payload",js:"payload",typ:Gt("any")},{json:"type",js:"type",typ:Yt("ConnectionStepMessageType")}],!1),ConnectionStepMetadata:zt([{json:"requestUuid",js:"requestUuid",typ:Vt(void 0,"")},{json:"responseUuid",js:"responseUuid",typ:Vt(void 0,"")},{json:"timestamp",js:"timestamp",typ:Date}],!1),ConnectionStep2Hello:zt([{json:"meta",js:"meta",typ:Yt("ConnectionStep2HelloMeta")},{json:"payload",js:"payload",typ:Yt("ConnectionStep2HelloPayload")},{json:"type",js:"type",typ:Yt("ConnectionStep2HelloType")}],!1),ConnectionStep2HelloMeta:zt([{json:"timestamp",js:"timestamp",typ:Date}],!1),ConnectionStep2HelloPayload:zt([{json:"authRequired",js:"authRequired",typ:!0},{json:"authToken",js:"authToken",typ:Vt(void 0,"")},{json:"desktopAgentBridgeVersion",js:"desktopAgentBridgeVersion",typ:""},{json:"supportedFDC3Versions",js:"supportedFDC3Versions",typ:Ht("")}],!1),ConnectionStep3Handshake:zt([{json:"meta",js:"meta",typ:Yt("ConnectionStep3HandshakeMeta")},{json:"payload",js:"payload",typ:Yt("ConnectionStep3HandshakePayload")},{json:"type",js:"type",typ:Yt("ConnectionStep3HandshakeType")}],!1),ConnectionStep3HandshakeMeta:zt([{json:"requestUuid",js:"requestUuid",typ:""},{json:"timestamp",js:"timestamp",typ:Date}],!1),ConnectionStep3HandshakePayload:zt([{json:"authToken",js:"authToken",typ:Vt(void 0,"")},{json:"channelsState",js:"channelsState",typ:Gt(Ht(Yt("ContextElement")))},{json:"implementationMetadata",js:"implementationMetadata",typ:Yt("ConnectingAgentImplementationMetadata")},{json:"requestedName",js:"requestedName",typ:""}],!1),ConnectingAgentImplementationMetadata:zt([{json:"fdc3Version",js:"fdc3Version",typ:""},{json:"optionalFeatures",js:"optionalFeatures",typ:Yt("OptionalFeatures")},{json:"provider",js:"provider",typ:""},{json:"providerVersion",js:"providerVersion",typ:Vt(void 0,"")}],!1),OptionalFeatures:zt([{json:"DesktopAgentBridging",js:"DesktopAgentBridging",typ:!0},{json:"OriginatingAppMetadata",js:"OriginatingAppMetadata",typ:!0},{json:"UserChannelMembershipAPIs",js:"UserChannelMembershipAPIs",typ:!0}],!1),ConnectionStep4AuthenticationFailed:zt([{json:"meta",js:"meta",typ:Yt("ConnectionStep4AuthenticationFailedMeta")},{json:"payload",js:"payload",typ:Yt("ConnectionStep4AuthenticationFailedPayload")},{json:"type",js:"type",typ:Yt("ConnectionStep4AuthenticationFailedType")}],!1),ConnectionStep4AuthenticationFailedMeta:zt([{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"timestamp",js:"timestamp",typ:Date}],!1),ConnectionStep4AuthenticationFailedPayload:zt([{json:"message",js:"message",typ:Vt(void 0,"")}],!1),ConnectionStep6ConnectedAgentsUpdate:zt([{json:"meta",js:"meta",typ:Yt("ConnectionStep6ConnectedAgentsUpdateMeta")},{json:"payload",js:"payload",typ:Yt("ConnectionStep6ConnectedAgentsUpdatePayload")},{json:"type",js:"type",typ:Yt("ConnectionStep6ConnectedAgentsUpdateType")}],!1),ConnectionStep6ConnectedAgentsUpdateMeta:zt([{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"timestamp",js:"timestamp",typ:Date}],!1),ConnectionStep6ConnectedAgentsUpdatePayload:zt([{json:"addAgent",js:"addAgent",typ:Vt(void 0,"")},{json:"allAgents",js:"allAgents",typ:Ht(Yt("DesktopAgentImplementationMetadata"))},{json:"channelsState",js:"channelsState",typ:Vt(void 0,Gt(Ht(Yt("ContextElement"))))},{json:"removeAgent",js:"removeAgent",typ:Vt(void 0,"")}],!1),DesktopAgentImplementationMetadata:zt([{json:"desktopAgent",js:"desktopAgent",typ:""},{json:"fdc3Version",js:"fdc3Version",typ:""},{json:"optionalFeatures",js:"optionalFeatures",typ:Yt("OptionalFeatures")},{json:"provider",js:"provider",typ:""},{json:"providerVersion",js:"providerVersion",typ:Vt(void 0,"")}],!1),FindInstancesAgentErrorResponse:zt([{json:"meta",js:"meta",typ:Yt("FindInstancesAgentErrorResponseMeta")},{json:"payload",js:"payload",typ:Yt("FindInstancesAgentErrorResponsePayload")},{json:"type",js:"type",typ:Yt("FindInstancesAgentErrorResponseType")}],!1),FindInstancesAgentErrorResponseMeta:zt([{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"timestamp",js:"timestamp",typ:Date}],!1),FindInstancesAgentErrorResponsePayload:zt([{json:"error",js:"error",typ:Yt("ErrorMessage")}],!1),FindInstancesAgentRequest:zt([{json:"meta",js:"meta",typ:Yt("FindInstancesAgentRequestMeta")},{json:"payload",js:"payload",typ:Yt("FindInstancesAgentRequestPayload")},{json:"type",js:"type",typ:Yt("FindInstancesAgentRequestType")}],!1),FindInstancesAgentRequestMeta:zt([{json:"destination",js:"destination",typ:Vt(void 0,Yt("DestinationObject"))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"source",js:"source",typ:Vt(void 0,Yt("SourceIdentifier"))},{json:"timestamp",js:"timestamp",typ:Date}],!1),DestinationObject:zt([{json:"desktopAgent",js:"desktopAgent",typ:""},{json:"appId",js:"appId",typ:Vt(void 0,"")},{json:"instanceId",js:"instanceId",typ:Vt(void 0,"")}],"any"),FindInstancesAgentRequestPayload:zt([{json:"app",js:"app",typ:Yt("AppIdentifier")}],!1),AppIdentifier:zt([{json:"appId",js:"appId",typ:""},{json:"desktopAgent",js:"desktopAgent",typ:Vt(void 0,"")},{json:"instanceId",js:"instanceId",typ:Vt(void 0,"")}],"any"),FindInstancesAgentResponse:zt([{json:"meta",js:"meta",typ:Yt("FindInstancesAgentResponseMeta")},{json:"payload",js:"payload",typ:Yt("FindInstancesAgentResponsePayload")},{json:"type",js:"type",typ:Yt("FindInstancesAgentErrorResponseType")}],!1),FindInstancesAgentResponseMeta:zt([{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"timestamp",js:"timestamp",typ:Date}],!1),FindInstancesAgentResponsePayload:zt([{json:"appIdentifiers",js:"appIdentifiers",typ:Ht(Yt("AppMetadata"))}],!1),AppMetadata:zt([{json:"appId",js:"appId",typ:""},{json:"description",js:"description",typ:Vt(void 0,"")},{json:"desktopAgent",js:"desktopAgent",typ:Vt(void 0,"")},{json:"icons",js:"icons",typ:Vt(void 0,Ht(Yt("Icon")))},{json:"instanceId",js:"instanceId",typ:Vt(void 0,"")},{json:"instanceMetadata",js:"instanceMetadata",typ:Vt(void 0,Gt("any"))},{json:"name",js:"name",typ:Vt(void 0,"")},{json:"resultType",js:"resultType",typ:Vt(void 0,Vt(null,""))},{json:"screenshots",js:"screenshots",typ:Vt(void 0,Ht(Yt("Image")))},{json:"title",js:"title",typ:Vt(void 0,"")},{json:"tooltip",js:"tooltip",typ:Vt(void 0,"")},{json:"version",js:"version",typ:Vt(void 0,"")}],!1),Icon:zt([{json:"size",js:"size",typ:Vt(void 0,"")},{json:"src",js:"src",typ:""},{json:"type",js:"type",typ:Vt(void 0,"")}],!1),Image:zt([{json:"label",js:"label",typ:Vt(void 0,"")},{json:"size",js:"size",typ:Vt(void 0,"")},{json:"src",js:"src",typ:""},{json:"type",js:"type",typ:Vt(void 0,"")}],!1),FindInstancesBridgeErrorResponse:zt([{json:"meta",js:"meta",typ:Yt("FindInstancesBridgeErrorResponseMeta")},{json:"payload",js:"payload",typ:Yt("FindInstancesBridgeErrorResponsePayload")},{json:"type",js:"type",typ:Yt("FindInstancesAgentErrorResponseType")}],!1),FindInstancesBridgeErrorResponseMeta:zt([{json:"errorDetails",js:"errorDetails",typ:Ht(Yt("ResponseErrorDetail"))},{json:"errorSources",js:"errorSources",typ:Ht(Yt("DesktopAgentIdentifier"))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"timestamp",js:"timestamp",typ:Date}],!1),FindInstancesBridgeErrorResponsePayload:zt([{json:"error",js:"error",typ:Yt("ErrorMessage")}],!1),FindInstancesBridgeRequest:zt([{json:"meta",js:"meta",typ:Yt("FindInstancesBridgeRequestMeta")},{json:"payload",js:"payload",typ:Yt("FindInstancesBridgeRequestPayload")},{json:"type",js:"type",typ:Yt("FindInstancesAgentRequestType")}],!1),FindInstancesBridgeRequestMeta:zt([{json:"destination",js:"destination",typ:Vt(void 0,Yt("DestinationObject"))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"source",js:"source",typ:Yt("MetaSourceObject")},{json:"timestamp",js:"timestamp",typ:Date}],!1),MetaSourceObject:zt([{json:"appId",js:"appId",typ:Vt(void 0,"")},{json:"desktopAgent",js:"desktopAgent",typ:""},{json:"instanceId",js:"instanceId",typ:Vt(void 0,"")}],"any"),FindInstancesBridgeRequestPayload:zt([{json:"app",js:"app",typ:Yt("AppIdentifier")}],!1),FindInstancesBridgeResponse:zt([{json:"meta",js:"meta",typ:Yt("FindInstancesBridgeResponseMeta")},{json:"payload",js:"payload",typ:Yt("FindInstancesBridgeResponsePayload")},{json:"type",js:"type",typ:Yt("FindInstancesAgentErrorResponseType")}],!1),FindInstancesBridgeResponseMeta:zt([{json:"errorDetails",js:"errorDetails",typ:Vt(void 0,Ht(Yt("ResponseErrorDetail")))},{json:"errorSources",js:"errorSources",typ:Vt(void 0,Ht(Yt("DesktopAgentIdentifier")))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"sources",js:"sources",typ:Vt(void 0,Ht(Yt("DesktopAgentIdentifier")))},{json:"timestamp",js:"timestamp",typ:Date}],!1),FindInstancesBridgeResponsePayload:zt([{json:"appIdentifiers",js:"appIdentifiers",typ:Ht(Yt("AppMetadata"))}],!1),FindIntentAgentErrorResponse:zt([{json:"meta",js:"meta",typ:Yt("FindIntentAgentErrorResponseMeta")},{json:"payload",js:"payload",typ:Yt("FindIntentAgentErrorResponsePayload")},{json:"type",js:"type",typ:Yt("FindIntentAgentErrorResponseType")}],!1),FindIntentAgentErrorResponseMeta:zt([{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"timestamp",js:"timestamp",typ:Date}],!1),FindIntentAgentErrorResponsePayload:zt([{json:"error",js:"error",typ:Yt("ErrorMessage")}],!1),FindIntentAgentRequest:zt([{json:"meta",js:"meta",typ:Yt("FindIntentAgentRequestMeta")},{json:"payload",js:"payload",typ:Yt("FindIntentAgentRequestPayload")},{json:"type",js:"type",typ:Yt("FindIntentAgentRequestType")}],!1),FindIntentAgentRequestMeta:zt([{json:"requestUuid",js:"requestUuid",typ:""},{json:"source",js:"source",typ:Vt(void 0,Yt("SourceIdentifier"))},{json:"timestamp",js:"timestamp",typ:Date},{json:"destination",js:"destination",typ:Vt(void 0,Yt("BridgeParticipantIdentifier"))}],!1),FindIntentAgentRequestPayload:zt([{json:"context",js:"context",typ:Vt(void 0,Yt("ContextElement"))},{json:"intent",js:"intent",typ:""},{json:"resultType",js:"resultType",typ:Vt(void 0,"")}],!1),FindIntentAgentResponse:zt([{json:"meta",js:"meta",typ:Yt("FindIntentAgentResponseMeta")},{json:"payload",js:"payload",typ:Yt("FindIntentAgentResponsePayload")},{json:"type",js:"type",typ:Yt("FindIntentAgentErrorResponseType")}],!1),FindIntentAgentResponseMeta:zt([{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"timestamp",js:"timestamp",typ:Date}],!1),FindIntentAgentResponsePayload:zt([{json:"appIntent",js:"appIntent",typ:Yt("AppIntent")}],!1),AppIntent:zt([{json:"apps",js:"apps",typ:Ht(Yt("AppMetadata"))},{json:"intent",js:"intent",typ:Yt("IntentMetadata")}],!1),IntentMetadata:zt([{json:"displayName",js:"displayName",typ:""},{json:"name",js:"name",typ:""}],!1),FindIntentBridgeErrorResponse:zt([{json:"meta",js:"meta",typ:Yt("FindIntentBridgeErrorResponseMeta")},{json:"payload",js:"payload",typ:Yt("FindIntentBridgeErrorResponsePayload")},{json:"type",js:"type",typ:Yt("FindIntentAgentErrorResponseType")}],!1),FindIntentBridgeErrorResponseMeta:zt([{json:"errorDetails",js:"errorDetails",typ:Ht(Yt("ResponseErrorDetail"))},{json:"errorSources",js:"errorSources",typ:Ht(Yt("DesktopAgentIdentifier"))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"timestamp",js:"timestamp",typ:Date}],!1),FindIntentBridgeErrorResponsePayload:zt([{json:"error",js:"error",typ:Yt("ErrorMessage")}],!1),FindIntentBridgeRequest:zt([{json:"meta",js:"meta",typ:Yt("FindIntentBridgeRequestMeta")},{json:"payload",js:"payload",typ:Yt("FindIntentBridgeRequestPayload")},{json:"type",js:"type",typ:Yt("FindIntentAgentRequestType")}],!1),FindIntentBridgeRequestMeta:zt([{json:"requestUuid",js:"requestUuid",typ:""},{json:"source",js:"source",typ:Yt("BridgeParticipantIdentifier")},{json:"timestamp",js:"timestamp",typ:Date},{json:"destination",js:"destination",typ:Vt(void 0,Yt("BridgeParticipantIdentifier"))}],!1),FindIntentBridgeRequestPayload:zt([{json:"context",js:"context",typ:Vt(void 0,Yt("ContextElement"))},{json:"intent",js:"intent",typ:""},{json:"resultType",js:"resultType",typ:Vt(void 0,"")}],!1),FindIntentBridgeResponse:zt([{json:"meta",js:"meta",typ:Yt("FindIntentBridgeResponseMeta")},{json:"payload",js:"payload",typ:Yt("FindIntentBridgeResponsePayload")},{json:"type",js:"type",typ:Yt("FindIntentAgentErrorResponseType")}],!1),FindIntentBridgeResponseMeta:zt([{json:"errorDetails",js:"errorDetails",typ:Vt(void 0,Ht(Yt("ResponseErrorDetail")))},{json:"errorSources",js:"errorSources",typ:Vt(void 0,Ht(Yt("DesktopAgentIdentifier")))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"sources",js:"sources",typ:Vt(void 0,Ht(Yt("DesktopAgentIdentifier")))},{json:"timestamp",js:"timestamp",typ:Date}],!1),FindIntentBridgeResponsePayload:zt([{json:"appIntent",js:"appIntent",typ:Yt("AppIntent")}],!1),FindIntentsByContextAgentErrorResponse:zt([{json:"meta",js:"meta",typ:Yt("FindIntentsByContextAgentErrorResponseMeta")},{json:"payload",js:"payload",typ:Yt("FindIntentsByContextAgentErrorResponsePayload")},{json:"type",js:"type",typ:Yt("FindIntentsByContextAgentErrorResponseType")}],!1),FindIntentsByContextAgentErrorResponseMeta:zt([{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"timestamp",js:"timestamp",typ:Date}],!1),FindIntentsByContextAgentErrorResponsePayload:zt([{json:"error",js:"error",typ:Yt("ErrorMessage")}],!1),FindIntentsByContextAgentRequest:zt([{json:"meta",js:"meta",typ:Yt("FindIntentsByContextAgentRequestMeta")},{json:"payload",js:"payload",typ:Yt("FindIntentsByContextAgentRequestPayload")},{json:"type",js:"type",typ:Yt("FindIntentsByContextAgentRequestType")}],!1),FindIntentsByContextAgentRequestMeta:zt([{json:"requestUuid",js:"requestUuid",typ:""},{json:"source",js:"source",typ:Vt(void 0,Yt("SourceObject"))},{json:"timestamp",js:"timestamp",typ:Date},{json:"destination",js:"destination",typ:Vt(void 0,Yt("BridgeParticipantIdentifier"))}],!1),FindIntentsByContextAgentRequestPayload:zt([{json:"context",js:"context",typ:Yt("ContextElement")}],!1),FindIntentsByContextAgentResponse:zt([{json:"meta",js:"meta",typ:Yt("FindIntentsByContextAgentResponseMeta")},{json:"payload",js:"payload",typ:Yt("FindIntentsByContextAgentResponsePayload")},{json:"type",js:"type",typ:Yt("FindIntentsByContextAgentErrorResponseType")}],!1),FindIntentsByContextAgentResponseMeta:zt([{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"timestamp",js:"timestamp",typ:Date}],!1),FindIntentsByContextAgentResponsePayload:zt([{json:"appIntents",js:"appIntents",typ:Ht(Yt("AppIntent"))}],!1),FindIntentsByContextBridgeErrorResponse:zt([{json:"meta",js:"meta",typ:Yt("FindIntentsByContextBridgeErrorResponseMeta")},{json:"payload",js:"payload",typ:Yt("FindIntentsByContextBridgeErrorResponsePayload")},{json:"type",js:"type",typ:Yt("FindIntentsByContextAgentErrorResponseType")}],!1),FindIntentsByContextBridgeErrorResponseMeta:zt([{json:"errorDetails",js:"errorDetails",typ:Ht(Yt("ResponseErrorDetail"))},{json:"errorSources",js:"errorSources",typ:Ht(Yt("DesktopAgentIdentifier"))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"timestamp",js:"timestamp",typ:Date}],!1),FindIntentsByContextBridgeErrorResponsePayload:zt([{json:"error",js:"error",typ:Yt("ErrorMessage")}],!1),FindIntentsByContextBridgeRequest:zt([{json:"meta",js:"meta",typ:Yt("FindIntentsByContextBridgeRequestMeta")},{json:"payload",js:"payload",typ:Yt("FindIntentsByContextBridgeRequestPayload")},{json:"type",js:"type",typ:Yt("FindIntentsByContextAgentRequestType")}],!1),FindIntentsByContextBridgeRequestMeta:zt([{json:"requestUuid",js:"requestUuid",typ:""},{json:"source",js:"source",typ:Yt("MetaSource")},{json:"timestamp",js:"timestamp",typ:Date},{json:"destination",js:"destination",typ:Vt(void 0,Yt("BridgeParticipantIdentifier"))}],!1),FindIntentsByContextBridgeRequestPayload:zt([{json:"context",js:"context",typ:Yt("ContextElement")}],!1),FindIntentsByContextBridgeResponse:zt([{json:"meta",js:"meta",typ:Yt("FindIntentsByContextBridgeResponseMeta")},{json:"payload",js:"payload",typ:Yt("FindIntentsByContextBridgeResponsePayload")},{json:"type",js:"type",typ:Yt("FindIntentsByContextAgentErrorResponseType")}],!1),FindIntentsByContextBridgeResponseMeta:zt([{json:"errorDetails",js:"errorDetails",typ:Vt(void 0,Ht(Yt("ResponseErrorDetail")))},{json:"errorSources",js:"errorSources",typ:Vt(void 0,Ht(Yt("DesktopAgentIdentifier")))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"sources",js:"sources",typ:Vt(void 0,Ht(Yt("DesktopAgentIdentifier")))},{json:"timestamp",js:"timestamp",typ:Date}],!1),FindIntentsByContextBridgeResponsePayload:zt([{json:"appIntents",js:"appIntents",typ:Ht(Yt("AppIntent"))}],!1),GetAppMetadataAgentErrorResponse:zt([{json:"meta",js:"meta",typ:Yt("GetAppMetadataAgentErrorResponseMeta")},{json:"payload",js:"payload",typ:Yt("GetAppMetadataAgentErrorResponsePayload")},{json:"type",js:"type",typ:Yt("GetAppMetadataAgentErrorResponseType")}],!1),GetAppMetadataAgentErrorResponseMeta:zt([{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"timestamp",js:"timestamp",typ:Date}],!1),GetAppMetadataAgentErrorResponsePayload:zt([{json:"error",js:"error",typ:Yt("ErrorMessage")}],!1),GetAppMetadataAgentRequest:zt([{json:"meta",js:"meta",typ:Yt("GetAppMetadataAgentRequestMeta")},{json:"payload",js:"payload",typ:Yt("GetAppMetadataAgentRequestPayload")},{json:"type",js:"type",typ:Yt("GetAppMetadataAgentRequestType")}],!1),GetAppMetadataAgentRequestMeta:zt([{json:"destination",js:"destination",typ:Vt(void 0,Yt("DestinationObject"))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"source",js:"source",typ:Vt(void 0,Yt("SourceIdentifier"))},{json:"timestamp",js:"timestamp",typ:Date}],!1),GetAppMetadataAgentRequestPayload:zt([{json:"app",js:"app",typ:Yt("AppDestinationIdentifier")}],!1),AppDestinationIdentifier:zt([{json:"desktopAgent",js:"desktopAgent",typ:""},{json:"appId",js:"appId",typ:""},{json:"instanceId",js:"instanceId",typ:Vt(void 0,"")}],"any"),GetAppMetadataAgentResponse:zt([{json:"meta",js:"meta",typ:Yt("GetAppMetadataAgentResponseMeta")},{json:"payload",js:"payload",typ:Yt("GetAppMetadataAgentResponsePayload")},{json:"type",js:"type",typ:Yt("GetAppMetadataAgentErrorResponseType")}],!1),GetAppMetadataAgentResponseMeta:zt([{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"timestamp",js:"timestamp",typ:Date}],!1),GetAppMetadataAgentResponsePayload:zt([{json:"appMetadata",js:"appMetadata",typ:Yt("AppMetadata")}],!1),GetAppMetadataBridgeErrorResponse:zt([{json:"meta",js:"meta",typ:Yt("GetAppMetadataBridgeErrorResponseMeta")},{json:"payload",js:"payload",typ:Yt("GetAppMetadataBridgeErrorResponsePayload")},{json:"type",js:"type",typ:Yt("GetAppMetadataAgentErrorResponseType")}],!1),GetAppMetadataBridgeErrorResponseMeta:zt([{json:"errorDetails",js:"errorDetails",typ:Ht(Yt("ResponseErrorDetail"))},{json:"errorSources",js:"errorSources",typ:Ht(Yt("DesktopAgentIdentifier"))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"timestamp",js:"timestamp",typ:Date}],!1),GetAppMetadataBridgeErrorResponsePayload:zt([{json:"error",js:"error",typ:Yt("ErrorMessage")}],!1),GetAppMetadataBridgeRequest:zt([{json:"meta",js:"meta",typ:Yt("GetAppMetadataBridgeRequestMeta")},{json:"payload",js:"payload",typ:Yt("GetAppMetadataBridgeRequestPayload")},{json:"type",js:"type",typ:Yt("GetAppMetadataAgentRequestType")}],!1),GetAppMetadataBridgeRequestMeta:zt([{json:"destination",js:"destination",typ:Vt(void 0,Yt("DestinationObject"))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"source",js:"source",typ:Yt("MetaSourceObject")},{json:"timestamp",js:"timestamp",typ:Date}],!1),GetAppMetadataBridgeRequestPayload:zt([{json:"app",js:"app",typ:Yt("AppDestinationIdentifier")}],!1),GetAppMetadataBridgeResponse:zt([{json:"meta",js:"meta",typ:Yt("GetAppMetadataBridgeResponseMeta")},{json:"payload",js:"payload",typ:Yt("GetAppMetadataBridgeResponsePayload")},{json:"type",js:"type",typ:Yt("GetAppMetadataAgentErrorResponseType")}],!1),GetAppMetadataBridgeResponseMeta:zt([{json:"errorDetails",js:"errorDetails",typ:Vt(void 0,Ht(Yt("ResponseErrorDetail")))},{json:"errorSources",js:"errorSources",typ:Vt(void 0,Ht(Yt("DesktopAgentIdentifier")))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"sources",js:"sources",typ:Vt(void 0,Ht(Yt("DesktopAgentIdentifier")))},{json:"timestamp",js:"timestamp",typ:Date}],!1),GetAppMetadataBridgeResponsePayload:zt([{json:"appMetadata",js:"appMetadata",typ:Yt("AppMetadata")}],!1),OpenAgentErrorResponse:zt([{json:"meta",js:"meta",typ:Yt("OpenAgentErrorResponseMeta")},{json:"payload",js:"payload",typ:Yt("OpenAgentErrorResponsePayload")},{json:"type",js:"type",typ:Yt("OpenAgentErrorResponseType")}],!1),OpenAgentErrorResponseMeta:zt([{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"timestamp",js:"timestamp",typ:Date}],!1),OpenAgentErrorResponsePayload:zt([{json:"error",js:"error",typ:Yt("OpenErrorMessage")}],!1),OpenAgentRequest:zt([{json:"meta",js:"meta",typ:Yt("OpenAgentRequestMeta")},{json:"payload",js:"payload",typ:Yt("OpenAgentRequestPayload")},{json:"type",js:"type",typ:Yt("OpenAgentRequestType")}],!1),OpenAgentRequestMeta:zt([{json:"destination",js:"destination",typ:Vt(void 0,Yt("DestinationObject"))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"source",js:"source",typ:Yt("SourceObject")},{json:"timestamp",js:"timestamp",typ:Date}],!1),OpenAgentRequestPayload:zt([{json:"app",js:"app",typ:Yt("AppToOpen")},{json:"context",js:"context",typ:Vt(void 0,Yt("ContextElement"))}],!1),AppToOpen:zt([{json:"desktopAgent",js:"desktopAgent",typ:""},{json:"appId",js:"appId",typ:""},{json:"instanceId",js:"instanceId",typ:Vt(void 0,"")}],"any"),OpenAgentResponse:zt([{json:"meta",js:"meta",typ:Yt("OpenAgentResponseMeta")},{json:"payload",js:"payload",typ:Yt("OpenAgentResponsePayload")},{json:"type",js:"type",typ:Yt("OpenAgentErrorResponseType")}],!1),OpenAgentResponseMeta:zt([{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"timestamp",js:"timestamp",typ:Date}],!1),OpenAgentResponsePayload:zt([{json:"appIdentifier",js:"appIdentifier",typ:Yt("AppIdentifier")}],!1),OpenBridgeErrorResponse:zt([{json:"meta",js:"meta",typ:Yt("OpenBridgeErrorResponseMeta")},{json:"payload",js:"payload",typ:Yt("OpenBridgeErrorResponsePayload")},{json:"type",js:"type",typ:Yt("OpenAgentErrorResponseType")}],!1),OpenBridgeErrorResponseMeta:zt([{json:"errorDetails",js:"errorDetails",typ:Ht(Yt("ResponseErrorDetail"))},{json:"errorSources",js:"errorSources",typ:Ht(Yt("DesktopAgentIdentifier"))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"timestamp",js:"timestamp",typ:Date}],!1),OpenBridgeErrorResponsePayload:zt([{json:"error",js:"error",typ:Yt("OpenErrorMessage")}],!1),OpenBridgeRequest:zt([{json:"meta",js:"meta",typ:Yt("OpenBridgeRequestMeta")},{json:"payload",js:"payload",typ:Yt("OpenBridgeRequestPayload")},{json:"type",js:"type",typ:Yt("OpenAgentRequestType")}],!1),OpenBridgeRequestMeta:zt([{json:"destination",js:"destination",typ:Vt(void 0,Yt("DestinationObject"))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"source",js:"source",typ:Yt("MetaSource")},{json:"timestamp",js:"timestamp",typ:Date}],!1),OpenBridgeRequestPayload:zt([{json:"app",js:"app",typ:Yt("AppToOpen")},{json:"context",js:"context",typ:Vt(void 0,Yt("ContextElement"))}],!1),OpenBridgeResponse:zt([{json:"meta",js:"meta",typ:Yt("OpenBridgeResponseMeta")},{json:"payload",js:"payload",typ:Yt("OpenBridgeResponsePayload")},{json:"type",js:"type",typ:Yt("OpenAgentErrorResponseType")}],!1),OpenBridgeResponseMeta:zt([{json:"errorDetails",js:"errorDetails",typ:Vt(void 0,Ht(Yt("ResponseErrorDetail")))},{json:"errorSources",js:"errorSources",typ:Vt(void 0,Ht(Yt("DesktopAgentIdentifier")))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"sources",js:"sources",typ:Vt(void 0,Ht(Yt("DesktopAgentIdentifier")))},{json:"timestamp",js:"timestamp",typ:Date}],!1),OpenBridgeResponsePayload:zt([{json:"appIdentifier",js:"appIdentifier",typ:Yt("AppIdentifier")}],!1),PrivateChannelBroadcastAgentRequest:zt([{json:"meta",js:"meta",typ:Yt("PrivateChannelBroadcastAgentRequestMeta")},{json:"payload",js:"payload",typ:Yt("PrivateChannelBroadcastAgentRequestPayload")},{json:"type",js:"type",typ:Yt("PrivateChannelBroadcastAgentRequestType")}],!1),PrivateChannelBroadcastAgentRequestMeta:zt([{json:"destination",js:"destination",typ:Vt(void 0,Yt("MetaDestination"))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"source",js:"source",typ:Vt(void 0,Yt("SourceObject"))},{json:"timestamp",js:"timestamp",typ:Date}],!1),MetaDestination:zt([{json:"desktopAgent",js:"desktopAgent",typ:""},{json:"appId",js:"appId",typ:""},{json:"instanceId",js:"instanceId",typ:Vt(void 0,"")}],"any"),PrivateChannelBroadcastAgentRequestPayload:zt([{json:"channelId",js:"channelId",typ:""},{json:"context",js:"context",typ:Yt("ContextElement")}],!1),PrivateChannelBroadcastBridgeRequest:zt([{json:"meta",js:"meta",typ:Yt("PrivateChannelBroadcastBridgeRequestMeta")},{json:"payload",js:"payload",typ:Yt("PrivateChannelBroadcastBridgeRequestPayload")},{json:"type",js:"type",typ:Yt("PrivateChannelBroadcastAgentRequestType")}],!1),PrivateChannelBroadcastBridgeRequestMeta:zt([{json:"destination",js:"destination",typ:Vt(void 0,Yt("MetaDestination"))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"source",js:"source",typ:Yt("MetaSource")},{json:"timestamp",js:"timestamp",typ:Date}],!1),PrivateChannelBroadcastBridgeRequestPayload:zt([{json:"channelId",js:"channelId",typ:""},{json:"context",js:"context",typ:Yt("ContextElement")}],!1),PrivateChannelEventListenerAddedAgentRequest:zt([{json:"meta",js:"meta",typ:Yt("PrivateChannelEventListenerAddedAgentRequestMeta")},{json:"payload",js:"payload",typ:Yt("PrivateChannelEventListenerAddedAgentRequestPayload")},{json:"type",js:"type",typ:Yt("PrivateChannelEventListenerAddedAgentRequestType")}],!1),PrivateChannelEventListenerAddedAgentRequestMeta:zt([{json:"destination",js:"destination",typ:Vt(void 0,Yt("MetaDestination"))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"source",js:"source",typ:Vt(void 0,Yt("SourceObject"))},{json:"timestamp",js:"timestamp",typ:Date}],!1),PrivateChannelEventListenerAddedAgentRequestPayload:zt([{json:"channelId",js:"channelId",typ:""},{json:"listenerType",js:"listenerType",typ:Yt("PrivateChannelEventListenerTypes")}],!1),PrivateChannelEventListenerAddedBridgeRequest:zt([{json:"meta",js:"meta",typ:Yt("PrivateChannelEventListenerAddedBridgeRequestMeta")},{json:"payload",js:"payload",typ:Yt("PrivateChannelEventListenerAddedBridgeRequestPayload")},{json:"type",js:"type",typ:Yt("PrivateChannelEventListenerAddedAgentRequestType")}],!1),PrivateChannelEventListenerAddedBridgeRequestMeta:zt([{json:"destination",js:"destination",typ:Vt(void 0,Yt("MetaDestination"))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"source",js:"source",typ:Yt("MetaSource")},{json:"timestamp",js:"timestamp",typ:Date}],!1),PrivateChannelEventListenerAddedBridgeRequestPayload:zt([{json:"channelId",js:"channelId",typ:""},{json:"listenerType",js:"listenerType",typ:Yt("PrivateChannelEventListenerTypes")}],!1),PrivateChannelEventListenerRemovedAgentRequest:zt([{json:"meta",js:"meta",typ:Yt("PrivateChannelEventListenerRemovedAgentRequestMeta")},{json:"payload",js:"payload",typ:Yt("PrivateChannelEventListenerRemovedAgentRequestPayload")},{json:"type",js:"type",typ:Yt("PrivateChannelEventListenerRemovedAgentRequestType")}],!1),PrivateChannelEventListenerRemovedAgentRequestMeta:zt([{json:"destination",js:"destination",typ:Vt(void 0,Yt("MetaDestination"))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"source",js:"source",typ:Vt(void 0,Yt("SourceObject"))},{json:"timestamp",js:"timestamp",typ:Date}],!1),PrivateChannelEventListenerRemovedAgentRequestPayload:zt([{json:"channelId",js:"channelId",typ:""},{json:"listenerType",js:"listenerType",typ:Yt("PrivateChannelEventListenerTypes")}],!1),PrivateChannelEventListenerRemovedBridgeRequest:zt([{json:"meta",js:"meta",typ:Yt("PrivateChannelEventListenerRemovedBridgeRequestMeta")},{json:"payload",js:"payload",typ:Yt("PrivateChannelEventListenerRemovedBridgeRequestPayload")},{json:"type",js:"type",typ:Yt("PrivateChannelEventListenerRemovedAgentRequestType")}],!1),PrivateChannelEventListenerRemovedBridgeRequestMeta:zt([{json:"destination",js:"destination",typ:Vt(void 0,Yt("MetaDestination"))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"source",js:"source",typ:Yt("MetaSource")},{json:"timestamp",js:"timestamp",typ:Date}],!1),PrivateChannelEventListenerRemovedBridgeRequestPayload:zt([{json:"channelId",js:"channelId",typ:""},{json:"listenerType",js:"listenerType",typ:Yt("PrivateChannelEventListenerTypes")}],!1),PrivateChannelOnAddContextListenerAgentRequest:zt([{json:"meta",js:"meta",typ:Yt("PrivateChannelOnAddContextListenerAgentRequestMeta")},{json:"payload",js:"payload",typ:Yt("PrivateChannelOnAddContextListenerAgentRequestPayload")},{json:"type",js:"type",typ:Yt("PrivateChannelOnAddContextListenerAgentRequestType")}],!1),PrivateChannelOnAddContextListenerAgentRequestMeta:zt([{json:"destination",js:"destination",typ:Vt(void 0,Yt("MetaDestination"))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"source",js:"source",typ:Vt(void 0,Yt("SourceObject"))},{json:"timestamp",js:"timestamp",typ:Date}],!1),PrivateChannelOnAddContextListenerAgentRequestPayload:zt([{json:"channelId",js:"channelId",typ:""},{json:"contextType",js:"contextType",typ:Vt(null,"")}],!1),PrivateChannelOnAddContextListenerBridgeRequest:zt([{json:"meta",js:"meta",typ:Yt("PrivateChannelOnAddContextListenerBridgeRequestMeta")},{json:"payload",js:"payload",typ:Yt("PrivateChannelOnAddContextListenerBridgeRequestPayload")},{json:"type",js:"type",typ:Yt("PrivateChannelOnAddContextListenerAgentRequestType")}],!1),PrivateChannelOnAddContextListenerBridgeRequestMeta:zt([{json:"destination",js:"destination",typ:Vt(void 0,Yt("MetaDestination"))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"source",js:"source",typ:Yt("MetaSource")},{json:"timestamp",js:"timestamp",typ:Date}],!1),PrivateChannelOnAddContextListenerBridgeRequestPayload:zt([{json:"channelId",js:"channelId",typ:""},{json:"contextType",js:"contextType",typ:Vt(null,"")}],!1),PrivateChannelOnDisconnectAgentRequest:zt([{json:"meta",js:"meta",typ:Yt("PrivateChannelOnDisconnectAgentRequestMeta")},{json:"payload",js:"payload",typ:Yt("PrivateChannelOnDisconnectAgentRequestPayload")},{json:"type",js:"type",typ:Yt("PrivateChannelOnDisconnectAgentRequestType")}],!1),PrivateChannelOnDisconnectAgentRequestMeta:zt([{json:"destination",js:"destination",typ:Vt(void 0,Yt("MetaDestination"))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"source",js:"source",typ:Vt(void 0,Yt("SourceObject"))},{json:"timestamp",js:"timestamp",typ:Date}],!1),PrivateChannelOnDisconnectAgentRequestPayload:zt([{json:"channelId",js:"channelId",typ:""}],!1),PrivateChannelOnDisconnectBridgeRequest:zt([{json:"meta",js:"meta",typ:Yt("PrivateChannelOnDisconnectBridgeRequestMeta")},{json:"payload",js:"payload",typ:Yt("PrivateChannelOnDisconnectBridgeRequestPayload")},{json:"type",js:"type",typ:Yt("PrivateChannelOnDisconnectAgentRequestType")}],!1),PrivateChannelOnDisconnectBridgeRequestMeta:zt([{json:"destination",js:"destination",typ:Vt(void 0,Yt("MetaDestination"))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"source",js:"source",typ:Yt("MetaSource")},{json:"timestamp",js:"timestamp",typ:Date}],!1),PrivateChannelOnDisconnectBridgeRequestPayload:zt([{json:"channelId",js:"channelId",typ:""}],!1),PrivateChannelOnUnsubscribeAgentRequest:zt([{json:"meta",js:"meta",typ:Yt("PrivateChannelOnUnsubscribeAgentRequestMeta")},{json:"payload",js:"payload",typ:Yt("PrivateChannelOnUnsubscribeAgentRequestPayload")},{json:"type",js:"type",typ:Yt("PrivateChannelOnUnsubscribeAgentRequestType")}],!1),PrivateChannelOnUnsubscribeAgentRequestMeta:zt([{json:"destination",js:"destination",typ:Vt(void 0,Yt("MetaDestination"))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"source",js:"source",typ:Vt(void 0,Yt("SourceObject"))},{json:"timestamp",js:"timestamp",typ:Date}],!1),PrivateChannelOnUnsubscribeAgentRequestPayload:zt([{json:"channelId",js:"channelId",typ:""},{json:"contextType",js:"contextType",typ:Vt(null,"")}],!1),PrivateChannelOnUnsubscribeBridgeRequest:zt([{json:"meta",js:"meta",typ:Yt("ERequestMetadata")},{json:"payload",js:"payload",typ:Yt("PrivateChannelOnUnsubscribeBridgeRequestPayload")},{json:"type",js:"type",typ:Yt("PrivateChannelOnUnsubscribeAgentRequestType")}],!1),ERequestMetadata:zt([{json:"destination",js:"destination",typ:Vt(void 0,Yt("MetaDestination"))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"source",js:"source",typ:Yt("MetaSource")},{json:"timestamp",js:"timestamp",typ:Date}],!1),PrivateChannelOnUnsubscribeBridgeRequestPayload:zt([{json:"channelId",js:"channelId",typ:""},{json:"contextType",js:"contextType",typ:Vt(null,"")}],!1),RaiseIntentAgentErrorResponse:zt([{json:"meta",js:"meta",typ:Yt("RaiseIntentAgentErrorResponseMeta")},{json:"payload",js:"payload",typ:Yt("RaiseIntentAgentErrorResponsePayload")},{json:"type",js:"type",typ:Yt("RaiseIntentAgentErrorResponseType")}],!1),RaiseIntentAgentErrorResponseMeta:zt([{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"timestamp",js:"timestamp",typ:Date}],!1),RaiseIntentAgentErrorResponsePayload:zt([{json:"error",js:"error",typ:Yt("ErrorMessage")}],!1),RaiseIntentAgentRequest:zt([{json:"meta",js:"meta",typ:Yt("RaiseIntentAgentRequestMeta")},{json:"payload",js:"payload",typ:Yt("RaiseIntentAgentRequestPayload")},{json:"type",js:"type",typ:Yt("RaiseIntentAgentRequestType")}],!1),RaiseIntentAgentRequestMeta:zt([{json:"destination",js:"destination",typ:Yt("MetaDestination")},{json:"requestUuid",js:"requestUuid",typ:""},{json:"source",js:"source",typ:Yt("SourceObject")},{json:"timestamp",js:"timestamp",typ:Date}],!1),RaiseIntentAgentRequestPayload:zt([{json:"app",js:"app",typ:Yt("AppDestinationIdentifier")},{json:"context",js:"context",typ:Yt("ContextElement")},{json:"intent",js:"intent",typ:""}],!1),RaiseIntentAgentResponse:zt([{json:"meta",js:"meta",typ:Yt("RaiseIntentAgentResponseMeta")},{json:"payload",js:"payload",typ:Yt("RaiseIntentAgentResponsePayload")},{json:"type",js:"type",typ:Yt("RaiseIntentAgentErrorResponseType")}],!1),RaiseIntentAgentResponseMeta:zt([{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"timestamp",js:"timestamp",typ:Date}],!1),RaiseIntentAgentResponsePayload:zt([{json:"intentResolution",js:"intentResolution",typ:Yt("IntentResolution")}],!1),IntentResolution:zt([{json:"intent",js:"intent",typ:""},{json:"source",js:"source",typ:Yt("AppIdentifier")},{json:"version",js:"version",typ:Vt(void 0,"")}],!1),RaiseIntentBridgeErrorResponse:zt([{json:"meta",js:"meta",typ:Yt("RaiseIntentBridgeErrorResponseMeta")},{json:"payload",js:"payload",typ:Yt("RaiseIntentBridgeErrorResponsePayload")},{json:"type",js:"type",typ:Yt("RaiseIntentAgentErrorResponseType")}],!1),RaiseIntentBridgeErrorResponseMeta:zt([{json:"errorDetails",js:"errorDetails",typ:Ht(Yt("ResponseErrorDetail"))},{json:"errorSources",js:"errorSources",typ:Ht(Yt("DesktopAgentIdentifier"))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"timestamp",js:"timestamp",typ:Date}],!1),RaiseIntentBridgeErrorResponsePayload:zt([{json:"error",js:"error",typ:Yt("ErrorMessage")}],!1),RaiseIntentBridgeRequest:zt([{json:"meta",js:"meta",typ:Yt("RaiseIntentBridgeRequestMeta")},{json:"payload",js:"payload",typ:Yt("RaiseIntentBridgeRequestPayload")},{json:"type",js:"type",typ:Yt("RaiseIntentAgentRequestType")}],!1),RaiseIntentBridgeRequestMeta:zt([{json:"destination",js:"destination",typ:Yt("MetaDestination")},{json:"requestUuid",js:"requestUuid",typ:""},{json:"source",js:"source",typ:Yt("MetaSource")},{json:"timestamp",js:"timestamp",typ:Date}],!1),RaiseIntentBridgeRequestPayload:zt([{json:"app",js:"app",typ:Yt("AppDestinationIdentifier")},{json:"context",js:"context",typ:Yt("ContextElement")},{json:"intent",js:"intent",typ:""}],!1),RaiseIntentBridgeResponse:zt([{json:"meta",js:"meta",typ:Yt("RaiseIntentBridgeResponseMeta")},{json:"payload",js:"payload",typ:Yt("RaiseIntentBridgeResponsePayload")},{json:"type",js:"type",typ:Yt("RaiseIntentAgentErrorResponseType")}],!1),RaiseIntentBridgeResponseMeta:zt([{json:"errorDetails",js:"errorDetails",typ:Vt(void 0,Ht(Yt("ResponseErrorDetail")))},{json:"errorSources",js:"errorSources",typ:Vt(void 0,Ht(Yt("DesktopAgentIdentifier")))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"sources",js:"sources",typ:Vt(void 0,Ht(Yt("DesktopAgentIdentifier")))},{json:"timestamp",js:"timestamp",typ:Date}],!1),RaiseIntentBridgeResponsePayload:zt([{json:"intentResolution",js:"intentResolution",typ:Yt("IntentResolution")}],!1),RaiseIntentResultAgentErrorResponse:zt([{json:"meta",js:"meta",typ:Yt("RaiseIntentResultAgentErrorResponseMeta")},{json:"payload",js:"payload",typ:Yt("RaiseIntentResultAgentErrorResponsePayload")},{json:"type",js:"type",typ:Yt("RaiseIntentResultAgentErrorResponseType")}],!1),RaiseIntentResultAgentErrorResponseMeta:zt([{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"timestamp",js:"timestamp",typ:Date}],!1),RaiseIntentResultAgentErrorResponsePayload:zt([{json:"error",js:"error",typ:Yt("RaiseIntentResultErrorMessage")}],!1),RaiseIntentResultAgentResponse:zt([{json:"meta",js:"meta",typ:Yt("RaiseIntentResultAgentResponseMeta")},{json:"payload",js:"payload",typ:Yt("RaiseIntentResultAgentResponsePayload")},{json:"type",js:"type",typ:Yt("RaiseIntentResultAgentErrorResponseType")}],!1),RaiseIntentResultAgentResponseMeta:zt([{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"timestamp",js:"timestamp",typ:Date}],!1),RaiseIntentResultAgentResponsePayload:zt([{json:"intentResult",js:"intentResult",typ:Yt("IntentResult")}],!1),IntentResult:zt([{json:"context",js:"context",typ:Vt(void 0,Yt("ContextElement"))},{json:"channel",js:"channel",typ:Vt(void 0,Yt("Channel"))}],!1),Channel:zt([{json:"displayMetadata",js:"displayMetadata",typ:Vt(void 0,Yt("DisplayMetadata"))},{json:"id",js:"id",typ:""},{json:"type",js:"type",typ:Yt("Type")}],!1),DisplayMetadata:zt([{json:"color",js:"color",typ:Vt(void 0,"")},{json:"glyph",js:"glyph",typ:Vt(void 0,"")},{json:"name",js:"name",typ:Vt(void 0,"")}],!1),RaiseIntentResultBridgeErrorResponse:zt([{json:"meta",js:"meta",typ:Yt("RaiseIntentResultBridgeErrorResponseMeta")},{json:"payload",js:"payload",typ:Yt("RaiseIntentResultBridgeErrorResponsePayload")},{json:"type",js:"type",typ:Yt("RaiseIntentResultAgentErrorResponseType")}],!1),RaiseIntentResultBridgeErrorResponseMeta:zt([{json:"errorDetails",js:"errorDetails",typ:Ht(Yt("ResponseErrorDetail"))},{json:"errorSources",js:"errorSources",typ:Ht(Yt("DesktopAgentIdentifier"))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"timestamp",js:"timestamp",typ:Date}],!1),RaiseIntentResultBridgeErrorResponsePayload:zt([{json:"error",js:"error",typ:Yt("RaiseIntentResultErrorMessage")}],!1),RaiseIntentResultBridgeResponse:zt([{json:"meta",js:"meta",typ:Yt("RaiseIntentResultBridgeResponseMeta")},{json:"payload",js:"payload",typ:Yt("RaiseIntentResultBridgeResponsePayload")},{json:"type",js:"type",typ:Yt("RaiseIntentResultAgentErrorResponseType")}],!1),RaiseIntentResultBridgeResponseMeta:zt([{json:"errorDetails",js:"errorDetails",typ:Vt(void 0,Ht(Yt("ResponseErrorDetail")))},{json:"errorSources",js:"errorSources",typ:Vt(void 0,Ht(Yt("DesktopAgentIdentifier")))},{json:"requestUuid",js:"requestUuid",typ:""},{json:"responseUuid",js:"responseUuid",typ:""},{json:"sources",js:"sources",typ:Vt(void 0,Ht(Yt("DesktopAgentIdentifier")))},{json:"timestamp",js:"timestamp",typ:Date}],!1),RaiseIntentResultBridgeResponsePayload:zt([{json:"intentResult",js:"intentResult",typ:Yt("IntentResult")}],!1),Context:zt([{json:"id",js:"id",typ:Vt(void 0,Gt("any"))},{json:"name",js:"name",typ:Vt(void 0,"")},{json:"type",js:"type",typ:""}],"any"),ResponseErrorDetail:["AccessDenied","AgentDisconnected","AppNotFound","AppTimeout","CreationFailed","DesktopAgentNotFound","ErrorOnLaunch","IntentDeliveryFailed","IntentHandlerRejected","MalformedContext","MalformedMessage","NoAppsFound","NoChannelFound","NoResultReturned","NotConnectedToBridge","ResolverTimeout","ResolverUnavailable","ResponseToBridgeTimedOut","TargetAppUnavailable","TargetInstanceUnavailable","UserCancelledResolution"],ResponseMessageType:["findInstancesResponse","findIntentResponse","findIntentsByContextResponse","getAppMetadataResponse","openResponse","raiseIntentResponse","raiseIntentResultResponse"],RequestMessageType:["broadcastRequest","findInstancesRequest","findIntentRequest","findIntentsByContextRequest","getAppMetadataRequest","openRequest","PrivateChannel.broadcast","PrivateChannel.eventListenerAdded","PrivateChannel.eventListenerRemoved","PrivateChannel.onAddContextListener","PrivateChannel.onDisconnect","PrivateChannel.onUnsubscribe","raiseIntentRequest"],BroadcastAgentRequestType:["broadcastRequest"],ConnectionStepMessageType:["authenticationFailed","connectedAgentsUpdate","handshake","hello"],ConnectionStep2HelloType:["hello"],ConnectionStep3HandshakeType:["handshake"],ConnectionStep4AuthenticationFailedType:["authenticationFailed"],ConnectionStep6ConnectedAgentsUpdateType:["connectedAgentsUpdate"],ErrorMessage:["AgentDisconnected","DesktopAgentNotFound","IntentDeliveryFailed","MalformedContext","MalformedMessage","NoAppsFound","NotConnectedToBridge","ResolverTimeout","ResolverUnavailable","ResponseToBridgeTimedOut","TargetAppUnavailable","TargetInstanceUnavailable","UserCancelledResolution"],FindInstancesAgentErrorResponseType:["findInstancesResponse"],FindInstancesAgentRequestType:["findInstancesRequest"],FindIntentAgentErrorResponseType:["findIntentResponse"],FindIntentAgentRequestType:["findIntentRequest"],FindIntentsByContextAgentErrorResponseType:["findIntentsByContextResponse"],FindIntentsByContextAgentRequestType:["findIntentsByContextRequest"],GetAppMetadataAgentErrorResponseType:["getAppMetadataResponse"],GetAppMetadataAgentRequestType:["getAppMetadataRequest"],OpenErrorMessage:["AgentDisconnected","AppNotFound","AppTimeout","DesktopAgentNotFound","ErrorOnLaunch","MalformedContext","MalformedMessage","NotConnectedToBridge","ResolverUnavailable","ResponseToBridgeTimedOut"],OpenAgentErrorResponseType:["openResponse"],OpenAgentRequestType:["openRequest"],PrivateChannelBroadcastAgentRequestType:["PrivateChannel.broadcast"],PrivateChannelEventListenerTypes:["onAddContextListener","onDisconnect","onUnsubscribe"],PrivateChannelEventListenerAddedAgentRequestType:["PrivateChannel.eventListenerAdded"],PrivateChannelEventListenerRemovedAgentRequestType:["PrivateChannel.eventListenerRemoved"],PrivateChannelOnAddContextListenerAgentRequestType:["PrivateChannel.onAddContextListener"],PrivateChannelOnDisconnectAgentRequestType:["PrivateChannel.onDisconnect"],PrivateChannelOnUnsubscribeAgentRequestType:["PrivateChannel.onUnsubscribe"],RaiseIntentAgentErrorResponseType:["raiseIntentResponse"],RaiseIntentAgentRequestType:["raiseIntentRequest"],RaiseIntentResultErrorMessage:["AgentDisconnected","IntentHandlerRejected","MalformedMessage","NoResultReturned","NotConnectedToBridge","ResponseToBridgeTimedOut"],RaiseIntentResultAgentErrorResponseType:["raiseIntentResultResponse"],Type:["app","private","user"]};!function(e){e.AppNotFound="AppNotFound",e.ErrorOnLaunch="ErrorOnLaunch",e.AppTimeout="AppTimeout",e.ResolverUnavailable="ResolverUnavailable",e.MalformedContext="MalformedContext",e.DesktopAgentNotFound="DesktopAgentNotFound"}(Qt||(Qt={})),function(e){e.NoAppsFound="NoAppsFound",e.ResolverUnavailable="ResolverUnavailable",e.UserCancelled="UserCancelledResolution",e.ResolverTimeout="ResolverTimeout",e.TargetAppUnavailable="TargetAppUnavailable",e.TargetInstanceUnavailable="TargetInstanceUnavailable",e.IntentDeliveryFailed="IntentDeliveryFailed",e.MalformedContext="MalformedContext",e.DesktopAgentNotFound="DesktopAgentNotFound"}(Kt||(Kt={})),function(e){e.NoResultReturned="NoResultReturned",e.IntentHandlerRejected="IntentHandlerRejected"}(Zt||(Zt={})),function(e){e.NoChannelFound="NoChannelFound",e.AccessDenied="AccessDenied",e.CreationFailed="CreationFailed",e.MalformedContext="MalformedContext"}(Xt||(Xt={})),function(e){e.ResponseTimedOut="ResponseToBridgeTimedOut",e.AgentDisconnected="AgentDisconnected",e.NotConnectedToBridge="NotConnectedToBridge",e.MalformedMessage="MalformedMessage"}(en||(en={})),"function"==typeof SuppressedError&&SuppressedError;var nn,rn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e}("fdc3.action","fdc3.chart","fdc3.chat.initSettings","fdc3.chat.message","fdc3.chat.room","fdc3.chat.searchCriteria","fdc3.contact","fdc3.contactList","fdc3.country","fdc3.currency","fdc3.email","fdc3.instrument","fdc3.instrumentList","fdc3.interaction","fdc3.message","fdc3.organization","fdc3.portfolio","fdc3.position","fdc3.nothing","fdc3.timeRange","fdc3.transactionResult","fdc3.valuation"),sn=(new Set(rn),function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e}("CreateInteraction","SendChatMessage","StartCall","StartChat","StartEmail","ViewAnalysis","ViewChat","ViewChart","ViewContact","ViewHoldings","ViewInstrument","ViewInteractions","ViewMessages","ViewNews","ViewOrders","ViewProfile","ViewQuote","ViewResearch"));function on(e,t,n,r){void 0===r&&(r="");var i=an(e),s=r?" on ".concat(r):"",o=n?' for key "'.concat(n,'"'):"";throw Error("Invalid value".concat(o).concat(s,". Expected ").concat(i," but got ").concat(JSON.stringify(t)))}function an(e){return Array.isArray(e)?2===e.length&&void 0===e[0]?"an optional ".concat(an(e[1])):"one of [".concat(e.map((function(e){return an(e)})).join(", "),"]"):"object"==typeof e&&void 0!==e.literal?e.literal:typeof e}function un(e){if(void 0===e.jsonToJS){var t={};e.props.forEach((function(e){return t[e.json]={key:e.js,typ:e.typ}})),e.jsonToJS=t}return e.jsonToJS}function ln(e){if(void 0===e.jsToJSON){var t={};e.props.forEach((function(e){return t[e.js]={key:e.json,typ:e.typ}})),e.jsToJSON=t}return e.jsToJSON}function dn(e,t,n,r,i){if(void 0===r&&(r=""),void 0===i&&(i=""),"any"===t)return e;if(null===t)return null===e?e:on(t,e,r,i);if(!1===t)return on(t,e,r,i);for(var s=void 0;"object"==typeof t&&void 0!==t.ref;)s=t.ref,t=bn[t.ref];return Array.isArray(t)?function(e,t){return-1!==e.indexOf(t)?t:on(e.map((function(e){return fn(e)})),t,r,i)}(t,e):"object"==typeof t?t.hasOwnProperty("unionMembers")?function(e,t){for(var s=e.length,o=0;o<s;o++){var a=e[o];try{return dn(t,a,n)}catch(e){}}return on(e,t,r,i)}(t.unionMembers,e):t.hasOwnProperty("arrayItems")?function(e,t){return Array.isArray(t)?t.map((function(t){return dn(t,e,n)})):on(fn("array"),t,r,i)}(t.arrayItems,e):t.hasOwnProperty("props")?function(e,t,o){if(null===o||"object"!=typeof o||Array.isArray(o))return on(fn(s||"object"),o,r,i);var a={};return Object.getOwnPropertyNames(e).forEach((function(t){var r=e[t],i=Object.prototype.hasOwnProperty.call(o,t)?o[t]:void 0;a[r.key]=dn(i,r.typ,n,t,s)})),Object.getOwnPropertyNames(o).forEach((function(r){Object.prototype.hasOwnProperty.call(e,r)||(a[r]=dn(o[r],t,n,r,s))})),a}(n(t),t.additional,e):on(t,e,r,i):t===Date&&"number"!=typeof e?function(e){if(null===e)return null;var t=new Date(e);return isNaN(t.valueOf())?on(fn("Date"),e,r,i):t}(e):function(e,t){return typeof e==typeof t?t:on(e,t,r,i)}(t,e)}function cn(e,t){return dn(e,t,un)}function pn(e,t){return dn(e,t,ln)}function fn(e){return{literal:e}}function yn(e){return{arrayItems:e}}function hn(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return{unionMembers:e}}function gn(e,t){return{props:e,additional:t}}function mn(e){return{props:[],additional:e}}function vn(e){return{ref:e}}new Set(sn),new Error("FDC3 DesktopAgent not available at `window.fdc3`."),new Error("Timed out waiting for `fdc3Ready` event."),new Error("`fdc3Ready` event fired, but `window.fdc3` not set to DesktopAgent."),function(e){e.Chart="fdc3.chart",e.ChatInitSettings="fdc3.chat.initSettings",e.ChatRoom="fdc3.chat.room",e.Contact="fdc3.contact",e.ContactList="fdc3.contactList",e.Country="fdc3.country",e.Currency="fdc3.currency",e.Email="fdc3.email",e.Instrument="fdc3.instrument",e.InstrumentList="fdc3.instrumentList",e.Interaction="fdc3.interaction",e.Nothing="fdc3.nothing",e.Organization="fdc3.organization",e.Portfolio="fdc3.portfolio",e.Position="fdc3.position",e.ChatSearchCriteria="fdc3.chat.searchCriteria",e.TimeRange="fdc3.timeRange",e.TransactionResult="fdc3.transactionResult",e.Valuation="fdc3.valuation"}(nn||(nn={})),function(){function e(){}e.toAction=function(e){return cn(JSON.parse(e),vn("Action"))},e.actionToJson=function(e){return JSON.stringify(pn(e,vn("Action")),null,2)},e.toChart=function(e){return cn(JSON.parse(e),vn("Chart"))},e.chartToJson=function(e){return JSON.stringify(pn(e,vn("Chart")),null,2)},e.toChatInitSettings=function(e){return cn(JSON.parse(e),vn("ChatInitSettings"))},e.chatInitSettingsToJson=function(e){return JSON.stringify(pn(e,vn("ChatInitSettings")),null,2)},e.toChatMessage=function(e){return cn(JSON.parse(e),vn("ChatMessage"))},e.chatMessageToJson=function(e){return JSON.stringify(pn(e,vn("ChatMessage")),null,2)},e.toChatRoom=function(e){return cn(JSON.parse(e),vn("ChatRoom"))},e.chatRoomToJson=function(e){return JSON.stringify(pn(e,vn("ChatRoom")),null,2)},e.toChatSearchCriteria=function(e){return cn(JSON.parse(e),vn("ChatSearchCriteria"))},e.chatSearchCriteriaToJson=function(e){return JSON.stringify(pn(e,vn("ChatSearchCriteria")),null,2)},e.toContact=function(e){return cn(JSON.parse(e),vn("Contact"))},e.contactToJson=function(e){return JSON.stringify(pn(e,vn("Contact")),null,2)},e.toContactList=function(e){return cn(JSON.parse(e),vn("ContactList"))},e.contactListToJson=function(e){return JSON.stringify(pn(e,vn("ContactList")),null,2)},e.toContext=function(e){return cn(JSON.parse(e),vn("Context"))},e.contextToJson=function(e){return JSON.stringify(pn(e,vn("Context")),null,2)},e.toCountry=function(e){return cn(JSON.parse(e),vn("Country"))},e.countryToJson=function(e){return JSON.stringify(pn(e,vn("Country")),null,2)},e.toCurrency=function(e){return cn(JSON.parse(e),vn("Currency"))},e.currencyToJson=function(e){return JSON.stringify(pn(e,vn("Currency")),null,2)},e.toEmail=function(e){return cn(JSON.parse(e),vn("Email"))},e.emailToJson=function(e){return JSON.stringify(pn(e,vn("Email")),null,2)},e.toInstrument=function(e){return cn(JSON.parse(e),vn("Instrument"))},e.instrumentToJson=function(e){return JSON.stringify(pn(e,vn("Instrument")),null,2)},e.toInstrumentList=function(e){return cn(JSON.parse(e),vn("InstrumentList"))},e.instrumentListToJson=function(e){return JSON.stringify(pn(e,vn("InstrumentList")),null,2)},e.toInteraction=function(e){return cn(JSON.parse(e),vn("Interaction"))},e.interactionToJson=function(e){return JSON.stringify(pn(e,vn("Interaction")),null,2)},e.toMessage=function(e){return cn(JSON.parse(e),vn("Message"))},e.messageToJson=function(e){return JSON.stringify(pn(e,vn("Message")),null,2)},e.toNothing=function(e){return cn(JSON.parse(e),vn("Nothing"))},e.nothingToJson=function(e){return JSON.stringify(pn(e,vn("Nothing")),null,2)},e.toOrder=function(e){return cn(JSON.parse(e),vn("Order"))},e.orderToJson=function(e){return JSON.stringify(pn(e,vn("Order")),null,2)},e.toOrderList=function(e){return cn(JSON.parse(e),vn("OrderList"))},e.orderListToJson=function(e){return JSON.stringify(pn(e,vn("OrderList")),null,2)},e.toOrganization=function(e){return cn(JSON.parse(e),vn("Organization"))},e.organizationToJson=function(e){return JSON.stringify(pn(e,vn("Organization")),null,2)},e.toPortfolio=function(e){return cn(JSON.parse(e),vn("Portfolio"))},e.portfolioToJson=function(e){return JSON.stringify(pn(e,vn("Portfolio")),null,2)},e.toPosition=function(e){return cn(JSON.parse(e),vn("Position"))},e.positionToJson=function(e){return JSON.stringify(pn(e,vn("Position")),null,2)},e.toProduct=function(e){return cn(JSON.parse(e),vn("Product"))},e.productToJson=function(e){return JSON.stringify(pn(e,vn("Product")),null,2)},e.toTimeRange=function(e){return cn(JSON.parse(e),vn("TimeRange"))},e.timeRangeToJson=function(e){return JSON.stringify(pn(e,vn("TimeRange")),null,2)},e.toTrade=function(e){return cn(JSON.parse(e),vn("Trade"))},e.tradeToJson=function(e){return JSON.stringify(pn(e,vn("Trade")),null,2)},e.toTradeList=function(e){return cn(JSON.parse(e),vn("TradeList"))},e.tradeListToJson=function(e){return JSON.stringify(pn(e,vn("TradeList")),null,2)},e.toTransactionResult=function(e){return cn(JSON.parse(e),vn("TransactionResult"))},e.transactionResultToJson=function(e){return JSON.stringify(pn(e,vn("TransactionResult")),null,2)},e.toValuation=function(e){return cn(JSON.parse(e),vn("Valuation"))},e.valuationToJson=function(e){return JSON.stringify(pn(e,vn("Valuation")),null,2)}}();var wn,bn={Action:gn([{json:"app",js:"app",typ:hn(void 0,vn("ActionTargetApp"))},{json:"context",js:"context",typ:vn("ContextElement")},{json:"intent",js:"intent",typ:hn(void 0,"")},{json:"title",js:"title",typ:""},{json:"type",js:"type",typ:vn("ActionType")},{json:"id",js:"id",typ:hn(void 0,mn("any"))},{json:"name",js:"name",typ:hn(void 0,"")}],"any"),ActionTargetApp:gn([{json:"appId",js:"appId",typ:""},{json:"desktopAgent",js:"desktopAgent",typ:hn(void 0,"")},{json:"instanceId",js:"instanceId",typ:hn(void 0,"")}],"any"),ContextElement:gn([{json:"id",js:"id",typ:hn(void 0,mn("any"))},{json:"name",js:"name",typ:hn(void 0,"")},{json:"type",js:"type",typ:""}],"any"),Chart:gn([{json:"instruments",js:"instruments",typ:yn(vn("InstrumentElement"))},{json:"otherConfig",js:"otherConfig",typ:hn(void 0,yn(vn("ContextElement")))},{json:"range",js:"range",typ:hn(void 0,vn("TimeRangeObject"))},{json:"style",js:"style",typ:hn(void 0,vn("ChartStyle"))},{json:"type",js:"type",typ:vn("ChartType")},{json:"id",js:"id",typ:hn(void 0,mn("any"))},{json:"name",js:"name",typ:hn(void 0,"")}],"any"),InstrumentElement:gn([{json:"id",js:"id",typ:vn("PurpleInstrumentIdentifiers")},{json:"market",js:"market",typ:hn(void 0,vn("OrganizationMarket"))},{json:"type",js:"type",typ:vn("PurpleInteractionType")},{json:"name",js:"name",typ:hn(void 0,"")}],"any"),PurpleInstrumentIdentifiers:gn([{json:"BBG",js:"BBG",typ:hn(void 0,"")},{json:"CUSIP",js:"CUSIP",typ:hn(void 0,"")},{json:"FDS_ID",js:"FDS_ID",typ:hn(void 0,"")},{json:"FIGI",js:"FIGI",typ:hn(void 0,"")},{json:"ISIN",js:"ISIN",typ:hn(void 0,"")},{json:"PERMID",js:"PERMID",typ:hn(void 0,"")},{json:"RIC",js:"RIC",typ:hn(void 0,"")},{json:"SEDOL",js:"SEDOL",typ:hn(void 0,"")},{json:"ticker",js:"ticker",typ:hn(void 0,"")}],"any"),OrganizationMarket:gn([{json:"BBG",js:"BBG",typ:hn(void 0,"")},{json:"COUNTRY_ISOALPHA2",js:"COUNTRY_ISOALPHA2",typ:hn(void 0,"")},{json:"MIC",js:"MIC",typ:hn(void 0,"")},{json:"name",js:"name",typ:hn(void 0,"")}],"any"),TimeRangeObject:gn([{json:"endTime",js:"endTime",typ:hn(void 0,Date)},{json:"startTime",js:"startTime",typ:hn(void 0,Date)},{json:"type",js:"type",typ:vn("TimeRangeType")},{json:"id",js:"id",typ:hn(void 0,mn("any"))},{json:"name",js:"name",typ:hn(void 0,"")}],"any"),ChatInitSettings:gn([{json:"chatName",js:"chatName",typ:hn(void 0,"")},{json:"members",js:"members",typ:hn(void 0,vn("ContactListObject"))},{json:"message",js:"message",typ:hn(void 0,hn(vn("MessageObject"),""))},{json:"options",js:"options",typ:hn(void 0,vn("ChatOptions"))},{json:"type",js:"type",typ:vn("ChatInitSettingsType")},{json:"id",js:"id",typ:hn(void 0,mn("any"))},{json:"name",js:"name",typ:hn(void 0,"")}],"any"),ContactListObject:gn([{json:"contacts",js:"contacts",typ:yn(vn("ContactElement"))},{json:"type",js:"type",typ:vn("ContactListType")},{json:"id",js:"id",typ:hn(void 0,mn("any"))},{json:"name",js:"name",typ:hn(void 0,"")}],"any"),ContactElement:gn([{json:"id",js:"id",typ:vn("PurpleContactIdentifiers")},{json:"type",js:"type",typ:vn("FluffyInteractionType")},{json:"name",js:"name",typ:hn(void 0,"")}],"any"),PurpleContactIdentifiers:gn([{json:"email",js:"email",typ:hn(void 0,"")},{json:"FDS_ID",js:"FDS_ID",typ:hn(void 0,"")}],"any"),MessageObject:gn([{json:"entities",js:"entities",typ:hn(void 0,mn(vn("PurpleAction")))},{json:"text",js:"text",typ:hn(void 0,vn("PurpleMessageText"))},{json:"type",js:"type",typ:vn("MessageType")},{json:"id",js:"id",typ:hn(void 0,mn("any"))},{json:"name",js:"name",typ:hn(void 0,"")}],"any"),PurpleAction:gn([{json:"app",js:"app",typ:hn(void 0,vn("ActionTargetApp"))},{json:"context",js:"context",typ:hn(void 0,vn("ContextElement"))},{json:"intent",js:"intent",typ:hn(void 0,"")},{json:"title",js:"title",typ:hn(void 0,"")},{json:"type",js:"type",typ:vn("EntityType")},{json:"id",js:"id",typ:hn(void 0,mn("any"))},{json:"name",js:"name",typ:hn(void 0,"")},{json:"data",js:"data",typ:hn(void 0,vn("PurpleData"))}],"any"),PurpleData:gn([{json:"dataUri",js:"dataUri",typ:""},{json:"name",js:"name",typ:""}],"any"),PurpleMessageText:gn([{json:"text/markdown",js:"text/markdown",typ:hn(void 0,"")},{json:"text/plain",js:"text/plain",typ:hn(void 0,"")}],"any"),ChatOptions:gn([{json:"allowAddUser",js:"allowAddUser",typ:hn(void 0,!0)},{json:"allowHistoryBrowsing",js:"allowHistoryBrowsing",typ:hn(void 0,!0)},{json:"allowMessageCopy",js:"allowMessageCopy",typ:hn(void 0,!0)},{json:"groupRecipients",js:"groupRecipients",typ:hn(void 0,!0)},{json:"isPublic",js:"isPublic",typ:hn(void 0,!0)}],"any"),ChatMessage:gn([{json:"chatRoom",js:"chatRoom",typ:vn("ChatRoomObject")},{json:"message",js:"message",typ:vn("MessageObject")},{json:"type",js:"type",typ:vn("ChatMessageType")},{json:"id",js:"id",typ:hn(void 0,mn("any"))},{json:"name",js:"name",typ:hn(void 0,"")}],"any"),ChatRoomObject:gn([{json:"id",js:"id",typ:mn("any")},{json:"name",js:"name",typ:hn(void 0,"")},{json:"providerName",js:"providerName",typ:""},{json:"type",js:"type",typ:vn("ChatRoomType")},{json:"url",js:"url",typ:hn(void 0,"")}],"any"),ChatRoom:gn([{json:"id",js:"id",typ:mn("any")},{json:"name",js:"name",typ:hn(void 0,"")},{json:"providerName",js:"providerName",typ:""},{json:"type",js:"type",typ:vn("ChatRoomType")},{json:"url",js:"url",typ:hn(void 0,"")}],"any"),ChatSearchCriteria:gn([{json:"criteria",js:"criteria",typ:yn(hn(vn("OrganizationObject"),""))},{json:"type",js:"type",typ:vn("ChatSearchCriteriaType")},{json:"id",js:"id",typ:hn(void 0,mn("any"))},{json:"name",js:"name",typ:hn(void 0,"")}],"any"),OrganizationObject:gn([{json:"id",js:"id",typ:vn("Identifiers")},{json:"market",js:"market",typ:hn(void 0,vn("OrganizationMarket"))},{json:"type",js:"type",typ:vn("TentacledInteractionType")},{json:"name",js:"name",typ:hn(void 0,"")}],"any"),Identifiers:gn([{json:"BBG",js:"BBG",typ:hn(void 0,"")},{json:"CUSIP",js:"CUSIP",typ:hn(void 0,"")},{json:"FDS_ID",js:"FDS_ID",typ:hn(void 0,"")},{json:"FIGI",js:"FIGI",typ:hn(void 0,"")},{json:"ISIN",js:"ISIN",typ:hn(void 0,"")},{json:"PERMID",js:"PERMID",typ:hn(void 0,"")},{json:"RIC",js:"RIC",typ:hn(void 0,"")},{json:"SEDOL",js:"SEDOL",typ:hn(void 0,"")},{json:"ticker",js:"ticker",typ:hn(void 0,"")},{json:"LEI",js:"LEI",typ:hn(void 0,"")},{json:"email",js:"email",typ:hn(void 0,"")}],"any"),Contact:gn([{json:"id",js:"id",typ:vn("FluffyContactIdentifiers")},{json:"type",js:"type",typ:vn("FluffyInteractionType")},{json:"name",js:"name",typ:hn(void 0,"")}],"any"),FluffyContactIdentifiers:gn([{json:"email",js:"email",typ:hn(void 0,"")},{json:"FDS_ID",js:"FDS_ID",typ:hn(void 0,"")}],"any"),ContactList:gn([{json:"contacts",js:"contacts",typ:yn(vn("ContactElement"))},{json:"type",js:"type",typ:vn("ContactListType")},{json:"id",js:"id",typ:hn(void 0,mn("any"))},{json:"name",js:"name",typ:hn(void 0,"")}],"any"),Context:gn([{json:"id",js:"id",typ:hn(void 0,mn("any"))},{json:"name",js:"name",typ:hn(void 0,"")},{json:"type",js:"type",typ:""}],"any"),Country:gn([{json:"id",js:"id",typ:vn("CountryID")},{json:"type",js:"type",typ:vn("CountryType")},{json:"name",js:"name",typ:hn(void 0,"")}],"any"),CountryID:gn([{json:"COUNTRY_ISOALPHA2",js:"COUNTRY_ISOALPHA2",typ:hn(void 0,"")},{json:"COUNTRY_ISOALPHA3",js:"COUNTRY_ISOALPHA3",typ:hn(void 0,"")},{json:"ISOALPHA2",js:"ISOALPHA2",typ:hn(void 0,"")},{json:"ISOALPHA3",js:"ISOALPHA3",typ:hn(void 0,"")}],"any"),Currency:gn([{json:"id",js:"id",typ:vn("CurrencyID")},{json:"name",js:"name",typ:hn(void 0,"")},{json:"type",js:"type",typ:vn("CurrencyType")}],"any"),CurrencyID:gn([{json:"CURRENCY_ISOCODE",js:"CURRENCY_ISOCODE",typ:hn(void 0,"")}],"any"),Email:gn([{json:"recipients",js:"recipients",typ:vn("EmailRecipients")},{json:"subject",js:"subject",typ:hn(void 0,"")},{json:"textBody",js:"textBody",typ:hn(void 0,"")},{json:"type",js:"type",typ:vn("EmailType")},{json:"id",js:"id",typ:hn(void 0,mn("any"))},{json:"name",js:"name",typ:hn(void 0,"")}],"any"),EmailRecipients:gn([{json:"id",js:"id",typ:hn(void 0,vn("EmailRecipientsID"))},{json:"type",js:"type",typ:vn("EmailRecipientsType")},{json:"name",js:"name",typ:hn(void 0,"")},{json:"contacts",js:"contacts",typ:hn(void 0,yn(vn("ContactElement")))}],"any"),EmailRecipientsID:gn([{json:"email",js:"email",typ:hn(void 0,"")},{json:"FDS_ID",js:"FDS_ID",typ:hn(void 0,"")}],"any"),Instrument:gn([{json:"id",js:"id",typ:vn("FluffyInstrumentIdentifiers")},{json:"market",js:"market",typ:hn(void 0,vn("PurpleMarket"))},{json:"type",js:"type",typ:vn("PurpleInteractionType")},{json:"name",js:"name",typ:hn(void 0,"")}],"any"),FluffyInstrumentIdentifiers:gn([{json:"BBG",js:"BBG",typ:hn(void 0,"")},{json:"CUSIP",js:"CUSIP",typ:hn(void 0,"")},{json:"FDS_ID",js:"FDS_ID",typ:hn(void 0,"")},{json:"FIGI",js:"FIGI",typ:hn(void 0,"")},{json:"ISIN",js:"ISIN",typ:hn(void 0,"")},{json:"PERMID",js:"PERMID",typ:hn(void 0,"")},{json:"RIC",js:"RIC",typ:hn(void 0,"")},{json:"SEDOL",js:"SEDOL",typ:hn(void 0,"")},{json:"ticker",js:"ticker",typ:hn(void 0,"")}],"any"),PurpleMarket:gn([{json:"BBG",js:"BBG",typ:hn(void 0,"")},{json:"COUNTRY_ISOALPHA2",js:"COUNTRY_ISOALPHA2",typ:hn(void 0,"")},{json:"MIC",js:"MIC",typ:hn(void 0,"")},{json:"name",js:"name",typ:hn(void 0,"")}],"any"),InstrumentList:gn([{json:"instruments",js:"instruments",typ:yn(vn("InstrumentElement"))},{json:"type",js:"type",typ:vn("InstrumentListType")},{json:"id",js:"id",typ:hn(void 0,mn("any"))},{json:"name",js:"name",typ:hn(void 0,"")}],"any"),Interaction:gn([{json:"description",js:"description",typ:""},{json:"id",js:"id",typ:hn(void 0,vn("InteractionID"))},{json:"initiator",js:"initiator",typ:hn(void 0,vn("ContactElement"))},{json:"interactionType",js:"interactionType",typ:""},{json:"origin",js:"origin",typ:hn(void 0,"")},{json:"participants",js:"participants",typ:vn("ContactListObject")},{json:"timeRange",js:"timeRange",typ:vn("TimeRangeObject")},{json:"type",js:"type",typ:vn("InteractionType")},{json:"name",js:"name",typ:hn(void 0,"")}],"any"),InteractionID:gn([{json:"SALESFORCE",js:"SALESFORCE",typ:hn(void 0,"")},{json:"SINGLETRACK",js:"SINGLETRACK",typ:hn(void 0,"")},{json:"URI",js:"URI",typ:hn(void 0,"")}],"any"),Message:gn([{json:"entities",js:"entities",typ:hn(void 0,mn(vn("FluffyAction")))},{json:"text",js:"text",typ:hn(void 0,vn("FluffyMessageText"))},{json:"type",js:"type",typ:vn("MessageType")},{json:"id",js:"id",typ:hn(void 0,mn("any"))},{json:"name",js:"name",typ:hn(void 0,"")}],"any"),FluffyAction:gn([{json:"app",js:"app",typ:hn(void 0,vn("ActionTargetApp"))},{json:"context",js:"context",typ:hn(void 0,vn("ContextElement"))},{json:"intent",js:"intent",typ:hn(void 0,"")},{json:"title",js:"title",typ:hn(void 0,"")},{json:"type",js:"type",typ:vn("EntityType")},{json:"id",js:"id",typ:hn(void 0,mn("any"))},{json:"name",js:"name",typ:hn(void 0,"")},{json:"data",js:"data",typ:hn(void 0,vn("FluffyData"))}],"any"),FluffyData:gn([{json:"dataUri",js:"dataUri",typ:""},{json:"name",js:"name",typ:""}],"any"),FluffyMessageText:gn([{json:"text/markdown",js:"text/markdown",typ:hn(void 0,"")},{json:"text/plain",js:"text/plain",typ:hn(void 0,"")}],"any"),Nothing:gn([{json:"type",js:"type",typ:vn("NothingType")},{json:"id",js:"id",typ:hn(void 0,mn("any"))},{json:"name",js:"name",typ:hn(void 0,"")}],"any"),Order:gn([{json:"details",js:"details",typ:hn(void 0,vn("PurpleOrderDetails"))},{json:"id",js:"id",typ:mn("")},{json:"name",js:"name",typ:hn(void 0,"")},{json:"type",js:"type",typ:vn("OrderType")}],"any"),PurpleOrderDetails:gn([{json:"product",js:"product",typ:hn(void 0,vn("ProductObject"))}],"any"),ProductObject:gn([{json:"id",js:"id",typ:mn("")},{json:"instrument",js:"instrument",typ:hn(void 0,vn("InstrumentElement"))},{json:"name",js:"name",typ:hn(void 0,"")},{json:"type",js:"type",typ:vn("ProductType")}],"any"),OrderList:gn([{json:"orders",js:"orders",typ:yn(vn("OrderElement"))},{json:"type",js:"type",typ:vn("OrderListType")},{json:"id",js:"id",typ:hn(void 0,mn("any"))},{json:"name",js:"name",typ:hn(void 0,"")}],"any"),OrderElement:gn([{json:"details",js:"details",typ:hn(void 0,vn("FluffyOrderDetails"))},{json:"id",js:"id",typ:mn("")},{json:"name",js:"name",typ:hn(void 0,"")},{json:"type",js:"type",typ:vn("OrderType")}],"any"),FluffyOrderDetails:gn([{json:"product",js:"product",typ:hn(void 0,vn("ProductObject"))}],"any"),Organization:gn([{json:"id",js:"id",typ:vn("OrganizationIdentifiers")},{json:"type",js:"type",typ:vn("StickyInteractionType")},{json:"name",js:"name",typ:hn(void 0,"")}],"any"),OrganizationIdentifiers:gn([{json:"FDS_ID",js:"FDS_ID",typ:hn(void 0,"")},{json:"LEI",js:"LEI",typ:hn(void 0,"")},{json:"PERMID",js:"PERMID",typ:hn(void 0,"")}],"any"),Portfolio:gn([{json:"positions",js:"positions",typ:yn(vn("PositionElement"))},{json:"type",js:"type",typ:vn("PortfolioType")},{json:"id",js:"id",typ:hn(void 0,mn("any"))},{json:"name",js:"name",typ:hn(void 0,"")}],"any"),PositionElement:gn([{json:"holding",js:"holding",typ:3.14},{json:"instrument",js:"instrument",typ:vn("InstrumentElement")},{json:"type",js:"type",typ:vn("PositionType")},{json:"id",js:"id",typ:hn(void 0,mn("any"))},{json:"name",js:"name",typ:hn(void 0,"")}],"any"),Position:gn([{json:"holding",js:"holding",typ:3.14},{json:"instrument",js:"instrument",typ:vn("InstrumentElement")},{json:"type",js:"type",typ:vn("PositionType")},{json:"id",js:"id",typ:hn(void 0,mn("any"))},{json:"name",js:"name",typ:hn(void 0,"")}],"any"),Product:gn([{json:"id",js:"id",typ:mn("")},{json:"instrument",js:"instrument",typ:hn(void 0,vn("InstrumentElement"))},{json:"name",js:"name",typ:hn(void 0,"")},{json:"type",js:"type",typ:vn("ProductType")}],"any"),TimeRange:gn([{json:"endTime",js:"endTime",typ:hn(void 0,Date)},{json:"startTime",js:"startTime",typ:hn(void 0,Date)},{json:"type",js:"type",typ:vn("TimeRangeType")},{json:"id",js:"id",typ:hn(void 0,mn("any"))},{json:"name",js:"name",typ:hn(void 0,"")}],"any"),Trade:gn([{json:"id",js:"id",typ:mn("")},{json:"name",js:"name",typ:hn(void 0,"")},{json:"product",js:"product",typ:vn("ProductObject")},{json:"type",js:"type",typ:vn("TradeType")}],"any"),TradeList:gn([{json:"trades",js:"trades",typ:yn(vn("TradeElement"))},{json:"type",js:"type",typ:vn("TradeListType")},{json:"id",js:"id",typ:hn(void 0,mn("any"))},{json:"name",js:"name",typ:hn(void 0,"")}],"any"),TradeElement:gn([{json:"id",js:"id",typ:mn("")},{json:"name",js:"name",typ:hn(void 0,"")},{json:"product",js:"product",typ:vn("ProductObject")},{json:"type",js:"type",typ:vn("TradeType")}],"any"),TransactionResult:gn([{json:"context",js:"context",typ:hn(void 0,vn("ContextElement"))},{json:"message",js:"message",typ:hn(void 0,"")},{json:"status",js:"status",typ:vn("TransactionStatus")},{json:"type",js:"type",typ:vn("TransactionResultType")},{json:"id",js:"id",typ:hn(void 0,mn("any"))},{json:"name",js:"name",typ:hn(void 0,"")}],"any"),Valuation:gn([{json:"CURRENCY_ISOCODE",js:"CURRENCY_ISOCODE",typ:""},{json:"expiryTime",js:"expiryTime",typ:hn(void 0,Date)},{json:"price",js:"price",typ:hn(void 0,3.14)},{json:"type",js:"type",typ:vn("ValuationType")},{json:"valuationTime",js:"valuationTime",typ:hn(void 0,Date)},{json:"value",js:"value",typ:3.14},{json:"id",js:"id",typ:hn(void 0,mn("any"))},{json:"name",js:"name",typ:hn(void 0,"")}],"any"),ActionType:["fdc3.action"],PurpleInteractionType:["fdc3.instrument"],TimeRangeType:["fdc3.timeRange"],ChartStyle:["bar","candle","custom","heatmap","histogram","line","mountain","pie","scatter","stacked-bar"],ChartType:["fdc3.chart"],FluffyInteractionType:["fdc3.contact"],ContactListType:["fdc3.contactList"],EntityType:["fdc3.action","fdc3.entity.fileAttachment"],MessageType:["fdc3.message"],ChatInitSettingsType:["fdc3.chat.initSettings"],ChatRoomType:["fdc3.chat.room"],ChatMessageType:["fdc3.chat.message"],TentacledInteractionType:["fdc3.contact","fdc3.instrument","fdc3.organization"],ChatSearchCriteriaType:["fdc3.chat.searchCriteria"],CountryType:["fdc3.country"],CurrencyType:["fdc3.currency"],EmailRecipientsType:["fdc3.contact","fdc3.contactList"],EmailType:["fdc3.email"],InstrumentListType:["fdc3.instrumentList"],InteractionType:["fdc3.interaction"],NothingType:["fdc3.nothing"],ProductType:["fdc3.product"],OrderType:["fdc3.order"],OrderListType:["fdc3.orderList"],StickyInteractionType:["fdc3.organization"],PositionType:["fdc3.position"],PortfolioType:["fdc3.portfolio"],TradeType:["fdc3.trade"],TradeListType:["fdc3.tradeList"],TransactionStatus:["Created","Deleted","Failed","Updated"],TransactionResultType:["fdc3.transactionResult"],ValuationType:["fdc3.valuation"]};!function(e){e.CreateInteraction="CreateInteraction",e.SendChatMessage="SendChatMessage",e.StartCall="StartCall",e.StartChat="StartChat",e.StartEmail="StartEmail",e.ViewAnalysis="ViewAnalysis",e.ViewChat="ViewChat",e.ViewChart="ViewChart",e.ViewContact="ViewContact",e.ViewHoldings="ViewHoldings",e.ViewInstrument="ViewInstrument",e.ViewInteractions="ViewInteractions",e.ViewMessages="ViewMessages",e.ViewNews="ViewNews",e.ViewOrders="ViewOrders",e.ViewProfile="ViewProfile",e.ViewQuote="ViewQuote",e.ViewResearch="ViewResearch"}(wn||(wn={}));var jn,Sn,Cn,An,Rn,In,Tn,En,On,_n,Mn,Ln,Pn,Wn,Nn,kn,Dn,xn,Fn,Bn,qn,Un=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},$n=function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n};const Jn="Private-Channel-Id";class Hn{constructor(){jn.set(this,12e4),Sn.set(this,null),Cn.set(this,[])}start(){this.registerHeartbeat()}registerHeartbeat(){clearTimeout(Un(this,Sn,"f")),ye.system.debug("FinsembleDesktopAgent: heartbeat received"),$n(this,Sn,setTimeout((()=>{ye.system.warn(`FinsembleDesktopAgent: No heartbeat received within ${Un(this,jn,"f")} milliseconds`),this.notifyDisconnect()}),Un(this,jn,"f")),"f")}notifyDisconnect(){console.warn("fdc3 has lost connectivity to the interop service. You may need to restart this app."),Un(this,Cn,"f").forEach((e=>{e("fdc3 has lost connectivity to the interop service")}))}onDisconnect(e){$n(this,Cn,Un(this,Cn,"f").concat(e),"f")}stop(){clearTimeout(Un(this,Sn,"f"))}}jn=new WeakMap,Sn=new WeakMap,Cn=new WeakMap;class Vn{constructor(e,t,n="app",r){An.set(this,void 0),$n(this,An,e,"f"),this.id=t,this.type=n,this.displayMetadata=r}async broadcast(e){if(!e||!e.type)throw new Error("Invalid arguments. An FDC3 Context object (i.e. an Object with a type field) is required.");await Un(this,An,"f").channelBroadcast(this.id,e,this.type)}getCurrentContext(e){return Un(this,An,"f").channelGetCurrentContext(this.id,e)}addContextListener(e,t){if(void 0===e)throw new Error("Invalid arguments. The contextTypeOrHandler parameter shouldn't be undefined.");if("function"!=typeof e&&!t){const n="channel addContextListener Invalid arguments. The required handler parameter is missing.";throw console.error(n,e,t),ye.system.error(n),new Error(n)}const{exchangePromise:n,unsubscribe:r}=Un(this,An,"f").channelAddContextListener(this.id,e,t);let i=new Promise((e=>{n.then((()=>{e({unsubscribe:r})}))}));return i.unsubscribe=()=>{ye.system.deprecated("Use of the synchronous version of addContextListener from FDC3 1.2 is deprecated. Please switch to `await addContextListener`."),r()},i}onAddContextListener(e){return Un(this,An,"f").channelOnAddContextListener(this.id,e)}onUnsubscribe(e){return Un(this,An,"f").channelOnUnsubscribe(this.id,e)}onDisconnect(e){return Un(this,An,"f").channelOnDisconnect(this.id,e)}disconnect(){return Un(this,An,"f").channelDisconnect(this.id)}}An=new WeakMap;class zn{constructor({routerClient:e,startup:t}){if(Rn.set(this,!1),In.set(this,new Hn),Tn.set(this,!1),En.set(this,"undefined"),On.set(this,"undefined"),_n.set(this,`FSBL.FDC3.Client.${p()()}`),Mn.set(this,{}),Ln.set(this,{}),Pn.set(this,{}),Wn.set(this,{}),Nn.set(this,{}),kn.set(this,[]),Dn.set(this,void 0),xn.set(this,void 0),Fn.set(this,{}),Bn.set(this,"8.6"),qn.set(this,null),$n(this,Dn,e,"f"),$n(this,xn,t,"f"),Un(this,Dn,"f").onFailure((()=>{ye.console.error("Router failure: transport timeout error"),Un(this,In,"f").notifyDisconnect()})),l.Event&&l.dispatchEvent){const e=new l.Event("fdc3Ready");l.dispatchEvent(e)}ee.get(["finsemble","system","FSBLVersion"],((e,t)=>{$n(this,Bn,t,"f")}))}privateChannelId(){return`${Jn}-${p()()}`}async isUserChannel(e){return null===Un(this,qn,"f")&&$n(this,qn,await this.getUserChannels(),"f"),void 0!==Un(this,qn,"f").find((t=>t.id===e))}async fetchStartupData(){await Un(this,xn,"f").onReady();const e=Un(this,xn,"f").getStartupData(),{authenticationToken:t,windowName:n}=e,r=e.webContentsName.includes(a)?a:"";"undefined"===Un(this,En,"f")&&($n(this,En,`fdc3-instanceId-${r}${t.meta.appId}=${p()()}`,"f"),$n(this,On,t.meta.appId,"f"));const i={...t.meta,instanceId:Un(this,En,"f")};return ye.system.debug("fetchStartupData",e,n,t,i),{windowName:n,authenticationToken:t,appMetadata:i}}meta(){return{appId:Un(this,On,"f"),uuid:Un(this,En,"f"),href:window.document?document.location.href:""}}handleHeartbeat(){Un(this,In,"f").registerHeartbeat()}triggerContextListeners(e){var t,n;const{context:r}=e.payload;let i,s;if(e.meta.originatorAppId&&e.meta.originatorUuid&&(i={source:{appId:e.meta.originatorAppId,instanceId:e.meta.originatorUuid}}),e.meta.targetSubscriberId){let t;Object.values(Un(this,Ln,"f")).every((n=>(t=n.find((t=>t.targetSubscriberId===e.meta.targetSubscriberId)),void 0===t))),s=t?[t]:[]}else s=(null!==(t=Un(this,Ln,"f")[null==r?void 0:r.type])&&void 0!==t?t:[]).concat(null!==(n=Un(this,Ln,"f")["*"])&&void 0!==n?n:[]);s.forEach((async({handler:t,channel:n})=>{var s,o;e.meta.channel&&e.meta.channel===n||!e.meta.channel&&!n||!e.meta.channel&&await this.isUserChannel(n)&&(null===(s=await this.getCurrentChannels())||void 0===s?void 0:s.find((e=>e.id===n)))||e.meta.channel&&!n&&await this.isUserChannel(e.meta.channel)&&(null===(o=await this.getCurrentChannels())||void 0===o?void 0:o.find((t=>t.id===e.meta.channel)))?(ye.system.debug(`FDC3 Client: triggerContextListeners for all on ${null!=n?n:"default"} channel`,e.type,e),t(r,i)):ye.system.debug(`FDC3 Client: triggerContextListeners skipped for all on ${null!=n?n:"default"} channel`,e.type,e)}))}async triggerIntentListener(e){const{intent:t,context:n,requestId:r}=e.payload;let i;const s=Un(this,Mn,"f")[t];let o,a,u=null;if(e.meta.originatorAppId&&e.meta.originatorUuid&&(i={source:{appId:e.meta.originatorAppId,instanceId:e.meta.originatorUuid}}),"function"==typeof s){let l=setInterval((()=>{ye.system.warn(`tag:FDC3:raiseIntent No intent result has been returned yet for intent ${t} -- will continue to wait`,e.payload)}),5e3);ye.system.log(`tag:FDC3:raiseIntent triggering intent listener for intent ${t}`,e.payload);try{a=await s(n,i)}catch(i){ye.system.error(`tag:FDC3:raiseIntent -- error thrown in handler for intent ${t}`,i,n,e.payload),o=Zt.IntentHandlerRejected,u={type:"intentResult",meta:this.meta(),payload:{intentResultError:o,intent:t,requestId:r}},this.exchange(u)}if(clearInterval(l),!o){const e=(null==a?void 0:a.addContextListener)?{channelId:null==a?void 0:a.id,type:a.type}:a;!e||"object"==typeof e&&e.type||(ye.system.error(`IntentResult returned by FDC3 client app for intent ${t} is rejected since it doesn't match expected channel or context definition`,e),o=Zt.NoResultReturned),u={type:"intentResult",meta:this.meta(),payload:{intentResult:e,intentResultError:o,intent:t,requestId:r}},this.exchange(u)}}else ye.system.error(`Legal listener not found for intent ${t}`),u={type:"intentResult",meta:this.meta(),payload:{intentResultError:Zt.IntentHandlerRejected,intent:t,requestId:r}},this.exchange(u);ye.system.log(`tag:FDC3:raiseIntent handler response for intent ${t}`,u)}async handlePrivateChannelEvent(e){const{channel:t,context:n,targetSubscriberId:r}=e.payload,i=Un(this,Pn,"f")[t],s=i.find((e=>e.targetSubscriberId===r));if(s)switch(s.subscribeType){case"onAddContextListener":case"onUnsubscribe":s.handler(n);break;case"onDisconnect":s.handler();break;default:ye.system.error("FDC3 Client: unknown subscribeType in matching targetSubscription",s)}else ye.system.error("FDC3 Client: could not find target subscription",r,i)}async handleIntentResult(e){const{intent:t,intentResult:n,requestId:r,intentResultError:i}=e.payload;"function"==typeof Un(this,Nn,"f")[r]?(ye.system.log(`tag:FDC3:raiseIntent result message received for intent ${t}`,e),Un(this,Nn,"f")[r]({errorResult:i,intentResult:n})):ye.system.error("Legal internal handler for intent result not found",e,Un(this,Nn,"f"))}handleIncoming(e){switch("heartbeat"===e.type?ye.system.debug("Client heartbeat",e):ye.system.debug("FDC3 Client: incoming",e.type,e),e.type){case"broadcast":this.triggerContextListeners(e);break;case"intent":this.triggerIntentListener(e);break;case"privateChannelEvent":this.handlePrivateChannelEvent(e);break;case"intentResult":this.handleIntentResult(e);break;case"heartbeat":this.handleHeartbeat()}}releaseQueue(){const e=e=>{var t;return void 0!==(null===(t=null==e?void 0:e.meta)||void 0===t?void 0:t.uuid)&&(e.meta.uuid=Un(this,En,"f")),e};Un(this,kn,"f").forEach((async t=>{ye.system.log("fdc3.releaseQueue",t);const{message:n,handler:r,resolve:i}=t,{err:s,receiveMessage:o}=await this.exchange(e(n),r);i({err:s,receiveMessage:o})})),$n(this,kn,[],"f")}exchange(e,t=()=>{}){return new Promise((async n=>{if(Un(this,Rn,"f")){ye.system.debug("FDC3 Client: outgoing",e.type,e);const{err:r,response:i}=await Un(this,Dn,"f").query(o,e,t),s=null==i?void 0:i.data;s&&ye.system.log("FDC3 Client: incoming",s),n({err:r,receiveMessage:s})}else Un(this,kn,"f").push({message:e,handler:t,resolve:n}),this.start()}))}async connect(){const{windowName:e,authenticationToken:t}=await this.fetchStartupData();ye.system.log(`fdc3.connect StartupData for ${e}`);const n={type:"register",meta:this.meta(),payload:{clientChannel:Un(this,_n,"f"),windowName:e,authenticationToken:t}};A.waitForBootStage("kernel","stageCompleted",(t=>{t?ye.system.error("connect error waitingForBootStage",t):Un(this,Dn,"f").query(o,n,(t=>{t?ye.system.error("connect error",t):(Un(this,Dn,"f").addResponder(Un(this,_n,"f"),((e,t)=>{if(e||!t){const t=(e=>{var t,n;return null!==(n=null!==(t=null==e?void 0:e.message)&&void 0!==t?t:e)&&void 0!==n?n:null})(null!=e?e:"No request received on responder");ye.system.error(`FinsembleDesktopAgent can't listen on channel ${Un(this,_n,"f")} : ${t}`)}else t.data&&this.handleIncoming(t.data),t.sendQueryResponse(null)})),$n(this,Rn,!0,"f"),ye.system.log(`FDC3 client connected for window ${e}`),this.releaseQueue(),Un(this,In,"f").start())}))}))}async start(){Un(this,Tn,"f")||($n(this,Tn,!0,"f"),await Un(this,xn,"f").onReady(),this.connect())}async stop(){Un(this,In,"f").stop();const e={type:"unregister",meta:this.meta()};await this.exchange(e),$n(this,Tn,!1,"f"),Un(this,Dn,"f").removeResponder(Un(this,_n,"f")),$n(this,Rn,!1,"f")}onDisconnect(e){Un(this,In,"f").onDisconnect(e)}async channelGetCurrentContext(e,t){const n={type:"currentContextRequest",meta:{...this.meta(),channel:e},payload:{contextType:t}},{err:r,receiveMessage:i}=await this.exchange(n);return r?null:"currentContext"===(null==i?void 0:i.type)?i.payload.context:null}async broadcast(e){if(!e||!e.type)throw new Error("Invalid arguments. An FDC3 Context object (i.e. an Object with a type field) is required.");const t={type:"broadcast",meta:this.meta(),payload:{context:e,channelType:"user"}};await this.exchange(t)}async channelBroadcast(e,t,n){const r={type:"broadcast",meta:{...this.meta(),channel:e},payload:{context:t,channelType:n}};await this.exchange(r)}async getUserChannels(){var e;const t={type:"systemChannelRequest",meta:this.meta()},{err:n,receiveMessage:r}=await this.exchange(t);return n?[]:("systemChannels"===(null==r?void 0:r.type)?null===(e=null==r?void 0:r.payload)||void 0===e?void 0:e.channels:[]).map((e=>{var t,n,i;let s;return"systemChannels"===(null==r?void 0:r.type)&&(null===(t=null==r?void 0:r.payload)||void 0===t?void 0:t.systemChannelMeta)&&(s=null===(i=null===(n=null==r?void 0:r.payload)||void 0===n?void 0:n.systemChannelMeta[e])||void 0===i?void 0:i.displayMetaData),new Vn(this,e,"user",s)}))}async getSystemChannels(){return this.getUserChannels()}async open(e,t){var n;if(!e)throw new Error("Invalid arguments. The required 'app' parameter is missing.");const{appMetadata:r}=await this.fetchStartupData(),i={type:"open",meta:this.meta(),payload:{requestingAppId:r.appId,app:e,context:t}},{err:s,receiveMessage:o}=await this.exchange(i),a=o;if(s)throw new Error(Qt.ResolverUnavailable);if(a.payload.error)throw new Error(a.payload.error);return null!==(n=a.payload.appIdentifier)&&void 0!==n?n:{appId:"unknown-open-appIdentifier"}}async findIntent(e,t,n){if(!e)throw new Error("Invalid arguments. The required intent parameter is missing.");if(t&&!t.type)throw new Error("Invalid arguments. Second parameter must be a valid context.");if(n&&"string"!=typeof n)throw new Error("Invalid arguments. Third parameter must be a string.");const r={type:"findIntent",meta:this.meta(),payload:{intent:e,context:t,resultType:n}},{err:i,receiveMessage:s}=await this.exchange(r),o=s;if(i)throw new Error(Kt.ResolverUnavailable);if(o.payload.error)throw new Error(o.payload.error);if(!o.payload.appIntent)throw new Error("Invalid response returned from InteropService for findIntent. No appIntent and no error.");return o.payload.appIntent}async findIntentsByContext(e,t){if(!e)throw new Error("Invalid arguments. The required context parameter is missing.");if(!e.type)throw new Error("Invalid arguments. Second parameter must be a valid context.");if(t&&"string"!=typeof t)throw new Error("Invalid arguments. Second parameter must be a string to identify result type.");const n={type:"findIntentsByContext",meta:this.meta(),payload:{context:e,resultType:t}},{receiveMessage:r}=await this.exchange(n),i=r;if(i.payload.error)throw new Error(i.payload.error);return i.payload.intents||[]}async createPrivateChannel(){return new Vn(this,this.privateChannelId(),"private")}async raiseIntentInternal(e,t,n,r=!1){if(t&&!t.type)throw new Error("Invalid arguments. Second parameter must be a valid context.");const i=`raise-intent-request-Id-${p()()}`;ye.system.log(`tag:FDC3:raiseIntent initiated for intent ${e} with ${t?" context type ":"no context"}${null==t?void 0:t.type}`,t,n,i,r);const s={type:"raiseIntent",meta:this.meta(),payload:{intent:e,context:t,target:n,requestId:i,forContext:r}};ye.system.log(`tag:FDC3:raiseIntent request sent to InteropService for intent ${e}`,s);const{err:o,receiveMessage:a}=await this.exchange(s),u=a;if(ye.system.log(`tag:FDC3:raiseIntent intent resolution received for intent ${e}`,o,a),o)throw new Error(Kt.ResolverUnavailable);if(u.payload.error)throw new Error(u.payload.error);if(!u.payload.data)throw new Error("Invalid response returned from InteropService for raiseIntent. No data.");return Un(this,Wn,"f")[i]=new Promise((e=>{Un(this,Nn,"f")[i]=e})),{source:u.payload.data.source,intent:u.payload.data.intent,version:u.payload.data.version,getResult:async()=>{let t,n;if(ye.system.log(`tag:FDC3:raiseIntent getResult initiated for intent ${e}`,s),"function"==typeof Un(this,Nn,"f")[i]?({errorResult:t,intentResult:n}=await Un(this,Wn,"f")[i]):t="could not fulfill intent resolution due to no corresponding result promise",ye.system.log(`tag:FDC3:raiseIntent result for intent ${e}`,{errorResult:t,intentResult:n}),t)throw new Error(t);const r=null==n?void 0:n.channelId,o=null==n?void 0:n.type,a=r?new Vn(this,r,o):null!=n?n:void 0;return ye.system.log(`tag:FDC3:raiseIntent getResult() returned for intent ${e}`,a),a}}}async raiseIntent(e,t,n){if(!e)throw new Error("Invalid arguments. The required intent parameter is missing.");if(!t)throw new Error("Invalid arguments. The required context parameter is missing.");if(!t.type)throw new Error("Invalid arguments. Second parameter must be a valid context.");return this.raiseIntentInternal(e,t,n)}async raiseIntentForContext(e,t){if(!e)throw new Error("Invalid arguments. The required context parameter is missing.");return this.raiseIntentInternal(null,e,t,!0)}addIntentListener(e,t){if(!e)throw new Error("Invalid arguments. The required intent parameter is missing.");if(!t)throw new Error("addIntentListener Invalid arguments. The required handler parameter is missing.");if(Un(this,Mn,"f")[e])throw new Error(`Intent listener already defined for intent ${e}`);Un(this,Mn,"f")[e]=t;const n={type:"subscribeIntent",meta:this.meta(),payload:{intent:e}},r=this.exchange(n),i={unsubscribe:()=>{const t={type:"unsubscribeIntent",meta:this.meta(),payload:{intent:e}};this.exchange(t),delete Un(this,Mn,"f")[e]}};let s=new Promise((e=>{r.then((()=>{e(i)}))}));return s.unsubscribe=()=>{ye.system.deprecated("Use of the synchronous version of addIntentListener from FDC3 1.2 is deprecated. Please switch to `await addIntentListener`."),i.unsubscribe()},s}listenerForPrivateChannelEvent(e,t,n){const r=`subscriberId.${t}.${e}.${Date.now()}_${Math.random()}`,o={subscribeType:e,handler:n,channel:t,targetSubscriberId:r};Un(this,Pn,"f")[t]=i(Un(this,Pn,"f"),t,o);let a={type:"subscribePrivateChannelEvent",payload:{subscribeType:e,channel:t,targetSubscriberId:r},meta:this.meta()};return this.exchange(a),{unsubscribe:()=>{let n={type:"unsubscribePrivateChannelEvent",payload:{subscribeType:e,channel:t,targetSubscriberId:r},meta:this.meta()};Un(this,Pn,"f")[t]=s(Un(this,Pn,"f"),t,o),this.exchange(n)}}}channelOnAddContextListener(e,t){return this.listenerForPrivateChannelEvent("onAddContextListener",e,t)}channelOnUnsubscribe(e,t){return this.listenerForPrivateChannelEvent("onUnsubscribe",e,t)}channelOnDisconnect(e,t){return this.listenerForPrivateChannelEvent("onDisconnect",e,t)}channelDisconnect(e){let t={type:"channelDisconnect",meta:{...this.meta(),channel:e}};this.exchange(t)}channelAddContextListener(e,t,n){const r=n&&t||"*";n||(n=t);const o=`subscriberId.${Date.now()}_${Math.random()}`,a={handler:n,channel:e,targetSubscriberId:o};Un(this,Ln,"f")[r]=i(Un(this,Ln,"f"),r,a);let u={type:"subscribeContext",meta:{...this.meta(),targetSubscriberId:o},payload:{contextType:r}};return e&&(u.meta.channel=e),{exchangePromise:this.exchange(u),unsubscribe:()=>{let t={type:"unsubscribeContext",meta:this.meta(),payload:{contextType:r}};e&&(t.meta.channel=e),Un(this,Ln,"f")[r]=s(Un(this,Ln,"f"),r,a),this.exchange(t)}}}addContextListener(e,t){if(void 0===e)throw new Error("addContextListener Invalid arguments. The contextTypeOrHandler parameter shouldn't be undefined.");if("function"!=typeof e&&!t){const n="addContextListener Invalid arguments. The required handler parameter is missing.";throw console.error(n,e,t),ye.system.error(n),new Error(n)}const{exchangePromise:n,unsubscribe:r}=this.channelAddContextListener(null,e,t);let i=new Promise((e=>{n.then((()=>{e({unsubscribe:r})}))}));return i.unsubscribe=()=>{ye.system.deprecated("Use of the synchronous version of addContextListener from FDC3 1.2 is deprecated. Please switch to `await addContextListener`."),r()},i}async joinUserChannel(e){if(!e)throw new Error("Invalid arguments. The required channelId parameter is missing.");if(!await this.isUserChannel(e))throw ye.system.error("Invalid arguments. The channel being joined must be a user channel."),new Error(Xt.AccessDenied);const t={type:"joinChannels",meta:this.meta(),payload:{channels:[e]}},{err:n,receiveMessage:r}=await this.exchange(t),i=r;if(n)throw new Error(n);if(i.payload.error)throw new Error(i.payload.error)}async joinChannel(e){return this.joinUserChannel(e)}async getOrCreateChannel(e){if(!e)throw ye.system.debug("getOrCreateChannel: The required channelId parameter is missing."),new Error(Xt.CreationFailed);if((e=>e.includes(Jn))(e))throw new Error(Xt.AccessDenied);let t=Un(this,Fn,"f")[e];return t||(t=new Vn(this,e),Un(this,Fn,"f")[e]=t),t}async getCurrentChannels(){const e={type:"getCurrentChannels",meta:this.meta()},{err:t,receiveMessage:n}=await this.exchange(e),r=n;if(t)throw new Error(t);if(r.payload.error)throw new Error(r.payload.error);if(!r.payload.data)throw new Error("Invalid response returned from InteropService for getCurrentChannels. No data.");return r.payload.data.map((e=>{var t,r,i;let s;return"interopGetCurrentChannelsResponse"===(null==n?void 0:n.type)&&(null===(t=null==n?void 0:n.payload)||void 0===t?void 0:t.systemChannelMeta)&&(s=null===(i=null===(r=null==n?void 0:n.payload)||void 0===r?void 0:r.systemChannelMeta[e.channel])||void 0===i?void 0:i.displayMetaData),new Vn(this,e.channel,"user",s)}))}async getCurrentChannel(){const e=await this.getCurrentChannels();return e&&e.length?e[0]:null}async leaveCurrentChannel(){const e={type:"leaveChannels",meta:this.meta(),payload:{}};await this.exchange(e)}async leaveChannel(e){const t={type:"leaveChannels",meta:this.meta(),payload:{channels:[e]}};await this.exchange(t)}async getAppMetadata(e){var t;if(!e||!(null==e?void 0:e.appId))throw new Error("getAppMetadata: The required app parameter is missing or not an AppIdentifier.");const n={type:"getAppMetadata",app:e,meta:this.meta()},{err:r,receiveMessage:i}=await this.exchange(n),s=i;if(r)throw new Error(r);if(s.payload.error)throw new Error(s.payload.error);if(!s.payload.appMetadata)throw new Error("Invalid response returned from InteropService for getAppMetadata. No data.");return null===(t=s.payload)||void 0===t?void 0:t.appMetadata}async findInstances(e){let t=[];const n={type:"findInstances",app:e,meta:this.meta()};if(null==e?void 0:e.appId){const{err:e,receiveMessage:r}=await this.exchange(n),i=r;if(e)throw new Error(e);if(i.payload.error)throw new Error(i.payload.error);if(!i.payload.instances)throw new Error("Invalid response returned from InteropService for findInstances. No data.");({instances:t}=i.payload)}return t}getInfo(){let e=new Promise((async e=>{const{data:t}=await ee.get(["finsemble","system","FSBLVersion"]),{appMetadata:n}=await this.fetchStartupData();e({fdc3Version:"2.1",provider:"Finsemble",providerVersion:t,appMetadata:await this.getAppMetadata({appId:n.appId,instanceId:Un(this,En,"f")}),optionalFeatures:{OriginatingAppMetadata:!0,UserChannelMembershipAPIs:!0}})}));return e.fdc3Version="1.2",e.provider="Finsemble",e.providerVersion=Un(this,Bn,"f"),e}}Rn=new WeakMap,In=new WeakMap,Tn=new WeakMap,En=new WeakMap,On=new WeakMap,_n=new WeakMap,Mn=new WeakMap,Ln=new WeakMap,Pn=new WeakMap,Wn=new WeakMap,Nn=new WeakMap,kn=new WeakMap,Dn=new WeakMap,xn=new WeakMap,Fn=new WeakMap,Bn=new WeakMap,qn=new WeakMap;class Gn{async startApp(){var e,t,n,r,i,s,o,a;const u=await(async()=>new Promise((e=>{x.Window.getCurrent().getOptions((t=>{e(t)}))})))(),d=x.Window.getCurrent(),c=null!==(n=null!==(e=d.name)&&void 0!==e?e:null===(t=null===document||void 0===document?void 0:document.location)||void 0===t?void 0:t.href)&&void 0!==n?n:"Unknown App",f=null!==(s=null!==(r=d.name)&&void 0!==r?r:null===(i=null===document||void 0===document?void 0:document.location)||void 0===i?void 0:i.href)&&void 0!==s?s:`Unknown window-${p()()}`,y=null!==(o=d.webContentsName)&&void 0!==o?o:f,h=null!==(a=(e=>{let t=null==e?void 0:e.manifest;return(null==t?void 0:t.finsemble)&&Pt.resolveManifestMacros(t,t.finsemble),t})(u))&&void 0!==a?a:{},m=(({windowName:e,systemManifest:t,transportSettings:n,isFSBLService:r})=>t?((e,t,n=!1)=>{var r,i,s;if(fe.system.log("WINDOW LIFECYCLE:STARTUP:RouterClient:routerConfigFromManifest",t,n),e&&"string"!=typeof e){const o=e.finsemble,a=null!==(s=null!==(i=null===(r=null==o?void 0:o.router)||void 0===r?void 0:r.transportSettings)&&void 0!==i?i:null==o?void 0:o.IAC)&&void 0!==s?s:{};return{windowName:t,routerDomainRoot:o.moduleRoot,transportName:kt(e,n),transportSettings:a}}return fe.system.error("WINDOW LIFECYCLE:STARTUP:RouterClient:routerConfigFromManifest failed -- fatal error. No manifest found.",e),{...Wt,windowName:t}})(t,e,r):{...Wt,windowName:e,transportSettings:null!=n?n:{}})({windowName:f,systemManifest:h,isFSBLService:!0});await L.start(m);const v=g.getInstance();v.setStartupData({windowName:f,webContentsName:y,authenticationToken:{signatureString:"",signatureStringType:"unauthenticated",meta:{name:c,appId:c}}}),l.fdc3=new zn({routerClient:P,startup:v}),v.setReady()}async stopApp(){L.stop()}}l.addEventListener&&l.addEventListener("error",(e=>{(null==e?void 0:e.message)&&(null==e?void 0:e.filename)?fe.console.error(`Logger client caught ErrorEvent. Error: ${e.message}`,`File: ${e.filename}`,`Line number: ${e.lineno}`):(fe.console.warn(`Logger client caught what is likely a DOM error event where type=${null==e?void 0:e.type} and target=${null==e?void 0:e.target}. Probably due to <img> or <script> failing to load. See component's browserView window for more details.`),globalThis.console.warn("Event Details (for above message)",e))}),!0),l.addEventListener&&l.addEventListener("unhandledrejection",(e=>{fe.console.error("Logger client caught Unhandled rejection","reason",e.reason,JSON.stringify(e))}),!0),(()=>{if(globalThis.console.unwrappedError)return;if(globalThis.glue42gd)return;if(x.isBrowserView())return void fe.console.log("Logger client console.error is not wrapped to capture logs.");fe.console.log("Logger client console.error is wrapped to capture logs.");const e=globalThis.console.error.bind(globalThis.console);globalThis.console.unwrappedError=globalThis.console.error,globalThis.console.error=function(...t){let n;t.push("(console error)");try{n=JSON.parse(JSON.stringify(t))}catch(r){n="console.error: arguments could not be serialized for logging",t.push("arguments could not be serialized to send to Central Logger"),e(...t)}fe.console.error(...n)}})();const{SERVICE_INITIALIZING_CHANNEL:Yn,SERVICE_READY_CHANNEL:Qn,SERVICE_QUERY_READY_CHANNEL:Kn,SERVICE_CLOSING_CHANNEL:Zn,SERVICE_CLOSED_CHANNEL:Xn,SERVICE_STOP_CHANNEL:er}=e,tr={startupDependencies:{services:[],clients:[]},shutdownDependencies:{services:[]},name:window.name};class nr{async initialize(e){e()}constructor(e=tr){!function(e){e.startupDependencies?(e.startupDependencies.services||(e.startupDependencies.services=tr.startupDependencies.services),e.startupDependencies.clients||(e.startupDependencies.clients=tr.startupDependencies.clients)):e.startupDependencies=tr.startupDependencies,e.shutdownDependencies?e.shutdownDependencies.services||(e.shutdownDependencies.services=tr.shutdownDependencies.services):e.shutdownDependencies=tr.shutdownDependencies}(e),this.name=e.name?e.name:window.name,this.startupDependencies=e.startupDependencies,this.shutdownDependencies=e.shutdownDependencies,this.Logger=fe,this.RouterClient=P,this.onBaseServiceReadyCB=null,this.setOnConnectionCompleteCB=null,this.listeners={},this.start=()=>{},this.started=!1,this.status="initializing",this.setOnline=this.setOnline.bind(this),this.onBaseServiceReady=this.onBaseServiceReady.bind(this),this.handleShutdown=this.handleShutdown.bind(this),this.waitForDependencies(),l.finsembleServices?l.finsembleServices.push(this):l.finsembleServices=[this]}waitForDependencies(){const e=this;if(this.started)return;this.started=!0;const t=this;function n(e){fe.system.debug("BaseService.start.setParentUUID"),x.Window.getCurrent().getOptions((n=>{t.customData=n.customData,e()}))}async function r(){await(new Gn).startApp(),P.addResponder(Kn(e.name),((t,n)=>{(e.status="ready")?null==n||n.sendQueryResponse(null):null==n||n.sendQueryResponse("service not ready")})),"routerService"!==t.name&&P.transmit(Yn,{name:t.name}),window.addEventListener("beforeunload",t.RouterClient.disconnectAll),fe.system.debug("APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.onRouterReady")}function i(e){const n=t.customData.debugServiceDelay||0;if(fe.system.debug(`Custom Data: ${t.name} custom data`,t.customData),Number.isInteger(n))n>0&&fe.system.debug(`APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.debugDelay: ${t.name} startup will delayed by ${n} milliseconds for debugging`);else{const e=`debugDelay has an illegal value ("${n}") for ${t.name}. Value must be an integer.`;fe.system.error(`APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start: ${e}`),A.systemLog({error:!0},e)}setTimeout(e,n)}function s(e){fe.system.debug(`APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.readyToGo ${t.name}`),fe.console.log("Startup Dependencies for",t.name,t.startupDependencies),fe.console.log("Shutdown Dependencies for",t.name,t.shutdownDependencies),Tt.shutdown.waitFor(t.shutdownDependencies,t.handleShutdown),fe.system.debug(`APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.readyToGo after wait ${t.name}`),P.transmit(`${x.Window.getCurrent().name}.onSpawned`,{name:x.Window.getCurrent().name},{suppressWarnings:!0}),Tt.startup.waitFor(t.startupDependencies,e,t.name).on("err",(e=>{fe.system.error(e)}))}function o(e){const n=x.Window.getCurrent();n.isShowing((r=>{r&&!1!==t.customData.showDevConsoleOnVisible?x.showDeveloperTools(n.name,null,e):(fe.system.debug("APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.delayStartup done"),e())}))}return fe.system.debug(`${this.name} starting`),new Promise((e=>{Ze(Be,[r,n,o,i,s],(t=>{t&&console.log("waitForDependencies async.series results",t),e(),this.onDependenciesReady()}))}))}setOnline(){"ready"!==this.status&&(this.RouterClient.addListener(`${er}.${this.name}`,(()=>{Tt.shutdown.checkDependencies()})),this.status="ready",P.transmit(Qn,{serviceName:this.name},{suppressWarnings:!0}),fe.system.log("APPLICATION LIFECYCLE:STARTUP:SERVICE ONLINE",this.name),A.publishBootStatus(this.name,"services","completed"))}onDependenciesReady(){fe.system.debug("APPLICATION LIFECYCLE:STARTUP:BaseService onDependenciesReady",this.name),this.status="initializing",this.onBaseServiceReadyCB?this.onBaseServiceReadyCB(this.setOnline):this.initialize?this.initialize(this.setOnline):setTimeout((()=>{"ready"!==this.status&&"routerService"!==this.name&&(console.error("No onBaseServiceReadyCB on initialize function defined on your service. Ensure that service.setOnline is called"),fe.system.error("No onBaseServiceReadyCB on initialize function defined on your service. Ensure that service.setOnline is called"))}),3e3)}onBaseServiceReady(e){"initializing"===this.status?this.onBaseServiceReadyCB=()=>{e(this.setOnline)}:e(this.setOnline)}addEventListener(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)}onShutdown(e){this.addEventListener("onShutdown",e)}handleShutdown(){fe.system.debug("BaseService.handleShutdown");const e=this;this.listeners.onShutdown?(P.transmit(Zn,{waitForMe:!0,name:this.name}),Ve(this.listeners.onShutdown,(function(e,t){je(e)(null,t)}),(function(t){t&&fe.system.error(t),e.shutdownComplete()}))):(P.transmit(Zn,{waitForMe:!1,name:this.name}),e.shutdownComplete())}shutdownComplete(){fe.system.info(`"APPLICATION LIFECYCLE:SHUTDOWN:SERVICE SHUTDOWN: ${this.name}`),P.transmit(Xn,{name:this.name})}}class rr{constructor(){this.id="",this.buttonText="",this.type=""}}var ir,sr;!function(e){e.DISMISS="DISMISS",e.SNOOZE="SNOOZE",e.SPAWN="SPAWN",e.QUERY="QUERY",e.PUBLISH="PUBLISH",e.TRANSMIT="TRANSMIT"}(ir||(ir={})),function(e){e.MARK_AS_UNREAD="MARK_AS_UNREAD",e.MARK_AS_READ="MARK_AS_READ",e.SNOOZE="SNOOZE",e.DISMISS="DISMISS",e.SETTINGS="SETTINGS",e.DETAILS="DETAILS"}(sr||(sr={}));class or{}class ar{constructor(){this.actions=[],this.isRead=!1,this.isSnoozed=!1,this.isMuted=!1,this.isDeleted=!1,this.actionsHistory=[],this.meta=new or,this.stateHistory=[],this.issuedAt="",this.title="",this.devModeOnly=!1}}const ur=class{constructor(t,n){var r;this.allowDelay=!1,this.delayed=!1,this.allowCancel=!1,this.canceled=!1,this.completed=!1,this.event=t.event,this.source=t.source,this.sourceType=t.sourceType,this.listenerGuid=t.listenerGuid,e[this.sourceType.toUpperCase()]&&e[this.sourceType.toUpperCase()].DELAYABLE_EVENTS.includes(this.event)&&(this.allowDelay=!0),e[this.sourceType.toUpperCase()]&&e[this.sourceType.toUpperCase()].CANCELABLE_EVENTS.includes(this.event)&&(this.allowCancel=!0),this.handler=t.handler,this.queryMessage=n,this.guid=null===(r=null==n?void 0:n.data)||void 0===r?void 0:r.guid,this.internalHandler()}async internalHandler(){var e,t;this.data=null===(t=null===(e=this.queryMessage)||void 0===e?void 0:e.data)||void 0===t?void 0:t.data,this.handler&&await this.handler(this),this.delayed||this.canceled||this.completed||this.done()}cancel(){this.allowCancel&&(this.canceled=!0,this.done())}wait(){var e;this.allowDelay?(this.delayed=!0,null===(e=this.queryMessage)||void 0===e||e.sendQueryResponse(null,{wait:!0})):this.done()}done(e){var t;this.completed=!0,this.delayed?P.transmit(`Finsemble.Listener.Done.${this.guid}.${this.listenerGuid}`,{canceled:this.canceled,data:e}):null===(t=this.queryMessage)||void 0===t||t.sendQueryResponse(null,{canceled:this.canceled,data:e})}},lr=class{constructor(e){var t;this.eventList=[],this.cleanedUp=!1,this.openResponders=[],this.closedHandlersExecuted=0,this.handlers=[],this.closeFinalHandler=null,this.name=e.name,this.thisWindowName=window.name,this.sourceType=null!==(t=e.sourceType)&&void 0!==t?t:"undefined",window.addEventListener("beforeunload",(()=>{this.cleanup()})),this.currentWindow=x.Window.getCurrent()}addListener(e,t){return this.addEventListener(e,t)}removeListener(e,t){return this.removeEventListener(e,t)}closeFinal(e){this.closeFinalHandler=e;const t=`${this.name}_public_${Date.now()}_${Math.random()}`;P.transmit(`Finsemble.RegisterInterruptibleEvent.${this.name}`,{event:"closed",listenerGuid:t,windowName:this.thisWindowName});const n=(...e)=>{this.howManyClosedHandlers()||(this.closeFinalHandler&&this.closeFinalHandler(...e),this.closeFinalHandler=null)},r=`Finsemble.Interrupt.${t}`;P.addResponder(r,((e,r)=>{new ur({source:this.name,sourceType:this.sourceType,listenerGuid:t,handler:n,event:"closed"},r)})),this.openResponders.push(r)}howManyClosedHandlers(){return this.handlers.filter((e=>"closed"===e.event)).length}addEventListener(e,t){fe.system.debug("PublicEventManager.addEventListener:",e);const n=`${this.name}_public_${Date.now()}_${Math.random()}`,r="closed"!==e?t:(...e)=>{t(...e),this.closedHandlersExecuted++,this.closedHandlersExecuted===this.howManyClosedHandlers()&&this.closeFinalHandler&&(this.closeFinalHandler(),this.closeFinalHandler=null)};this.handlers.push({event:e,handler:r,listenerGuid:n}),P.transmit(`Finsemble.RegisterInterruptibleEvent.${this.name}`,{event:e,listenerGuid:n,windowName:this.thisWindowName});const i=`Finsemble.Interrupt.${n}`;return P.addResponder(i,((t,i)=>{new ur({source:this.name,sourceType:this.sourceType,listenerGuid:n,handler:r,event:e},i)})),this.openResponders.push(i),"close-requested"===e&&this.currentWindow.addListener("close-requested",r),()=>{this.removeEventListener(e,t)}}removeEventListener(e,t,n=!0){if(fe.system.debug("PublicEventManager.removeEventListener:",e),this.cleanedUp)return;const r=this.handlers.findIndex((n=>n.event===e&&n.handler===t));if(-1===r)return void(n&&fe.system.warn(`PublicEventManager.removeEventListener() attempt to remove unregistered event "${e}"`));const{listenerGuid:i}=this.handlers[r];P.transmit(`Finsemble.UnregisterInterruptibleEvent.${this.name}`,{event:e,listenerGuid:i,windowName:this.thisWindowName}),P.removeResponder(`Finsemble.Interrupt.${i}`),"close-requested"===e&&this.currentWindow.removeListener("close-requested",t),this.handlers.splice(r,1)}cleanup(){this.cleanedUp=!0,this.handlers=[],this.openResponders.forEach((e=>{P.removeResponder(e)}))}};function dr(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+e+(n.length?" "+n.map((function(e){return"'"+e+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function cr(e){return!!e&&!!e[Kr]}function pr(e){var t;return!!e&&(function(e){if(!e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;var n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===Zr}(e)||Array.isArray(e)||!!e[Qr]||!!(null===(t=e.constructor)||void 0===t?void 0:t[Qr])||vr(e)||wr(e))}function fr(e,t,n){void 0===n&&(n=!1),0===yr(e)?(n?Object.keys:Xr)(e).forEach((function(r){n&&"symbol"==typeof r||t(r,e[r],e)})):e.forEach((function(n,r){return t(r,n,e)}))}function yr(e){var t=e[Kr];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:vr(e)?2:wr(e)?3:0}function hr(e,t){return 2===yr(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function gr(e,t,n){var r=yr(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function mr(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function vr(e){return Vr&&e instanceof Map}function wr(e){return zr&&e instanceof Set}function br(e){return e.o||e.t}function jr(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=ei(e);delete t[Kr];for(var n=Xr(t),r=0;r<n.length;r++){var i=n[r],s=t[i];!1===s.writable&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(t[i]={configurable:!0,writable:!0,enumerable:s.enumerable,value:e[i]})}return Object.create(Object.getPrototypeOf(e),t)}function Sr(e,t){return void 0===t&&(t=!1),Ar(e)||cr(e)||!pr(e)||(yr(e)>1&&(e.set=e.add=e.clear=e.delete=Cr),Object.freeze(e),t&&fr(e,(function(e,t){return Sr(t,!0)}),!0)),e}function Cr(){dr(2)}function Ar(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function Rr(e){var t=ti[e];return t||dr(18,e),t}function Ir(){return Jr}function Tr(e,t){t&&(Rr("Patches"),e.u=[],e.s=[],e.v=t)}function Er(e){Or(e),e.p.forEach(Mr),e.p=null}function Or(e){e===Jr&&(Jr=e.l)}function _r(e){return Jr={p:[],l:Jr,h:e,m:!0,_:0}}function Mr(e){var t=e[Kr];0===t.i||1===t.i?t.j():t.g=!0}function Lr(e,t){t._=t.p.length;var n=t.p[0],r=void 0!==e&&e!==n;return t.h.O||Rr("ES5").S(t,e,r),r?(n[Kr].P&&(Er(t),dr(4)),pr(e)&&(e=Pr(t,e),t.l||Nr(t,e)),t.u&&Rr("Patches").M(n[Kr].t,e,t.u,t.s)):e=Pr(t,n,[]),Er(t),t.u&&t.v(t.u,t.s),e!==Yr?e:void 0}function Pr(e,t,n){if(Ar(t))return t;var r=t[Kr];if(!r)return fr(t,(function(i,s){return Wr(e,r,t,i,s,n)}),!0),t;if(r.A!==e)return t;if(!r.P)return Nr(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=4===r.i||5===r.i?r.o=jr(r.k):r.o,s=i,o=!1;3===r.i&&(s=new Set(i),i.clear(),o=!0),fr(s,(function(t,s){return Wr(e,r,i,t,s,n,o)})),Nr(e,i,!1),n&&e.u&&Rr("Patches").N(r,n,e.u,e.s)}return r.o}function Wr(e,t,n,r,i,s,o){if(cr(i)){var a=Pr(e,i,s&&t&&3!==t.i&&!hr(t.R,r)?s.concat(r):void 0);if(gr(n,r,a),!cr(a))return;e.m=!1}else o&&n.add(i);if(pr(i)&&!Ar(i)){if(!e.h.D&&e._<1)return;Pr(e,i),t&&t.A.l||Nr(e,i)}}function Nr(e,t,n){void 0===n&&(n=!1),!e.l&&e.h.D&&e.m&&Sr(t,n)}function kr(e,t){var n=e[Kr];return(n?br(n):e)[t]}function Dr(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function xr(e){e.P||(e.P=!0,e.l&&xr(e.l))}function Fr(e){e.o||(e.o=jr(e.t))}function Br(e,t,n){var r=vr(t)?Rr("MapSet").F(t,n):wr(t)?Rr("MapSet").T(t,n):e.O?function(e,t){var n=Array.isArray(e),r={i:n?1:0,A:t?t.A:Ir(),P:!1,I:!1,R:{},l:t,t:e,k:null,o:null,j:null,C:!1},i=r,s=ni;n&&(i=[r],s=ri);var o=Proxy.revocable(i,s),a=o.revoke,u=o.proxy;return r.k=u,r.j=a,u}(t,n):Rr("ES5").J(t,n);return(n?n.A:Ir()).p.push(r),r}function qr(e){return cr(e)||dr(22,e),function e(t){if(!pr(t))return t;var n,r=t[Kr],i=yr(t);if(r){if(!r.P&&(r.i<4||!Rr("ES5").K(r)))return r.t;r.I=!0,n=Ur(t,i),r.I=!1}else n=Ur(t,i);return fr(n,(function(t,i){r&&function(e,t){return 2===yr(e)?e.get(t):e[t]}(r.t,t)===i||gr(n,t,e(i))})),3===i?new Set(n):n}(e)}function Ur(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return jr(e)}var $r,Jr,Hr="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),Vr="undefined"!=typeof Map,zr="undefined"!=typeof Set,Gr="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,Yr=Hr?Symbol.for("immer-nothing"):(($r={})["immer-nothing"]=!0,$r),Qr=Hr?Symbol.for("immer-draftable"):"__$immer_draftable",Kr=Hr?Symbol.for("immer-state"):"__$immer_state",Zr=("undefined"!=typeof Symbol&&Symbol.iterator,""+Object.prototype.constructor),Xr="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,ei=Object.getOwnPropertyDescriptors||function(e){var t={};return Xr(e).forEach((function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)})),t},ti={},ni={get:function(e,t){if(t===Kr)return e;var n=br(e);if(!hr(n,t))return function(e,t,n){var r,i=Dr(t,n);return i?"value"in i?i.value:null===(r=i.get)||void 0===r?void 0:r.call(e.k):void 0}(e,n,t);var r=n[t];return e.I||!pr(r)?r:r===kr(e.t,t)?(Fr(e),e.o[t]=Br(e.A.h,r,e)):r},has:function(e,t){return t in br(e)},ownKeys:function(e){return Reflect.ownKeys(br(e))},set:function(e,t,n){var r=Dr(br(e),t);if(null==r?void 0:r.set)return r.set.call(e.k,n),!0;if(!e.P){var i=kr(br(e),t),s=null==i?void 0:i[Kr];if(s&&s.t===n)return e.o[t]=n,e.R[t]=!1,!0;if(mr(n,i)&&(void 0!==n||hr(e.t,t)))return!0;Fr(e),xr(e)}return e.o[t]===n&&(void 0!==n||t in e.o)||Number.isNaN(n)&&Number.isNaN(e.o[t])||(e.o[t]=n,e.R[t]=!0),!0},deleteProperty:function(e,t){return void 0!==kr(e.t,t)||t in e.t?(e.R[t]=!1,Fr(e),xr(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=br(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.i||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty:function(){dr(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){dr(12)}},ri={};fr(ni,(function(e,t){ri[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),ri.deleteProperty=function(e,t){return ri.set.call(this,e,t,void 0)},ri.set=function(e,t,n){return ni.set.call(this,e[0],t,n,e[0])};var ii=function(){function e(e){var t=this;this.O=Gr,this.D=!0,this.produce=function(e,n,r){if("function"==typeof e&&"function"!=typeof n){var i=n;n=e;var s=t;return function(e){var t=this;void 0===e&&(e=i);for(var r=arguments.length,o=Array(r>1?r-1:0),a=1;a<r;a++)o[a-1]=arguments[a];return s.produce(e,(function(e){var r;return(r=n).call.apply(r,[t,e].concat(o))}))}}var o;if("function"!=typeof n&&dr(6),void 0!==r&&"function"!=typeof r&&dr(7),pr(e)){var a=_r(t),u=Br(t,e,void 0),l=!0;try{o=n(u),l=!1}finally{l?Er(a):Or(a)}return"undefined"!=typeof Promise&&o instanceof Promise?o.then((function(e){return Tr(a,r),Lr(e,a)}),(function(e){throw Er(a),e})):(Tr(a,r),Lr(o,a))}if(!e||"object"!=typeof e){if(void 0===(o=n(e))&&(o=e),o===Yr&&(o=void 0),t.D&&Sr(o,!0),r){var d=[],c=[];Rr("Patches").M(e,o,d,c),r(d,c)}return o}dr(21,e)},this.produceWithPatches=function(e,n){if("function"==typeof e)return function(n){for(var r=arguments.length,i=Array(r>1?r-1:0),s=1;s<r;s++)i[s-1]=arguments[s];return t.produceWithPatches(n,(function(t){return e.apply(void 0,[t].concat(i))}))};var r,i,s=t.produce(e,n,(function(e,t){r=e,i=t}));return"undefined"!=typeof Promise&&s instanceof Promise?s.then((function(e){return[e,r,i]})):[s,r,i]},"boolean"==typeof(null==e?void 0:e.useProxies)&&this.setUseProxies(e.useProxies),"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze)}var t=e.prototype;return t.createDraft=function(e){pr(e)||dr(8),cr(e)&&(e=qr(e));var t=_r(this),n=Br(this,e,void 0);return n[Kr].C=!0,Or(t),n},t.finishDraft=function(e,t){var n=(e&&e[Kr]).A;return Tr(n,t),Lr(void 0,n)},t.setAutoFreeze=function(e){this.D=e},t.setUseProxies=function(e){e&&!Gr&&dr(20),this.O=e},t.applyPatches=function(e,t){var n;for(n=t.length-1;n>=0;n--){var r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));var i=Rr("Patches").$;return cr(e)?i(e,t):this.produce(e,(function(e){return i(e,t)}))},e}(),si=new ii;function oi(e){return oi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},oi(e)}function ai(e,t,n){return(t=function(e){var t=function(e){if("object"!=oi(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=oi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==oi(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ui(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function li(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ui(Object(n),!0).forEach((function(t){ai(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ui(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function di(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}si.produce,si.produceWithPatches.bind(si),si.setAutoFreeze.bind(si),si.setUseProxies.bind(si),si.applyPatches.bind(si),si.createDraft.bind(si),si.finishDraft.bind(si);var ci="function"==typeof Symbol&&Symbol.observable||"@@observable",pi=function(){return Math.random().toString(36).substring(7).split("").join(".")},fi={INIT:"@@redux/INIT"+pi(),REPLACE:"@@redux/REPLACE"+pi(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+pi()}};function yi(e,t,n){var r;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(di(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(di(1));return n(yi)(e,t)}if("function"!=typeof e)throw new Error(di(2));var i=e,s=t,o=[],a=o,u=!1;function l(){a===o&&(a=o.slice())}function d(){if(u)throw new Error(di(3));return s}function c(e){if("function"!=typeof e)throw new Error(di(4));if(u)throw new Error(di(5));var t=!0;return l(),a.push(e),function(){if(t){if(u)throw new Error(di(6));t=!1,l();var n=a.indexOf(e);a.splice(n,1),o=null}}}function p(e){if(!function(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e))throw new Error(di(7));if(void 0===e.type)throw new Error(di(8));if(u)throw new Error(di(9));try{u=!0,s=i(s,e)}finally{u=!1}for(var t=o=a,n=0;n<t.length;n++)(0,t[n])();return e}return p({type:fi.INIT}),(r={dispatch:p,subscribe:c,getState:d,replaceReducer:function(e){if("function"!=typeof e)throw new Error(di(10));i=e,p({type:fi.REPLACE})}})[ci]=function(){var e,t=c;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(di(11));function n(){e.next&&e.next(d())}return n(),{unsubscribe:t(n)}}})[ci]=function(){return this},e},r}function hi(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}function gi(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(){var n=e.apply(void 0,arguments),r=function(){throw new Error(di(15))},i={getState:n.getState,dispatch:function(){return r.apply(void 0,arguments)}},s=t.map((function(e){return e(i)}));return r=hi.apply(void 0,s)(n.dispatch),li(li({},n),{},{dispatch:r})}}}function mi(e){return function(t){var n=t.dispatch,r=t.getState;return function(t){return function(i){return"function"==typeof i?i(n,r,e):t(i)}}}}var vi=mi();vi.withExtraArgument=mi;const wi=vi;var bi,ji=(bi=function(e,t){return bi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},bi(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}bi(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),Si=function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e},Ci=Object.defineProperty,Ai=Object.defineProperties,Ri=Object.getOwnPropertyDescriptors,Ii=Object.getOwnPropertySymbols,Ti=Object.prototype.hasOwnProperty,Ei=Object.prototype.propertyIsEnumerable,Oi=function(e,t,n){return t in e?Ci(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},_i=function(e,t){for(var n in t||(t={}))Ti.call(t,n)&&Oi(e,n,t[n]);if(Ii)for(var r=0,i=Ii(t);r<i.length;r++)n=i[r],Ei.call(t,n)&&Oi(e,n,t[n]);return e},Mi=function(e,t){return Ai(e,Ri(t))},Li="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?hi:hi.apply(null,arguments)};"undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;var Pi=function(e){function t(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=e.apply(this,n)||this;return Object.setPrototypeOf(i,t.prototype),i}return ji(t,e),Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.prototype.concat.apply(this,t)},t.prototype.prepend=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return 1===e.length&&Array.isArray(e[0])?new(t.bind.apply(t,Si([void 0],e[0].concat(this)))):new(t.bind.apply(t,Si([void 0],e.concat(this))))},t}(Array),Wi=function(e){function t(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=e.apply(this,n)||this;return Object.setPrototypeOf(i,t.prototype),i}return ji(t,e),Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.prototype.concat.apply(this,t)},t.prototype.prepend=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return 1===e.length&&Array.isArray(e[0])?new(t.bind.apply(t,Si([void 0],e[0].concat(this)))):new(t.bind.apply(t,Si([void 0],e.concat(this))))},t}(Array);function Ni(e){var t,n=function(e){return function(e){void 0===e&&(e={});var t=e.thunk,n=void 0===t||t,r=(e.immutableCheck,e.serializableCheck,new Pi);return n&&(function(e){return"boolean"==typeof e}(n)?r.push(wi):r.push(wi.withExtraArgument(n.extraArgument))),r}(e)},r=e||{},i=r.reducer,s=void 0===i?void 0:i,o=r.middleware,a=void 0===o?n():o,u=r.devTools,l=void 0===u||u,d=r.preloadedState,c=void 0===d?void 0:d,p=r.enhancers,f=void 0===p?void 0:p;if("function"==typeof s)t=s;else{if(!function(e){if("object"!=typeof e||null===e)return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;for(var n=t;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return t===n}(s))throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');t=function(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var i=t[r];"function"==typeof e[i]&&(n[i]=e[i])}var s,o=Object.keys(n);try{!function(e){Object.keys(e).forEach((function(t){var n=e[t];if(void 0===n(void 0,{type:fi.INIT}))throw new Error(di(12));if(void 0===n(void 0,{type:fi.PROBE_UNKNOWN_ACTION()}))throw new Error(di(13))}))}(n)}catch(e){s=e}return function(e,t){if(void 0===e&&(e={}),s)throw s;for(var r=!1,i={},a=0;a<o.length;a++){var u=o[a],l=n[u],d=e[u],c=l(d,t);if(void 0===c)throw t&&t.type,new Error(di(14));i[u]=c,r=r||c!==d}return(r=r||o.length!==Object.keys(e).length)?i:e}}(s)}var y=a;"function"==typeof y&&(y=y(n));var h=gi.apply(void 0,y),g=hi;l&&(g=Li(_i({trace:!1},"object"==typeof l&&l)));var m=new Wi(h),v=m;return Array.isArray(f)?v=Si([h],f):"function"==typeof f&&(v=f(m)),yi(t,c,g.apply(void 0,v))}function ki(e,t){function n(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];if(t){var i=t.apply(void 0,n);if(!i)throw new Error("prepareAction did not return an object");return _i(_i({type:e,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:e,payload:n[0]}}return n.toString=function(){return""+e},n.type=e,n.match=function(t){return t.type===e},n}var Di=["name","message","stack","code"],xi=function(e,t){this.payload=e,this.meta=t},Fi=function(e,t){this.payload=e,this.meta=t},Bi=function(e){if("object"==typeof e&&null!==e){for(var t={},n=0,r=Di;n<r.length;n++){var i=r[n];"string"==typeof e[i]&&(t[i]=e[i])}return t}return{message:String(e)}};function qi(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}!function(){function e(e,t,n){var r=ki(e+"/fulfilled",(function(e,t,n,r){return{payload:e,meta:Mi(_i({},r||{}),{arg:n,requestId:t,requestStatus:"fulfilled"})}})),i=ki(e+"/pending",(function(e,t,n){return{payload:void 0,meta:Mi(_i({},n||{}),{arg:t,requestId:e,requestStatus:"pending"})}})),s=ki(e+"/rejected",(function(e,t,r,i,s){return{payload:i,error:(n&&n.serializeError||Bi)(e||"Rejected"),meta:Mi(_i({},s||{}),{arg:r,requestId:t,rejectedWithValue:!!i,requestStatus:"rejected",aborted:"AbortError"===(null==e?void 0:e.name),condition:"ConditionError"===(null==e?void 0:e.name)})}})),o="undefined"!=typeof AbortController?AbortController:function(){function e(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return e.prototype.abort=function(){},e}();return Object.assign((function(e){return function(a,u,l){var d,c=(null==n?void 0:n.idGenerator)?n.idGenerator(e):function(e){void 0===e&&(e=21);for(var t="",n=e;n--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t}(),p=new o;function f(e){d=e,p.abort()}var y=function(){return o=this,y=null,h=function(){var o,y,h,g,m,v;return function(e,t){var n,r,i,s,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}}(this,(function(w){switch(w.label){case 0:return w.trys.push([0,4,,5]),null===(b=g=null==(o=null==n?void 0:n.condition)?void 0:o.call(n,e,{getState:u,extra:l}))||"object"!=typeof b||"function"!=typeof b.then?[3,2]:[4,g];case 1:g=w.sent(),w.label=2;case 2:if(!1===g||p.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return m=new Promise((function(e,t){return p.signal.addEventListener("abort",(function(){return t({name:"AbortError",message:d||"Aborted"})}))})),a(i(c,e,null==(y=null==n?void 0:n.getPendingMeta)?void 0:y.call(n,{requestId:c,arg:e},{getState:u,extra:l}))),[4,Promise.race([m,Promise.resolve(t(e,{dispatch:a,getState:u,extra:l,requestId:c,signal:p.signal,abort:f,rejectWithValue:function(e,t){return new xi(e,t)},fulfillWithValue:function(e,t){return new Fi(e,t)}})).then((function(t){if(t instanceof xi)throw t;return t instanceof Fi?r(t.payload,c,e,t.meta):r(t,c,e)}))])];case 3:return h=w.sent(),[3,5];case 4:return v=w.sent(),h=v instanceof xi?s(null,c,e,v.payload,v.meta):s(v,c,e),[3,5];case 5:return n&&!n.dispatchConditionRejection&&s.match(h)&&h.meta.condition||a(h),[2,h]}var b}))},new Promise((function(e,t){var n=function(e){try{i(h.next(e))}catch(e){t(e)}},r=function(e){try{i(h.throw(e))}catch(e){t(e)}},i=function(t){return t.done?e(t.value):Promise.resolve(t.value).then(n,r)};i((h=h.apply(o,y)).next())}));var o,y,h}();return Object.assign(y,{abort:f,requestId:c,arg:e,unwrap:function(){return y.then(qi)}})}}),{pending:i,rejected:s,fulfilled:r,typePrefix:e})}e.withTypes=function(){return e}}(),Object.assign;var Ui="listenerMiddleware";ki(Ui+"/add"),ki(Ui+"/removeAll"),ki(Ui+"/remove"),"function"==typeof queueMicrotask&&queueMicrotask.bind("undefined"!=typeof window?window:void 0!==n.g?n.g:globalThis);"undefined"!=typeof window&&window.requestAnimationFrame&&window.requestAnimationFrame,function(){function e(e,t){var n=i[e];return n?n.enumerable=t:i[e]=n={configurable:!0,enumerable:t,get:function(){var t=this[Kr];return ni.get(t,e)},set:function(t){var n=this[Kr];ni.set(n,e,t)}},n}function t(e){for(var t=e.length-1;t>=0;t--){var i=e[t][Kr];if(!i.P)switch(i.i){case 5:r(i)&&xr(i);break;case 4:n(i)&&xr(i)}}}function n(e){for(var t=e.t,n=e.k,r=Xr(n),i=r.length-1;i>=0;i--){var s=r[i];if(s!==Kr){var o=t[s];if(void 0===o&&!hr(t,s))return!0;var a=n[s],u=a&&a[Kr];if(u?u.t!==o:!mr(a,o))return!0}}var l=!!t[Kr];return r.length!==Xr(t).length+(l?0:1)}function r(e){var t=e.k;if(t.length!==e.t.length)return!0;var n=Object.getOwnPropertyDescriptor(t,t.length-1);if(n&&!n.get)return!0;for(var r=0;r<t.length;r++)if(!t.hasOwnProperty(r))return!0;return!1}var i={};!function(e,t){ti[e]||(ti[e]=t)}("ES5",{J:function(t,n){var r=Array.isArray(t),i=function(t,n){if(t){for(var r=Array(n.length),i=0;i<n.length;i++)Object.defineProperty(r,""+i,e(i,!0));return r}var s=ei(n);delete s[Kr];for(var o=Xr(s),a=0;a<o.length;a++){var u=o[a];s[u]=e(u,t||!!s[u].enumerable)}return Object.create(Object.getPrototypeOf(n),s)}(r,t),s={i:r?5:4,A:n?n.A:Ir(),P:!1,I:!1,R:{},l:n,t,k:i,o:null,g:!1,C:!1};return Object.defineProperty(i,Kr,{value:s,writable:!0}),i},S:function(e,n,i){i?cr(n)&&n[Kr].A===e&&t(e.p):(e.u&&function e(t){if(t&&"object"==typeof t){var n=t[Kr];if(n){var i=n.t,s=n.k,o=n.R,a=n.i;if(4===a)fr(s,(function(t){t!==Kr&&(void 0!==i[t]||hr(i,t)?o[t]||e(s[t]):(o[t]=!0,xr(n)))})),fr(i,(function(e){void 0!==s[e]||hr(s,e)||(o[e]=!1,xr(n))}));else if(5===a){if(r(n)&&(xr(n),o.length=!0),s.length<i.length)for(var u=s.length;u<i.length;u++)o[u]=!1;else for(var l=i.length;l<s.length;l++)o[l]=!0;for(var d=Math.min(s.length,i.length),c=0;c<d;c++)s.hasOwnProperty(c)||(o[c]=!0),void 0===o[c]&&e(s[c])}}}}(e.p[0]),t(e.p))},K:function(e){return 4===e.i?n(e):r(e)}})}();const $i={windows:{},dragging:null,tabCollections:{},useDOMBasedMovement:!0,closingTabs:null},Ji={clone:ki("windowTitleBar/clone"),close:ki("windowTitleBar/close"),closeTab:ki("windowTitleBar/closeTab"),disableDOMBasedMovement:ki("windowTitleBar/disableDOMBasedMovement"),setMaximize:ki("windowTitleBar/maximize"),minimize:ki("windowTitleBar/minimize"),promoteTab:ki("windowTitleBar/promoteTab"),register:ki("windowTitleBar/register"),removeFromTabCollection:ki("windowTitleBar/removeFromTabCollection"),scroll:ki("windowTitleBar/scrollTabCollection"),setAlwaysOnTop:ki("windowTitleBar/setAlwaysOnTop"),setGrouped:ki("windowTitleBar/setGrouped"),setUserDefinedTitle:ki("windowTitleBar/setUserDefinedTitle"),setDraggingStatus:ki("windowTitlebar/setDraggingStatus"),stopDragging:ki("windowTitlebar/stopDragging"),shiftPromotedTab:ki("windowTitleBar/shiftPromotedTab"),setClosingTabStatus:ki("windowTitleBar/setClosingTabStatus"),removeClosingTabs:ki("windowTitleBar/removeClosingTabs"),createTabCollection:ki("api/createTabCollection"),addTabsToTabCollection:ki("api/addTabsToTabCollection"),removeTabsFromTabCollection:ki("api/removeTabsFromTabCollection"),showScrim:ki("ux/showScrim"),hideScrim:ki("ux/hideScrim"),setScrimSafetyTimeout:ki("ux/setScrimSafetyTimeout"),addLaunchData:ki("main/addLaunchData"),dockingOperation:ki("main/dockingOperation"),loadWorkspace:ki("main/loadWorkspace"),setEmulatedMaximization:ki("main/setEmulatedMaximization"),enableDND:ki("main/enableDND"),loadUserDefinedTitle:ki("main/loadUserDefinedTitle"),saveSpawnTabTitleToWorkspace:ki("main/saveSpawnTabTitleToWorkspace"),setDocumentTitle:ki("main/updatedDocumentTitle"),setAPITitle:ki("main/updatedAPITitle"),updateGroupedWindows:ki("main/updateGroupedWindows"),windowEvent:ki("main/windowEvent"),updateMaximizedBounds:ki("main/updateMaximizedBounds"),workspaceClosing:ki("main/workspaceClosing"),setTabCollectionForEvergreen:ki("main/setTabCollectionForEvergreen"),updateEvergreenAfterWorkspaceLoading:ki("main/updateEvergreenAfterWorkspaceLoading"),createDefaultWindowTitleBar:ki("main/createDefaultWindowTitleBar")};var Hi;function Vi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Array.prototype.concat;var zi=Symbol("isCmd"),Gi=(Symbol("dispatch"),Symbol("getState"),"NONE");Object.freeze((Vi(Hi={},zi,!0),Vi(Hi,"type",Gi),Vi(Hi,"simulate",(function(){return null})),Hi));const Yi=({server:e,slice:t,dispatchOnly:n})=>r=>(i,s)=>{const o=r(((e,t)=>("@@finsemble/updateState"===t.type&&(e=t.newState),{...i(e,t)})),s),a={...o,dispatch:t=>(fe.system.debug(`Interop.remote.${t.type}`,o,t),"@@finsemble/updateState"==t.type?o.dispatch(t):t.type?P.query(e,t):t.then&&t.then(o.dispatch),t)},u=`reduxSlice:${t}:${Date.now()}_${Math.random()}`;return P.addListener(u,((e,t)=>{if(!e&&t){const e={type:"@@finsemble/updateState",newState:null==t?void 0:t.data};a.dispatch(e)}})),n||P.query(e,{"@@finsemble/action":"subscribe","@@finsemble/slice":t,"@@finsemble/routerChannel":u},(()=>{})),a},Qi=e=>e;var Ki=n(88055),Zi=n.n(Ki);class Xi{constructor(e){this.win=e.win,this.id=e.id}async remove(e=Function.prototype){await this.win.removeBrowserView(this,e)}async setBounds(e,t=Function.prototype){await this.win.setViewBounds({view:this,bounds:e},t)}async bringToFront(e=Function.prototype){await this.win.bringViewToFront(this,e)}}class es extends lr{constructor(e){super({name:e.name,sourceType:"Window"}),this.types={},this.wrapState=e.wrapState||"initializing",this.componentState={},this.windowState=dt.NORMAL,this.type=null,this.windowType=null,this.bounds={},this.guid=`${Date.now()}_${Math.random()}`,this.WINDOWSTATE=dt,this.windowOptions={},this.doConstruction(e),this.componentKey=rs("activeWorkspace",this.name,this.name),this.windowKey=rs("activeWorkspace",this.name),es.bindFunctions(this)}standardizeEventName(e){switch(e){case"bounds-set":case"stoppedMoving":return"bounds-change-end";case"startedMoving":return"bounds-change-start";case"bringToFront":return"broughtToFront";default:return e}}addEventListener(e,t){return e=this.standardizeEventName(e),super.addEventListener(e,t)}removeEventListener(e,t,n=!1){if("closed"!==e||!d.finsembleWindow||this.name!==d.finsembleWindow.name)return e=this.standardizeEventName(e),super.removeEventListener(e,t,n)}windowServiceChannelName(e){return`WindowService-Request-${e}`}eventChannelName(e){return`WindowService-Event-${this.name||this.windowName}-${e}`}doConstruction(e){if(e.setWindowType||e.windowType||(e.windowType="WebWindow"),e.windowType)return e.setWindowType=e.windowType,delete e.windowType,new es(e);if(e)for(const t in e)this[t]=e[t];this.name||(this.name=e.windowName),this.windowType=this.setWindowType}static registerType(e,t){const n=es;n.types||(n.types={}),n.types[e]=t}static bindFunctions(e){e.eventChannelName=e.eventChannelName.bind(e),e.windowServiceChannelName=e.windowServiceChannelName.bind(e),e.handleWrapRemoveRequest=e.handleWrapRemoveRequest.bind(e),e.reload=e.reload.bind(e)}static async createWrapFromUUIDAndName(e,t){var n;const{uuid:r,windowType:i}=t;if(!1!==t.waitForReady)try{await es._windowReady(e),t.wrapState="ready"}catch(e){return{err:e}}fe.system.debug("WRAP LIFECYCLE:",e,"All information for wrap passed in, creating wrap locally");const s=es.cache[e];return s?(fe.system.debug("WRAP LIFECYCLE:",e,"Window found in the cache, returning without going to the Launcher"),{data:s}):{data:(await es._createWrap({...t,windowIdentifier:null!==(n=t.windowIdentifier)&&void 0!==n?n:{uuid:r,name:e,windowName:e,windowType:i}})).wrap}}static getInstance(e,t){var n;const r=x.Window.getCurrent().name,i=null!==(n=null==(e=Zi()(e))?void 0:e.windowName)&&void 0!==n?n:null==e?void 0:e.name;return new Promise((async(n,s)=>{if(!i){const e='"name" is a required param';return null==t||t(e),void s(e)}e.windowName=i;let o=es.cache[i];if(o)return fe.system.debug("WRAP LIFECYCLE:",i,"Window found in the cache, returning without going to the Launcher"),null==t||t(null,o),void n({wrap:o});if(e.name){const{err:r,data:o}=await es.createWrapFromUUIDAndName(i,e);return r||!o?(null==t||t(r),void s(r)):(null==t||t(null,o),void n({wrap:o}))}if(!1!==e.waitForReady)try{await es._windowReady(i),e.wrapState="ready"}catch(a){return null==t||t(a,null),void s(a)}const{err:a,response:u}=await P.query("WindowService-Request-getWindowIdentifier",{windowName:i,requester:r});if(a)return fe.system.error(a),null==t||t(a,null),void s(a);if(o=es.cache[i],o)return fe.system.debug("WRAP LIFECYCLE:",e.name,"Information received from launcher, but wrap exists in cache. Returning cached wrap."),null==t||t(null,o),void n({wrap:o});fe.system.debug("WRAP LIFECYCLE:",i,"Information received from launcher. Creating wrap.");const{identifier:l}=u.data;l.windowName&&(l.name=l.windowName),e.retrievedIdentifier=l,({wrap:o}=await es._createWrap(e)),u.data.descriptor&&(o.descriptor=u.data.descriptor),null==t||t(null,o),n({wrap:o})}))}static _createWrap(e){return new Promise((async t=>{const n=e.retrievedIdentifier||e.windowIdentifier;(e.setWindowType||n.windowType)&&"WebApplication"!==n.windowType||(n.windowType="WebWindow");let r={...n};r=Object.assign(r,e),r.setWindowType=r.windowType,delete r.windowType,fe.system.debug("WRAP LIFECYCLE: Placing wrap into the local cache.",n.windowName);let i=new es(r);es.cache[n.windowName]=i,i.windowType=n.windowType,i.identifier=n,i.closeFinal(i.handleWrapRemoveRequest),i.addEventListener("maximized",(async()=>{i.windowState=dt.MAXIMIZED,i.windowOptions.windowState=dt.MAXIMIZED;const{data:e}=await i.getBounds();e&&(i.windowOptions.left=e.left,i.windowOptions.top=e.top,i.windowOptions.height=e.height,i.windowOptions.width=e.width,i.windowOptions.right=e.right,i.windowOptions.bottom=e.bottom,i.windowOptions.opacity=1,i.saveCompleteWindowState(i.windowOptions))})),i.addEventListener("minimized",(()=>{i.windowState===dt.MAXIMIZED?(i.windowState=dt.MINIMIZED_WAS_MAXIMIZED,i.windowOptions.windowState=dt.MINIMIZED_WAS_MAXIMIZED):i.windowState===dt.NORMAL?(i.windowState=dt.MINIMIZED_WAS_NORMAL,i.windowOptions.windowState=dt.MINIMIZED_WAS_NORMAL):fe.system.warn("Invalid window state received listening to window minimize",i.windowState)})),i.addEventListener("restored",(()=>{i.windowState=dt.NORMAL,i.windowOptions.windowState=dt.NORMAL}));const s=P.subscribe(`Finsemble.Component.State.${n.windowName}`,((e,t)=>{if(e)fe.system.error("Finsemble component state change error",e);else{const{state:e}=t.data;i.wrapState=e,P.unsubscribe(s)}}));t({wrap:i})}))}static _getRemoveWrapChannel(e){return`${x.Window.getCurrent().name}.removeWrap.${e}`}async handleWrapRemoveRequest(e){e&&e.wait(),fe.system.debug("WRAP Destructor. Removing cached window",this.name,"in ",window.name),this.removeListeners&&this.removeListeners(),this.cleanupRouter(),this.cleanup(),this.name!==d.name&&this.name&&delete es.cache[this.name],e&&e.done()}static closeAllWraps(){Object.values(es.cache).forEach((e=>{e.handleWrapRemoveRequest()}))}cleanupRouter(){const e=es._getRemoveWrapChannel(this.name);P.removeResponder(e)}onReady(e){return new Promise((t=>{if("ready"===this.wrapState)return null==e||e(),void t();this.addEventListener("ready",(()=>{null==e||e(),t()}))}))}queryWindowService(e,t,n=Function.prototype){return"function"==typeof t&&(n=t,t={}),t={...t,windowIdentifier:this.identifier},fe.setting().system.Debug&&(t.callstack=fe.callStack()),new Promise((async(r,i)=>{var s;if("close"!==e&&"ready"!==this.wrapState)return await this.onReady(),this.wrapState="ready",void r(await this.queryWindowService(e,t));fe.system.debug("FinsembleWindow.queryWindowService",this.windowServiceChannelName(e),t);const{err:o,response:a}=await P.query(this.windowServiceChannelName(e),t);let u=null!==(s=a.data)&&void 0!==s?s:null;if(o){if(fe.system.debug(`WindowService.${e}: failed`,o),console.debug(`WindowService.${e}: failed`,o),"getComponentState"!==e&&"Not found"!==o)return void i(o)}else fe.system.debug(`${this.windowServiceChannelName(e)} successful`,u),console.debug(`${this.windowServiceChannelName(e)} successful`,u);r(u),n(o,u)}))}minimize(e=null,t){return new Promise((n=>{this.queryWindowService("minimize",e,(e=>{null==t||t(e),n({err:e})}))}))}maximize(e=null,t){return new Promise((n=>{this.getBounds(((r,i)=>{r||!i?fe.system.warn(`Error getting bounds, cached bounds will not be set: ${r}`):this.updateOptions({options:{left:i.left,top:i.top,width:i.width,height:i.height}}),this.queryWindowService("maximize",e,(e=>{null==t||t(e),n({err:e})}))}))}))}restore(e=null,t){return new Promise((n=>{this.queryWindowService("restore",e,(e=>{null==t||t(e),n({err:e})}))}))}blur(e=null,t){return new Promise((n=>{this.queryWindowService("blur",e,(e=>{null==t||t(e),n({err:e})}))}))}focus(e=null,t){return new Promise((n=>{this.queryWindowService("focus",e,(e=>{null==t||t(e),n({err:e})}))}))}bringToFront(e=null,t){return new Promise((n=>{this.queryWindowService("bringToFront",e,(e=>{null==t||t(e),n({err:e})}))}))}setAlwaysOnTop(e={alwaysOnTop:!0},t){return new Promise((n=>{this.queryWindowService("setAlwaysOnTop",e,(e=>{null==t||t(e),n({err:e})}))}))}isAlwaysOnTop(e={},t){this.queryWindowService("isAlwaysOnTop",e,t)}isShowing(e={},t){this.queryWindowService("isShowing",e,t)}setIgnoreMouseEvents(e,t,n=Function.prototype){const r={ignore:new Boolean(e).valueOf(),options:new Boolean(t).valueOf()?t:{forward:!1}};this.queryWindowService("setIgnoreMouseEvents",r,n)}setShape(e,t=Function.prototype){this.queryWindowService("setShape",e,t)}async addBrowserView(e,t=Function.prototype){const n=await this.queryWindowService("addBrowserView",e,t);return new Xi({id:n,win:this})}async removeBrowserView(e,t=Function.prototype){await this.queryWindowService("removeBrowserView",{viewId:e.id},t)}async bringViewToFront(e,t=Function.prototype){await this.queryWindowService("bringViewToFront",{viewId:e.id},t)}async setViewBounds(e,t=Function.prototype){await this.queryWindowService("setViewBounds",{viewId:e.view.id,bounds:e.bounds},t)}setBounds(e={bounds:{}},t){return new Promise((n=>{"function"==typeof e||e.bounds||(e={bounds:e}),this.queryWindowService("setBounds",e,(e=>{null==t||t(e),n({err:e})}))}))}getBounds(e,t){return new Promise((n=>{const r="function"==typeof e?e:t;this.queryWindowService("getBounds",{},((e,t)=>{null==r||r(e,t),n({err:e,data:t})}))}))}updateOptions(e,t=Function.prototype){this.queryWindowService("updateOptions",e,t)}hide(e={},t){return new Promise((n=>{this.queryWindowService("hide",e,((e,r)=>{null==t||t(e,r),n({err:e})}))}))}reload(e={},t=Function.prototype){this.queryWindowService("reload",e,t)}show(e={},t){return new Promise((n=>{this.queryWindowService("show",e,((e,r)=>{null==t||t(e,r),n({err:e})}))}))}showAt(e={},t=Function.prototype){this.queryWindowService("showAt",e,t)}close(e={},t){return new Promise((n=>{fe.system.debug("WRAP CLOSE. Public close initiated for",this.name,e),this.queryWindowService("close",e,(e=>{fe.system.debug("WRAP CLOSE. Public close initiated for",this.name),null==t||t(e),n({err:e})}))}))}animate(e={},t=Function.prototype){this.queryWindowService("animate",e,t)}registerWithDocking(e={},t){this.onReady((()=>{P.query("DockingService.registerWindow",e,t)}))}showNativeOpenDialog(e={},t){this.queryWindowService("showNativeOpenDialog",e,t)}unRegisterWithDocking(){P.transmit("DockingService.deregisterWindow",{name:this.windowName})}initializeWindow({manageWindowMovement:e,identifier:t},n=Function.prototype){const r=()=>{P.publish(`Finsemble.${this.windowName}.componentReady`,{name:this.windowName}),n()};e?this.registerWithDocking(t,r):r()}wrapReady(){P.publish(`Finsemble.${this.windowName}.wrapReady`,{name:this.windowName,state:"open"})}setOpacity(e,t=Function.prototype){this.queryWindowService("setOpacity",e,t)}startTabTileMonitoring(e={}){fe.system.debug("FinsembleWindow.startTabTileMonitoring",e),P.transmit("TabTile.startTabTile",{params:e})}stopTabTileMonitoring(e={},t=Function.prototype){fe.system.debug("FinsembleWindow.stopTabTileMonitoring",e),P.query("TabTile.stopTabTile",{params:e},(function(e,n){e?fe.system.warn("TabTile.stopTabTile: query failed",e):fe.system.debug("TabTile.stopTabTile results",n.data);const r=n.data;t?t(e,r,this.defaultStopTrackingAction):this.defaultTabTileAction(r)}))}defaultTabTileAction(e){const t=this;switch(fe.system.debug("FinsembleWindow.defaultTabTileAction",e),e.stoppedLocation){case"OutsideWindow":case"TabSection":break;case"InsideWindow":e.tileGroupId?t.Group.addWindow(this.identifier,e.tileGroupId,e.dropCoordinates):t.Group.createGroup((function(n){t.Group.addWindow(this.identifier,n,e.dropCoordinates,{startingWindowIdentifier:e.droppedOnWindowIdentifier})}));break;default:fe.system.error("stopTracking returned an unknown stoppedLocation result",e)}}mergeBounds(e){e.right=e.left+e.width;const t={left:e.left,right:e.right,width:e.width,top:e.top,bottom:e.top+e.height,height:e.height},n={defaultLeft:e.left,defaultWidth:e.width,defaultTop:e.top,defaultHeight:e.height};Object.assign(this.windowOptions,t),Object.assign(this.windowOptions,n),this.windowOptions.bounds=t}startMove(e={}){fe.system.debug("FinsembleWindow.startMove",e),e.windowIdentifier=this.identifier,P.transmit(this.eventChannelName("startedMoving"),{})}stopMove(e={}){fe.system.debug("FinsembleWindow.stopMove",e),e.windowIdentifier=this.identifier,P.transmit(this.eventChannelName("stoppedMoving"),{})}getMonitor(e){P.query("DockingService.getMonitorForWindow",{windowIdentifier:this.identifier},((t,n)=>n?e(n.data):e()))}getComponentState(e,t){return new Promise((n=>{this.queryWindowService("getComponentState",e,((e,r)=>{null==t||t(e,r),n({err:e,data:r})}))}))}getWindowState(e,t){this.queryWindowService("getWindowState",e,t)}setComponentState(e,t=()=>{}){this.queryWindowService("setComponentState",e,t)}removeComponentState(e,t=()=>{}){this.queryWindowService("removeComponentState",e,t)}setWindowState(e,t=()=>{}){this.queryWindowService("setWindowState",e,t)}saveCompleteWindowState(e={},t=Function.prototype){this.queryWindowService("saveCompleteWindowState",e,t)}cancelTabTileMonitoring(e={}){fe.system.debug("FinsembleWindow.cancelTabTileMonitoring",e),P.transmit("TabTile.cancelTabTile",{params:e})}setTitle(e){(({singletonName:e,server:t,slice:r,emptyStore:i,dispatchOnly:s=!1})=>((e,t,...r)=>{const i=f(e);if(!i){const i=Symbol.for(`com.finsemble.singleton.${e}`);return n.g[i]=t(...r),n.g[i]}return i})(e,(()=>(({server:e,slice:t,emptyStore:n,dispatchOnly:r=!1})=>Ni({preloadedState:n,reducer:Qi,enhancers:[Yi({server:e,slice:t,dispatchOnly:r})]}))({server:t,slice:r,emptyStore:i,dispatchOnly:s}))))({singletonName:"WindowClient::setWindowTitle",server:"@@finsemble/remoteRedux/WindowServiceStore",slice:"windowTitleBar",emptyStore:$i,dispatchOnly:!0}).dispatch(Ji.setAPITitle({title:e}))}getOptions(e){return new Promise((t=>{this.queryWindowService("getOptions",{},((n,r)=>{null==e||e(n,r),t({err:n,data:r})}))}))}formGroup(){P.transmit("DockingService.formGroup",{windowName:this.name})}ejectFromGroup(){P.query("DockingService.leaveGroup",{name:this.name},(()=>{}))}}es.WINDOWSTATE=dt,es.wrap=es.getInstance,es.cache={},es._windowReady=function(e){let t;return fe.system.debug(`windowServiceReady: ${e} starting`),new Promise((async n=>{fe.system.debug(`windowServiceReady: ${e} waiting`),t=P.subscribe(`Finsemble.Component.State.${e}`,((r,i)=>{const{state:s}=i.data;switch(fe.system.debug(`windowServiceReady: ${e} state change: ${s}`),s){case"ready":case"reloading":case"closing":fe.system.debug(`windowServiceReady: ${e} ${s}`),P.unsubscribe(t),n()}}))}))},n(44383),n(2404);var ts=n(29132),ns=n.n(ts);function rs(...e){let t="";for(let n=0;n<e.length;n++)t=`${t} ${e[n]}`;return t.replace(/\s(.)/g,(e=>e.toUpperCase())).replace(/\s/g,"").replace(/^(.)/,(e=>e.toLowerCase()))}const is=e=>{if(!e)return e;if(Array.isArray(e))return e.slice();try{return JSON.parse(JSON.stringify(e))}catch(e){fe.error("fastClone error, falling back to structured clone",e)}try{return structuredClone(e)}catch(e){fe.error("fastClone error, structured clone failed",e)}};function ss(e,t=!1){return new Promise(((n,r)=>{t?setTimeout((()=>{try{r("timeout expired")}catch(e){}}),e):setTimeout(n,e)}))}const os="notification.",as="unsubscribe";class us{constructor(){this.subscriptions=[]}}const ls=()=>y("NotificationClient",us),ds=(e,t,n,r)=>new Promise((async(i,s)=>{try{null==n&&(n=os),fe.system.info(`sending message on ${n+e} channel`,t);const o=await P.query(n+e,t);o.err?(fe.system.error("Error: ",o.err),s(o.err)):(fe.system.log(`${e} raw response: `,o),r&&r(null,o.response.data.data),i(o.response.data.data))}catch(e){fe.system.error("Error: ",e),r&&r(e),s(e)}})),cs=async e=>{fe.system.info("notify() called with params: ",e);try{await ds("notify",Array.isArray(e)?e:[e])}catch(t){if(!t.includes("No responder"))throw t;await ss(500),await cs(e)}},ps=(e,t)=>new Promise((n=>{fe.system.info("Listening for messages on channel",e),((e,n,r)=>{null==r&&(r=os),fe.system.info(`Adding responder for endpoint: ${r+e}`),P.addResponder(r+e,((n,r)=>{if(fe.system.info(`Message received on ${e}: `,r),!n&&r)try{fe.system.info(`Processing message on channel ${e}: `,r);const n=(e=>{fe.system.info("Notification received: ",e.id);try{t(e)}catch(e){fe.system.error("Error thrown in the subscription.onNotification()",e)}return{message:"success"}})(r.data);fe.system.info(`Message response on ${e}: `,n),r.sendQueryResponse(null,{status:"success",data:n})}catch(e){fe.system.error("Failed to process query",e),r.sendQueryResponse(e)}else fe.system.error(`Failed to setup ${e} responder`,n)}))})(e),n()})),fs=(e,t)=>{null==t&&(t=os),P.removeResponder(t+e)},ys=()=>{const e=ls();fe.system.info("unsubscribeAll() called"),e.subscriptions.forEach((e=>{ds(as,e.id).then(),fs(e.id)})),e.subscriptions=[]},hs={initialize:()=>{fe.system.deprecated("It is no longer necessary to call NotificationClient.initialize()")},onReady:e=>{fe.system.deprecated("It is no longer necessary to call NotificationClient.onReady()"),null==e||e()},fetchHistory:async(e,t)=>(fe.system.info("FetchHistory() called with params: ",e,t),await ds("fetch_history",{options:e,filter:t})),getLastIssuedAt:async e=>(fe.system.info("getLastIssued called with params: ",e),await ds("last_issued",e)),performAction:async(e,t)=>(fe.system.info("performAction() called with params: ",e,t),Array.isArray(e)||(e=[e]),await ds("perform_action",{notifications:e,action:t})),markRead:async e=>{fe.system.info("markRead() called with params: ",e),Array.isArray(e)||(e=[e]),await ds("mark_read",{notifications:e,isRead:!0})},markUnread:async e=>{fe.system.info("markUnread() called with params: ",e),Array.isArray(e)||(e=[e]),await ds("mark_unread",{notifications:e,isRead:!1})},deleteNotifications:e=>(fe.system.info("deleteNotifications() called with params: ",e),new Promise((async(t,n)=>{try{t(ds("delete",e))}catch(e){n(e)}}))),notify:cs,subscribe:async(e,t)=>{const n=ls();fe.system.info("subscribe() called with params: ",e,t);const r=await ds("subscribe",JSON.parse(JSON.stringify(e)));return fe.system.info("Got a return value containing a channel",r),await ps(r.channel,t),n.subscriptions.push(r),r},unsubscribe:async e=>{fe.system.info("unsubscribe() called with params: ",e),await ds(as,e),(e=>{const t=ls(),n=t.subscriptions.findIndex((t=>t.id===e));n>-1&&(fs(t.subscriptions[n].channel),t.subscriptions.splice(n,1))})(e)},unsubscribeAll:ys,mute:async e=>(fe.system.info("mute() called with params: ",e),await ds("mute",{filter:e})),unmute:async e=>(fe.system.info("unmute() called with params: ",e),await ds("unmute",{filter:e})),getPreferences:async()=>(fe.system.info("getPreferences() called"),await ds("preferences",{})),getMuteFilters:async()=>(fe.system.info("getMuteFilters() called"),await ds("mute_filters",{})),getSources:async()=>(fe.system.info("getSources() called"),await ds("sources",{})),onClose:e=>{ys(),null==e||e()},Notification:ar,ActionTypes:ir,Subscription:class{constructor(e,t){this.id=e||null,this.filter=t,this.channel=""}},Action:rr,Filter:class{constructor(){this.include=[],this.exclude=[]}},actionTypes:ir},gs={x:-1,y:-1},ms={left:-1,top:-1,bottom:-1,right:-1,x:-1,y:-1,width:-1,height:-1,resizeType:"None"},vs={top:-1,left:-1};class ws{constructor(e){this.edge=null,this.direction="None",this.window=e,this.mouseLocation=gs,this.mouseOffset=vs,this.startBounds=ms,this.location=e.location}setStartBounds(e){e.resizeType&&(this.direction=e.resizeType),this.startBounds={left:e.left,top:e.top,bottom:e.bottom,right:e.right,x:e.x,y:e.y,width:e.width||e.right-e.left,height:e.height||e.bottom-e.top,resizeType:e.resizeType||this.direction},this.location=this.startBounds,this.setMouseLocation(e),this.setMouseOffset(this.startBounds)}setMouseLocation(e){this.mouseLocation={x:Number(e.x),y:Number(e.y)}}setMouseOffset(e){this.mouseOffset={left:e.x-e.left,top:e.y-e.top}}calculateWindowLocation(e){const t={x:Math.round(Number(e.x)),y:Math.round(Number(e.y))};this.edge||(this.edge=this.getResizeEdge(this.startBounds,t,this.direction));let n,r,{left:i,right:s=0,top:o,bottom:a=0}=this.location,u=0;if(this.edge){switch(u=1,this.edge){case"left":i=t.x;break;case"right":s=t.x;break;case"top":o=t.y;break;case"bottom":a=t.y;break;case"top-left":i=t.x,o=t.y;break;case"top-right":s=t.x,o=t.y;break;case"bottom-left":i=t.x,a=t.y;break;case"bottom-right":s=t.x,a=t.y}r=s-i,n=a-o}else i=t.x-Number(this.mouseOffset.left),o=t.y-Number(this.mouseOffset.top),a=Number(a)-(t.y-this.mouseLocation.y),s=Number(s)-(t.x-this.mouseLocation.x),n=Number(this.location.height),r=Number(this.location.width);const l=this.location;return l.changeType=u,l.left=Number(i),l.top=Number(o),l.bottom=Number(a),l.right=Number(s),l.height=Number(n),l.width=Number(r),this.mouseLocation=t,this.location=l,l}getResizeEdge(e,t,n){if("None"===n)return null;let r=null;switch(n){case"WE":r=Math.abs(t.x-e.left)<Math.abs(t.x-e.right)?"left":"right";break;case"NS":r=Math.abs(t.y-e.bottom)<Math.abs(t.y-e.top)?"bottom":"top";break;case"NESW":r=Math.abs(t.y-e.top)<Math.abs(t.y-e.bottom)?"top-right":"bottom-left";break;case"NWSE":r=Math.abs(t.y-e.top)<Math.abs(t.y-e.bottom)?"top-left":"bottom-right"}return r}}const bs=class{constructor(t){this.allowDelay=!1,this.delayed=!1,this.allowCancel=!1,this.canceled=!1,this.completed=!1,this.event=t.event,this.source=t.source,this.sourceType=t.sourceType,this.data=t.data,this.guid=t.guid,e[this.sourceType.toUpperCase()]&&e[this.sourceType.toUpperCase()].DELAYABLE_EVENTS.includes(this.event)&&(this.allowDelay=!0),e[this.sourceType.toUpperCase()]&&e[this.sourceType.toUpperCase()].CANCELABLE_EVENTS.includes(this.event)&&(this.allowCancel=!0),this.handler=t.handler,this.complete=new Promise(((e,t)=>{this.eventCanceled=t,this.eventComplete=e})),this.internalHandler()}async internalHandler(){this.handler&&await this.handler(this),this.delayed||this.canceled||this.completed||this.done()}cancel(){this.allowCancel&&(this.canceled=!0,this.done())}wait(){this.allowDelay?this.delayed=!0:this.done()}done(e){this.completed=!0,this.canceled?this.eventCanceled&&this.eventCanceled():this.eventComplete&&this.eventComplete(e)}};var js,Ss=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};js=new WeakMap;const Cs=class extends lr{constructor(e){super(e),js.set(this,void 0),this.eventList=[],this.eventInternalHandlerMap={},this.remoteListenerEventMap={},this.windowToGuidsMap={},this.waitList={},this.unsubscribes=[],this.unsubscribes.push(P.addListener(`Finsemble.RegisterInterruptibleEvent.${this.name}`,((e,t)=>{this.registerRemoteEventHandler(t.data.event,t.data.listenerGuid,t.data.windowName)}))),this.unsubscribes.push(P.addListener(`Finsemble.UnregisterInterruptibleEvent.${this.name}`,((e,t)=>{this.unregisterRemoteEventHandler(t.data.event,t.data.listenerGuid,t.data.windowName)}))),function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===r?i.call(e,n):i?i.value=n:t.set(e,n)}(this,js,P.addListener(bt.WINDOW_CLOSED,((e,t)=>{if(e)fe.system.error(`PrivateEventManager: Error listening for ${bt.WINDOW_CLOSED}: ${e}`);else{const{name:e}=t.data;this.removeWindow(e)}})),"f")}removeWindow(e){var t;(null!==(t=this.windowToGuidsMap[e])&&void 0!==t?t:[]).forEach((e=>{this.removeGuid(e)})),delete this.windowToGuidsMap[e]}removeGuid(e){Object.keys(this.remoteListenerEventMap).forEach((t=>{this.remoteListenerEventMap[t]=this.remoteListenerEventMap[t].filter((t=>t!==e))}))}registerRemoteEventHandler(e,t,n){var r;this.remoteListenerEventMap[e]||(this.remoteListenerEventMap[e]=[]),this.remoteListenerEventMap[e].push(t),this.windowToGuidsMap[n]=[t].concat(null!==(r=this.windowToGuidsMap[n])&&void 0!==r?r:[])}unregisterRemoteEventHandler(e,t,n){var r;this.remoteListenerEventMap[e]?(this.remoteListenerEventMap[e]=this.remoteListenerEventMap[e].filter((e=>e!==t)),this.windowToGuidsMap[n]=(null!==(r=this.windowToGuidsMap[n])&&void 0!==r?r:[]).filter((e=>e!==t)),0===this.windowToGuidsMap[n].length&&delete this.windowToGuidsMap[n]):this.windowToGuidsMap[n]&&fe.system.warn(`PrivateEventManager.unregisterListener() attempt to remove unregistered event "${e}" for window ${n}`)}awaitRemoteDelayer(e,t){return new Promise(((n,r)=>{const i=(s,o)=>{P.removeListener(`Finsemble.Listener.Done.${e}.${t}`,i),!0===o.data.canceled?r("canceled"):n(o.data.data)};this.waitList[e]=i,P.addListener(`Finsemble.Listener.Done.${e}.${t}`,i)}))}async queryRemoteListener(e,t,n,r){const i=`${this.name}_private_${Date.now()}_${Math.random()}`,s={event:e,guid:i,data:n},o=this.awaitRemoteDelayer(i,t),{err:a,response:u}=await Promise.race([P.query(`Finsemble.Interrupt.${t}`,s,{timeout:0,logWhenNoResponder:!1},(()=>{})),ss(r.initialQueryTimeout,!0)]).catch((()=>{throw P.removeListener(`Finsemble.Listener.Done.${i}.${t}`,this.waitList[i]),"eventHandler failed initial response"}));if(a||!u.data)return;let l=!0;if(!0===u.data.wait)try{return l=!1,await o}catch(e){if("canceled"===e)throw"event was canceled";l=!0}if(!0===u.data.delayed)try{return l=!1,await Promise.race([o,ss(r.timeout,!0)])}catch(e){if("timeout expired"!==e)throw"event was canceled";l=!0}if(l&&P.removeListener(`Finsemble.Listener.Done.${i}.${t}`,this.waitList[i]),!0===u.data.canceled)throw"event was canceled";return u.data.data}async trigger(e,t=null,n={initialQueryTimeout:1e3,timeout:1e4}){fe.verbose(`Triggering ${e} for ${this.name}`,t);const r=[];if(this.remoteListenerEventMap[e])for(let i of this.remoteListenerEventMap[e])r.push(this.queryRemoteListener(e,i,t,n));this.handlers.filter((t=>t.event===e)).forEach((n=>{const i=new bs({source:this.name,sourceType:this.sourceType,handler:n.handler,event:e,data:t,guid:n.listenerGuid});r.push(i.complete)}));try{return await Promise.all(r)}catch(t){if("eventHandler failed initial response"!==t)throw"event was canceled";console.debug(`No response for interrupt on event ${e}. Window is probably already closed.`)}}addEventListener(e,t){fe.system.debug("PrivateEventManager.addEventListener:",e);const n=`${this.name}_public_${Date.now()}_${Math.random()}`;return this.handlers.push({event:e,handler:t,listenerGuid:n}),()=>{this.removeEventListener(e,t)}}removeEventListener(e,t){fe.system.debug("PrivateEventManager.removeEventListener:",e);const n=this.handlers.findIndex((n=>n.event===e&&n.handler===t));-1!=n?this.handlers.splice(n,1):fe.system.warn(`PrivateEventManager.removeEventListener() attempt to remove unregistered event "${e}"`)}cleanup(){Ss(this,js,"f")&&Ss(this,js,"f").call(this),this.unsubscribes.forEach((e=>{e()})),this.unsubscribes=[]}};var As=n(90165);n.n(As)()(1);const Rs=(e,...t)=>{(e?fe.system.error:fe.system.info)(...t,e)},Is=async(e,t)=>{if("string"!=typeof e.key||"string"!=typeof e.topic)throw new Error("Values for key and topic must be strings.");await A.waitForStartup("storageService");const{err:n,response:r}=await P.query("Storage.get",e);return Rs(n,"Storage.get",r.data),null==t||t(n,r.data),{err:n,data:r.data}},Ts=Is;class Es{constructor(){this.workspaces=[],this.publicEventManager=new lr({name:"workspaceClient",sourceType:"workspace"}),P.subscribe(gt.WORKSPACE_UPDATED,((e,t)=>{fe.system.debug(`${gt.WORKSPACE_UPDATED} response`,e,t),e?fe.system.error(e):(this.activeWorkspace=t.data.activeWorkspace,this.workspaces=t.data.workspaces)}))}}const Os=()=>y("WorkspaceClient",Es);Os();const _s=async e=>{var t,n;const r=Os(),{activeWorkspace:i}=r;if(fe.system.debug("WorkspaceClient.getActiveWorkspace"),i)return fe.system.info("WorkspaceClient.getActiveWorkspace - returning from cache"),e&&e(null,{data:i}),{data:i};const{response:s}=await P.query(gt.API_CHANNELS.GET_ACTIVE_WORKSPACE,{});r.activeWorkspace=s.data;const o=(null===(t=s.data)||void 0===t?void 0:t.err)||s.header.error;if(o)throw e&&e(o),new Error(o);return e&&e(null,{data:null!==(n=s.data)&&void 0!==n?n:{}}),{data:s.data}},Ms=async e=>{var t,n;const r=Os(),{activeWorkspace:i}=r;if(!i)throw"Workspace is not yet ready";if(!i.windows.includes(e.windowName))throw"Cannot set state for Window not in workspace";fe.system.debug("WorkspaceClient.setWindowData",e);const{response:s}=await P.query(gt.API_CHANNELS.SET_WINDOW_STATE,e);return{...s,data:null!==(t=s.data)&&void 0!==t?t:{},header:null!==(n=s.header)&&void 0!==n?n:{}}};class Ls{constructor(){this.gatePromises=[]}async runOldest(){var e;const t=this.gatePromises[this.gatePromises.length-1];await t.func(),this.gatePromises=this.gatePromises.filter((e=>e!==t)),null===(e=t.resolve)||void 0===e||e.call(t),this.gatePromises.length&&this.runOldest()}async wait(e){const t={func:e};return t.gatePromise=new Promise((e=>{t.resolve=e})),this.gatePromises=this.gatePromises.concat(t),1===this.gatePromises.length&&this.runOldest(),t.gatePromise}}var Ps,Ws=n(14744),Ns=n.n(Ws);class ks{constructor(e){this.name="Unknown window",this.windowName="Unknown window",this.eventlistenerHandlerMap={},this.gate=new Ls,this.handleWrapStateChange=(e,t)=>{const{state:n}=t.data;n&&n!==this.wrapState&&"closed"!==n&&(this.wrapState=n,this.eventManager.trigger(n),this.eventManager.trigger("wrap-state-changed",{state:n}))},this.types={},this.guid=p()(),this.wrapState="initializing",this.componentState={},this.windowState=Ps.WINDOWSTATE.NORMAL,this.type=null,this.windowType=null,this.windowOptions={},this.bounds={},this.name,this.enableWindowsAeroSnap=!1,this.doConstruction(e),this.componentKey=rs("activeWorkspace",this.name,this.name),this.windowKey=rs("activeWorkspace",this.name),Ps.bindFunctions(this),this.wrapStateChangeSubscription=P.subscribe(`Finsemble.Component.State.${this.name}`,this.handleWrapStateChange),this.eventManager=new Cs({name:this.name,sourceType:"Window"}),this.finishedMove=!0,this.oldState={}}windowServiceChannelName(e){return`WindowService-Request-${e}`}eventChannelName(e){return`WindowService-Event-${this.name||this.windowName}-${e}`}_startMove(e=0){window.aeroMode=!1,0===e&&(this.finishedMove=!1)}_stopMove(){this.finishedMove=!0}doConstruction(e){if(e.setWindowType||e.windowType||(e.windowType="WebWindow"),e.windowType)return e.setWindowType=e.windowType,delete e.windowType,new Ps.types[e.setWindowType](e);if(e)for(const t in e)this[t]=e[t];this.name||(this.name=e.windowName),this.windowType=this.setWindowType}static registerType(e,t){const n=Ps;n.types||(n.types={}),n.types[e]=t}static bindFunctions(e){e.eventChannelName=e.eventChannelName.bind(e),e.windowServiceChannelName=e.windowServiceChannelName.bind(e),e.setupListeners=e.setupListeners.bind(e),e.handleWrapRemoveRequest=e.handleWrapRemoveRequest.bind(e)}setupListeners(e){}static async getInstanceStandardized(e){try{return{data:(await Ps.getInstance(e)).wrap}}catch(e){return{err:e}}}static getInstance(e,t){return new Promise((async(n,r)=>{var i,s;const o=x.Window.getCurrent().name,a=null!==(i=null==e?void 0:e.name)&&void 0!==i?i:null==e?void 0:e.windowName,{waitForReady:u,uuid:l,windowType:d}=e;if(!a){const e='"name" is a required parameter';return null==t||t(e),void r(e)}if(e.windowName=a,!1!==u&&(fe.system.debug("WRAP LIFECYCLE:WAIT FOR READY",a),await Ps._windowReady(a),fe.system.debug("WRAP LIFECYCLE:WAIT DONE -- READY",a)),Ps.cache[a]){fe.system.debug("WRAP LIFECYCLE:",a,"Window found in the cache, returning without going to the Launcher");const e=Ps.cache[a];return n({wrap:e}),void(null==t||t(null,e))}if(l&&a){const r={uuid:l,name:a,windowName:a,windowType:d};fe.system.debug("WRAP LIFECYCLE:",a,"All information for wrap passed in, creating wrap locally");const{wrap:i}=await Ps._createWrap({...e,windowIdentifier:null!==(s=e.windowIdentifier)&&void 0!==s?s:r});return n({wrap:i}),void(null==t||t(null,i))}P.query("WindowService-Request-getWindowIdentifier",{windowName:e.name,requester:o},(async(i,s)=>{var o;if(i||!s.data)return fe.system.error(i),r(i),void(null==t||t(i));if(Ps.cache[a]){const e=Ps.cache[a];return fe.system.debug("WRAP LIFECYCLE:",a,"Information received from launcher, but wrap exists in cache. Returning cached wrap."),n({wrap:e}),void(null==t||t(null,e))}const{identifier:u}=s.data;fe.system.debug("WRAP LIFECYCLE:",a,"Information received from launcher. Creating wrap.");const{wrap:l}=await Ps._createWrap({...e,retrievedIdentifier:{...u,name:null!==(o=u.windowName)&&void 0!==o?o:u.name}});n({wrap:l}),null==t||t(null,l)}))}))}static _createWrap(e){return new Promise((t=>{const n=e.retrievedIdentifier||e.windowIdentifier;let r={...n};(e.setWindowType||n.windowType)&&"WebApplication"!==n.windowType||(n.windowType="WebWindow"),r=Object.assign(r,e),r=Object.assign(r,n),r.setWindowType=r.windowType,delete r.windowType,fe.system.debug("WRAP LIFECYCLE: Placing wrap into the local cache.",n.windowName);const i=Ps;Ps.cache.hasOwnProperty(n.windowName)?fe.system.warn("DUPLICATE WRAPPER for",n.windowName):Ps.cache[n.windowName]=new i.types[r.setWindowType](r);let s=Ps.cache[n.windowName];s.windowType=n.windowType,s.identifier=n,s.setupListeners(n.windowName),t({wrap:s})}))}static _getRemoveWrapChannel(e){return`${x.Window.getCurrent().name}.removeWrap.${e}`}handleWrapRemoveRequest(){this.removeListeners&&this.removeListeners(),this.eventManager.cleanup();for(const e in this.eventlistenerHandlerMap)for(let t=0;t<this.eventlistenerHandlerMap[e].length;t++)this.eventlistenerHandlerMap[e][t].interceptor.removeAllListeners();this.eventManager.cleanup(),fe.system.debug("WRAP CLOSE. Deleting cached wrap."),delete Ps.cache[this.name],this.cleanupRouter()}cleanupRouter(){const e=Ps._getRemoveWrapChannel(this.name);P.removeResponder(e),P.unsubscribe(this.wrapStateChangeSubscription)}onReady(e){return new Promise((t=>{"ready"===this.wrapState?(null==e||e(),t()):this.addEventListener("ready",(()=>{null==e||e(),t()}))}))}queryWindowService(e,t,n=Function.prototype){"function"==typeof t&&(n=t,t={}),(t=t||{}).windowIdentifier=this.identifier,fe.system.debug("FinsembleWindow.queryWindowService",this.windowServiceChannelName(e),t),console.debug("FinsembleWindow.queryWindowService",this,this.windowServiceChannelName(e),t);let r=null;P.query(this.windowServiceChannelName(e),t,((t,i)=>{t?(fe.system.warn(`WindowService.${e}: failed`,t),console.debug(`WindowService.${e}: failed`,t)):(r=i.data,fe.system.debug(`${this.windowServiceChannelName(e)} successful`,r),console.debug(`${this.windowServiceChannelName(e)} successful`,r)),n&&n(t,r)}))}addEventListener(e,t){this.eventManager.addEventListener(e,t)}removeEventListener(e,t){return this.eventManager.removeEventListener(e,t)}registerWithDocking(e,t){P.query("DockingService.registerWindow",{type:this.type,windowType:this.windowType,windowMsg:e,name:this.windowName},t)}unRegisterWithDocking(){P.transmit("DockingService.deregisterWindow",{name:this.windowName})}initializeWindow(e){this.registerWithDocking(e,(()=>{P.publish(`Finsemble.${this.windowName}.componentReady`,{name:this.windowName})}))}wrapReady(){P.publish(`Finsemble.${this.windowName}.wrapReady`,{name:this.windowName,state:"open"})}_minimize(e,t=Function.prototype){fe.system.debug("BaseWindow._minimize",e),e=e||{},t(null,{shouldContinue:!0})}_maximize(e,t=Function.prototype){fe.system.debug("BaseWindow._maximize",e),t(null,{shouldContinue:!0})}_restore(e,t){return new Promise((n=>{fe.system.debug("BaseWindow._restore",e),e=e||{},null==t||t(null,{shouldContinue:!0}),n({data:{shouldContinue:!0}})}))}_blur(e,t=Function.prototype){fe.system.debug("BaseWindow._blur",e),e=e||{},t(null,{shouldContinue:!0})}_focus(e,t=Function.prototype){fe.system.debug("BaseWindow._focus",e),e=e||{},t(null,{shouldContinue:!0})}_bringToFront(e,t=Function.prototype){fe.system.debug("BaseWindow._bringToFront",e),e=e||{},t(null,{shouldContinue:!0})}_isShowing(e,t=Function.prototype){fe.system.debug("BaseWindow._isShowing",e),e=e||{},t(null,{shouldContinue:!0})}disableFrame(e){null==e||e()}_setBounds(e,t=Function.prototype){fe.system.verbose("BaseWindow._setBounds",e),e=e||{};const{bounds:n}=e;this.mergeBounds(n),t(null,{shouldContinue:!0})}_getBounds(e,t){return new Promise((n=>{fe.system.verbose("BaseWindow._getBounds",e),e=e||{},null==t||t(null,{shouldContinue:!0}),n({data:{shouldContinue:!0}})}))}_getBoundsFromSystem(e,t){fe.system.debug("BaseWindow._getBoundsFromSystem",e),e=e||{},t(null,{shouldContinue:!0})}_updateOptions(e,t=Function.prototype){fe.system.debug("BaseWindow._updateOptions",e),e=e||{},t(null,{shouldContinue:!0})}_hide(e,t=Function.prototype){fe.system.debug("BaseWindow._hide",e),e=e||{},t(null,{shouldContinue:!0})}async _show(e,t){return fe.system.debug("BaseWindow._show",e),e=e||{},null==t||t(null,{shouldContinue:!0}),{data:{shouldContinue:!0}}}_showAt(e,t=Function.prototype){fe.system.debug("BaseWindow._showAt",e),e=e||{},t(null,{shouldContinue:!0})}_close(e={},t){return new Promise((n=>{fe.system.debug("WRAP CLOSE. BaseWindow._close",this.name,e),null==t||t(null,{shouldContinue:!0}),n({data:{shouldContinue:!0}})}))}_alwaysOnTop(e,t=Function.prototype){fe.system.debug("BaseWindow._alwaysOnTop",e),e=e||{},t(null,{shouldContinue:!0})}_isAlwaysOnTop(e,t=Function.prototype){return t(null,Boolean(this.windowOptions.alwaysOnTop)),Boolean(this.windowOptions.alwaysOnTop)}async _setOpacity(e,t=Function.prototype){fe.system.debug("BaseWindow._setOpacity",e),e=e||{},t(null,{shouldContinue:!0})}_saveWindowOptions(e,t=Function.prototype){fe.system.debug("BaseWindow._saveWindowOptions",e),e=e||{},t(null,{shouldContinue:!0})}_getOptions(e,t=Function.prototype){return t(null,{})}startTabTileMonitoring(e){fe.system.debug("BaseWindow.startTabTileMonitoring",e),P.transmit("TabTile.startTabTile",{params:e})}stopTabTileMonitoring(e,t){fe.system.debug("BaseWindow.stopTabTileMonitoring",e),P.query("TabTile.stopTabTile",{params:e},(function(e,n){e?fe.system.warn("TabTile.stopTabTile: query failed",e):fe.system.debug("TabTile.stopTabTile results",n.data);const r=n.data;t?t(e,r,this.defaultStopTrackingAction):this.defaultTabTileAction(r)}))}defaultTabTileAction(e){const t=this;switch(fe.system.debug("BaseWindow.defaultTabTileAction",e),e.stoppedLocation){case"OutsideWindow":case"TabSection":break;case"InsideWindow":e.tileGroupId?t.Group.addWindow(this.identifier,e.tileGroupId,e.dropCoordinates):t.Group.createGroup((function(n){t.Group.addWindow(this.identifier,n,e.dropCoordinates,{startingWindowIdentifier:e.droppedOnWindowIdentifier})}));break;default:fe.system.error("stopTracking returned an unknown stoppedLocation result",e)}}mergeBounds(e){if(!e||!Number.isInteger(e.top))return console.error("Invalid bounds",e),void fe.system.warn("BaseWindow.mergeBounds Invalid bounds","bounds=",e);const t={top:Math.round(e.top),left:Math.round(e.left),width:Math.round(e.width),height:Math.round(e.height)};t.bottom=t.top+t.height,t.right=t.left+t.width;const n={defaultLeft:t.left,defaultWidth:t.width,defaultTop:t.top,defaultHeight:t.height};Object.assign(this.windowOptions,t),Object.assign(this.windowOptions,n),this.windowOptions.bounds=t}startMove(e){fe.system.debug("BaseWindow.startMove",e),(e=e||{}).windowIdentifier=this.identifier,this.eventManager.trigger("bounds-change-start",{...this.windowOptions.bounds})}stopMove(e){fe.system.debug("BaseWindow.stopMove",e),(e=e||{}).windowIdentifier=this.identifier,this.eventManager.trigger("bounds-change-end",{name:this.name,eventName:"bounds-change-end",dockedPosition:this.dockedPosition,...this.windowOptions.bounds})}async getFSBLState(e,t){fe.system.debug("BaseWindow.getState",e);const{err:n,data:r}=await Ts({topic:gt.CACHE_STORAGE_TOPIC,key:e.key});"componentState"===e.stateVar&&(this.componentState=r);const{field:i,fields:s}=e;if(!n&&r){if(i)return null==t||t(n,r[i]),{data:r[i]};if(s){const e={};for(let t=0;t<s.length;t++)r[s[t]]&&(e[s[t]]=r[s[t]]);return null==t||t(null,e),{data:e}}return null==t||t(null,r),{data:r}}{const i="Not found";return fe.system.info("WindowClient:getComponentState:error, response, params",n,r,e),null==t||t(i,r),{err:i}}}getComponentState(e,t){return e||(e={}),e.fields&&!Array.isArray(e.fields)&&(e.fields=[e.fields]),this.getFSBLState({...e,key:this.componentKey,stateVar:"componentState"},t)}getWindowState(e,t){return e||(e={}),e.fields&&!Array.isArray(e.fields)&&(e.fields=[e.fields]),e.key=this.windowKey,e.stateVar="windowData",this.getFSBLState(e,t)}setComponentState(e,t=Function.prototype){return e||(e={}),e.fields&&!Array.isArray(e.fields)&&(e.fields=[e.fields]),this.setFSBLState({...e,key:this.componentKey,stateVar:"componentState"},t)}removeComponentState(e,t=()=>{}){return e.fields&&!Array.isArray(e.fields)&&(e.fields=[e.fields]),this.removeFSBLState({...e,key:this.componentKey,stateVar:"componentState"},t)}setWindowState(e,t){return e||(e={}),e.fields&&!Array.isArray(e.fields)&&(e.fields=[e.fields]),this.setFSBLState({...e,key:this.windowKey,stateVar:"windowData"},t)}saveWindowState(e){this.windowState=e}static async cleanupState(e){const t={componentType:e.componentType,name:e.name};if(!Ps.additionalWorkspaceFields)try{const e=await X.get(["finsemble","servicesConfig","window","additionalWorkspaceFields"]);Ps.additionalWorkspaceFields=e.data||[]}catch(e){Ps.additionalWorkspaceFields=[]}let n;n=gt.ADDITIONAL_WINDOW_PROPS[e.windowType]?gt.ADDITIONAL_WINDOW_PROPS[e.windowType]:gt.ADDITIONAL_WINDOW_PROPS.WebWindow,"WebApplication"===e.windowType&&(e.windowType="WebWindow");const r=[...gt.DEFAULT_WINDOW_PROPS,...n,...Ps.additionalWorkspaceFields];for(const n of r)void 0!==e[n]&&null!==e[n]&&(t[n]=e[n]);return t}async saveCompleteWindowState(e,t=Function.prototype){if(fe.system.debug("COMPONENT LIFECYCLE:SAVING STATE:",e.name),e){const n=await Ps.cleanupState(e);if(((e,t)=>{const n=is(e),r=is(t);return ns()(n,r,((e,t)=>{if(Array.isArray(e)&&Array.isArray(t))return ns()(e.sort(),t.sort())}))})(this.oldState,n))fe.system.debug("saveCompleteWindowState -- deep equal"),t();else{fe.system.debug("saveCompleteWindowState -- not deep equal",this.oldState,n),this.oldState=Zi()(n);try{await Ms({windowName:this.windowName,state:{windowData:n}})}catch(e){}t()}}else t("No State Provided")}async setFSBLState(e,t){await this.gate.wait((async()=>{await this.setFSBLStateInternal(e,t)}))}async setFSBLStateInternal(e,t){const n={key:e.key,stateVar:e.stateVar};n.key||("componentState"===n.stateVar?n.key=this.componentKey:"windowData"===n.stateVar&&(n.key=this.windowKey));const r="componentState"===e.stateVar?"componentState":"windowOptions";await this.getFSBLState(n),fe.system.debug("BaseWindow.getState",e);let i=Ns()(this[r],{}),{fields:s}=e;e.field&&(s=[{field:e.field,value:e.value}]);for(let e=0;e<s.length;e++){const t=s[e];t.field&&void 0!==t.value&&(i[t.field]=t.value)}e.value=i,fe.system.debug(`COMPONENT LIFECYCLE: SAVING ${e.stateVar}:`,i),"windowData"===e.stateVar&&(i=await Ps.cleanupState(i));try{await Ms({windowName:this.windowName,state:{[e.stateVar]:i}})}catch(e){}this[r]=i,null==t||t()}removeFSBLState(e,t=()=>{}){var n;const r={key:e.key,stateVar:e.stateVar},i="componentState"===r.stateVar?this.componentKey:this.windowKey,s=null!==(n=r.key)&&void 0!==n?n:i,o="componentState"===e.stateVar?"componentState":"windowOptions";this.getFSBLState({...r,key:s},(async()=>{var n;fe.system.debug("BaseWindow.getState",e);let r=Ns()(this[o],{}),{fields:i=[]}=e;e.field&&(i=[{field:e.field}]);for(let e=0;e<i.length;e++){const t=i[e];t.field&&delete r[t.field]}e.value=r,fe.system.debug(`COMPONENT LIFECYCLE: SAVING ${e.stateVar}:`,r),"windowData"===e.stateVar&&(r=await Ps.cleanupState(r));const s=null!==(n=e.stateVar)&&void 0!==n?n:"windowData";try{await Ms({windowName:this.windowName,state:{[s]:r}})}catch(e){}this[o]=r,t(null)}))}cancelTabTileMonitoring(e){fe.system.debug("BaseWindow.cancelTabTileMonitoring",e),P.transmit("TabTile.cancelTabTile",{params:e})}close(e={},t){return new Promise((n=>{this.queryWindowService("close",e,((e,r)=>{null==t||t(e,r),n({err:e})}))}))}_animate(e,t){"function"==typeof e&&(t=e,e=null),t("Method not implemented for window",{shouldContinue:!0})}}Ps=ks,ks.cache={},ks.WINDOWSTATE=dt,ks.wrap=Ps.getInstance,ks._windowReady=e=>new Promise((async t=>{fe.system.debug(`windowServiceReady: ${e} waiting`);const n=P.subscribe(`Finsemble.Component.State.${e}`,((r,i)=>{const{state:s}=i.data;switch(fe.system.debug(`windowServiceReady: ${e} state change: ${s}`),s){case"ready":case"reloading":case"closing":fe.system.debug(`windowServiceReady: ${e} ${s}`),P.unsubscribe(n),t();break;default:fe.system.debug(`windowServiceReady default: ${e} ${s}`)}}))}));class Ds{constructor(e){this.assimilationHelper=e,this.activeWindows={},this.awaitingAssimilationSpawn={},this.awaitingSpawn={},this.allWindows={},this.movingWindow=null,this.floatingTitlebar=null,this.updateActiveWindowHeartbeats(),this.dockedToolbarOnStart=!1}setWebsocket(e){this.ws=e}sendSocketMessage(e){if(!this.ws)return setTimeout((()=>{this.sendSocketMessage(e)}),100);fe.system.verbose("Assimilation.AssimilationWindowManager.sendSocketMessage",e),this.ws.send(e)}setMovingWindow(e){return fe.system.debug("Assimilation.AssimilationWindowManager.setMovingWindow",e),this.movingWindow=new ws(e)}getMovingWindow(){return fe.system.debug("Assimilation.AssimilationWindowManager.getMovingWindow"),this.movingWindow}getWindowByUUID(e){return fe.system.debug("Assimilation.AssimilationWindowManager.getWindowByUUID:",e),this.activeWindows[e]}getWindowByName(e){fe.system.debug("Assimilation.AssimilationWindowManager.getWindowByName:",e);const t=Object.keys(this.activeWindows);for(let n=0;n<t.length;n++){const r=this.activeWindows[t[n]];if(r.windowName===e)return r}}updateSpawningWindow(e,t){fe.system.debug("Assimilation.AssimilationWindowManager.updateSpawningWindow:",e,t);const n=this.awaitingAssimilationSpawn[e];if(n)return t||(n.windowLess=!0,t=e),n.uuid=t,this.activeWindows[t]=n,delete this.awaitingAssimilationSpawn[e],n}updateSpawningWindowFromWindowObject(e){const t=e.data,n={name:e.data.name,windowType:"native"};return es.getInstance(n,(async(e,n)=>{n&&n.descriptor&&(n.descriptor.hideTitleBar=!0),n.uuid=parseInt(t.windowHandle,10).toString(16),this.activeWindows[n.uuid]=n;const r=await n.getBounds();r.data&&this.handleSpawnComplete(n,r.data)}))}handleSpawnComplete(e,t){var n,i,s,o;if(fe.system.debug("Assimilation.AssimilationWindowManager.handleSpawnComplete:",e,t),!e)return fe.system.error("no window reference found");const a=r()(e,"descriptor.customData.foreign.services.windowService.manageWindowMovement",!0);if(t&&a&&this.assimilationHelper.canHookWindow(e)){fe.system.debug("Assimilation.AssimilationWindowManager.handleSpawnComplete:canHook window",e),e.location=t;let r=null;const a=()=>{fe.system.debug("Assimilation.AssimilationWindowManager.handleSpawnComplete:afterSpawn",e),P.transmit(`${e.name}.endMovement`,{location:e.location}),P.transmit("assimilation.WindowEventStream",{windowName:e.name,eventName:"opened",open:!0,bounds:{height:e.location.height,width:e.location.width,x:e.location.left,y:e.location.top}}),null==r||r()};"ready"!==e.wrapState&&(null===(o=null===(s=null===(i=null===(n=e.descriptor)||void 0===n?void 0:n.params)||void 0===i?void 0:i.customData)||void 0===s?void 0:s.window)||void 0===o?void 0:o.addToWorkspace)?es._windowReady(e.windowName).then((async()=>{let t=await _s(),n=0;for(;!t.data.windows.includes(e.windowName)&&n<5;)await new Promise((e=>setTimeout(e,200))),n+=1,t=await _s();a()})):e.onReady(a)}this.registerWindow(e,e)}addNativeWindow(e){fe.system.debug("Assimilation.AssimilationWindowManager.addNativeWindow:",e),this.allWindows[e.uuid]=e;let t=this;t.assimilationHelper.canHookWindow(e)?(fe.system.debug("Assimilation.AssimilationWindowManager.addNativeWindow: executableInConfig",e),this.assimilationHelper.executableInConfig(e,((n,r)=>{r?fe.system.debug("assimilationHelper.executableInConfig: returning, executable is in config",e):(e.windowName=e.name,P.query("LauncherService.createWrap",{name:e.uuid},((n,r)=>{n&&fe.system.error("Error inside of createWrap:",n),es.getInstance(r.data,((n,r)=>{if(n)return fe.system.error("Could not create wrap for window",e);t.activeWindows[e.uuid]=r,r.uuid=e.uuid;const{top:i,left:s,right:o,bottom:a}=e,u={top:i,left:s,width:o-s,height:a-i};fe.system.debug("assimilationHelper.executableInConfig:getInstance: created window wrap",e,r),t.handleSpawnComplete(r,u)}))})))}))):fe.system.debug("Assimilation.AssimilationWindowManager.addNativeWindow: cannot hook",e)}moveWindow(e){var t,n,r,i;if(fe.system.debug("Assimilation.AssimilationWindowManager.moveWindow:",e),!e.location)return;if(!e.name)return;let s=this.getWindowByUUID(e.key);if(!s){if(s=this.getWindowByName(e.name),!s)return void fe.system.error("MoveWindow - could not find window. Name:",e.name,"Handle:",e.key);fe.system.warn("MoveWindow - Could not find window by UUID, but did find window by name. Name:",e.name,"Handle:",e.key)}e.location.width=Math.round(e.location.width),e.location.bottom=Math.round(e.location.bottom),e.location.height=Math.round(e.location.height),e.location.left=Math.round(e.location.left),e.location.right=Math.round(e.location.right),isNaN(e.location.left)||(isNaN(e.location.height)&&(e.location.height=e.location.bottom-e.location.top,e.location.width=e.location.right-e.location.left),s.location={...e.location},this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"moveWindow",uuid:s.uuid,windowId:s.uuid,location:e.location})),P.transmit("assimilation.WindowEventStream",{eventName:"moved",windowName:s.name,bounds:{height:(null===(t=null==s?void 0:s.location)||void 0===t?void 0:t.height)||600,width:(null===(n=null==s?void 0:s.location)||void 0===n?void 0:n.width)||800,x:(null===(r=null==s?void 0:s.location)||void 0===r?void 0:r.left)||0,y:(null===(i=null==s?void 0:s.location)||void 0===i?void 0:i.top)||0}}))}showWindow(e){var t,n,r,i;if(fe.system.debug("Assimilation.AssimilationWindowManager.showWindow:",e),e.data.name){const s=this.getWindowByName(e.data.name);e.data.key=s.uuid,P.transmit("assimilation.WindowEventStream",{windowName:s.name,eventName:"show",bounds:{height:(null===(t=null==s?void 0:s.location)||void 0===t?void 0:t.height)||600,width:(null===(n=null==s?void 0:s.location)||void 0===n?void 0:n.width)||800,x:(null===(r=null==s?void 0:s.location)||void 0===r?void 0:r.left)||0,y:(null===(i=null==s?void 0:s.location)||void 0===i?void 0:i.top)||0}})}this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"showWindow",uuid:e.data.key,windowId:e.data.key}))}hideWindow(e){var t,n,r,i;if(fe.system.debug("Assimilation.AssimilationWindowManager.hideWindow:",e),e.data.name){const s=this.getWindowByName(e.data.name);e.data.key=s.uuid,P.transmit("assimilation.WindowEventStream",{eventName:"hide",windowName:s.name,bounds:{height:(null===(t=null==s?void 0:s.location)||void 0===t?void 0:t.height)||600,width:(null===(n=null==s?void 0:s.location)||void 0===n?void 0:n.width)||800,x:(null===(r=null==s?void 0:s.location)||void 0===r?void 0:r.left)||0,y:(null===(i=null==s?void 0:s.location)||void 0===i?void 0:i.top)||0},visible:!1})}this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"hideWindow",uuid:e.data.key,windowId:e.data.key}))}dockWindow(e){if(!e.data.init||!this.dockedToolbarOnStart){const t=`00000000${e.data.key}`.substr(-8);this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"dockWindow",uuid:t,windowId:t,edge:e.data.edge,bounds:e.data.bounds})),this.dockedToolbarOnStart=!0}}undockWindow(e){const t=`00000000${e.data.key}`.substr(-8);this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"undockWindow",uuid:t,windowId:t}))}closeWindow(e){fe.system.debug("Assimilation.AssimilationWindowManager.closeWindow:",e);const t=this.getWindowByName(e.data.name);if(!t)return null==e?void 0:e.sendQueryResponse(null,null);if(t.windowLess){const{removeFromWorkspace:n=!1}=e.data;P.transmit(`Finsemble.Assimilation.close.${t.windowName}`,{}),t.queryResponder=e.sendQueryResponse,this.removeWindow(t.uuid,n)}else t.spawnedByFea?this._closeSpawned(t.finUUID,e.sendQueryResponse):(P.transmit(`Finsemble.Assimilation.close.${t.windowName}`,{}),t.queryResponder=e.sendQueryResponse,this._closeAssimilationSpawned(t.uuid))}_closeAssimilationSpawned(e){fe.system.debug("Assimilation.AssimilationWindowManager._closeAssimilationSpawned:",e),this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"closeWindow",uuid:e,windowId:e})),setTimeout((()=>{this.getWindowByUUID(e)&&this._closeAssimilationSpawned(e)}),1e3)}_closeSpawned(e,t){fe.system.debug("Assimilation.AssimilationWindowManager._closeSpawned:",e),x.terminateExternalProcess(e,0,(e=>{t&&t(null,null),fe.system.debug("Assimilation window closed:",e)}),(e=>{t&&t(null,null),fe.system.error("Assimilation window closed error:",e)}))}closeAllWindows(e){fe.system.debug("Assimilation.AssimilationWindowManager.closeAllWindows:",e),Object.keys(this.activeWindows).forEach((e=>{P.transmit("LauncherService.shutdownResponse",{waitForMe:!1,name:this.activeWindows[e].windowName}),this.removeWindow(e,!1),this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"closeWindow",uuid:e,windowId:e}))}))}bringToFront(e){var t;let n;if(fe.system.debug("Assimilation.AssimilationWindowManager.bringToFront:",e),e.data.name){if(n=this.getWindowByName(e.data.name),!n)return void fe.system.debug("Failed to get window",e.data.name);e.data.key=n.uuid}else n=this.getWindowByUUID(e.data.key);"minimize"===n.state&&this.showWindow(e),(null===(t=n.descriptor)||void 0===t?void 0:t.alwaysOnTop)||this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"bringToFront",uuid:e.data.key,windowId:e.data.key}))}minimizeWindow(e){fe.system.debug("Assimilation.AssimilationWindowManager.minimizeWindow:",e);const t=this.getWindowByName(e.data.name);e.data.name&&(e.data.key=t.uuid),t.state="minimize",t.lastMinimized=Date.now(),this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"minimize",uuid:e.data.key,windowId:e.data.key}))}maximizeWindow(e){if(fe.system.debug("Assimilation.AssimilationWindowManager.maximizeWindow:",e),e.data.name){const t=this.getWindowByName(e.data.name);e.data.key=t.uuid,t.state="maximize"}this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"maximize",uuid:e.data.key,windowId:e.data.key})),this.bringToFront(e)}restoreWindow(e){if(fe.system.debug("Assimilation.AssimilationWindowManager.restoreWindow:",e),e.data.name){const t=this.getWindowByName(e.data.name);e.data.key=t.uuid}this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"restore",uuid:e.data.key,windowId:e.data.key})),P.transmit(`${e.data.name}.restored`,{})}alwaysOnTop(e){let t;t=e.data.name&&!e.data.key?this.getWindowByName(e.data.name):this.getWindowByUUID(e.data.key),(t||e.data.key)&&(fe.system.debug("Assimilation.AssimilationWindowManager.alwaysOnTop:",e),P.transmit("assimilation.WindowEventStream",{eventName:"always-on-top-changed",windowName:t.name,isAlwaysOnTop:e.data.alwaysonTop}),this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"alwaysOnTop",uuid:e.data.key||t.uuid,alwaysOnTop:e.data.alwaysonTop})),t.descriptor&&t.descriptor.alwaysOnTop!==e.data.alwaysonTop&&t.updateOptions({alwaysOnTop:e.data.alwaysonTop},Function.prototype))}removeWindow(e,t){fe.system.debug("Assimilation.AssimilationWindowManager.removeWindow:",e);const n=this.getWindowByUUID(e);if(!n)return delete this.activeWindows[e],void delete this.allWindows[e];n.queryResponder?(n.queryResponder(null,null),delete n.queryResponder):n.close({fromAssimilation:!0,removeFromWorkspace:t}),delete this.activeWindows[e],delete this.allWindows[e],P.query("Launcher.removeComponent",{name:n.windowName},(()=>{}))}parseApplicationList(e){fe.system.debug("Assimilation.AssimilationWindowManager.parseApplicationList:",e);const t=JSON.parse(e);this.checkForRemoved(t);for(let e=0;e<t.length;e++){const n=t[e];this.allWindows[n.uuid]||(fe.system.debug("Assimilation.AssimilationWindowManager.parseApplicationList invoking addNativeWindow:",n),this.addNativeWindow(n))}}checkForRemoved(e){fe.system.debug("Assimilation.AssimilationWindowManager.checkForRemoved:",e);let t=!1;for(const n in this.allWindows)if(t=!1,!this.allWindows[n].windowLess){for(let r=0;r<e.length;r++)if(e[r].uuid===this.allWindows[n].uuid){t=!0;break}t||(this.activeWindows[n]&&this.activeWindows[n].unRegisterWithDocking(),delete this.activeWindows[n],delete this.allWindows[n])}}registerWindow(e,t){var n,r,i,s,o,a,u,l,d,c,p,f,y,h;fe.system.debug("Assimilation.AssimilationWindowManager.registerWindow:",t.windowName,e,t),e.name=t.windowName;const g={name:t.windowName,uuid:t.uuid,windowType:"NativeWindow",windowMsg:{location:e.location?e.location:null},options:{minWidth:(null===(n=t.descriptor)||void 0===n?void 0:n.minWidth)||0,minHeight:(null===(r=t.descriptor)||void 0===r?void 0:r.minHeight)||0,maxWidth:(null===(i=t.descriptor)||void 0===i?void 0:i.maxWidth)||1/0,maxHeight:(null===(s=t.descriptor)||void 0===s?void 0:s.maxHeight)||1/0,snapping:null===(d=null===(l=null===(u=null===(a=null===(o=t.descriptor)||void 0===o?void 0:o.customData)||void 0===a?void 0:a.foreign)||void 0===u?void 0:u.services)||void 0===l?void 0:l.windowService)||void 0===d?void 0:d.allowSnapping,grouping:null===(h=null===(y=null===(f=null===(p=null===(c=t.descriptor)||void 0===c?void 0:c.customData)||void 0===p?void 0:p.foreign)||void 0===f?void 0:f.services)||void 0===y?void 0:y.windowService)||void 0===h?void 0:h.allowGrouping}};let m=`Finsemble.${t.windowName}.wrapReady`,v=P.subscribe(m,((n,r)=>{var i,s,o,a;if(t.wrapState="ready",t.initializeWindow({identifier:g,manageWindowMovement:Boolean(e.location)}),!r.data||r.data.name!==g.name)return;if("closed"===r.data.state)return;P.transmit(`${e.name}.onSpawned`,g);const u=null===(a=null===(o=null===(s=null===(i=null==t?void 0:t.descriptor)||void 0===i?void 0:i.customData)||void 0===s?void 0:s.appConfig)||void 0===o?void 0:o.hostManifests)||void 0===a?void 0:a.Finsemble;!0!==(null==u?void 0:u.waitForInitialization)&&A.publishBootStatus(t.componentType,"components","completed"),P.unsubscribe(v)}));e.location&&this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"hookWindow",uuid:t.uuid}))}unRegisterAllWindows(){if(fe.system.debug("Assimilation.AssimilationWindowManager.unRegisterAllWindows:"),Object.keys(this.activeWindows).length>0)for(const e in this.activeWindows)this.activeWindows[e].unRegisterWithDocking();this.activeWindows={}}spawnWindow(e){fe.system.debug("Assimilation.AssimilationWindowManager.spawnWindow:",e);const t=this.assimilationHelper.manifest.useFeaSpawn,n=e.descriptor.customData.window.hasOwnProperty("useFeaSpawn")?e.descriptor.customData.window.useFeaSpawn:t;if(e.descriptor.alias)return n?this._spawnByAlias(e):this._SpawnByAlias(e);n?this._spawnByPathThroughContainer(e):this._spawnByPath(e)}async saveWindow(e){var t,n,r,i,s,o,a,u,l,d,c,p;fe.system.debug("Assimilation.AssimilationWindowManager.saveWindow:",e);const f=this.getWindowByUUID(e.data.key);if(f&&(e.data.location&&(f.location=e.data.location,f.location.width||(f.location.width=f.location.right-f.location.left),f.location.height||(f.location.height=f.location.bottom-f.location.top),f.descriptor.defaultLeft=f.location.left,f.descriptor.defaultTop=f.location.top,f.descriptor.defaultWidth=f.location.width,f.descriptor.defaultHeight=f.location.height,f.descriptor.defaultRight=f.location.left+f.location.width,f.descriptor.defaultBottom=f.location.top+f.location.height,f.descriptor.left=f.location.left,f.descriptor.top=f.location.top,f.descriptor.width=f.location.width,f.descriptor.height=f.location.height,f.descriptor.right=f.descriptor.defaultRight,f.descriptor.bottom=f.descriptor.defaultBottom),f.descriptor.cacheLocation=f.restoreBounds,e.data.options&&e.data.options.autoShow&&(f.descriptor.autoShow=e.data.options.autoShow),f.descriptor=Object.assign(f.descriptor,e.data),f.descriptor.customData&&delete f.descriptor.customData.manifest,delete f.descriptor.url,!f.outsideOfFinsemble&&!0===(null===(r=null===(n=null===(t=null==f?void 0:f.descriptor)||void 0===t?void 0:t.customData)||void 0===n?void 0:n.window)||void 0===r?void 0:r.addToWorkspace))){const e=await ks.cleanupState(f.descriptor);if("NativeWindow"===f.descriptor.windowType){const t=null===(i=null==f?void 0:f.descriptor)||void 0===i?void 0:i.customData;null===(p=null!==(u=null===(a=null===(o=null===(s=null==t?void 0:t.foreign)||void 0===s?void 0:s.services)||void 0===o?void 0:o.workspaceService)||void 0===a?void 0:a.persistArguments)&&void 0!==u?u:null===(c=null===(d=null===(l=null==t?void 0:t.foreign)||void 0===l?void 0:l.services)||void 0===d?void 0:d.workspace)||void 0===c?void 0:c.persistArguments)||void 0===p||p||(fe.system.debug("Assimilation.AssimilationWindowManager.saveWindow: Deleting arguments property because 'persistArguments` is false"),delete e.arguments)}try{await Ms({windowName:f.descriptor.name,state:{windowData:e}})}catch(e){fe.system.warn("AssimilationWindowManager setWindowState",e)}}}setFloatingTitlebar(e){this.floatingTitlebar=e}getFloatingTitlebar(){return this.floatingTitlebar}updateActiveWindowHeartbeats(){setInterval((()=>{for(const e in this.activeWindows){const t=this.activeWindows[e];t.descriptor&&!t.descriptor.isWPF&&P.transmit("Finsemble.heartbeat",{type:"component",windowName:t.windowName})}}),1e3)}updateCmdArgumentsByWindowDescriptor(e,t){return t&&e?(void 0!==(null==t?void 0:t.defaultLeft)&&(e=e.replace(/"left=\d+"/,`"left=${t.defaultLeft}"`)),void 0!==(null==t?void 0:t.defaultTop)&&(e=e.replace(/"top=\d+"/,`"top=${t.defaultTop}"`)),void 0!==(null==t?void 0:t.defaultWidth)&&(e=e.replace(/"width=\d+"/,`"width=${t.defaultWidth}"`)),void 0!==(null==t?void 0:t.defaultHeight)&&(e=e.replace(/"height=\d+"/,`"height=${t.defaultHeight}"`)),fe.system.debug("Assimilation.AssimilationWindowManager.updateCmdArgumentsByWindowDescriptor:","new arguments",e),e):e}_spawnByPath(e){fe.system.log("Assimilation.AssimilationWindowManager._spawnByPath:",e);const t=p()();e.ref=t,this.awaitingAssimilationSpawn[t]=e;const n=e.descriptor.generatedArguments||e.descriptor.arguments,i={topic:"openNewApp",env:e.descriptor.env,path:e.descriptor.generatedPath||e.descriptor.path,arguments:this.updateCmdArgumentsByWindowDescriptor(n,e.descriptor),autoShow:!e.descriptor.hasOwnProperty("autoShow")||e.descriptor.autoShow,alwaysOnTop:!!e.descriptor.hasOwnProperty("alwaysOnTop")&&e.descriptor.alwaysOnTop,spawnDefaultViewer:!!e.descriptor.hasOwnProperty("spawnDefaultViewer")&&e.descriptor.spawnDefaultViewer,ref:t,location:{left:e.descriptor.defaultLeft,top:e.descriptor.defaultTop,height:e.descriptor.defaultHeight,width:e.descriptor.defaultWidth},windowTitleWhiteList:r()(e,"descriptor.customData.window.windowTitleWhiteList"),windowTitleBlackList:r()(e,"descriptor.customData.window.windowTitleBlackList"),windowSpawnTimeout:r()(e,"descriptor.customData.window.options.windowSpawnTimeout")||r()(e,"descriptor.customData.window.windowSpawnTimeout")},s=JSON.stringify(i);fe.system.log("Assimilation.AssimilationWindowManager._spawnByPath:json:",s),this.sendSocketMessage(s)}_SpawnByAlias(e){fe.system.log("Assimilation.AssimilationWindowManager._SpawnByAlias:",e);const t=p()();e.ref=t,this.awaitingAssimilationSpawn[t]=e;const n=this.assimilationHelper.findAssetByAlias(e.descriptor.alias||e.descriptor.generatedPath||e.descriptor.path);if(!n)return fe.system.error("The alias or path for this asset is missing",e.descriptor.alias);const i=e.descriptor.generatedArguments||e.descriptor.arguments,s={topic:"openAssetApp",alias:n.alias,env:e.descriptor.env,arguments:this.updateCmdArgumentsByWindowDescriptor(i,e.descriptor),version:n.version,target:n.target,autoShow:!e.descriptor.hasOwnProperty("autoShow")||e.descriptor.autoShow,spawnDefaultViewer:!!e.descriptor.hasOwnProperty("spawnDefaultViewer")&&e.descriptor.spawnDefaultViewer,ref:t,location:{left:e.descriptor.defaultLeft,top:e.descriptor.defaultTop,height:e.descriptor.defaultHeight,width:e.descriptor.defaultWidth},windowTitleWhiteList:r()(e,"descriptor.customData.window.windowTitleWhiteList"),windowTitleBlackList:r()(e,"descriptor.customData.window.windowTitleBlackList"),windowSpawnTimeout:r()(e,"descriptor.customData.window.options.windowSpawnTimeout")||r()(e,"descriptor.customData.window.windowSpawnTimeout")},o=JSON.stringify(s);fe.system.log("Assimilation.AssimilationWindowManager._SpawnByAlias:json:",o),this.sendSocketMessage(o)}_spawnByPathThroughContainer(e){fe.system.log("Assimilation.AssimilationWindowManager._spawnByPath:",e);const t=p()();e.ref=t,e.spawnedByFea=!0,this.awaitingSpawn[t]=e;const n=e.descriptor.generatedArguments||e.descriptor.arguments;x.launchExternalProcess({path:e.descriptor.generatedPath||e.descriptor.path,arguments:this.updateCmdArgumentsByWindowDescriptor(n,e.descriptor),listener:t=>{"exited"===t.topic?(this.removeWindow(e.uuid,!0),fe.system.log("Assimilation.AssimilationWindowManager:Exited External Process",t)):fe.system.log("Assimilation.AssimilationWindowManager:Running External Process",t)}},(t=>{e.finUUID=t.uuid}),(e=>{fe.system.error("Error in spawnByPath",e)}))}_spawnByAlias(e){fe.system.log("Assimilation.AssimilationWindowManager._spawnByAlias:",e);const t=p()();e.ref=t,e.spawnedByFea=!0,e.appAsset=this.assimilationHelper.findAssetByAlias(e.descriptor.alias),this.awaitingSpawn[t]=e;const n=e.descriptor.generatedArguments||e.descriptor.arguments;x.launchExternalProcess({alias:e.descriptor.alias,arguments:this.updateCmdArgumentsByWindowDescriptor(n,e.descriptor),listener:t=>{"exited"===t.topic?(this.removeWindow(e.uuid,!0),fe.system.log("Assimilation.AssimilationWindowManager:Exited External Process",t)):fe.system.log("Assimilation.AssimilationWindowManager:Running External Process",t)}},(t=>{e.finUUID=t.uuid}),(e=>{fe.system.error(e)}))}}class xs{constructor(e){this.appAssets=e.appAssets,this.manifest=e.manifest,this.blacklist=this.manifest.blacklist.map((e=>e.toUpperCase())),this.whitelist=this.manifest.whitelist.map((e=>e.toUpperCase()))}canHookWindow(e){const t=this.manifest.onlySpawned;return!(t&&!e.descriptor||(t&&e.descriptor&&!this.checkBlacklist(e)?(ye.system.debug("Assimilation.canHookWindow: true"),0):this.checkBlacklist(e)?(ye.system.debug("Assimilation.canHookWindow: false (in disallow list)"),1):this.checkWhitelist(e)?(ye.system.debug("Assimilation.canHookWindow: true (in allow list)"),0):0!==this.whitelist.length))}executableInConfig(e,t){if(!e.executablePath)return t("not found",!1);const n=e.executablePath.replace(/^.*[\\\/]/,"").toUpperCase();ee.get(["finsemble","components"],((r,i)=>{const s=Object.keys(i);for(let r=0;r<s.length;r++){const o=i[s[r]];if(o.window&&o.window.path){const r=o.window.path.replace(/^.*[\\\/]/,"").toUpperCase();if(e.executablePath&&r===n)return t(null,!0)}}return this.executableInAssets(e,t)}))}executableInAssets(e,t){for(let n=0;n<this.appAssets.length;n++)if(this.appAssets[n].target.toUpperCase()===e.executablePath.replace(/^.*[\\\/]/,"").toUpperCase())return t(null,!0);return t(null,!1)}checkBlacklist(e){if(!e.windowName)return!1;if(this.blacklist.length>0&&this.blacklist.includes(e.windowName.toUpperCase()))return!0;for(let t=0;t<this.blacklist.length;t++){const n=new RegExp(`^.*\\${this.blacklist[t]}$`);if(n.test(e.windowName.toUpperCase()))return!1;if(e.executablePath&&n.test(e.executablePath.toUpperCase()))return!1}return!1}checkWhitelist(e){if(!e.windowName)return!1;for(let t=0;t<this.whitelist.length;t++){const n=new RegExp(`^.*\\${this.whitelist[t]}$`);if(n.test(e.windowName.toUpperCase()))return!0;if(e.executablePath&&n.test(e.executablePath.toUpperCase()))return!0}return!1}prepareAction(e){const t=p()();e.ref=t;const n=JSON.stringify(e);return e.expiry=Date.now()+3e3,n}findAssetByAlias(e){if(!Array.isArray(this.appAssets))return null;for(let t=0;t<this.appAssets.length;t++)if(this.appAssets[t].alias===e||this.appAssets[t].path===e)return this.appAssets[t];return null}}class Fs extends et.EventEmitter{constructor(e){super(),this.ws=null,this.port=e||8392}connect(){if(this.ws&&(0===this.ws.readyState||1===this.ws.readyState))return;if(this.ws&&2===this.ws.readyState){const e=setTimeout((()=>{clearTimeout(e),this.connect()}),1e3);return}ye.system.debug("Assimilation connecting to :",`ws://127.0.0.1:${this.port}`);const e=this.ws=new WebSocket(`ws://127.0.0.1:${this.port}`);e.onopen=()=>{ye.system.debug("Assimilation connected to socket"),this.emit("socketOpen")},e.onerror=e=>{this.emit("socketError",e)},e.onmessage=e=>{let t;try{if(t=JSON.parse(e.data),!(null==t?void 0:t.topic))return}catch(t){ye.system.error("Assimilation:Socket.onMessage:err:",t,e)}return this.emit(t.topic,t)},e.onclose=()=>{this.emit("socketClosed"),ye.system.log("SERVICE LIFECYCLE:Web socket closed")}}send(e){(!this.ws||this.ws.readyState>1)&&this.connect(),this.ws&&1===this.ws.readyState?this.ws.send(e):this.on("socketOpen",(()=>this.send(e)))}}const{REMOTE_FOCUS:Bs}=mt,qs=e=>r()(e,"window.descriptor.isWPF",r()(e,"descriptor.isWPF"));class Us extends Fs{constructor(e,t){super(),this.notifySocketConnectionFailure=!1,this.port=e.port,this.manifest=e,this.assimilationWindowManager=t,this.setupListeners(),this.keyboard={}}setupListeners(){this.addListener("startMove",this.onWindowStartMove.bind(this)),this.addListener("moveUpdate",this.onWindowMoveUpdate.bind(this)),this.addListener("moveEnd",this.onMoveEnd.bind(this)),this.addListener("windowClicked",this.onWindowClicked.bind(this)),this.addListener("locationResponse",this.onLocationResponse.bind(this)),this.addListener("addWindow",this.onAddWindow.bind(this)),this.addListener("removeWindow",this.onRemoveWindow.bind(this)),this.addListener("applicationList",this.onApplicationList.bind(this)),this.addListener("keyDown",this.onKeyDown.bind(this)),this.addListener("keyUp",this.onKeyUp.bind(this)),this.addListener("focus",this.onWindowFocused.bind(this)),this.addListener("maximize",this.onWindowMaximize.bind(this)),this.addListener("restore",this.onWindowRestore.bind(this)),this.addListener("minimize",this.onWindowMinimize.bind(this)),this.addListener("openNewApp",this.onNewApp.bind(this)),this.addListener("openAssetApp",this.onNewApp.bind(this)),this.addListener("socketError",this.onSocketError.bind(this)),this.addListener("socketClosed",this.onSocketClosed.bind(this)),this.addListener("socketOpen",this.onSocketOpened.bind(this)),this.addListener("closeWindow",this.onCloseWindow.bind(this)),this.addListener("getBounds",this.onGetBoundsReturned.bind(this)),this.addListener("hookWindow",this.onWindowHooked.bind(this)),this.addListener("onLog",this.onLog.bind(this))}onGetBoundsReturned(e){fe.system.verbose("APPLICATION LIFECYCLE:Assimilation:onGetBoundsReturned",e.ref,e),P.transmit(`${e.ref}-Assimilation.boundsUpdate`,e)}onWindowHooked(e){var t;const n=this.assimilationWindowManager.getWindowByUUID(e.uuid);(null===(t=null==n?void 0:n.descriptor)||void 0===t?void 0:t.alwaysOnTop)&&this.assimilationWindowManager.alwaysOnTop({data:{alwaysonTop:n.descriptor.alwaysOnTop,key:e.uuid}})}onLog(e){let{type:t="warn",content:n}=e;"function"==typeof fe.system[t]?fe.system[t](`Assimilation EXE: ${n}`):fe.system.warn(`Assimilation unable to log type ${t} from EXE. Defaulting to warn: ${n}`)}onNewApp(e){if(fe.system.info("APPLICATION LIFECYCLE:Assimilation:openNewApp",e),e.error&&!e.error.startsWith("The operation completed successfully"))return fe.system.error(e.error);try{const t=JSON.parse(e.window),n=this.assimilationWindowManager.updateSpawningWindow(e.ref,t.uuid);this.assimilationWindowManager.handleSpawnComplete(n,t)}catch(e){return void fe.system.error("No Window found. Either the executable path is wrong or it has no window")}}onCloseWindow(e){const{uuid:t}=e.data?JSON.parse(e.data):e,n=this.assimilationWindowManager.getWindowByUUID(t);n&&(P.transmit("assimilation.WindowEventStream",{eventName:"closed",windowName:n.name,open:!1}),fe.system.debug("APPLICATION LIFECYCLE:Assimilation:closeWindow",e))}onWindowStartMove(e){fe.system.debug("APPLICATION LIFECYCLE:Assimilation:onWindowStartMove",e),e.uuid?this.assimilationWindowManager.setMovingWindow(this.assimilationWindowManager.getWindowByUUID(e.uuid)).setStartBounds(e):fe.system.error("window is missing uuid",e)}onWindowMoveUpdate(e){fe.system.debug("APPLICATION LIFECYCLE:Assimilation:onWindowMoveUpdate",e);const t=this.assimilationWindowManager.getMovingWindow();t&&(t.calculateWindowLocation(e),P.transmit(`AssimilationService.bounds-change-request.${null==t?void 0:t.window.name}`,{...t.location}))}onWindowMaximize(e){var t,n,r,i;fe.system.info("APPLICATION LIFECYCLE:Assimilation:onWindowMaximize",e);const{uuid:s}=e.data?JSON.parse(e.data):e,o=this.assimilationWindowManager.getWindowByUUID(s);if(!o)return;const a={height:(null===(t=null==o?void 0:o.cachedLocation)||void 0===t?void 0:t.height)||600,width:(null===(n=null==o?void 0:o.cachedLocation)||void 0===n?void 0:n.width)||800,x:(null===(r=null==o?void 0:o.cachedLocation)||void 0===r?void 0:r.left)||0,y:(null===(i=null==o?void 0:o.cachedLocation)||void 0===i?void 0:i.top)||0};o.maximize({fromAssimilation:!0}),P.transmit("assimilation.WindowEventStream",{eventName:"maximize",windowName:o.name,windowState:"maximized",normalBounds:a})}onWindowMinimize(e){fe.system.info("APPLICATION LIFECYCLE:Assimilation:onWindowMinimize",e);const{uuid:t}=e.data?JSON.parse(e.data):e,n=this.assimilationWindowManager.getWindowByUUID(t);n&&(n.cachedLocation={...n.location},n.minimize({fromAssimilation:!0}),P.transmit("assimilation.WindowEventStream",{eventName:"minimize",windowName:n.name,windowState:"minimized"}))}onWindowRestore(e){var t,n,r,i;fe.system.info("APPLICATION LIFECYCLE:Assimilation:onWindowRestore",e);const{uuid:s}=e.data?JSON.parse(e.data):e,o=this.assimilationWindowManager.getWindowByUUID(s);if(!o)return;const a=o.windowState===dt.MAXIMIZED||"maximize"===o.state?"unmaximize":"restore";P.transmit("assimilation.WindowEventStream",{eventName:a,windowName:o.name,bounds:{height:(null===(t=null==o?void 0:o.cachedLocation)||void 0===t?void 0:t.height)||600,width:(null===(n=null==o?void 0:o.cachedLocation)||void 0===n?void 0:n.width)||800,x:(null===(r=null==o?void 0:o.cachedLocation)||void 0===r?void 0:r.left)||0,y:(null===(i=null==o?void 0:o.cachedLocation)||void 0===i?void 0:i.top)||0},windowState:"normal"}),o.state="restore",Date.now()-o.lastMinimized<this.assimilationWindowManager.assimilationHelper.manifest.eventIgnore||o.restore({fromAssimilation:!0})}onWindowFocused(e){fe.system.debug("APPLICATION LIFECYCLE:Assimilation:onWindowFocused",e);const t=JSON.parse(e.data),n=this.assimilationWindowManager.getWindowByUUID(t.uuid),r={name:n&&n.name||t.name,windowHandle:t.uuid};P.transmit(Bs,r),n&&setTimeout((()=>{"minimize"!==n.state&&(Date.now()-n.lastRestored<this.assimilationWindowManager.assimilationHelper.manifest.eventIgnore||n.focus({fromAssimilation:!0}))}),this.assimilationWindowManager.assimilationHelper.manifest.focusDelay)}onRemoveWindow(e){const t=JSON.parse(e.window);this.assimilationWindowManager.removeWindow(t.uuid,!0)}onWindowClicked(e){fe.system.debug("APPLICATION LIFECYCLE:Assimilation:onWindowClicked",e);const t=JSON.parse(e.data);this.onWindowFocused(e);const n=this.assimilationWindowManager.getWindowByUUID(t.uuid);if(n&&!qs(n)){if(this.keyboard[162]){const e=n.windowName;P.query("DockingService.getGroupObjectsForWindow",{name:e},((t,n)=>{let r=!1;for(let e=0;e<n.data.length;e++)if(n.data[e].isMovable){r=!0;break}return r?P.query("DockingService.leaveGroup",{name:e},(()=>{})):P.transmit("DockingService.formGroup",{windowName:e})}))}}else fe.system.debug("APPLICATION LIFECYCLE:Assimilation:onWindowClicked no window found for window UUID",t.uuid)}onApplicationList(e){fe.system.debug("APPLICATION LIFECYCLE:Assimilation:onApplicationList",e),this.assimilationWindowManager.parseApplicationList(e.list)}onLocationResponse(e){if(!e.window)return;const t=JSON.parse(e.window),n=this.assimilationWindowManager.getWindowByUUID(t.uuid);n&&P.transmit("DockingService.updateWindowLocation",{windowName:n.windowName,location:{left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top}})}onAddWindow(e){const t=JSON.parse(e.window);t.uuid&&(fe.system.debug("Assimilation.AssimilationWindowManager.onAddWindow invoking addNativeWindow:",t),this.assimilationWindowManager.addNativeWindow(t))}onMoveEnd(e){fe.system.info("moveEnd",e);const t=this.assimilationWindowManager.getMovingWindow();if(t){if(this.keyboard[162]&&!qs(t)){if(t.window.grouped)return P.query("DockingService.leaveGroup",{name:t.window.windowName},(()=>{}));P.transmit("DockingService.formGroup",{windowName:t.window.windowName})}e.location=t.window.location,P.transmit(`${t.window.name}.endMovement`,e),this.assimilationWindowManager.saveWindow({data:{key:t.window.uuid,location:t.window.location}})}}onKeyUp(e){fe.system.verbose("APPLICATION LIFECYCLE:Assimilation:onKeyUp",e),e.key=Number(e.key),clearTimeout(this.keyboard[e.key]),delete this.keyboard[e.key],160===e.key&&(self.shift=!1),P.transmit("finsemble.assimilation.keyup",{key:e.key})}onKeyDown(e){fe.system.verbose("APPLICATION LIFECYCLE:Assimilation:onKeyDown",e),e.key=Number(e.key),this.keyboard[e.key]&&clearTimeout(this.keyboard[e.key]),this.keyboard[e.key]=setTimeout((()=>this.onKeyUp(e)),this.manifest.hotkeyTimeout),160===e.key&&(self.shift=!0),P.transmit("finsemble.assimilation.keydown",{key:e.key})}onSocketConnected(e=Function.prototype){this.enableAppHooks(),this.getMonitorInfo(),this.connectCallback&&(this.notifySocketConnectionFailure=!0,this.connectCallback({connected:!0,error:null}),this.connectCallback=null),e()}onSocketError(e){fe.system.log("APPLICATION LIFECYCLE:Assimilation:onSocketError",e);const t=setTimeout((()=>{clearTimeout(t),this.connectCallback&&this.notifySocketConnectionFailure&&this.connectCallback({error:e,connected:!1}),this.notifySocketConnectionFailure=!1,this.connect()}),5e3)}onSocketClosed(){fe.system.log("APPLICATION LIFECYCLE:Assimilation:onSocketClosed"),this.connect()}onSocketOpened(){fe.system.log("APPLICATION LIFECYCLE:Assimilation:onSocketOpened"),clearTimeout(this.wsConnectionFailureTimeout),this.onSocketConnected()}setThrottle(e){fe.system.log("APPLICATION LIFECYCLE:Assimilation:enable move throttle",e),this.send(this.prepareAction({topic:"throttle",throttle:e}))}enableAppHooks(){fe.system.info("APPLICATION LIFECYCLE:Assimilation:Enable Assimilation hooks"),this.send(this.prepareAction({topic:"enableHooks",data:{whitelist:[],blacklist:[]}}))}connect(e){fe.system.debug("APPLICATION LIFECYCLE:Assimilation:connect to websocket"),e&&(this.connectCallback=e),this.ws&&this.ws.readyState<2||(this.wsConnectionFailureTimeout||(this.wsConnectionFailureTimeout=window.setTimeout((()=>{console.error("APPLICATION LIFECYCLE: STARTUP: Assimilation service failed to connect to websocket within 7500 milliseconds"),fe.system.error("APPLICATION LIFECYCLE: STARTUP: Assimilation service failed to connect to websocket within 7500 milliseconds"),this.notifySocketConnectionFailure=!1,this.connectCallback&&this.connectCallback({connected:!1,error:"Unable to connect to websocket"})}),7500)),super.connect())}prepareAction(e){const t=p()();e.ref=t;const n=JSON.stringify(e);return e.expiry=Date.now()+3e3,n}getMonitorInfo(){fe.system.debug("APPLICATION LIFECYCLE:Assimilation:getMonitorInfo"),x.getMonitorInfo((e=>{this.send(JSON.stringify({topic:"monitorInfo",data:e}))}))}setMonitorInfo(e){fe.system.debug("APPLICATION LIFECYCLE:Assimilation:setMonitorInfo"),this.send(JSON.stringify({topic:"monitorInfo",data:e}))}getApplicationList(){this.send(this.prepareAction({topic:"applicationList"}))}}fe.start(),new class extends nr{constructor(e){super({name:e,startupDependencies:{},shutdownDependencies:{services:["windowService"]}}),this.assimilationWindowManager=null,this.port=8392,this.readyFunction=null,this.appAssets=null,this.assimilationManifest=null,this.fullManifest=null,this.configCache={},this.uuidByName={},this.ws=null,this.version="",this.assimilationHelper=null,this.serverAddress="",this.routerClient=P,this.load=this.load.bind(this),this.getApplicationList=this.getApplicationList.bind(this),this.onBaseServiceReady((async e=>{fe.system.debug("assimilation.onBaseServiceReady"),x.getFEAInfo((e=>{this.version=e.FEA})),P.addPubSubResponder(/.*humanInterface.*/,{}),A.waitForBootStage("earlyuser","stageEntered",this.getApplicationList),await this.load()?this.readyFunction=e:e()})),this.start()}convertHandle(e){let t=e.replace("native@0x","").toUpperCase();return t=`00000000${t}`,t=t.substring(t.length-8),t}registerFreestandingWindow(e){const t=e.windowHandle?this.convertHandle(e.windowHandle):e.windowName;P.query("Finsemble.NewNativeWindow",{appUUID:t,name:e.windowName,appName:e.appName,windowType:"NativeWindow"},(async()=>{var n;if(e.windowHandle){const{wrap:r}=await es.getInstance({name:e.windowName,windowType:"NativeWindow"});r.uuid=t,r.outsideOfFinsemble=!0,null!==(n=r.descriptor)&&void 0!==n||(r.descriptor={}),this.assimilationWindowManager.activeWindows[t]=r;const i=`${Date.now()}_${Math.random()}`;P.addListener(`${i}-Assimilation.boundsUpdate`,((e,t)=>{this.assimilationWindowManager.handleSpawnComplete(r,null==t?void 0:t.data)}));const{bounds:s}=e;s?(s.top=Number.parseInt(null==s?void 0:s.top)||0,s.left=Number.parseInt(null==s?void 0:s.left)||0,s.height=Number.parseInt(null==s?void 0:s.height)||600,s.width=Number.parseInt(null==s?void 0:s.width)||800,s.right=s.left+s.width,s.bottom=s.top+s.height,this.assimilationWindowManager.handleSpawnComplete(r,s)):this.assimilationWindowManager.sendSocketMessage(JSON.stringify({handle:t,ref:i,uuid:r.uuid,topic:"getBounds"}))}}))}createRouterEndpoints(){P.addResponder("Assimilation.setMonitorInfo",((e,t)=>{let n=null;if(this.ws)try{this.ws.setMonitorInfo(null==t?void 0:t.data)}catch(e){n=new Error(`assimilation_setMonitorInfo_failed - ${e.message}`)}else n=new Error("assimilation_missing_socket_connection - Assimilation socket connection does not exist, cannot set Monitor Info");n?null==t||t.sendQueryResponse(n,null):null==t||t.sendQueryResponse(null,null)})),P.addResponder("Assimilation.alwaysOnTop",((e,t)=>{this.assimilationWindowManager.alwaysOnTop(t),null==t||t.sendQueryResponse(null,null)})),P.addResponder("Assimilation.moveWindow",((e,t)=>{this.assimilationWindowManager.moveWindow(null==t?void 0:t.data,this.ws),null==t||t.sendQueryResponse(null,null)})),P.addListener("Assimilation.saveWindow",((e,t)=>{this.assimilationWindowManager.saveWindow(t)})),P.addResponder("Assimilation.showWindow",((e,t)=>{this.assimilationWindowManager.showWindow(t),null==t||t.sendQueryResponse(null,null)})),P.addResponder("Assimilation.maximizeWindow",((e,t)=>{this.assimilationWindowManager.maximizeWindow(t),null==t||t.sendQueryResponse(null,null)})),P.addResponder("Assimilation.restoreWindow",((e,t)=>{this.assimilationWindowManager.restoreWindow(t),null==t||t.sendQueryResponse(null,null)})),P.addResponder("Assimilation.minimizeWindow",((e,t)=>{this.assimilationWindowManager.minimizeWindow(t),null==t||t.sendQueryResponse(null,null)})),P.addResponder("Assimilation.hideWindow",((e,t)=>{this.assimilationWindowManager.hideWindow(t),null==t||t.sendQueryResponse(null,null)})),P.addResponder("Assimilation.dockWindow",((e,t)=>{this.assimilationWindowManager.dockWindow(t),null==t||t.sendQueryResponse(null,null)})),P.addResponder("Assimilation.undockWindow",((e,t)=>{this.assimilationWindowManager.undockWindow(t),null==t||t.sendQueryResponse(null,null)})),P.addResponder("Assimilation.bringToFront",((e,t)=>{this.assimilationWindowManager.bringToFront(t),null==t||t.sendQueryResponse(null,null)})),P.addResponder("Assimilation.closeWindow",((e,t)=>{this.assimilationWindowManager.closeWindow(t)})),P.addListener("Assimilation.hookWindowByHandle",((e,t)=>{this.assimilationWindowManager.updateSpawningWindowFromWindowObject(t)})),P.addResponder("Assimilation.getWindowLocation",((e,t)=>{if(!(null==t?void 0:t.data.windowName))return null==t?void 0:t.sendQueryResponse(null,null);const n=this.assimilationWindowManager.getWindowByName(t.data.windowName);if(!n)return null==t?void 0:t.sendQueryResponse("no window found");if(n.outsideOfFinsemble||t.data.force){const e=`${Date.now()}_${Math.random()}`;P.addListener(`${e}-Assimilation.boundsUpdate`,((e,n)=>{null==t||t.sendQueryResponse(null,{location:null==n?void 0:n.data})})),this.assimilationWindowManager.sendSocketMessage(JSON.stringify({ref:e,uuid:n.uuid,topic:"getBounds"}))}else null==t||t.sendQueryResponse(null,{location:n.location})})),P.addResponder("Assimilation.spawnNative",((e,t)=>{t&&this.spawnAsset(this.constructNativeWindowParams(t),(()=>{null==t||t.sendQueryResponse(e,!0)}))})),P.addListener("Assimilation.windowClosed",((e,t)=>{fe.system.debug("APPLICATION LIFECYCLE:Assimilation:windowClosed",t)})),P.addListener("Finsemble.Assimilation.register",((e,t)=>{var n,r,i,s,o,a;const u=null==t?void 0:t.data,l=this.assimilationWindowManager.awaitingAssimilationSpawn;let d=!0;for(const e in l)if(l[e].name==u.windowName){if(d=!1,u.windowHandle){const t=this.convertHandle(u.windowHandle),l=this.assimilationWindowManager.updateSpawningWindow(e,t),d={left:null===(n=l.descriptor)||void 0===n?void 0:n.left,top:null===(r=l.descriptor)||void 0===r?void 0:r.top,right:null===(i=l.descriptor)||void 0===i?void 0:i.right,bottom:null===(s=l.descriptor)||void 0===s?void 0:s.bottom,width:null===(o=l.descriptor)||void 0===o?void 0:o.width,height:null===(a=l.descriptor)||void 0===a?void 0:a.height};this.assimilationWindowManager.handleSpawnComplete(l,d)}else{const t=this.assimilationWindowManager.updateSpawningWindow(e,null);this.assimilationWindowManager.handleSpawnComplete(t,null)}break}const c=Object.keys(this.assimilationWindowManager.activeWindows).find((e=>this.assimilationWindowManager.activeWindows[e].windowName===u.windowName));d&&c&&(d=!1),d&&u.processId?(fe.system.error(`The spawned ${u.windowName} window doesn't have the expected windowName property. Please ensure that windowName received from Finsemble as command line args is passed to the constructor without changes.`),fe.system.warn(`The spawned ${u.windowName} window has been registered as freestanding.`)):d&&this.registerFreestandingWindow(u)}))}shouldHideTitleBar(e,t){var n;return!!e||r()(t,"customData.foreign.services.assimilationService.hideTitleBar",null===(n=this.assimilationHelper)||void 0===n?void 0:n.manifest.hideTitleBars)}constructNativeWindowParams(e){let t=e.data;const n=t.isWPF||r()(t,"customData.window.argumentsAsQueryString");return t.hideTitleBar=this.shouldHideTitleBar(n,t),n&&(t={params:t,...this.getArgumentsWPF(e)},t.spawnDefaultViewer=!0),this.constructPath(t),t}getArgumentsWPF(e){var t,n;const r={...e.data};r.generatedArguments=r.arguments||"",this.uuidByName[r.name]||(this.uuidByName[r.name]=`uuid${Date.now()}_${Math.round(1e4*Math.random())}`),r.uuid||(r.uuid=this.uuidByName[r.name]);const i=new Map([["finsembleWindowName",r.name],["componentType",r.customData.component.type],["uuid",this.uuidByName[r.name]],["left",r.defaultLeft],["top",r.defaultTop],["width",r.defaultWidth],["height",r.defaultHeight],["iac",!0],["serverAddress",this.serverAddress],["hostType","finsemble"]]);return(null===(n=null===(t=r.customData)||void 0===t?void 0:t.appConfig)||void 0===n?void 0:n.appId)&&i.set("appId",r.customData.appConfig.appId),r.path&&r.customData.window.argumentsAsQueryString?i.forEach(((e,t)=>{r.generatedArguments=`${r.generatedArguments}&${t}=${e}`})):i.forEach(((e,t)=>{r.generatedArguments=`${r.generatedArguments} "${t}=${e}"`})),r.alias||r.path||(r.path=r.customData.window.path,r.alias=r.customData.window.alias),r.componentType=r.customData.component.type,this.configCache[r.name]=r,r}constructPath(e){if(void 0===e.path||e.customData&&e.customData.window&&!1===Boolean(e.customData.window.argumentsAsQueryString))return;const t=new URL(e.path),n=new URLSearchParams(e.generatedArguments),r=new URLSearchParams("");[...t.searchParams.entries(),...n.entries()].forEach((function(e){r.append(e[0],e[1])})),t.search=r.toString(),e.generatedPath=t.toString(),e.generatedArguments=""}launchAssimilationExe(){x.launchExternalProcess({alias:"assimilation",arguments:`PORT=${this.port}`,listener:e=>{"exited"===e.topic?(fe.system.log("APPLICATION LIFECYCLE:Exited Assimilation Process",e),fe.system.debug("APPLICATION LIFECYCLE:Exited Assimilation Process")):(fe.system.log("APPLICATION LIFECYCLE:Running Assimilation Process",e),fe.system.debug("APPLICATION LIFECYCLE:Running Assimilation Process"))}},(e=>{fe.system.log("APPLICATION LIFECYCLE:Assimilation process successfully launched"),fe.system.debug("APPLICATION LIFECYCLE:Assimilation process successfully launched",e.uuid),this.connectSockets()}),(e=>{this.notifyAssimilationLaunchFailure(e),this.readyFunction&&this.readyFunction()}))}async getAllConfigs(){var e;const{err:t,data:n}=await X.getManifest();if(!t&&n){this.fullManifest=n;const t=null==n?void 0:n.finsemble.services.assimilationService.config,r=null==n?void 0:n.finsemble.servicesConfig.assimilation,i=null==n?void 0:n.finsemble.betaFeatures.assimilation;i&&fe.system.error("Assimilation is no longer a beta feature. Move assimilation under serviceConfigs."),this.assimilationManifest=Object.assign(t,r||i),this.appAssets=null!==(e=null==n?void 0:n.appAssets)&&void 0!==e?e:null,this.assimilationHelper=new xs({appAssets:null==n?void 0:n.appAssets,manifest:this.assimilationManifest}),this.assimilationWindowManager=new Ds(this.assimilationHelper);const s="ws://127.0.0.1:3376";this.serverAddress=Pt.getDefault(n,"fullManifest.finsemble.router.transportSettings.FinsembleTransport.serverAddress",s)}}async load(){var e;fe.system.debug("APPLICATION LIFECYCLE:Assimilation:load"),await this.getAllConfigs();const t=this.assimilationManifest;return(null==t?void 0:t.port)&&(this.port=t.port),t.enabled?-1==navigator.platform.indexOf("Win")?(fe.system.warn("APPLICATION LIFECYCLE:Assimilation disabled due to incompatible platform",navigator.platform),!1):(fe.system.debug("APPLICATION LIFECYCLE:Assimilation: Is Enabled"),(null===(e=this.assimilationHelper)||void 0===e?void 0:e.findAssetByAlias("assimilation"))?(this.assimilationWindowManager.setFloatingTitlebar(r()(this.fullManifest,"finsemble.Window Manager.floatingTitlebarComponent","floatingTitlebar")),this.createRouterEndpoints(),fe.system.log("APPLICATION LIFECYCLE:Assimilation Enabled"),this.launchAssimilationExe(),!0):(I("dev","ONCE-SINCE-STARTUP","assimilationService-not-found","Could not find assimilation asset. Ensure that appAssets is properly formatted in your application's manifest."),fe.system.error("APPLICATION LIFECYCLE:Assimilation Error:","assimilationService-not-found","Could not find assimilation asset. Ensure that appAssets is properly formatted in your application's manifest."),!1)):(fe.system.log("APPLICATION LIFECYCLE:Assimilation Not Enabled"),!1)}onLoggerStateChanged(e){var t,n;let r={topic:"onLogLevel"};["Error","Warn","Log","Info","Debug","Verbose"].forEach((t=>{r[t.toLowerCase()]=e.system[t]})),this.assimilationHelper&&(null===(t=this.ws)||void 0===t||t.send(null===(n=this.assimilationHelper)||void 0===n?void 0:n.prepareAction(r)))}socketConnectionHandler(e){var t,n,r;e.connected?(this.assimilationWindowManager.setWebsocket(this.ws),null===(t=this.ws)||void 0===t||t.setThrottle((null===(n=this.assimilationManifest)||void 0===n?void 0:n.throttle)>=0?null===(r=this.assimilationManifest)||void 0===r?void 0:r.throttle:20)):this.notifyAssimilationLaunchFailure(e.error),this.onLoggerStateChanged(fe.setting()),this.readyFunction&&this.readyFunction()}notifyAssimilationLaunchFailure(e){fe.system.error("Assimilation.launchAssimilationExe Error:",e),X.set(["finsemble","servicesConfig","assimilation","enabled"],!1),P.transmit("assimilation.status.changed",{enabled:!1});const t=new ar,n=new rr;n.buttonText="Dismiss",n.type=ir.DISMISS,t.title="Critical Failure in Assimilation Service",t.details="Assimilation failed To launch. Native applications will not work. Check the Central Logger for additional details.",t.actions=[n],hs.notify(t)}connectSockets(){var e;(null===(e=this.assimilationManifest)||void 0===e?void 0:e.port)&&(this.port=this.assimilationManifest.port),this.ws=new Us(this.assimilationManifest,this.assimilationWindowManager),this.ws.connect(this.socketConnectionHandler.bind(this)),void 0!==fe.onStateChanged&&fe.onStateChanged((e=>{this.onLoggerStateChanged(e)}))}compareVersion(e,t){if(!e)return 1;if(!t)return-1;const n=e.split("."),r=t.split(".");for(let e=0;e<Math.max(n.length,r.length);e++){if(e==n.length&&e==r.length)return 0;if(e>=r.length)return-1;if(e>=n.length)return 1;const t=parseInt(n[e]),i=parseInt(r[e]);if(t>i)return-1;if(i>t)return 1}return 0}spawnAsset(e,t){const n={name:e.name,uuid:e.uuid,componentType:e.componentType,windowType:"NativeWindow",waitForReady:!1};return es.getInstance(n,((n,r)=>{e.minWidth=(null==e?void 0:e.minWidth)>100?e.minWidth:100,e.minHeight=(null==e?void 0:e.minHeight)>25?e.minHeight:25,e.maxWidth=(null==e?void 0:e.maxWidth)>100?e.maxWidth:1/0,e.maxHeight=(null==e?void 0:e.maxHeight)>25?e.maxHeight:1/0,e.maxWidth<e.defaultWidth&&(e.defaultWidth=e.maxWidth),e.minWidth>e.defaultWidth&&(e.defaultWidth=e.minWidth),e.maxHeight<e.defaultHeight&&(e.defaultHeight=e.maxHeight),e.minHeight>e.defaultHeight&&(e.defaultHeight=e.minHeight),e.width<e.minWidth&&(e.width=e.minWidth),e.width>e.maxWidth&&(e.width=e.maxWidth),e.height<e.minHeight&&(e.height=e.minHeight),e.height>e.maxHeight&&(e.height=e.maxHeight);const i=P.addListener(`Finsemble.RegisterInterruptibleEvent.${r.name}`,((e,t)=>{i(),r.closeFinal(r.handleWrapRemoveRequest)}));return e.right=e.left+e.width,e.bottom=e.top+e.height,r.descriptor=e,this.assimilationWindowManager.spawnWindow(r,this.ws),t()}))}getApplicationList(){this.ws&&this.ws.getApplicationList()}}("assimilationService")})()})();
3
3
  //# sourceMappingURL=assimilationService.js.map