@finsemble/finsemble-core 6.6.0-beta.5 → 6.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/configs/core/config.json +2 -2
- package/dist/configs/core/config.json +2 -2
- package/dist/services/Interop/InteropService.js +1 -1
- package/dist/services/assimilation/assimilationService.js +1 -1
- package/dist/services/assimilation/assimilationService.js.map +1 -1
- package/dist/services/router/routerService.js +1 -1
- package/dist/services/window/windowService.js +1 -1
- package/package.json +3 -3
- package/types/services/window/Launcher/createSplinterAndInject.d.ts.map +1 -1
- package/types/services/window/Launcher/launcher.d.ts.map +1 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! For license information please see assimilationService.js.LICENSE.txt */
|
|
2
|
-
(()=>{var e={9996: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 i(e,t){return!1!==t.clone&&t.isMergeableObject(e)?a((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function r(e,t,n){return e.concat(t).map((function(e){return i(e,n)}))}function o(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return e.propertyIsEnumerable(t)})):[]}(e))}function s(e,t){try{return t in e}catch(e){return!1}}function a(e,n,l){(l=l||{}).arrayMerge=l.arrayMerge||r,l.isMergeableObject=l.isMergeableObject||t,l.cloneUnlessOtherwiseSpecified=i;var u=Array.isArray(n);return u===Array.isArray(e)?u?l.arrayMerge(e,n,l):function(e,t,n){var r={};return n.isMergeableObject(e)&&o(e).forEach((function(t){r[t]=i(e[t],n)})),o(t).forEach((function(o){(function(e,t){return s(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,o)||(s(e,o)&&n.isMergeableObject(t[o])?r[o]=function(e,t){if(!t.customMerge)return a;var n=t.customMerge(e);return"function"==typeof n?n:a}(o,n)(e[o],t[o],n):r[o]=i(t[o],n))})),r}(e,n,l):i(n,l)}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 l=a;e.exports=l},17187:e=>{"use strict";var t,n="object"==typeof Reflect?Reflect:null,i=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var r=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(n,i){function r(n){e.removeListener(t,o),i(n)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",r),n([].slice.call(arguments))}g(e,t,o,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&g(e,"error",t,{once:!0})}(e,r)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function u(e,t,n,i){var r,o,s,u;if(a(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),s=o[t]),void 0===s)s=o[t]=n,++e._eventsCount;else if("function"==typeof s?s=o[t]=i?[n,s]:[s,n]:i?s.unshift(n):s.push(n),(r=l(e))>0&&s.length>r&&!s.warned){s.warned=!0;var d=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");d.name="MaxListenersExceededWarning",d.emitter=e,d.type=t,d.count=s.length,u=d,console&&console.warn&&console.warn(u)}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 i={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},r=d.bind(i);return r.listener=n,i.wrapFn=r,r}function f(e,t,n){var i=e._events;if(void 0===i)return[];var r=i[t];return void 0===r?[]:"function"==typeof r?n?[r.listener||r]:[r]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(r):p(r,r.length)}function h(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 p(e,t){for(var n=new Array(t),i=0;i<t;++i)n[i]=e[i];return n}function g(e,t,n,i){if("function"==typeof e.on)i.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function r(o){i.once&&e.removeEventListener(t,r),n(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||r(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||r(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return l(this)},o.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,o=this._events;if(void 0!==o)r=r&&void 0===o.error;else if(!r)return!1;if(r){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var l=o[e];if(void 0===l)return!1;if("function"==typeof l)i(l,this,t);else{var u=l.length,d=p(l,u);for(n=0;n<u;++n)i(d[n],this,t)}return!0},o.prototype.addListener=function(e,t){return u(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return u(this,e,t,!0)},o.prototype.once=function(e,t){return a(t),this.on(e,c(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,c(this,e,t)),this},o.prototype.removeListener=function(e,t){var n,i,r,o,s;if(a(t),void 0===(i=this._events))return this;if(void 0===(n=i[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(r=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){s=n[o].listener,r=o;break}if(r<0)return this;0===r?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,r),1===n.length&&(i[e]=n[0]),void 0!==i.removeListener&&this.emit("removeListener",e,s||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,n,i;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var r,o=Object.keys(n);for(i=0;i<o.length;++i)"removeListener"!==(r=o[i])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(i=t.length-1;i>=0;i--)this.removeListener(e,t[i]);return this},o.prototype.listeners=function(e){return f(this,e,!0)},o.prototype.rawListeners=function(e){return f(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},o.prototype.listenerCount=h,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},18552:(e,t,n)=>{var i=n(10852)(n(55639),"DataView");e.exports=i},1989:(e,t,n)=>{var i=n(51789),r=n(80401),o=n(57667),s=n(21327),a=n(81866);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}l.prototype.clear=i,l.prototype.delete=r,l.prototype.get=o,l.prototype.has=s,l.prototype.set=a,e.exports=l},38407:(e,t,n)=>{var i=n(27040),r=n(14125),o=n(82117),s=n(67518),a=n(54705);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}l.prototype.clear=i,l.prototype.delete=r,l.prototype.get=o,l.prototype.has=s,l.prototype.set=a,e.exports=l},57071:(e,t,n)=>{var i=n(10852)(n(55639),"Map");e.exports=i},83369:(e,t,n)=>{var i=n(24785),r=n(11285),o=n(96e3),s=n(49916),a=n(95265);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}l.prototype.clear=i,l.prototype.delete=r,l.prototype.get=o,l.prototype.has=s,l.prototype.set=a,e.exports=l},53818:(e,t,n)=>{var i=n(10852)(n(55639),"Promise");e.exports=i},58525:(e,t,n)=>{var i=n(10852)(n(55639),"Set");e.exports=i},88668:(e,t,n)=>{var i=n(83369),r=n(90619),o=n(72385);function s(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new i;++t<n;)this.add(e[t])}s.prototype.add=s.prototype.push=r,s.prototype.has=o,e.exports=s},46384:(e,t,n)=>{var i=n(38407),r=n(37465),o=n(63779),s=n(67599),a=n(44758),l=n(34309);function u(e){var t=this.__data__=new i(e);this.size=t.size}u.prototype.clear=r,u.prototype.delete=o,u.prototype.get=s,u.prototype.has=a,u.prototype.set=l,e.exports=u},62705:(e,t,n)=>{var i=n(55639).Symbol;e.exports=i},11149:(e,t,n)=>{var i=n(55639).Uint8Array;e.exports=i},70577:(e,t,n)=>{var i=n(10852)(n(55639),"WeakMap");e.exports=i},96874: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)}},77412:e=>{e.exports=function(e,t){for(var n=-1,i=null==e?0:e.length;++n<i&&!1!==t(e[n],n,e););return e}},34963:e=>{e.exports=function(e,t){for(var n=-1,i=null==e?0:e.length,r=0,o=[];++n<i;){var s=e[n];t(s,n,e)&&(o[r++]=s)}return o}},14636:(e,t,n)=>{var i=n(22545),r=n(35694),o=n(1469),s=n(44144),a=n(65776),l=n(36719),u=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=o(e),d=!n&&r(e),c=!n&&!d&&s(e),f=!n&&!d&&!c&&l(e),h=n||d||c||f,p=h?i(e.length,String):[],g=p.length;for(var m in e)!t&&!u.call(e,m)||h&&("length"==m||c&&("offset"==m||"parent"==m)||f&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||a(m,g))||p.push(m);return p}},29932:e=>{e.exports=function(e,t){for(var n=-1,i=null==e?0:e.length,r=Array(i);++n<i;)r[n]=t(e[n],n,e);return r}},62488:e=>{e.exports=function(e,t){for(var n=-1,i=t.length,r=e.length;++n<i;)e[r+n]=t[n];return e}},82908:e=>{e.exports=function(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(t(e[n],n,e))return!0;return!1}},34865:(e,t,n)=>{var i=n(89465),r=n(77813),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var s=e[t];o.call(e,t)&&r(s,n)&&(void 0!==n||t in e)||i(e,t,n)}},18470:(e,t,n)=>{var i=n(77813);e.exports=function(e,t){for(var n=e.length;n--;)if(i(e[n][0],t))return n;return-1}},44037:(e,t,n)=>{var i=n(98363),r=n(3674);e.exports=function(e,t){return e&&i(t,r(t),e)}},63886:(e,t,n)=>{var i=n(98363),r=n(81704);e.exports=function(e,t){return e&&i(t,r(t),e)}},89465:(e,t,n)=>{var i=n(38777);e.exports=function(e,t,n){"__proto__"==t&&i?i(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},85990:(e,t,n)=>{var i=n(46384),r=n(77412),o=n(34865),s=n(44037),a=n(63886),l=n(64626),u=n(278),d=n(18805),c=n(1911),f=n(58234),h=n(46904),p=n(64160),g=n(43824),m=n(29148),w=n(38517),y=n(1469),v=n(44144),b=n(56688),S=n(13218),C=n(72928),_=n(3674),W=n(81704),A="[object Arguments]",L="[object Function]",E="[object Object]",T={};T[A]=T["[object Array]"]=T["[object ArrayBuffer]"]=T["[object DataView]"]=T["[object Boolean]"]=T["[object Date]"]=T["[object Float32Array]"]=T["[object Float64Array]"]=T["[object Int8Array]"]=T["[object Int16Array]"]=T["[object Int32Array]"]=T["[object Map]"]=T["[object Number]"]=T[E]=T["[object RegExp]"]=T["[object Set]"]=T["[object String]"]=T["[object Symbol]"]=T["[object Uint8Array]"]=T["[object Uint8ClampedArray]"]=T["[object Uint16Array]"]=T["[object Uint32Array]"]=!0,T["[object Error]"]=T[L]=T["[object WeakMap]"]=!1,e.exports=function e(t,n,O,k,I,R){var N,P=1&n,M=2&n,F=4&n;if(O&&(N=I?O(t,k,I,R):O(t)),void 0!==N)return N;if(!S(t))return t;var D=y(t);if(D){if(N=g(t),!P)return u(t,N)}else{var j=p(t),x=j==L||"[object GeneratorFunction]"==j;if(v(t))return l(t,P);if(j==E||j==A||x&&!I){if(N=M||x?{}:w(t),!P)return M?c(t,a(N,t)):d(t,s(N,t))}else{if(!T[j])return I?t:{};N=m(t,j,P)}}R||(R=new i);var B=R.get(t);if(B)return B;R.set(t,N),C(t)?t.forEach((function(i){N.add(e(i,n,O,i,t,R))})):b(t)&&t.forEach((function(i,r){N.set(r,e(i,n,O,r,t,R))}));var $=D?void 0:(F?M?h:f:M?W:_)(t);return r($||t,(function(i,r){$&&(i=t[r=i]),o(N,r,e(i,n,O,r,t,R))})),N}},3118:(e,t,n)=>{var i=n(13218),r=Object.create,o=function(){function e(){}return function(t){if(!i(t))return{};if(r)return r(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=o},21078:(e,t,n)=>{var i=n(62488),r=n(37285);e.exports=function e(t,n,o,s,a){var l=-1,u=t.length;for(o||(o=r),a||(a=[]);++l<u;){var d=t[l];n>0&&o(d)?n>1?e(d,n-1,o,s,a):i(a,d):s||(a[a.length]=d)}return a}},97786:(e,t,n)=>{var i=n(71811),r=n(40327);e.exports=function(e,t){for(var n=0,o=(t=i(t,e)).length;null!=e&&n<o;)e=e[r(t[n++])];return n&&n==o?e:void 0}},68866:(e,t,n)=>{var i=n(62488),r=n(1469);e.exports=function(e,t,n){var o=t(e);return r(e)?o:i(o,n(e))}},44239:(e,t,n)=>{var i=n(62705),r=n(89607),o=n(2333),s=i?i.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":s&&s in Object(e)?r(e):o(e)}},13:e=>{e.exports=function(e,t){return null!=e&&t in Object(e)}},9454:(e,t,n)=>{var i=n(44239),r=n(37005);e.exports=function(e){return r(e)&&"[object Arguments]"==i(e)}},90939:(e,t,n)=>{var i=n(2492),r=n(37005);e.exports=function e(t,n,o,s,a){return t===n||(null==t||null==n||!r(t)&&!r(n)?t!=t&&n!=n:i(t,n,o,s,e,a))}},2492:(e,t,n)=>{var i=n(46384),r=n(67114),o=n(18351),s=n(16096),a=n(64160),l=n(1469),u=n(44144),d=n(36719),c="[object Arguments]",f="[object Array]",h="[object Object]",p=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,g,m,w){var y=l(e),v=l(t),b=y?f:a(e),S=v?f:a(t),C=(b=b==c?h:b)==h,_=(S=S==c?h:S)==h,W=b==S;if(W&&u(e)){if(!u(t))return!1;y=!0,C=!1}if(W&&!C)return w||(w=new i),y||d(e)?r(e,t,n,g,m,w):o(e,t,b,n,g,m,w);if(!(1&n)){var A=C&&p.call(e,"__wrapped__"),L=_&&p.call(t,"__wrapped__");if(A||L){var E=A?e.value():e,T=L?t.value():t;return w||(w=new i),m(E,T,n,g,w)}}return!!W&&(w||(w=new i),s(e,t,n,g,m,w))}},25588:(e,t,n)=>{var i=n(64160),r=n(37005);e.exports=function(e){return r(e)&&"[object Map]"==i(e)}},28458:(e,t,n)=>{var i=n(23560),r=n(15346),o=n(13218),s=n(80346),a=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,d=l.toString,c=u.hasOwnProperty,f=RegExp("^"+d.call(c).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||r(e))&&(i(e)?f:a).test(s(e))}},29221:(e,t,n)=>{var i=n(64160),r=n(37005);e.exports=function(e){return r(e)&&"[object Set]"==i(e)}},38749:(e,t,n)=>{var i=n(44239),r=n(41780),o=n(37005),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&r(e.length)&&!!s[i(e)]}},280:(e,t,n)=>{var i=n(25726),r=n(86916),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!i(e))return r(e);var t=[];for(var n in Object(e))o.call(e,n)&&"constructor"!=n&&t.push(n);return t}},10313:(e,t,n)=>{var i=n(13218),r=n(25726),o=n(33498),s=Object.prototype.hasOwnProperty;e.exports=function(e){if(!i(e))return o(e);var t=r(e),n=[];for(var a in e)("constructor"!=a||!t&&s.call(e,a))&&n.push(a);return n}},25970:(e,t,n)=>{var i=n(63012),r=n(79095);e.exports=function(e,t){return i(e,t,(function(t,n){return r(e,n)}))}},63012:(e,t,n)=>{var i=n(97786),r=n(10611),o=n(71811);e.exports=function(e,t,n){for(var s=-1,a=t.length,l={};++s<a;){var u=t[s],d=i(e,u);n(d,u)&&r(l,o(u,e),d)}return l}},10611:(e,t,n)=>{var i=n(34865),r=n(71811),o=n(65776),s=n(13218),a=n(40327);e.exports=function(e,t,n,l){if(!s(e))return e;for(var u=-1,d=(t=r(t,e)).length,c=d-1,f=e;null!=f&&++u<d;){var h=a(t[u]),p=n;if("__proto__"===h||"constructor"===h||"prototype"===h)return e;if(u!=c){var g=f[h];void 0===(p=l?l(g,h,f):void 0)&&(p=s(g)?g:o(t[u+1])?[]:{})}i(f,h,p),f=f[h]}return e}},56560:(e,t,n)=>{var i=n(75703),r=n(38777),o=n(6557),s=r?function(e,t){return r(e,"toString",{configurable:!0,enumerable:!1,value:i(t),writable:!0})}:o;e.exports=s},22545:e=>{e.exports=function(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}},80531:(e,t,n)=>{var i=n(62705),r=n(29932),o=n(1469),s=n(33448),a=i?i.prototype:void 0,l=a?a.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(o(t))return r(t,e)+"";if(s(t))return l?l.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},27561:(e,t,n)=>{var i=n(67990),r=/^\s+/;e.exports=function(e){return e?e.slice(0,i(e)+1).replace(r,""):e}},7518:e=>{e.exports=function(e){return function(t){return e(t)}}},74757:e=>{e.exports=function(e,t){return e.has(t)}},71811:(e,t,n)=>{var i=n(1469),r=n(15403),o=n(55514),s=n(79833);e.exports=function(e,t){return i(e)?e:r(e,t)?[e]:o(s(e))}},74318:(e,t,n)=>{var i=n(11149);e.exports=function(e){var t=new e.constructor(e.byteLength);return new i(t).set(new i(e)),t}},64626:(e,t,n)=>{e=n.nmd(e);var i=n(55639),r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,s=o&&o.exports===r?i.Buffer:void 0,a=s?s.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,i=a?a(n):new e.constructor(n);return e.copy(i),i}},57157:(e,t,n)=>{var i=n(74318);e.exports=function(e,t){var n=t?i(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},93147:e=>{var t=/\w*$/;e.exports=function(e){var n=new e.constructor(e.source,t.exec(e));return n.lastIndex=e.lastIndex,n}},40419:(e,t,n)=>{var i=n(62705),r=i?i.prototype:void 0,o=r?r.valueOf:void 0;e.exports=function(e){return o?Object(o.call(e)):{}}},77133:(e,t,n)=>{var i=n(74318);e.exports=function(e,t){var n=t?i(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},278:e=>{e.exports=function(e,t){var n=-1,i=e.length;for(t||(t=Array(i));++n<i;)t[n]=e[n];return t}},98363:(e,t,n)=>{var i=n(34865),r=n(89465);e.exports=function(e,t,n,o){var s=!n;n||(n={});for(var a=-1,l=t.length;++a<l;){var u=t[a],d=o?o(n[u],e[u],u,n,e):void 0;void 0===d&&(d=e[u]),s?r(n,u,d):i(n,u,d)}return n}},18805:(e,t,n)=>{var i=n(98363),r=n(99551);e.exports=function(e,t){return i(e,r(e),t)}},1911:(e,t,n)=>{var i=n(98363),r=n(51442);e.exports=function(e,t){return i(e,r(e),t)}},14429:(e,t,n)=>{var i=n(55639)["__core-js_shared__"];e.exports=i},38777:(e,t,n)=>{var i=n(10852),r=function(){try{var e=i(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=r},67114:(e,t,n)=>{var i=n(88668),r=n(82908),o=n(74757);e.exports=function(e,t,n,s,a,l){var u=1&n,d=e.length,c=t.length;if(d!=c&&!(u&&c>d))return!1;var f=l.get(e),h=l.get(t);if(f&&h)return f==t&&h==e;var p=-1,g=!0,m=2&n?new i:void 0;for(l.set(e,t),l.set(t,e);++p<d;){var w=e[p],y=t[p];if(s)var v=u?s(y,w,p,t,e,l):s(w,y,p,e,t,l);if(void 0!==v){if(v)continue;g=!1;break}if(m){if(!r(t,(function(e,t){if(!o(m,t)&&(w===e||a(w,e,n,s,l)))return m.push(t)}))){g=!1;break}}else if(w!==y&&!a(w,y,n,s,l)){g=!1;break}}return l.delete(e),l.delete(t),g}},18351:(e,t,n)=>{var i=n(62705),r=n(11149),o=n(77813),s=n(67114),a=n(68776),l=n(21814),u=i?i.prototype:void 0,d=u?u.valueOf:void 0;e.exports=function(e,t,n,i,u,c,f){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!c(new r(e),new r(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var h=a;case"[object Set]":var p=1&i;if(h||(h=l),e.size!=t.size&&!p)return!1;var g=f.get(e);if(g)return g==t;i|=2,f.set(e,t);var m=s(h(e),h(t),i,u,c,f);return f.delete(e),m;case"[object Symbol]":if(d)return d.call(e)==d.call(t)}return!1}},16096:(e,t,n)=>{var i=n(58234),r=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,o,s,a){var l=1&n,u=i(e),d=u.length;if(d!=i(t).length&&!l)return!1;for(var c=d;c--;){var f=u[c];if(!(l?f in t:r.call(t,f)))return!1}var h=a.get(e),p=a.get(t);if(h&&p)return h==t&&p==e;var g=!0;a.set(e,t),a.set(t,e);for(var m=l;++c<d;){var w=e[f=u[c]],y=t[f];if(o)var v=l?o(y,w,f,t,e,a):o(w,y,f,e,t,a);if(!(void 0===v?w===y||s(w,y,n,o,a):v)){g=!1;break}m||(m="constructor"==f)}if(g&&!m){var b=e.constructor,S=t.constructor;b==S||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof S&&S instanceof S||(g=!1)}return a.delete(e),a.delete(t),g}},99021:(e,t,n)=>{var i=n(85564),r=n(45357),o=n(30061);e.exports=function(e){return o(r(e,void 0,i),e+"")}},31957:(e,t,n)=>{var i="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=i},58234:(e,t,n)=>{var i=n(68866),r=n(99551),o=n(3674);e.exports=function(e){return i(e,o,r)}},46904:(e,t,n)=>{var i=n(68866),r=n(51442),o=n(81704);e.exports=function(e){return i(e,o,r)}},45050:(e,t,n)=>{var i=n(37019);e.exports=function(e,t){var n=e.__data__;return i(t)?n["string"==typeof t?"string":"hash"]:n.map}},10852:(e,t,n)=>{var i=n(28458),r=n(47801);e.exports=function(e,t){var n=r(e,t);return i(n)?n:void 0}},85924:(e,t,n)=>{var i=n(5569)(Object.getPrototypeOf,Object);e.exports=i},89607:(e,t,n)=>{var i=n(62705),r=Object.prototype,o=r.hasOwnProperty,s=r.toString,a=i?i.toStringTag:void 0;e.exports=function(e){var t=o.call(e,a),n=e[a];try{e[a]=void 0;var i=!0}catch(e){}var r=s.call(e);return i&&(t?e[a]=n:delete e[a]),r}},99551:(e,t,n)=>{var i=n(34963),r=n(70479),o=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols,a=s?function(e){return null==e?[]:(e=Object(e),i(s(e),(function(t){return o.call(e,t)})))}:r;e.exports=a},51442:(e,t,n)=>{var i=n(62488),r=n(85924),o=n(99551),s=n(70479),a=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)i(t,o(e)),e=r(e);return t}:s;e.exports=a},64160:(e,t,n)=>{var i=n(18552),r=n(57071),o=n(53818),s=n(58525),a=n(70577),l=n(44239),u=n(80346),d="[object Map]",c="[object Promise]",f="[object Set]",h="[object WeakMap]",p="[object DataView]",g=u(i),m=u(r),w=u(o),y=u(s),v=u(a),b=l;(i&&b(new i(new ArrayBuffer(1)))!=p||r&&b(new r)!=d||o&&b(o.resolve())!=c||s&&b(new s)!=f||a&&b(new a)!=h)&&(b=function(e){var t=l(e),n="[object Object]"==t?e.constructor:void 0,i=n?u(n):"";if(i)switch(i){case g:return p;case m:return d;case w:return c;case y:return f;case v:return h}return t}),e.exports=b},47801:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},222:(e,t,n)=>{var i=n(71811),r=n(35694),o=n(1469),s=n(65776),a=n(41780),l=n(40327);e.exports=function(e,t,n){for(var u=-1,d=(t=i(t,e)).length,c=!1;++u<d;){var f=l(t[u]);if(!(c=null!=e&&n(e,f)))break;e=e[f]}return c||++u!=d?c:!!(d=null==e?0:e.length)&&a(d)&&s(f,d)&&(o(e)||r(e))}},51789:(e,t,n)=>{var i=n(94536);e.exports=function(){this.__data__=i?i(null):{},this.size=0}},80401:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},57667:(e,t,n)=>{var i=n(94536),r=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(i){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return r.call(t,e)?t[e]:void 0}},21327:(e,t,n)=>{var i=n(94536),r=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return i?void 0!==t[e]:r.call(t,e)}},81866:(e,t,n)=>{var i=n(94536);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=i&&void 0===t?"__lodash_hash_undefined__":t,this}},43824:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e){var n=e.length,i=new e.constructor(n);return n&&"string"==typeof e[0]&&t.call(e,"index")&&(i.index=e.index,i.input=e.input),i}},29148:(e,t,n)=>{var i=n(74318),r=n(57157),o=n(93147),s=n(40419),a=n(77133);e.exports=function(e,t,n){var l=e.constructor;switch(t){case"[object ArrayBuffer]":return i(e);case"[object Boolean]":case"[object Date]":return new l(+e);case"[object DataView]":return r(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return a(e,n);case"[object Map]":case"[object Set]":return new l;case"[object Number]":case"[object String]":return new l(e);case"[object RegExp]":return o(e);case"[object Symbol]":return s(e)}}},38517:(e,t,n)=>{var i=n(3118),r=n(85924),o=n(25726);e.exports=function(e){return"function"!=typeof e.constructor||o(e)?{}:i(r(e))}},37285:(e,t,n)=>{var i=n(62705),r=n(35694),o=n(1469),s=i?i.isConcatSpreadable:void 0;e.exports=function(e){return o(e)||r(e)||!!(s&&e&&e[s])}},65776:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var i=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==i||"symbol"!=i&&t.test(e))&&e>-1&&e%1==0&&e<n}},15403:(e,t,n)=>{var i=n(1469),r=n(33448),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;e.exports=function(e,t){if(i(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!r(e))||s.test(e)||!o.test(e)||null!=t&&e in Object(t)}},37019:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},15346:(e,t,n)=>{var i,r=n(14429),o=(i=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"";e.exports=function(e){return!!o&&o in e}},25726:e=>{var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},27040:e=>{e.exports=function(){this.__data__=[],this.size=0}},14125:(e,t,n)=>{var i=n(18470),r=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=i(t,e);return!(n<0||(n==t.length-1?t.pop():r.call(t,n,1),--this.size,0))}},82117:(e,t,n)=>{var i=n(18470);e.exports=function(e){var t=this.__data__,n=i(t,e);return n<0?void 0:t[n][1]}},67518:(e,t,n)=>{var i=n(18470);e.exports=function(e){return i(this.__data__,e)>-1}},54705:(e,t,n)=>{var i=n(18470);e.exports=function(e,t){var n=this.__data__,r=i(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}},24785:(e,t,n)=>{var i=n(1989),r=n(38407),o=n(57071);e.exports=function(){this.size=0,this.__data__={hash:new i,map:new(o||r),string:new i}}},11285:(e,t,n)=>{var i=n(45050);e.exports=function(e){var t=i(this,e).delete(e);return this.size-=t?1:0,t}},96e3:(e,t,n)=>{var i=n(45050);e.exports=function(e){return i(this,e).get(e)}},49916:(e,t,n)=>{var i=n(45050);e.exports=function(e){return i(this,e).has(e)}},95265:(e,t,n)=>{var i=n(45050);e.exports=function(e,t){var n=i(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}},68776:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,i){n[++t]=[i,e]})),n}},24523:(e,t,n)=>{var i=n(88306);e.exports=function(e){var t=i(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},94536:(e,t,n)=>{var i=n(10852)(Object,"create");e.exports=i},86916:(e,t,n)=>{var i=n(5569)(Object.keys,Object);e.exports=i},33498:e=>{e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},31167:(e,t,n)=>{e=n.nmd(e);var i=n(31957),r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,s=o&&o.exports===r&&i.process,a=function(){try{return o&&o.require&&o.require("util").types||s&&s.binding&&s.binding("util")}catch(e){}}();e.exports=a},2333:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},5569:e=>{e.exports=function(e,t){return function(n){return e(t(n))}}},45357:(e,t,n)=>{var i=n(96874),r=Math.max;e.exports=function(e,t,n){return t=r(void 0===t?e.length-1:t,0),function(){for(var o=arguments,s=-1,a=r(o.length-t,0),l=Array(a);++s<a;)l[s]=o[t+s];s=-1;for(var u=Array(t+1);++s<t;)u[s]=o[s];return u[t]=n(l),i(e,this,u)}}},55639:(e,t,n)=>{var i=n(31957),r="object"==typeof self&&self&&self.Object===Object&&self,o=i||r||Function("return this")();e.exports=o},90619:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},72385:e=>{e.exports=function(e){return this.__data__.has(e)}},21814:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},30061:(e,t,n)=>{var i=n(56560),r=n(21275)(i);e.exports=r},21275:e=>{var t=Date.now;e.exports=function(e){var n=0,i=0;return function(){var r=t(),o=16-(r-i);if(i=r,o>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},37465:(e,t,n)=>{var i=n(38407);e.exports=function(){this.__data__=new i,this.size=0}},63779:e=>{e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},67599:e=>{e.exports=function(e){return this.__data__.get(e)}},44758:e=>{e.exports=function(e){return this.__data__.has(e)}},34309:(e,t,n)=>{var i=n(38407),r=n(57071),o=n(83369);e.exports=function(e,t){var n=this.__data__;if(n instanceof i){var s=n.__data__;if(!r||s.length<199)return s.push([e,t]),this.size=++n.size,this;n=this.__data__=new o(s)}return n.set(e,t),this.size=n.size,this}},55514:(e,t,n)=>{var i=n(24523),r=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,s=i((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(r,(function(e,n,i,r){t.push(i?r.replace(o,"$1"):n||e)})),t}));e.exports=s},40327:(e,t,n)=>{var i=n(33448);e.exports=function(e){if("string"==typeof e||i(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},80346: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""}},67990:e=>{var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},50361:(e,t,n)=>{var i=n(85990);e.exports=function(e){return i(e,5)}},75703:e=>{e.exports=function(e){return function(){return e}}},23279:(e,t,n)=>{var i=n(13218),r=n(7771),o=n(14841),s=Math.max,a=Math.min;e.exports=function(e,t,n){var l,u,d,c,f,h,p=0,g=!1,m=!1,w=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=l,i=u;return l=u=void 0,p=t,c=e.apply(i,n)}function v(e){return p=e,f=setTimeout(S,t),g?y(e):c}function b(e){var n=e-h;return void 0===h||n>=t||n<0||m&&e-p>=d}function S(){var e=r();if(b(e))return C(e);f=setTimeout(S,function(e){var n=t-(e-h);return m?a(n,d-(e-p)):n}(e))}function C(e){return f=void 0,w&&l?y(e):(l=u=void 0,c)}function _(){var e=r(),n=b(e);if(l=arguments,u=this,h=e,n){if(void 0===f)return v(h);if(m)return clearTimeout(f),f=setTimeout(S,t),y(h)}return void 0===f&&(f=setTimeout(S,t)),c}return t=o(t)||0,i(n)&&(g=!!n.leading,d=(m="maxWait"in n)?s(o(n.maxWait)||0,t):d,w="trailing"in n?!!n.trailing:w),_.cancel=function(){void 0!==f&&clearTimeout(f),p=0,l=h=u=f=void 0},_.flush=function(){return void 0===f?c:C(r())},_}},77813:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},85564:(e,t,n)=>{var i=n(21078);e.exports=function(e){return null!=e&&e.length?i(e,1):[]}},27361:(e,t,n)=>{var i=n(97786);e.exports=function(e,t,n){var r=null==e?void 0:i(e,t);return void 0===r?n:r}},79095:(e,t,n)=>{var i=n(13),r=n(222);e.exports=function(e,t){return null!=e&&r(e,t,i)}},6557:e=>{e.exports=function(e){return e}},35694:(e,t,n)=>{var i=n(9454),r=n(37005),o=Object.prototype,s=o.hasOwnProperty,a=o.propertyIsEnumerable,l=i(function(){return arguments}())?i:function(e){return r(e)&&s.call(e,"callee")&&!a.call(e,"callee")};e.exports=l},1469:e=>{var t=Array.isArray;e.exports=t},98612:(e,t,n)=>{var i=n(23560),r=n(41780);e.exports=function(e){return null!=e&&r(e.length)&&!i(e)}},44144:(e,t,n)=>{e=n.nmd(e);var i=n(55639),r=n(95062),o=t&&!t.nodeType&&t,s=o&&e&&!e.nodeType&&e,a=s&&s.exports===o?i.Buffer:void 0,l=(a?a.isBuffer:void 0)||r;e.exports=l},18446:(e,t,n)=>{var i=n(90939);e.exports=function(e,t){return i(e,t)}},28368:(e,t,n)=>{var i=n(90939);e.exports=function(e,t,n){var r=(n="function"==typeof n?n:void 0)?n(e,t):void 0;return void 0===r?i(e,t,void 0,n):!!r}},23560:(e,t,n)=>{var i=n(44239),r=n(13218);e.exports=function(e){if(!r(e))return!1;var t=i(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},41780:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},56688:(e,t,n)=>{var i=n(25588),r=n(7518),o=n(31167),s=o&&o.isMap,a=s?r(s):i;e.exports=a},13218:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},37005:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},72928:(e,t,n)=>{var i=n(29221),r=n(7518),o=n(31167),s=o&&o.isSet,a=s?r(s):i;e.exports=a},33448:(e,t,n)=>{var i=n(44239),r=n(37005);e.exports=function(e){return"symbol"==typeof e||r(e)&&"[object Symbol]"==i(e)}},36719:(e,t,n)=>{var i=n(38749),r=n(7518),o=n(31167),s=o&&o.isTypedArray,a=s?r(s):i;e.exports=a},3674:(e,t,n)=>{var i=n(14636),r=n(280),o=n(98612);e.exports=function(e){return o(e)?i(e):r(e)}},81704:(e,t,n)=>{var i=n(14636),r=n(10313),o=n(98612);e.exports=function(e){return o(e)?i(e,!0):r(e)}},96486:function(e,t,n){var i;e=n.nmd(e),function(){var r,o="Expected a function",s="__lodash_hash_undefined__",a="__lodash_placeholder__",l=32,u=128,d=1/0,c=9007199254740991,f=NaN,h=4294967295,p=[["ary",u],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",l],["partialRight",64],["rearg",256]],g="[object Arguments]",m="[object Array]",w="[object Boolean]",y="[object Date]",v="[object Error]",b="[object Function]",S="[object GeneratorFunction]",C="[object Map]",_="[object Number]",W="[object Object]",A="[object Promise]",L="[object RegExp]",E="[object Set]",T="[object String]",O="[object Symbol]",k="[object WeakMap]",I="[object ArrayBuffer]",R="[object DataView]",N="[object Float32Array]",P="[object Float64Array]",M="[object Int8Array]",F="[object Int16Array]",D="[object Int32Array]",j="[object Uint8Array]",x="[object Uint8ClampedArray]",B="[object Uint16Array]",$="[object Uint32Array]",U=/\b__p \+= '';/g,H=/\b(__p \+=) '' \+/g,G=/(__e\(.*?\)|\b__t\)) \+\n'';/g,q=/&(?:amp|lt|gt|quot|#39);/g,V=/[&<>"']/g,z=RegExp(q.source),Y=RegExp(V.source),K=/<%-([\s\S]+?)%>/g,Q=/<%([\s\S]+?)%>/g,J=/<%=([\s\S]+?)%>/g,Z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,X=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,ne=RegExp(te.source),ie=/^\s+/,re=/\s/,oe=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,se=/\{\n\/\* \[wrapped with (.+)\] \*/,ae=/,? & /,le=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ue=/[()=,{}\[\]\/\s]/,de=/\\(\\)?/g,ce=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,fe=/\w*$/,he=/^[-+]0x[0-9a-f]+$/i,pe=/^0b[01]+$/i,ge=/^\[object .+?Constructor\]$/,me=/^0o[0-7]+$/i,we=/^(?:0|[1-9]\d*)$/,ye=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ve=/($^)/,be=/['\n\r\u2028\u2029\\]/g,Se="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ce="a-z\\xdf-\\xf6\\xf8-\\xff",_e="A-Z\\xc0-\\xd6\\xd8-\\xde",We="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ae="["+We+"]",Le="["+Se+"]",Ee="\\d+",Te="["+Ce+"]",Oe="[^\\ud800-\\udfff"+We+Ee+"\\u2700-\\u27bf"+Ce+_e+"]",ke="\\ud83c[\\udffb-\\udfff]",Ie="[^\\ud800-\\udfff]",Re="(?:\\ud83c[\\udde6-\\uddff]){2}",Ne="[\\ud800-\\udbff][\\udc00-\\udfff]",Pe="["+_e+"]",Me="(?:"+Te+"|"+Oe+")",Fe="(?:"+Pe+"|"+Oe+")",De="(?:['’](?:d|ll|m|re|s|t|ve))?",je="(?:['’](?:D|LL|M|RE|S|T|VE))?",xe="(?:"+Le+"|"+ke+")?",Be="[\\ufe0e\\ufe0f]?",$e=Be+xe+"(?:\\u200d(?:"+[Ie,Re,Ne].join("|")+")"+Be+xe+")*",Ue="(?:"+["[\\u2700-\\u27bf]",Re,Ne].join("|")+")"+$e,He="(?:"+[Ie+Le+"?",Le,Re,Ne,"[\\ud800-\\udfff]"].join("|")+")",Ge=RegExp("['’]","g"),qe=RegExp(Le,"g"),Ve=RegExp(ke+"(?="+ke+")|"+He+$e,"g"),ze=RegExp([Pe+"?"+Te+"+"+De+"(?="+[Ae,Pe,"$"].join("|")+")",Fe+"+"+je+"(?="+[Ae,Pe+Me,"$"].join("|")+")",Pe+"?"+Me+"+"+De,Pe+"+"+je,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ee,Ue].join("|"),"g"),Ye=RegExp("[\\u200d\\ud800-\\udfff"+Se+"\\ufe0e\\ufe0f]"),Ke=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Qe=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Je=-1,Ze={};Ze[N]=Ze[P]=Ze[M]=Ze[F]=Ze[D]=Ze[j]=Ze[x]=Ze[B]=Ze[$]=!0,Ze[g]=Ze[m]=Ze[I]=Ze[w]=Ze[R]=Ze[y]=Ze[v]=Ze[b]=Ze[C]=Ze[_]=Ze[W]=Ze[L]=Ze[E]=Ze[T]=Ze[k]=!1;var Xe={};Xe[g]=Xe[m]=Xe[I]=Xe[R]=Xe[w]=Xe[y]=Xe[N]=Xe[P]=Xe[M]=Xe[F]=Xe[D]=Xe[C]=Xe[_]=Xe[W]=Xe[L]=Xe[E]=Xe[T]=Xe[O]=Xe[j]=Xe[x]=Xe[B]=Xe[$]=!0,Xe[v]=Xe[b]=Xe[k]=!1;var et={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},tt=parseFloat,nt=parseInt,it="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,rt="object"==typeof self&&self&&self.Object===Object&&self,ot=it||rt||Function("return this")(),st=t&&!t.nodeType&&t,at=st&&e&&!e.nodeType&&e,lt=at&&at.exports===st,ut=lt&&it.process,dt=function(){try{return at&&at.require&&at.require("util").types||ut&&ut.binding&&ut.binding("util")}catch(e){}}(),ct=dt&&dt.isArrayBuffer,ft=dt&&dt.isDate,ht=dt&&dt.isMap,pt=dt&&dt.isRegExp,gt=dt&&dt.isSet,mt=dt&&dt.isTypedArray;function wt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function yt(e,t,n,i){for(var r=-1,o=null==e?0:e.length;++r<o;){var s=e[r];t(i,s,n(s),e)}return i}function vt(e,t){for(var n=-1,i=null==e?0:e.length;++n<i&&!1!==t(e[n],n,e););return e}function bt(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function St(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(!t(e[n],n,e))return!1;return!0}function Ct(e,t){for(var n=-1,i=null==e?0:e.length,r=0,o=[];++n<i;){var s=e[n];t(s,n,e)&&(o[r++]=s)}return o}function _t(e,t){return!(null==e||!e.length)&&Nt(e,t,0)>-1}function Wt(e,t,n){for(var i=-1,r=null==e?0:e.length;++i<r;)if(n(t,e[i]))return!0;return!1}function At(e,t){for(var n=-1,i=null==e?0:e.length,r=Array(i);++n<i;)r[n]=t(e[n],n,e);return r}function Lt(e,t){for(var n=-1,i=t.length,r=e.length;++n<i;)e[r+n]=t[n];return e}function Et(e,t,n,i){var r=-1,o=null==e?0:e.length;for(i&&o&&(n=e[++r]);++r<o;)n=t(n,e[r],r,e);return n}function Tt(e,t,n,i){var r=null==e?0:e.length;for(i&&r&&(n=e[--r]);r--;)n=t(n,e[r],r,e);return n}function Ot(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(t(e[n],n,e))return!0;return!1}var kt=Dt("length");function It(e,t,n){var i;return n(e,(function(e,n,r){if(t(e,n,r))return i=n,!1})),i}function Rt(e,t,n,i){for(var r=e.length,o=n+(i?1:-1);i?o--:++o<r;)if(t(e[o],o,e))return o;return-1}function Nt(e,t,n){return t==t?function(e,t,n){for(var i=n-1,r=e.length;++i<r;)if(e[i]===t)return i;return-1}(e,t,n):Rt(e,Mt,n)}function Pt(e,t,n,i){for(var r=n-1,o=e.length;++r<o;)if(i(e[r],t))return r;return-1}function Mt(e){return e!=e}function Ft(e,t){var n=null==e?0:e.length;return n?Bt(e,t)/n:f}function Dt(e){return function(t){return null==t?r:t[e]}}function jt(e){return function(t){return null==e?r:e[t]}}function xt(e,t,n,i,r){return r(e,(function(e,r,o){n=i?(i=!1,e):t(n,e,r,o)})),n}function Bt(e,t){for(var n,i=-1,o=e.length;++i<o;){var s=t(e[i]);s!==r&&(n=n===r?s:n+s)}return n}function $t(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}function Ut(e){return e?e.slice(0,an(e)+1).replace(ie,""):e}function Ht(e){return function(t){return e(t)}}function Gt(e,t){return At(t,(function(t){return e[t]}))}function qt(e,t){return e.has(t)}function Vt(e,t){for(var n=-1,i=e.length;++n<i&&Nt(t,e[n],0)>-1;);return n}function zt(e,t){for(var n=e.length;n--&&Nt(t,e[n],0)>-1;);return n}function Yt(e,t){for(var n=e.length,i=0;n--;)e[n]===t&&++i;return i}var Kt=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"}),Qt=jt({"&":"&","<":"<",">":">",'"':""","'":"'"});function Jt(e){return"\\"+et[e]}function Zt(e){return Ye.test(e)}function Xt(e){var t=-1,n=Array(e.size);return e.forEach((function(e,i){n[++t]=[i,e]})),n}function en(e,t){return function(n){return e(t(n))}}function tn(e,t){for(var n=-1,i=e.length,r=0,o=[];++n<i;){var s=e[n];s!==t&&s!==a||(e[n]=a,o[r++]=n)}return o}function nn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function rn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function on(e){return Zt(e)?function(e){for(var t=Ve.lastIndex=0;Ve.test(e);)++t;return t}(e):kt(e)}function sn(e){return Zt(e)?function(e){return e.match(Ve)||[]}(e):function(e){return e.split("")}(e)}function an(e){for(var t=e.length;t--&&re.test(e.charAt(t)););return t}var ln=jt({"&":"&","<":"<",">":">",""":'"',"'":"'"}),un=function e(t){var n,i=(t=null==t?ot:un.defaults(ot.Object(),t,un.pick(ot,Qe))).Array,re=t.Date,Se=t.Error,Ce=t.Function,_e=t.Math,We=t.Object,Ae=t.RegExp,Le=t.String,Ee=t.TypeError,Te=i.prototype,Oe=Ce.prototype,ke=We.prototype,Ie=t["__core-js_shared__"],Re=Oe.toString,Ne=ke.hasOwnProperty,Pe=0,Me=(n=/[^.]+$/.exec(Ie&&Ie.keys&&Ie.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Fe=ke.toString,De=Re.call(We),je=ot._,xe=Ae("^"+Re.call(Ne).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Be=lt?t.Buffer:r,$e=t.Symbol,Ue=t.Uint8Array,He=Be?Be.allocUnsafe:r,Ve=en(We.getPrototypeOf,We),Ye=We.create,et=ke.propertyIsEnumerable,it=Te.splice,rt=$e?$e.isConcatSpreadable:r,st=$e?$e.iterator:r,at=$e?$e.toStringTag:r,ut=function(){try{var e=uo(We,"defineProperty");return e({},"",{}),e}catch(e){}}(),dt=t.clearTimeout!==ot.clearTimeout&&t.clearTimeout,kt=re&&re.now!==ot.Date.now&&re.now,jt=t.setTimeout!==ot.setTimeout&&t.setTimeout,dn=_e.ceil,cn=_e.floor,fn=We.getOwnPropertySymbols,hn=Be?Be.isBuffer:r,pn=t.isFinite,gn=Te.join,mn=en(We.keys,We),wn=_e.max,yn=_e.min,vn=re.now,bn=t.parseInt,Sn=_e.random,Cn=Te.reverse,_n=uo(t,"DataView"),Wn=uo(t,"Map"),An=uo(t,"Promise"),Ln=uo(t,"Set"),En=uo(t,"WeakMap"),Tn=uo(We,"create"),On=En&&new En,kn={},In=xo(_n),Rn=xo(Wn),Nn=xo(An),Pn=xo(Ln),Mn=xo(En),Fn=$e?$e.prototype:r,Dn=Fn?Fn.valueOf:r,jn=Fn?Fn.toString:r;function xn(e){if(na(e)&&!qs(e)&&!(e instanceof Hn)){if(e instanceof Un)return e;if(Ne.call(e,"__wrapped__"))return Bo(e)}return new Un(e)}var Bn=function(){function e(){}return function(t){if(!ta(t))return{};if(Ye)return Ye(t);e.prototype=t;var n=new e;return e.prototype=r,n}}();function $n(){}function Un(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=r}function Hn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=h,this.__views__=[]}function Gn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function qn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Vn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function zn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Vn;++t<n;)this.add(e[t])}function Yn(e){var t=this.__data__=new qn(e);this.size=t.size}function Kn(e,t){var n=qs(e),i=!n&&Gs(e),r=!n&&!i&&Ks(e),o=!n&&!i&&!r&&da(e),s=n||i||r||o,a=s?$t(e.length,Le):[],l=a.length;for(var u in e)!t&&!Ne.call(e,u)||s&&("length"==u||r&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||wo(u,l))||a.push(u);return a}function Qn(e){var t=e.length;return t?e[Vi(0,t-1)]:r}function Jn(e,t){return Po(Er(e),si(t,0,e.length))}function Zn(e){return Po(Er(e))}function Xn(e,t,n){(n!==r&&!$s(e[t],n)||n===r&&!(t in e))&&ri(e,t,n)}function ei(e,t,n){var i=e[t];Ne.call(e,t)&&$s(i,n)&&(n!==r||t in e)||ri(e,t,n)}function ti(e,t){for(var n=e.length;n--;)if($s(e[n][0],t))return n;return-1}function ni(e,t,n,i){return ci(e,(function(e,r,o){t(i,e,n(e),o)})),i}function ii(e,t){return e&&Tr(t,Ra(t),e)}function ri(e,t,n){"__proto__"==t&&ut?ut(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function oi(e,t){for(var n=-1,o=t.length,s=i(o),a=null==e;++n<o;)s[n]=a?r:Ea(e,t[n]);return s}function si(e,t,n){return e==e&&(n!==r&&(e=e<=n?e:n),t!==r&&(e=e>=t?e:t)),e}function ai(e,t,n,i,o,s){var a,l=1&t,u=2&t,d=4&t;if(n&&(a=o?n(e,i,o,s):n(e)),a!==r)return a;if(!ta(e))return e;var c=qs(e);if(c){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Ne.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!l)return Er(e,a)}else{var f=ho(e),h=f==b||f==S;if(Ks(e))return Sr(e,l);if(f==W||f==g||h&&!o){if(a=u||h?{}:go(e),!l)return u?function(e,t){return Tr(e,fo(e),t)}(e,function(e,t){return e&&Tr(t,Na(t),e)}(a,e)):function(e,t){return Tr(e,co(e),t)}(e,ii(a,e))}else{if(!Xe[f])return o?e:{};a=function(e,t,n){var i,r=e.constructor;switch(t){case I:return Cr(e);case w:case y:return new r(+e);case R:return function(e,t){var n=t?Cr(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case N:case P:case M:case F:case D:case j:case x:case B:case $:return _r(e,n);case C:case E:return new r;case _:case T:return new r(e);case L:return function(e){var t=new e.constructor(e.source,fe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case O:return i=e,Dn?We(Dn.call(i)):{}}}(e,f,l)}}s||(s=new Yn);var p=s.get(e);if(p)return p;s.set(e,a),aa(e)?e.forEach((function(i){a.add(ai(i,t,n,i,e,s))})):ia(e)&&e.forEach((function(i,r){a.set(r,ai(i,t,n,r,e,s))}));var m=c?r:(d?u?no:to:u?Na:Ra)(e);return vt(m||e,(function(i,r){m&&(i=e[r=i]),ei(a,r,ai(i,t,n,r,e,s))})),a}function li(e,t,n){var i=n.length;if(null==e)return!i;for(e=We(e);i--;){var o=n[i],s=t[o],a=e[o];if(a===r&&!(o in e)||!s(a))return!1}return!0}function ui(e,t,n){if("function"!=typeof e)throw new Ee(o);return ko((function(){e.apply(r,n)}),t)}function di(e,t,n,i){var r=-1,o=_t,s=!0,a=e.length,l=[],u=t.length;if(!a)return l;n&&(t=At(t,Ht(n))),i?(o=Wt,s=!1):t.length>=200&&(o=qt,s=!1,t=new zn(t));e:for(;++r<a;){var d=e[r],c=null==n?d:n(d);if(d=i||0!==d?d:0,s&&c==c){for(var f=u;f--;)if(t[f]===c)continue e;l.push(d)}else o(t,c,i)||l.push(d)}return l}xn.templateSettings={escape:K,evaluate:Q,interpolate:J,variable:"",imports:{_:xn}},xn.prototype=$n.prototype,xn.prototype.constructor=xn,Un.prototype=Bn($n.prototype),Un.prototype.constructor=Un,Hn.prototype=Bn($n.prototype),Hn.prototype.constructor=Hn,Gn.prototype.clear=function(){this.__data__=Tn?Tn(null):{},this.size=0},Gn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Gn.prototype.get=function(e){var t=this.__data__;if(Tn){var n=t[e];return n===s?r:n}return Ne.call(t,e)?t[e]:r},Gn.prototype.has=function(e){var t=this.__data__;return Tn?t[e]!==r:Ne.call(t,e)},Gn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Tn&&t===r?s:t,this},qn.prototype.clear=function(){this.__data__=[],this.size=0},qn.prototype.delete=function(e){var t=this.__data__,n=ti(t,e);return!(n<0||(n==t.length-1?t.pop():it.call(t,n,1),--this.size,0))},qn.prototype.get=function(e){var t=this.__data__,n=ti(t,e);return n<0?r:t[n][1]},qn.prototype.has=function(e){return ti(this.__data__,e)>-1},qn.prototype.set=function(e,t){var n=this.__data__,i=ti(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this},Vn.prototype.clear=function(){this.size=0,this.__data__={hash:new Gn,map:new(Wn||qn),string:new Gn}},Vn.prototype.delete=function(e){var t=ao(this,e).delete(e);return this.size-=t?1:0,t},Vn.prototype.get=function(e){return ao(this,e).get(e)},Vn.prototype.has=function(e){return ao(this,e).has(e)},Vn.prototype.set=function(e,t){var n=ao(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this},zn.prototype.add=zn.prototype.push=function(e){return this.__data__.set(e,s),this},zn.prototype.has=function(e){return this.__data__.has(e)},Yn.prototype.clear=function(){this.__data__=new qn,this.size=0},Yn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Yn.prototype.get=function(e){return this.__data__.get(e)},Yn.prototype.has=function(e){return this.__data__.has(e)},Yn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof qn){var i=n.__data__;if(!Wn||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new Vn(i)}return n.set(e,t),this.size=n.size,this};var ci=Ir(vi),fi=Ir(bi,!0);function hi(e,t){var n=!0;return ci(e,(function(e,i,r){return n=!!t(e,i,r)})),n}function pi(e,t,n){for(var i=-1,o=e.length;++i<o;){var s=e[i],a=t(s);if(null!=a&&(l===r?a==a&&!ua(a):n(a,l)))var l=a,u=s}return u}function gi(e,t){var n=[];return ci(e,(function(e,i,r){t(e,i,r)&&n.push(e)})),n}function mi(e,t,n,i,r){var o=-1,s=e.length;for(n||(n=mo),r||(r=[]);++o<s;){var a=e[o];t>0&&n(a)?t>1?mi(a,t-1,n,i,r):Lt(r,a):i||(r[r.length]=a)}return r}var wi=Rr(),yi=Rr(!0);function vi(e,t){return e&&wi(e,t,Ra)}function bi(e,t){return e&&yi(e,t,Ra)}function Si(e,t){return Ct(t,(function(t){return Zs(e[t])}))}function Ci(e,t){for(var n=0,i=(t=wr(t,e)).length;null!=e&&n<i;)e=e[jo(t[n++])];return n&&n==i?e:r}function _i(e,t,n){var i=t(e);return qs(e)?i:Lt(i,n(e))}function Wi(e){return null==e?e===r?"[object Undefined]":"[object Null]":at&&at in We(e)?function(e){var t=Ne.call(e,at),n=e[at];try{e[at]=r;var i=!0}catch(e){}var o=Fe.call(e);return i&&(t?e[at]=n:delete e[at]),o}(e):function(e){return Fe.call(e)}(e)}function Ai(e,t){return e>t}function Li(e,t){return null!=e&&Ne.call(e,t)}function Ei(e,t){return null!=e&&t in We(e)}function Ti(e,t,n){for(var o=n?Wt:_t,s=e[0].length,a=e.length,l=a,u=i(a),d=1/0,c=[];l--;){var f=e[l];l&&t&&(f=At(f,Ht(t))),d=yn(f.length,d),u[l]=!n&&(t||s>=120&&f.length>=120)?new zn(l&&f):r}f=e[0];var h=-1,p=u[0];e:for(;++h<s&&c.length<d;){var g=f[h],m=t?t(g):g;if(g=n||0!==g?g:0,!(p?qt(p,m):o(c,m,n))){for(l=a;--l;){var w=u[l];if(!(w?qt(w,m):o(e[l],m,n)))continue e}p&&p.push(m),c.push(g)}}return c}function Oi(e,t,n){var i=null==(e=Lo(e,t=wr(t,e)))?e:e[jo(Jo(t))];return null==i?r:wt(i,e,n)}function ki(e){return na(e)&&Wi(e)==g}function Ii(e,t,n,i,o){return e===t||(null==e||null==t||!na(e)&&!na(t)?e!=e&&t!=t:function(e,t,n,i,o,s){var a=qs(e),l=qs(t),u=a?m:ho(e),d=l?m:ho(t),c=(u=u==g?W:u)==W,f=(d=d==g?W:d)==W,h=u==d;if(h&&Ks(e)){if(!Ks(t))return!1;a=!0,c=!1}if(h&&!c)return s||(s=new Yn),a||da(e)?Xr(e,t,n,i,o,s):function(e,t,n,i,r,o,s){switch(n){case R:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case I:return!(e.byteLength!=t.byteLength||!o(new Ue(e),new Ue(t)));case w:case y:case _:return $s(+e,+t);case v:return e.name==t.name&&e.message==t.message;case L:case T:return e==t+"";case C:var a=Xt;case E:var l=1&i;if(a||(a=nn),e.size!=t.size&&!l)return!1;var u=s.get(e);if(u)return u==t;i|=2,s.set(e,t);var d=Xr(a(e),a(t),i,r,o,s);return s.delete(e),d;case O:if(Dn)return Dn.call(e)==Dn.call(t)}return!1}(e,t,u,n,i,o,s);if(!(1&n)){var p=c&&Ne.call(e,"__wrapped__"),b=f&&Ne.call(t,"__wrapped__");if(p||b){var S=p?e.value():e,A=b?t.value():t;return s||(s=new Yn),o(S,A,n,i,s)}}return!!h&&(s||(s=new Yn),function(e,t,n,i,o,s){var a=1&n,l=to(e),u=l.length;if(u!=to(t).length&&!a)return!1;for(var d=u;d--;){var c=l[d];if(!(a?c in t:Ne.call(t,c)))return!1}var f=s.get(e),h=s.get(t);if(f&&h)return f==t&&h==e;var p=!0;s.set(e,t),s.set(t,e);for(var g=a;++d<u;){var m=e[c=l[d]],w=t[c];if(i)var y=a?i(w,m,c,t,e,s):i(m,w,c,e,t,s);if(!(y===r?m===w||o(m,w,n,i,s):y)){p=!1;break}g||(g="constructor"==c)}if(p&&!g){var v=e.constructor,b=t.constructor;v==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof v&&v instanceof v&&"function"==typeof b&&b instanceof b||(p=!1)}return s.delete(e),s.delete(t),p}(e,t,n,i,o,s))}(e,t,n,i,Ii,o))}function Ri(e,t,n,i){var o=n.length,s=o,a=!i;if(null==e)return!s;for(e=We(e);o--;){var l=n[o];if(a&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++o<s;){var u=(l=n[o])[0],d=e[u],c=l[1];if(a&&l[2]){if(d===r&&!(u in e))return!1}else{var f=new Yn;if(i)var h=i(d,c,u,e,t,f);if(!(h===r?Ii(c,d,3,i,f):h))return!1}}return!0}function Ni(e){return!(!ta(e)||(t=e,Me&&Me in t))&&(Zs(e)?xe:ge).test(xo(e));var t}function Pi(e){return"function"==typeof e?e:null==e?rl:"object"==typeof e?qs(e)?xi(e[0],e[1]):ji(e):hl(e)}function Mi(e){if(!Co(e))return mn(e);var t=[];for(var n in We(e))Ne.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Fi(e,t){return e<t}function Di(e,t){var n=-1,r=zs(e)?i(e.length):[];return ci(e,(function(e,i,o){r[++n]=t(e,i,o)})),r}function ji(e){var t=lo(e);return 1==t.length&&t[0][2]?Wo(t[0][0],t[0][1]):function(n){return n===e||Ri(n,e,t)}}function xi(e,t){return vo(e)&&_o(t)?Wo(jo(e),t):function(n){var i=Ea(n,e);return i===r&&i===t?Ta(n,e):Ii(t,i,3)}}function Bi(e,t,n,i,o){e!==t&&wi(t,(function(s,a){if(o||(o=new Yn),ta(s))!function(e,t,n,i,o,s,a){var l=To(e,n),u=To(t,n),d=a.get(u);if(d)Xn(e,n,d);else{var c=s?s(l,u,n+"",e,t,a):r,f=c===r;if(f){var h=qs(u),p=!h&&Ks(u),g=!h&&!p&&da(u);c=u,h||p||g?qs(l)?c=l:Ys(l)?c=Er(l):p?(f=!1,c=Sr(u,!0)):g?(f=!1,c=_r(u,!0)):c=[]:oa(u)||Gs(u)?(c=l,Gs(l)?c=ya(l):ta(l)&&!Zs(l)||(c=go(u))):f=!1}f&&(a.set(u,c),o(c,u,i,s,a),a.delete(u)),Xn(e,n,c)}}(e,t,a,n,Bi,i,o);else{var l=i?i(To(e,a),s,a+"",e,t,o):r;l===r&&(l=s),Xn(e,a,l)}}),Na)}function $i(e,t){var n=e.length;if(n)return wo(t+=t<0?n:0,n)?e[t]:r}function Ui(e,t,n){t=t.length?At(t,(function(e){return qs(e)?function(t){return Ci(t,1===e.length?e[0]:e)}:e})):[rl];var i=-1;t=At(t,Ht(so()));var r=Di(e,(function(e,n,r){var o=At(t,(function(t){return t(e)}));return{criteria:o,index:++i,value:e}}));return function(e,t){var i=e.length;for(e.sort((function(e,t){return function(e,t,n){for(var i=-1,r=e.criteria,o=t.criteria,s=r.length,a=n.length;++i<s;){var l=Wr(r[i],o[i]);if(l)return i>=a?l:l*("desc"==n[i]?-1:1)}return e.index-t.index}(e,t,n)}));i--;)e[i]=e[i].value;return e}(r)}function Hi(e,t,n){for(var i=-1,r=t.length,o={};++i<r;){var s=t[i],a=Ci(e,s);n(a,s)&&Ji(o,wr(s,e),a)}return o}function Gi(e,t,n,i){var r=i?Pt:Nt,o=-1,s=t.length,a=e;for(e===t&&(t=Er(t)),n&&(a=At(e,Ht(n)));++o<s;)for(var l=0,u=t[o],d=n?n(u):u;(l=r(a,d,l,i))>-1;)a!==e&&it.call(a,l,1),it.call(e,l,1);return e}function qi(e,t){for(var n=e?t.length:0,i=n-1;n--;){var r=t[n];if(n==i||r!==o){var o=r;wo(r)?it.call(e,r,1):ur(e,r)}}return e}function Vi(e,t){return e+cn(Sn()*(t-e+1))}function zi(e,t){var n="";if(!e||t<1||t>c)return n;do{t%2&&(n+=e),(t=cn(t/2))&&(e+=e)}while(t);return n}function Yi(e,t){return Io(Ao(e,t,rl),e+"")}function Ki(e){return Qn($a(e))}function Qi(e,t){var n=$a(e);return Po(n,si(t,0,n.length))}function Ji(e,t,n,i){if(!ta(e))return e;for(var o=-1,s=(t=wr(t,e)).length,a=s-1,l=e;null!=l&&++o<s;){var u=jo(t[o]),d=n;if("__proto__"===u||"constructor"===u||"prototype"===u)return e;if(o!=a){var c=l[u];(d=i?i(c,u,l):r)===r&&(d=ta(c)?c:wo(t[o+1])?[]:{})}ei(l,u,d),l=l[u]}return e}var Zi=On?function(e,t){return On.set(e,t),e}:rl,Xi=ut?function(e,t){return ut(e,"toString",{configurable:!0,enumerable:!1,value:tl(t),writable:!0})}:rl;function er(e){return Po($a(e))}function tr(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var s=i(o);++r<o;)s[r]=e[r+t];return s}function nr(e,t){var n;return ci(e,(function(e,i,r){return!(n=t(e,i,r))})),!!n}function ir(e,t,n){var i=0,r=null==e?i:e.length;if("number"==typeof t&&t==t&&r<=2147483647){for(;i<r;){var o=i+r>>>1,s=e[o];null!==s&&!ua(s)&&(n?s<=t:s<t)?i=o+1:r=o}return r}return rr(e,t,rl,n)}function rr(e,t,n,i){var o=0,s=null==e?0:e.length;if(0===s)return 0;for(var a=(t=n(t))!=t,l=null===t,u=ua(t),d=t===r;o<s;){var c=cn((o+s)/2),f=n(e[c]),h=f!==r,p=null===f,g=f==f,m=ua(f);if(a)var w=i||g;else w=d?g&&(i||h):l?g&&h&&(i||!p):u?g&&h&&!p&&(i||!m):!p&&!m&&(i?f<=t:f<t);w?o=c+1:s=c}return yn(s,4294967294)}function or(e,t){for(var n=-1,i=e.length,r=0,o=[];++n<i;){var s=e[n],a=t?t(s):s;if(!n||!$s(a,l)){var l=a;o[r++]=0===s?0:s}}return o}function sr(e){return"number"==typeof e?e:ua(e)?f:+e}function ar(e){if("string"==typeof e)return e;if(qs(e))return At(e,ar)+"";if(ua(e))return jn?jn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function lr(e,t,n){var i=-1,r=_t,o=e.length,s=!0,a=[],l=a;if(n)s=!1,r=Wt;else if(o>=200){var u=t?null:zr(e);if(u)return nn(u);s=!1,r=qt,l=new zn}else l=t?[]:a;e:for(;++i<o;){var d=e[i],c=t?t(d):d;if(d=n||0!==d?d:0,s&&c==c){for(var f=l.length;f--;)if(l[f]===c)continue e;t&&l.push(c),a.push(d)}else r(l,c,n)||(l!==a&&l.push(c),a.push(d))}return a}function ur(e,t){return null==(e=Lo(e,t=wr(t,e)))||delete e[jo(Jo(t))]}function dr(e,t,n,i){return Ji(e,t,n(Ci(e,t)),i)}function cr(e,t,n,i){for(var r=e.length,o=i?r:-1;(i?o--:++o<r)&&t(e[o],o,e););return n?tr(e,i?0:o,i?o+1:r):tr(e,i?o+1:0,i?r:o)}function fr(e,t){var n=e;return n instanceof Hn&&(n=n.value()),Et(t,(function(e,t){return t.func.apply(t.thisArg,Lt([e],t.args))}),n)}function hr(e,t,n){var r=e.length;if(r<2)return r?lr(e[0]):[];for(var o=-1,s=i(r);++o<r;)for(var a=e[o],l=-1;++l<r;)l!=o&&(s[o]=di(s[o]||a,e[l],t,n));return lr(mi(s,1),t,n)}function pr(e,t,n){for(var i=-1,o=e.length,s=t.length,a={};++i<o;){var l=i<s?t[i]:r;n(a,e[i],l)}return a}function gr(e){return Ys(e)?e:[]}function mr(e){return"function"==typeof e?e:rl}function wr(e,t){return qs(e)?e:vo(e,t)?[e]:Do(va(e))}var yr=Yi;function vr(e,t,n){var i=e.length;return n=n===r?i:n,!t&&n>=i?e:tr(e,t,n)}var br=dt||function(e){return ot.clearTimeout(e)};function Sr(e,t){if(t)return e.slice();var n=e.length,i=He?He(n):new e.constructor(n);return e.copy(i),i}function Cr(e){var t=new e.constructor(e.byteLength);return new Ue(t).set(new Ue(e)),t}function _r(e,t){var n=t?Cr(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Wr(e,t){if(e!==t){var n=e!==r,i=null===e,o=e==e,s=ua(e),a=t!==r,l=null===t,u=t==t,d=ua(t);if(!l&&!d&&!s&&e>t||s&&a&&u&&!l&&!d||i&&a&&u||!n&&u||!o)return 1;if(!i&&!s&&!d&&e<t||d&&n&&o&&!i&&!s||l&&n&&o||!a&&o||!u)return-1}return 0}function Ar(e,t,n,r){for(var o=-1,s=e.length,a=n.length,l=-1,u=t.length,d=wn(s-a,0),c=i(u+d),f=!r;++l<u;)c[l]=t[l];for(;++o<a;)(f||o<s)&&(c[n[o]]=e[o]);for(;d--;)c[l++]=e[o++];return c}function Lr(e,t,n,r){for(var o=-1,s=e.length,a=-1,l=n.length,u=-1,d=t.length,c=wn(s-l,0),f=i(c+d),h=!r;++o<c;)f[o]=e[o];for(var p=o;++u<d;)f[p+u]=t[u];for(;++a<l;)(h||o<s)&&(f[p+n[a]]=e[o++]);return f}function Er(e,t){var n=-1,r=e.length;for(t||(t=i(r));++n<r;)t[n]=e[n];return t}function Tr(e,t,n,i){var o=!n;n||(n={});for(var s=-1,a=t.length;++s<a;){var l=t[s],u=i?i(n[l],e[l],l,n,e):r;u===r&&(u=e[l]),o?ri(n,l,u):ei(n,l,u)}return n}function Or(e,t){return function(n,i){var r=qs(n)?yt:ni,o=t?t():{};return r(n,e,so(i,2),o)}}function kr(e){return Yi((function(t,n){var i=-1,o=n.length,s=o>1?n[o-1]:r,a=o>2?n[2]:r;for(s=e.length>3&&"function"==typeof s?(o--,s):r,a&&yo(n[0],n[1],a)&&(s=o<3?r:s,o=1),t=We(t);++i<o;){var l=n[i];l&&e(t,l,i,s)}return t}))}function Ir(e,t){return function(n,i){if(null==n)return n;if(!zs(n))return e(n,i);for(var r=n.length,o=t?r:-1,s=We(n);(t?o--:++o<r)&&!1!==i(s[o],o,s););return n}}function Rr(e){return function(t,n,i){for(var r=-1,o=We(t),s=i(t),a=s.length;a--;){var l=s[e?a:++r];if(!1===n(o[l],l,o))break}return t}}function Nr(e){return function(t){var n=Zt(t=va(t))?sn(t):r,i=n?n[0]:t.charAt(0),o=n?vr(n,1).join(""):t.slice(1);return i[e]()+o}}function Pr(e){return function(t){return Et(Za(Ga(t).replace(Ge,"")),e,"")}}function Mr(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Bn(e.prototype),i=e.apply(n,t);return ta(i)?i:n}}function Fr(e){return function(t,n,i){var o=We(t);if(!zs(t)){var s=so(n,3);t=Ra(t),n=function(e){return s(o[e],e,o)}}var a=e(t,n,i);return a>-1?o[s?t[a]:a]:r}}function Dr(e){return eo((function(t){var n=t.length,i=n,s=Un.prototype.thru;for(e&&t.reverse();i--;){var a=t[i];if("function"!=typeof a)throw new Ee(o);if(s&&!l&&"wrapper"==ro(a))var l=new Un([],!0)}for(i=l?i:n;++i<n;){var u=ro(a=t[i]),d="wrapper"==u?io(a):r;l=d&&bo(d[0])&&424==d[1]&&!d[4].length&&1==d[9]?l[ro(d[0])].apply(l,d[3]):1==a.length&&bo(a)?l[u]():l.thru(a)}return function(){var e=arguments,i=e[0];if(l&&1==e.length&&qs(i))return l.plant(i).value();for(var r=0,o=n?t[r].apply(this,e):i;++r<n;)o=t[r].call(this,o);return o}}))}function jr(e,t,n,o,s,a,l,d,c,f){var h=t&u,p=1&t,g=2&t,m=24&t,w=512&t,y=g?r:Mr(e);return function r(){for(var u=arguments.length,v=i(u),b=u;b--;)v[b]=arguments[b];if(m)var S=oo(r),C=Yt(v,S);if(o&&(v=Ar(v,o,s,m)),a&&(v=Lr(v,a,l,m)),u-=C,m&&u<f){var _=tn(v,S);return qr(e,t,jr,r.placeholder,n,v,_,d,c,f-u)}var W=p?n:this,A=g?W[e]:e;return u=v.length,d?v=Eo(v,d):w&&u>1&&v.reverse(),h&&c<u&&(v.length=c),this&&this!==ot&&this instanceof r&&(A=y||Mr(A)),A.apply(W,v)}}function xr(e,t){return function(n,i){return function(e,t,n,i){return vi(e,(function(e,r,o){t(i,n(e),r,o)})),i}(n,e,t(i),{})}}function Br(e,t){return function(n,i){var o;if(n===r&&i===r)return t;if(n!==r&&(o=n),i!==r){if(o===r)return i;"string"==typeof n||"string"==typeof i?(n=ar(n),i=ar(i)):(n=sr(n),i=sr(i)),o=e(n,i)}return o}}function $r(e){return eo((function(t){return t=At(t,Ht(so())),Yi((function(n){var i=this;return e(t,(function(e){return wt(e,i,n)}))}))}))}function Ur(e,t){var n=(t=t===r?" ":ar(t)).length;if(n<2)return n?zi(t,e):t;var i=zi(t,dn(e/on(t)));return Zt(t)?vr(sn(i),0,e).join(""):i.slice(0,e)}function Hr(e){return function(t,n,o){return o&&"number"!=typeof o&&yo(t,n,o)&&(n=o=r),t=pa(t),n===r?(n=t,t=0):n=pa(n),function(e,t,n,r){for(var o=-1,s=wn(dn((t-e)/(n||1)),0),a=i(s);s--;)a[r?s:++o]=e,e+=n;return a}(t,n,o=o===r?t<n?1:-1:pa(o),e)}}function Gr(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=wa(t),n=wa(n)),e(t,n)}}function qr(e,t,n,i,o,s,a,u,d,c){var f=8&t;t|=f?l:64,4&(t&=~(f?64:l))||(t&=-4);var h=[e,t,o,f?s:r,f?a:r,f?r:s,f?r:a,u,d,c],p=n.apply(r,h);return bo(e)&&Oo(p,h),p.placeholder=i,Ro(p,e,t)}function Vr(e){var t=_e[e];return function(e,n){if(e=wa(e),(n=null==n?0:yn(ga(n),292))&&pn(e)){var i=(va(e)+"e").split("e");return+((i=(va(t(i[0]+"e"+(+i[1]+n)))+"e").split("e"))[0]+"e"+(+i[1]-n))}return t(e)}}var zr=Ln&&1/nn(new Ln([,-0]))[1]==d?function(e){return new Ln(e)}:ul;function Yr(e){return function(t){var n=ho(t);return n==C?Xt(t):n==E?rn(t):function(e,t){return At(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Kr(e,t,n,s,d,c,f,h){var p=2&t;if(!p&&"function"!=typeof e)throw new Ee(o);var g=s?s.length:0;if(g||(t&=-97,s=d=r),f=f===r?f:wn(ga(f),0),h=h===r?h:ga(h),g-=d?d.length:0,64&t){var m=s,w=d;s=d=r}var y=p?r:io(e),v=[e,t,n,s,d,m,w,c,f,h];if(y&&function(e,t){var n=e[1],i=t[1],r=n|i,o=r<131,s=i==u&&8==n||i==u&&256==n&&e[7].length<=t[8]||384==i&&t[7].length<=t[8]&&8==n;if(!o&&!s)return e;1&i&&(e[2]=t[2],r|=1&n?0:4);var l=t[3];if(l){var d=e[3];e[3]=d?Ar(d,l,t[4]):l,e[4]=d?tn(e[3],a):t[4]}(l=t[5])&&(d=e[5],e[5]=d?Lr(d,l,t[6]):l,e[6]=d?tn(e[5],a):t[6]),(l=t[7])&&(e[7]=l),i&u&&(e[8]=null==e[8]?t[8]:yn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=r}(v,y),e=v[0],t=v[1],n=v[2],s=v[3],d=v[4],!(h=v[9]=v[9]===r?p?0:e.length:wn(v[9]-g,0))&&24&t&&(t&=-25),t&&1!=t)b=8==t||16==t?function(e,t,n){var o=Mr(e);return function s(){for(var a=arguments.length,l=i(a),u=a,d=oo(s);u--;)l[u]=arguments[u];var c=a<3&&l[0]!==d&&l[a-1]!==d?[]:tn(l,d);return(a-=c.length)<n?qr(e,t,jr,s.placeholder,r,l,c,r,r,n-a):wt(this&&this!==ot&&this instanceof s?o:e,this,l)}}(e,t,h):t!=l&&33!=t||d.length?jr.apply(r,v):function(e,t,n,r){var o=1&t,s=Mr(e);return function t(){for(var a=-1,l=arguments.length,u=-1,d=r.length,c=i(d+l),f=this&&this!==ot&&this instanceof t?s:e;++u<d;)c[u]=r[u];for(;l--;)c[u++]=arguments[++a];return wt(f,o?n:this,c)}}(e,t,n,s);else var b=function(e,t,n){var i=1&t,r=Mr(e);return function t(){return(this&&this!==ot&&this instanceof t?r:e).apply(i?n:this,arguments)}}(e,t,n);return Ro((y?Zi:Oo)(b,v),e,t)}function Qr(e,t,n,i){return e===r||$s(e,ke[n])&&!Ne.call(i,n)?t:e}function Jr(e,t,n,i,o,s){return ta(e)&&ta(t)&&(s.set(t,e),Bi(e,t,r,Jr,s),s.delete(t)),e}function Zr(e){return oa(e)?r:e}function Xr(e,t,n,i,o,s){var a=1&n,l=e.length,u=t.length;if(l!=u&&!(a&&u>l))return!1;var d=s.get(e),c=s.get(t);if(d&&c)return d==t&&c==e;var f=-1,h=!0,p=2&n?new zn:r;for(s.set(e,t),s.set(t,e);++f<l;){var g=e[f],m=t[f];if(i)var w=a?i(m,g,f,t,e,s):i(g,m,f,e,t,s);if(w!==r){if(w)continue;h=!1;break}if(p){if(!Ot(t,(function(e,t){if(!qt(p,t)&&(g===e||o(g,e,n,i,s)))return p.push(t)}))){h=!1;break}}else if(g!==m&&!o(g,m,n,i,s)){h=!1;break}}return s.delete(e),s.delete(t),h}function eo(e){return Io(Ao(e,r,Vo),e+"")}function to(e){return _i(e,Ra,co)}function no(e){return _i(e,Na,fo)}var io=On?function(e){return On.get(e)}:ul;function ro(e){for(var t=e.name+"",n=kn[t],i=Ne.call(kn,t)?n.length:0;i--;){var r=n[i],o=r.func;if(null==o||o==e)return r.name}return t}function oo(e){return(Ne.call(xn,"placeholder")?xn:e).placeholder}function so(){var e=xn.iteratee||ol;return e=e===ol?Pi:e,arguments.length?e(arguments[0],arguments[1]):e}function ao(e,t){var n,i,r=e.__data__;return("string"==(i=typeof(n=t))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==n:null===n)?r["string"==typeof t?"string":"hash"]:r.map}function lo(e){for(var t=Ra(e),n=t.length;n--;){var i=t[n],r=e[i];t[n]=[i,r,_o(r)]}return t}function uo(e,t){var n=function(e,t){return null==e?r:e[t]}(e,t);return Ni(n)?n:r}var co=fn?function(e){return null==e?[]:(e=We(e),Ct(fn(e),(function(t){return et.call(e,t)})))}:ml,fo=fn?function(e){for(var t=[];e;)Lt(t,co(e)),e=Ve(e);return t}:ml,ho=Wi;function po(e,t,n){for(var i=-1,r=(t=wr(t,e)).length,o=!1;++i<r;){var s=jo(t[i]);if(!(o=null!=e&&n(e,s)))break;e=e[s]}return o||++i!=r?o:!!(r=null==e?0:e.length)&&ea(r)&&wo(s,r)&&(qs(e)||Gs(e))}function go(e){return"function"!=typeof e.constructor||Co(e)?{}:Bn(Ve(e))}function mo(e){return qs(e)||Gs(e)||!!(rt&&e&&e[rt])}function wo(e,t){var n=typeof e;return!!(t=null==t?c:t)&&("number"==n||"symbol"!=n&&we.test(e))&&e>-1&&e%1==0&&e<t}function yo(e,t,n){if(!ta(n))return!1;var i=typeof t;return!!("number"==i?zs(n)&&wo(t,n.length):"string"==i&&t in n)&&$s(n[t],e)}function vo(e,t){if(qs(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!ua(e))||X.test(e)||!Z.test(e)||null!=t&&e in We(t)}function bo(e){var t=ro(e),n=xn[t];if("function"!=typeof n||!(t in Hn.prototype))return!1;if(e===n)return!0;var i=io(n);return!!i&&e===i[0]}(_n&&ho(new _n(new ArrayBuffer(1)))!=R||Wn&&ho(new Wn)!=C||An&&ho(An.resolve())!=A||Ln&&ho(new Ln)!=E||En&&ho(new En)!=k)&&(ho=function(e){var t=Wi(e),n=t==W?e.constructor:r,i=n?xo(n):"";if(i)switch(i){case In:return R;case Rn:return C;case Nn:return A;case Pn:return E;case Mn:return k}return t});var So=Ie?Zs:wl;function Co(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ke)}function _o(e){return e==e&&!ta(e)}function Wo(e,t){return function(n){return null!=n&&n[e]===t&&(t!==r||e in We(n))}}function Ao(e,t,n){return t=wn(t===r?e.length-1:t,0),function(){for(var r=arguments,o=-1,s=wn(r.length-t,0),a=i(s);++o<s;)a[o]=r[t+o];o=-1;for(var l=i(t+1);++o<t;)l[o]=r[o];return l[t]=n(a),wt(e,this,l)}}function Lo(e,t){return t.length<2?e:Ci(e,tr(t,0,-1))}function Eo(e,t){for(var n=e.length,i=yn(t.length,n),o=Er(e);i--;){var s=t[i];e[i]=wo(s,n)?o[s]:r}return e}function To(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Oo=No(Zi),ko=jt||function(e,t){return ot.setTimeout(e,t)},Io=No(Xi);function Ro(e,t,n){var i=t+"";return Io(e,function(e,t){var n=t.length;if(!n)return e;var i=n-1;return t[i]=(n>1?"& ":"")+t[i],t=t.join(n>2?", ":" "),e.replace(oe,"{\n/* [wrapped with "+t+"] */\n")}(i,function(e,t){return vt(p,(function(n){var i="_."+n[0];t&n[1]&&!_t(e,i)&&e.push(i)})),e.sort()}(function(e){var t=e.match(se);return t?t[1].split(ae):[]}(i),n)))}function No(e){var t=0,n=0;return function(){var i=vn(),o=16-(i-n);if(n=i,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(r,arguments)}}function Po(e,t){var n=-1,i=e.length,o=i-1;for(t=t===r?i:t;++n<t;){var s=Vi(n,o),a=e[s];e[s]=e[n],e[n]=a}return e.length=t,e}var Mo,Fo,Do=(Mo=Ms((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,(function(e,n,i,r){t.push(i?r.replace(de,"$1"):n||e)})),t}),(function(e){return 500===Fo.size&&Fo.clear(),e})),Fo=Mo.cache,Mo);function jo(e){if("string"==typeof e||ua(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function xo(e){if(null!=e){try{return Re.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Bo(e){if(e instanceof Hn)return e.clone();var t=new Un(e.__wrapped__,e.__chain__);return t.__actions__=Er(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var $o=Yi((function(e,t){return Ys(e)?di(e,mi(t,1,Ys,!0)):[]})),Uo=Yi((function(e,t){var n=Jo(t);return Ys(n)&&(n=r),Ys(e)?di(e,mi(t,1,Ys,!0),so(n,2)):[]})),Ho=Yi((function(e,t){var n=Jo(t);return Ys(n)&&(n=r),Ys(e)?di(e,mi(t,1,Ys,!0),r,n):[]}));function Go(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var r=null==n?0:ga(n);return r<0&&(r=wn(i+r,0)),Rt(e,so(t,3),r)}function qo(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var o=i-1;return n!==r&&(o=ga(n),o=n<0?wn(i+o,0):yn(o,i-1)),Rt(e,so(t,3),o,!0)}function Vo(e){return null!=e&&e.length?mi(e,1):[]}function zo(e){return e&&e.length?e[0]:r}var Yo=Yi((function(e){var t=At(e,gr);return t.length&&t[0]===e[0]?Ti(t):[]})),Ko=Yi((function(e){var t=Jo(e),n=At(e,gr);return t===Jo(n)?t=r:n.pop(),n.length&&n[0]===e[0]?Ti(n,so(t,2)):[]})),Qo=Yi((function(e){var t=Jo(e),n=At(e,gr);return(t="function"==typeof t?t:r)&&n.pop(),n.length&&n[0]===e[0]?Ti(n,r,t):[]}));function Jo(e){var t=null==e?0:e.length;return t?e[t-1]:r}var Zo=Yi(Xo);function Xo(e,t){return e&&e.length&&t&&t.length?Gi(e,t):e}var es=eo((function(e,t){var n=null==e?0:e.length,i=oi(e,t);return qi(e,At(t,(function(e){return wo(e,n)?+e:e})).sort(Wr)),i}));function ts(e){return null==e?e:Cn.call(e)}var ns=Yi((function(e){return lr(mi(e,1,Ys,!0))})),is=Yi((function(e){var t=Jo(e);return Ys(t)&&(t=r),lr(mi(e,1,Ys,!0),so(t,2))})),rs=Yi((function(e){var t=Jo(e);return t="function"==typeof t?t:r,lr(mi(e,1,Ys,!0),r,t)}));function os(e){if(!e||!e.length)return[];var t=0;return e=Ct(e,(function(e){if(Ys(e))return t=wn(e.length,t),!0})),$t(t,(function(t){return At(e,Dt(t))}))}function ss(e,t){if(!e||!e.length)return[];var n=os(e);return null==t?n:At(n,(function(e){return wt(t,r,e)}))}var as=Yi((function(e,t){return Ys(e)?di(e,t):[]})),ls=Yi((function(e){return hr(Ct(e,Ys))})),us=Yi((function(e){var t=Jo(e);return Ys(t)&&(t=r),hr(Ct(e,Ys),so(t,2))})),ds=Yi((function(e){var t=Jo(e);return t="function"==typeof t?t:r,hr(Ct(e,Ys),r,t)})),cs=Yi(os),fs=Yi((function(e){var t=e.length,n=t>1?e[t-1]:r;return n="function"==typeof n?(e.pop(),n):r,ss(e,n)}));function hs(e){var t=xn(e);return t.__chain__=!0,t}function ps(e,t){return t(e)}var gs=eo((function(e){var t=e.length,n=t?e[0]:0,i=this.__wrapped__,o=function(t){return oi(t,e)};return!(t>1||this.__actions__.length)&&i instanceof Hn&&wo(n)?((i=i.slice(n,+n+(t?1:0))).__actions__.push({func:ps,args:[o],thisArg:r}),new Un(i,this.__chain__).thru((function(e){return t&&!e.length&&e.push(r),e}))):this.thru(o)})),ms=Or((function(e,t,n){Ne.call(e,n)?++e[n]:ri(e,n,1)})),ws=Fr(Go),ys=Fr(qo);function vs(e,t){return(qs(e)?vt:ci)(e,so(t,3))}function bs(e,t){return(qs(e)?bt:fi)(e,so(t,3))}var Ss=Or((function(e,t,n){Ne.call(e,n)?e[n].push(t):ri(e,n,[t])})),Cs=Yi((function(e,t,n){var r=-1,o="function"==typeof t,s=zs(e)?i(e.length):[];return ci(e,(function(e){s[++r]=o?wt(t,e,n):Oi(e,t,n)})),s})),_s=Or((function(e,t,n){ri(e,n,t)}));function Ws(e,t){return(qs(e)?At:Di)(e,so(t,3))}var As=Or((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),Ls=Yi((function(e,t){if(null==e)return[];var n=t.length;return n>1&&yo(e,t[0],t[1])?t=[]:n>2&&yo(t[0],t[1],t[2])&&(t=[t[0]]),Ui(e,mi(t,1),[])})),Es=kt||function(){return ot.Date.now()};function Ts(e,t,n){return t=n?r:t,t=e&&null==t?e.length:t,Kr(e,u,r,r,r,r,t)}function Os(e,t){var n;if("function"!=typeof t)throw new Ee(o);return e=ga(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=r),n}}var ks=Yi((function(e,t,n){var i=1;if(n.length){var r=tn(n,oo(ks));i|=l}return Kr(e,i,t,n,r)})),Is=Yi((function(e,t,n){var i=3;if(n.length){var r=tn(n,oo(Is));i|=l}return Kr(t,i,e,n,r)}));function Rs(e,t,n){var i,s,a,l,u,d,c=0,f=!1,h=!1,p=!0;if("function"!=typeof e)throw new Ee(o);function g(t){var n=i,o=s;return i=s=r,c=t,l=e.apply(o,n)}function m(e){return c=e,u=ko(y,t),f?g(e):l}function w(e){var n=e-d;return d===r||n>=t||n<0||h&&e-c>=a}function y(){var e=Es();if(w(e))return v(e);u=ko(y,function(e){var n=t-(e-d);return h?yn(n,a-(e-c)):n}(e))}function v(e){return u=r,p&&i?g(e):(i=s=r,l)}function b(){var e=Es(),n=w(e);if(i=arguments,s=this,d=e,n){if(u===r)return m(d);if(h)return br(u),u=ko(y,t),g(d)}return u===r&&(u=ko(y,t)),l}return t=wa(t)||0,ta(n)&&(f=!!n.leading,a=(h="maxWait"in n)?wn(wa(n.maxWait)||0,t):a,p="trailing"in n?!!n.trailing:p),b.cancel=function(){u!==r&&br(u),c=0,i=d=s=u=r},b.flush=function(){return u===r?l:v(Es())},b}var Ns=Yi((function(e,t){return ui(e,1,t)})),Ps=Yi((function(e,t,n){return ui(e,wa(t)||0,n)}));function Ms(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ee(o);var n=function(){var i=arguments,r=t?t.apply(this,i):i[0],o=n.cache;if(o.has(r))return o.get(r);var s=e.apply(this,i);return n.cache=o.set(r,s)||o,s};return n.cache=new(Ms.Cache||Vn),n}function Fs(e){if("function"!=typeof e)throw new Ee(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Ms.Cache=Vn;var Ds=yr((function(e,t){var n=(t=1==t.length&&qs(t[0])?At(t[0],Ht(so())):At(mi(t,1),Ht(so()))).length;return Yi((function(i){for(var r=-1,o=yn(i.length,n);++r<o;)i[r]=t[r].call(this,i[r]);return wt(e,this,i)}))})),js=Yi((function(e,t){var n=tn(t,oo(js));return Kr(e,l,r,t,n)})),xs=Yi((function(e,t){var n=tn(t,oo(xs));return Kr(e,64,r,t,n)})),Bs=eo((function(e,t){return Kr(e,256,r,r,r,t)}));function $s(e,t){return e===t||e!=e&&t!=t}var Us=Gr(Ai),Hs=Gr((function(e,t){return e>=t})),Gs=ki(function(){return arguments}())?ki:function(e){return na(e)&&Ne.call(e,"callee")&&!et.call(e,"callee")},qs=i.isArray,Vs=ct?Ht(ct):function(e){return na(e)&&Wi(e)==I};function zs(e){return null!=e&&ea(e.length)&&!Zs(e)}function Ys(e){return na(e)&&zs(e)}var Ks=hn||wl,Qs=ft?Ht(ft):function(e){return na(e)&&Wi(e)==y};function Js(e){if(!na(e))return!1;var t=Wi(e);return t==v||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!oa(e)}function Zs(e){if(!ta(e))return!1;var t=Wi(e);return t==b||t==S||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Xs(e){return"number"==typeof e&&e==ga(e)}function ea(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=c}function ta(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function na(e){return null!=e&&"object"==typeof e}var ia=ht?Ht(ht):function(e){return na(e)&&ho(e)==C};function ra(e){return"number"==typeof e||na(e)&&Wi(e)==_}function oa(e){if(!na(e)||Wi(e)!=W)return!1;var t=Ve(e);if(null===t)return!0;var n=Ne.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Re.call(n)==De}var sa=pt?Ht(pt):function(e){return na(e)&&Wi(e)==L},aa=gt?Ht(gt):function(e){return na(e)&&ho(e)==E};function la(e){return"string"==typeof e||!qs(e)&&na(e)&&Wi(e)==T}function ua(e){return"symbol"==typeof e||na(e)&&Wi(e)==O}var da=mt?Ht(mt):function(e){return na(e)&&ea(e.length)&&!!Ze[Wi(e)]},ca=Gr(Fi),fa=Gr((function(e,t){return e<=t}));function ha(e){if(!e)return[];if(zs(e))return la(e)?sn(e):Er(e);if(st&&e[st])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[st]());var t=ho(e);return(t==C?Xt:t==E?nn:$a)(e)}function pa(e){return e?(e=wa(e))===d||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ga(e){var t=pa(e),n=t%1;return t==t?n?t-n:t:0}function ma(e){return e?si(ga(e),0,h):0}function wa(e){if("number"==typeof e)return e;if(ua(e))return f;if(ta(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ta(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Ut(e);var n=pe.test(e);return n||me.test(e)?nt(e.slice(2),n?2:8):he.test(e)?f:+e}function ya(e){return Tr(e,Na(e))}function va(e){return null==e?"":ar(e)}var ba=kr((function(e,t){if(Co(t)||zs(t))Tr(t,Ra(t),e);else for(var n in t)Ne.call(t,n)&&ei(e,n,t[n])})),Sa=kr((function(e,t){Tr(t,Na(t),e)})),Ca=kr((function(e,t,n,i){Tr(t,Na(t),e,i)})),_a=kr((function(e,t,n,i){Tr(t,Ra(t),e,i)})),Wa=eo(oi),Aa=Yi((function(e,t){e=We(e);var n=-1,i=t.length,o=i>2?t[2]:r;for(o&&yo(t[0],t[1],o)&&(i=1);++n<i;)for(var s=t[n],a=Na(s),l=-1,u=a.length;++l<u;){var d=a[l],c=e[d];(c===r||$s(c,ke[d])&&!Ne.call(e,d))&&(e[d]=s[d])}return e})),La=Yi((function(e){return e.push(r,Jr),wt(Ma,r,e)}));function Ea(e,t,n){var i=null==e?r:Ci(e,t);return i===r?n:i}function Ta(e,t){return null!=e&&po(e,t,Ei)}var Oa=xr((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Fe.call(t)),e[t]=n}),tl(rl)),ka=xr((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Fe.call(t)),Ne.call(e,t)?e[t].push(n):e[t]=[n]}),so),Ia=Yi(Oi);function Ra(e){return zs(e)?Kn(e):Mi(e)}function Na(e){return zs(e)?Kn(e,!0):function(e){if(!ta(e))return function(e){var t=[];if(null!=e)for(var n in We(e))t.push(n);return t}(e);var t=Co(e),n=[];for(var i in e)("constructor"!=i||!t&&Ne.call(e,i))&&n.push(i);return n}(e)}var Pa=kr((function(e,t,n){Bi(e,t,n)})),Ma=kr((function(e,t,n,i){Bi(e,t,n,i)})),Fa=eo((function(e,t){var n={};if(null==e)return n;var i=!1;t=At(t,(function(t){return t=wr(t,e),i||(i=t.length>1),t})),Tr(e,no(e),n),i&&(n=ai(n,7,Zr));for(var r=t.length;r--;)ur(n,t[r]);return n})),Da=eo((function(e,t){return null==e?{}:function(e,t){return Hi(e,t,(function(t,n){return Ta(e,n)}))}(e,t)}));function ja(e,t){if(null==e)return{};var n=At(no(e),(function(e){return[e]}));return t=so(t),Hi(e,n,(function(e,n){return t(e,n[0])}))}var xa=Yr(Ra),Ba=Yr(Na);function $a(e){return null==e?[]:Gt(e,Ra(e))}var Ua=Pr((function(e,t,n){return t=t.toLowerCase(),e+(n?Ha(t):t)}));function Ha(e){return Ja(va(e).toLowerCase())}function Ga(e){return(e=va(e))&&e.replace(ye,Kt).replace(qe,"")}var qa=Pr((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Va=Pr((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),za=Nr("toLowerCase"),Ya=Pr((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),Ka=Pr((function(e,t,n){return e+(n?" ":"")+Ja(t)})),Qa=Pr((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Ja=Nr("toUpperCase");function Za(e,t,n){return e=va(e),(t=n?r:t)===r?function(e){return Ke.test(e)}(e)?function(e){return e.match(ze)||[]}(e):function(e){return e.match(le)||[]}(e):e.match(t)||[]}var Xa=Yi((function(e,t){try{return wt(e,r,t)}catch(e){return Js(e)?e:new Se(e)}})),el=eo((function(e,t){return vt(t,(function(t){t=jo(t),ri(e,t,ks(e[t],e))})),e}));function tl(e){return function(){return e}}var nl=Dr(),il=Dr(!0);function rl(e){return e}function ol(e){return Pi("function"==typeof e?e:ai(e,1))}var sl=Yi((function(e,t){return function(n){return Oi(n,e,t)}})),al=Yi((function(e,t){return function(n){return Oi(e,n,t)}}));function ll(e,t,n){var i=Ra(t),r=Si(t,i);null!=n||ta(t)&&(r.length||!i.length)||(n=t,t=e,e=this,r=Si(t,Ra(t)));var o=!(ta(n)&&"chain"in n&&!n.chain),s=Zs(e);return vt(r,(function(n){var i=t[n];e[n]=i,s&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__),r=n.__actions__=Er(this.__actions__);return r.push({func:i,args:arguments,thisArg:e}),n.__chain__=t,n}return i.apply(e,Lt([this.value()],arguments))})})),e}function ul(){}var dl=$r(At),cl=$r(St),fl=$r(Ot);function hl(e){return vo(e)?Dt(jo(e)):function(e){return function(t){return Ci(t,e)}}(e)}var pl=Hr(),gl=Hr(!0);function ml(){return[]}function wl(){return!1}var yl,vl=Br((function(e,t){return e+t}),0),bl=Vr("ceil"),Sl=Br((function(e,t){return e/t}),1),Cl=Vr("floor"),_l=Br((function(e,t){return e*t}),1),Wl=Vr("round"),Al=Br((function(e,t){return e-t}),0);return xn.after=function(e,t){if("function"!=typeof t)throw new Ee(o);return e=ga(e),function(){if(--e<1)return t.apply(this,arguments)}},xn.ary=Ts,xn.assign=ba,xn.assignIn=Sa,xn.assignInWith=Ca,xn.assignWith=_a,xn.at=Wa,xn.before=Os,xn.bind=ks,xn.bindAll=el,xn.bindKey=Is,xn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return qs(e)?e:[e]},xn.chain=hs,xn.chunk=function(e,t,n){t=(n?yo(e,t,n):t===r)?1:wn(ga(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var s=0,a=0,l=i(dn(o/t));s<o;)l[a++]=tr(e,s,s+=t);return l},xn.compact=function(e){for(var t=-1,n=null==e?0:e.length,i=0,r=[];++t<n;){var o=e[t];o&&(r[i++]=o)}return r},xn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=i(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return Lt(qs(n)?Er(n):[n],mi(t,1))},xn.cond=function(e){var t=null==e?0:e.length,n=so();return e=t?At(e,(function(e){if("function"!=typeof e[1])throw new Ee(o);return[n(e[0]),e[1]]})):[],Yi((function(n){for(var i=-1;++i<t;){var r=e[i];if(wt(r[0],this,n))return wt(r[1],this,n)}}))},xn.conforms=function(e){return function(e){var t=Ra(e);return function(n){return li(n,e,t)}}(ai(e,1))},xn.constant=tl,xn.countBy=ms,xn.create=function(e,t){var n=Bn(e);return null==t?n:ii(n,t)},xn.curry=function e(t,n,i){var o=Kr(t,8,r,r,r,r,r,n=i?r:n);return o.placeholder=e.placeholder,o},xn.curryRight=function e(t,n,i){var o=Kr(t,16,r,r,r,r,r,n=i?r:n);return o.placeholder=e.placeholder,o},xn.debounce=Rs,xn.defaults=Aa,xn.defaultsDeep=La,xn.defer=Ns,xn.delay=Ps,xn.difference=$o,xn.differenceBy=Uo,xn.differenceWith=Ho,xn.drop=function(e,t,n){var i=null==e?0:e.length;return i?tr(e,(t=n||t===r?1:ga(t))<0?0:t,i):[]},xn.dropRight=function(e,t,n){var i=null==e?0:e.length;return i?tr(e,0,(t=i-(t=n||t===r?1:ga(t)))<0?0:t):[]},xn.dropRightWhile=function(e,t){return e&&e.length?cr(e,so(t,3),!0,!0):[]},xn.dropWhile=function(e,t){return e&&e.length?cr(e,so(t,3),!0):[]},xn.fill=function(e,t,n,i){var o=null==e?0:e.length;return o?(n&&"number"!=typeof n&&yo(e,t,n)&&(n=0,i=o),function(e,t,n,i){var o=e.length;for((n=ga(n))<0&&(n=-n>o?0:o+n),(i=i===r||i>o?o:ga(i))<0&&(i+=o),i=n>i?0:ma(i);n<i;)e[n++]=t;return e}(e,t,n,i)):[]},xn.filter=function(e,t){return(qs(e)?Ct:gi)(e,so(t,3))},xn.flatMap=function(e,t){return mi(Ws(e,t),1)},xn.flatMapDeep=function(e,t){return mi(Ws(e,t),d)},xn.flatMapDepth=function(e,t,n){return n=n===r?1:ga(n),mi(Ws(e,t),n)},xn.flatten=Vo,xn.flattenDeep=function(e){return null!=e&&e.length?mi(e,d):[]},xn.flattenDepth=function(e,t){return null!=e&&e.length?mi(e,t=t===r?1:ga(t)):[]},xn.flip=function(e){return Kr(e,512)},xn.flow=nl,xn.flowRight=il,xn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,i={};++t<n;){var r=e[t];i[r[0]]=r[1]}return i},xn.functions=function(e){return null==e?[]:Si(e,Ra(e))},xn.functionsIn=function(e){return null==e?[]:Si(e,Na(e))},xn.groupBy=Ss,xn.initial=function(e){return null!=e&&e.length?tr(e,0,-1):[]},xn.intersection=Yo,xn.intersectionBy=Ko,xn.intersectionWith=Qo,xn.invert=Oa,xn.invertBy=ka,xn.invokeMap=Cs,xn.iteratee=ol,xn.keyBy=_s,xn.keys=Ra,xn.keysIn=Na,xn.map=Ws,xn.mapKeys=function(e,t){var n={};return t=so(t,3),vi(e,(function(e,i,r){ri(n,t(e,i,r),e)})),n},xn.mapValues=function(e,t){var n={};return t=so(t,3),vi(e,(function(e,i,r){ri(n,i,t(e,i,r))})),n},xn.matches=function(e){return ji(ai(e,1))},xn.matchesProperty=function(e,t){return xi(e,ai(t,1))},xn.memoize=Ms,xn.merge=Pa,xn.mergeWith=Ma,xn.method=sl,xn.methodOf=al,xn.mixin=ll,xn.negate=Fs,xn.nthArg=function(e){return e=ga(e),Yi((function(t){return $i(t,e)}))},xn.omit=Fa,xn.omitBy=function(e,t){return ja(e,Fs(so(t)))},xn.once=function(e){return Os(2,e)},xn.orderBy=function(e,t,n,i){return null==e?[]:(qs(t)||(t=null==t?[]:[t]),qs(n=i?r:n)||(n=null==n?[]:[n]),Ui(e,t,n))},xn.over=dl,xn.overArgs=Ds,xn.overEvery=cl,xn.overSome=fl,xn.partial=js,xn.partialRight=xs,xn.partition=As,xn.pick=Da,xn.pickBy=ja,xn.property=hl,xn.propertyOf=function(e){return function(t){return null==e?r:Ci(e,t)}},xn.pull=Zo,xn.pullAll=Xo,xn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Gi(e,t,so(n,2)):e},xn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Gi(e,t,r,n):e},xn.pullAt=es,xn.range=pl,xn.rangeRight=gl,xn.rearg=Bs,xn.reject=function(e,t){return(qs(e)?Ct:gi)(e,Fs(so(t,3)))},xn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var i=-1,r=[],o=e.length;for(t=so(t,3);++i<o;){var s=e[i];t(s,i,e)&&(n.push(s),r.push(i))}return qi(e,r),n},xn.rest=function(e,t){if("function"!=typeof e)throw new Ee(o);return Yi(e,t=t===r?t:ga(t))},xn.reverse=ts,xn.sampleSize=function(e,t,n){return t=(n?yo(e,t,n):t===r)?1:ga(t),(qs(e)?Jn:Qi)(e,t)},xn.set=function(e,t,n){return null==e?e:Ji(e,t,n)},xn.setWith=function(e,t,n,i){return i="function"==typeof i?i:r,null==e?e:Ji(e,t,n,i)},xn.shuffle=function(e){return(qs(e)?Zn:er)(e)},xn.slice=function(e,t,n){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&yo(e,t,n)?(t=0,n=i):(t=null==t?0:ga(t),n=n===r?i:ga(n)),tr(e,t,n)):[]},xn.sortBy=Ls,xn.sortedUniq=function(e){return e&&e.length?or(e):[]},xn.sortedUniqBy=function(e,t){return e&&e.length?or(e,so(t,2)):[]},xn.split=function(e,t,n){return n&&"number"!=typeof n&&yo(e,t,n)&&(t=n=r),(n=n===r?h:n>>>0)?(e=va(e))&&("string"==typeof t||null!=t&&!sa(t))&&!(t=ar(t))&&Zt(e)?vr(sn(e),0,n):e.split(t,n):[]},xn.spread=function(e,t){if("function"!=typeof e)throw new Ee(o);return t=null==t?0:wn(ga(t),0),Yi((function(n){var i=n[t],r=vr(n,0,t);return i&&Lt(r,i),wt(e,this,r)}))},xn.tail=function(e){var t=null==e?0:e.length;return t?tr(e,1,t):[]},xn.take=function(e,t,n){return e&&e.length?tr(e,0,(t=n||t===r?1:ga(t))<0?0:t):[]},xn.takeRight=function(e,t,n){var i=null==e?0:e.length;return i?tr(e,(t=i-(t=n||t===r?1:ga(t)))<0?0:t,i):[]},xn.takeRightWhile=function(e,t){return e&&e.length?cr(e,so(t,3),!1,!0):[]},xn.takeWhile=function(e,t){return e&&e.length?cr(e,so(t,3)):[]},xn.tap=function(e,t){return t(e),e},xn.throttle=function(e,t,n){var i=!0,r=!0;if("function"!=typeof e)throw new Ee(o);return ta(n)&&(i="leading"in n?!!n.leading:i,r="trailing"in n?!!n.trailing:r),Rs(e,t,{leading:i,maxWait:t,trailing:r})},xn.thru=ps,xn.toArray=ha,xn.toPairs=xa,xn.toPairsIn=Ba,xn.toPath=function(e){return qs(e)?At(e,jo):ua(e)?[e]:Er(Do(va(e)))},xn.toPlainObject=ya,xn.transform=function(e,t,n){var i=qs(e),r=i||Ks(e)||da(e);if(t=so(t,4),null==n){var o=e&&e.constructor;n=r?i?new o:[]:ta(e)&&Zs(o)?Bn(Ve(e)):{}}return(r?vt:vi)(e,(function(e,i,r){return t(n,e,i,r)})),n},xn.unary=function(e){return Ts(e,1)},xn.union=ns,xn.unionBy=is,xn.unionWith=rs,xn.uniq=function(e){return e&&e.length?lr(e):[]},xn.uniqBy=function(e,t){return e&&e.length?lr(e,so(t,2)):[]},xn.uniqWith=function(e,t){return t="function"==typeof t?t:r,e&&e.length?lr(e,r,t):[]},xn.unset=function(e,t){return null==e||ur(e,t)},xn.unzip=os,xn.unzipWith=ss,xn.update=function(e,t,n){return null==e?e:dr(e,t,mr(n))},xn.updateWith=function(e,t,n,i){return i="function"==typeof i?i:r,null==e?e:dr(e,t,mr(n),i)},xn.values=$a,xn.valuesIn=function(e){return null==e?[]:Gt(e,Na(e))},xn.without=as,xn.words=Za,xn.wrap=function(e,t){return js(mr(t),e)},xn.xor=ls,xn.xorBy=us,xn.xorWith=ds,xn.zip=cs,xn.zipObject=function(e,t){return pr(e||[],t||[],ei)},xn.zipObjectDeep=function(e,t){return pr(e||[],t||[],Ji)},xn.zipWith=fs,xn.entries=xa,xn.entriesIn=Ba,xn.extend=Sa,xn.extendWith=Ca,ll(xn,xn),xn.add=vl,xn.attempt=Xa,xn.camelCase=Ua,xn.capitalize=Ha,xn.ceil=bl,xn.clamp=function(e,t,n){return n===r&&(n=t,t=r),n!==r&&(n=(n=wa(n))==n?n:0),t!==r&&(t=(t=wa(t))==t?t:0),si(wa(e),t,n)},xn.clone=function(e){return ai(e,4)},xn.cloneDeep=function(e){return ai(e,5)},xn.cloneDeepWith=function(e,t){return ai(e,5,t="function"==typeof t?t:r)},xn.cloneWith=function(e,t){return ai(e,4,t="function"==typeof t?t:r)},xn.conformsTo=function(e,t){return null==t||li(e,t,Ra(t))},xn.deburr=Ga,xn.defaultTo=function(e,t){return null==e||e!=e?t:e},xn.divide=Sl,xn.endsWith=function(e,t,n){e=va(e),t=ar(t);var i=e.length,o=n=n===r?i:si(ga(n),0,i);return(n-=t.length)>=0&&e.slice(n,o)==t},xn.eq=$s,xn.escape=function(e){return(e=va(e))&&Y.test(e)?e.replace(V,Qt):e},xn.escapeRegExp=function(e){return(e=va(e))&&ne.test(e)?e.replace(te,"\\$&"):e},xn.every=function(e,t,n){var i=qs(e)?St:hi;return n&&yo(e,t,n)&&(t=r),i(e,so(t,3))},xn.find=ws,xn.findIndex=Go,xn.findKey=function(e,t){return It(e,so(t,3),vi)},xn.findLast=ys,xn.findLastIndex=qo,xn.findLastKey=function(e,t){return It(e,so(t,3),bi)},xn.floor=Cl,xn.forEach=vs,xn.forEachRight=bs,xn.forIn=function(e,t){return null==e?e:wi(e,so(t,3),Na)},xn.forInRight=function(e,t){return null==e?e:yi(e,so(t,3),Na)},xn.forOwn=function(e,t){return e&&vi(e,so(t,3))},xn.forOwnRight=function(e,t){return e&&bi(e,so(t,3))},xn.get=Ea,xn.gt=Us,xn.gte=Hs,xn.has=function(e,t){return null!=e&&po(e,t,Li)},xn.hasIn=Ta,xn.head=zo,xn.identity=rl,xn.includes=function(e,t,n,i){e=zs(e)?e:$a(e),n=n&&!i?ga(n):0;var r=e.length;return n<0&&(n=wn(r+n,0)),la(e)?n<=r&&e.indexOf(t,n)>-1:!!r&&Nt(e,t,n)>-1},xn.indexOf=function(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var r=null==n?0:ga(n);return r<0&&(r=wn(i+r,0)),Nt(e,t,r)},xn.inRange=function(e,t,n){return t=pa(t),n===r?(n=t,t=0):n=pa(n),function(e,t,n){return e>=yn(t,n)&&e<wn(t,n)}(e=wa(e),t,n)},xn.invoke=Ia,xn.isArguments=Gs,xn.isArray=qs,xn.isArrayBuffer=Vs,xn.isArrayLike=zs,xn.isArrayLikeObject=Ys,xn.isBoolean=function(e){return!0===e||!1===e||na(e)&&Wi(e)==w},xn.isBuffer=Ks,xn.isDate=Qs,xn.isElement=function(e){return na(e)&&1===e.nodeType&&!oa(e)},xn.isEmpty=function(e){if(null==e)return!0;if(zs(e)&&(qs(e)||"string"==typeof e||"function"==typeof e.splice||Ks(e)||da(e)||Gs(e)))return!e.length;var t=ho(e);if(t==C||t==E)return!e.size;if(Co(e))return!Mi(e).length;for(var n in e)if(Ne.call(e,n))return!1;return!0},xn.isEqual=function(e,t){return Ii(e,t)},xn.isEqualWith=function(e,t,n){var i=(n="function"==typeof n?n:r)?n(e,t):r;return i===r?Ii(e,t,r,n):!!i},xn.isError=Js,xn.isFinite=function(e){return"number"==typeof e&&pn(e)},xn.isFunction=Zs,xn.isInteger=Xs,xn.isLength=ea,xn.isMap=ia,xn.isMatch=function(e,t){return e===t||Ri(e,t,lo(t))},xn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:r,Ri(e,t,lo(t),n)},xn.isNaN=function(e){return ra(e)&&e!=+e},xn.isNative=function(e){if(So(e))throw new Se("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Ni(e)},xn.isNil=function(e){return null==e},xn.isNull=function(e){return null===e},xn.isNumber=ra,xn.isObject=ta,xn.isObjectLike=na,xn.isPlainObject=oa,xn.isRegExp=sa,xn.isSafeInteger=function(e){return Xs(e)&&e>=-9007199254740991&&e<=c},xn.isSet=aa,xn.isString=la,xn.isSymbol=ua,xn.isTypedArray=da,xn.isUndefined=function(e){return e===r},xn.isWeakMap=function(e){return na(e)&&ho(e)==k},xn.isWeakSet=function(e){return na(e)&&"[object WeakSet]"==Wi(e)},xn.join=function(e,t){return null==e?"":gn.call(e,t)},xn.kebabCase=qa,xn.last=Jo,xn.lastIndexOf=function(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var o=i;return n!==r&&(o=(o=ga(n))<0?wn(i+o,0):yn(o,i-1)),t==t?function(e,t,n){for(var i=n+1;i--;)if(e[i]===t)return i;return i}(e,t,o):Rt(e,Mt,o,!0)},xn.lowerCase=Va,xn.lowerFirst=za,xn.lt=ca,xn.lte=fa,xn.max=function(e){return e&&e.length?pi(e,rl,Ai):r},xn.maxBy=function(e,t){return e&&e.length?pi(e,so(t,2),Ai):r},xn.mean=function(e){return Ft(e,rl)},xn.meanBy=function(e,t){return Ft(e,so(t,2))},xn.min=function(e){return e&&e.length?pi(e,rl,Fi):r},xn.minBy=function(e,t){return e&&e.length?pi(e,so(t,2),Fi):r},xn.stubArray=ml,xn.stubFalse=wl,xn.stubObject=function(){return{}},xn.stubString=function(){return""},xn.stubTrue=function(){return!0},xn.multiply=_l,xn.nth=function(e,t){return e&&e.length?$i(e,ga(t)):r},xn.noConflict=function(){return ot._===this&&(ot._=je),this},xn.noop=ul,xn.now=Es,xn.pad=function(e,t,n){e=va(e);var i=(t=ga(t))?on(e):0;if(!t||i>=t)return e;var r=(t-i)/2;return Ur(cn(r),n)+e+Ur(dn(r),n)},xn.padEnd=function(e,t,n){e=va(e);var i=(t=ga(t))?on(e):0;return t&&i<t?e+Ur(t-i,n):e},xn.padStart=function(e,t,n){e=va(e);var i=(t=ga(t))?on(e):0;return t&&i<t?Ur(t-i,n)+e:e},xn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),bn(va(e).replace(ie,""),t||0)},xn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&yo(e,t,n)&&(t=n=r),n===r&&("boolean"==typeof t?(n=t,t=r):"boolean"==typeof e&&(n=e,e=r)),e===r&&t===r?(e=0,t=1):(e=pa(e),t===r?(t=e,e=0):t=pa(t)),e>t){var i=e;e=t,t=i}if(n||e%1||t%1){var o=Sn();return yn(e+o*(t-e+tt("1e-"+((o+"").length-1))),t)}return Vi(e,t)},xn.reduce=function(e,t,n){var i=qs(e)?Et:xt,r=arguments.length<3;return i(e,so(t,4),n,r,ci)},xn.reduceRight=function(e,t,n){var i=qs(e)?Tt:xt,r=arguments.length<3;return i(e,so(t,4),n,r,fi)},xn.repeat=function(e,t,n){return t=(n?yo(e,t,n):t===r)?1:ga(t),zi(va(e),t)},xn.replace=function(){var e=arguments,t=va(e[0]);return e.length<3?t:t.replace(e[1],e[2])},xn.result=function(e,t,n){var i=-1,o=(t=wr(t,e)).length;for(o||(o=1,e=r);++i<o;){var s=null==e?r:e[jo(t[i])];s===r&&(i=o,s=n),e=Zs(s)?s.call(e):s}return e},xn.round=Wl,xn.runInContext=e,xn.sample=function(e){return(qs(e)?Qn:Ki)(e)},xn.size=function(e){if(null==e)return 0;if(zs(e))return la(e)?on(e):e.length;var t=ho(e);return t==C||t==E?e.size:Mi(e).length},xn.snakeCase=Ya,xn.some=function(e,t,n){var i=qs(e)?Ot:nr;return n&&yo(e,t,n)&&(t=r),i(e,so(t,3))},xn.sortedIndex=function(e,t){return ir(e,t)},xn.sortedIndexBy=function(e,t,n){return rr(e,t,so(n,2))},xn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var i=ir(e,t);if(i<n&&$s(e[i],t))return i}return-1},xn.sortedLastIndex=function(e,t){return ir(e,t,!0)},xn.sortedLastIndexBy=function(e,t,n){return rr(e,t,so(n,2),!0)},xn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=ir(e,t,!0)-1;if($s(e[n],t))return n}return-1},xn.startCase=Ka,xn.startsWith=function(e,t,n){return e=va(e),n=null==n?0:si(ga(n),0,e.length),t=ar(t),e.slice(n,n+t.length)==t},xn.subtract=Al,xn.sum=function(e){return e&&e.length?Bt(e,rl):0},xn.sumBy=function(e,t){return e&&e.length?Bt(e,so(t,2)):0},xn.template=function(e,t,n){var i=xn.templateSettings;n&&yo(e,t,n)&&(t=r),e=va(e),t=Ca({},t,i,Qr);var o,s,a=Ca({},t.imports,i.imports,Qr),l=Ra(a),u=Gt(a,l),d=0,c=t.interpolate||ve,f="__p += '",h=Ae((t.escape||ve).source+"|"+c.source+"|"+(c===J?ce:ve).source+"|"+(t.evaluate||ve).source+"|$","g"),p="//# sourceURL="+(Ne.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Je+"]")+"\n";e.replace(h,(function(t,n,i,r,a,l){return i||(i=r),f+=e.slice(d,l).replace(be,Jt),n&&(o=!0,f+="' +\n__e("+n+") +\n'"),a&&(s=!0,f+="';\n"+a+";\n__p += '"),i&&(f+="' +\n((__t = ("+i+")) == null ? '' : __t) +\n'"),d=l+t.length,t})),f+="';\n";var g=Ne.call(t,"variable")&&t.variable;if(g){if(ue.test(g))throw new Se("Invalid `variable` option passed into `_.template`")}else f="with (obj) {\n"+f+"\n}\n";f=(s?f.replace(U,""):f).replace(H,"$1").replace(G,"$1;"),f="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var m=Xa((function(){return Ce(l,p+"return "+f).apply(r,u)}));if(m.source=f,Js(m))throw m;return m},xn.times=function(e,t){if((e=ga(e))<1||e>c)return[];var n=h,i=yn(e,h);t=so(t),e-=h;for(var r=$t(i,t);++n<e;)t(n);return r},xn.toFinite=pa,xn.toInteger=ga,xn.toLength=ma,xn.toLower=function(e){return va(e).toLowerCase()},xn.toNumber=wa,xn.toSafeInteger=function(e){return e?si(ga(e),-9007199254740991,c):0===e?e:0},xn.toString=va,xn.toUpper=function(e){return va(e).toUpperCase()},xn.trim=function(e,t,n){if((e=va(e))&&(n||t===r))return Ut(e);if(!e||!(t=ar(t)))return e;var i=sn(e),o=sn(t);return vr(i,Vt(i,o),zt(i,o)+1).join("")},xn.trimEnd=function(e,t,n){if((e=va(e))&&(n||t===r))return e.slice(0,an(e)+1);if(!e||!(t=ar(t)))return e;var i=sn(e);return vr(i,0,zt(i,sn(t))+1).join("")},xn.trimStart=function(e,t,n){if((e=va(e))&&(n||t===r))return e.replace(ie,"");if(!e||!(t=ar(t)))return e;var i=sn(e);return vr(i,Vt(i,sn(t))).join("")},xn.truncate=function(e,t){var n=30,i="...";if(ta(t)){var o="separator"in t?t.separator:o;n="length"in t?ga(t.length):n,i="omission"in t?ar(t.omission):i}var s=(e=va(e)).length;if(Zt(e)){var a=sn(e);s=a.length}if(n>=s)return e;var l=n-on(i);if(l<1)return i;var u=a?vr(a,0,l).join(""):e.slice(0,l);if(o===r)return u+i;if(a&&(l+=u.length-l),sa(o)){if(e.slice(l).search(o)){var d,c=u;for(o.global||(o=Ae(o.source,va(fe.exec(o))+"g")),o.lastIndex=0;d=o.exec(c);)var f=d.index;u=u.slice(0,f===r?l:f)}}else if(e.indexOf(ar(o),l)!=l){var h=u.lastIndexOf(o);h>-1&&(u=u.slice(0,h))}return u+i},xn.unescape=function(e){return(e=va(e))&&z.test(e)?e.replace(q,ln):e},xn.uniqueId=function(e){var t=++Pe;return va(e)+t},xn.upperCase=Qa,xn.upperFirst=Ja,xn.each=vs,xn.eachRight=bs,xn.first=zo,ll(xn,(yl={},vi(xn,(function(e,t){Ne.call(xn.prototype,t)||(yl[t]=e)})),yl),{chain:!1}),xn.VERSION="4.17.21",vt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){xn[e].placeholder=xn})),vt(["drop","take"],(function(e,t){Hn.prototype[e]=function(n){n=n===r?1:wn(ga(n),0);var i=this.__filtered__&&!t?new Hn(this):this.clone();return i.__filtered__?i.__takeCount__=yn(n,i.__takeCount__):i.__views__.push({size:yn(n,h),type:e+(i.__dir__<0?"Right":"")}),i},Hn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),vt(["filter","map","takeWhile"],(function(e,t){var n=t+1,i=1==n||3==n;Hn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:so(e,3),type:n}),t.__filtered__=t.__filtered__||i,t}})),vt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Hn.prototype[e]=function(){return this[n](1).value()[0]}})),vt(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Hn.prototype[e]=function(){return this.__filtered__?new Hn(this):this[n](1)}})),Hn.prototype.compact=function(){return this.filter(rl)},Hn.prototype.find=function(e){return this.filter(e).head()},Hn.prototype.findLast=function(e){return this.reverse().find(e)},Hn.prototype.invokeMap=Yi((function(e,t){return"function"==typeof e?new Hn(this):this.map((function(n){return Oi(n,e,t)}))})),Hn.prototype.reject=function(e){return this.filter(Fs(so(e)))},Hn.prototype.slice=function(e,t){e=ga(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Hn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==r&&(n=(t=ga(t))<0?n.dropRight(-t):n.take(t-e)),n)},Hn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Hn.prototype.toArray=function(){return this.take(h)},vi(Hn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),o=xn[i?"take"+("last"==t?"Right":""):t],s=i||/^find/.test(t);o&&(xn.prototype[t]=function(){var t=this.__wrapped__,a=i?[1]:arguments,l=t instanceof Hn,u=a[0],d=l||qs(t),c=function(e){var t=o.apply(xn,Lt([e],a));return i&&f?t[0]:t};d&&n&&"function"==typeof u&&1!=u.length&&(l=d=!1);var f=this.__chain__,h=!!this.__actions__.length,p=s&&!f,g=l&&!h;if(!s&&d){t=g?t:new Hn(this);var m=e.apply(t,a);return m.__actions__.push({func:ps,args:[c],thisArg:r}),new Un(m,f)}return p&&g?e.apply(this,a):(m=this.thru(c),p?i?m.value()[0]:m.value():m)})})),vt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Te[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:pop|shift)$/.test(e);xn.prototype[e]=function(){var e=arguments;if(i&&!this.__chain__){var r=this.value();return t.apply(qs(r)?r:[],e)}return this[n]((function(n){return t.apply(qs(n)?n:[],e)}))}})),vi(Hn.prototype,(function(e,t){var n=xn[t];if(n){var i=n.name+"";Ne.call(kn,i)||(kn[i]=[]),kn[i].push({name:t,func:n})}})),kn[jr(r,2).name]=[{name:"wrapper",func:r}],Hn.prototype.clone=function(){var e=new Hn(this.__wrapped__);return e.__actions__=Er(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Er(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Er(this.__views__),e},Hn.prototype.reverse=function(){if(this.__filtered__){var e=new Hn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Hn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=qs(e),i=t<0,r=n?e.length:0,o=function(e,t,n){for(var i=-1,r=n.length;++i<r;){var o=n[i],s=o.size;switch(o.type){case"drop":e+=s;break;case"dropRight":t-=s;break;case"take":t=yn(t,e+s);break;case"takeRight":e=wn(e,t-s)}}return{start:e,end:t}}(0,r,this.__views__),s=o.start,a=o.end,l=a-s,u=i?a:s-1,d=this.__iteratees__,c=d.length,f=0,h=yn(l,this.__takeCount__);if(!n||!i&&r==l&&h==l)return fr(e,this.__actions__);var p=[];e:for(;l--&&f<h;){for(var g=-1,m=e[u+=t];++g<c;){var w=d[g],y=w.iteratee,v=w.type,b=y(m);if(2==v)m=b;else if(!b){if(1==v)continue e;break e}}p[f++]=m}return p},xn.prototype.at=gs,xn.prototype.chain=function(){return hs(this)},xn.prototype.commit=function(){return new Un(this.value(),this.__chain__)},xn.prototype.next=function(){this.__values__===r&&(this.__values__=ha(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?r:this.__values__[this.__index__++]}},xn.prototype.plant=function(e){for(var t,n=this;n instanceof $n;){var i=Bo(n);i.__index__=0,i.__values__=r,t?o.__wrapped__=i:t=i;var o=i;n=n.__wrapped__}return o.__wrapped__=e,t},xn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Hn){var t=e;return this.__actions__.length&&(t=new Hn(this)),(t=t.reverse()).__actions__.push({func:ps,args:[ts],thisArg:r}),new Un(t,this.__chain__)}return this.thru(ts)},xn.prototype.toJSON=xn.prototype.valueOf=xn.prototype.value=function(){return fr(this.__wrapped__,this.__actions__)},xn.prototype.first=xn.prototype.head,st&&(xn.prototype[st]=function(){return this}),xn}();ot._=un,(i=function(){return un}.call(t,n,t,e))===r||(e.exports=i)}.call(this)},88306:(e,t,n)=>{var i=n(83369);function r(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var i=arguments,r=t?t.apply(this,i):i[0],o=n.cache;if(o.has(r))return o.get(r);var s=e.apply(this,i);return n.cache=o.set(r,s)||o,s};return n.cache=new(r.Cache||i),n}r.Cache=i,e.exports=r},7771:(e,t,n)=>{var i=n(55639);e.exports=function(){return i.Date.now()}},78718:(e,t,n)=>{var i=n(25970),r=n(99021)((function(e,t){return null==e?{}:i(e,t)}));e.exports=r},70479:e=>{e.exports=function(){return[]}},95062:e=>{e.exports=function(){return!1}},23493:(e,t,n)=>{var i=n(23279),r=n(13218);e.exports=function(e,t,n){var o=!0,s=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return r(n)&&(o="leading"in n?!!n.leading:o,s="trailing"in n?!!n.trailing:s),i(e,t,{leading:o,maxWait:t,trailing:s})}},14841:(e,t,n)=>{var i=n(27561),r=n(13218),o=n(33448),s=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,l=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return NaN;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=i(e);var n=a.test(e);return n||l.test(e)?u(e.slice(2),n?2:8):s.test(e)?NaN:+e}},79833:(e,t,n)=>{var i=n(80531);e.exports=function(e){return null==e?"":i(e)}},79684:function(e,t,n){"use strict";var i,r,o,s,a,l,u,d,c,f,h,p,g,m,w=this&&this.__classPrivateFieldGet||function(e,t,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(e):i?i.value:t.get(e)},y=this&&this.__classPrivateFieldSet||function(e,t,n,i,r){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?r.call(e,n):r?r.value=n:t.set(e,n),n},v=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FinsembleDesktopAgent=void 0;const b=n(21614),S=n(63250),C=v(n(2518)),_=n(87406),W=n(87406);class A{constructor(){i.set(this,12e4),r.set(this,null),o.set(this,[])}start(){this.registerHeartbeat()}registerHeartbeat(){clearTimeout(w(this,r,"f")),C.default.system.debug("FinsembleDesktopAgent: heartbeat received"),y(this,r,setTimeout((()=>{C.default.system.warn(`FinsembleDesktopAgent: No heartbeat received within ${w(this,i,"f")} milliseconds`),this.notifyDisconnect()}),w(this,i,"f")),"f")}notifyDisconnect(){console.warn("fdc3 has lost connectivity to the interop service. You may need to restart this app."),w(this,o,"f").forEach((e=>{e(`No heartbeat received from interop service within ${w(this,i,"f")} milliseconds`)}))}onDisconnect(e){y(this,o,w(this,o,"f").concat(e),"f")}stop(){clearTimeout(w(this,r,"f"))}}i=new WeakMap,r=new WeakMap,o=new WeakMap;class L{constructor(e,t,n="app"){s.set(this,void 0),y(this,s,e,"f"),this.id=t,this.type=n}broadcast(e){w(this,s,"f").channelBroadcast(this.id,e)}getCurrentContext(e){return w(this,s,"f").channelGetCurrentContext(this.id,e)}addContextListener(e,t){return w(this,s,"f").channelAddContextListener(this.id,e,t)}}s=new WeakMap,t.FinsembleDesktopAgent=class{constructor({routerClient:e,startup:t}){if(a.set(this,!1),l.set(this,new A),u.set(this,!1),d.set(this,""),c.set(this,`FSBL.FDC3.Client.${(0,b.v4)()}`),f.set(this,{}),h.set(this,{}),p.set(this,[]),g.set(this,void 0),m.set(this,void 0),y(this,g,e,"f"),y(this,m,t,"f"),window&&window.Event&&window.dispatchEvent){const e=new Event("fdc3Ready");window.dispatchEvent(e)}}meta(){return{uuid:w(this,d,"f"),href:window.document?document.location.href:""}}handleHeartbeat(){w(this,l,"f").registerHeartbeat()}triggerContextListeners(e){var t,n;const{context:i}=e.payload;let r;if(e.meta.targetSubscriberId){let t;Object.values(w(this,h,"f")).every((n=>(t=n.find((t=>t.targetSubscriberId===e.meta.targetSubscriberId)),void 0===t))),r=t?[t]:[]}else r=(null!==(t=w(this,h,"f")[null==i?void 0:i.type])&&void 0!==t?t:[]).concat(null!==(n=w(this,h,"f")["*"])&&void 0!==n?n:[]);r.forEach((({handler:t,channel:n})=>{e.meta.channel===n||!e.meta.channel&&!n?(C.default.system.debug(`FDC3 Client: triggerContextListeners for all on ${null!=n?n:"default"} channel`,e.type,e),t(i)):C.default.system.debug(`FDC3 Client: triggerContextListeners skipped for all on ${null!=n?n:"default"} channel`,e.type,e)}))}triggerIntentListeners(e){const{intent:t,context:n}=e.payload,i=w(this,f,"f")[t];n&&(i||[]).forEach((e=>e(n)))}handleIncoming(e){switch(C.default.system.debug("FDC3 Client: handleIncoming",e.type,e),e.type){case"broadcast":this.triggerContextListeners(e);break;case"intent":this.triggerIntentListeners(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=w(this,d,"f")),e};w(this,p,"f").forEach((async t=>{const{message:n,handler:i,resolve:r}=t,{err:o,receiveMessage:s}=await this.exchange(e(n),i);r({err:o,receiveMessage:s})})),y(this,p,[],"f")}exchange(e,t=(()=>{})){return new Promise((async n=>{if(w(this,a,"f")){const{err:i,response:r}=await w(this,g,"f").query(_.SERVER_CHANNEL,e,t);n({err:i,receiveMessage:null==r?void 0:r.data})}else w(this,p,"f").push({message:e,handler:t,resolve:n}),this.start()}))}async connect(){const e=w(this,m,"f").getStartupData(),{windowName:t="Unknown window",authenticationToken:n}=e;C.default.system.log(`fdc3.connect StartupData for ${t}`,e),y(this,d,t,"f");const i={type:"register",meta:this.meta(),payload:{clientChannel:w(this,c,"f"),windowName:t,authenticationToken:n}};w(this,g,"f").query(_.SERVER_CHANNEL,i,(e=>{e?C.default.system.error("connect error",e):(w(this,g,"f").addResponder(w(this,c,"f"),((e,t)=>{if(e||!t){const t=(0,W.errorAsString)(null!=e?e:"No request received on responder");C.default.system.error(`FinsembleDesktopAgent can't listen on channel ${w(this,c,"f")} : ${t}`)}else t.data&&this.handleIncoming(t.data),t.sendQueryResponse(null)})),y(this,a,!0,"f"),this.releaseQueue(),w(this,l,"f").start())}))}async start(){w(this,u,"f")||(y(this,u,!0,"f"),await w(this,m,"f").onReady(),this.connect())}async stop(){w(this,l,"f").stop();const e={type:"unregister",meta:this.meta()};await this.exchange(e),y(this,u,!1,"f"),w(this,g,"f").removeResponder(w(this,c,"f")),y(this,a,!1,"f")}onDisconnect(e){w(this,l,"f").onDisconnect(e)}async channelGetCurrentContext(e,t){const n={type:"currentContextRequest",meta:Object.assign(Object.assign({},this.meta()),{channel:e}),payload:{contextType:t}},{err:i,receiveMessage:r}=await this.exchange(n);return i?null:"currentContext"===(null==r?void 0:r.type)?r.payload.context:null}broadcast(e){const t={type:"broadcast",meta:this.meta(),payload:{context:e}};this.exchange(t)}channelBroadcast(e,t){const n={type:"broadcast",meta:Object.assign(Object.assign({},this.meta()),{channel:e}),payload:{context:t}};this.exchange(n)}async getSystemChannels(){var e;const t={type:"systemChannelRequest",meta:this.meta()},{err:n,receiveMessage:i}=await this.exchange(t);return n?[]:("systemChannels"===(null==i?void 0:i.type)?null===(e=null==i?void 0:i.payload)||void 0===e?void 0:e.channels:[]).map((e=>new L(this,e,"system")))}async open(e,t){const n={type:"open",meta:this.meta(),payload:{target:e,context:t}},{err:i,receiveMessage:r}=await this.exchange(n),o=r;if(i)throw S.OpenError.ResolverUnavailable;if(o.payload.error)throw o.payload.error}async findIntent(e,t){const n={type:"findIntent",meta:this.meta(),payload:{intent:e,context:t}},{err:i,receiveMessage:r}=await this.exchange(n),o=r;if(i)throw S.ResolveError.ResolverUnavailable;if(o.payload.error)throw o.payload.error;if(!o.payload.appIntent)throw"Invalid response returned from InteropService for findIntent. No appIntent and no error.";return o.payload.appIntent}async findIntentsByContext(e){const t={type:"findIntentsByContext",meta:this.meta(),payload:{context:e}},{receiveMessage:n}=await this.exchange(t),i=n;if(i.payload.error)throw i.payload.error;return i.payload.intents||[]}async raiseIntent(e,t,n){const i={type:"raiseIntent",meta:this.meta(),payload:{intent:e,context:t,target:n}},{err:r,receiveMessage:o}=await this.exchange(i),s=o;if(r)throw S.ResolveError.ResolverUnavailable;if(s.payload.error)throw s.payload.error;if(!s.payload.data)throw"Invalid response returned from InteropService for raiseIntent. No data.";return s.payload.data}async raiseIntentForContext(e,t){const n={type:"raiseIntent",meta:this.meta(),payload:{context:e,target:t}},{err:i,receiveMessage:r}=await this.exchange(n),o=r;if(i)throw S.ResolveError.ResolverUnavailable;if(o.payload.error)throw o.payload.error;if(!o.payload.data)throw"Invalid response returned from InteropService for raiseIntentForContext. No data.";return o.payload.data}addIntentListener(e,t){w(this,f,"f")[e]=(0,W.mmAdd)(w(this,f,"f"),e,t);const n={type:"subscribeIntent",meta:this.meta(),payload:{intent:e}};return this.exchange(n),{unsubscribe:()=>{const n={type:"unsubscribeIntent",meta:this.meta(),payload:{intent:e}};this.exchange(n),w(this,f,"f")[e]=(0,W.mmRemove)(w(this,f,"f"),e,t)}}}channelAddContextListener(e,t,n){const i=n&&t||"*";n||(n=t);const r=`subscriberId.${Date.now()}_${Math.random()}`,o={handler:n,channel:e,targetSubscriberId:r};w(this,h,"f")[i]=(0,W.mmAdd)(w(this,h,"f"),i,o);let s={type:"subscribeContext",meta:Object.assign(Object.assign({},this.meta()),{targetSubscriberId:r}),payload:{contextType:i}};return e&&(s.meta.channel=e),this.exchange(s),{unsubscribe:()=>{let t={type:"unsubscribeContext",meta:this.meta(),payload:{contextType:i}};e&&(t.meta.channel=e),w(this,h,"f")[i]=(0,W.mmRemove)(w(this,h,"f"),i,o),this.exchange(t)}}}addContextListener(e,t){return this.channelAddContextListener(null,e,t)}async joinChannel(e){const t={type:"joinChannels",meta:this.meta(),payload:{channels:[e]}};await this.exchange(t)}async getOrCreateChannel(e){return new L(this,e)}async getCurrentChannels(){const e={type:"getCurrentChannels",meta:this.meta()},{err:t,receiveMessage:n}=await this.exchange(e),i=n;if(t)throw t;if(i.payload.error)throw i.payload.error;if(!i.payload.data)throw"Invalid response returned from InteropService for getCurrentChannels. No data.";return i.payload.data.map((e=>new L(this,e.channel,"system")))}async getCurrentChannel(){const e=await this.getCurrentChannels();return e&&e.length?e[0]:null}async leaveCurrentChannel(){const e={type:"leaveChannels",meta:this.meta(),payload:{}};await this.exchange(e)}getInfo(){return{fdc3Version:"1.2",provider:"Finsemble",providerVersion:process.env.npm_package_version}}},a=new WeakMap,l=new WeakMap,u=new WeakMap,d=new WeakMap,c=new WeakMap,f=new WeakMap,h=new WeakMap,p=new WeakMap,g=new WeakMap,m=new WeakMap},87406:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AnonymousAuthenticationToken=t.INTENT_RESOLVER_CHANNEL=t.SERVER_CHANNEL=t.GLOBAL_CHANNEL=t.errorAsString=t.mmRemove=t.concatNoDups=t.mmAdd=void 0,t.mmAdd=(e,t,n)=>(e[t]||[]).concat([n]),t.concatNoDups=(e,t)=>{const n=Array.isArray(t)?t:[t],i=e?n.concat(e):n;return Array.from(new Set(i))},t.mmRemove=(e,t,n)=>(e[t]||[]).filter((e=>e!==n)),t.errorAsString=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},t.GLOBAL_CHANNEL="global",t.SERVER_CHANNEL="FSBL.FDC3.Interop.Server",t.INTENT_RESOLVER_CHANNEL="FSBL.FDC3.intent.resolver",t.AnonymousAuthenticationToken={signatureString:"",signatureStringType:"unauthenticated",meta:{name:"Anonymous app"}}},51806:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FSBLService=void 0;const i=n(11314),r=n(47107),o=n(91374),s=n(10166),a=n(21614),l=n(44137),u=n(79684);t.FSBLService=class{async startApp(){var e,t,n,d,c,f,h,p;const g=await(0,r.getSystemStartupData)(),m=o.System.Window.getCurrent(),w=null!==(n=null!==(e=m.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",y=null!==(f=null!==(d=m.name)&&void 0!==d?d:null===(c=null===document||void 0===document?void 0:document.location)||void 0===c?void 0:c.href)&&void 0!==f?f:`Unknown window-${(0,a.v4)()}`,v=null!==(h=m.webContentsName)&&void 0!==h?h:y,b=null!==(p=(0,r.getManifestFromStartupData)(g))&&void 0!==p?p:{},S=(0,r.getRouterConfig)({windowName:y,systemManifest:b});await i.RouterController.start(S);const C=s.Startup.getInstance();C.setStartupData({windowName:y,webContentsName:v,authenticationToken:{signatureString:"",signatureStringType:"unauthenticated",meta:{name:w}}}),l.Globals.fdc3=new u.FinsembleDesktopAgent({routerClient:i.RouterClient,startup:C}),C.setReady()}async stopApp(){i.RouterController.stop()}}},47107:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getManifestFromStartupData=t.getSystemStartupData=t.getRouterConfig=t.getRecommendedTransport=void 0;const r=i(n(2518)),o=n(91374),s=n(64324),a={sameDomainTransport:"FinsembleTransport",crossDomainTransport:"FinsembleTransport",transportSettings:{FinsembleTransport:{serverAddress:"ws://127.0.0.1:3376"}},transportName:"FinsembleTransport"},l=e=>{if(!e)return r.default.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,i=window.location.protocol===t.protocol,o=(void 0!==window.location.port?window.location.port:80)===(void 0!==t.port?t.port:80),s=n&&o&&i;return r.default.system.debug(`Transport crossDomain=${l} (${n}:${i}:${o})`),!s};t.getRecommendedTransport=e=>{const{moduleRoot:t,router:n}=null==e?void 0:e.finsemble,{sameDomainTransport:i="SharedWorker",crossDomainTransport:r="IPCBus"}=null!=n?n:{};return l(t)?r:i},t.getRouterConfig=({windowName:e,systemManifest:n,transportSettings:i})=>n?((e,n)=>{var i,o,s,l;if(r.default.system.info("WINDOW LIFECYCLE:STARTUP:RouterClient:routerConfigFromManifest"),e&&"string"!=typeof e){const r=e.finsemble,a=null!==(s=null!==(o=null===(i=null==r?void 0:r.router)||void 0===i?void 0:i.transportSettings)&&void 0!==o?o:null==r?void 0:r.IAC)&&void 0!==s?s:{},u=null!==(l=null==r?void 0:r.notificationURL)&&void 0!==l?l:`${r.moduleRoot}/components/system/notification/notification.html`;return{windowName:n,routerDomainRoot:r.moduleRoot,transportName:(0,t.getRecommendedTransport)(e),transportSettings:a,notificationURL:u}}return r.default.system.error("WINDOW LIFECYCLE:STARTUP:RouterClient:routerConfigFromManifest failed -- fatal error. No manifest found.",e),Object.assign(Object.assign({},a),{windowName:n})})(n,e):Object.assign(Object.assign({},a),{windowName:e,transportSettings:null!=i?i:{}}),t.getSystemStartupData=async()=>new Promise((e=>{o.System.Window.getCurrent().getOptions((t=>{e(t)}))})),t.getManifestFromStartupData=e=>{let t=null==e?void 0:e.manifest;return(null==t?void 0:t.finsemble)&&s.ConfigUtilInstance.resolveManifestMacros(t,t.finsemble),t}},10166:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Startup=void 0;const i=n(87406),r=n(44137),o=n(21614),s=n(7860),a=`Unknown window-${(0,o.v4)()}`;class l{constructor(){this.isReady=!1,this.onReadyListeners=[],this.currentStartupData={authenticationToken:i.AnonymousAuthenticationToken,windowName:a,webContentsName:a}}static getInstance(){return l.instance?l.instance:l.instance=(0,s.singleton)("Startup",l)}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()})),r.Globals.dispatchEvent&&r.Globals.dispatchEvent(new Event("FSBLReady"))}}t.Startup=l,l.instance=null},27917:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return r(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.StoreModel=void 0;const a=n(1641),l=o(n(31482)),u=s(n(2518));class d{constructor(e,t,n){var i,r;this.isGlobal=!1,this.values={},this.listeners={},this.registeredDispatchListeners=[],this.mapping={},this.subs={},this.Dispatcher={register:e=>{this.registeredDispatchListeners.push(e)},dispatch:e=>{this.isGlobal?this.routerClient.transmit(`storeService.dispatch.${this.name}`,e):this.handleDispatchedMessages(null,{data:e})}},this.handleChanges=(e,t)=>{if(e)u.default.system.error("DistributedStoreClient",e);else{const{store:e,field:n,storeData:i,value:r}=t.data;if(e){const e=n?`.${n}`:"",t=`${this.name}${e}`,o=i||r;this.triggerListeners(t,o)}}},this.routerClient=t,this.removeStoreCallback=n,this.isGlobal=!!e.global,this.name=null!==(r=null!==(i=e.name)&&void 0!==i?i:e.store)&&void 0!==r?r:"StoreModel() invariant. store.name not provided.",e.values&&(this.values=e.values),l.initObject(this.values,null,this.mapping),this.isGlobal&&this.routerClient.addListener(`storeService.dispatch.${this.name}`,((e,t)=>{this.handleDispatchedMessages(e,t)}))}handleDispatchedMessages(e,t){(null==t?void 0:t.data)&&this.registeredDispatchListeners.forEach((e=>{e(t.data)}))}setValue(e,t){if(e.field||u.default.system.error("DistributedStore.setValue:no field provided",e),e.hasOwnProperty("value")||u.default.system.error("DistributedStore.setValue:no value provided",e),this.isGlobal){const n={store:this.name,field:e.field,value:e.value};this.routerClient.query("storeService.setValue",n,(e=>{t&&t(e)}))}else{const n=l.checkForObjectChange(this.values,e.field,this.mapping);l.setPath(this.values,e.field,e.value),l.mapField(this.values,e.field,this.mapping),n&&this.sendRemovals(n),this.triggerListeners(this.name,this),this.publishObjectUpdates(e.field,this.mapping),t&&t(null)}}publishObjectUpdates(e,t){const n=t;for(;e;)this.triggerListeners(`${this.name}.${e}`,l.byString(this.values,e)),e=n[e]}sendRemovals(e){for(let t in e)this.triggerListeners(`${this.name}.${t}`,l.byString(this.values,t))}setValues(e,t){return e?Array.isArray(e)?void(0,a.each)(e,((e,t)=>{this.setValue(e,t)}),(e=>t?t(e):null)):u.default.system.error("DistributedStore.setValues:params must be an array"):u.default.system.error("DistributedStore.setValues:no params given")}getValue(e,t){if("string"==typeof e&&(e={field:e}),!e.field)return null==t||t("no field provided"),"no field provided";if(!this.isGlobal){const n=l.byString(this.values,e.field);return void 0!==n?(null==t||t(null,n),n):(null==t||t("couldn't find a value"),null)}return this.getGlobalValue(e.field,t),null}getAll(e){if(!this.isGlobal)return e&&e(null,this.values),this.values;this.getGlobalValues(null,e)}getValues(e,t){if(null===e&&(e=t),"function"==typeof e)return t=e,this.isGlobal?this.getGlobalValues(null,t):t?t(null,this.values):this.values;if(!Array.isArray(e))return{[e]:this.getValue(e,t)};if(this.isGlobal)return this.getGlobalValues(e,t);const n={};for(let t=0;t<e.length;t++){const i=e[t],r="string"==typeof i?i:i.field,o=l.byString(this.values,r);n[r]=o}return t?t(null,n):n}async getGlobalValue(e,t){const{err:n,response:i}=await this.routerClient.query("storeService.getValue",{store:this.name,field:e});return null==t||t(n,i.data),{err:n,data:i.data}}getGlobalValues(e,t){this.routerClient.query("storeService.getValues",{store:this.name,fields:e},((e,n)=>{t&&t(e,n.data)}))}removeValue(e,t){const n={field:"string"==typeof e?e:e.field,value:null};return this.setValue(n,t)}removeValues(e,t){if(!Array.isArray(e))return t("The passed in parameter needs to be an array");(0,a.map)(e,this.removeValue,((e,n)=>t(e,n)))}destroy(e){const t={store:this.name,global:this.isGlobal};this.removeStoreCallback(t,(t=>{t?e&&e(t):e&&e(null,!0)}))}changeSub(e){this.subs[e]||(this.isGlobal&&this.routerClient.subscribe(`storeService${e}`,this.handleChanges),this.subs[e]=!0)}addListener(e,t,n){var i;"function"==typeof e&&(t=e,e={});const{field:r}=e,o=r?`.${r}`:"",s=`${this.name}${o}`;this.listeners[s]=[t].concat(null!==(i=this.listeners[s])&&void 0!==i?i:[]),this.changeSub(s),null==n||n()}addListeners(e,t,n){var i;if(!Array.isArray(e))return u.default.deprecated("distributedStoreClient StoreModel - addListeners() with an object instead of an array is deprecated. Please use addListener() instead."),void this.addListener(e,t,n);const r="function"==typeof t?t:null;for(let t=0;t<e.length;t++){const n=e[t];let o="string"==typeof n?n:n.field;const s="string"!=typeof n?n.listener:r;if(s){const e=o?`.${o}`:"",t=`${this.name}${e}`;this.listeners[t]=[s].concat(null!==(i=this.listeners[t])&&void 0!==i?i:[]),this.changeSub(t)}}null==n||n()}removeListener(e,t,n){const{field:i}=e,r=i?`.${i}`:"",o=`${this.name}${r}`;if(this.listeners[o])for(let e=0;e<this.listeners[o].length;e++)if(this.listeners[o][e]===t)return this.listeners[o].splice(e,1),void(null==n||n(null,!0));null==n||n(null,!1)}removeListeners(e,t,n){if(!Array.isArray(e))return"function"==typeof e?this.removeListener({},e,n):e.field&&t&&this.removeListener(e,t,n),null==n?void 0:n(null,!0);const i="function"==typeof t?t:null;e.forEach((e=>{const t="string"==typeof e?e:e.field,n="string"!=typeof e?e.listener:i,r=t?`.${t}`:"",o=`${this.name}${r}`;this.listeners[o]=this.listeners[o].filter((e=>e!==n))})),null==n||n(null,!0)}triggerListeners(e,t){var n;(null!==(n=this.listeners[e])&&void 0!==n?n:[]).forEach((n=>{u.default.system.debug("DistributedStore.triggerListeners",e,t),n(null,{field:e,value:t})}))}}t.StoreModel=d,t.default=d},25232:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t._BaseClient=void 0;const r=i(n(11314)),o=n(2518),s=n(91374),a=n(25495);t._BaseClient=class{constructor(e){this.onReadyCallback=e=>{e()},this.isReady=!1,this.startupDependencies={services:[],clients:[]},this.clientReadyQueue=[],this.windowName="",this.processClientReadyQueue=()=>{for(const e of this.clientReadyQueue)e();this.clientReadyQueue=[]},this.onReady=e=>{this.isReady?e():this.clientReadyQueue.push(e)},this.setClientOnline=()=>{var e;this.isReady=!0;const t=`STARTUP:CLIENT:ONLINE:${null===(e=this.finWindow)||void 0===e?void 0:e.name}:${this.name}`;this.logger.system.log(t),this.onReadyCallback((()=>{this.logger.system.debug(t),a.FSBLDependencyManagerSingleton.setClientOnline(this.name),this.processClientReadyQueue()}))},this.initialize=e=>{var t;this.logger.system.log("baseClient initialize",this.name),this.finWindow=s.System.Window.getCurrent(),this.windowName=null===(t=this.finWindow)||void 0===t?void 0:t.name,this.logger.system.debug("baseClient Init Router Ready",this.name,"DEPENDENCIES",this.startupDependencies),a.FSBLDependencyManagerSingleton.startup.waitFor(this.startupDependencies,(()=>{this.logger.system.log("baseClient initialize waitfor done",this.name),null==e||e(),this.setClientOnline()}),`${this.windowName}(${this.name})`)},this.name=e.name,e.onReady&&(this.onReadyCallback=e.onReady),this.startupDependencies=e.startupDependencies||{services:[],clients:[]},this.logger=o.Logger,this.routerClient=r.default}onClose(e){null==e||e()}}},9381:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigClient=void 0;const r=i(n(20670)),o=n(25232),s=i(n(84795)),a=i(n(2518));class l extends o._BaseClient{constructor(){super({startupDependencies:{},onReady(e){null==e||e()},name:"configClient"}),this.listeners={},this.subs={},this.handleChanges=(e,t)=>{if(e)a.default.system.error("ConfigClient handleChanges() error",e);else{t.data.field||(t.data.field=null);const{field:e,storeData:n,value:i}=t.data,r=n||i;this.triggerListeners(e||"configService",r)}},this.triggerListeners=(e,t)=>{var n;(null!==(n=this.listeners[e])&&void 0!==n?n:[]).forEach((n=>{a.default.system.debug("ConfigClient.triggerListeners",e,t),n(null,{field:e,value:t})}))}}async getManifest(e){await s.default.waitForStartup("configService");const{err:t,response:n}=await this.routerClient.query("configService.getValues",{fields:null});return null==e||e(t,n.data),{err:t,data:n.data}}async getValue(e,t){if("string"==typeof e&&(e={field:e}),!e.field){const e="no field provided";return null==t||t(e),{err:e}}await s.default.waitForStartup("configService");const{err:n,response:i}=await this.routerClient.query("configService.getValue",{field:e.field});return null==t||t(n,i.data),{err:n,data:i.data}}async getValues(e,t){if("function"==typeof e&&(t=e,e=null),e&&!Array.isArray(e))return this.getValue(e,t);await s.default.waitForStartup("configService");const{err:n,response:i}=await this.routerClient.query("configService.getValues",{fields:e});return null==t||t(n,i.data),{err:n,data:i.data}}async setValue(e,t){const n={field:e.field,value:e.value};await s.default.waitForStartup("configService");const{err:i}=await this.routerClient.query("configService.setValue",n);return null==t||t(i),{err:i}}async setValues(e,t){if(!e){const e="ConfigClient.SetValues. No params given";return a.default.system.error(e),null==t||t(e),{err:e}}if(!Array.isArray(e)){const e="ConfigClient.SetValues. Params must be an array";return a.default.system.error(e),null==t||t(e),{err:e}}await s.default.waitForStartup("configService");const{err:n}=await this.routerClient.query("configService.setValues",e);return null==t||t(n),{err:n}}async removeValue(e,t){let n={};if("string"!=typeof e){const e="No field provided";return null==t||t(e),{err:e}}return n.field=e,n.value=null,await this.setValue(n,t)}removeValues(e,t){return new Promise((n=>{if(!Array.isArray(e)){const e="The passed in parameter must be an array";return null==t||t(e),n({err:e})}const i=e.map((e=>this.removeValue(e)));Promise.all(i).then((e=>{const i=e.some((e=>e.err))?"Some values couldn't be removed. Check central logger.":null;null==t||t(i),n({err:i})}))}))}async changeSub(e){if(this.subs||(this.subs={}),!this.subs[e]){this.subs[e]=!0,await s.default.waitForStartup("configService");const{err:t}=await this.routerClient.query("configService.addListener",e);t&&a.default.system.error("Error adding listener to config service",t),await this.routerClient.subscribe(e,this.handleChanges)}}addListener(e,t,n){var i;let r=null;"function"==typeof e&&(t=e,e={field:null}),({field:r}=e);const o="configService"+(r?`.${r}`:"");this.listeners[o]=[t].concat(null!==(i=this.listeners[o])&&void 0!==i?i:[]),this.changeSub(o),null==n||n()}addListeners(e,t,n){var i;if(!Array.isArray(e))return a.default.deprecated("configClient - addListeners() with an object instead of an array is deprecated. Please use addListener() instead."),this.addListener(e,t,n);const r="function"==typeof t?t:null;for(let t=0;t<e.length;t++){const n=e[t],o="string"==typeof n?n:n.field,s="string"!=typeof n?n.listener:r;if(s){const e="configService"+(o?`.${o}`:"");this.listeners[e]=[s].concat(null!==(i=this.listeners[e])&&void 0!==i?i:[]),this.changeSub(e)}}null==n||n()}removeListener(e,t,n){let i=null;"function"==typeof e&&(n=t,t=e,e={field:i}),({field:i}=e);const r="configService"+(i?`.${i}`:"");if(this.listeners[r])for(let e=0;e<this.listeners[r].length;e++)if(this.listeners[r][e]===t)return this.listeners[r].splice(e,1),void(null==n||n(null,!0));null==n||n(null,!1)}removeListeners(e,t,n){if(!Array.isArray(e))return"function"==typeof e?this.removeListener({},e,n):e.field&&t&&this.removeListener(e,t,n),null==n?void 0:n(null,!0);const i="function"==typeof t?t:null;e.forEach((e=>{const t="string"==typeof e?e:e.field,n="string"!=typeof e?e.listener:i,r="configService"+(t?`.${t}`:"");this.listeners[r]=this.listeners[r].filter((e=>e!==n))})),null==n||n(null,!0)}async processAndSet(e,t){if(a.default.system.debug("ConfigClient.processAndSet",e),r.default.args(e,"object",t,"function=")&&r.default.args2("params.newConfig",e.newConfig,"object","params.overwrite",e.overwrite,"boolean=","params.replace",e.replace,"boolean="),!e.overwrite&&e.replace){const e="cannot use replace option unless overwrite is also true";return a.default.system.warn("ConfigClient.processAndSet:",e),null==t||t(e),{err:e}}{await s.default.waitForStartup("configService");const{err:n,response:i}=await this.routerClient.query("configService.processAndSet",e);return null==t||t(n,i),{err:n,data:i.data}}}async setPreference(e,t){const{err:n,response:i}=await this.routerClient.query("PreferencesService.setPreference",e);return null==t||t(n,i.data),{err:n,data:i.data}}async getPreferences(e){await s.default.waitForStartup("preferencesService");const{err:t,response:n}=await this.routerClient.query("PreferencesService.getPreferences",{});return a.default.system.debug("PreferencesService.getPreferences response",n),null==e||e(t,n.data),{err:t,data:n.data}}async unsetPreference(e,t){a.default.system.debug("ConfigClient.unsetPreference",e);const{err:n,response:i}=await this.routerClient.query("PreferencesService.unsetPreference",e);return null==t||t(n,i.data),{err:n,data:i.data}}}t.ConfigClient=l;const u=new l;t.default=u},47913:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.DistributedStoreClient=void 0;const r=n(25232),o=i(n(2518)),s=i(n(27917)),a=i(n(84795)),l=n(11314),u=()=>new Promise((e=>{l.RouterClient.subscribe("distributedStoresLoading",((t,n)=>{if(t||!n.data){const n=`Error waiting for persistent stores ${t}`;o.default.system.error(n),e(n)}"done"===n.data.State&&e(null)}))}));class d extends r._BaseClient{constructor(){super({startupDependencies:{},onReady:e=>{e&&e()},name:"distributedStoreClient"}),this.localStore={}}async getGlobalStore(e,t){if(o.default.system.info("DistributedStoreClient:getGlobalStore()",e),e.waitForPersistentStoreToLoad){const e=await u();if(e)return null==t||t(e),{err:e}}else await a.default.waitForStartup("dataStoreService");const{err:n,response:i}=await this.routerClient.query("storeService.getStore",e);if(i.data){const e=new s.default(i.data,this.routerClient,this.removeStore.bind(this));return t&&t(n,e),{err:n,data:e}}return o.default.system.error("DistributedStoreClient:getGlobalStore() Failed to get a global store",e.store,n),t&&t(n),{err:n}}async removeGlobalStore(e,t){const{err:n}=await this.routerClient.query("storeService.removeStore",e);return t&&t(n,!!n),{err:n,data:!!n}}async getStore(e,t){if(e.global)return this.getGlobalStore(e,t);{const n=e.store?this.localStore[e.store]:null;return n?(t&&t(null,n),{data:n}):this.getGlobalStore(e,t)}}async createGlobalStore(e,t){if(e.persist){const e=await u();if(e)return null==t||t(e),{err:e}}else await a.default.waitForStartup("dataStoreService");const{err:n,response:i}=await this.routerClient.query("storeService.createStore",e);if(n)return o.default.system.error("DistributedStoreClient:createStore() Failed to create a global store",e.store,n),null==t||t(n),{err:n};const r=new s.default(i.data,this.routerClient,this.removeStore.bind(this));return null==t||t(n,r),{err:n,data:r}}async createLocalStore(e,t){const n=this.localStore[e.store];if(n)return t&&t(null,n),{data:n};const i=new s.default(Object.assign(Object.assign({},e),{name:e.store}),this.routerClient,this.removeStore.bind(this));return this.localStore[i.name]=i,t&&t(null,i),{data:i}}async createStore(e,t){return o.default.system.info("DistributedStoreClient:createStore()",e),e.global?this.createGlobalStore(e,t):this.createLocalStore(e,t)}async removeStore(e,t){return e.global?this.removeGlobalStore(e,t):this.localStore[e.store]?(delete this.localStore[e.store],t&&t(null,!0),{data:!0}):{err:`Local store named ${e.store} not found`}}}t.DistributedStoreClient=d;const c=new d;t.default=c},90693:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.HotkeyClient=void 0;const r=n(17187),o=n(25232),s=i(n(2518)),a=n(62711).F,l=new r.EventEmitter,u=e=>{const t=[];return e.keys.forEach((e=>{if("string"!=typeof e)return s.default.system.error("FSBL.Clients.HotkeyClient - one of the keys passed into a function was not a string: ",e);e=e.toLowerCase();const n=a[e];if(!n)return s.default.system.error(`FSBL.Clients.HotkeyClient - At least one of the key codes does not map to a supported key - registering hotkey unsuccessful. Unsupported keys: ${e}`);t.push(n)})),t};class d{constructor(){this.keyStrokeHandlers=[],this.key=null,this.shift=!1,this.ctrl=!1,this.alt=!1,this.cmd=!1,this.capsLock=!1,this.noKeyCapture=!1,this.downValue=null}registerKeyHandler(e){this.keyStrokeHandlers.push(e)}unregisterKeyHandler(e){this.keyStrokeHandlers=this.keyStrokeHandlers.filter((t=>t.keyString!==e.keyString||t.handler!==e.handler))}unregisterAllUsersKeyHandlers(){this.keyStrokeHandlers=this.keyStrokeHandlers.filter((e=>!0!==e.addedByUser))}keyup(e){switch(e.key){case"Shift":return this.shift=!1,void this.gotKeyStroke(e.key);case"Control":case"Alt":return this.ctrl=!1,void this.gotKeyStroke(e.key);case"Meta":case"Win":return this.cmd=!1,void this.gotKeyStroke(e.key)}this.key&&this.gotKeyStroke(this.key)}keydown(e){if(!this.noKeyCapture)switch(this.key=e.key,e.key){case"Meta":case"Win":this.cmd=!0;break;case"Shift":this.shift=!0;break;case"Control":case"Alt":this.ctrl=!0;break;case"CapsLock":this.capsLock=!this.capsLock;break;case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"Up":case"Down":case"Left":case"Right":this.key=null,this.gotKeyStroke(e.key)}}keypress(e){if(this.noKeyCapture)return;const t=e.which;t<32||t>222||(this.key=e.key)}gotKeyStroke(e){const t=[e];this.ctrl&&t.push("control"),this.shift&&t.push("shift"),this.alt&&t.push("alt"),this.cmd&&t.push("command");const n=t.sort().toString();this.keyStrokeHandlers.forEach((e=>{const t=e.keyString.toUpperCase(),i=n.toUpperCase();i!==t&&i.replace(/(CONTROL|COMMAND)/,"COMMANDORCONTROL")!==t||e.handler()}))}initialize(){document.addEventListener("keyup",(e=>{this.keyup(e)})),document.addEventListener("keydown",(e=>{this.downValue=e.key,this.keydown(e)})),document.addEventListener("keypress",(e=>{this.keypress(e)})),window.addEventListener("blur",(()=>{this.ctrl=!1,this.gotKeyStroke("Control")}))}}class c extends o._BaseClient{constructor(){super({onReady:e=>{this.start(),null==e||e()},name:"hotkeyClient"}),this.localListeners={},this.keyStrokes=null}async addLocalHotkey(e,t,n){return s.default.system.info("HotkeyClient.addLocalHotkey"),s.default.system.debug("HotkeyClient.addLocalHotkey, keyArr: ",e),this.addBrowserHotkey(e,t,!0),null==n||n(null),{err:null}}addBrowserHotkey(e,t,n){this.keyStrokes||(this.keyStrokes=new d,this.keyStrokes.initialize());const i=u({keys:e}).sort().toString();this.keyStrokes.registerKeyHandler({keyString:i,handler:t,addedByUser:n})}removeBrowserHotkey(e,t){var n;s.default.system.info("HotkeyClient.removeBrowserHotkey"),s.default.system.debug("HotkeyClient.removeBrowserHotkey, keyArr: ",e);const i=u({keys:e}).sort().toString();null===(n=this.keyStrokes)||void 0===n||n.unregisterKeyHandler({keyString:i,handler:t})}async removeLocalHotkey(e,t,n){return s.default.system.info("HotkeyClient.removeLocalHotkey"),s.default.system.debug("HotkeyClient.removeLocalHotkey, keyArr: ",e),this.removeBrowserHotkey(e,t),null==n||n(null),{err:null}}async addGlobalHotkey(e,t,n){s.default.system.info("HotkeyClient.addGlobalHotkey"),s.default.system.debug("HotkeyClient.addGlobalHotkey, keyArr: ",e);const i=u({keys:e}).sort().join("+");l.addListener(i,t);const{err:r}=await this.routerClient.query("hotkeysService.registerGlobalHotkey",{keys:i,windowName:this.windowName});return null==n||n(r),{err:r}}async removeGlobalHotkey(e,t,n){s.default.system.info("HotkeyClient.removeGlobalHotkey"),s.default.system.debug("HotkeyClient.removeGlobalHotkey, keyArr: ",e);const i=u({keys:e}).sort().join("+");l.removeListener(i,t);const{err:r}=await this.routerClient.query("hotkeysService.unregisterGlobalHotkey",{keys:i,windowName:this.windowName});return null==n||n(r),{err:r}}async removeAllHotkeys(e){var t;l.removeAllListeners();const{err:n}=await this.routerClient.query("hotkeysService.removeAllHotkeysForWindow",{windowName:this.windowName});return null===(t=this.keyStrokes)||void 0===t||t.unregisterAllUsersKeyHandlers(),null==e||e(n),{err:n}}start(){this.routerClient.addListener("HotkeyTriggered",((e,t)=>{e?console.error(`Hotkey Channel Error: ${JSON.stringify(e)}`):(null==t?void 0:t.data.windows.includes(this.windowName))&&l.emit(t.data.keys)}))}onClose(e){this.removeAllHotkeys(e)}}t.HotkeyClient=c;const f=new c;t.default=f},49136:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.LauncherClient=t.isMouseOverDOMElement=t.isPointInBox=t.getDesktopBoundingBox=void 0;const r=n(25232),o=n(23099),s=i(n(20670)),a=n(91374),l=i(n(2518)),u=n(24074),d=n(44137),c=i(n(84795)),f=n(24137),h=n(94017),p={},{finsembleWindow:g}=d.FEAGlobals;t.getDesktopBoundingBox=async e=>{var t,n;const i="string"==typeof e?document.querySelector(e):e;i||l.default.system.error("getDesktopBoundingBox can't find element",e);const r=i?i.getBoundingClientRect():{top:0,left:0,width:0,height:0},o=await g.getBounds(),s=o.data;o.err&&l.default.system.error("getDesktopBoundingBox: finsembleWindow.getBounds() error",o.err);const a=null!==(t=null==s?void 0:s.top)&&void 0!==t?t:0,u=null!==(n=null==s?void 0:s.left)&&void 0!==n?n:0,d={top:a+r.top,left:u+r.left,width:r.width,height:r.height,right:0,bottom:0};return d.right=d.left+d.width,d.bottom=d.top+d.height,d},t.isPointInBox=(e,t)=>(t.bottom||(t.bottom=t.top+t.height),t.right||(t.right=t.left+t.width),e.x>t.left&&e.x<t.right&&e.y<t.bottom&&e.y>t.top),t.isMouseOverDOMElement=async(e,n=Function.prototype)=>{const i=await(0,t.getDesktopBoundingBox)(e),r=await a.System.getMousePosition(),o=(0,t.isPointInBox)(r,i);return n(o),o};class m extends r._BaseClient{constructor(){super({onReady:e=>{l.default.system.debug("launcherClient ready",window.name),this.start(e)},name:"launcherClient"})}async getComponentList(e){s.default.args(e,"function="),await c.default.waitForStartup("windowService");const{err:t,response:n}=await this.routerClient.query("Launcher.componentList",{});return null==e||e(t,n.data),{err:t,data:n.data}}async getComponentDefaultConfig(e,t){s.default.args(t,"function=");const{err:n,data:i}=await this.getComponentList(),r=null==i?void 0:i[e];return null==t||t(n,r),{err:n,data:r}}async getMonitorInfoAll(e){return l.default.system.debug("LauncherClient.getMonitorInfoAll()"),(0,h.getAllMonitorsClientSide)(this.routerClient,e)}async getMonitorInfo(e={},t){return l.default.system.debug("LauncherClient.getMonitorInfo()"),"all"===e.monitor?(l.default.deprecated('Use of type "all" in LauncherClient.getMonitorInfo() is deprecated. Pleae use LauncherClient.getMonitorInfoAll()'),this.getMonitorInfoAll(t)):(0,h.getWhichMonitorClientSide)(this.routerClient,e,t)}async registerComponent(e,t){await c.default.waitForStartup("windowService");const{err:n,response:i}=await this.routerClient.query("LauncherService.registerComponent",e);return null==t||t(n,i.data),{err:n,data:i.data}}async unRegisterComponent(e,t){if(!e.componentType){const e="No componentType provided";return null==t||t(e),{err:e}}await c.default.waitForStartup("windowService");const{err:n,response:i}=await this.routerClient.query("LauncherService.unRegisterComponent",e);return null==t||t(n,i.data),{err:n,data:i.data}}locatorToIdentifier(e){let t={};return t.windowName="windowName"in e?e.windowName:"","componentType"in e&&(t.componentType=e.componentType),"uuid"in e&&(t.uuid=e.uuid),t}toggleWindowOnClick(e,n,i){var r,o;const s=this.locatorToIdentifier(n),a=null!==(o=null!==(r=s.windowName)&&void 0!==r?r:s.componentType)&&void 0!==o?o:"";!1!==p[a]?(i.position||(i.position="absolute"),this.showWindow(n,i,((n,i)=>{if(!i)return;const{finWindow:r}=i,o=()=>{p[a]=!0,(0,t.isMouseOverDOMElement)(e,(e=>{p[a]=!e})),r.removeEventListener("blurred",o)};r.addEventListener("blurred",o)}))):p[a]=!0}async showWindow(e,t,n){s.default.args(e,"object",t,"object=",n,"function="),t||(t={}),(t=(0,o.clone)(t)).staggerPixels||0===t.staggerPixels||(t.staggerPixels=100),t.windowIdentifier=this.locatorToIdentifier(e);const i=await(0,o.getMyWindowIdentifier)();t.relativeWindow||(t.relativeWindow=i),await c.default.waitForStartup("windowService");const{err:r,response:a}=await this.routerClient.query("Launcher.showWindow",t);if(r)return null==n||n(r),{err:r};{const e=a.data.windowIdentifier.windowName,{wrap:t}=await u.FinsembleWindow.getInstance({name:e}),i=Object.assign(Object.assign({},a.data),{windowIdentifier:Object.assign(Object.assign({},a.data.windowIdentifier),{name:e}),finWindow:t});return null==n||n(r,i),{err:r,data:i}}}async callSpawn(e){const t=e=>new Promise((t=>{const n=this.routerClient.subscribe(`Finsemble.${e}.componentReady`,((e,i)=>{e||!i.data?(l.default.system.error(`RouterClient.callSpawn() Error subscribing for component ready state ${e}`),t(e)):Object.keys(i.data).length&&(this.routerClient.unsubscribe(n),t(null))}))}));await c.default.waitForStartup("windowService");const{err:n,response:i}=await this.routerClient.query("Launcher.spawn",e);if(l.default.system.debug("CallSpawn","Initial launcher callback params",n,i),n||!i)return{err:null!=n?n:'Internal error: callSpawn(): No data returned from service for "Launcher.spawn"'};{const{data:e}=i;let r,o=[];Array.isArray(e)?(o=e.reduce(((e,t)=>(e.push(t.windowIdentifier.windowName),e)),[]),r=e[0]):r=e;const s=r.windowIdentifier.windowName,{wrap:a}=await u.FinsembleWindow.getInstance({name:s}),d=Object.assign(Object.assign({},r),{windowIdentifier:Object.assign(Object.assign({},r.windowIdentifier),{name:s}),finWindow:a});if(o.length>0&&(d.launchGroupWindows=o),d.windowDescriptor.native)return{err:n,result:d};{l.default.system.debug("CallSpawn","Waiting for ready signal",s);const e=await t(s);return l.default.system.debug("CallSpawn","Got ready signal",s),{err:e,result:d}}}}async spawn(e,t,n){s.default.args(e,"string",t,"object=",n,"function="),t||(t={}),(t=(0,o.clone)(t)).component=e,t.options||(t.options={}),t.options.customData||(t.options.customData={}),t.staggerPixels||0===t.staggerPixels||(t.staggerPixels=50),l.default.system.debug(`LauncherClient.spawn starting for componentType:${e}`);const i=await(0,o.getMyWindowIdentifier)();t.launchingWindow=i;const{err:r,result:a}=await this.callSpawn(t);return l.default.system.debug(`LauncherClient.spawn completing for componentType:${e}`,r),null==n||n(r,a),{error:r,response:a}}async getMonitor(e,t){return l.default.system.deprecated("This method is deprecated and will be removed in a future release. Use the method getMonitorInfo instead."),s.default.args(t,"function="),this.getMonitorInfo({windowIdentifier:e},t)}async getMyWindowIdentifier(e){s.default.args(e,"function=");const t=await(0,o.getMyWindowIdentifier)();return null==e||e(t),t}async getActiveDescriptors(e){s.default.args(e,"function="),await c.default.waitForStartup("windowService");const{err:t,response:n}=await this.routerClient.query("Launcher.getActiveDescriptors",{});return t&&l.default.system.error(t),null==e||e(t,n.data),{err:t,data:n.data}}getActiveAndPendingWindowNames(e=Function.prototype){return l.default.deprecated("LauncherClient.getActiveAndPendingWindowNames is deprecated and will be removed"),(0,f.deprecatedGetActiveAndPendingWindowNames)(this.routerClient,e)}async getPendingWindows(){l.default.deprecated("LauncherClient.getPendingWindows is deprecated and will be removed"),await c.default.waitForStartup("windowService");const{err:e,response:t}=await this.routerClient.query("Launcher.getPendingWindows",{});return{err:e,data:t.data}}async addUserDefinedComponent(e,t){s.default.args(t,"function="),await c.default.waitForStartup("windowService");const{err:n}=await this.routerClient.query("Launcher.userDefinedComponentUpdate",{type:"add",name:e.name,url:e.url});return n&&l.default.system.error(n),null==t||t(n),{err:n}}async removeUserDefinedComponent(e,t){s.default.args(t,"function="),await c.default.waitForStartup("windowService");const{err:n}=await this.routerClient.query("Launcher.userDefinedComponentUpdate",{type:"remove",name:e.name,url:e.url});return n&&l.default.system.error(n),null==t||t(n),{err:n}}getComponentsThatCanReceiveDataTypes(e,t=Function.prototype){return s.default.args(t,"function="),l.default.deprecated("LauncherClient.getComponentsThatCanReceiveDataTypes is deprecated and will be removed"),new Promise((n=>{if(!e||!e.dataTypes){const e="Invalid params. Expected: {dataTypes: string[]}";return t(e),n({err:e})}Array.isArray(e.dataTypes)||(e.dataTypes=[e.dataTypes]),this.routerClient.query("LauncherService.getComponentsThatCanReceiveDataTypes",e,((e,i)=>{t(e,i.data),n({err:e,data:i.data})}))}))}async bringWindowsToFront(e={},t=Function.prototype){return s.default.args(t,"function="),e.windowList&&!Array.isArray(e.windowList)&&(e.windowList=[e.windowList]),e.groupName&&s.default.args(e.groupName,"string"),e.componentType&&s.default.args(e.componentType,"string"),await c.default.waitForStartup("windowService"),this.routerClient.query("LauncherService.bringWindowsToFront",e,((e,n)=>{t(e,n)})),Promise.resolve()}async hyperFocus(e,t){l.default.system.deprecated("hyperFocus is deprecated as of version 4.0.0. This functionality may be removed in a future release"),s.default.args(t,"function="),e.windowList&&!Array.isArray(e.windowList)&&(e.windowList=[e.windowList]);const n=await(0,o.getMyWindowIdentifier)();e.windowList||e.groupName||e.componentType||(e.windowList=n?[n]:[]),e.groupName&&s.default.args(e.groupName,"string"),e.componentType&&s.default.args(e.componentType,"string"),await c.default.waitForStartup("windowService"),await this.routerClient.transmit("LauncherService.hyperFocus",e),null==t||t()}async minimizeWindows(e,t){s.default.args(t,"function="),e.windowList&&!Array.isArray(e.windowList)&&(e.windowList=[e.windowList]),e.groupName&&s.default.args(e.groupName,"string"),e.componentType&&s.default.args(e.componentType,"string"),await c.default.waitForStartup("windowService"),this.routerClient.transmit("LauncherService.minimizeWindows",e),null==t||t()}createWindowGroup(e,t=Function.prototype){return s.default.args(t,"function="),l.default.deprecated("LauncherClient.createWindowGroup is deprecated and will be removed"),e.windowList&&!Array.isArray(e.windowList)&&(e.windowList=[e.windowList],delete e.groupName),s.default.args(e.groupName,"string"),new Promise((async n=>{if(!e.groupName){const e="Invalid Parameters";return n({err:e}),void t(e)}await c.default.waitForStartup("windowService"),this.routerClient.query("LauncherService.createWindowGroup",e,((e,i)=>{t(e,i),n({err:e,data:i})}))}))}addWindowsToGroup(e,t=Function.prototype){return s.default.args(t,"function="),l.default.deprecated("LauncherClient.addWindowsToGroup is deprecated and will be removed"),new Promise((async n=>{if(!e.groupName||!e.windowList){const e="Invalid Parameters";return n({err:e}),void t(e)}e.windowList&&!Array.isArray(e.windowList)&&(e.windowList=[e.windowList]),s.default.args(e.groupName,"string"),await c.default.waitForStartup("windowService"),this.routerClient.query("LauncherService.addWindowsToGroup",e,((e,i)=>{t(e,i),n({err:e,data:i})}))}))}removeWindowsFromGroup(e,t=Function.prototype){return s.default.args(t,"function="),l.default.deprecated("LauncherClient.removeWindowsFromGroup is deprecated and will be removed"),new Promise((async n=>{if(!e.groupName||!e.windowList){const e="Invalid Parameters";return n({err:e}),void t(e)}e.windowList&&!Array.isArray(e.windowList)&&(e.windowList=[e.windowList]),await c.default.waitForStartup("windowService"),this.routerClient.query("LauncherService.removeWindowsFromGroup",e,((e,i)=>{t(e,i),n({err:e,data:i})}))}))}getGroupsForWindow(e,t=Function.prototype){return s.default.args(t,"function="),l.default.deprecated("LauncherClient.getGroupsForWindow is deprecated and will be removed"),"function"==typeof e&&(t=e,e=null),new Promise((async n=>{e&&e.windowIdentifier?(await c.default.waitForStartup("windowService"),this.routerClient.query("LauncherService.getGroupsForWindow",e,((e,i)=>{n({err:e,data:i.data}),t(e,i.data)}))):g.getComponentState({field:"finsemble:windowGroups"},((e,i)=>{n({err:e,data:i}),t(e,i)}))}))}async addToGroups(e,t){var n;s.default.args(t,"function="),s.default.args(e.groupNames,"array"),l.default.deprecated("LauncherClient.addToGroups is deprecated and will be removed");const i=await(0,o.getMyWindowIdentifier)();e.windowIdentifier=null!==(n=e.windowIdentifier)&&void 0!==n?n:i,await c.default.waitForStartup("windowService");const{err:r}=await this.routerClient.query("LauncherService.addWindowToGroups",e);return null==t||t(r),{err:r}}_createWrap(e,t){this.routerClient.query("LauncherService.createWrap",e,t)}start(e){if(g){const e=async()=>{await c.default.waitForStartup("windowService"),this.routerClient.subscribe(`Finsemble.LauncherService.updateGroups.${this.windowName}`,((e,t)=>{Array.isArray(t.data)&&g.setComponentState({field:"finsemble:windowGroups",value:t.data})}))};g.getComponentState({field:"finsemble:windowGroups"},((t,n)=>{if(!t&&n)return this.addToGroups({groupNames:n},e);e()}))}setInterval((()=>{this.routerClient.transmit("Finsemble.heartbeat",{type:"component",windowName:this.windowName,componentType:"finsemble",isBrowserView:a.System.isBrowserView()})}),1e3),e()}}t.LauncherClient=m;const w=new m;t.default=w},2518:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Logger=t.LoggerClient=t.LocalLogger=t.LoggerConnection=void 0;const r=n(91374),o=n(10166),s=n(31219),a=i(n(11314)),l=n(7860),u=n(23493),d=n(96486),c={Error:!0,Warn:!0,Info:!0,Log:!0,Debug:!0,Verbose:!1,LocalOnly:!1},f=1e4,h={console:{Error:!0,Warn:!0,Info:!0,Log:!0,Debug:!0,Verbose:!0,LocalOnly:!1},dev:c,system:c,perf:c},p=()=>{const{stack:e}=function(){try{throw Error("")}catch(e){return e}}();let t=6;e.includes("console.error")&&t++;const n=("\n",i=t,e.split("\n",i).join("\n").length);var i;return`Log Stack: \n${e.substring(n).substr(1)}`},g=e=>{const t=[],n=[e];let i=0,r=0;for(;n.length&&r<1e3;){r++;const e=n.pop();if("boolean"==typeof e)i+=4;else if("string"==typeof e)i+=2*e.length;else if("number"==typeof e)i+=8;else if("object"==typeof e&&-1===t.indexOf(e)){t.push(e);for(const t in e)n.push(e[t])}}return i},m=(e,t,n=0,i=1)=>{const r=t/2,o=r/2,s="*STRIPPED*",a=e=>{let t=g(e);e.length>0&&t>o&&(e[0]=m(e[0],r,n,i+1),e[1]=`*STRIPPED* from size ${e.length}`,e.length=2)};let l=(0,d.cloneDeep)(e);if("object"!=typeof l)l=s,n+=g(l);else if(Array.isArray(l))a(l),n+=g(l);else{let e=Object.getOwnPropertyNames(l);for(let u=0;u<e.length;u++){let d=g(l[e[u]]);n>r&&d>100&&i>=3&&u>=1||n>f&&d>=10?l[e[u]]=s:d>o&&(Array.isArray(l[e[u]])?a(l[e[u]]):l[e[u]]=m(l[e[u]],t/1.2,n,i+1)),n+=g(l[e[u]])}}return l},w=e=>"logger.service.logMessages"===e||"Finsemble.heartbeat"===e,y=console.error.bind(window.console);console.standardError=console.error;class v{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=r.System.Window.getCurrent().name,this.onLogStateChangeCallback=[],this.currentLogState=h,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:250;this.transmitAndClearQueue=u((()=>{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:i}=this;this.system.debug("Logger updateQueueBasedOnState",e,i,"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+i),[t];console.log(t.category,t.logType,t.logTimestamp-s.Performance.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{console.error("Logging Queue Overflowed! Dumping queue here then continuing",t.length);let e,n=0;for(;e=t.shift();)console.log("Message "+n++,e);this.system.error("Logging Queue Overflowed! Dumping queue in client then continuing.")}}callStack(){return p()}setting(){return this.currentLogState}outputToConsole(e,t){const n={Debug:console.debug,Info:console.info,Warn:console.warn,Error:y,Log:console.log,Verbose:console.log};try{n[e](...t)}catch(e){y("Error outputting log to console",e,p())}}formatAndQueueMessage(e,t,n){var i;const o="forceObjectsToLogger"===n[0],a=n.flatMap((e=>{if(!o&&g(e)>f){this.outputToConsole("Warn",["Message too large to send to the logger.",...n]);let t=m(e,f);return["NOTE: LOG ARG STRIPPED since greater than 10KB. Check origin's local Console to see output of the complete object.",`OldSize=${g(e)} NewSize=${g(t)}`,t]}return e instanceof Error?[e.toString()]:"forceObjectsToLogger"===e?[]:[e]}));let l=null;try{l=JSON.stringify(a)}catch(e){l=`*** Logger error can't JSON.stringify: ${p()}`}"Error"!==t&&"Warn"!==t&&"console"!==e||this.outputToConsole(t,n);const u=null!==(i=this.viewId)&&void 0!==i?i:r.System.isBrowserView()&&r.System.getWebContentsId(),d={category:"console"===e?"system":e,logType:t,logClientName:u?`${this.loggerClientName}: view-${u}`:this.loggerClientName,logData:l,logTimestamp:s.Performance.timing.navigationStart+s.Performance.now()+this.calibratedTimeStampOffset};u&&(d.viewId=u),this.addToQueue(d),this.isRegistered&&this.transmitAndClearQueue()}logIt(e,t,n){if(this.currentLogState[e][t])if("Warn"!==t&&"Error"!==t||n.push(p()),this.currentLogState[e].LocalOnly){const i=t.toLowerCase();n.unshift(`${e} ${i} (${s.Performance.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){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):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}=o.Startup.getInstance().getStartupData();this.loggerClientName=window&&window.top!==window?`${t}.Frame`:t;const i=`finsemble.logger.client.${this.loggerClientName}`;!this.viewId&&r.System.isBrowserView()&&(this.viewId=r.System.getWebContentsId()),this.system.debug("logger.service.registering",this.loggerClientName),r.System.Window.getCurrent().getOptions((async e=>{var r,o;const s=null===(o=null===(r=null==e?void 0:e.customData)||void 0===r?void 0:r.component)||void 0===o?void 0:o.centralLoggerNamePrefix;if(!this.routerClient)return;const{err:a,response:l}=await this.routerClient.query("logger.service.register",{clientName:this.loggerClientName,clientChannel:i,displayName:null!=n?n:t,windowName:t,viewId:this.viewId,centralLoggerNamePrefix:s});a?(console.warn("Logger service not available. Trying to connect again in 750ms.",a),setTimeout((()=>{this.registerWithLoggerService()}),750)):this.completeRegistration(l.data)})),null===(e=this.routerClient)||void 0===e||e.addListener(i,((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 i=e||{clientName:this.loggerClientName,viewId:this.viewId};null===(n=this.routerClient)||void 0===n||n.query("logger.service.unregister",i,t)}waitForServiceAndCalibrate(){var e;const t=null===(e=this.routerClient)||void 0===e?void 0:e.subscribe("Finsemble.Service.State.loggerService",((e,n)=>{var i,r;"ready"===n.data.state&&(this.system.debug("Logger onReady",this.loggerClientName),null===(i=this.routerClient)||void 0===i||i.calibrateTimeWithRouterService((e=>{this.newCalibratedTimeStampOffset=e,this.isRegistering||(this.isRegistering=!0,this.startupTime=performance.now()-this.startupTime,this.registerWithLoggerService())})),t&&(null===(r=this.routerClient)||void 0===r||r.unsubscribe(t)))}))}async start(e){if(this.routerClient=null!=e?e:a.default,this.startupTime=performance.now(),"routerService"===window.name){const{err:e}=await this.routerClient.query("logger.service.register",{});e?setTimeout((()=>{this.waitForServiceAndCalibrate()}),750):this.waitForServiceAndCalibrate()}else this.waitForServiceAndCalibrate();r.System.isBrowserView()&&window.addEventListener("beforeunload",(()=>{this.unregisterClient()}))}}t.LoggerConnection=v;const b={start:e=>{(0,l.singleton)("LoggerClient",v).start(e)},channelFilter:e=>w(e),setting:()=>(0,l.singleton)("LoggerClient",v).setting(),callStack:()=>(0,l.singleton)("LoggerClient",v).callStack(),unregisterClient:(e,t)=>{(0,l.singleton)("LoggerClient",v).unregisterClient(e,t)},setRouterClient:e=>{(0,l.singleton)("LoggerClient",v).setRouterClient(e)},onStateChanged(e){(0,l.singleton)("LoggerClient",v).onStateChanged(e)},error:(...e)=>(0,l.singleton)("LoggerClient",v).error(...e),warn:(...e)=>(0,l.singleton)("LoggerClient",v).warn(...e),info:(...e)=>(0,l.singleton)("LoggerClient",v).info(...e),log:(...e)=>(0,l.singleton)("LoggerClient",v).log(...e),debug:(...e)=>(0,l.singleton)("LoggerClient",v).debug(...e),verbose:(...e)=>(0,l.singleton)("LoggerClient",v).verbose(...e),deprecated:(...e)=>(0,l.singleton)("LoggerClient",v).deprecated(...e),system:{error:(...e)=>(0,l.singleton)("LoggerClient",v).system.error(...e),warn:(...e)=>(0,l.singleton)("LoggerClient",v).system.warn(...e),info:(...e)=>(0,l.singleton)("LoggerClient",v).system.info(...e),log:(...e)=>(0,l.singleton)("LoggerClient",v).system.log(...e),debug:(...e)=>(0,l.singleton)("LoggerClient",v).system.debug(...e),verbose:(...e)=>(0,l.singleton)("LoggerClient",v).system.verbose(...e),deprecated:(...e)=>(0,l.singleton)("LoggerClient",v).system.deprecated(...e)},perf:{error:(...e)=>(0,l.singleton)("LoggerClient",v).perf.error(...e),warn:(...e)=>(0,l.singleton)("LoggerClient",v).perf.warn(...e),info:(...e)=>(0,l.singleton)("LoggerClient",v).perf.info(...e),log:(...e)=>(0,l.singleton)("LoggerClient",v).perf.log(...e),debug:(...e)=>(0,l.singleton)("LoggerClient",v).perf.debug(...e),verbose:(...e)=>(0,l.singleton)("LoggerClient",v).perf.verbose(...e),deprecated:(...e)=>(0,l.singleton)("LoggerClient",v).perf.deprecated(...e)},console:{error:(...e)=>(0,l.singleton)("LoggerClient",v).console.error(...e),warn:(...e)=>(0,l.singleton)("LoggerClient",v).console.warn(...e),info:(...e)=>(0,l.singleton)("LoggerClient",v).console.info(...e),log:(...e)=>(0,l.singleton)("LoggerClient",v).console.log(...e),debug:(...e)=>(0,l.singleton)("LoggerClient",v).console.debug(...e),verbose:(...e)=>(0,l.singleton)("LoggerClient",v).console.verbose(...e),deprecated:(...e)=>(0,l.singleton)("LoggerClient",v).console.deprecated(...e)}};r.System.isBrowserView()?b.console.log("Logger client console.error is not wrapped to capture logs."):(b.console.log("Logger client console.error is wrapped to capture logs."),console.error=function(...e){let t;e.push("(console error)");try{t=JSON.parse(JSON.stringify(e))}catch(n){t="console.error: arguments could not be serialized for logging",e.push("arguments could not be serialized to send to Central Logger"),y(...e)}b.console.error(...t)}),window.addEventListener("error",(e=>{(null==e?void 0:e.message)&&(null==e?void 0:e.filename)?b.console.error(`Logger client caught ErrorEvent. Error: ${e.message}`,`File: ${e.filename}`,`Line number: ${e.lineno}`):(b.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.`),console.warn("Event Details (for above message)",e))}),!0),window.addEventListener("unhandledrejection",(e=>{b.console.error("Logger client caught Unhandled rejection","reason",e.reason,JSON.stringify(e))}),!0),t.LocalLogger={start:()=>{},channelFilter:w,setting:()=>h,callStack:()=>p(),unregisterClient:()=>{},setRouterClient:()=>{},onStateChanged:()=>{},warn:console.warn,info:console.info,log:console.log,debug:console.debug,error:console.error,verbose:console.debug,deprecated:console.error,system:{warn:console.warn,info:console.info,log:console.log,debug:console.debug,error:console.error,verbose:console.debug,deprecated:console.error},perf:{warn:console.warn,info:console.info,log:console.log,debug:console.debug,error:console.error,verbose:console.debug,deprecated:console.error},console:{warn:console.warn,info:console.info,log:console.log,debug:console.debug,error:console.error,verbose:console.debug,deprecated:console.error}};const S="undefined"==typeof window;t.LoggerClient=S?t.LocalLogger:b,t.Logger=t.LoggerClient,t.default=t.LoggerClient},5395:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.NotificationClient=t.ActionTypes=t.ROUTER_NAMESPACE=void 0;const r=n(46215);Object.defineProperty(t,"ActionTypes",{enumerable:!0,get:function(){return r.ActionTypes}});const o=n(252),s=n(25232),a=i(n(9381)),l=i(n(97525)),u=i(n(49136)),d=i(n(9060)),c="notification.",f="unsubscribe";t.ROUTER_NAMESPACE={ACTION_PREFIX:"notification.action."};class h extends s._BaseClient{constructor(e){super(e),this.subscriptions=[],this.Notification=r.Notification,this.ActionTypes=r.ActionTypes,this.Subscription=r.Subscription,this.Action=r.Action,this.Filter=r.Filter,this.actionTypes=r.ActionTypes,this.onClose=e=>{this.unsubscribeAll(),e&&e()},this.publicEventManager=new d.default({name:"notificationClient",sourceType:"notification"})}async applyOverrides(){var e,t;const{data:n}=await a.default.getValue("finsemble.servicesConfig.notifications.applyNotificationOverrides");if(!n)return;const i=l.default.getWindowIdentifier().windowName,{data:r}=await u.default.getActiveDescriptors(),o=Object.keys(r).filter((e=>e===i)).map((e=>r[e]));let s,d="Unknown Source";1!==o.length?this.logger.system.warn("Unable to fetch component to extract type or display name"):(s=o[0],d=(null===(t=null===(e=s.customData)||void 0===e?void 0:e.component)||void 0===t?void 0:t.displayName)||s.componentType);const c=(e,t)=>{t.finsembleSource=d,this.notify(JSON.parse(JSON.stringify({title:e,options:t})))},f=window.Notification;c.requestPermission=f.requestPermission.bind(f),Object.defineProperty(c,"permission",{get:function(){return f.permission}}),window.Notification=c}addEventListener(e,t){this.publicEventManager.addEventListener(e,t)}removeEventListener(e,t){this.publicEventManager.removeEventListener(e,t)}query(e,t,n,i){return new Promise((async(r,o)=>{try{null==n&&(n=c),this.logger.system.info(`sending message on ${n+e} channel`,t);const s=await this.routerClient.query(n+e,t);s.err?(this.logger.system.error("Error: ",s.err),o(s.err)):(this.logger.system.log(`${e} raw response: `,s),i&&i(null,s.response.data.data),r(s.response.data.data))}catch(e){this.logger.system.error("Error: ",e),i&&i(e),o(e)}}))}async fetchHistory(e,t){return this.logger.system.info("FetchHistory() called with params: ",e,t),await this.query("fetch_history",{options:e,filter:t})}async getLastIssuedAt(e){return this.logger.system.info("getLastIssued called with params: ",e),await this.query("last_issued",e)}async performAction(e,t){return this.logger.system.info("performAction() called with params: ",e,t),Array.isArray(e)||(e=[e]),await this.query("perform_action",{notifications:e,action:t})}async markRead(e){this.logger.system.info("markRead() called with params: ",e),Array.isArray(e)||(e=[e]),await this.query("mark_read",{notifications:e,isRead:!0})}async markUnread(e){this.logger.system.info("markUnread() called with params: ",e),Array.isArray(e)||(e=[e]),await this.query("mark_unread",{notifications:e,isRead:!1})}deleteNotifications(e){return this.logger.system.info("deleteNotifications() called with params: ",e),new Promise((async(t,n)=>{try{t(this.query("delete",e))}catch(e){n(e)}}))}async notify(e){this.logger.system.info("notify() called with params: ",e);try{await this.query("notify",Array.isArray(e)?e:[e])}catch(t){if(!t.includes("No responder"))throw t;await(0,o.sleep)(500),await this.notify(e)}}async subscribe(e,t){this.logger.system.info("subscribe() called with params: ",e,t);const n=await this.query("subscribe",JSON.parse(JSON.stringify(e)));return this.logger.system.info("Got a return value containing a channel",n),await this.monitorChannel(n.channel,t),this.subscriptions.push(n),n}async unsubscribe(e){this.logger.system.info("unsubscribe() called with params: ",e),await this.query(f,e),this.cleanupSubscription(e)}removeResponder(e,t){null==t&&(t=c),this.routerClient.removeResponder(t+e)}unsubscribeAll(){this.logger.system.info("unsubscribeAll() called"),this.subscriptions.forEach((e=>{this.query(f,e.id).then(),this.removeResponder(e.id)})),this.subscriptions=[]}async mute(e){return this.logger.system.info("mute() called with params: ",e),await this.query("mute",{filter:e})}async unmute(e){return this.logger.system.info("unmute() called with params: ",e),await this.query("unmute",{filter:e})}async getSources(){return this.logger.system.info("getSources() called"),await this.query("sources",{})}async getMuteFilters(){return this.logger.system.info("getSources() called"),await this.query("mute_filters",{})}async getPreferences(){return this.logger.system.info("getPreferences() called"),await this.query("preferences",{})}cleanupSubscription(e){const t=this.subscriptions.findIndex((t=>t.id===e));t>-1&&(this.removeResponder(this.subscriptions[t].channel),this.subscriptions.splice(t,1))}addResponder(e,t,n){null==n&&(n=c),this.logger.system.info(`Adding responder for endpoint: ${n+e}`),this.routerClient.addResponder(n+e,((n,i)=>{if(this.logger.system.info(`Message received on ${e}: `,i),!n&&i)try{this.logger.system.info(`Processing message on channel ${e}: `,i);const n=t(i.data);this.logger.system.info(`Message response on ${e}: `,n),i.sendQueryResponse(null,{status:"success",data:n})}catch(e){this.logger.system.error("Failed to process query",e),i.sendQueryResponse(e)}else this.logger.system.error(`Failed to setup ${e} responder`,n)}))}monitorChannel(e,t){return new Promise((n=>{this.logger.system.info("Listening for messages on channel",e),this.addResponder(e,(e=>{this.logger.system.info("Notification received: ",e.id);try{t(e)}catch(e){this.logger.system.error("Error thrown in the subscription.onNotification()",e)}return{message:"success"}})),n()}))}}t.NotificationClient=h;const p=new h({onReady:function(e){p.applyOverrides(),this.logger.system.log("notificationClient Online"),e()},name:"notificationClient"});t.default=p},11314:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RouterClient=t.RouterController=t.RouterConnection=void 0;const r=i(n(78268)),o=i(n(20670)),s=i(n(16994)),a=n(2518),l=n(44137),u=n(31219),d=n(21614),c=n(7860);function f(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]?f(e[n],null):t[n];return t}class h{constructor(){this.queue=[],this.started=!1,this.clientName="RouterClient.clientName not yet set",this.transport=null,this.isRouterReady=!1,this.parentReadyCallbackQueue=[],this.notificationURL="",this.mapListeners={},this.mapQueryResponders={},this.mapPubSubResponders={},this.mapPubSubResponderState={},this.mapPubSubResponderRegEx={},this.pubsubListOfSubscribers={},this.mapSubscribersID={},this.mapSubscribersTopic={},this.mapQueryResponses={},this.mapQueryResponseTimeOut={}}onReadyCallBack(){for(a.LoggerClient.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient Ready"),this.isRouterReady=!0;this.parentReadyCallbackQueue.length>0;){a.LoggerClient.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient parentReady invoked");const e=this.parentReadyCallbackQueue.shift();null==e||e()}}sendToRouterService(e){this.transport?this.transport.send(e):(a.LoggerClient.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,i=this.mapListeners[t]||[];Array.isArray(i)&&0!==i.length?(e.originatedHere=()=>this.originatedHere(e),i.forEach((i=>{a.LoggerClient.channelFilter(t)||a.LoggerClient.system.info("RouterClient: incoming transmit","CHANNEL",t,"FROM",n,"MESSAGE",e),i(null,e)}))):a.LoggerClient.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:i,error:r}=e.header;a.LoggerClient.system.info("RouterClient: incoming query","CHANNEL",t,"FROM",n,"QUERY MESSAGE",e);const o=(e,n)=>{a.LoggerClient.system.info("RouterClient: outgoing query response","CHANNEL",t,"RESPONSE DATA",n,"QUERY ID",i);let r={header:{origin:this.clientName,queryID:i,type:"queryResponse"},data:n};r.header.error=e?e.toString():null,this.sendToRouterService(r)},s=this.mapQueryResponders[t];void 0===s?e.header.logWhenNoResponder&&a.LoggerClient.system.warn(`RouterClient: No query responder defined on channel ${t} for incoming from ${n}.`,e):r?(a.LoggerClient.system.warn("RouterClient: queryResponder error",e),s(r),delete this.mapQueryResponders[t]):s(null,Object.assign(Object.assign({},e),{originatedHere:()=>this.originatedHere(e),sendQueryResponse:(e,t)=>{o(e,t)}}))}invokeQueryResponse(e){var t;a.LoggerClient.system.info("RouterClient: incoming query response","CHANNEL",e.header.channel,"QUERY ID",e.header.queryID,"message",e);const{queryID:n}=e.header,i=this.mapQueryResponseTimeOut[n];delete this.mapQueryResponseTimeOut[n],i&&clearTimeout(i);const r=this.mapQueryResponses[n];r?(delete this.mapQueryResponses[n],r(null!==(t=e.header.error)&&void 0!==t?t:null,e)):a.LoggerClient.system.warn("Invariant: RouterClient: no handler found for incoming query response.",e)}invokeNotifyCallback(e){const{subscribeID:t,error:n}=e.header,i=this.mapSubscribersID[t];i?n?(a.LoggerClient.system.info("RouterClient: incoming PubSub notify error for subscriberID","SUBSCRIBER ID",t,"NOTIFY MESSAGE",e),i(n,e)):(e.originatedHere=()=>this.originatedHere(e),a.LoggerClient.system.info("RouterClient: incoming PubSub notify","SUBSCRIBER ID",t,"NOTIFY MESSAGE",e),i(null,e)):a.LoggerClient.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 i=(e,n,i)=>{var r;n?a.LoggerClient.system.warn("RouterClient: incoming publish rejected by pubsub responder",n,i):(this.mapPubSubResponderState[t]=i,(null!==(r=this.pubsubListOfSubscribers[t])&&void 0!==r?r:[]).forEach((e=>{a.LoggerClient.system.info("RouterClient: sending pubsub notify","TOPIC",t,"NOTIFY DATA",i);const n={header:{origin:this.clientName,type:"notify",topic:t,subscribeID:e},data:i};this.sendToRouterService(n)})))};if(a.LoggerClient.system.info("RouterClient: incoming PubSub publish "+(n.publishCallback?"(publishCallback hook invoked)":""),"TOPIC",t,"PUBLISH MESSAGE",e),n.publishCallback){const t=Object.assign(Object.assign({},e),{sendNotifyToAllSubscribers:(t,n)=>{i(e,t,n)}});n.publishCallback(null,t)}else i(e,null,e.data)}else a.LoggerClient.system.warn("RouterClient: no pubsub responder defined for incoming publish","TOPIC",t,"PUBLISH MESSAGE",e)}invokeSubscribeEvent(e){var t;const{topic:n,error:i}=e.header;a.LoggerClient.system.info("RouterClient: PubSub subscribe","TOPIC",n);let r=this.mapPubSubResponders[n];if(!r)for(const e in this.mapPubSubResponderRegEx)if(this.mapPubSubResponderRegEx[e].test(n)){r=this.mapPubSubResponders[e],this.mapPubSubResponderState[n]=null!==(t=this.mapPubSubResponderState[n])&&void 0!==t?t:this.mapPubSubResponderState[e];break}if(r)if(i)a.LoggerClient.system.warn(`RouterClient: pubsub error received from router service: ${i}`,e);else if(r.subscribeCallback){const t=Object.assign(Object.assign({},e),{sendNotifyToSubscriber:(t,n)=>{this.sendNotifyToSubscriber(e,t,n)}});e.data=this.mapPubSubResponderState[n],r.subscribeCallback(null,t)}else this.sendNotifyToSubscriber(e,null,this.mapPubSubResponderState[n]);else a.LoggerClient.system.warn("RouterClient: no pubsub responder defined for incoming subscribe event",e)}invokeUnsubscribeEvent(e){const{topic:t,subscribeID:n}=e.header;let i=this.findResponder(t);if(!i)for(const e in this.mapPubSubResponderRegEx)if(this.mapPubSubResponderRegEx[e].test(t)){i=this.mapPubSubResponders[e];break}if(i)if(a.LoggerClient.system.info("RouterClient: incoming unsubscribe "+(i.unsubscribeCallback?"with unsubscribeCallback hook":""),"TOPIC",t,"UNSUBSCRIBE MESSAGE",e),i.unsubscribeCallback){const r=Object.assign(Object.assign({},e),{removeSubscriber:()=>{this.removeSubscribers(t,n)}});i.unsubscribeCallback(null,r)}else this.removeSubscribers(t,n);else a.LoggerClient.system.warn("RouterClient: no pubsub responder defined for incoming unsubscribe event","TOPIC",t,"UNSUBSCRIBE MESSAGE",e)}sendNotifyToSubscriber(e,t,n){const{topic:i,subscribeID:r}=e.header;if(void 0!==n){let e={header:{origin:this.clientName,type:"notify",topic:i,subscribeID:r},data:n};t&&(e.header.error=t),this.sendToRouterService(e)}t?a.LoggerClient.system.warn("RouterClient: incoming subscription rejected by pubsub responder","TOPIC",i,"MESSAGE",this):(i in this.pubsubListOfSubscribers?this.pubsubListOfSubscribers[i].push(r):this.pubsubListOfSubscribers[i]=[r],a.LoggerClient.system.info("RouterClient: incoming subscription added","TOPIC",i,"MESSAGE"))}removeSubscribers(e,t){let n=!1;if(e in this.pubsubListOfSubscribers){const i=this.pubsubListOfSubscribers[e];for(let r=0;r<i.length;r++)if(t===i[r]){i.splice(r,1),0===i.length&&delete this.pubsubListOfSubscribers[e],n=!0,a.LoggerClient.system.info("RouterClient: PubSub removeListener","TOPIC",e,"FROM",t);break}}n||a.LoggerClient.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(a.LoggerClient.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){a.LoggerClient.system.debug(`Name of transport to establish: ${t}`),e.notificationURL&&(this.notificationURL=e.notificationURL);let i=null,o=0,l=!1,u=0,d=null;const c=()=>{if(clearInterval(i),u++,u<=3)a.LoggerClient.console.error("WINDOW LIFECYCLE:STARTUP:RouterClient: failure to connect to router service. Retrying...",u,e),null==d||d();else{const t="A cross domain transport has failed to connect. Cross domain components may not work. Please contact your administrator.";a.LoggerClient.console.error(t,e),s.default.alert("dev","ONCE-SINCE-STARTUP","FSBL-Internal-Transport-Failure",t,{url:this.notificationURL})}},f=()=>{a.LoggerClient.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient: sendHandshake",o);const e={header:{origin:this.clientName,type:"initialHandshake"}};this.sendToRouterService(e),o++>50&&c()},h=()=>{if(!l){a.LoggerClient.system.debug(`WINDOW LIFECYCLE:STARTUP:RouterClient connected: Starting ${this.clientName} with transport ${this.transport.identifier()}`),l=!0,clearInterval(i);for(let e=0;e<this.queue.length;e++){a.LoggerClient.system.debug("RouterClient: releasing queued msg");const t=this.queue[e];this.transport.send(Object.assign(Object.assign({},t),{header:Object.assign(Object.assign({},t.header),{origin:this.clientName})}))}null==n||n()}},p=e=>{o=0,a.LoggerClient.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient:transport ready","TRANSPORT OBJECT",e),this.transport=e,this.handshakeHandler=h,f(),i=setInterval(f,200)};d=()=>{a.LoggerClient.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient:getClientTransport","ROUTER PARAMS:",e),r.default.getTransport(e,t,((e,t)=>{t.header.lastClient=this.clientName,t.header.incomingTransportInfo=e,this.routeIncomingMessage(t)}),this.clientName,"RouterService").then(p).catch((e=>{a.LoggerClient.console.error("RouterClient getTransport error",e)}))},d()}addPubSubResponderCallBack(e,t,n,i){const r=e.toString();return!this.mapPubSubResponders[r]&&(e instanceof RegExp&&(this.mapPubSubResponderRegEx[r]=e,a.LoggerClient.system.info(`RouterClient: PubSub RegEx added for topic ${r}`)),this.mapPubSubResponders[r]={subscribeCallback:t,publishCallback:n,unsubscribeCallback:i},!0)}calibrateTimeWithRouterService(e){let t=0,n=0,i=1/0;const r={header:{origin:this.clientName,type:"timeCalibration"},clientBaseTime:[],serviceBaseTime:[]};this.timeCalibrationHandler=r=>{if(t++,t>5)(t=>{const{clientBaseTime:r,serviceBaseTime:o}=t;let s=0;for(let e=1;e<5;e++){const t=r[e-1],l=r[e]-t,u=o[e-1]-(t+l/2);l<i&&(i=l,n=u),s+=u,a.LoggerClient.system.debug("calibrationCalculation Intermediate Values","lastRRT",l,"lastOffset",u,"fastestOffset",n,"fastestRRT",i)}s/=4,a.LoggerClient.system.debug("RouterClient calibrationCalculation","Average Offset",s,"Chosen FastestOffset",n,t),e(n)})(r);else{r.clientBaseTime.push(u.Performance.timing.navigationStart+u.Performance.now());const e={header:{origin:this.clientName,type:"timeCalibration"},clientBaseTime:r.clientBaseTime,serviceBaseTime:r.serviceBaseTime};this.sendToRouterService(e)}},this.timeCalibrationHandler(r)}start(e){return new Promise((async t=>{if(this.started){const e="RouterClient.start() called twice. Ignoring second call.";return a.LoggerClient.system.warn(e),t(e)}this.started=!0,this.clientName=`RouterClient.${e.windowName}.${(0,d.v4)()}`;const n=`"RouterClient Check: connecting new client for ${this.clientName}`;a.LoggerClient.system.debug(n),console.debug(n),r.default.setTransports(),this.asyncConnectToEventRouter(e,e.transportName,(()=>{this.onReadyCallBack(),t(null)}))}))}stop(){this.disconnectAll(),r.default.close(),this.started=!1}onReady(e){return new Promise((t=>{o.default.args(e,"function");const n=()=>{e&&e(),t()};this.isRouterReady?n():this.parentReadyCallbackQueue.push(n)}))}addListener(e,t){a.LoggerClient.system.info("RouterClient.addListener","CHANNEL",e),o.default.args(e,"string",t,"function");const n=this.mapListeners[e];if(n&&0!==n.length)n.some((e=>t===e))?a.LoggerClient.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){a.LoggerClient.channelFilter(e)||a.LoggerClient.system.info("RouterClient.transmit","TO CHANNEL",e,"DATA",t),o.default.args(e,"string",t,"any");const i={header:{origin:this.clientName,type:"transmit",channel:e},data:t,options:n};this.sendToRouterService(i)}removeListener(e,t){if(a.LoggerClient.system.info("RouterClient.removeListener","CHANNEL",e,"EVENT HANDLER",t),o.default.args(e,"string",t,"function"),!this.mapListeners[e])return a.LoggerClient.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(a.LoggerClient.system.info("RouterClient.addResponder","CHANNEL",e),o.default.args(e,"string",t,"function"),this.mapQueryResponders[e]){const n=`RouterClient.addResponder: Responder already locally defined for channel ${e}`;a.LoggerClient.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,i){var r,s,c,f;const h=`${this.clientName}.${(0,d.v4)()}.${e}`,p=u.Performance.timing.navigationStart+u.Performance.now(),g=u.Performance.timing.navigationStart,m=u.Performance.now();a.LoggerClient.system.info("RouterClient.query","RESPONDER CHANNEL",e,"QUERY EVENT",t,"PARAMS",n,"QUERY ID",h,{timestamp:p,navstart:g,timenow:m});const w=null!=i?i:"function"==typeof n?n:null,y=null!==(s=null===(r=n)||void 0===r?void 0:r.timeout)&&void 0!==s?s:2e4,v=null===(f=null===(c=n)||void 0===c?void 0:c.logWhenNoResponder)||void 0===f||f;return o.default.args(e,"string",t,"any=",n,"object=",w,"function"),new Promise((n=>{this.mapQueryResponses[h]=(e,t)=>{null==w||w(e,t),n({err:e,response:t})},!l.Globals.runningInFSBLUnitTest&&y>0&&(this.mapQueryResponseTimeOut[h]=setTimeout((()=>{a.LoggerClient.system.warn(`RouterClient: timeout after ${y} ms waiting on query response on channel ${e} for queryID ${h}`),delete this.mapQueryResponseTimeOut[h]}),y));const i={header:{origin:this.clientName,type:"query",queryID:h,channel:e,logWhenNoResponder:v},data:t};this.sendToRouterService(i)}))}removeResponder(e){if(a.LoggerClient.system.info("RouterClient.removeResponder","RESPONDER CHANNEL",e),o.default.args(e,"string"),this.mapQueryResponders[e]){delete this.mapQueryResponders[e];const t={header:{origin:this.clientName,type:"removeResponder",channel:e}};this.sendToRouterService(t)}}addPubSubResponder(e,t,n,i){let r,s;if(a.LoggerClient.system.info("RouterClient.addPubSubResponder","TOPIC",e,"INITIAL STATE",t,"PARAMS",n),o.default.args(e,"any",t,"object=",n,"object="),n=n||{},o.default.args2("params.subscribeCallback",n.subscribeCallback,"function=","params.publishCallback",n.publishCallback,"function=")&&o.default.args2("params.unsubscribeCallback",n.unsubscribeCallback,"function="),void 0===n.subscribeCallback&&void 0===n.publishCallback&&void 0===n.unsubscribeCallback){t=t||{};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()]=f(t);const n={header:{origin:this.clientName,type:"addPubSubResponder",topic:e.toString(),handleOnServer:!1},data:t};this.sendToRouterService(n),s="success"}else r=`RouterClient.addPubSubResponder: Responder already locally defined for topic ${e}`,a.LoggerClient.system.error(r);i&&i(r,s)}removePubSubResponder(e){a.LoggerClient.system.info("RouterClient.removePubSubResponder","TOPIC",e),o.default.args(e,"any");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 a.LoggerClient.system.warn(`RouterClient.removePubSubResponder failed: Could not find responder for topic ${e}`)}subscribe(e,t){a.LoggerClient.system.info("RouterClient.subscribe","TOPIC",e),o.default.args(e,"string",t,"function");const n=`${this.clientName}.${(0,d.v4)()}`;this.mapSubscribersID[n]=t,this.mapSubscribersTopic[n]=e;const i={header:{origin:this.clientName,type:"subscribe",subscribeID:n,topic:e}};return this.sendToRouterService(i),{subscribeID:n,topic:e}}publish(e,t){a.LoggerClient.system.info("RouterClient.publish","TOPIC",e,"EVENT",t),o.default.args(e,"string",t,"any");const n={header:{origin:this.clientName,type:"publish",topic:e},data:t};this.sendToRouterService(n)}unsubscribe(e){a.LoggerClient.system.info("RouterClient.unsubscribe","SUBSCRIBE ID",e),o.default.args(e,"object")&&o.default.args2("subscribeIDStruct.subscribeID",e.subscribeID,"string");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 a.LoggerClient.system.warn(`RouterClient.unsubscribe: Could not find subscribeID for topic ${e.topic}`)}trustedMessage(e){let t=!1;return a.LoggerClient.system.debug("RouterClient.trustedMessage header",e.header),"SharedWorker"===e.header.originIncomingTransportInfo.transportID&&(t=!0),t}disconnectAll(){a.LoggerClient.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.removeResponder(e)})),Object.keys(this.mapSubscribersID).forEach((e=>{const t=this.mapSubscribersTopic[e];this.unsubscribe({topic:t,subscribeID:e})}))}}t.RouterConnection=h,t.RouterController={start:e=>{const t=(0,c.singleton)("RouterClient",h);return a.LoggerClient.setRouterClient(t),t.start(e)},stop:()=>{(0,c.singleton)("RouterClient",h).stop()},calibrateTimeWithRouterService(e){(0,c.singleton)("RouterClient",h).calibrateTimeWithRouterService(e)}},t.RouterClient={onReady:e=>(0,c.singleton)("RouterClient",h).onReady(e),addListener:(e,t)=>(0,c.singleton)("RouterClient",h).addListener(e,t),transmit:(e,t,n)=>{(0,c.singleton)("RouterClient",h).transmit(e,t,n)},removeListener:(e,t)=>{(0,c.singleton)("RouterClient",h).removeListener(e,t)},addResponder:(e,t)=>{(0,c.singleton)("RouterClient",h).addResponder(e,t)},query:(e,t,n,i)=>(0,c.singleton)("RouterClient",h).query(e,t,n,i),removeResponder:e=>{(0,c.singleton)("RouterClient",h).removeResponder(e)},addPubSubResponder:(e,t,n,i)=>{(0,c.singleton)("RouterClient",h).addPubSubResponder(e,t,n,i)},removePubSubResponder:e=>{(0,c.singleton)("RouterClient",h).removePubSubResponder(e)},subscribe:(e,t)=>(0,c.singleton)("RouterClient",h).subscribe(e,t),publish:(e,t)=>{(0,c.singleton)("RouterClient",h).publish(e,t)},unsubscribe:e=>{(0,c.singleton)("RouterClient",h).unsubscribe(e)},trustedMessage:e=>(0,c.singleton)("RouterClient",h).trustedMessage(e),disconnectAll:()=>{(0,c.singleton)("RouterClient",h).disconnectAll()},calibrateTimeWithRouterService(e){(0,c.singleton)("RouterClient",h).calibrateTimeWithRouterService(e)}},t.default=t.RouterClient},95085:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.StorageClient=void 0;const r=i(n(83027)),o=i(n(20670)),s=i(n(2518)),a=n(25232),l=n(252),u=(0,r.default)(1);class d extends a._BaseClient{constructor(){super({onReady:e=>{null==e||e(),this.clientReady=!0},name:"storageClient"}),this.clientReady=!1}log(e,...t){(e?s.default.system.error:s.default.system.info)(...t,e)}async setUser(e,t){this.clientReady||s.default.system.error("storageClient invoked before ready"),o.default.args(e.user,"string",t,"function=");const{err:n,response:i}=await this.routerClient.query("Storage.setUser",{user:e.user});return this.log(n,"APPLICATION LIFECYCLE:StorageClient.setUser",e,n,i.data),null==t||t(n),{err:n}}async setStore(e,t){s.default.deprecated("StorageClient.setStore() has been deprecated and will be removed in a future release"),this.clientReady||s.default.system.error("storageClient.setStore() invoked before ready"),o.default.args(e.topic,"string",e.dataStore,"string=",t,"function="),s.default.system.log("APPLICATION LIFECYCLE:StorageClient.setStore",e,t);const{err:n,response:i}=await this.routerClient.query("Storage.setStore",e);return this.log(n,"Storage.setStore",i),null==t||t(n,i.data),{err:n,data:i.data}}async save(e,t){if(this.clientReady||s.default.system.error("storageClient.save() invoked before ready"),"string"!=typeof e.key||"string"!=typeof e.topic)throw new Error("Values for key and topic must be strings.");o.default.args(e.topic,"string",e.key,"string",e.value,"any",t,"function=");const{err:n,response:i}=await this.routerClient.query("Storage.save",e);if(this.log(n,"Storage.save",i.data),null==t||t(n,i.data),n)throw n;return{err:n,data:i.data}}save1(e){return u((()=>this.save(e)))}async get(e,t){const{err:n,data:i}=await this.getStandardized(e);if(null==t||t(n,i),n)throw n;return i}async getStandardized(e,t){if(this.clientReady||s.default.system.error("storageClient invoked before ready"),"string"!=typeof e.key||"string"!=typeof e.topic)throw new Error("Values for key and topic must be strings.");o.default.args(e.topic,"string",e.key,"string",t,"function=");const{err:n,response:i}=await this.routerClient.query("Storage.get",e);return this.log(n,"Storage.get",i.data),null==t||t(n,i.data),{err:n,data:i.data}}get1(e,t){return u((()=>this.get(e,t)))}async keys(e,t){this.clientReady||s.default.system.error("storageClient invoked before ready"),o.default.args(e.topic,"string",t,"function="),s.default.system.debug("StorageClient.keys",e,t);const{err:n,response:i}=await this.routerClient.query("Storage.keys",e);return this.log(n,"Storage.keys",i.data),null==t||t(n,i.data),{err:n,data:i.data}}keys1(e){return s.default.deprecated("StorageClient.keys1 is deprecated and will be removed in a future release"),u((()=>(0,l.promisify)(this.keys.bind(this))(e)))}async getMultiple(e,t){s.default.deprecated("StorageClient.getMultiple() is deprecated and will be removed in a future release"),this.clientReady||s.default.system.error("storageClient invoked before ready"),s.default.system.info("StorageClient.getMultiple",e,t);const{err:n,response:i}=await this.routerClient.query("Storage.getMultiple",e);return this.log(n,"StorageClient.getMultiple:",e,i),null==t||t(n,i),{err:n,data:i.data}}async remove(e,t){this.clientReady||s.default.system.error("storageClient invoked before ready"),o.default.args(e.topic,"string",e.key,"string",t,"function=");const{err:n,response:i}=await this.routerClient.query("Storage.delete",e);if(this.log(n,"StorageClient.delete",i.data),null==t||t(n,i.data),n)throw n;return{err:n,data:i.data}}remove1(e){return u((()=>this.remove(e)))}delete(...e){s.default.deprecated("StorageClient.delete() is deprecated and will be removed in a future release"),this.remove.apply(e)}async clearCache(e){s.default.system.log("StorageClient.clearCache",e);const{err:t,response:n}=await this.routerClient.query("Storage.clearCache",null);return this.log(t,"StorageClient.clearCache",n.data),null==e||e(t,n.data),{err:t,data:n.data}}}t.StorageClient=d;var c=new d;t.default=c},97525:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.WindowClient=void 0;const r=n(1641),o=i(n(90693)),s=i(n(49136)),a=n(91374),l=n(25232),u=i(n(2518)),d=i(n(20670)),c=i(n(11314)),f=i(n(9381)),h=n(252),p=n(44137),g=n(49136),m=n(94017),w=n(24137);let y=!1,v=!1;const b=async e=>{y&&(v=!0);const{name:t}=p.FEAGlobals.finsembleWindow;c.default.transmit("DockingService.deregisterWindow",{name:t,userInitiated:e})};class S extends l._BaseClient{constructor(){super({startupDependencies:{},onReady:e=>{this.start(e)},name:"windowClient"}),this.options={},this.title=null,this.windowGroups=[],this.enableWindowsAeroSnap=!1,this.bindFunctions()}bindFunctions(){this.onWindowRestored=this.onWindowRestored.bind(this),this.onWindowMaximized=this.onWindowMaximized.bind(this),this.onWindowBlurred=this.onWindowBlurred.bind(this),this.onWindowFocused=this.onWindowFocused.bind(this),this.onMinimizedRestored=this.onMinimizedRestored.bind(this),this.onWindowMinimized=this.onWindowMinimized.bind(this),this.close=this.close.bind(this),this.getInitialOptions=this.getInitialOptions.bind(this)}onWindowRestored(){this.updateHeaderState("Maximize",{hide:!1})}onWindowMaximized(){this.updateHeaderState("Maximize",{hide:!0})}onWindowBlurred(){(0,w.deprecatedSetActive)(!1)}onWindowFocused(){(0,w.deprecatedSetActive)(!0)}onMinimizedRestored(){this.routerClient.transmit("DockingService.windowRestored",p.FEAGlobals.finsembleWindow.name),p.FEAGlobals.finsembleWindow.removeEventListener("restored",this.onMinimizedRestored)}onWindowMinimized(){this.routerClient.query("DockingService.windowMinimized",{windowName:p.FEAGlobals.finsembleWindow.name}),p.FEAGlobals.finsembleWindow.addEventListener("restored",this.onMinimizedRestored)}getWindowGroups(){return this.windowGroups}groupUpdateHandler(e,t){e?u.default.error(e):t.data&&t.data.groupData&&(this.windowGroups=Object.values(t.data.groupData).filter((e=>e.windowNames.includes((0,w.deprecatedGetWindowNameForDocking)(p.FEAGlobals.finsembleWindow)))))}close(e,t){e||(e={removeFromWorkspace:!0,closeWindow:!0});const{parentWindow:n}=p.FEAGlobals.finsembleWindow;return e.userInitiated&&n?n.close(e,t):p.FEAGlobals.finsembleWindow.close(e,t)}getWindowTitle(){return this.title}async retrieveMonitorDimensions(e){u.default.deprecated("WindowClient.retrieveMonitorDimensions() is deprecated and will be removed in a future release.");const t=await(0,m.getMonitor)();p.FEAGlobals.finsembleWindow.updateOptions({options:{monitorDimensions:t.monitorRect}}),null==e||e(t.monitorRect)}listenForHashChanges(){var e;if(a.System.isTitlebarWindow())return;const t=null!==(e=window.top)&&void 0!==e?e:window,n=t.location.href;p.FEAGlobals.finsembleWindow.updateOptions({url:n}),function(e){const{pushState:n}=e;e.pushState=function(i){"function"==typeof e.onpushstate&&e.onpushstate({state:i}),n.apply(e,arguments);const r=t.location.href;p.FEAGlobals.finsembleWindow.updateOptions({url:r})};const{replaceState:i}=e;e.replaceState=function(n){"function"==typeof e.onreplacestate&&e.onreplacestate({state:n}),i.apply(e,arguments);const r=t.location.href;p.FEAGlobals.finsembleWindow.updateOptions({url:r})}}(window.history),window.addEventListener("hashchange",(()=>{const e=t.location.href;p.FEAGlobals.finsembleWindow.updateOptions({url:e})}))}async getInitialOptions(e){if(this.isInAService)this.options={},u.default.system.debug("WindowClient:getting options empty",this.options),null==e||e();else{const{data:t}=await p.FEAGlobals.finsembleWindow.getOptions(),n=null!=t?t:{};p.FEAGlobals.finsembleWindow.windowOptions=this.options=n,u.default.system.debug("WindowClient:getting options",this.options),null==e||e()}}async cacheInitialBounds(){var e;if(a.System.isTitlebarWindow())return;const t=null!==(e=window.top)&&void 0!==e?e:window;await this.cacheBounds();try{p.FEAGlobals.finsembleWindow.windowOptions.customData.foreign.components["Window Manager"].persistWindowState&&p.FEAGlobals.finsembleWindow.updateOptions({options:{url:t.location.toString()}})}catch(e){u.default.system.warn('customData.foreign.components["Window Manager" is undefined')}}getWindowBounds(){return u.default.deprecated("WindowClient.getWindowBounds() is deprecated and will be removed in a future version."),{top:p.FEAGlobals.finsembleWindow.windowOptions.defaultTop,left:p.FEAGlobals.finsembleWindow.windowOptions.defaultLeft,width:p.FEAGlobals.finsembleWindow.windowOptions.defaultWidth,height:p.FEAGlobals.finsembleWindow.windowOptions.defaultHeight}}saveWindowBounds(e,t){if(u.default.system.debug("WINDOW LIFECYCLE:SavingBounds:",e,"setActiveWorkspaceDirty",t),void 0===t&&(t=!1),d.default.args(e,"object")&&d.default.args2("bounds.top",e.top,"number"),e){p.FEAGlobals.finsembleWindow.updateOptions({options:{top:Math.round(e.top),defaultTop:Math.round(e.top),left:Math.round(e.left),defaultLeft:Math.round(e.left),width:Math.round(e.width),defaultWidth:Math.round(e.width),height:Math.round(e.height),defaultHeight:Math.round(e.height)}});try{p.FEAGlobals.finsembleWindow.windowOptions.customData.foreign.components["Window Manager"].persistWindowState}catch(e){}}}maximize(e){return p.FEAGlobals.finsembleWindow.maximize(null,e)}minimize(e){return p.FEAGlobals.finsembleWindow.minimize(null,e)}bringToFront(e){return p.FEAGlobals.finsembleWindow.bringToFront({forceFocus:!0},e)}bringWindowToFront(e){p.FEAGlobals.finsembleWindow.bringToFront({forceFocus:!0},e)}setAlwaysOnTop(e,t){return p.FEAGlobals.finsembleWindow.setAlwaysOnTop({alwaysOnTop:e},t)}restore(e){return p.FEAGlobals.finsembleWindow.restore(null,e)}setTaskbarIconOverlay(e){p.FEAGlobals.fin.desktop.Window.setTaskbarIconOverlay({iconURL:e})}async cacheBounds(){const{err:e,data:t}=await p.FEAGlobals.finsembleWindow.getBounds();!e&&t?await p.FEAGlobals.finsembleWindow.updateOptions({options:{defaultLeft:t.left,defaultTop:t.top,defaultWidth:t.width,defaultHeight:t.height}}):console.warn("Get bounds error.",e,"Window may not be registered with the window service")}injectDOM(e){if(u.default.system.debug("injectDOM",e),u.default.system.deprecated("WindowClient.injectDOM() has been deprecated and will be removed in a future release"),document.getElementById("FSBLHeader"))return;window.scrollTo(0,0);const t=document.createElement("div"),n=e?` style=height:${e}`:"";t.innerHTML=`<div id="FSBLHeader"${n}></div>`,t.firstChild&&document.body.insertBefore(t.firstChild,document.body.firstChild)}getComponentState(e,t){return new Promise((n=>{e||(e={}),e.fields&&!Array.isArray(e.fields)&&(e.fields=[e.fields]),d.default.args(e,"object",t,"function"),p.FEAGlobals.finsembleWindow.getComponentState(e,((e,i)=>{null==t||t(e,i),n({err:e,data:i})}))}))}async setComponentState(e,t){return d.default.args(e,"object",t,"function=")&&d.default.args2("params.field",e.field,"string"),new Promise((n=>{p.FEAGlobals.finsembleWindow.setComponentState(e,(e=>{null==t||t(e),n({err:e})}))}))}async removeComponentState(e,t){return d.default.args(e,"object",t,"function=")&&d.default.args2("params.field",e.field,"string"),new Promise((n=>{p.FEAGlobals.finsembleWindow.removeComponentState(e,(e=>{null==t||t(e),n({err:e})}))}))}getWindowNameForDocking(){return u.default.deprecated("WindowClient.getWindowNameForDocking is deprecated and will be removed"),(0,w.deprecatedGetWindowNameForDocking)(p.FEAGlobals.finsembleWindow)}formGroup(){p.FEAGlobals.finsembleWindow.formGroup()}preventUnintendedDropEvents(){const e=e=>{e.preventDefault()};window.addEventListener("dragover",e,!1),window.addEventListener("drop",e,!1)}rejectWindowsKeyResizes(){let e=!1;const t=async t=>{this.enableWindowsAeroSnap?"Meta"===t.key&&c.default.transmit("Finsemble.WindowService.WindowsKey","up"):"Meta"===t.key&&e&&(e=!1,a.System.Window.getCurrent().updateOptions({resizable:!0}))},n=t=>{this.enableWindowsAeroSnap?"Meta"===t.key&&c.default.transmit("Finsemble.WindowService.WindowsKey","down"):"Meta"===t.key&&(e=!0,a.System.Window.getCurrent().updateOptions({resizable:!1}))};o.default.onReady((()=>{window.addEventListener("keyup",t),window.addEventListener("keydown",n)}))}modifyReload(){document.addEventListener("keydown",(e=>{e.ctrlKey&&"r"===e.key.toLowerCase()&&(e.preventDefault(),e.stopPropagation(),p.FEAGlobals.finsembleWindow.reload())}))}addListeners(){p.FEAGlobals.finsembleWindow.addListener("setParent",(()=>{u.default.system.info("WindowClient.setParent deregisterWithDockingManager"),b()})),p.FEAGlobals.finsembleWindow.addEventListener("maximized",this.onWindowMaximized),p.FEAGlobals.finsembleWindow.addEventListener("minimized",this.onWindowMinimized),p.FEAGlobals.finsembleWindow.addEventListener("restored",this.onWindowRestored),p.FEAGlobals.finsembleWindow.addEventListener("blurred",this.onWindowBlurred),p.FEAGlobals.finsembleWindow.addEventListener("focused",this.onWindowFocused)}updateHeaderState(e,t){var n;null===(n=this.commandChannel)||void 0===n||n.call(this,e,t)}headerCommandChannel(e){this.commandChannel=e}ejectFromGroup(){u.default.deprecated("WindowClient.ejectFromGroup is deprecated and will be removed"),p.FEAGlobals.finsembleWindow.ejectFromGroup()}setWindowTitle(e){u.default.system.deprecated("This method is deprecated and will be removed in a future release. Please simply set the application's `document.title` element to change the title. Or, set `components['Window Manager'].title` in the app's manifest."),this.setWindowTitlePrivate(e)}setWindowTitlePrivate(e){d.default.args(e,"string"),this.title=e,this.updateHeaderState("Main",{windowTitle:e}),p.FEAGlobals.finsembleWindow.setTitle(e)}getSpawnData(){var e,t,n;return null!==(n=null===(t=null===(e=this.options)||void 0===e?void 0:e.customData)||void 0===t?void 0:t.spawnData)&&void 0!==n?n:{}}getCurrentWindow(){return a.System.Window.getCurrent()}async getDesktopBoundingBox(e){return u.default.deprecated("WindowClient.getDesktopBoundingBox() is deprecated and will be removed in a future release."),(0,g.getDesktopBoundingBox)(e)}isPointInBox(e,t){return u.default.deprecated("WindowClient.isPointInBox() is deprecated and will be removed in a future release."),(0,g.isPointInBox)(e,t)}isMouseOverDOMElement(e,t){return(0,g.isMouseOverDOMElement)(e,t)}getWindowIdentifier(){var e,t,n,i;return{windowName:p.FEAGlobals.finsembleWindow?p.FEAGlobals.finsembleWindow.name:window.name,uuid:p.FEAGlobals.finsembleWindow?p.FEAGlobals.finsembleWindow.uuid:void 0,componentType:null!==(i=null===(n=null===(t=null===(e=this.options)||void 0===e?void 0:e.customData)||void 0===t?void 0:t.component)||void 0===n?void 0:n.type)&&void 0!==i?i:null}}setActive(e){u.default.deprecated("WindowClient.setActive is deprecated and will be removed"),(0,w.deprecatedSetActive)(e)}getBounds(e){return p.FEAGlobals.finsembleWindow.getBounds(e)}setShape(e,t=Function.prototype){p.FEAGlobals.finsembleWindow.setShape(e,t)}startTilingOrTabbing(e,t){u.default.deprecated("WindowClient.startTilingOrTabbing is deprecated and will be removed"),c.default.transmit("DockingService.startTilingOrTabbing",e),null==t||t()}startMovingWindow(e){a.System.Window.getCurrent().startMovingWindow(e)}stopMovingWindow(){a.System.Window.getCurrent().stopMovingWindow()}cancelTilingOrTabbing(e,t){u.default.deprecated("WindowClient.cancelTilingOrTabbing is deprecated and will be removed"),console.debug("CancelTilingOrTabbing"),c.default.transmit("DockingService.cancelTilingOrTabbing",e),null==t||t()}sendIdentifierForTilingOrTabbing(e,t){u.default.deprecated("WindowClient.sendIdentifierForTilingOrTabbing is deprecated and will be removed"),c.default.transmit("DockingService.identifierForTilingOrTabbing",e),null==t||t()}stopTilingOrTabbing(e,t){u.default.deprecated("WindowClient.stopTilingOrTabbing is deprecated and will be removed");const n=()=>{c.default.query("DockingService.stopTilingOrTabbing",e,(()=>{null==t||t()})),c.default.transmit("DockingService.stopTilingOrTabbing",e)};e.mousePosition?(n(),e.allowDropOnSelf||null==t||t()):a.System.getMousePosition(((i,r)=>{e.mousePosition=r,n(),e.allowDropOnSelf||null==t||t()}))}getStackedWindow(e,t){if(u.default.deprecated("WindowClient.getStackedWindow is deprecated and will be removed"),u.default.system.debug("WindowClient.getStackedWindow",e),t=t||e,(e=e||{}).windowIdentifiers=e.windowIdentifiers||[],!p.FEAGlobals.finsembleWindow.parentWindow&&e.create){const n=e=>{const{parentName:i}=e.data;p.FEAGlobals.finsembleWindow.setParent({windowName:i},((e,n)=>{null==t||t(e,n)})),p.FEAGlobals.finsembleWindow.removeListener("parent-set",n)};p.FEAGlobals.finsembleWindow.addListener("parent-set",n),s.default.spawn("StackedWindow",{windowType:"StackedWindow",data:{windowIdentifiers:e.windowIdentifiers},options:{newStack:!0}},((e,n)=>{u.default.system.debug("WindowClient.getStackedWindow-success",e,n),e&&(null==t||t(e,null))}))}else p.FEAGlobals.finsembleWindow.getParent(t)}async getMonitorInfo(e={},t){return u.default.deprecated("WindowClient.getMonitorInfo() is deprecated and will be removed. Please use LauncherClient.getMonitorInfo()"),(0,m.getWhichMonitorClientSide)(this.routerClient,e,t)}showAtMousePosition(){this.routerClient.transmit("DockingService.showAtMousePosition",this.getWindowIdentifier())}async fitToDOM(e,t){var n,i,r,o,s,a;"function"==typeof e&&(t=e,e=null);let l=document.documentElement.offsetHeight+(null!==(i=null===(n=null==e?void 0:e.padding)||void 0===n?void 0:n.height)&&void 0!==i?i:0),d=document.documentElement.offsetWidth+(null!==(o=null===(r=null==e?void 0:e.padding)||void 0===r?void 0:r.width)&&void 0!==o?o:0);l=Math.min(l,null!==(s=null==e?void 0:e.maxHeight)&&void 0!==s?s:l),d=Math.min(d,null!==(a=null==e?void 0:e.maxWidth)&&void 0!==a?a:d),u.default.system.debug("WindowClient.FitToDOM:newHeight:newWidth",l,d,e);const{data:c}=await(0,m.getWhichMonitorClientSide)(this.routerClient,{});c&&(l=Math.min(l,c.availableRect.height),d=Math.min(d,c.availableRect.width)),u.default.system.debug("WindowClient.FitToDOM:fixBounds",l,d);const{data:f}=await p.FEAGlobals.finsembleWindow.getBounds();!f||f.width==d&&f.height==l||await p.FEAGlobals.finsembleWindow.setBounds({bounds:Object.assign(Object.assign({},f),{width:d,height:l})}),null==t||t()}async start(e){if((0,h.iAmAServiceWindow)())return this.isInAService=!0,void(null==e||e());setInterval((()=>{(a.System.isBrowserView()||!a.System.isTitlebarWindow())&&(null===document||void 0===document?void 0:document.title)&&this.title!==document.title&&this.setWindowTitlePrivate(document.title)}),200),this.listenForHashChanges(),this.preventUnintendedDropEvents(),this.rejectWindowsKeyResizes(),this.modifyReload(),this.addListeners(),this.routerClient.subscribe("Finsemble.WorkspaceService.groupUpdate",((e,t)=>this.groupUpdateHandler(e,t))),await this.getInitialOptions(),(0,r.parallel)([e=>{f.default.getValue("finsemble",((t,n)=>{t&&u.default.system.error("Error reading windowService config from finsemble"),this.enableWindowsAeroSnap=n.services.windowService.config.enableWindowsAeroSnap,e()}))},async()=>{await(async e=>{var t,n,i,r,o,s,l,d,f,g,m,w,S,C,_,W,A,L,E,T,O,k,I,R,N,P,M,F,D,j,x,B,$,U,H,G,q,V,z,Y,K,Q,J,Z,X,ee,te,ne;if(!e)return void u.default.system.error(`No window options found for window ${window.name}`);const ie=e.customData;if(a.System.isBrowserView()||!(null==ie?void 0:ie.component)||(0,h.iAmAServiceWindow)())return;const re=null===(i=null===(n=null===(t=null==ie?void 0:ie.foreign)||void 0===t?void 0:t.components)||void 0===n?void 0:n["Window Manager"])||void 0===i?void 0:i.FSBLHeader,oe=null===(r=null==ie?void 0:ie.window)||void 0===r?void 0:r.dockable,se=null!==(g=null!==(f=null!==(d=null===(l=null===(s=null===(o=null==ie?void 0:ie.foreign)||void 0===o?void 0:o.services)||void 0===s?void 0:s.windowService)||void 0===l?void 0:l.manageWindowMovement)&&void 0!==d?d:re)&&void 0!==f?f:oe)&&void 0!==g&&g,ae=null!==(C=null===(S=null===(w=null===(m=null==ie?void 0:ie.foreign)||void 0===m?void 0:m.services)||void 0===w?void 0:w.windowService)||void 0===S?void 0:S.allowAutoArrange)&&void 0!==C?C:se,le=null!==(L=null===(A=null===(W=null===(_=null==ie?void 0:ie.foreign)||void 0===_?void 0:_.services)||void 0===W?void 0:W.windowService)||void 0===A?void 0:A.allowSnapping)&&void 0!==L?L:se,ue={allowAutoArrange:ae,snapping:!(null===(E=null==ie?void 0:ie.window)||void 0===E?void 0:E.ephemeral)&&le,tiling:null!==(I=null===(k=null===(O=null===(T=null==ie?void 0:ie.foreign)||void 0===T?void 0:T.services)||void 0===O?void 0:O.windowService)||void 0===k?void 0:k.allowTiling)&&void 0!==I?I:se,tabbing:null!==(M=null===(P=null===(N=null===(R=null==ie?void 0:ie.foreign)||void 0===R?void 0:R.services)||void 0===N?void 0:N.windowService)||void 0===P?void 0:P.allowTabbing)&&void 0!==M?M:se,canGroup:null!==(x=null===(j=null===(D=null===(F=null==ie?void 0:ie.foreign)||void 0===F?void 0:F.services)||void 0===D?void 0:D.windowService)||void 0===j?void 0:j.allowGrouping)&&void 0!==x?x:se,canMinimize:null!==(q=null!==(H=null===(U=null===($=null===(B=null==ie?void 0:ie.foreign)||void 0===B?void 0:B.services)||void 0===$?void 0:$.windowService)||void 0===U?void 0:U.allowMinimize)&&void 0!==H?H:null===(G=null==ie?void 0:ie.component)||void 0===G?void 0:G.canMinimize)&&void 0!==q?q:se,canMaximize:null!==(J=null!==(K=null===(Y=null===(z=null===(V=null==ie?void 0:ie.foreign)||void 0===V?void 0:V.services)||void 0===z?void 0:z.windowService)||void 0===Y?void 0:Y.allowMaximize)&&void 0!==K?K:null===(Q=null==ie?void 0:ie.component)||void 0===Q?void 0:Q.canMaximize)&&void 0!==J?J:se,overwriteStartDocked:null!==(te=null===(ee=null===(X=null===(Z=null==ie?void 0:ie.foreign)||void 0===Z?void 0:Z.services)||void 0===X?void 0:X.workspaceService)||void 0===ee?void 0:ee.global)&&void 0!==te&&te};(se||ae||"Toolbar"===(null===(ne=ie.component)||void 0===ne?void 0:ne.type))&&await(async e=>{if(p.FEAGlobals.finsembleWindow.parentWindow)return void u.default.system.debug("registerWithDockingManager ignore registration request if has a parent");const{uuid:t,name:n}=p.FEAGlobals.finsembleWindow;y=!0,await c.default.query("DockingService.registerWindow",{name:n,uuid:t,options:e,windowType:"WebWindow"}),y=!1,v&&(b(),v=!1),u.default.system.debug("WINDOW LIFECYCLE: Docking Registration complete.")})(Object.assign(Object.assign({},ie.window),ue))})(this.options),await this.cacheInitialBounds()}],e)}}t.WindowClient=S;const C=new S;t.default=C},2740:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return r(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceClient=void 0;const a=n(25232),l=o(n(23099)),u=s(n(20670)),d=s(n(2518)),c=n(26604),f=n(64324),h=s(n(9060));class p extends a._BaseClient{constructor(e){super(e),this.workspaces=[],this.setWorkspaces=this.setWorkspaceOrder,this.createNewWorkspace=this.createWorkspace,this.getWorkspaceDefinition=this.export,this.addWorkspaceDefinition=this.import,this.saveWorkspaceTemplateToConfigFile=this.exportToFile,u.default.args(e,"object=")&&e&&u.default.args2("params.onReady",e.onReady,"function="),this.publicEventManager=new h.default({name:"workspaceClient",sourceType:"workspace"})}_serviceResponseHandler(e,t,n,i,r=Function.prototype){if(e)return i(new Error(e)),r(e);t||(t={data:null}),n(t.data),r(null,t.data)}addEventListener(e,t){this.publicEventManager.addEventListener(e,t)}removeEventListener(e,t){this.publicEventManager.removeEventListener(e,t)}async addWindow(e,t=null){u.default.args(e,"object",t,"function=")&&e&&u.default.args2("params.name",e.name,"string");const{err:n,response:i}=await this.routerClient.query("WorkspaceService.addWindow",e,(()=>{}));if(d.default.system.log(`WORKSPACE LIFECYCLE: Window added:WorkspaceClient.addWindow: Name (${e.name})`),t&&t(n,i),!t&&n)throw n;return i}removeWindow(e,t=Function.prototype){u.default.args(e,"object",t,"function=")&&u.default.args2("params.name",e.name,"string"),this.routerClient.query("WorkspaceService.removeWindow",e,((n,i)=>{if(n)return d.default.system.error(n);d.default.system.log(`WORKSPACE LIFECYCLE:WorkspaceClient.removeWindow:Window removed: Name (${e.name})`),t(n,i?i.data:null)}))}async autoArrange(e,t){u.default.args(e,"object",t,"function="),e=e||{};const n=await l.getMyWindowIdentifier(),{err:i}=await this.routerClient.query("DockingService.autoArrange",{windowIdentifier:n});return t&&t(i),{err:i}}async minimizeAll(e,t){var n;u.default.args(e,"object",t,"function=");const i=await l.getMyWindowIdentifier();let r=null!=e?e:{monitor:"all"};r.windowIdentifier=null!==(n=r.windowIdentifier)&&void 0!==n?n:i;const{err:o}=await this.routerClient.query("WorkspaceService.minimizeAll",r);return t&&t(o),{err:o}}async bringWindowsToFront(e,t){var n;u.default.args(e,"object",t,"function=");const i=await l.getMyWindowIdentifier(),r=null!=e?e:{monitor:"all"};r.windowIdentifier=null!==(n=r.windowIdentifier)&&void 0!==n?n:i;const{err:o}=await this.routerClient.query("WorkspaceService.bringWindowsToFront",r);return t&&t(o),{err:o}}async getActiveWorkspace(e){var t;if(d.default.system.debug("WorkspaceClient.getActiveWorkspace"),this.activeWorkspace)return d.default.system.info("WorkspaceClient.getActiveWorkspace - returning from cache"),e&&e(null,{data:this.activeWorkspace}),{data:this.activeWorkspace};const{response:n}=await this.routerClient.query(c.WORKSPACE.API_CHANNELS.GET_ACTIVE_WORKSPACE,{});if(this.activeWorkspace=n.data,n.data.err)throw e&&e(n.data.err),new Error(n.data.err);return e&&e(null,{data:null!==(t=n.data)&&void 0!==t?t:{}}),{data:n.data}}getWorkspaces(e){return u.default.args(e,"function="),d.default.system.debug("WorkspaceClient.getWorkspaces"),new Promise((async(t,n)=>{this.routerClient.query(c.WORKSPACE.API_CHANNELS.GET_WORKSPACES,{},((i,r)=>{this._serviceResponseHandler(i,r,t,n,e)}))}))}getWorkspaceActions(e){return e(null,c.WORKSPACE.API_CHANNELS)}getWorkspaceNames(e){return u.default.args(e,"function="),d.default.system.debug("WorkspaceClient.getWorkspaceNames"),this.workspaces?(d.default.system.info("WorkspaceClient.getWorkspaceNames - returning from cache"),e&&e(null,this.workspaces),Promise.resolve(this.workspaces)):new Promise((async(t,n)=>{this.routerClient.query(c.WORKSPACE.API_CHANNELS.GET_WORKSPACE_NAMES,{},((i,r)=>{this._serviceResponseHandler(i,r,t,n,e)}))}))}setWorkspaceOrder(e,t){const{workspaces:n}=e;return u.default.args(t,"function"),d.default.system.debug("WorkspaceClient.setWorkspaceOrder",e),new Promise(((i,r)=>{this.routerClient.query(c.WORKSPACE.API_CHANNELS.SET_WORKSPACE_ORDER,n||e,((e,n)=>{this._serviceResponseHandler(e,n,i,r,t)}))}))}remove(e,t=Function.prototype){return u.default.args(e,"object",t,"function=")&&!e.name&&!e.workspace&&u.default.args2("params.name",e.name,"string"),d.default.system.debug("WorkspaceClient.remove",e),new Promise((async(n,i)=>{var r;e.name||(e.name=null===(r=e.workspace)||void 0===r?void 0:r.name,delete e.workspace);const o=(await this.getActiveWorkspace()).data;if(e.name===o.name){d.default.system.error(`APPLICATION LIFECYCLE: Cannot remove active workspace: WorkspaceClient.remove:attempt to remove active workspace name:${o.name}`);const e="Cannot remove active workspace";return this._serviceResponseHandler(e,null,n,i,t)}this.routerClient.query(c.WORKSPACE.API_CHANNELS.REMOVE,e,((e,r)=>{this._serviceResponseHandler(e,r,n,i,t)}))}))}rename(e,t=Function.prototype){return u.default.args(e,"object",t,"function=")&&u.default.args2("params.oldName",e.oldName,"string","params.newName",e.newName,"string"),d.default.system.debug("WorkspaceClient.rename",e),new Promise(((n,i)=>{if(!e.overwriteExisting&&this.workspaceExists(e.newName)){const e="Workspace Already Exists";return this._serviceResponseHandler(e,null,n,i,t)}this.routerClient.query(c.WORKSPACE.API_CHANNELS.RENAME,e,((e,r)=>{this._serviceResponseHandler(e,r,n,i,t)}))}))}save(e=Function.prototype){return d.default.system.debug("WorkspaceClient.save"),new Promise(((t,n)=>{this.routerClient.query(c.WORKSPACE.API_CHANNELS.SAVE,{},((i,r)=>{this._serviceResponseHandler(i,r,t,n,e)}))}))}workspaceExists(e){return u.default.args(e,"string"),this.workspaces.indexOf(e)>-1}saveAs(e,t=Function.prototype){return u.default.args(e,"object",t,"function=")&&u.default.args2("params.name",e.name,"string"),d.default.system.debug("WorkspaceClient.saveAs",e),new Promise(((n,i)=>{if(!e.force&&this.workspaceExists(e.name))return this._serviceResponseHandler("Workspace Already Exists",null,n,i,t);this.routerClient.query(c.WORKSPACE.API_CHANNELS.SAVE_AS,e,((e,r)=>{this._serviceResponseHandler(e,r,n,i,t)}))}))}async switchTo(e,t){u.default.args(e,"object",t,"function")&&u.default.args2("params.name",e.name,"string"),d.default.system.debug("WorkspaceClient.switchTo",e);const{err:n,response:i}=await this.routerClient.query(c.WORKSPACE.API_CHANNELS.SWITCH_TO,e);if(n)throw t&&t(n),new Error(n.toString());return t&&t(n,i.data),{data:i.data}}async _setWindowState(e){var t,n;if(!this.activeWorkspace)throw"Workspace is not yet ready";if(!this.activeWorkspace.windows.includes(e.windowName))throw"Cannot set state for Window not in workspace";d.default.system.debug("WorkspaceClient.setWindowData",e);const{response:i}=await this.routerClient.query(c.WORKSPACE.API_CHANNELS.SET_WINDOW_STATE,e);return Object.assign(Object.assign({},i),{data:null!==(t=i.data)&&void 0!==t?t:{},header:null!==(n=i.header)&&void 0!==n?n:{}})}async _getWindowState(e){var t,n;d.default.system.debug("WorkspaceClient.getWindowData",e);const{response:i}=await this.routerClient.query(c.WORKSPACE.API_CHANNELS.GET_WINDOW_STATE,e);return Object.assign(Object.assign({},i),{data:null!==(t=i.data)&&void 0!==t?t:{},header:null!==(n=i.header)&&void 0!==n?n:{}})}async isWorkspaceDirty(e=Function.prototype){u.default.args(e,"function"),d.default.system.debug("WorkspaceClient.isWorkspaceDirty");const{err:t,response:n}=await this.routerClient.query(c.WORKSPACE.API_CHANNELS.GET_ACTIVE_WORKSPACE_DIRTY,{},(()=>{}));return e(t,n),n.data}async createWorkspace(e,t,n=((e,t)=>{e&&(d.default.system.error(`Error creating workspace: ${e}`),d.default.system.info(`Result from create workspace: ${t}`))})){d.default.system.log(`WorkspaceClient: Creating Workspace Request for name "${e}"`);const i=(await this.routerClient.query(c.WORKSPACE.API_CHANNELS.NEW_WORKSPACE,{workspaceName:e})).response.data;!1!==t.switchAfterCreation&&await this.switchTo({name:i});const r={workspaceName:i};return n(null,r),r}export(e,t){return u.default.args(e,"object",t,"function")&&u.default.args2("params.workspaceName",e.workspaceName,"string"),d.default.system.debug("WorkspaceClient.export",e),new Promise(((n,i)=>{this.routerClient.query(c.WORKSPACE.API_CHANNELS.EXPORT,e,((r,o)=>{const s={};s[e.workspaceName]=o.data,this._serviceResponseHandler(r,{data:s},n,i,t)}))}))}async import(e,t){u.default.args(e,"object",t,"function=")&&u.default.args2("params.workspaceJSONDefinition",e.workspaceJSONDefinition,"object"),d.default.system.debug("WorkspaceClient.import",e);const n=(await this.routerClient.query(c.WORKSPACE.API_CHANNELS.IMPORT,e)).response.data;if(n&&n.err)throw t(n.err),new Error(n.err);return t&&t(null,n),n}exportToFile(e){d.default.system.info("workspaceClient.saveWorkspaceTemplateToConfigFile",e),u.default.args(e,"object")&&u.default.args2("params.workspaceTemplateDefinition",e.workspaceTemplateDefinition,"object");const{workspaceTemplateDefinition:t}=e;if("object"==typeof t){const e=Object.keys(t)[0];if(e&&t[e].templateDefinitionFlag){const n={workspaceTemplates:t};f.ConfigUtilInstance.promptAndSaveJSONToLocalFile(`workspaceConfig-${e}`,n)}else d.default.system.error("workspaceClient.saveWorkspaceTemplateToConfigFile. Input is not a legal template")}else d.default.system.error("workspaceClient.saveWorkspaceTemplateToConfigFile: Input is not a legal object")}async start(e){this.routerClient.subscribe(c.WORKSPACE.UPDATE_PUBSUB,((t,n)=>{d.default.system.debug(`${c.WORKSPACE.UPDATE_PUBSUB} response`,t,n),t?d.default.system.error(t):(this.activeWorkspace=n.data.activeWorkspace,this.workspaces=n.data.workspaces,e&&e())}))}}t.WorkspaceClient=p;let g=new p({onReady:e=>{g.start(e)},name:"workspaceClient"});t.default=g},44137:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FreestandingGlobals=t.FEAGlobals=t.Globals=void 0,t.Globals="undefined"==typeof window?n.g:window,t.FEAGlobals="undefined"==typeof window?n.g:window,t.FreestandingGlobals="undefined"==typeof window?n.g:window},94017:function(e,t,n){"use strict";var i,r,o=this&&this.__classPrivateFieldGet||function(e,t,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(e):i?i.value:t.get(e)},s=this&&this.__classPrivateFieldSet||function(e,t,n,i,r){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?r.call(e,n):r?r.value=n:t.set(e,n),n},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getTaskbar=t.adjustBoundsToBeOnMonitorAsync=t.adjustBoundsToBeOnMonitor=t.getMonitorsInstance=t.getMonitor=t.getAllMonitors=t.getAllMonitorsClientSide=t.getWhichMonitor=t.getWhichMonitorClientSide=t.getMonitorFromWindow=t.getMonitorFromScaledXY=t.onMonitorsChanged=void 0;const l=n(17187),u=a(n(2518)),d=n(91374),c=n(7860),f=n(23099),h=n(23099),p=a(n(84795));class g extends l.EventEmitter{constructor(){super(),this.allMonitors=[],this.ready=!1}static async getInstance(){return o(g,i,"f",r)||(s(g,i,(0,c.singleton)("Monitors",g),"f",r),await o(g,i,"f",r).initialize()),o(g,i,"f",r)}async initialize(){await this.refreshMonitors(),d.System.addEventListener("monitor-info-changed",(()=>{this.refreshMonitors()}))}async refreshMonitors(){u.default.system.info("refreshing cached monitors");const e=await d.System.getMonitorInfo();this.allMonitors=[];let{primaryMonitor:t}=e;t.whichMonitor="primary",t.position=0,this.allMonitors.push(Object.assign({},t));for(let t=0;t<e.nonPrimaryMonitors.length;t++){let n=e.nonPrimaryMonitors[t];n.whichMonitor=t,n.position=t+1,this.allMonitors.push(n)}return this.emit("monitors-changed",{monitors:this.allMonitors}),this.ready=!0,this.allMonitors}}i=g,r={value:null},t.onMonitorsChanged=async e=>{(await g.getInstance()).on("monitors-changed",e)},t.getMonitorFromScaledXY=async(e,n)=>{const i=await g.getInstance();if(!i.ready)return await i.refreshMonitors(),await(0,t.getMonitorFromScaledXY)(e,n);let r=null;const o=i.allMonitors;for(let t of o){const{monitorRect:i}=t;if(e>=i.left&&e<i.right&&n>=i.top&&n<i.bottom){r=t;break}}return null!=r?r:o[0]},t.getMonitorFromWindow=async e=>{var n,i,r,o;const s=null!==(n=Number.isFinite(e.x)?e.x:e.defaultLeft)&&void 0!==n?n:0,a=null!==(i=Number.isFinite(e.y)?e.y:e.defaultTop)&&void 0!==i?i:0,l=s+(null!==(r=e.defaultWidth)&&void 0!==r?r:0),d=a+(null!==(o=e.defaultHeight)&&void 0!==o?o:0);let c=await(0,t.getMonitorFromScaledXY)(s,a);if(c)return(0,f.clone)(c);{u.default.system.debug("getMonitorFromWindow - top-left is off screen, trying bottom right");let e=await(0,t.getMonitorFromScaledXY)(l,d);if(e)return(0,f.clone)(e);{u.default.system.debug("getMonitorFromWindow - bottom-right is off screen, getting primary");const e=await(0,t.getAllMonitors)();return(0,f.clone)(e[0])}}},t.getWhichMonitorClientSide=async(e,t={},n)=>{var i;await p.default.waitForStartup("windowService");const r=await(0,h.getMyWindowIdentifier)();t.windowIdentifier=null!==(i=t.windowIdentifier)&&void 0!==i?i:r;const{err:o,response:s}=await e.query("Launcher.getMonitorInfo",t);return null==n||n(o,s.data),{err:o,data:s.data}},t.getWhichMonitor=e=>new Promise((n=>{let i,{commandMonitor:r,monitors:o,launchingMonitorPosition:s}=e;const a="number"==typeof r;if("mine"!==r){if("primary"===r)i=o.find((e=>"primary"===e.whichMonitor));else if("next"===r){let e=s+1;e>=o.length&&(e=0),i=o[e]}else if("previous"===r){let e=s-1;e<0&&(e=o.length-1),i=o[e]}else a?(r>=o.length&&(r=o.length-1),i=o.filter((e=>e.position===r))[0]):s&&(i=o[s]);i||(i=o[0]),n(i)}else{const r=e.activeWindows.getWindow(e.windowIdentifier.windowName);r?r._getBounds({},(async(e,r)=>{if(e)i=o[0],n(i);else{const e=await(0,t.getMonitorFromScaledXY)(r.left,r.top);n(e)}})):(i=o[0],n(i))}})),t.getAllMonitorsClientSide=async(e,t)=>{await p.default.waitForStartup("windowService");const{err:n,response:i}=await e.query("Launcher.getMonitorInfoAll",{});return null==t||t(n,i.data),{err:n,data:i.data}},t.getAllMonitors=async()=>{const e=await g.getInstance(),t=e.ready?e.allMonitors:await e.refreshMonitors();return JSON.parse(JSON.stringify(t))},t.getMonitor=async e=>{const n=await(0,f.getWindowDescriptor)(e);if(n)return await(0,t.getMonitorFromWindow)(n);throw"getMonitor: Can't locate windowDescriptor."},t.getMonitorsInstance=async()=>await g.getInstance(),t.adjustBoundsToBeOnMonitor=(e,t,n="availableRect")=>{if(!e)return t;if(((e,t)=>e.allMonitors.some((e=>{const{monitorRect:n}=e;return t.left>=n.left&&t.left<=n.right&&t.right>=n.left&&t.right<=n.right&&t.top>=n.top&&t.top<=n.bottom&&t.bottom>=n.top&&t.bottom<=n.bottom&&t.height<=n.height&&t.width<=n.width})))(e,t))return u.default.system.info("Launcher.adjustWindowDescriptorBoundsToBeOnMonitor: on monitor."),t;const i=e.allMonitors.map((e=>((e,t,n="availableRect")=>{const i=e[n]||e.availableRect||e.monitorRect,r=(0,f.clone)(t);return t.top<i.top?r.top=i.top:t.top>i.bottom-t.height&&(r.top=i.bottom-t.height),t.left<i.left?r.left=i.left:t.left>i.right-t.width&&(r.left=i.right-t.width),r.bottom=r.top+r.height,r.right=r.left+r.width,r.right>i.right&&(r.right=i.right),r.top<i.top&&(r.top=i.top),r.left<i.left&&(r.left=i.left),r.bottom>i.bottom&&(r.bottom=i.bottom),r.height=r.bottom-r.top,r.width=r.right-r.left,{newBounds:r,distanceMoved:Math.sqrt((t.left-r.left)**2)+(t.top-r.top)**2,monitor:e}})(e.rawMonitor?e.rawMonitor:e,t,n))),r=i.sort(((e,t)=>e.distanceMoved-t.distanceMoved))[0];return u.default.system.info("Launcher.adjustWindowDescriptorBoundsToBeOnMonitor: not on monitor. bounds",t,"monitor name",r.monitor.name,"newBounds",r.newBounds),r.newBounds},t.adjustBoundsToBeOnMonitorAsync=async(e,n="availableRect")=>{const i=await g.getInstance();return(0,t.adjustBoundsToBeOnMonitor)(i,e,n)},t.getTaskbar=e=>e.monitorRect.bottom!=e.availableRect.bottom?{top:e.availableRect.bottom,left:e.availableRect.left,right:e.availableRect.right,bottom:e.monitorRect.bottom,width:e.availableRect.width,height:e.monitorRect.bottom-e.availableRect.bottom,edge:"bottom"}:e.monitorRect.top!=e.availableRect.top?{top:e.monitorRect.top,left:e.availableRect.left,right:e.availableRect.right,bottom:e.availableRect.top,width:e.availableRect.width,height:e.monitorRect.top-e.availableRect.top,edge:"top"}:e.monitorRect.right!=e.availableRect.right?{top:e.monitorRect.top,left:e.availableRect.right,right:e.monitorRect.right,bottom:e.availableRect.bottom,width:e.monitorRect.width-e.availableRect.width,height:e.monitorRect.height,edge:"right"}:e.monitorRect.left!=e.availableRect.left?{top:e.monitorRect.top,left:e.monitorRect.left,right:e.availableRect.left,bottom:e.availableRect.bottom,width:e.monitorRect.width-e.availableRect.width,height:e.monitorRect.height,edge:"left"}:null},31219:(e,t,n)=>{"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.Performance=void 0;const r=n(44137),o={navigationStart:Date.now()};t.Performance={now:()=>{var e;return r.Globals.performance?null===(e=r.Globals.performance)||void 0===e?void 0:e.now():Date.now()},timing:(null===(i=r.Globals.performance)||void 0===i?void 0:i.timing)?r.Globals.performance.timing:o}},7860:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.singleton=void 0,t.singleton=(e,t)=>{const i=Symbol.for(`com.finsemble.singleton.${e}`);return Object.getOwnPropertySymbols(n.g).indexOf(i)>-1||(n.g[i]=new t),n.g[i]}},64324:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigUtilInstance=t.ConfigUtil=void 0;const r=i(n(2518)),o=n(91374),s=i(n(96486)),a=async()=>new Promise((e=>{o.System.getManifest((t=>{e({err:null,data:t})}))})),l=(e,t)=>{var n,i;return null!==(n=e.finsemble[t])&&void 0!==n?n:null===(i=e.finsemble)||void 0===i?void 0:i.custom[t]},u=(e,t)=>{let n=!1;const i=t.split(/[/\\:?=&\s]/);for(let o=0;o<i.length;o++)if("$"===i[o][0]){const s=i[o].substring(1),a=l(e,s);if(void 0===a)r.default.system.warn("ConfigUtil.resolveString",`Missing [${s}] variable from finsemble.custom configuration object`);else{const e=t.replace(i[o],a);r.default.system.verbose("forceObjectsToLogger","ConfigUtil.resolveManifestMacros:resolveString configString",i[o],s,a,"old value=",t,"value=",e),n=!0,t=e}}return{configString:t,replacedMacro:n}},d=(e,t,n)=>{let i=!1;if(n>1e3)return r.default.system.error("ConfigUtil resolveArray maxiumum recursion level reached"),{replacedMacro:i};r.default.system.verbose("forceObjectsToLogger","resolveArray","recursionLevel",n,"configArray:",t);for(let r=0;r<t.length;r++){const o=t[r];if("string"==typeof o&&o.indexOf("$")>-1){const n=u(e,o);t[r]=n.configString,i=i||n.replacedMacro}else o instanceof Array?d(e,o,n+1):"object"==typeof o&&c(e,o,n+1)}return{replacedMacro:i}},c=(e,t,n)=>{let i=!1;return n>1e3?(r.default.system.error("ConfigUtil resolveObject maxiumum recursion level reached"),{replacedMacro:i}):(t=t||{},r.default.system.verbose("forceObjectsToLogger","ConfigUtil.resolveManifestMacros:resolveObject","recursionLevel",n,"configObject:",t),Object.keys(t).forEach((r=>{const o=t[r];if("string"==typeof o&&o.indexOf("$")>-1){const n=u(e,o);t[r]=n.configString,i=i||n.replacedMacro}else o instanceof Array?d(e,o,n+1):"object"==typeof o&&c(e,o,n+1)})),{replacedMacro:i})};class f{resolveManifestMacros(e,t){let n;for(n=0;n<100;n++){const{replacedMacro:n}=c(e,t,1);if(!n)break}n>=100&&r.default.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(){r.default.system.debug("ConfigUtil.getExpandedRawManifest starting");const{err:e,data:t}=await a();return e||!t?r.default.system.error("ConfigUtil.getExpandedRawManifest:application.getManifest:err",e):(r.default.system.debug("forceObjectsToLogger","ConfigUtil.getExpandedRawManifest:getExpandedRawManifest: manifest retrieved. Pre-variable resolution",t),this.resolveManifestMacros(t,t.finsemble),r.default.system.debug("forceObjectsToLogger","ConfigUtil.getExpandedRawManifest:getExpandedRawManifest:Complete. post-variable resolution",t)),{err:e,data:t}}async fetchConfigFile(e){let t,n=null;r.default.system.debug(`fetching import ${e}`);try{const i=await fetch(e,{credentials:"include",cache:"no-cache"});200!=i.status?n=`HTTP get error for ${e}: ${i.status} ${i.statusText}`:t=await i.json()}catch(t){n=`Failure importing config from ${e} ${t.toString()}`}return{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),r.default.system.debug("forceObjectsToLogger","ConfigUtil.getInitialManifest:getCoreConfig:Initial Manifest after variables Resolved",e)}async getInitialManifest(){const{err:e,data:t}=await a();if(!e&&t){t.finsemble=t.finsemble||{},this.resolveManifestMacros(t,t.finsemble),t.finsemble.applicationRoot||r.default.system.error("FATAL ERROR: applicationRoot was not defined in manifest file.");const e=`${t.finsemble.moduleRoot}/configs/core/config.json`,{err:n,data:i}=await this.fetchConfigFile(e);!n&&i?this.graftImportOnToManifest(t,i):r.default.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){r.default.system.debug("saveJSONToLocalFile",e,t);const n=JSON.stringify(t,null,"\t"),i=`data:application/json;charset=utf-8,${encodeURIComponent(n)}`,o=`${e}.json`,s=document.createElement("a");s.setAttribute("href",i),s.setAttribute("download",o),s.click()}configFormatForExport(e,t){r.default.system.debug("configFormatForExport starting",e,t);let n=s.default.cloneDeep(t);if("raw"===e);else if("all"===e)delete n.importConfig,delete n.comment;else if("application"===e)delete n.importConfig,delete n.comment,delete n.system,delete n.services;else if("workspace"===e)n={workspace:n};else if("workspaceTemplate"===e){const e={};e[n.name]=n,n={workspaceTemplates:e}}else"services"===e?n=n.services:"components"===e&&(n=n.components);return n}getDefault(e,t,n){let i=n;if(e){try{const n=t.split(".");let r=e;for(let e=1;e<n.length;e++)r=r[n[e]];i=r}catch(e){i=n}void 0===i&&(i=n)}return i}}t.ConfigUtil=f,t.ConfigUtilInstance=new f},26604:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.MOVE_REASON=t.LAUNCHER_SERVICE=t.HEARTBEAT_TIMEOUT_CHANNEL=t.COMPONENT_STATE_STORAGE_TOPIC=t.WINDOW_SERVICE_REQUESTS=t.WORKSPACE=t.WINDOW=t.INTERRUPTIBLE_EVENTS=t.EVENT_INTERRUPT_CHANNEL=t.DOCKING=t.SERVICE_STOP_CHANNEL=t.SERVICE_START_CHANNEL=t.WINDOWSTATE=t.SERVICES_STATE_CHANNEL=t.CLIENT_SERVER_MAPPING=t.SERVICE_QUERY_READY_CHANNEL=t.SERVICE_CLOSED_CHANNEL=t.SERVICE_CLOSING_CHANNEL=t.SERVICE_READY_CHANNEL=t.SERVICE_INITIALIZING_CHANNEL=t.APPLICATION_STATE_CHANNEL=t.WRAPPERS=void 0,t.WRAPPERS={EVENTS:["title-changed","bringToFront","setBounds","alwaysOnTop","setOpacity"]},t.APPLICATION_STATE_CHANNEL="Finsemble.Application.State",t.SERVICE_INITIALIZING_CHANNEL="Finsemble.ServiceManager.serviceInitializing",t.SERVICE_READY_CHANNEL="Finsemble.ServiceManager.serviceReady",t.SERVICE_CLOSING_CHANNEL="Finsemble.ServiceManager.serviceClosing",t.SERVICE_CLOSED_CHANNEL="Finsemble.ServiceManager.serviceClosed",t.SERVICE_QUERY_READY_CHANNEL=e=>`Finsemble.ServiceManager.queryReady.${e}`,t.CLIENT_SERVER_MAPPING=e=>({authenticationClient:"authenticationService",configClient:"configService",distributedStoreClient:"dataStoreService",hotkeysClient:"hotkeysService",linkerClient:"linkerService",logger:"loggerService",searchClient:"searchService",storageClient:"storageService",windowClient:"windowService",workspaceClient:"workspaceService"}[e]),t.SERVICES_STATE_CHANNEL="Finsemble.State.Services",(n=t.WINDOWSTATE||(t.WINDOWSTATE={}))[n.NORMAL=0]="NORMAL",n[n.MINIMIZED_WAS_NORMAL=1]="MINIMIZED_WAS_NORMAL",n[n.MAXIMIZED=2]="MAXIMIZED",n[n.MINIMIZED_WAS_MAXIMIZED=3]="MINIMIZED_WAS_MAXIMIZED",n[n.TRANSITIONING=4]="TRANSITIONING",t.SERVICE_START_CHANNEL="Finsemble.Service.Start",t.SERVICE_STOP_CHANNEL="Finsemble.Service.Stop",t.DOCKING={GROUP_UPDATE:"DockingService.groupUpdate",WORKSPACE_GROUP_UPDATE:"Finsemble.WorkspaceService.groupUpdate",REQUEST_PUBLISH:"DockingService.requestGroupDataPublish"},t.EVENT_INTERRUPT_CHANNEL="Finsemble.Event.Interrupt",t.INTERRUPTIBLE_EVENTS=["close-requested","closed","close-complete","_container-close-handlers"],t.WINDOW={DELAYABLE_EVENTS:["close-requested","closed","close-complete","_container-close-handlers"],CANCELABLE_EVENTS:["close-requested"]},t.WORKSPACE={DELAYABLE_EVENTS:["load-requested","close-requested","save-requested"],CANCELABLE_EVENTS:["close-requested"],CLEAN_SHUTDOWN:"Finsemble.Workspace.cleanShutdown",UPDATE_PUBSUB:"Finsemble.WorkspaceService.update",STORAGE_TOPIC:"finsemble.workspace",CACHE_STORAGE_TOPIC:"finsemble.workspace.cache",ALL_WORKSPACES:"finsemble.allWorkspaces",ACTIVE_WORKSPACE:"activeWorkspace",LAST_USED_WORKSPACE_TOPIC:"finsemble",LAST_USED_WORKSPACE_NAME:"finsemble.lastUsedWorkspace.name",LAST_USED_WORKSPACE:"finsemble.lastUsedWorkspace",INITIAL_WORKSPACE_PREFERENCE:"finsemble.initialWorkspace",PUBLISH_REASONS:{INIT:"workspace:initialization",LOAD_DATA_RETRIEVED:"workspace:load:dataRetrieved",LOAD_FINISHED:"workspace:load:finished",WINDOW_REMOVED:"window:remove",WINDOW_ADDED:"window:add",LOAD_STARTED:"workspace:load:start",WORKSPACE_REMOVED:"Workspace:remove",WORKSPACE_RENAMED:"rename",SWITCHTO_TERMINATED:"workspace:switchTo:terminated",NEW_WORKSPACE:"new workspace",SAVE_AS:"APPLICATION LIFECYCLE:WORKSPACE LIFECYCLE:SaveAs:Workspace:Save As"},API_CHANNELS:{NEW_WORKSPACE:"Finsemble.Workspace.NewWorkspace",SAVE:"Finsemble.Workspace.Save",RENAME:"Finsemble.Workspace.Rename",SAVE_AS:"Finsemble.Workspace.SaveAs",SWITCH_TO:"Finsemble.Workspace.SwitchTo",IMPORT:"Finsemble.Workspace.Import",EXPORT:"Finsemble.Workspace.Export",REMOVE:"Finsemble.Workspace.Remove",SAVE_GLOBAL_DATA:"Finsemble.Workspace.SaveGlobalData",SAVE_VIEW_DATA:"Finsemble.Workspace.SaveViewData",GET_GLOBAL_DATA:"Finsemble.Workspace.GetGlobalData",GET_VIEW_DATA:"Finsemble.Workspace.GetViewData",GET_WORKSPACES:"Finsemble.Workspace.GetWorkspaces",GET_WORKSPACE_NAMES:"Finsemble.Workspace.GetWorkspaceNames",SET_WORKSPACE_ORDER:"Finsemble.Workspace.SetWorkspaceOrder",GET_ACTIVE_WORKSPACE:"Finsemble.Workspace.GetActiveWorkspace",GET_ACTIVE_WORKSPACE_DIRTY:"Finsemble.Workspace.GetActiveWorkspaceDirty",GET_TEMPLATES:"Finsemble.Workspace.GetTemplates",IMPORT_TEMPLATE:"Finsemble.Workspace.ImportTemplate",EXPORT_TEMPLATE:"Finsemble.Workspace.ExportTemplate",REMOVE_TEMPLATE:"Finsemble.Workspace.RemoveTemplate",SET_WINDOW_STATE:"Finsemble.Workspace.SetWindowData",GET_WINDOW_STATE:"Finsemble.Workspace.GetWindowData",ADD_WINDOW:"WorkspaceService.addWindow",REMOVE_WINDOW:"WorkspaceService.removeWindow"},DEFAULT_WINDOW_PROPS:["name","componentType","windowType","alwaysOnTop","autoShow","minWidth","minHeight","maxWidth","maxHeight","resizable","maximizable","minimizable","opacity","windowState","left","top","width","height","right","bottom","defaultLeft","defaultTop","defaultWidth","defaultHeight","defaultRight","defaultBottom","monitorInfo","icon","cachedBounds","showTaskbarIcon","isEvergreen","launchGroupComponentData"],ADDITIONAL_WINDOW_PROPS:{WebWindow:["url","fullscreen","frame","backgroundColor","transparent","waitForPageLoad","affinity","appUUID"],NativeWindow:["path","alias","arguments","argumentsAsQueryString","isWPF"],StackedWindow:["childWindowIdentifiers","visibleWindowIdentifier","bounds"]}},t.WINDOW_SERVICE_REQUESTS={REMOTE_FOCUS:"WindowService.remoteFocus",SET_ALWAYS_ON_TOP:"WindowService-Request-setAlwaysOnTop",IS_ALWAYS_ON_TOP:"WindowService-Request-isAlwaysOnTop"},t.COMPONENT_STATE_STORAGE_TOPIC="finsemble.componentStateStorage",t.HEARTBEAT_TIMEOUT_CHANNEL="Finsemble.WindowService.HeartbeatTimeout",t.LAUNCHER_SERVICE={WINDOW_CLOSED:"LauncherService.WindowClosed"},t.MOVE_REASON={AERO_KEY:"aero_key",SYSTEM_RESTORED:"system_restored"}},25495:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FSBLDependencyManagerSingleton=t.FSBLDependencyManager=void 0;const r=n(17187),o=i(n(11314)),s=n(26604),a=i(n(84795)),l=i(n(2518));class u extends r.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 d(){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 c{constructor(){this.servicesAreAllOnline={},this.clientsAreAllOnline={},this.onlineClients=[],this.dependencies={},this.startupTimers={},this.startupTimerFired=!1,this.bindCorrectContext()}waitFor(e,t,n){const i=d();e.clients||(e.clients=[]),e.clients.length&&(e.clients=e.clients.map((e=>e.charAt(0).toLowerCase()+e.slice(1))));const r=new u({dependencies:e,callback:t,whoAmI:n});return r.setStartupTimer(),r.on("timeout",(()=>{this.onDependencyTimeout(r)})),this.dependencies[i]=r,this.checkDependencies(),r}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(", ")}.`),l.default.system.warn(n),e.emit("err",n)}checkDependencies(){for(const e in this.dependencies){const t=this.dependencies[e],{dependencies:n,callback:i}=t;(!n.clients.length||this.clientsAreAllOnline[e]||(this.clientsAreAllOnline[e]=this.checkClients(n.clients),this.clientsAreAllOnline[e]))&&(delete this.dependencies[e],t.clearStartupTimer(),i&&i())}}getOfflineClients(){let e=[];for(const t in this.dependencies){const{dependencies:n}=this.dependencies[t];e=e.concat(n.clients.filter((e=>!this.onlineClients.includes(e))))}return e.filter(((t,n)=>e.indexOf(t)===n))}checkClients(e){return e.every((e=>this.onlineClients.includes(e)))}setClientOnline(e){this.onlineClients.includes(e)||(this.onlineClients.push(e),this.checkDependencies())}getOnlineClients(){return this.onlineClients}bindCorrectContext(){this.checkDependencies=this.checkDependencies.bind(this),this.checkClients=this.checkClients.bind(this),this.getOfflineClients=this.getOfflineClients.bind(this),this.onDependencyTimeout=this.onDependencyTimeout.bind(this),this.waitFor=this.waitFor.bind(this)}}class f{constructor(){this.offlineServices=[],this.dependencies={},this.checkDependencies=this.checkDependencies.bind(this)}waitFor(e,t){l.default.system.debug("DependencyManager:waitFor",e),e.services||(e.services=[]);const n=d();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];(l.default.system.debug("DependencyManager:checkDependency",t.services,this.offlineServices),!t.services.length||this.checkServices(t.services))&&(console.debug("checkDependencies callback"),delete this.dependencies[e],n&&n())}}checkServices(e){return e.every((e=>this.offlineServices.includes(e)))}setServiceOffline(e){l.default.system.debug("setServiceOffline",e),console.debug("setServiceOffline",e),this.offlineServices.push(e),this.checkDependencies()}}class h extends r.EventEmitter{constructor(){super(),this.startup=new c,this.shutdown=new f,this.RouterClient=o.default,this.AuthorizationCompleted=!1,this.bindCorrectContext(),this.onAuthorizationCompleted(this.startup.checkDependencies),o.default.onReady(this.listenForServices)}bindCorrectContext(){this.listenForServices=this.listenForServices.bind(this),this.onAuthorizationCompleted=this.onAuthorizationCompleted.bind(this)}setClientOnline(e){this.startup.setClientOnline(e)}onServiceStateChange(e){Object.keys(e).forEach((t=>{const{state:n}=e[t];"closed"===n&&this.shutdown.setServiceOffline(t)}))}listenForServices(){l.default.system.debug("DependencyManager:listenForServices before wait"),a.default.waitForBootStage("kernel","stageEntered",(()=>{l.default.system.debug("DependencyManager:listenForServices after wait"),this.RouterClient.subscribe(s.SERVICES_STATE_CHANNEL,((e,t)=>{l.default.system.debug("DependencyManager:listenForServices SERVICES_STATE_CHANNEL",t.data),this.onServiceStateChange(t.data)})),this.RouterClient.addListener(s.SERVICE_CLOSED_CHANNEL,((e,t)=>{l.default.system.debug("DependencyManager:listenForServices SERVICE_CLOSED_CHANNEL",t.data);const n={};n[t.data.name]={state:"closed"},this.onServiceStateChange(n)})),this.RouterClient.subscribe(s.APPLICATION_STATE_CHANNEL,((e,t)=>{"closing"===t.data.state&&this.shutdown.checkDependencies()}))}))}onAuthorizationCompleted(e){this.AuthorizationCompleted?e():this.addListener("AuthorizationCompleted",e)}}t.FSBLDependencyManager=h,t.FSBLDependencyManagerSingleton=new h,t.default=t.FSBLDependencyManagerSingleton},252:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.checkDeprecatedConfigs=t.isEqualIgnoringArrayOrder=t.sleep=t.checkIfBoundsAreEqual=t.isStackedWindow=t.wrapWithTimeout=t.timeoutPromise=t.getRandomWindowName=t.composeRL=t.promisify=t.identity=t.Timeout=t.fastClone=t.isServiceInWindow=t.iAmAServiceWindow=t.guuid=void 0;const r=n(21614),o=i(n(27361)),s=i(n(78718)),a=i(n(18446)),l=i(n(28368)),u=n(64324),d=i(n(2518)),c=n(44137);function f(e,t){return new Promise(((n,i)=>{const r=setTimeout((()=>{clearTimeout(r),i(t)}),e)}))}function h(e,t,n){return`${e}.${t}.${n}`}function p(e,t,n){const i=`${h(e.baseString,e.newPath,e.newValue)}`;d.default.system.deprecated(`${h(e.baseString,t,n)} has been deprecated in favor of ${i}`)}t.guuid=function(){return(0,r.v4)()},t.iAmAServiceWindow=function(){return!(!c.Globals.finsembleServices||!c.Globals.finsembleServices.length)},t.isServiceInWindow=function(e){return c.Globals.finsembleServices&&c.Globals.finsembleServices.find((t=>t.name===e))},t.fastClone=e=>{if(!e)return e;if(Array.isArray(e))return e.slice();try{return JSON.parse(JSON.stringify(e))}catch(e){return d.default.error("disentangledUtils: clone error",e),e}},t.Timeout=class{constructor(e,t){this.fired=!1,this.id=setTimeout((()=>{e(),this.fired=!0}),t),this.clear=this.clear.bind(this),this.didFire=this.didFire.bind(this)}clear(){this.fired||clearTimeout(this.id)}didFire(){return this.fired}},t.identity=function(e){return e},t.promisify=function(e,t){return function(){const n=Array.prototype.slice.call(arguments);return new Promise(((i,r)=>{n.push(((e,t)=>e?r(e):i(t))),e.apply(t,n)}))}},t.composeRL=(...e)=>e.reduce(((e,t)=>(...n)=>e(t(...n)))),t.getRandomWindowName=function(e="RouterClient"){return`${e}-${(0,r.v4)()}`},t.timeoutPromise=f,t.wrapWithTimeout=function(e,t,n){return Promise.race([e,f(t,n)])},t.isStackedWindow=function(e){return e&&"StackedWindow"===((0,o.default)(e,"windowIdentifier.windowType")||e.windowType)},t.checkIfBoundsAreEqual=function(e,t){if(!e||!t)return!1;const n=["left","right","top","bottom","width","height"],i=(0,s.default)(e,n),r=(0,s.default)(t,n);return!!(0,a.default)(i,r)},t.sleep=function(e,t=!1){return new Promise(((n,i)=>{t?setTimeout((()=>{try{i("timeout expired")}catch(e){}}),e):setTimeout(n,e)}))},t.isEqualIgnoringArrayOrder=(e,n)=>{const i=(0,t.fastClone)(e),r=(0,t.fastClone)(n);return(0,l.default)(i,r,((e,t)=>{if(Array.isArray(e)&&Array.isArray(t))return(0,l.default)(e.sort(),t.sort())}))},t.checkDeprecatedConfigs=function(e,t,n){const{baseString:i,oldPath:r,newPath:o,oldValue:s,newValue:a}=t;let l=u.ConfigUtilInstance.getDefault(e,h(i,o,a),null);return null===l&&(l=u.ConfigUtilInstance.getDefault(e,h(i,o,s),null),l?p(t,o,s):(l=u.ConfigUtilInstance.getDefault(e,h(i,r,a),null),l?p(t,r,a):(l=u.ConfigUtilInstance.getDefault(e,h(i,r,s),null),l?p(t,r,s):l=n))),l}},28936:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=n(11314),a=o(n(26604));t.default=class{constructor(e,t){var n;this.allowDelay=!1,this.delayed=!1,this.allowCancel=!1,this.canceled=!1,this.completed=!1,this.event=e.event,this.source=e.source,this.sourceType=e.sourceType,this.listenerGuid=e.listenerGuid,a[this.sourceType.toUpperCase()]&&a[this.sourceType.toUpperCase()].DELAYABLE_EVENTS.includes(this.event)&&(this.allowDelay=!0),a[this.sourceType.toUpperCase()]&&a[this.sourceType.toUpperCase()].CANCELABLE_EVENTS.includes(this.event)&&(this.allowCancel=!0),this.handler=e.handler,this.queryMessage=t,this.guid=null===(n=null==t?void 0:t.data)||void 0===n?void 0:n.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,{delayed:!0})):this.done()}done(e){var t;this.completed=!0,this.delayed?s.RouterClient.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})}}},23893:function(e,t,n){"use strict";var i,r=this&&this.__classPrivateFieldSet||function(e,t,n,i,r){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?r.call(e,n):r?r.value=n:t.set(e,n),n},o=this&&this.__classPrivateFieldGet||function(e,t,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(e):i?i.value:t.get(e)},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=s(n(11314)),l=s(n(2518)),u=s(n(9060)),d=s(n(27102)),c=n(252),f=n(26604);class h extends u.default{constructor(e){super(e),i.set(this,void 0),this.eventList=[],this.eventInternalHandlerMap={},this.remoteListenerEventMap={},this.windowToGuidsMap={},this.waitList={},this.unsubscribes=[],this.unsubscribes.push(a.default.addListener(`Finsemble.RegisterInterruptibleEvent.${this.name}`,((e,t)=>{this.registerRemoteEventHandler(t.data.event,t.data.listenerGuid,t.data.windowName)}))),this.unsubscribes.push(a.default.addListener(`Finsemble.UnregisterInterruptibleEvent.${this.name}`,((e,t)=>{this.unregisterRemoteEventHandler(t.data.event,t.data.listenerGuid,t.data.windowName)}))),r(this,i,a.default.addListener(f.LAUNCHER_SERVICE.WINDOW_CLOSED,((e,t)=>{if(e)l.default.system.error(`PrivateEventManager: Error listening for ${f.LAUNCHER_SERVICE.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 i;this.remoteListenerEventMap[e]||(this.remoteListenerEventMap[e]=[]),this.remoteListenerEventMap[e].push(t),this.windowToGuidsMap[n]=[t].concat(null!==(i=this.windowToGuidsMap[n])&&void 0!==i?i:[])}unregisterRemoteEventHandler(e,t,n){var i;this.remoteListenerEventMap[e]?(this.remoteListenerEventMap[e]=this.remoteListenerEventMap[e].filter((e=>e!==t)),this.windowToGuidsMap[n]=(null!==(i=this.windowToGuidsMap[n])&&void 0!==i?i:[]).filter((e=>e!==t)),0===this.windowToGuidsMap[n].length&&delete this.windowToGuidsMap[n]):this.windowToGuidsMap[n]&&l.default.system.warn(`PrivateEventManager.unregisterListener() attempt to remove unregistered event "${e}" for window ${n}`)}awaitRemoteDelayer(e,t){return new Promise(((n,i)=>{const r=(o,s)=>{a.default.removeListener(`Finsemble.Listener.Done.${e}.${t}`,r),!0===s.data.canceled?i("canceled"):n(s.data.data)};this.waitList[e]=r,a.default.addListener(`Finsemble.Listener.Done.${e}.${t}`,r)}))}async queryRemoteListener(e,t,n,i){const r=`${this.name}_private_${Date.now()}_${Math.random()}`,o={event:e,guid:r,data:n},s=this.awaitRemoteDelayer(r,t),{err:l,response:u}=await Promise.race([a.default.query(`Finsemble.Interrupt.${t}`,o,{timeout:0,logWhenNoResponder:!1},(()=>{})),(0,c.sleep)(i.initialQueryTimeout,!0)]).catch((()=>{throw a.default.removeListener(`Finsemble.Listener.Done.${r}.${t}`,this.waitList[r]),"eventHandler failed initial response"}));if(l||!u.data)return;let d=!0;if(!0===u.data.delayed)try{return d=!1,await Promise.race([s,(0,c.sleep)(i.timeout,!0)])}catch(e){if("timeout expired"!==e)throw"event was canceled";d=!0}if(d&&a.default.removeListener(`Finsemble.Listener.Done.${r}.${t}`,this.waitList[r]),!0===u.data.canceled)throw"event was canceled";return u.data.data}async trigger(e,t=null,n={initialQueryTimeout:1e3,timeout:1e4}){l.default.verbose(`Triggering ${e} for ${this.name}`,t);const i=[];if(this.remoteListenerEventMap[e])for(let r of this.remoteListenerEventMap[e])i.push(this.queryRemoteListener(e,r,t,n));this.handlers.filter((t=>t.event===e)).forEach((n=>{const r=new d.default({source:this.name,sourceType:this.sourceType,handler:n.handler,event:e,data:t,guid:n.listenerGuid});i.push(r.complete)}));try{return await Promise.all(i)}catch(t){if("eventHandler failed initial response"!==t)throw"event was canceled";console.debug(`No response for interupt on event ${e}. Window is probably already closed.`)}}addEventListener(e,t){l.default.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){l.default.system.debug("PrivateEventManager.removeEventListener:",e);const n=this.handlers.findIndex((n=>n.event===e&&n.handler===t));-1!=n?this.handlers.splice(n,1):l.default.system.warn(`PrivateEventManager.removeEventListener() attempt to remove unregistered event "${e}"`)}cleanup(){o(this,i,"f")&&o(this,i,"f").call(this),this.unsubscribes.forEach((e=>{e()})),this.unsubscribes=[]}}i=new WeakMap,t.default=h},27102:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=o(n(26604));t.default=class{constructor(e){this.allowDelay=!1,this.delayed=!1,this.allowCancel=!1,this.canceled=!1,this.completed=!1,this.event=e.event,this.source=e.source,this.sourceType=e.sourceType,this.data=e.data,this.guid=e.guid,s[this.sourceType.toUpperCase()]&&s[this.sourceType.toUpperCase()].DELAYABLE_EVENTS.includes(this.event)&&(this.allowDelay=!0),s[this.sourceType.toUpperCase()]&&s[this.sourceType.toUpperCase()].CANCELABLE_EVENTS.includes(this.event)&&(this.allowCancel=!0),this.handler=e.handler,this.complete=new Promise(((e,t)=>{this.eventCanceled=t,this.eventComplete=e})),this.internalHandler()}async internalHandler(){this.handler&&await this.handler(this),this.delayed||this.canceled||this.completed||this.done()}cancel(){this.allowCancel&&(this.canceled=!0,this.done())}wait(){this.allowDelay?this.delayed=!0:this.done()}done(e){this.completed=!0,this.canceled?this.eventCanceled&&this.eventCanceled():this.eventComplete&&this.eventComplete(e)}}},9060:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=i(n(11314)),o=i(n(2518)),s=i(n(28936));t.default=class{constructor(e){var t;this.eventList=[],this.cleanedUp=!1,this.openResponders=[],this.handlers=[],this.name=e.name,this.thisWindowName=window.name,this.sourceType=null!==(t=e.sourceType)&&void 0!==t?t:"undefined",window.addEventListener("beforeunload",(()=>{this.cleanup()}))}addListener(e,t){return this.addEventListener(e,t)}removeListener(e,t){return this.removeEventListener(e,t)}addEventListener(e,t){o.default.system.debug("PublicEventmanager.addEventListener:",e);const n=`${this.name}_public_${Date.now()}_${Math.random()}`;this.handlers.push({event:e,handler:t,listenerGuid:n}),r.default.transmit(`Finsemble.RegisterInterruptibleEvent.${this.name}`,{event:e,listenerGuid:n,windowName:this.thisWindowName});const i=`Finsemble.Interrupt.${n}`;return r.default.addResponder(i,((i,r)=>{new s.default({source:this.name,sourceType:this.sourceType,listenerGuid:n,handler:t,event:e},r)})),this.openResponders.push(i),()=>{this.removeEventListener(e,t)}}removeEventListener(e,t,n=!0){if(o.default.system.debug("PublicEventManager.removeEventListener:",e),this.cleanedUp)return;const i=this.handlers.findIndex((n=>n.event===e&&n.handler===t));if(-1===i)return void(n&&o.default.system.warn(`PublicEventManager.removeEventListener() attempt to remove unregistered event "${e}"`));const{listenerGuid:s}=this.handlers[i];r.default.transmit(`Finsemble.UnregisterInterruptibleEvent.${this.name}`,{event:e,listenerGuid:s,windowName:this.thisWindowName}),r.default.removeResponder(`Finsemble.Interrupt.${s}`),this.handlers.splice(i,1)}cleanup(){this.cleanedUp=!0,this.handlers=[],this.openResponders.forEach((e=>{r.default.removeResponder(e)}))}}},78268:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=i(n(2518)),o=n(91374),s={},a={activeTransports:{},liveTransport:null,setTransports(){a.addTransport("SharedWorker",s.SharedWorkerTransport),a.addTransport("IPCBus",s.IPCTransport),a.addTransport("FinsembleTransport",s.FinsembleTransport)},addTransport(e,t){this.activeTransports[e]=t},getActiveTransports(e){const t=[],n=e=>{-1===t.indexOf(e)&&t.push(e)};return o.System.InterApplicationBus&&n("IPCBus"),n("FinsembleTransport"),SharedWorker&&n("SharedWorker"),n(e.sameDomainTransport),n(e.crossDomainTransport),r.default.system.log("getActiveTransports",t),t},getTransport:(e,t,n,i,o)=>new Promise(((s,l)=>{const u=a.activeTransports[t];if(u)a.liveTransport=new u(e,n,i,o,(e=>{s(e)}));else{const e=`routerTransport.getTransport() Unknown router transport name: ${t}`;r.default.warn(e),l(e)}})),close(){a.liveTransport&&(a.liveTransport.close(),a.liveTransport=null)}};s.SharedWorkerTransport=function(e,t,n,i,o){let s;this.send=function(e,t){1===arguments.length?(t=arguments[0],e=null):(e=arguments[0],t=arguments[1]),r.default.system.verbose("SharedWorkerTransport Outgoing Transport",t);try{s.port.postMessage([e,t])}catch(e){r.default.system.error(`SharedWorkerTransport: post message failed: ${JSON.stringify(e)}`,"Probable cause is sending illegal data type (e.g. function).")}},this.identifier=()=>"SharedWorker";const a=e.transportSettings.SharedWorker&&e.transportSettings.SharedWorker.workerPath?e.transportSettings.SharedWorker.workerPath:`${e.routerDomainRoot}/common/routerSharedWorker.js`;r.default.console.log(`SharedWorker Transport Initializing for ${n} using ${a}`),s=new SharedWorker(a,{name:"Finsemble",credentials:"include"}),s.port.onmessage=e=>{const n=e.data[0],i=e.data[1],o={transportID:this.identifier(),port:n};r.default.system.verbose("SharedWorkerTransport Incoming Transport",o,"Message",i),t(o,i)},s.onerror=e=>{r.default.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==o||o(this)},s.IPCTransport=function(e,t,n,i,s){this.send=function(e,t){let n;1===arguments.length?(n=i,t=arguments[0]):(n=e.name,t=arguments[1]),r.default.system.verbose("IPCTransport Outgoing Transport",n,"Message",t),o.System.InterApplicationBus.publish(n,t,(()=>{}),(()=>{}))},this.identifier=()=>"IPCBus",r.default.console.log(`IPCBus Transport Initializing for ${n}`);const a=o.System.InterApplicationBus.subscribe("*",n,(e=>{const n={transportID:this.identifier(),name:e.header.origin};r.default.system.verbose("IPCTransport Incoming Transport",n,"Message",e),t(n,e)}),(()=>{}),(e=>r.default.console.error(`IPCBus Subscribe Failure: ${e}`)));this.close=()=>o.System.InterApplicationBus.unsubscribe(a),null==s||s(this)},s.FinsembleTransport=function(e,t,n,i,o){var s,a,l,u,d;const c=`${null!==(d=null!==(l=null===(a=null===(s=null==e?void 0:e.transportSettings)||void 0===s?void 0:s.FinsembleTransport)||void 0===a?void 0:a.serverAddress)&&void 0!==l?l:null===(u=null==e?void 0:e.transportSettings)||void 0===u?void 0:u.serverAddress)&&void 0!==d?d:"ws://127.0.0.1:3376"}/router`;let f;const h=e=>{const n={transportID:this.identifier(),client:e.clientMessage.header.origin};r.default.system.verbose("FinsembleTransport Incoming Transport",n,"Message",e),t(n,e.clientMessage)},p=()=>{r.default.console.error(`FinsembleTransport Connection Timeout for ${n}`),null==o||o(this)},g=()=>{r.default.console.log(`FinsembleTransport Transport Initializing for ${n} using ${c}`),c.startsWith("ws:")||c.startsWith("wss:")||r.default.system.error(`Illegal WebSocket address "${c}" (Missing ws:// or wss:// ?)`),f=new WebSocket(c);const e=setTimeout(p,3e3);f.addEventListener("open",(()=>{clearTimeout(e),r.default.console.log("FinsembleTransport connected to server"),f.addEventListener("message",(e=>{const t=JSON.parse(e.data);(n===t.message.client||"RouterService"===n&&"ROUTER_SERVICE"==t.dest)&&h(t.message)})),null==o||o(this)}))};this.send=function(e,t){let n,i;1===arguments.length?(n="ROUTER_SERVICE",i={clientMessage:t=arguments[0]}):(n="ROUTER_CLIENT",t=arguments[1],i={client:e.client,clientMessage:t}),r.default.system.verbose("FinsembleTransport Outgoing Transport",n,"NewMessage",i),f.readyState===WebSocket.OPEN&&f.send(JSON.stringify({dest:n,message:i})),f.readyState===WebSocket.CONNECTING&&f.addEventListener("open",(()=>{f.send(JSON.stringify({dest:n,message:i}))})),f.readyState===WebSocket.CLOSED&&(g(),f.addEventListener("open",(()=>{f.send(JSON.stringify({dest:n,message:i}))}))),f.readyState===WebSocket.CLOSING&&(f.onclose=()=>{g(),f.addEventListener("open",(()=>{f.send(JSON.stringify({dest:n,message:i}))}))})},this.identifier=()=>"FinsembleTransport",this.close=()=>f.close(),g()},t.default=a},31482:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkForObjectChange=t.mapField=t.initObject=t.setPath=t.byString=void 0,t.byString=(e,t)=>{const n=(t=t.replace(/^\./,"")).split(/\.(?![^[]*])/g);for(let t=0;t<n.length;++t){const i=n[t].replace(/[["\]]/g,"");if(!e)return null;if("string"==typeof e)return null;if(!(i in e))return null;e=e[i]}return e},t.setPath=(e,t,n)=>t.split(".").reduce(((e,i)=>e[i]=t.split(".").pop()===i?n:e[i]||{}),e),t.initObject=function e(t,n,i){let r;if(n||(n=null),"object"!=typeof t)return r=n?`${n}.${t}`:t,void(i[r]=n);for(const o in t)"object"==typeof t[o]&&"undefined"!==t[o]?(r=n?`${n}.${o}`:o,i[r]=n,e(t[o],r,i)):(r=n?`${n}.${o}`:o,i[r]=n)},t.mapField=(e,n,i)=>{if(i[n])return;const r=(n=(n=n.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"")).split("."),o=n;if(!i.hasOwnProperty(o)){let e=null;r.length>1&&(r.pop(),e=r.join(".")),i[o]=e}const s=(0,t.byString)(e,o);if("undefined"!==s&&"object"==typeof s)for(const n in s)(0,t.mapField)(e,`${o}.${n}`,i)};t.checkForObjectChange=(e,n,i)=>{const r=(0,t.byString)(e,n);return null!==r&&("object"==typeof r||"object"!=typeof r&&"object"==typeof n?((e,t)=>{const n=[];for(const i in e){const r=`${t}.`;i.includes(r)&&(n.push(i),delete e[i])}return n})(i,n):null)}},91374:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.System=void 0;const i=n(10166),r=n(2518),o=n(11314);class s{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 a{static createNew(e,t){t("Cannot create freestanding windows")}static getCurrent(){const{windowName:e}=i.Startup.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 l{constructor(){return new fin.desktop.System.Clipboard}static writeText(e,t,n,i){return r.Logger.deprecated("FSBL.System.Clipboard.writeText is deprecated"),fin.desktop.System.Clipboard.writeText(e,t,n,i)}static writeHTML(e,t,n,i){return r.Logger.deprecated("FSBL.System.Clipboard.writeHTML is deprecated"),fin.desktop.System.Clipboard.writeHTML(e,t,n,i)}static writeRTF(e,t,n,i){return r.Logger.deprecated("FSBL.System.Clipboard.writeRTF is deprecated"),fin.desktop.System.Clipboard.writeRTF(e,t,n,i)}static readText(e,t,n){return r.Logger.deprecated("FSBL.System.Clipboard.readText is deprecated"),fin.desktop.System.Clipboard.readText(e,t,n)}static readHTML(e,t,n){return r.Logger.deprecated("FSBL.System.Clipboard.readHTML is deprecated"),fin.desktop.System.Clipboard.readHTML(e,t,n)}static readRTF(e,t,n){return r.Logger.deprecated("FSBL.System.Clipboard.readRTF is deprecated"),fin.desktop.System.Clipboard.readRTF(e,t,n)}}class u{static get Application(){return{getCurrent:()=>(r.Logger.deprecated("FSBL.System.Application is deprecated"),{restart:()=>{o.RouterClient.transmit("Application.restart",{})},getWindow:()=>fin.desktop.Window,addEventListener:(e,t,n,i)=>{fin.desktop.Window.addEventListener(e,t,n,i)},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)=>{u.getManifest(e)},getParentUuid:(e,t)=>{null==e||e("Finsemble")},getInfo:(e,t)=>{u.getVersion(e)},getTrayIconInfo:(e,t)=>{null==e||e({})},isRunning:(e,t)=>{null==e||e(!0)},registerUser:(e,t,n,i)=>{null==n||n()},removeEventListener:(e,t,n,i)=>{fin.desktop.Window.removeEventListener(e,t,n,i)},removeTrayIcon:(e,t)=>{fin.desktop.Window.removeTrayIcon(e,t)},run:(e,t)=>{},scheduleRestart:(e,t)=>{null==e||e()},setTrayIcon:(e,t,n,i)=>{fin.desktop.Window.setTrayIcon(e,t,n,i)},terminate:(e,t)=>{u.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 u.isFreestanding()?a:s}static get Notification(){return{send:e=>{fin.desktop.Notification.send(e)}}}static get Clipboard(){return l}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!u.isFreestanding()&&fin.isBrowserView()}static getViewId(){return r.Logger.deprecated("FSBL.system.getViewId() is deprecated. Use FSBL.system.getWebContentsId()"),fin.getWebContentsId()}static getWebContentsId(){return fin.getWebContentsId()}static hasBrowserView(){return r.Logger.deprecated("FSBL.system.hasBrowserView() is deprecated. Use FSBL.system.isTitlebarWindow()"),u.isTitlebarWindow()}static isTitlebarWindow(){return!u.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 get clearCache(){return fin.desktop.System.clearCache}static get showDeveloperTools(){return fin.desktop.System.showDeveloperTools}static get addEventListener(){return u.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 startupApplicationHandshake(){fin.desktop.System.startupApplicationHandshake&&fin.desktop.System.startupApplicationHandshake()}static terminate(){fin.desktop.System.terminate()}static restart(){fin.desktop.System.restart()}}t.System=u},84795:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=i(n(11314)),o=i(n(2518)),s=n(53912),a=n(38144),l=n(37331),u=new class{publishBootStatus(e,t,n,i){o.default.system.debug("publishBootStatus",e,t,n),r.default.publish((0,l.statusChannel)(e),{name:e,type:t,state:n,error:i})}waitForBootStage(e,t,n=Function.prototype){return new Promise(((i,l)=>{o.default.system.debug("SystemManagerClient.waitForBootStage entry",e,t);const u=s.ALL_BOOT_STAGES.indexOf(e);"microkernel"===e&&"stageEntered"===t&&o.default.system.error("Cannot wait on `stageEntered` for microkernel because router isn't up yet. So will instead wait for microkernal stage complete.");const d=r.default.subscribe(a.STAGE_CHANNEL,((a,c)=>{if(o.default.system.debug("SystemManagerClient.waitForBootStage new stage",c.data.stage,d),a)o.default.system.error("SystemManagerClient.waitForBootStage subscribe error",a),n(a),l(a);else if(-1===u)a="illegal stage argument",o.default.system.debug("SystemManagerClient.waitForBootStage subscribe error",a,e),n(a),l(a);else{const a=s.ALL_BOOT_STAGES.indexOf(c.data.stage);o.default.system.debug("SystemManagerClient.waitForBootStage new stage",c.data,d),"stageEntered"===t&&a+1>=u?(o.default.system.debug("SystemManagerClient.waitForBootStage stageEntered",e,d,n.name),n(),i(),r.default.unsubscribe(d)):"stageCompleted"===t&&a>=u?(o.default.system.debug("SystemManagerClient.waitForBootStage completed",e,d),n(),i(),r.default.unsubscribe(d)):o.default.system.debug(`SystemManagerClient.waitForBootStage else currentStageIndex=${a} stageIndex=${u} `,a,u,e,d)}}))}))}waitForStartup(e,t=Function.prototype){return new Promise(((n,i)=>{o.default.system.debug(`SystemManagerClient.waitForStartup.${e}`,e);const s=r.default.subscribe((0,l.statusChannel)(e),((a,l)=>{o.default.system.debug("SystemManagerClient.waitForStartup subscribe",e,a,l),a?(o.default.system.error("SystemManagerClient.waitForStartup subscribe error",a),t(a),i()):l.data.name===e&&"completed"===l.data.state&&(o.default.system.debug("SystemManagerClient.waitForStartup completed",e),t(),n(),r.default.unsubscribe(s))}))}))}publishCheckpointState(e,t,n){o.default.system.debug("publishCheckpoint",e,t,n,(0,l.checkpointChannel)(e,t)),r.default.publish((0,l.checkpointChannel)(e,t),{windowName:e,checkpointName:t,state:n})}showSystemLog(){o.default.system.debug("SystemManagerClient.showSystemLog"),r.default.transmit(a.SHOW_SYSLOG_CHANNEL,!0)}systemLog(e,t){o.default.system.debug("SystemManagerClient.systemLog",e,t),r.default.transmit(a.SYSLOG_CHANNEL,{params:e,logMessage:t})}};t.default=u},65582:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SystemSettings=void 0;class n{constructor(){this.currentDiagLevel=3}diagLevel(){return this.currentDiagLevel}setDiagLevel(e){this.currentDiagLevel=e}validationEnabled(){return this.currentDiagLevel>=4}}t.SystemSettings=n,t.default=new n},16994:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.UserNotification=void 0;const r=i(n(2518)),o=n(64324),s=n(91374),a=i(n(84795));let l=null;t.UserNotification=function(){const e={},t={};let i=null;this.getDefaultTemplateURL=function(e){i?setTimeout((()=>{e(i)}),0):(l||(l=n(9381).default),l.getValue({field:"finsemble"},((t,n)=>{i=o.ConfigUtilInstance.getDefault(n,"finsemble.notificationURL",`${n.moduleRoot}/components/system/notification/notification.html`),e(i)})))},this.alert=function(e,t,n,i,r){const o=this;r&&r.url?this.alertInternal(e,t,n,i,r,r.url):this.getDefaultTemplateURL((s=>{o.alertInternal(e,t,n,i,r,s)}))},this.alertInternal=function(n,i,o,l,u,d){let c=!1;const f=`UserNotification.alert.${o}`,h=(u=u||{}).duration||864e5;switch(i){case"ONCE-SINCE-STARTUP":f in e?c=!1:(c=!0,e[f]=!0);break;case"MAX-COUNT":{let e=0;const n=u.maxCount||1;f in t&&(e=t[f]),t[f]=++e,e<=n&&(c=!0);break}default:c=!0}if(r.default.log("UserNotification.alert",n,c,i,o,l,u),c){const e=Object.assign(Object.assign({url:d,message:l,timeout:h},u),{devModeOnly:"devModeOnly"===n});a.default.systemLog({notification:!0},`Notification: ${l}`),s.System.Notification.send(e)}}},t.default=new t.UserNotification},23099:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.windowNameFromRouterHeader=t.getWindowType=t.isWindows=t.injectJS=t.camelCase=t.getMyWindowIdentifier=t.getWindowDescriptor=t.getFinWindow=t.crossDomain=t.isPercentage=t.clone=void 0;const r=n(91374),o=i(n(2518));function s(e,t){return new Promise(((n,i)=>{const o=r.System.Window.getCurrent();if(null==e?void 0:e.windowName)try{const i=r.System.Window.wrap(e.windowName);null==t||t(i),n(i)}catch(n){null==t||t(null),i(`Window ${e.windowName} not found. UUID: ${e.uuid}`),console.debug(`util.getFinWindow: Window ${e.windowName} not found`)}else if(null==e?void 0:e.componentType){const r="LauncherService";if(void 0!==window[r]){const o=window[r].componentFinder(e);o?(n(o),null==t||t(o)):(i(`util.getFinWindow: Component ${e.componentType} not found.`),null==t||t(null))}else i("getFinWindow by componentType is currently only operable within LaunchService"),null==t||t(null)}else null==t||t(o),n(o)}))}t.clone=function e(t,n={}){if(null===t||"object"!=typeof t)return t;if(t.constructor==Date||t.constructor==RegExp||t.constructor==Function||t.constructor==String||t.constructor==Number||t.constructor==Boolean)return new t.constructor(t);n=n||new t.constructor;for(const i in t)n[i]=void 0===n[i]?e(t[i],null):n[i];return n},t.isPercentage=function(e){return"string"==typeof e&&-1!==e.indexOf("%")},t.crossDomain=function(e){const t=document.createElement("a");t.href=e;const n=window.location.hostname===t.hostname,i=window.location.protocol===t.protocol,r=(void 0!==window.location.port?window.location.port:80)===(void 0!==t.port?t.port:80),s=!(n&&r&&i);return o.default.system.debug(`Launcher crossDomain=${s} (${n}:${i}:${r})`),s},t.getFinWindow=s,t.getWindowDescriptor=function(e,t){return new Promise(((n,i)=>{s(e).then((e=>{e.getOptions((e=>{null==t||t(e),n(e)}))})).catch((e=>{console.warn(e),null==t||t(null),i(e)}))}))},t.getMyWindowIdentifier=e=>{const t=r.System.Window.getCurrent();return new Promise((n=>{t.getOptions((i=>{let r=null;const{customData:o}=i;o&&o.component&&(r=o.component.type);const s={windowName:t.name,componentType:r};null==e||e(s),n(s)}))}))},t.camelCase=function(...e){let t="";for(let n=0;n<e.length;n++)t=`${t} ${e[n]}`;return t.replace(/\s(.)/g,(e=>e.toUpperCase())).replace(/\s/g,"").replace(/^(.)/,(e=>e.toLowerCase()))},t.injectJS=function(e,t){const n=document.createElement("script");t&&(n.onload=t),n.type="text/javascript",n.async=!0,n.src=e;const i=document.getElementsByTagName("head")[0],r=i.getElementsByTagName("script")[0];i.insertBefore(n,r)},t.isWindows=async function(e){const t=(await r.System.getHostSpecs()).name.toUpperCase().includes("WINDOWS");return null==e||e(t),t},t.getWindowType=function(e){const t="WebWindow";if(e.windowType&&!["assimilation","assimilated","native","application","NativeWindow","FinsembleNativeWindow","CompoundWindow","WebWindow","WebApplication","StackedWindow"].includes(e.windowType))return o.default.system.error(`Invalid windowType: ${e.windowType}, defaulting to windowType: WebWindow`),t;let n=e.windowType||t;switch(e.windowType){case"assimilation":case"assimilated":n="NativeWindow";break;case"native":n="FinsembleNativeWindow";break;case"application":n="WebApplication";break;case"Web":n="WebWindow";break;case"StackedWindow":n="StackedWindow"}return e.native&&(n="NativeWindow"),e.compound&&(n="CompoundWindow"),n},t.windowNameFromRouterHeader=e=>{let t,n=/\.(.*)\./s;try{t=e.origin.match(n)[1]}catch(n){t=e.origin.split(".")[1]}return t}},20670:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Validate=void 0;const r=i(n(65582));class o{warningMsg(e,t,n){const i=function(){try{throw Error("")}catch(e){return e}}();if(i.stack){const r=i.stack.split("\n")[5],o=r.indexOf("at "),s=r.slice(o+2,r.length),a=i.stack.split("\n")[6],l=a.indexOf("at "),u=a.slice(l+2,a.length);console.warn(`parameter validation failed: parameter ${e} is of type '${typeof t}' but should be of type '${n}' in${s} called by${u}`)}else console.warn(`parameter validation failed: parameter ${e} is of type '${typeof t}' but should be of type '${n}' inunknown called byunknown`)}args(...e){if(!r.default.validationEnabled())return!0;const t=e.length;if((t+1)%2!=0)for(let n=0;n<t;n+=2){let t=!1;const i=e[n];let r=e[n+1];"="===r.slice(-1)&&(r=r.slice(0,-1),t=!0);const o=void 0===i&&t,s=void 0!==i&&"any"===r;if(typeof i!==r&&!o&&!s){const e=""+(n/2+1);return this.warningMsg(e,i,r),!1}}else console.warn(`validate.args requires an even number of parameters: ${JSON.stringify(e)}`);return!0}args2(...e){if(!r.default.validationEnabled())return!0;const t=e.length;if((t+1)%3!=0)for(let n=0;n<t;n+=3){let t=!1;const i=e[n],r=e[n+1];let o=e[n+2];"="===o.slice(-1)&&(o=o.slice(0,-1),t=!0);const s=void 0===r&&t,a=void 0!==r&&"any"===o;if(typeof r!==o&&!s&&!a)return this.warningMsg(i,r,o),!1}else console.warn(`validate.args requires an even number of parameters: ${JSON.stringify(e)}`);return!0}}t.Validate=o,t.default=new o},766:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FinsembleView=void 0,t.FinsembleView=class{constructor(e){this.win=e.win,this.id=e.id}async remove(e=Function.prototype){await this.win.removeBrowserView(this,e)}async setBounds(e,t=Function.prototype){await this.win.setViewBounds({view:this,bounds:e},t)}async bringToFront(e=Function.prototype){await this.win.bringViewToFront(this,e)}}},24074:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return r(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FinsembleWindow=void 0;const a=n(11314),l=n(2518),u=o(n(23099)),d=s(n(9060)),c=n(26604),f=n(91374),h=n(766),p=n(44137),g=s(n(50361));class m extends d.default{constructor(e){super({name:e.name,sourceType:"Window"}),this.types={},this.wrapState=e.wrapState||"initializing",this.componentState={},this.windowState=c.WINDOWSTATE.NORMAL,this.type=null,this.windowType=null,this.bounds={},this.guid=`${Date.now()}_${Math.random()}`,this.WINDOWSTATE=c.WINDOWSTATE,this.windowOptions={},this.doConstruction(e),this.TITLE_CHANGED_CHANNEL=`Finsemble.${this.name}.titleChanged`,this.componentKey=u.camelCase("activeWorkspace",this.name,this.name),this.windowKey=u.camelCase("activeWorkspace",this.name),m.bindFunctions(this)}standardizeEventName(e){switch(e){case"bounds-set":case"stoppedMoving":return"bounds-change-end";case"startedMoving":return"bounds-change-start";case"bringToFront":return"broughtToFront";case"setParent":return"parent-set";case"clearParent":return"parent-unset";default:return e}}addEventListener(e,t){return e=this.standardizeEventName(e),super.addEventListener(e,t)}removeEventListener(e,t,n=!1){if("closed"!==e||!p.FEAGlobals.finsembleWindow||this.name!==p.FEAGlobals.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 m(e);if(e)for(const t in e)this[t]=e[t];this.name||(this.name=e.windowName),this.windowType=this.setWindowType}static registerType(e,t){const n=m;n.types||(n.types={}),n.types[e]=t}static bindFunctions(e){e.setParent=e.setParent.bind(e),e.getParent=e.getParent.bind(e),e.eventChannelName=e.eventChannelName.bind(e),e.windowServiceChannelName=e.windowServiceChannelName.bind(e),e.handleWrapRemoveRequest=e.handleWrapRemoveRequest.bind(e),e.reload=e.reload.bind(e)}static async createWrapFromUUIDAndName(e,t){var n;const{uuid:i,windowType:r}=t;if(!1!==t.waitForReady)try{await m._windowReady(e),t.wrapState="ready"}catch(e){return{err:e}}l.Logger.system.debug("WRAP LIFECYCLE:",e,"All information for wrap passed in, creating wrap locally");const o=m.cache[e];return o?(l.Logger.system.debug("WRAP LIFECYCLE:",e,"Window found in the cache, returning without going to the Launcher"),{data:o}):{data:(await m._createWrap(Object.assign(Object.assign({},t),{windowIdentifier:null!==(n=t.windowIdentifier)&&void 0!==n?n:{uuid:i,name:e,windowName:e,windowType:r}}))).wrap}}static getInstance(e,t){var n;const i=f.System.Window.getCurrent().name,r=null!==(n=null==(e=(0,g.default)(e))?void 0:e.windowName)&&void 0!==n?n:null==e?void 0:e.name;return new Promise((async(n,o)=>{if(!r){const e='"name" is a required param';return null==t||t(e),void o(e)}e.windowName=r;let s=m.cache[r];if(s)return l.Logger.system.debug("WRAP LIFECYCLE:",r,"Window found in the cache, returning without going to the Launcher"),null==t||t(null,s),void n({wrap:s});if(e.name){const{err:i,data:s}=await m.createWrapFromUUIDAndName(r,e);return i||!s?(null==t||t(i),void o(i)):(null==t||t(null,s),void n({wrap:s}))}if(!1!==e.waitForReady)try{await m._windowReady(r),e.wrapState="ready"}catch(u){return null==t||t(u,null),void o(u)}const{err:u,response:d}=await a.RouterClient.query("WindowService-Request-getWindowIdentifier",{windowName:r,requester:i});if(u)return l.Logger.system.error(u),null==t||t(u,null),void o(u);if(s=m.cache[r],s)return l.Logger.system.debug("WRAP LIFECYCLE:",e.name,"Information received from launcher, but wrap exists in cache. Returning cached wrap."),null==t||t(null,s),void n({wrap:s});l.Logger.system.debug("WRAP LIFECYCLE:",r,"Information received from launcher. Creating wrap.");const{identifier:c}=d.data;c.windowName&&(c.name=c.windowName),e.retrievedIdentifier=c,({wrap:s}=await m._createWrap(e)),d.data.descriptor&&(s.descriptor=d.data.descriptor),null==t||t(null,s),n({wrap:s})}))}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 i=Object.assign({},n);i=Object.assign(i,e),i.setWindowType=i.windowType,delete i.windowType,l.Logger.system.debug("WRAP LIFECYCLE: Placing wrap into the local cache.",n.windowName);let r=new m(i);m.cache[n.windowName]=r,r.windowType=n.windowType,r.identifier=n,r.addEventListener("closed",r.handleWrapRemoveRequest),r.addEventListener("maximized",(()=>{r.windowState=c.WINDOWSTATE.MAXIMIZED,r.windowOptions.windowState=c.WINDOWSTATE.MAXIMIZED})),r.addEventListener("minimized",(()=>{r.windowState===c.WINDOWSTATE.MAXIMIZED?(r.windowState=c.WINDOWSTATE.MINIMIZED_WAS_MAXIMIZED,r.windowOptions.windowState=c.WINDOWSTATE.MINIMIZED_WAS_MAXIMIZED):r.windowState===c.WINDOWSTATE.NORMAL?(r.windowState=c.WINDOWSTATE.MINIMIZED_WAS_NORMAL,r.windowOptions.windowState=c.WINDOWSTATE.MINIMIZED_WAS_NORMAL):l.Logger.system.warn("Invalid window state received listening to window minimize",r.windowState)})),r.addEventListener("restored",(()=>{r.windowState=c.WINDOWSTATE.NORMAL,r.windowOptions.windowState=c.WINDOWSTATE.NORMAL}));const o=a.RouterClient.subscribe(`Finsemble.Component.State.${n.windowName}`,((e,t)=>{if(e)l.Logger.system.error("Finsemble component state change error",e);else{const{state:e}=t.data;r.wrapState=e,a.RouterClient.unsubscribe(o)}}));await(async(e,t)=>new Promise((n=>{e.parentSubscribeID=a.RouterClient.subscribe(`Finsemble.parentChange.${t.windowName}`,(async(t,i)=>{if(t)l.Logger.system.error("FinsembleWindow parent change notification error",t);else{const t=i.data||{};"Added"===t.type?(l.Logger.system.debug("FinsembleWindow Parent Notification: window.addedToStack listener",t),await e.setParent(t.stackedWindowIdentifier)):"Exists"===t.type?(l.Logger.system.debug("FinsembleWindow Parent Notification: Parent already exists, checking if added to wrap",t),await e.setParentOnWrap(t.stackedWindowIdentifier)):"Removed"===t.type?(l.Logger.system.debug("FinsembleWindow Parent Notification: window.removedFromStack listener",t),e.clearParent()):t.type&&l.Logger.system.error("FinsembleWindow Parent Notification: unknown type",t)}n()}))})))(r,n),t({wrap:r})}))}static _getRemoveWrapChannel(e){return`${f.System.Window.getCurrent().name}.removeWrap.${e}`}async handleWrapRemoveRequest(e){e&&e.wait(),l.Logger.system.debug("WRAP Destructor. Removing cached window",this.name,"in ",window.name),this.removeListeners&&this.removeListeners(),this.cleanupRouter(),this.cleanup(),this.name!==p.FEAGlobals.name&&this.name&&delete m.cache[this.name],e&&e.done()}static closeAllWraps(){Object.values(m.cache).forEach((e=>{e.handleWrapRemoveRequest()}))}cleanupRouter(){const e=m._getRemoveWrapChannel(this.name);a.RouterClient.removeResponder(e),this.TITLE_CHANGED_SUBSCRIPTION&&a.RouterClient.unsubscribe(this.TITLE_CHANGED_SUBSCRIPTION),a.RouterClient.unsubscribe(this.parentSubscribeID)}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=Object.assign(Object.assign({},t),{windowIdentifier:this.identifier}),l.Logger.setting().system.Debug&&(t.callstack=l.Logger.callStack()),new Promise((async(i,r)=>{var o;if("close"!==e&&"setParent"!==e&&"ready"!==this.wrapState)return await this.onReady(),this.wrapState="ready",void i(await this.queryWindowService(e,t));l.Logger.system.debug("FinsembleWindow.queryWindowService",this.windowServiceChannelName(e),t);const{err:s,response:u}=await a.RouterClient.query(this.windowServiceChannelName(e),t);let d=null!==(o=u.data)&&void 0!==o?o:null;if(s){if(l.Logger.system.debug(`WindowService.${e}: failed`,s),console.debug(`WindowService.${e}: failed`,s),"getComponentState"!==e&&"Not found"!==s)return void r(s)}else l.Logger.system.debug(`${this.windowServiceChannelName(e)} successful`,d),console.debug(`${this.windowServiceChannelName(e)} successful`,d);i(d),n(s,d)}))}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(((i,r)=>{i||!r?l.Logger.system.warn(`Error getting bounds, cached bounds will not be set: ${i}`):this.updateOptions({options:{defaultLeft:r.left,defaultTop:r.top,defaultWidth:r.width,defaultHeight:r.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 i={ignore:new Boolean(e).valueOf(),options:new Boolean(t).valueOf()?t:{forward:!1}};this.queryWindowService("setIgnoreMouseEvents",i,n)}setShape(e,t=Function.prototype){this.queryWindowService("setShape",e,t)}async addBrowserView(e,t=Function.prototype){const n=await this.queryWindowService("addBrowserView",e,t);return new h.FinsembleView({id:n,win:this})}async removeBrowserView(e,t=Function.prototype){await this.queryWindowService("removeBrowserView",{viewId:e.id},t)}async bringViewToFront(e,t=Function.prototype){await this.queryWindowService("bringViewToFront",{viewId:e.id},t)}async setViewBounds(e,t=Function.prototype){await this.queryWindowService("setViewBounds",{viewId:e.view.id,bounds:e.bounds},t)}setBounds(e={bounds:{}},t){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 i="function"==typeof e?e:t;this.queryWindowService("getBounds",{},((e,t)=>{null==i||i(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,i)=>{null==t||t(e,i),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,i)=>{null==t||t(e,i),n({err:e})}))}))}showAt(e={},t=Function.prototype){this.queryWindowService("showAt",e,t)}close(e={},t){return new Promise((n=>{l.Logger.system.debug("WRAP CLOSE. Public close initiated for",this.name,e),this.queryWindowService("close",e,(e=>{l.Logger.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((()=>{a.RouterClient.query("DockingService.registerWindow",{type:this.type,windowType:this.windowType,windowMsg:e,name:this.windowName},t)}))}showNativeOpenDialog(e={},t){this.queryWindowService("showNativeOpenDialog",e,t)}unRegisterWithDocking(){a.RouterClient.transmit("DockingService.deregisterWindow",{name:this.windowName})}initializeWindow({manageWindowMovement:e,identifier:t},n=Function.prototype){const i=()=>{a.RouterClient.publish(`Finsemble.${this.windowName}.componentReady`,{name:this.windowName}),n()};e?this.registerWithDocking(t,i):i()}wrapReady(){a.RouterClient.publish(`Finsemble.${this.windowName}.wrapReady`,{name:this.windowName,state:"open"})}setOpacity(e,t=Function.prototype){this.queryWindowService("setOpacity",e,t)}startTabTileMonitoring(e={}){l.Logger.system.debug("FinsembleWindow.startTabTileMonitoring",e),a.RouterClient.transmit("TabTile.startTabTile",{params:e})}stopTabTileMonitoring(e={},t=Function.prototype){l.Logger.system.debug("FinsembleWindow.stopTabTileMonitoring",e),a.RouterClient.query("TabTile.stopTabTile",{params:e},(function(e,n){e?l.Logger.system.warn("TabTile.stopTabTile: query failed",e):l.Logger.system.debug("TabTile.stopTabTile results",n.data);const i=n.data;t?t(e,i,this.defaultStopTrackingAction):this.defaultTabTileAction(i)}))}defaultTabTileAction(e){const t=this;switch(l.Logger.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:l.Logger.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={}){l.Logger.system.debug("FinsembleWindow.startMove",e),e.windowIdentifier=this.identifier,a.RouterClient.transmit(this.eventChannelName("startedMoving"),{})}stopMove(e={}){l.Logger.system.debug("FinsembleWindow.stopMove",e),e.windowIdentifier=this.identifier,a.RouterClient.transmit(this.eventChannelName("stoppedMoving"),{})}getMonitor(e){a.RouterClient.query("DockingService.getMonitorForWindow",{windowIdentifier:this.identifier},((t,n)=>n?e(n.data):e()))}getComponentState(e,t){this.queryWindowService("getComponentState",e,t)}getWindowState(e,t){this.queryWindowService("getWindowState",e,t)}setComponentState(e,t=(()=>{})){this.queryWindowService("setComponentState",e,t)}removeComponentState(e,t=(()=>{})){this.queryWindowService("removeComponentState",e,t)}setWindowState(e,t=(()=>{})){this.queryWindowService("setWindowState",e,t)}saveCompleteWindowState(e={},t=Function.prototype){this.queryWindowService("saveCompleteWindowState",e,t)}cancelTabTileMonitoring(e={}){l.Logger.system.debug("FinsembleWindow.cancelTabTileMonitoring",e),a.RouterClient.transmit("TabTile.cancelTabTile",{params:e})}getParent(e){this.settingParent?m.getInstance(this.settingParent,((t,n)=>{e(null,n)})):this.parentWindow?e(null,this.parentWindow):e(null,null)}async setParent(e,t){return new Promise((n=>{this.settingParent?this.getParent(((e,i)=>{null==t||t(e,i),n({err:e,data:i})})):(this.settingParent=e,this.parentWindow&&this.parentWindow.name===e.windowName?(l.Logger.system.debug("FinsembleWindow.setParent already set",e),this.settingParent=!1,null==t||t(null,this.parentWindow),n({data:this.parentWindow})):this.queryWindowService("setParent",e,(()=>{l.Logger.system.debug("FinsembleWindow.setParent",e),m.getInstance(e,((i,r)=>{i?l.Logger.system.error("FinsembleWindow.setParent error",i):(l.Logger.system.debug("FinsembleWindow.setParent wrap success",e),this.parentWindow=r,this.parentWindow.windowType.includes("StackedWindow")||l.Logger.system.error("FinsembleWindow.setParent error",this.parentWindow.name,e.windowName)),a.RouterClient.transmit(c.DOCKING.REQUEST_PUBLISH,null),this.settingParent=!1;const o=()=>{this.removeEventListener("parent-set",o),null==t||t(i,r),n({err:i,data:r})};this.addEventListener("parent-set",o)}))})))}))}setParentOnWrap(e,t=Function.prototype){this.parentWindow&&this.parentWindow.name===e.windowName?(l.Logger.system.debug("FinsembleWindow.setParentOnWrap already set",e),t(null,this.parentWindow)):this.queryWindowService("setParent",e,(()=>{l.Logger.system.debug("FinsembleWindow.setParentOnWrap",e),m.getInstance(e,((n,i)=>{n?l.Logger.system.error("FinsembleWindow.setParentOnWrap error",n):(l.Logger.system.debug("FinsembleWindow.setParentOnWrap success getting wrap",e),this.parentWindow=i,!1===this.parentWindow.windowType.includes("StackedWindow")&&l.Logger.system.error("FinsembleWindow.setParentOnWrap error",this.parentWindow.name,e.windowName)),t(n,i)}))}))}clearParent(){l.Logger.system.debug("FinsembleWindow.clearParent",this.parentWindow),this.parentWindow=null}setTitle(e){l.Logger.system.debug("Title change",e),a.RouterClient.publish(this.TITLE_CHANGED_CHANNEL,{title:e,windowName:this.windowName})}getOptions(e){return new Promise((t=>{this.queryWindowService("getOptions",{},((n,i)=>{null==e||e(n,i),t({err:n,data:i})}))}))}_privateManagementPreface(e,t){var n,i;return"function"==typeof t&&l.Logger.system.error("StackedWindowWrapper.wrapPreface bad params",t),(t=t||{}).stackedWindowIdentifier={windowName:null===(n=this.identifier)||void 0===n?void 0:n.windowName,windowType:null===(i=this.identifier)||void 0===i?void 0:i.windowType},l.Logger.system.debug(`StackedWindow.${e} _privateManagementPreface`,t),t}addWindow(e,t=Function.prototype){return e=this._privateManagementPreface("addWindow",e),new Promise((n=>{a.RouterClient.query("StackedWindow.addWindow",e,((e,i)=>{l.Logger.system.debug("StackedWindow.addWindow callback",e,i),t(e,i.data),n({err:e,data:i.data})}))}))}removeWindow(e,t=Function.prototype){return e=this._privateManagementPreface("removeWindow",e),new Promise((n=>{a.RouterClient.query("StackedWindow.removeWindow",e,((e,i)=>{l.Logger.system.debug("StackedWindow.removeWindow callback",e,i),t(e,i.data),n({err:e,data:i.data})}))}))}deleteWindow(e,t=Function.prototype){return e=this._privateManagementPreface("deleteWindow",e),new Promise((n=>{a.RouterClient.query("StackedWindow.deleteWindow",e,((e,i)=>{l.Logger.system.debug("StackedWindow.deleteWindow callback",e,i),t(e,i.data),n({err:e,data:i.data})}))}))}setVisibleWindow(e,t=Function.prototype){return e=this._privateManagementPreface("setVisibleWindow",e),new Promise((n=>{a.RouterClient.query("StackedWindow.setVisibleWindow",e,((e,i)=>{l.Logger.system.debug("StackedWindow.setVisibleWindow callback",e,i),t(e,i.data),n({err:e,data:i.data})}))}))}reorder(e,t=Function.prototype){return e=this._privateManagementPreface("reorder",e),new Promise((n=>{a.RouterClient.query("StackedWindow.reorder",e,((e,i)=>{l.Logger.system.debug("StackedWindow.reorder callback",e,i),t(e,i.data),n({err:e,data:i.data})}))}))}formGroup(){const e=this.parentWindow?this.parentWindow.name:this.name;a.RouterClient.transmit("DockingService.formGroup",{windowName:e})}ejectFromGroup(){const e=this.parentWindow?this.parentWindow.name:this.name;a.RouterClient.query("DockingService.leaveGroup",{name:e},(()=>{}))}}t.FinsembleWindow=m,m.WINDOWSTATE=c.WINDOWSTATE,m.wrap=m.getInstance,m.cache={},m._windowReady=function(e){let t;return l.Logger.system.debug(`windowServiceReady: ${e} starting`),new Promise((async(n,i)=>{l.Logger.system.debug(`windowServiceReady: ${e} waiting`),t=a.RouterClient.subscribe(`Finsemble.Component.State.${e}`,((i,r)=>{const{state:o}=r.data;switch(l.Logger.system.debug(`windowServiceReady: ${e} state change: ${o}`),o){case"ready":case"reloading":case"closing":l.Logger.system.debug(`windowServiceReady: ${e} ${o}`),a.RouterClient.unsubscribe(t),n()}}))}))}},24137:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.openSharedData=t.deprecatedGetWindowNameForDocking=t.deprecatedSetActive=t.deprecatedGetActiveAndPendingWindowNames=void 0;const r=i(n(2518)),o=i(n(49136)),s=i(n(95393));function a(e,t){return e.classList?e.classList.contains(t):!!e.className.match(new RegExp(`(\\s|^)${t}(\\s|$)`))}t.deprecatedGetActiveAndPendingWindowNames=(e,t=Function.prototype)=>new Promise((n=>{e.query("Launcher.getActiveAndPendingWindowNames",{},((e,i)=>{e&&r.default.system.error(e),t(e,i.data),n({err:e,data:i.data})}))})),t.deprecatedSetActive=e=>{var t,n;e?(n="desktop-active",(t=document.documentElement).classList?t.classList.add(n):a(t,n)||(t.className=`${t.className} ${n}`)):function(e,t){if(e.classList)e.classList.remove(t);else if(a(e,t)){const n=new RegExp(`(\\s|^)${t}(\\s|$)`);e.className=e.className.replace(n," ")}}(document.documentElement,"desktop-active")},t.deprecatedGetWindowNameForDocking=e=>{const t=e.parentWindow;return t?t.name:e.name},t.openSharedData=function(e,t){const n=o.default,i=s.default;e.multipleOpenerHandler||(e.multipleOpenerHandler=function(e){let t,n=0;for(const i of Object.keys(e))e[i].length>n&&(t=i,n=e[i].length);return[t]});const a=[],l={};n.getComponentsThatCanReceiveDataTypes({dataTypes:Object.keys(e.data)},((o,s)=>{for(const e of Object.keys(s))if(s[e].componentTypes.length)for(const t of s[e].componentTypes)l[t]?l[t].push(e):l[t]=[e];else{const t=`No Components Available to Handle the type: ${e}`;a.push(t),r.default.system.error(t)}let u=Object.keys(l);if(u.length){u.length>1&&(u=e.multipleOpenerHandler(l));const r=Object.keys(i.channels);if(r.length)if(i.getLinkedComponents({componentTypes:u,windowIdentifier:i.windowIdentifier()}).length||e.publishOnly)i.publish({dataType:"Finsemble.DragAndDropClient",data:e.data},(()=>{})),t&&t(a.length?a:null,"Data published");else{for(const t of u)n.spawn(t,{data:{sharedData:e.data,linker:{channels:r}},addToWorkspace:!0});t&&t(a.length?a:null,"Linked Window(s) spawned with data")}else if(!e.publishOnly){for(const t of u)n.spawn(t,{data:{sharedData:e.data},addToWorkspace:!0});t&&t(a.length?a:null,"New Window(s) spawned with data")}}else t&&t(a.length?a:null,null)}))}},95393:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.LinkerClient=void 0;const r=n(1641),o=i(n(20670)),s=n(25232),a=i(n(97525)),l=i(n(49136)),u=i(n(47913)),d=i(n(2518)),c=i(n(18446));d.default.system.debug("Starting LinkerClient");const f=d.default.system.info,h=d.default.system.debug;function p(e){return e.windowName.replace(/\./g,"_")}function g(e,t){return t&&t(null,e),e}class m extends s._BaseClient{constructor(e){super(e),this.stateChangeListeners=[],this.allChannels=[],this.channels={},this.clients={},this.channelListenerList=[],this.dataListenerList={},this.handleListeners=(e,t)=>{const n=this.dataListenerList[t.data.type];if(n&&n.length>0)for(let e=0;e<n.length;e++)n[e](t.data.data,{data:t.data.data,header:t.header,originatedHere:t.originatedHere})},this.onClose=e=>{const t=p(a.default.getWindowIdentifier());this.clients[t]&&(this.clients[t]=null,this.updateClientInStore(t)),this.linkerStore.removeListener({field:`clients.${t}`},this.clientsKeyValueChangeStoreListener,((e,n)=>{n||d.default.system.warn("Linker Client Onclose: clientsKeyValueChangeStoreListener removeListener failed",t)})),this.linkerStore.removeListener({field:{}},this.anyFieldChangeStoreListener,((e,t)=>{t||d.default.system.warn("Linker Client Onclose: anyFieldChangeStoreListener removeListener failed")})),d.default.system.debug("LINKER-4 cleanup",t),e&&e()},this.groups=this.channels,this.allGroups=this.allChannels,this.onLinksUpdate={push:e=>{this.stateChangeListeners.push(((t,n)=>{n&&(n.groups=n.channels),e(t,{groups:n})}))}},this.linkerWindow=null,this.loading=!1,o.default.args(e,"object=")&&e&&o.default.args2("params.onReady",e.onReady,"function="),this.clientsKeyValueChangeStoreListener=this.clientsKeyValueChangeStoreListener.bind(this),this.anyFieldChangeStoreListener=this.anyFieldChangeStoreListener.bind(this)}getChannel(e){return this.allChannels.filter((t=>t.name===e)).length>0}createChannel(e,t){return d.default.system.deprecated("This method is deprecated and will be removed in a future release. Please use FSBL.Interop which provides channel linking automatically."),f("LinkerClient.createChannel","PARAMS",e),o.default.args(e,"object"),e.name?this.getChannel(e.name)?(h(`LinkerClient.createChannel: Channel ${e.name} Already Exists`),g(this.allChannels,t)):(this.allChannels.push(e),this.allGroups=this.allChannels,this.linkerStore.setValue({field:"channels",value:this.allChannels}),g(this.allChannels,t)):(h("LinkerClient.createChannel: Name is required"),g(this.allChannels,t))}removeChannel(e,t){if(f("LinkerClient.removeChannel","NAME",e),d.default.system.deprecated("This method is deprecated and will be removed in a future release. Please use FSBL.Interop which provides channel linking automatically."),o.default.args(e,"string"),!this.getChannel(e))return h(`Channel ${e}does not exist`,null),g(this.allChannels,t);const n=this.allChannels;for(let t=0;t<n.length;t++)if(e===n[t].name){n.splice(t,1);break}this.linkerStore.setValue({field:"channels",value:this.allChannels});const{clients:i}=this;for(const t in i){const n=i[t];for(const t in n.channels)if(e===t){delete n[t];break}}return this.linkerStore.setValue({field:"clients",value:this.clients}),g(this.allChannels,t)}updateClientInStore(e){this.linkerStore.setValue({field:`clients.${e}`,value:this.clients[e]})}linkToChannel(e,t,n){d.default.system.deprecated("This method is deprecated and will be removed in a future release. Please use FSBL.Interop which provides channel linking automatically."),f("LinkerClient.linkToChannel","CHANNEL",e,"COMPONENT",t),o.default.args(e,"string",t),t||(t=a.default.getWindowIdentifier());const i=p(t);if(this.clients[i]||(this.clients[i]={client:t,channels:{}}),Array.isArray(e))for(let t=0;t<e.length;t++)this.clients[i].channels[e[t]]=!0;else this.clients[i].channels[e]=!0;return this.updateClientInStore(i),g(this.getState(t),n)}unlinkFromChannel(e,t,n){d.default.system.deprecated("This method is deprecated and will be removed in a future release. Please use FSBL.Interop which provides channel linking automatically."),f("LinkerClient.unlinkFromChannel","CHANNEL",e,"WINDOW IDENTIFIER",t),o.default.args(e,"string",t),t||(t=a.default.getWindowIdentifier());const i=p(t),r=this.clients[i];if(Array.isArray(e))for(let t=0;t<e.length;t++)delete r.channels[e[t]];else if(e){if(!r||!r.channels[e]){const r=this.clients[i];return h(`Component was not in specified channel ${e}`,r,r.channels[e]),g(this.getState(t),n)}delete r.channels[e]}else for(const e in r.channels)delete r.channels[e];return this.updateClientInStore(i),g(this.getState(t),n)}getAllChannels(e){return f("LinkerClient.getAllChannels"),g(this.allChannels,e)}getState(e,t){f("LinkerClient.getState","WINDOW IDENTIFIER",e);const n={channels:[],allChannels:this.allChannels};if(e||(e=a.default.getWindowIdentifier()),!Object.keys(this.clients).length)return g(n,t);const i=p(e),r=this.clients[i];return r?(n.channels=this.allChannels.filter((e=>r.channels&&!0===r.channels[e.name])),d.default.system.debug("LINKER-3",this.allChannels,"state.channels",n.channels,"key",i,"windowIdentifier",e,"componentEntry",r),r.active||(r.active=!0,this.linkerStore.setValue({field:`clients.${i}`,value:r})),g(n,t)):g(n,t)}unsubscribe(e,t){d.default.system.deprecated("This method is deprecated and will be removed in a future release. Please use FSBL.Interop which provides channel linking automatically."),f("LinkerClient.unsubscribe","DATA TYPE",e),o.default.args(e,"string"),this.dataListenerList[e]&&(t?this.dataListenerList[e]=this.dataListenerList[e].filter((e=>e!==t)):delete this.dataListenerList[e])}publish(e,t){f("LinkerClient.publish","PARAMS",e),o.default.args(e.dataType,"string",e.data,"any");let{channels:n}=e;n||(n=Object.keys(this.channels));for(let t=0;t<n.length;t++){const i=n[t];this.routerClient.transmit(`${i}.${e.dataType}`,{type:e.dataType,data:e.data}),this.routerClient.transmit(i,{type:e.dataType,data:e.data})}return g({},t)}subscribe(e,t){d.default.system.deprecated("This method is deprecated and will be removed in a future release. Please use FSBL.Interop which provides channel linking automatically."),f("LinkerClient.subscribe","DATA TYPE",e),o.default.args(e,"string",t,"function"),this.dataListenerList[e]?this.dataListenerList[e].includes(t)||this.dataListenerList[e].push(t):this.dataListenerList[e]=[t]}getLinkedComponents(e,t){d.default.system.deprecated("This method is deprecated and will be removed in a future release. Please use FSBL.Interop which provides channel linking automatically."),f("LinkerClient.getLinkedComponents","PARAMS",e);const n=[];if(e||(e={}),e.channels&&!Array.isArray(e.channels)&&(o.default.args(e.channels,"string"),e.channels=[e.channels]),e.componentTypes&&!Array.isArray(e.componentTypes)&&(o.default.args(e.componentTypes,"string"),e.componentTypes=[e.componentTypes]),e.componentTypes&&o.default.args(e.componentTypes,"array"),e.windowIdentifier){const t=p(e.windowIdentifier),n=Object.keys(this.clients[t].channels);e.channels?e.channels=e.channels.filter((e=>n.includes(e))):e.channels=n}e.channels||(e.channels=this.getAllChannels().map((e=>e.name)));for(const t in this.clients){let i=this.clients[t];if(!i)continue;i.channels||(i=i[Object.keys(i)[0]]);const r=Object.keys(i.channels).filter((t=>{var n;return null===(n=null==e?void 0:e.channels)||void 0===n?void 0:n.includes(t)})).length;let o=!0;e.componentTypes&&(o=e.componentTypes.includes(i.client.componentType)),i.active&&r&&o&&n.push({windowName:i.client.windowName,componentType:i.client.componentType,uuid:i.client.uuid,channels:Object.keys(i.channels)})}return g(n,t)}updateListeners(){for(let e=this.channelListenerList.length-1;e>=0;e--){const t=this.channelListenerList[e];Object.keys(this.channels).filter((e=>e==t)).length||(this.routerClient.removeListener(t,this.handleListeners),this.channelListenerList.splice(e,1))}const e=Object.keys(this.channels);for(let t=0;t<e.length;t++){const n=e[t];this.channelListenerList.includes(n)||(this.routerClient.addListener(n,this.handleListeners),this.channelListenerList.push(n))}const t=this.getState();for(let e=0;e<this.stateChangeListeners.length;e++)this.stateChangeListeners[e](null,t)}onStateChange(e){this.stateChangeListeners.push(e)}persistState(e){a.default.setComponentState({field:"Finsemble_Linker",value:e})}clientsKeyValueChangeStoreListener(e,t){if(h("My Channels Updated"),!t.value)return;const n=t.value.channels||t.value.groups,i=(0,c.default)(n,this.channels);(n&&0!==Object.keys(n).length&&!i||0===Object.keys(n).length&&0!==Object.keys(this.channels).length)&&(this.persistState(n),this.channels=n,this.updateListeners())}anyFieldChangeStoreListener(e,t){const{values:n}=t.value;this.allChannels=n.channels,n.groups&&(this.allChannels=n.groups),d.default.system.debug("LINKER-2",this.allChannels),this.allGroups=this.allChannels,this.clients=n.clients}start(e){this.dontPersistYet=!0,h("LinkerClient Loading Channels");const t=a.default.getWindowIdentifier(),n=p(t);u.default.getStore({store:"Finsemble_Linker",global:!0},((i,r)=>{this.linkerStore=r,null==r||r.addListener({field:`clients.${n}`},this.clientsKeyValueChangeStoreListener),null==r||r.addListener({},this.anyFieldChangeStoreListener),null==r||r.getValues(["channels",`clients.${n}`],((i,r)=>{r&&r.channels&&(this.allChannels=r.channels,d.default.system.debug("LINKER-1",this.allChannels),this.allGroups=this.allChannels),a.default.getComponentState({field:"Finsemble_Linker"},((i,o)=>{var s;this.channels=[],this.clients[n]={client:t,active:!0,channels:{}},o?(this.channels=o,this.clients[n].channels=o):(null===(s=r[`clients.${n}`])||void 0===s?void 0:s.channels)&&(this.clients[n].channels=r[`clients.${n}`].channels),this.updateClientInStore(n);const l=a.default.getSpawnData();if(l&&l.linker){let e=l.linker.channels;l.linker.groups&&(e=l.linker.groups),this.linkToChannel(e,t)}else this.updateListeners();e()}))}))}))}hyperFocus(e){l.default.hyperFocus({windowList:this.getLinkedComponents({channels:e})})}bringAllToFront(e){const{channel:t}=e;l.default.bringWindowsToFront({windowList:this.getLinkedComponents({channels:t})})}createGroup(e,t){return this.createChannel(e,t)}deleteGroup(e,t){return this.removeChannel(e,t)}addToGroup(e,t,n){const i=this.linkToChannel(e,t);return n&&n(null,i),i}removeFromGroup(e,t,n){const i=this.unlinkFromChannel(e,t);return n&&n(null,i),i}getAllGroups(e){const t=this.getAllChannels();return e&&e(t),t}getGroups(e,t){const n=this.getState(e);return n.groups=n.channels,g(n,t)}unSubscribe(e,t){this.unsubscribe(e,t)}getLinkedWindows(e,t){return e||(e={}),e.groups=e.channels,e.windowIdentifier=e.client,this.getLinkedComponents(e,t)}windowIdentifier(e,t){return g(a.default.getWindowIdentifier(),t)}openLinkerWindow(e){if(o.default.args(e,"function"),this.loading)return;const t=()=>{this.routerClient.query("Finsemble.LinkerWindow.Show",{groups:this.getGroups().groups,windowIdentifier:a.default.getWindowIdentifier(),windowBounds:a.default.getWindowBounds()},(()=>{}))};this.linkerWindow?this.linkerWindow.isShowing((e=>{e?this.linkerWindow.hide():t()})):t()}}function w(e){return new m({clients:e=e||{},startupDependencies:{clients:["windowClient","launcherClient"]},onReady(e){h("Linker onReady"),setTimeout((()=>{(0,r.parallel)([e=>{y.start(e)},e=>{l.default.onReady(e)}],e)}),0)},name:"linkerClient"})}t.LinkerClient=m;const y=w();y.constructInstance=w,t.default=y},23712:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=n(21614),o=i(n(27361)),s=i(n(48406)),a=i(n(11314)),l=i(n(49136)),u=n(91374),d=i(n(2518)),c=n(26604),{REMOTE_FOCUS:f}=c.WINDOW_SERVICE_REQUESTS;l.default.initialize();const h=e=>(0,o.default)(e,"window.descriptor.isWPF",(0,o.default)(e,"descriptor.isWPF"));class p extends s.default{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){d.default.system.verbose("APPLICATION LIFECYCLE:Assimilation:onGetBoundsReturned",e.ref,e),a.default.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;"info"!==t&&"debug"!==t||(t="verbose"),"function"==typeof d.default.system[t]?d.default.system[t](`Assimilation EXE: ${n}`):d.default.system.warn(`Assimilation unable to log type ${t} from EXE. Defaulting to warn: ${n}`)}onNewApp(e){if(d.default.system.debug("APPLICATION LIFECYCLE:Assimilation:openNewApp",e),e.error&&!e.error.startsWith("The operation completed successfully"))return d.default.system.error(e.error);try{const t=JSON.parse(e.window),n=this.assimilationWindowManager.updateSpawningWindow(e.ref,t.uuid);this.assimilationWindowManager.handleSpawnComplete(n,t)}catch(e){d.default.system.error("No Window found. Either the executable path is wrong or it has no window")}}onCloseWindow(e){d.default.system.debug("APPLICATION LIFECYCLE:Assimilation:closeWindow",e)}onWindowStartMove(e){d.default.system.debug("APPLICATION LIFECYCLE:Assimilation:onWindowStartMove",e),e.uuid?this.assimilationWindowManager.setMovingWindow(this.assimilationWindowManager.getWindowByUUID(e.uuid)).setStartBounds(e):d.default.system.error("window is missing uuid",e)}onWindowMoveUpdate(e){d.default.system.debug("APPLICATION LIFECYCLE:Assimilation:onWindowMoveUpdate",e);const t=this.assimilationWindowManager.getMovingWindow();null==t||t.calculateWindowLocation(e),a.default.transmit(`AssimilationService.bounds-change-request.${null==t?void 0:t.window.name}`,Object.assign({},null==t?void 0:t.location))}onWindowMaximize(e){d.default.system.debug("APPLICATION LIFECYCLE:Assimilation:onWindowMaximize",e);const{uuid:t}=e.data?JSON.parse(e.data):e,n=this.assimilationWindowManager.getWindowByUUID(t);n&&n.maximize({fromAssimilation:!0})}onWindowMinimize(e){d.default.system.debug("APPLICATION LIFECYCLE:Assimilation:onWindowMinimize",e);const{uuid:t}=e.data?JSON.parse(e.data):e,n=this.assimilationWindowManager.getWindowByUUID(t);n&&(n.cachedLocation=n.location,n.minimize({fromAssimilation:!0}))}onWindowRestore(e){d.default.system.debug("APPLICATION LIFECYCLE:Assimilation:onWindowRestore",e);const{uuid:t}=e.data?JSON.parse(e.data):e,n=this.assimilationWindowManager.getWindowByUUID(t);n&&(n.state="restore",Date.now()-n.lastMinimized<this.assimilationWindowManager.assimilationHelper.manifest.eventIgnore||n.restore({fromAssimilation:!0}))}onWindowFocused(e){d.default.system.debug("APPLICATION LIFECYCLE:Assimilation:onWindowFocused",e);const t=JSON.parse(e.data),n=this.assimilationWindowManager.getWindowByUUID(t.uuid),i={name:n&&n.name||t.name,windowHandle:t.uuid};a.default.transmit(f,i),n&&setTimeout((()=>{"minimize"!==n.state&&(Date.now()-n.lastRestored<this.assimilationWindowManager.assimilationHelper.manifest.eventIgnore||n.focus({fromAssimilation:!0}))}),this.assimilationWindowManager.assimilationHelper.manifest.focusDelay)}onRemoveWindow(e){const t=JSON.parse(e.window);this.assimilationWindowManager.removeWindow(t.uuid,!0)}onWindowClicked(e){d.default.system.debug("APPLICATION LIFECYCLE:Assimilation:onWindowClicked",e);const t=JSON.parse(e.data);this.onWindowFocused(e);const n=this.assimilationWindowManager.getWindowByUUID(t.uuid);if(n&&!h(n)){if(this.keyboard[162]){const e=n.parentWindow?n.parentWindow.windowName:n.windowName;a.default.query("DockingService.getGroupObjectsForWindow",{name:e},((t,n)=>{let i=!1;for(let e=0;e<n.data.length;e++)if(n.data[e].isMovable){i=!0;break}return i?a.default.query("DockingService.leaveGroup",{name:e},(()=>{})):a.default.transmit("DockingService.formGroup",{windowName:e})}))}}else d.default.system.debug("APPLICATION LIFECYCLE:Assimilation:onWindowClicked no window found for window UUID",t.uuid)}onApplicationList(e){d.default.system.debug("APPLICATION LIFECYCLE:Assimilation:onApplicationList",e),this.assimilationWindowManager.parseApplicationList(e.list)}onLocationResponse(e){if(!e.window)return;const t=JSON.parse(e.window),n=this.assimilationWindowManager.getWindowByUUID(t.uuid);n&&a.default.transmit("DockingService.updateWindowLocation",{windowName:n.windowName,location:{left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top}})}onAddWindow(e){const t=JSON.parse(e.window);t.uuid&&(d.default.system.debug("Assimilation.AssimilationWindowManager.onAddWindow invoking addNativeWindow:",t),this.assimilationWindowManager.addNativeWindow(t))}onMoveEnd(e){d.default.system.info("moveEnd",e);const t=this.assimilationWindowManager.getMovingWindow();if(t){if(this.keyboard[162]&&!h(t)){if(t.window.grouped)return a.default.query("DockingService.leaveGroup",{name:t.window.windowName},(()=>{}));a.default.transmit("DockingService.formGroup",{windowName:t.window.windowName})}e.location=t.window.location,a.default.transmit(`${t.window.name}.endMovement`,e),this.assimilationWindowManager.saveWindow({data:{key:t.window.uuid,location:t.window.location}})}}onKeyUp(e){d.default.system.debug("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),a.default.transmit("finsemble.assimilation.keyup",{key:e.key})}onKeyDown(e){d.default.system.debug("APPLICATION LIFECYCLE:Assimilation:onKeyDown",e),e.key=Number(e.key),this.keyboard[e.key]&&clearTimeout(this.keyboard[e.key]),this.keyboard[e.key]=setTimeout((()=>this.onKeyUp(e)),this.manifest.hotkeyTimeout),160===e.key&&(self.shift=!0),a.default.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){d.default.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(){d.default.system.log("APPLICATION LIFECYCLE:Assimilation:onSocketClosed"),this.connect()}onSocketOpened(){d.default.system.log("APPLICATION LIFECYCLE:Assimilation:onSocketOpened"),clearTimeout(this.wsConnectionFailureTimeout),this.onSocketConnected()}setThrottle(e){d.default.system.log("APPLICATION LIFECYCLE:Assimilation:enable move throttle",e),this.send(this.prepareAction({topic:"throttle",throttle:e}))}enableAppHooks(){d.default.system.info("APPLICATION LIFECYCLE:Assimilation:Enable Assimilation hooks"),this.send(this.prepareAction({topic:"enableHooks",data:{whitelist:[],blacklist:[]}}))}connect(e){d.default.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"),d.default.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=(0,r.v4)();e.ref=t;const n=JSON.stringify(e);return e.expiry=Date.now()+3e3,n}getMonitorInfo(){d.default.system.debug("APPLICATION LIFECYCLE:Assimilation:getMonitorInfo"),u.System.getMonitorInfo((e=>{this.send(JSON.stringify({topic:"monitorInfo",data:e}))}))}setMonitorInfo(e){d.default.system.debug("APPLICATION LIFECYCLE:Assimilation:setMonitorInfo"),this.send(JSON.stringify({topic:"monitorInfo",data:e}))}getApplicationList(){this.send(this.prepareAction({topic:"applicationList"}))}}t.default=p},48406:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=n(17187),o=i(n(2518));class s extends r.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}o.default.system.debug("Assimilation connecting to :",`ws://127.0.0.1:${this.port}`);const e=this.ws=new WebSocket(`ws://127.0.0.1:${this.port}`);e.onopen=()=>{o.default.system.debug("Assimilation connected to socket"),this.emit("socketOpen")},e.onerror=e=>{this.emit("socketError",e)},e.onmessage=e=>{let t;try{if(t=JSON.parse(e.data),!t.topic)return;return this.emit(t.topic,t)}catch(t){o.default.system.error("Assimilation:Socket.onMessage:err:",t,e)}},e.onclose=()=>{this.emit("socketClosed"),o.default.system.log("SERVICE LIFECYCLE:Web socket closed")}}send(e){(!this.ws||this.ws.readyState>1)&&this.connect(),this.ws&&1===this.ws.readyState?this.ws.send(e):this.on("socketOpen",(()=>this.send(e)))}}t.default=s},44709:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n={x:-1,y:-1},i={left:-1,top:-1,bottom:-1,right:-1,x:-1,y:-1,width:-1,height:-1,resizeType:"None"},r={top:-1,left:-1};t.default=class{constructor(e){this.edge=null,this.direction="None",this.window=e,this.mouseLocation=n,this.mouseOffset=r,this.startBounds=i,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,i,{left:r,right:o=0,top:s,bottom:a=0}=this.location,l=0;if(this.edge){switch(l=1,this.edge){case"left":r=t.x;break;case"right":o=t.x;break;case"top":s=t.y;break;case"bottom":a=t.y;break;case"top-left":r=t.x,s=t.y;break;case"top-right":o=t.x,s=t.y;break;case"bottom-left":r=t.x,a=t.y;break;case"bottom-right":o=t.x,a=t.y}i=o-r,n=a-s}else r=t.x-Number(this.mouseOffset.left),s=t.y-Number(this.mouseOffset.top),a=Number(a)-(t.y-this.mouseLocation.y),o=Number(o)-(t.x-this.mouseLocation.x),n=Number(this.location.height),i=Number(this.location.width);const u=this.location;return u.changeType=l,u.left=Number(r),u.top=Number(s),u.bottom=Number(a),u.right=Number(o),u.height=Number(n),u.width=Number(i),this.mouseLocation=t,this.location=u,u}getResizeEdge(e,t,n){if("None"===n)return null;let i=null;switch(n){case"WE":i=Math.abs(t.x-e.left)<Math.abs(t.x-e.right)?"left":"right";break;case"NS":i=Math.abs(t.y-e.bottom)<Math.abs(t.y-e.top)?"bottom":"top";break;case"NESW":i=Math.abs(t.y-e.top)<Math.abs(t.y-e.bottom)?"top-right":"bottom-left";break;case"NWSE":i=Math.abs(t.y-e.top)<Math.abs(t.y-e.bottom)?"top-left":"bottom-right"}return i}}},1918:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.serviceInstance=void 0;const r=i(n(27361)),o=n(25478),s=i(n(11314)),a=i(n(5395)),l=i(n(9381)),u=i(n(49136)),d=n(64324),c=i(n(16994)),f=n(24074),h=i(n(2518)),p=i(n(47913)),g=n(91374),m=i(n(84795)),w=i(n(89554)),y=i(n(71688)),v=i(n(23712));p.default.initialize(),u.default.initialize(),l.default.initialize(),a.default.initialize(),h.default.start();class b extends o.BaseService{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=s.default,this.load=this.load.bind(this),this.getApplicationList=this.getApplicationList.bind(this),this.onBaseServiceReady((async e=>{h.default.system.debug("assimilation.onBaseServiceReady"),g.System.getFEAInfo((e=>{this.version=e.FEA})),s.default.addPubSubResponder(/.*humanInterface.*/,{}),m.default.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.substr(t.length-8),t}createRouterEndpoints(){s.default.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)})),s.default.addResponder("Assimilation.alwaysOnTop",((e,t)=>{this.assimilationWindowManager.alwaysOnTop(t),null==t||t.sendQueryResponse(null,null)})),s.default.addResponder("Assimilation.moveWindow",((e,t)=>{this.assimilationWindowManager.moveWindow(null==t?void 0:t.data,this.ws),null==t||t.sendQueryResponse(null,null)})),s.default.addListener("Assimilation.saveWindow",((e,t)=>{this.assimilationWindowManager.saveWindow(t)})),s.default.addResponder("Assimilation.showWindow",((e,t)=>{this.assimilationWindowManager.showWindow(t),null==t||t.sendQueryResponse(null,null)})),s.default.addResponder("Assimilation.maximizeWindow",((e,t)=>{this.assimilationWindowManager.maximizeWindow(t),null==t||t.sendQueryResponse(null,null)})),s.default.addResponder("Assimilation.restoreWindow",((e,t)=>{this.assimilationWindowManager.restoreWindow(t),null==t||t.sendQueryResponse(null,null)})),s.default.addResponder("Assimilation.minimizeWindow",((e,t)=>{this.assimilationWindowManager.minimizeWindow(t),null==t||t.sendQueryResponse(null,null)})),s.default.addResponder("Assimilation.hideWindow",((e,t)=>{this.assimilationWindowManager.hideWindow(t),null==t||t.sendQueryResponse(null,null)})),s.default.addResponder("Assimilation.dockWindow",((e,t)=>{this.assimilationWindowManager.dockWindow(t),null==t||t.sendQueryResponse(null,null)})),s.default.addResponder("Assimilation.undockWindow",((e,t)=>{this.assimilationWindowManager.undockWindow(t),null==t||t.sendQueryResponse(null,null)})),s.default.addResponder("Assimilation.bringToFront",((e,t)=>{this.assimilationWindowManager.bringToFront(t),null==t||t.sendQueryResponse(null,null)})),s.default.addResponder("Assimilation.closeWindow",((e,t)=>{this.assimilationWindowManager.closeWindow(t)})),s.default.addListener("Assimilation.hookWindowByHandle",((e,t)=>{this.assimilationWindowManager.updateSpawningWindowFromWindowObject(t)})),s.default.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()}`;s.default.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})})),s.default.addResponder("Assimilation.spawnNative",((e,t)=>{t&&this.spawnAsset(this.constructNativeWindowParams(t),(()=>{null==t||t.sendQueryResponse(e,!0)}))})),s.default.addListener("Assimilation.windowClosed",((e,t)=>{console.log("Window closed!!!",t),h.default.system.debug("APPLICATION LIFECYCLE:Assmilation:windowClosed",t)})),s.default.addListener("Finsemble.Assimilation.register",((e,t)=>{var n,i,r,o,a,l;const u=null==t?void 0:t.data,d=this.assimilationWindowManager.awaitingAssimilationSpawn;let c=!0;for(const e in d)if(d[e].name==u.windowName){if(c=!1,u.windowHandle){const t=this.convertHandle(u.windowHandle),s=this.assimilationWindowManager.updateSpawningWindow(e,t),d={left:null===(n=s.descriptor)||void 0===n?void 0:n.left,top:null===(i=s.descriptor)||void 0===i?void 0:i.top,right:null===(r=s.descriptor)||void 0===r?void 0:r.right,bottom:null===(o=s.descriptor)||void 0===o?void 0:o.bottom,width:null===(a=s.descriptor)||void 0===a?void 0:a.width,height:null===(l=s.descriptor)||void 0===l?void 0:l.height};this.assimilationWindowManager.handleSpawnComplete(s,d)}else{const t=this.assimilationWindowManager.updateSpawningWindow(e,null);this.assimilationWindowManager.handleSpawnComplete(t,null)}break}if(c){const e=`${Date.now()}_${Math.random()}`;u.windowHandle&&s.default.query("Finsemble.NewNativeWindow",{appUUID:e,name:u.windowName,windowType:"NativeWindow"},(async()=>{const{wrap:t}=await f.FinsembleWindow.getInstance({name:u.windowName}),n=this.convertHandle(u.windowHandle);t.uuid=n,t.outsideOfFinsemble=!0,this.assimilationWindowManager.activeWindows[n]=t,s.default.addListener(`${e}-Assimilation.boundsUpdate`,((e,n)=>{this.assimilationWindowManager.handleSpawnComplete(t,null==n?void 0:n.data)}));const{bounds:i}=u;i?this.assimilationWindowManager.handleSpawnComplete(t,i):this.assimilationWindowManager.sendSocketMessage(JSON.stringify({ref:e,uuid:t.uuid,topic:"getBounds"}))}))}}))}shouldHideTitleBar(e,t){var n;return!!e||(0,r.default)(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||(0,r.default)(t,"customData.window.argumentsAsQueryString");return t.hideTitleBar=this.shouldHideTitleBar(n,t),n&&(t=Object.assign({params:t},this.getArgumentsWPF(e)),t.spawnDefaultViewer=!0),this.constructPath(t),t}getArgumentsWPF(e){const t=Object.assign({},e.data);t.generatedArguments=t.arguments||"",this.uuidByName[t.name]||(this.uuidByName[t.name]=`uuid${Date.now()}_${Math.round(1e4*Math.random())}`);const n=new Map([["finsembleWindowName",t.name],["componentType",t.customData.component.type],["uuid",this.uuidByName[t.name]],["left",t.defaultLeft],["top",t.defaultTop],["width",t.defaultWidth],["height",t.defaultHeight],["iac",!0],["serverAddress",this.serverAddress]]);return t.path&&t.customData.window.argumentsAsQueryString?n.forEach(((e,n)=>{t.generatedArguments=`${t.generatedArguments}&${n}=${e}`})):n.forEach(((e,n)=>{t.generatedArguments=`${t.generatedArguments} "${n}=${e}"`})),t.alias||t.path||(t.path=t.customData.window.path,t.alias=t.customData.window.alias),t.componentType=t.customData.component.type,this.configCache[t.name]=t,t}constructPath(e){if(void 0===e.path||e.customData&&e.customData.window&&!1===Boolean(e.customData.window.argumentsAsQueryString))return;const t=new URL(e.path),n=new URLSearchParams(e.generatedArguments),i=new URLSearchParams("");[...t.searchParams.entries(),...n.entries()].forEach((function(e){i.append(e[0],e[1])})),t.search=i.toString(),e.generatedPath=t.toString(),e.generatedArguments=""}launchAssimilationExe(){g.System.launchExternalProcess({alias:"assimilation",arguments:`PORT=${this.port}`,listener:e=>{"exited"===e.topic?(h.default.system.log("APPLICATION LIFECYCLE:Exited Assimilation Process",e),h.default.system.debug("APPLICATION LIFECYCLE:Exited Assimilation Process")):(h.default.system.log("APPLICATION LIFECYCLE:Running Assimilation Process",e),h.default.system.debug("APPLICATION LIFECYCLE:Running Assimilation Process"))}},(e=>{h.default.system.log("APPLICATION LIFECYCLE:Assimilation process successfully launched"),h.default.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 l.default.getManifest();if(!t&&n){this.fullManifest=n;const t=null==n?void 0:n.finsemble.services.assimilationService.config,i=null==n?void 0:n.finsemble.servicesConfig.assimilation,r=null==n?void 0:n.finsemble.betaFeatures.assimilation;r&&h.default.system.error("Assimilation is no longer a beta feature. Move assimilation under serviceConfigs."),this.assimilationManifest=Object.assign(t,i||r),this.appAssets=null!==(e=null==n?void 0:n.appAssets)&&void 0!==e?e:null,this.assimilationHelper=new y.default({appAssets:null==n?void 0:n.appAssets,manifest:this.assimilationManifest}),this.assimilationWindowManager=new w.default(this.assimilationHelper);const o="ws://127.0.0.1:3376";this.serverAddress=d.ConfigUtilInstance.getDefault(n,"fullManifest.finsemble.router.transportSettings.FinsembleTransport.serverAddress",o)}}async load(){var e,t,n;h.default.system.debug("APPLICATION LIFECYCLE:Assimilation:load");const i=this;await this.getAllConfigs();const o=this.assimilationManifest;if((null==o?void 0:o.port)&&(this.port=o.port),!o.enabled)return h.default.system.log("APPLICATION LIFECYCLE:Assimilation Not Enabled"),!1;if(-1==navigator.platform.indexOf("Win"))return h.default.system.warn("APPLICATION LIFECYCLE:Assimilation disabled due to incompatible platform",navigator.platform),!1;h.default.system.debug("APPLICATION LIFECYCLE:Assimilation: Is Enabled");const s=(e,t)=>{const n=d.ConfigUtilInstance.getDefault(i.fullManifest,"manifest.finsemble.notificationURL",`${i.fullManifest.finsemble.moduleRoot}/components/system/notification/notification.html`);c.default.alert("dev","ONCE-SINCE-STARTUP",e,t,{url:n}),h.default.system.error("APPLICATION LIFECYCLE:Assimilation Error:",e,t)},a=null===(e=this.assimilationHelper)||void 0===e?void 0:e.findAssetByAlias("assimilation");return a?this.compareVersion("3.6.0",a.version)<0?(s("assimilationService-bad-version",`This version of ${(null===(n=null===(t=this.fullManifest)||void 0===t?void 0:t.startup_app)||void 0===n?void 0:n.name)||"Finsemble"} requires assimilation version >= 3.6.0. Check your manifest.`),!1):(this.assimilationWindowManager.setFloatingTitlebar((0,r.default)(i.fullManifest,"finsemble.Window Manager.floatingTitlebarComponent","floatingTitlebar")),this.createRouterEndpoints(),h.default.system.log("APPLICATION LIFECYCLE:Assimilation Enabled"),this.launchAssimilationExe(),!0):(s("assimilationService-not-found","Could not find assimilation asset. Ensure that appAssets is properly formatted in your application's manifest."),!1)}onLoggerStateChanged(e){var t,n;let i={topic:"onLogLevel"};["Error","Warn","Info","Log","Debug"].forEach((t=>{i[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(i)))}socketConnectionHandler(e){var t,n,i;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===(i=this.assimilationManifest)||void 0===i?void 0:i.throttle:20)):this.notifyAssimilationLaunchFailure(e.error),this.onLoggerStateChanged(h.default.setting()),this.readyFunction&&this.readyFunction()}notifyAssimilationLaunchFailure(e){h.default.system.error("Assimilation.launchAssimilationExe Error:",e),l.default.setValue({field:"finsemble.servicesConfig.servicesConfig.assimilation.enabled",value:!1}),a.default.onReady((()=>{const e=new a.default.Notification,t=new a.default.Action;t.buttonText="Dismiss",t.type=a.default.ActionTypes.DISMISS,e.title="Critical Failure in Assimilation Service",e.details="Assimilation failed To launch. Native applications will not work. Check the Central Logger for additional details.",e.actions=[t],a.default.notify(e)}))}connectSockets(){var e;(null===(e=this.assimilationManifest)||void 0===e?void 0:e.port)&&(this.port=this.assimilationManifest.port),this.ws=new v.default(this.assimilationManifest,this.assimilationWindowManager),this.ws.connect(this.socketConnectionHandler.bind(this)),void 0!==h.default.onStateChanged&&h.default.onStateChanged((e=>{this.onLoggerStateChanged(e)}))}compareVersion(e,t){if(!e)return 1;if(!t)return-1;const n=e.split("."),i=t.split(".");for(let e=0;e<Math.max(n.length,i.length);e++){if(e==n.length&&e==i.length)return 0;if(e>=i.length)return-1;if(e>=n.length)return 1;const t=parseInt(n[e]),r=parseInt(i[e]);if(t>r)return-1;if(r>t)return 1}return 0}spawnAsset(e,t){const n={name:e.name,uuid:e.uuid,componentType:e.componentType,windowType:"NativeWindow",waitForReady:!1};return f.FinsembleWindow.getInstance(n,((n,i)=>(e.minWidth=e.minWidth&&e.minWidth>100?e.minWidth:100,e.minHeight=e.minHeight&&e.minHeight>25?e.minHeight:25,e.maxWidth=e.maxWidth&&e.maxWidth>100?e.maxWidth:1/0,e.maxHeight=e.maxHeight&&e.maxHeight>25?e.maxHeight:1/0,e.maxWidth<e.defaultWidth&&(e.defaultWidth=e.maxWidth),e.minWidth>e.defaultWidth&&(e.defaultWidth=e.minWidth),e.maxHeight<e.defaultHeight&&(e.defaultHeight=e.maxHeight),e.minHeight>e.defaultHeight&&(e.defaultHeight=e.minHeight),i.descriptor=e,this.assimilationWindowManager.spawnWindow(i,this.ws),t())))}getApplicationList(){this.ws&&this.ws.getApplicationList()}}t.serviceInstance=new b("assimilationService")},89554:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=n(21614),o=i(n(27361)),s=i(n(2518)),a=i(n(49136)),l=i(n(2740)),u=n(24074),d=n(91374),c=i(n(11314)),f=i(n(44709)),h=i(n(84795)),p=n(43762);a.default.initialize(),t.default=class{constructor(e){this.assimilationHelper=e,this.activeWindows={},this.awaitingAssimilationSpawn={},this.awaitingSpawn={},this.allWindows={},this.movingWindow=null,this.floatingTitlebar=null,this.updateActiveWindowHeartbeats(),this.dockedToolbarOnStart=!1}setWebsocket(e){this.ws=e}sendSocketMessage(e){if(!this.ws)return setTimeout((()=>{this.sendSocketMessage(e)}),100);this.ws.send(e)}setMovingWindow(e){return s.default.system.debug("Assimilation.AssimilationWindowManager.setMovingWindow",e),this.movingWindow=new f.default(e)}getMovingWindow(){return s.default.system.debug("Assimilation.AssimilationWindowManager.getMovingWindow"),this.movingWindow}getWindowByUUID(e){return s.default.system.debug("Assimilation.AssimilationWindowManager.getWindowByUUID:",e),this.activeWindows[e]}getWindowByName(e){s.default.system.debug("Assimilation.AssimilationWindowManager.getWindowByName:",e);const t=Object.keys(this.activeWindows);for(let n=0;n<t.length;n++){const i=this.activeWindows[t[n]];if(i.windowName===e)return i}}updateSpawningWindow(e,t){s.default.system.debug("Assimilation.AssimilationWindowManager.updateSpawningWindow:",e,t);const n=this.awaitingAssimilationSpawn[e];if(n)return t||(n.windowLess=!0,t=e),n.uuid=t,this.activeWindows[t]=n,delete this.awaitingAssimilationSpawn[e],n}updateSpawningWindowFromWindowObject(e){const t=e.data,n={name:e.data.name,windowType:"FinsembleNativeWindow"};return u.FinsembleWindow.getInstance(n,(async(e,n)=>{n&&n.descriptor&&(n.descriptor.hideTitleBar=!0),n.uuid=parseInt(t.windowHandle,10).toString(16),this.activeWindows[n.uuid]=n;const i=await n.getBounds();i.data&&this.handleSpawnComplete(n,i.data)}))}handleSpawnComplete(e,t){if(s.default.system.debug("Assimilation.AssimilationWindowManager.handleSpawnComplete:",e,t),!e)return s.default.system.error("no window reference found");const n=(0,o.default)(e,"descriptor.customData.foreign.services.windowService.manageWindowMovement",!0);t&&n&&this.assimilationHelper.canHookWindow(e)&&(e.location=t,e.setBounds({bounds:t}),e.onReady((()=>{c.default.transmit(`${e.name}.endMovement`,{location:e.location})}))),this.registerWindow(e,e)}addNativeWindow(e){s.default.system.debug("Assimilation.AssimilationWindowManager.addNativeWindow:",e),this.allWindows[e.uuid]=e;let t=this;t.assimilationHelper.canHookWindow(e)&&(s.default.system.debug("Assimilation.AssimilationWindowManager.addNativeWindow: executableInConfig",e),this.assimilationHelper.executableInConfig(e,((n,i)=>{i||(e.windowName=e.name,a.default._createWrap({name:e.uuid},((n,i)=>{n&&s.default.system.error("Error inside of createWrap:",n),u.FinsembleWindow.getInstance(i.data,((n,i)=>{if(n)return s.default.system.error("Could not create wrap for window",e);t.activeWindows[e.uuid]=i,i.uuid=e.uuid;const{top:r,left:o,right:a,bottom:l}=e,u={top:r,left:o,width:a-o,height:l-r};t.handleSpawnComplete(i,u)}))})))})))}moveWindow(e){if(s.default.system.debug("Assimilation.AssimilationWindowManager.moveWindow:",e),console.log(e),!e.location)return;if(!e.name)return;let t=this.getWindowByUUID(e.key);if(!t){if(t=this.getWindowByName(e.name),!t)return void s.default.system.error("MoveWindow - could not find window. Name:",e.name,"Handle:",e.key);s.default.system.warn("MoveWindow - Could not find window by UUID, but did find window by name. Name:",e.name,"Handle:",e.key)}e.location.width=Math.round(e.location.width),e.location.bottom=Math.round(e.location.bottom),e.location.height=Math.round(e.location.height),e.location.left=Math.round(e.location.left),e.location.right=Math.round(e.location.right),isNaN(e.location.left)||(isNaN(e.location.height)&&(e.location.height=e.location.bottom-e.location.top,e.location.width=e.location.right-e.location.left),t.location=Object.assign({},e.location),this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"moveWindow",uuid:t.uuid,windowId:t.uuid,location:e.location})))}showWindow(e){if(s.default.system.debug("Assimilation.AssimilationWindowManager.showWindow:",e),e.data.name){const t=this.getWindowByName(e.data.name);e.data.key=t.uuid}this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"showWindow",uuid:e.data.key,windowId:e.data.key}))}hideWindow(e){if(s.default.system.debug("Assimilation.AssimilationWindowManager.hideWindow:",e),e.data.name){const t=this.getWindowByName(e.data.name);e.data.key=t.uuid}this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"hideWindow",uuid:e.data.key,windowId:e.data.key}))}dockWindow(e){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){s.default.system.debug("Assimilation.AssimilationWindowManager.closeWindow:",e);const t=this.getWindowByName(e.data.name);t&&(t.windowLess?(c.default.transmit(`Finsemble.Assimilation.close.${t.windowName}`,{}),t.queryResponder=e.sendQueryResponse,this.removeWindow(t.uuid,!1)):t.spawnedByFea?this._closeSpawned(t.finUUID,e.sendQueryResponse):(t.queryResponder=e.sendQueryResponse,this._closeAssimilationSpawned(t.uuid)))}_closeAssimilationSpawned(e){s.default.system.debug("Assimilation.AssimilationWindowManager._closeAssimilationSpawned:",e),this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"closeWindow",uuid:e,windowId:e})),setTimeout((()=>{this.getWindowByUUID(e)&&this._closeAssimilationSpawned(e)}),1e3)}_closeSpawned(e,t){s.default.system.debug("Assimilation.AssimilationWindowManager._closeSpawned:",e),d.System.terminateExternalProcess(e,0,(e=>{t&&t(null,null),s.default.system.debug("Assimilation window closed:",e)}),(e=>{t&&t(null,null),s.default.system.error("Assimilation window closed error:",e)}))}closeAllWindows(e){s.default.system.debug("Assimilation.AssimilationWindowManager.closeAllWindows:",e),Object.keys(this.activeWindows).forEach((e=>{c.default.transmit("LauncherService.shutdownResponse",{waitForMe:!1,name:this.activeWindows[e].windowName}),this.removeWindow(e,!1),this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"closeWindow",uuid:e,windowId:e}))}))}bringToFront(e){var t;let n;if(s.default.system.debug("Assimilation.AssimilationWindowManager.bringToFront:",e),e.data.name){if(n=this.getWindowByName(e.data.name),!n)return void console.log("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){s.default.system.debug("Assimilation.AssimilationWindowManager.minimizeWindow:",e);const t=this.getWindowByName(e.data.name);e.data.name&&(e.data.key=t.uuid),t.state="minimize",t.lastMinimized=Date.now(),this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"minimize",uuid:e.data.key,windowId:e.data.key}))}maximizeWindow(e){if(s.default.system.debug("Assimilation.AssimilationWindowManager.maximizeWindow:",e),e.data.name){const t=this.getWindowByName(e.data.name);e.data.key=t.uuid,t.state="maximize"}this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"maximize",uuid:e.data.key,windowId:e.data.key}))}restoreWindow(e){if(s.default.system.debug("Assimilation.AssimilationWindowManager.restoreWindow:",e),e.data.name){const t=this.getWindowByName(e.data.name);e.data.key=t.uuid,t.state="restore"}this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"restore",uuid:e.data.key,windowId:e.data.key})),c.default.transmit(`${e.data.name}.restored`,{})}alwaysOnTop(e){let t;t=e.data.name&&!e.data.key?this.getWindowByName(e.data.name):this.getWindowByUUID(e.data.key),(t||e.data.key)&&(s.default.system.debug("Assimilation.AssimilationWindowManager.alwaysOnTop:",e),this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"alwaysOnTop",uuid:e.data.key||t.uuid,alwaysOnTop:e.data.alwaysonTop})),t.descriptor&&t.descriptor.alwaysOnTop!==e.data.alwaysonTop&&t.updateOptions({alwaysOnTop:e.data.alwaysonTop},Function.prototype))}removeWindow(e,t){s.default.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):n.close({fromAssimilation:!0,removeFromWorkspace:t}),delete this.activeWindows[e],delete this.allWindows[e],c.default.query("Launcher.removeComponent",{name:n.windowName},(()=>{}))}parseApplicationList(e){s.default.system.debug("Assimilation.AssimilationWindowManager.parseApplicationList:",e);const t=JSON.parse(e);this.checkForRemoved(t);for(let e=0;e<t.length;e++){const n=t[e];this.allWindows[n.uuid]||(s.default.system.debug("Assimilation.AssimilationWindowManager.parseApplicationList invoking addNativeWindow:",n),this.addNativeWindow(n))}}checkForRemoved(e){s.default.system.debug("Assimilation.AssimilationWindowManager.checkForRemoved:",e);let t=!1;for(const n in this.allWindows)if(t=!1,!this.allWindows[n].windowLess){for(let i=0;i<e.length;i++)if(e[i].uuid===this.allWindows[n].uuid){t=!0;break}t||(this.activeWindows[n]&&this.activeWindows[n].unRegisterWithDocking(),delete this.activeWindows[n],delete this.allWindows[n])}}registerWindow(e,t){var n,i,r,o;s.default.system.debug("Assimilation.AssimilationWindowManager.registerWindow:",t.windowName,e,t),e.name=t.windowName;const a={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===(i=t.descriptor)||void 0===i?void 0:i.minHeight)||0,maxWidth:(null===(r=t.descriptor)||void 0===r?void 0:r.maxWidth)||1/0,maxHeight:(null===(o=t.descriptor)||void 0===o?void 0:o.maxHeight)||1/0}};let l=`Finsemble.${t.windowName}.wrapReady`,u=c.default.subscribe(l,((n,i)=>{t.wrapState="ready",t.initializeWindow({identifier:a,manageWindowMovement:Boolean(e.location)}),i.data&&i.data.name===a.name&&"closed"!==i.data.state&&(c.default.transmit(`${e.name}.onSpawned`,a),h.default.publishBootStatus(t.componentType,"components","completed"),c.default.unsubscribe(u))}));e.location&&this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"hookWindow",uuid:t.uuid}))}unRegisterAllWindows(){if(s.default.system.debug("Assimilation.AssimilationWindowManager.unRegisterAllWindows:"),Object.keys(this.activeWindows).length>0)for(const e in this.activeWindows)this.activeWindows[e].unRegisterWithDocking();this.activeWindows={}}spawnWindow(e){s.default.system.debug("Assimilation.AssimilationWindowManager.spawnWindow:",e);const t=this.assimilationHelper.manifest.useFeaSpawn,n=e.descriptor.customData.window.hasOwnProperty("useFeaSpawn")?e.descriptor.customData.window.useFeaSpawn:t;if(e.descriptor.alias)return n?this._spawnByAlias(e):this._SpawnByAlias(e);n?this._spawnByPathThroughContainer(e):this._spawnByPath(e)}async saveWindow(e){s.default.system.debug("Assimilation.AssimilationWindowManager.saveWindow:",e);const t=this.getWindowByUUID(e.data.key);if(t&&(e.data.location&&(t.location=e.data.location,t.location.width||(t.location.width=t.location.right-t.location.left),t.location.height||(t.location.height=t.location.bottom-t.location.top),t.descriptor.defaultLeft=t.location.left,t.descriptor.defaultTop=t.location.top,t.descriptor.defaultWidth=t.location.width,t.descriptor.defaultHeight=t.location.height,t.descriptor.defaultRight=t.location.left+t.location.width,t.descriptor.defaultBottom=t.location.top+t.location.height,t.descriptor.left=t.location.left,t.descriptor.top=t.location.top,t.descriptor.width=t.location.width,t.descriptor.height=t.location.height,t.descriptor.right=t.descriptor.defaultRight,t.descriptor.bottom=t.descriptor.defaultBottom),t.descriptor.cacheLocation=t.restoreBounds,e.data.options&&e.data.options.autoShow&&(t.descriptor.autoShow=e.data.options.autoShow),t.descriptor=Object.assign(t.descriptor,e.data),t.descriptor.customData&&delete t.descriptor.customData.manifest,delete t.descriptor.url,!t.outsideOfFinsemble)){const e=await p.BaseWindow.cleanupState(t.descriptor);await l.default._setWindowState({windowName:t.descriptor.name,state:{windowData: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&&c.default.transmit("Finsemble.heartbeat",{type:"component",windowName:t.windowName})}}),1e3)}_spawnByPath(e){console.log(`Spawning ${e.name}`),s.default.system.debug("Assimilation.AssimilationWindowManager._spawnByPath:",e);const t=(0,r.v4)();e.ref=t,this.awaitingAssimilationSpawn[t]=e;const n={topic:"openNewApp",env:e.descriptor.env,path:e.descriptor.generatedPath||e.descriptor.path,arguments:e.descriptor.generatedArguments||e.descriptor.arguments,autoShow:!e.descriptor.hasOwnProperty("autoShow")||e.descriptor.autoShow,alwaysOnTop:!!e.descriptor.hasOwnProperty("alwaysOnTop")&&e.descriptor.alwaysOnTop,spawnDefaultViewer:!!e.descriptor.hasOwnProperty("spawnDefaultViewer")&&e.descriptor.spawnDefaultViewer,ref:t,location:{left:e.descriptor.defaultLeft,top:e.descriptor.defaultTop,height:e.descriptor.defaultHeight,width:e.descriptor.defaultWidth},windowTitleWhiteList:(0,o.default)(e,"descriptor.customData.window.windowTitleWhiteList"),windowTitleBlackList:(0,o.default)(e,"descriptor.customData.window.windowTitleBlackList"),windowSpawnTimeout:(0,o.default)(e,"descriptor.customData.window.windowSpawnTimeout")};this.sendSocketMessage(JSON.stringify(n))}_SpawnByAlias(e){s.default.system.debug("Assimilation.AssimilationWindowManager._SpawnByAlias:",e);const t=(0,r.v4)();e.ref=t,this.awaitingAssimilationSpawn[t]=e;const n=this.assimilationHelper.findAssetByAlias(e.descriptor.alias||e.descriptor.generatedPath||e.descriptor.path);if(!n)return s.default.system.error("The alias or path for this asset is missing");const i={topic:"openAssetApp",alias:n.alias,env:e.descriptor.env,arguments:e.descriptor.generatedArguments||e.descriptor.arguments,version:n.version,target:n.target,autoShow:!e.descriptor.hasOwnProperty("autoShow")||e.descriptor.autoShow,spawnDefaultViewer:!!e.descriptor.hasOwnProperty("spawnDefaultViewer")&&e.descriptor.spawnDefaultViewer,ref:t,location:{left:e.descriptor.defaultLeft,top:e.descriptor.defaultTop,height:e.descriptor.defaultHeight,width:e.descriptor.defaultWidth},windowTitleWhiteList:(0,o.default)(e,"descriptor.customData.window.windowTitleWhiteList"),windowTitleBlackList:(0,o.default)(e,"descriptor.customData.window.windowTitleBlackList"),windowSpawnTimeout:(0,o.default)(e,"descriptor.customData.window.windowSpawnTimeout")};this.sendSocketMessage(JSON.stringify(i))}_spawnByPathThroughContainer(e){s.default.system.debug("Assimilation.AssimilationWindowManager._spawnByPath:",e);const t=(0,r.v4)();e.ref=t,e.spawnedByFea=!0,this.awaitingSpawn[t]=e,d.System.launchExternalProcess({path:e.descriptor.generatedPath||e.descriptor.path,arguments:e.descriptor.generatedArguments||e.descriptor.arguments,listener:t=>{"exited"===t.topic?(this.removeWindow(e.uuid,!0),s.default.system.log("Assimilation.AssimilationWindowManager:Exited External Process",t)):s.default.system.log("Assimilation.AssimilationWindowManager:Running External Process",t)}},(t=>{e.finUUID=t.uuid}),(e=>{s.default.system.error("Error in spawnByPath",e)}))}_spawnByAlias(e){s.default.system.debug("Assimilation.AssimilationWindowManager._spawnByAlias:",e);const t=(0,r.v4)();e.ref=t,e.spawnedByFea=!0,e.appAsset=this.assimilationHelper.findAssetByAlias(e.descriptor.alias),this.awaitingSpawn[t]=e,d.System.launchExternalProcess({alias:e.descriptor.alias,arguments:e.descriptor.generatedArguments||e.descriptor.arguments,listener:t=>{"exited"===t.topic?(this.removeWindow(e.uuid,!0),s.default.system.log("Assimilation.AssimilationWindowManager:Exited External Process",t)):s.default.system.log("Assimilation.AssimilationWindowManager:Running External Process",t)}},(t=>{e.finUUID=t.uuid}),(e=>{s.default.system.error(e)}))}}},71688:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=n(21614),o=i(n(2518)),s=i(n(9381));s.default.initialize(),t.default=class{constructor(e){this.appAssets=e.appAssets,this.manifest=e.manifest,this.blacklist=this.manifest.blacklist.map((e=>e.toUpperCase())),this.whitelist=this.manifest.whitelist.map((e=>e.toUpperCase()))}canHookWindow(e){const t=this.manifest.onlySpawned;return!(t&&!e.descriptor||(t&&e.descriptor&&!this.checkBlacklist(e)?(o.default.system.debug("Assimilation.canHookWindow: true"),0):this.checkBlacklist(e)||!this.checkWhitelist(e)&&this.whitelist.length>0))}executableInConfig(e,t){if(!e.executablePath)return t("not found",!1);const n=e.executablePath.replace(/^.*[\\\/]/,"").toUpperCase();s.default.getValue({field:"finsemble.components"},((i,r)=>{const o=Object.keys(r);for(let i=0;i<o.length;i++){const s=r[o[i]];if(s.window&&s.window.path){const i=s.window.path.replace(/^.*[\\\/]/,"").toUpperCase();if(e.executablePath&&i===n)return t(null,!0)}}return this.executableInAssets(e,t)}))}executableInAssets(e,t){for(let n=0;n<this.appAssets.length;n++)if(this.appAssets[n].target.toUpperCase()===e.executablePath.replace(/^.*[\\\/]/,"").toUpperCase())return t(null,!0);return t(null,!1)}checkBlacklist(e){if(!e.windowName)return!1;if(this.blacklist.length>0&&this.blacklist.includes(e.windowName.toUpperCase()))return!0;for(let t=0;t<this.blacklist.length;t++){const n=new RegExp(`^.*\\${this.blacklist[t]}$`);if(n.test(e.windowName.toUpperCase()))return!1;if(e.executablePath&&n.test(e.executablePath.toUpperCase()))return!1}return!1}checkWhitelist(e){if(!e.windowName)return!1;for(let t=0;t<this.whitelist.length;t++){const n=new RegExp(`^.*\\${this.whitelist[t]}$`);if(n.test(e.windowName.toUpperCase()))return!0;if(e.executablePath&&n.test(e.executablePath.toUpperCase()))return!0}return!1}prepareAction(e){const t=(0,r.v4)();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}}},25478:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return r(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseService=void 0;const a=n(1641),l=n(25495),u=s(n(11314)),d=s(n(2518)),c=s(n(84795)),f=n(91374),h=o(n(26604)),p=n(44137),g=n(51806),{SERVICE_INITIALIZING_CHANNEL:m,SERVICE_READY_CHANNEL:w,SERVICE_QUERY_READY_CHANNEL:y,SERVICE_CLOSING_CHANNEL:v,SERVICE_CLOSED_CHANNEL:b,SERVICE_STOP_CHANNEL:S}=h,C={startupDependencies:{services:[],clients:[]},shutdownDependencies:{services:[]},name:window.name};t.BaseService=class{constructor(e=C){!function(e){e.startupDependencies?(e.startupDependencies.services||(e.startupDependencies.services=C.startupDependencies.services),e.startupDependencies.clients||(e.startupDependencies.clients=C.startupDependencies.clients)):e.startupDependencies=C.startupDependencies,e.shutdownDependencies?e.shutdownDependencies.services||(e.shutdownDependencies.services=C.shutdownDependencies.services):e.shutdownDependencies=C.shutdownDependencies}(e),this.name=e.name?e.name:window.name,this.startupDependencies=e.startupDependencies,this.shutdownDependencies=e.shutdownDependencies,this.Logger=d.default,this.RouterClient=u.default,this.onBaseServiceReadyCB=null,this.setOnConnectionCompleteCB=null,this.listeners={},this.start=()=>{},this.started=!1,this.status="initializing",this.setOnline=this.setOnline.bind(this),this.onBaseServiceReady=this.onBaseServiceReady.bind(this),this.handleShutdown=this.handleShutdown.bind(this),this.waitForDependencies(),p.Globals.finsembleServices?p.Globals.finsembleServices.push(this):p.Globals.finsembleServices=[this]}async initialize(e){e()}waitForDependencies(){const e=this;if(this.started)return;this.started=!0;const t=this;function n(e){d.default.system.debug("BaseService.start.setParentUUID"),f.System.Window.getCurrent().getOptions((n=>{t.customData=n.customData,e()}))}async function i(){await(new g.FSBLService).startApp(),u.default.addResponder(y(e.name),((t,n)=>{(e.status="ready")?null==n||n.sendQueryResponse(null):null==n||n.sendQueryResponse("service not ready")})),"routerService"!==t.name&&u.default.transmit(m,{name:t.name}),window.addEventListener("beforeunload",t.RouterClient.disconnectAll),d.default.system.debug("APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.onRouterReady")}function r(e){const n=t.customData.debugServiceDelay||0;if(d.default.system.debug(`Custom Data: ${t.name} custom data`,t.customData),Number.isInteger(n))n>0&&d.default.system.debug(`APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.debugDelay: ${t.name} startup will delayed by ${n} milliseconds for debugging`);else{const e=`debugDelay has an illegal value ("${n}") for ${t.name}. Value must be an integer.`;d.default.system.error(`APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start: ${e}`),c.default.systemLog({error:!0},e)}setTimeout(e,n)}function o(e){d.default.system.debug(`APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.readyToGo ${t.name}`),d.default.console.log("Startup Dependencies for",t.name,t.startupDependencies),d.default.console.log("Shutdown Dependencies for",t.name,t.shutdownDependencies),l.FSBLDependencyManagerSingleton.shutdown.waitFor(t.shutdownDependencies,t.handleShutdown),d.default.system.debug(`APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.readyToGo after wait ${t.name}`),u.default.transmit(`${f.System.Window.getCurrent().name}.onSpawned`,{name:f.System.Window.getCurrent().name},{suppressWarnings:!0}),l.FSBLDependencyManagerSingleton.startup.waitFor(t.startupDependencies,e,t.name).on("err",(e=>{d.default.system.error(e)}))}function s(e){const n=f.System.Window.getCurrent();n.isShowing((i=>{i&&!1!==t.customData.showDevConsoleOnVisible?f.System.showDeveloperTools(n.name,null,e):(d.default.system.debug("APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.delayStartup done"),e())}))}return d.default.system.debug(`${this.name} starting`),new Promise((e=>{(0,a.series)([i,n,s,r,o],(t=>{t&&console.log("waitForDependencies async.series results",t),e(),this.onDependenciesReady()}))}))}setOnline(){"ready"!==this.status&&(this.RouterClient.addListener(`${S}.${this.name}`,(()=>{l.FSBLDependencyManagerSingleton.shutdown.checkDependencies()})),this.status="ready",u.default.transmit(w,{serviceName:this.name},{suppressWarnings:!0}),d.default.system.log("APPLICATION LIFECYCLE:STARTUP:SERVICE ONLINE",this.name),c.default.publishBootStatus(this.name,"services","completed"))}onDependenciesReady(){d.default.system.debug("APPLICATION LIFECYCLE:STARTUP:BaseService onDependenciesReady",this.name),this.status="initializing",this.onBaseServiceReadyCB?this.onBaseServiceReadyCB(this.setOnline):this.initialize?this.initialize(this.setOnline):setTimeout((()=>{"ready"!==this.status&&"routerService"!==this.name&&(console.error("No onBaseServiceReadyCB on initialize function defined on your service. Ensure that service.setOnline is called"),d.default.system.error("No onBaseServiceReadyCB on initialize function defined on your service. Ensure that service.setOnline is called"))}),3e3)}onBaseServiceReady(e){"initializing"===this.status?this.onBaseServiceReadyCB=()=>{e(this.setOnline)}:e(this.setOnline)}addEventListener(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)}onShutdown(e){this.addEventListener("onShutdown",e)}handleShutdown(){d.default.system.debug("BaseService.handleShutdown");const e=this;this.listeners.onShutdown?(u.default.transmit(v,{waitForMe:!0,name:this.name}),(0,a.each)(this.listeners.onShutdown,(function(e,t){(0,a.asyncify)(e)(null,t)}),(function(t){t&&d.default.system.error(t),e.shutdownComplete()}))):(u.default.transmit(v,{waitForMe:!1,name:this.name}),e.shutdownComplete())}shutdownComplete(){d.default.system.info(`"APPLICATION LIFECYCLE:SHUTDOWN:SERVICE SHUTDOWN: ${this.name}`),u.default.transmit(b,{name:this.name})}}},41552:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Action=void 0,t.Action=class{constructor(){this.id="",this.buttonText="",this.type=""}}},99259:(e,t)=>{"use strict";var n,i;Object.defineProperty(t,"__esModule",{value:!0}),t.FinsembleNotificationOptions=t.ActionTypes=void 0,(i=t.ActionTypes||(t.ActionTypes={})).DISMISS="DISMISS",i.SNOOZE="SNOOZE",i.SPAWN="SPAWN",i.QUERY="QUERY",i.PUBLISH="PUBLISH",i.TRANSMIT="TRANSMIT",(n=t.FinsembleNotificationOptions||(t.FinsembleNotificationOptions={})).MARK_AS_UNREAD="MARK_AS_UNREAD",n.MARK_AS_READ="MARK_AS_READ",n.SNOOZE="SNOOZE",n.DISMISS="DISMISS",n.SETTINGS="SETTINGS",n.DETAILS="DETAILS"},47505:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},98379:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Filter=void 0,t.Filter=class{constructor(){this.include=[],this.exclude=[]}}},45115:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},27749:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},42303:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},15074:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},90382:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2094:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},68994:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},62671:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},12573:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},85058:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},61765:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},77610:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LastIssued=void 0,t.LastIssued=class{constructor(e,t){this.source=e,this.issuedAt=t}}},56164:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Meta=void 0,t.Meta=class{}},42649:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Notification=void 0;const i=n(56164);t.Notification=class{constructor(){this.actions=[],this.isRead=!1,this.isSnoozed=!1,this.isMuted=!1,this.isDeleted=!1,this.actionsHistory=[],this.meta=new i.Meta,this.stateHistory=[],this.issuedAt="",this.title="",this.devModeOnly=!1}}},39195:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},71039:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},12758:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PerformedAction=void 0,t.PerformedAction=class{constructor(){this.id="",this.type="",this.datePerformed=""}}},70887:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SnoozeTimer=void 0,t.SnoozeTimer=class{}},35874:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Subscription=void 0,t.Subscription=class{constructor(e,t){this.id=e||null,this.filter=t,this.channel=""}}},46215:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(41552),t),r(n(99259),t),r(n(47505),t),r(n(98379),t),r(n(45115),t),r(n(27749),t),r(n(42303),t),r(n(15074),t),r(n(90382),t),r(n(2094),t),r(n(68994),t),r(n(62671),t),r(n(12573),t),r(n(85058),t),r(n(61765),t),r(n(77610),t),r(n(56164),t),r(n(42649),t),r(n(39195),t),r(n(71039),t),r(n(12758),t),r(n(70887),t),r(n(35874),t)},38144:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CHECKPOINT_CHANNEL_BASE=t.STAGE_CHANNEL=t.STATUS_CHANNEL_BASE=t.SHOW_SYSLOG_CHANNEL=t.SYSLOG_CHANNEL=t.CRITICAL_BOOT_STAGES=t.ALL_BOOT_STAGES=void 0,t.ALL_BOOT_STAGES=["microkernel","kernel","authentication","preuser","earlyuser","user"],t.CRITICAL_BOOT_STAGES=["microkernel","kernel"],t.SYSLOG_CHANNEL="systemManager.systemlog",t.SHOW_SYSLOG_CHANNEL="systemManager.showSystemlog",t.STATUS_CHANNEL_BASE="systemManager.boot.status",t.STAGE_CHANNEL="systemManager.boot.stage",t.CHECKPOINT_CHANNEL_BASE="systemManager.checkpoint"},37331:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkpointChannel=t.statusChannel=void 0;const i=n(38144);t.statusChannel=function(e){return`${i.STATUS_CHANNEL_BASE}.${e}`},t.checkpointChannel=function(e,t){return`${i.CHECKPOINT_CHANNEL_BASE}.${e}.${t}`}},53912:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BootReadyItem=t.ALL_BOOT_STAGES=void 0,t.ALL_BOOT_STAGES=["microkernel","kernel","authentication","preuser","earlyuser","user"],t.BootReadyItem=class{constructor(e,t,n){this.name=e,this.type=t,this.config=n}}},43762:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return r(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseWindow=void 0;const a=s(n(9996)),l=s(n(11314)),u=s(n(9381)),d=s(n(2518)),c=n(252),f=o(n(23099)),h=s(n(23893)),p=o(n(26604)),g=n(91374),m=n(26604),w=s(n(47913)),y=s(n(95085)),v=s(n(2740)),b=s(n(50361)),S=n(252);w.default.initialize(),y.default.initialize(),u.default.initialize(),v.default.initialize();class C{constructor(e){this.name="Unknown window",this.windowName="Unknown window",this.eventlistenerHandlerMap={},this.handleWrapStateChange=(e,t)=>{const{state:n}=t.data;n&&n!==this.wrapState&&"closed"!==n&&(this.wrapState=n,this.eventManager.trigger(n),this.eventManager.trigger("wrap-state-changed",{state:n}))},this.types={},this.guid=(0,S.guuid)(),this.wrapState="initializing",this.componentState={},this.windowState=C.WINDOWSTATE.NORMAL,this.type=null,this.windowType=null,this.windowOptions={},this.bounds={},this.name,this.enableWindowsAeroSnap=!1,this.doConstruction(e),this.TITLE_CHANGED_CHANNEL=`Finsemble.${this.name}.titleChanged`,this.componentKey=f.camelCase("activeWorkspace",this.name,this.name),this.windowKey=f.camelCase("activeWorkspace",this.name),C.bindFunctions(this),this.wrapStateChangeSubscription=l.default.subscribe(`Finsemble.Component.State.${this.name}`,this.handleWrapStateChange),this.eventManager=new h.default({name:this.name,sourceType:"Window"}),this.finishedMove=!0,this.oldState={}}windowServiceChannelName(e){return`WindowService-Request-${e}`}eventChannelName(e){return`WindowService-Event-${this.name||this.windowName}-${e}`}_startMove(e=0){window.aeroMode=!1,0===e&&(this.finishedMove=!1)}_stopMove(){this.finishedMove=!0}doConstruction(e){if(e.setWindowType||e.windowType||(e.windowType="WebWindow"),e.windowType)return e.setWindowType=e.windowType,delete e.windowType,new C.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=C;n.types||(n.types={}),n.types[e]=t}static bindFunctions(e){e.setParent=e.setParent.bind(e),e.getParent=e.getParent.bind(e),e.eventChannelName=e.eventChannelName.bind(e),e.windowServiceChannelName=e.windowServiceChannelName.bind(e),e.setupListeners=e.setupListeners.bind(e),e.onTitleChanged=e.onTitleChanged.bind(e),e.handleWrapRemoveRequest=e.handleWrapRemoveRequest.bind(e)}setupListeners(e){d.default.system.debug("BaseWindow parent change notification setup",e),this.parentSubscribeID=l.default.subscribe(`Finsemble.parentChange.${e}`,((e,t)=>{if(e)d.default.system.error("BaseWindow parent change notification error",e);else{const e=t.data||{};"Added"==e.type?(d.default.system.debug("BaseWindow Parent Notification: window.addedToStack listener",e),this.setParent(e.stackedWindowIdentifier)):"Removed"==e.type?(d.default.system.debug("BaseWindow Parent Notification: window.removedFromStack listener",e),this.clearParent()):"Exists"===e.type||e.type&&d.default.system.error("BaseWindow Parent Notification: unknown type",e)}})),this.TITLE_CHANGED_SUBSCRIPTION=l.default.subscribe(this.TITLE_CHANGED_CHANNEL,this.onTitleChanged)}async onTitleChanged(e,t){var n,i,r;if(("string"==typeof(null===(n=t.data)||void 0===n?void 0:n.title)||"number"==typeof t.data.title)&&(this._updateOptions&&this._updateOptions({title:t.data.title}),(null===(i=t.data)||void 0===i?void 0:i.windowName)&&(null===(r=t.data)||void 0===r?void 0:r.title))){d.default.debug(`Component window "${t.data.windowName}" is changing title to "${t.data.title}"`);try{const e=await(async()=>{let{data:e}=await w.default.createGlobalStore({store:"window-tab-title"});return e})();if(!e)return void d.default.warn("Error setting tab title: the store was not found");await e.setValue({field:t.data.windowName,value:t.data.title})}catch(e){d.default.system.warn(`Error saving window "${t.data.windowName}" tab name "${t.data.title}" to store "window-tab-title"`,e)}finally{this.eventManager.trigger("title-changed",{name:this.name,title:t.data.title})}}}static async getInstanceStandardized(e){try{return{data:(await C.getInstance(e)).wrap}}catch(e){return{err:e}}}static getInstance(e,t){return new Promise((async(n,i)=>{var r,o;const s=g.System.Window.getCurrent().name,a=null!==(r=null==e?void 0:e.name)&&void 0!==r?r:null==e?void 0:e.windowName,{waitForReady:u,uuid:c,windowType:f}=e;if(!a){const e='"name" is a required parameter';return null==t||t(e),void i(e)}if(e.windowName=a,!1!==u&&(d.default.system.debug("WRAP LIFECYCLE:WAIT FOR READY",a),await C._windowReady(a),d.default.system.debug("WRAP LIFECYCLE:WAIT DONE -- READY",a)),C.cache[a]){d.default.system.debug("WRAP LIFECYCLE:",a,"Window found in the cache, returning without going to the Launcher");const e=C.cache[a];return n({wrap:e}),void(null==t||t(null,e))}if(c&&a){const i={uuid:c,name:a,windowName:a,windowType:f};d.default.system.debug("WRAP LIFECYCLE:",a,"All information for wrap passed in, creating wrap locally");const{wrap:r}=await C._createWrap(Object.assign(Object.assign({},e),{windowIdentifier:null!==(o=e.windowIdentifier)&&void 0!==o?o:i}));return n({wrap:r}),void(null==t||t(null,r))}l.default.query("WindowService-Request-getWindowIdentifier",{windowName:e.name,requester:s},(async(r,o)=>{var s;if(r||!o.data)return d.default.system.error(r),i(r),void(null==t||t(r));if(C.cache[a]){const e=C.cache[a];return d.default.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:l}=o.data;d.default.system.debug("WRAP LIFECYCLE:",a,"Information received from launcher. Creating wrap.");const{wrap:u}=await C._createWrap(Object.assign(Object.assign({},e),{retrievedIdentifier:Object.assign(Object.assign({},l),{name:null!==(s=l.windowName)&&void 0!==s?s:l.name})}));n({wrap:u}),null==t||t(null,u)}))}))}static _createWrap(e){return new Promise((t=>{const n=e.retrievedIdentifier||e.windowIdentifier;(e.setWindowType||n.windowType)&&"WebApplication"!==n.windowType||(n.windowType="WebWindow");let i=Object.assign({},n);i=Object.assign(i,e),i=Object.assign(i,n),i.setWindowType=i.windowType,delete i.windowType,d.default.system.debug("WRAP LIFECYCLE: Placing wrap into the local cache.",n.windowName);const r=C;C.cache.hasOwnProperty(n.windowName)?d.default.system.error("DUPLICATE WRAPPER for",n.windowName):C.cache[n.windowName]=new r.types[i.setWindowType](i);let o=C.cache[n.windowName];o.windowType=n.windowType,o.identifier=n,o.setupListeners(n.windowName),t({wrap:o})}))}static _getRemoveWrapChannel(e){return`${g.System.Window.getCurrent().name}.removeWrap.${e}`}handleWrapRemoveRequest(){this.removeListeners&&this.removeListeners(),this.eventManager.cleanup();for(const e in this.eventlistenerHandlerMap)for(let t=0;t<this.eventlistenerHandlerMap[e].length;t++)this.eventlistenerHandlerMap[e][t].interceptor.removeAllListeners();this.eventManager.cleanup(),d.default.system.debug("WRAP CLOSE. Deleting cached wrap."),delete C.cache[this.name],this.cleanupRouter()}cleanupRouter(){const e=C._getRemoveWrapChannel(this.name);l.default.removeResponder(e),this.TITLE_CHANGED_SUBSCRIPTION&&l.default.unsubscribe(this.TITLE_CHANGED_SUBSCRIPTION),l.default.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,d.default.system.debug("FinsembleWindow.queryWindowService",this.windowServiceChannelName(e),t),console.debug("FinsembleWindow.queryWindowService",this,this.windowServiceChannelName(e),t);let i=null;l.default.query(this.windowServiceChannelName(e),t,((t,r)=>{t?(d.default.system.warn(`WindowService.${e}: failed`,t),console.debug(`WindowService.${e}: failed`,t)):(i=r.data,d.default.system.debug(`${this.windowServiceChannelName(e)} successful`,i),console.debug(`${this.windowServiceChannelName(e)} successful`,i)),n&&n(t,i)}))}addEventListener(e,t){this.eventManager.addEventListener(e,t)}removeEventListener(e,t){return this.eventManager.removeEventListener(e,t)}registerWithDocking(e,t){l.default.query("DockingService.registerWindow",{type:this.type,windowType:this.windowType,windowMsg:e,name:this.windowName},t)}unRegisterWithDocking(){l.default.transmit("DockingService.deregisterWindow",{name:this.windowName})}initializeWindow(e){this.registerWithDocking(e,(()=>{l.default.publish(`Finsemble.${this.windowName}.componentReady`,{name:this.windowName})}))}wrapReady(){l.default.publish(`Finsemble.${this.windowName}.wrapReady`,{name:this.windowName,state:"open"})}_minimize(e,t=Function.prototype){d.default.system.debug("BaseWindow._minimize",e),!(e=e||{}).invokedByParent&&this.parentWindow?(e.windowIdentifier=this.identifier,this.parentWindow._minimize(e,((e,n)=>{d.default.system.debug("BaseWindow._minimize parent",n),t(e,{shouldContinue:!1})}))):t(null,{shouldContinue:!0})}_maximize(e,t=Function.prototype){d.default.system.debug("BaseWindow._maximize",e),t(null,{shouldContinue:!0})}_restore(e,t){return new Promise((n=>{d.default.system.debug("BaseWindow._restore",e),!(e=e||{}).invokedByParent&&this.parentWindow?(e.windowIdentifier=this.identifier,this.parentWindow._restore(e,((e,i)=>{d.default.system.debug("BaseWindow._restore parent",i),null==t||t(e,{shouldContinue:!1}),n({err:e,data:{shouldContinue:!1}})}))):(null==t||t(null,{shouldContinue:!0}),n({data:{shouldContinue:!0}}))}))}_blur(e,t=Function.prototype){d.default.system.debug("BaseWindow._blur",e),!(e=e||{}).invokedByParent&&this.parentWindow?(e.windowIdentifier=this.identifier,this.parentWindow._blur(e,((e,n)=>{d.default.system.debug("BaseWindow._blur parent",n),t(e,{shouldContinue:!1})}))):t(null,{shouldContinue:!0})}_focus(e,t=Function.prototype){d.default.system.debug("BaseWindow._focus",e),!(e=e||{}).invokedByParent&&this.parentWindow?(e.windowIdentifier=this.identifier,this.parentWindow._focus(e,((e,n)=>{d.default.system.debug("BaseWindow._focus parent",n),t(e,{shouldContinue:!1})}))):t(null,{shouldContinue:!0})}_bringToFront(e,t=Function.prototype){d.default.system.debug("BaseWindow._bringToFront",e),!(e=e||{}).invokedByParent&&this.parentWindow?(e.windowIdentifier=this.identifier,this.parentWindow._bringToFront(e,((e,n)=>{d.default.system.debug("BaseWindow._bringToFront parent",n),t(e,{shouldContinue:!1})}))):t(null,{shouldContinue:!0})}_isShowing(e,t=Function.prototype){d.default.system.debug("BaseWindow._isShowing",e),!(e=e||{}).invokedByParent&&this.parentWindow?(e.windowIdentifier=this.identifier,this.parentWindow._isShowing(e,((e,n)=>{d.default.system.debug("BaseWindow._isShowing parent",n),t(e,{shouldContinue:!1})}))):t(null,{shouldContinue:!0})}disableFrame(e){null==e||e()}_setBounds(e,t=Function.prototype){d.default.system.verbose("BaseWindow._setBounds",e),e=e||{};const{bounds:n}=e;this.mergeBounds(n),!e.invokedByParent&&this.parentWindow?(e.windowIdentifier=this.identifier,this.parentWindow._setBounds(e,((e,n)=>{d.default.system.verbose("BaseWindow._setBounds parent",n),t(e,{shouldContinue:!1})}))):t(null,{shouldContinue:!0})}_getBounds(e,t){return new Promise((n=>{d.default.system.verbose("BaseWindow._getBounds",e),!(e=e||{}).invokedByParent&&this.parentWindow?(e.windowIdentifier=this.identifier,this.parentWindow._getBounds(e,((e,i)=>{d.default.system.verbose("BaseWindow._getBounds parent",i),t(e,i),n({err:e,data:i})}))):(t(null,{shouldContinue:!0}),n({data:{shouldContinue:!0}}))}))}_getBoundsFromSystem(e,t){d.default.system.debug("BaseWindow._getBoundsFromSystem",e),!(e=e||{}).invokedByParent&&this.parentWindow?(e.windowIdentifier=this.identifier,this.parentWindow._getBoundsFromSystem(e,((e,n)=>{d.default.system.verbose("BaseWindow._getBoundsFromSystem parent",n),t(e,n)}))):t(null,{shouldContinue:!0})}_updateOptions(e,t=Function.prototype){d.default.system.debug("BaseWindow._updateOptions",e),!(e=e||{}).invokedByParent&&this.parentWindow?(e.windowIdentifier=this.identifier,this.parentWindow._updateOptions(e,((e,n)=>{d.default.system.debug("BaseWindow._updateOptions parent",n),t(e,{shouldContinue:!1})}))):t(null,{shouldContinue:!0})}_hide(e,t=Function.prototype){d.default.system.debug("BaseWindow._hide",e),!(e=e||{}).invokedByParent&&this.parentWindow?(e.windowIdentifier=this.identifier,this.parentWindow._hide(e,((e,n)=>{d.default.system.debug("BaseWindow._hide parent",n),t(e,{shouldContinue:!1})}))):t(null,{shouldContinue:!0})}async _show(e,t){if(d.default.system.debug("BaseWindow._show",e),!(e=e||{}).invokedByParent&&this.parentWindow){e.windowIdentifier=this.identifier;const{err:n,data:i}=await this.parentWindow._show(e);return d.default.system.debug("BaseWindow._show parent",i),null==t||t(n,{shouldContinue:!1}),{err:n,data:{shouldContinue:!1}}}return null==t||t(null,{shouldContinue:!0}),{data:{shouldContinue:!0}}}_showAt(e,t=Function.prototype){d.default.system.debug("BaseWindow._showAt",e),!(e=e||{}).invokedByParent&&this.parentWindow?(e.windowIdentifier=this.identifier,this.parentWindow._showAt(e,((e,n)=>{d.default.system.debug("BaseWindow._showAt parent",n),t(e,{shouldContinue:!1})}))):t(null,{shouldContinue:!0})}_close(e={},t){return new Promise((n=>{d.default.system.debug("WRAP CLOSE. BaseWindow._close",this.name,e);const{parentWindow:i}=this;e.fromSystem?i&&"stackedwindow"===i.componentType.toLowerCase()?((e={}).removeFromWorkspace=!0,e.fromSystem=!0,e.stackedWindowIdentifier=i.identifier,i.close(e,((e,i)=>{d.default.system.debug("BaseWindow.close stacked window",i),null==t||t(e,{shouldContinue:!1}),n({err:e,data:{shouldContinue:!1}})}))):(null==t||t(null,{shouldContinue:!0}),n({data:{shouldContinue:!0}})):e.invokedByParent||e.ignoreParent||!i?(null==t||t(null,{shouldContinue:!0}),n({data:{shouldContinue:!0}})):(e.windowIdentifier=this.identifier,e.noDocking=!0,i._removeWindow(e,((e,i)=>{d.default.system.debug("BaseWindow._close parent",i),null==t||t(e,{shouldContinue:!0}),n({err:e,data:{shouldContinue:!0}})})))}))}_alwaysOnTop(e,t=Function.prototype){d.default.system.debug("BaseWindow._alwaysOnTop",e),!(e=e||{}).invokedByParent&&this.parentWindow?(e.windowIdentifier=this.identifier,this.parentWindow._alwaysOnTop(e,((e,n)=>{d.default.system.debug("BaseWindow._alwaysOnTop parent",n),t(e,{shouldContinue:!1})}))):t(null,{shouldContinue:!0})}_isAlwaysOnTop(e={},t=Function.prototype){return t(null,Boolean(this.windowOptions.alwaysOnTop)),Boolean(this.windowOptions.alwaysOnTop)}_setOpacity(e,t=Function.prototype){d.default.system.debug("BaseWindow._setOpacity",e),!(e=e||{}).invokedByParent&&this.parentWindow?(e.windowIdentifier=this.identifier,this.parentWindow._setOpacity(e,((e,n)=>{d.default.system.debug("BaseWindow._setOpacity parent",n),t(e,{shouldContinue:!1})}))):t(null,{shouldContinue:!0})}_saveWindowOptions(e,t=Function.prototype){d.default.system.debug("BaseWindow._saveWindowOptions",e),!(e=e||{}).invokedByParent&&this.parentWindow?(e.windowIdentifier=this.identifier,this.parentWindow._saveWindowOptions(e,((e,n)=>{d.default.system.debug("BaseWindow._saveWindowOptions parent",n),t(e,{shouldContinue:!0})}))):t(null,{shouldContinue:!0})}_getOptions(e,t=Function.prototype){return t(null,{})}startTabTileMonitoring(e){d.default.system.debug("BaseWindow.startTabTileMonitoring",e),l.default.transmit("TabTile.startTabTile",{params:e})}stopTabTileMonitoring(e,t){d.default.system.debug("BaseWindow.stopTabTileMonitoring",e),l.default.query("TabTile.stopTabTile",{params:e},(function(e,n){e?d.default.system.warn("TabTile.stopTabTile: query failed",e):d.default.system.debug("TabTile.stopTabTile results",n.data);const i=n.data;t?t(e,i,this.defaultStopTrackingAction):this.defaultTabTileAction(i)}))}defaultTabTileAction(e){const t=this;switch(d.default.system.debug("BaseWindow.defaultTabTileAction",e),e.stoppedLocation){case"OutsideWindow":case"TabSection":break;case"InsideWindow":e.tileGroupId?t.Group.addWindow(this.identifier,e.tileGroupId,e.dropCoordinates):t.Group.createGroup((function(n){t.Group.addWindow(this.identifier,n,e.dropCoordinates,{startingWindowIdentifier:e.droppedOnWindowIdentifier})}));break;default:d.default.system.error("stopTracking returned an unknown stoppedLocation result",e)}}mergeBounds(e){if(!e||!Number.isInteger(e.top))return console.error("Invalid bounds",e),void d.default.system.warn("BaseWindow.mergeBounds Invalid bounds","bounds=",e);const t={top:Math.round(e.top),left:Math.round(e.left),width:Math.round(e.width),height:Math.round(e.height)};t.bottom=t.top+t.height,t.right=t.left+t.width;const n={defaultLeft:t.left,defaultWidth:t.width,defaultTop:t.top,defaultHeight:t.height};Object.assign(this.windowOptions,t),Object.assign(this.windowOptions,n),this.windowOptions.bounds=t}startMove(e){d.default.system.debug("BaseWindow.startMove",e),(e=e||{}).windowIdentifier=this.identifier,this.eventManager.trigger("bounds-change-start",Object.assign({},this.windowOptions.bounds))}stopMove(e){d.default.system.debug("BaseWindow.stopMove",e),(e=e||{}).windowIdentifier=this.identifier,this.eventManager.trigger("bounds-change-end",Object.assign({name:this.name,eventName:"bounds-change-end",dockedPosition:this.dockedPosition},this.windowOptions.bounds))}async getFSBLState(e,t){d.default.system.debug("BaseWindow.getState",e);const{err:n,data:i}=await y.default.getStandardized({topic:m.WORKSPACE.CACHE_STORAGE_TOPIC,key:e.key});"componentState"===e.stateVar&&(this.componentState=i);const{field:r,fields:o}=e;if(!n&&i){if(r)return null==t||t(n,i[r]),{data:i[r]};if(o){const e={};for(let t=0;t<o.length;t++)i[o[t]]&&(e[o[t]]=i[o[t]]);return null==t||t(null,e),{data:e}}return null==t||t(null,i),{data:i}}{const r="Not found";return d.default.system.info("WindowClient:getComponentState:error, response, params",n,i,e),null==t||t(r,i),{err:r}}}getComponentState(e,t){return e||(e={}),e.fields&&!Array.isArray(e.fields)&&(e.fields=[e.fields]),this.getFSBLState(Object.assign(Object.assign({},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(Object.assign(Object.assign({},e),{key:this.componentKey,stateVar:"componentState"}),t)}removeComponentState(e,t=(()=>{})){return e.fields&&!Array.isArray(e.fields)&&(e.fields=[e.fields]),this.removeFSBLState(Object.assign(Object.assign({},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(Object.assign(Object.assign({},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(!C.additionalWorkspaceFields)try{const e=await u.default.getValue("finsemble.servicesConfig.window.additionalWorkspaceFields");C.additionalWorkspaceFields=e.data||[]}catch(e){C.additionalWorkspaceFields=[]}let n;n=m.WORKSPACE.ADDITIONAL_WINDOW_PROPS[e.windowType]?m.WORKSPACE.ADDITIONAL_WINDOW_PROPS[e.windowType]:m.WORKSPACE.ADDITIONAL_WINDOW_PROPS.WebWindow,"WebApplication"===e.windowType&&(e.windowType="WebWindow");const i=[...m.WORKSPACE.DEFAULT_WINDOW_PROPS,...n,...C.additionalWorkspaceFields];for(const n of i)void 0!==e[n]&&(t[n]=e[n]);return t}async saveCompleteWindowState(e,t=Function.prototype){if(d.default.system.debug("COMPONENT LIFECYCLE:SAVING STATE:",e.name),e){"StackedWindow"===e.windowType&&(e.componentType="StackedWindow",this.mergeBounds(e.bounds));const n=await C.cleanupState(e);if((0,c.isEqualIgnoringArrayOrder)(this.oldState,n))d.default.system.debug("saveCompleteWindowState -- deep equal"),t();else{d.default.system.debug("saveCompleteWindowState -- not deep equal",this.oldState,n),this.oldState=(0,b.default)(n);try{await v.default._setWindowState({windowName:this.windowName,state:{windowData:n}})}catch(e){}t()}}else t("No State Provided")}async setFSBLState(e,t){const n={key:e.key,stateVar:e.stateVar};n.key||("componentState"===n.stateVar?n.key=this.componentKey:"windowData"===n.stateVar&&(n.key=this.windowKey));const i="componentState"===e.stateVar?"componentState":"windowOptions";await this.getFSBLState(n),d.default.system.debug("BaseWindow.getState",e);let r=(0,a.default)(this[i],{}),{fields:o}=e;e.field&&(o=[{field:e.field,value:e.value}]);for(let e=0;e<o.length;e++){const t=o[e];t.field&&void 0!==t.value&&(r[t.field]=t.value)}e.value=r,d.default.system.debug(`COMPONENT LIFECYCLE: SAVING ${e.stateVar}:`,r),"windowData"===e.stateVar&&(r=await C.cleanupState(r));try{await v.default._setWindowState({windowName:this.windowName,state:{[e.stateVar]:r}})}catch(e){}this[i]=r,null==t||t()}removeFSBLState(e,t=(()=>{})){var n;const i={key:e.key,stateVar:e.stateVar},r="componentState"===i.stateVar?this.componentKey:this.windowKey,o=null!==(n=i.key)&&void 0!==n?n:r,s="componentState"===e.stateVar?"componentState":"windowOptions";this.getFSBLState(Object.assign(Object.assign({},i),{key:o}),(async()=>{var n;d.default.system.debug("BaseWindow.getState",e);let i=(0,a.default)(this[s],{}),{fields:r=[]}=e;e.field&&(r=[{field:e.field}]);for(let e=0;e<r.length;e++){const t=r[e];t.field&&delete i[t.field]}e.value=i,d.default.system.debug(`COMPONENT LIFECYCLE: SAVING ${e.stateVar}:`,i),"windowData"===e.stateVar&&(i=await C.cleanupState(i));const o=null!==(n=e.stateVar)&&void 0!==n?n:"windowData";try{await v.default._setWindowState({windowName:this.windowName,state:{[o]:i}})}catch(e){}this[s]=i,t(null)}))}cancelTabTileMonitoring(e){d.default.system.debug("BaseWindow.cancelTabTileMonitoring",e),l.default.transmit("TabTile.cancelTabTile",{params:e})}getParent(){return this.parentWindow}setParent(e,t=Function.prototype){this.parentWindow&&this.parentWindow.name===e.windowName?(d.default.system.debug("BaseWindow.setParent already set",e),t(null,e)):(d.default.system.debug("BaseWindow.setParent",e),C.getInstance(e,((n,i)=>{n?d.default.system.error("BaseWindow.setParent error",n):(d.default.system.debug("BaseWindow.setParent wrap success",e),console.debug("BaseWindow.setParent wrap success",this,i),this.parentWindow=i,this.eventManager.trigger("parent-set",{parentName:this.parentWindow.name})),t(n,e)})))}clearParent(){d.default.system.debug("BaseWindow.clearParent"),this.parentWindow=null,this.eventManager.trigger("parent-unset",this.parentWindow)}setTitle(e){this.windowOptions&&(this.windowOptions.title=e),d.default.system.debug("Title change",e),l.default.publish(this.TITLE_CHANGED_CHANNEL,{title:e,windowName:this.windowName})}close(e={},t){return new Promise((n=>{this.queryWindowService("close",e,((e,i)=>{null==t||t(e,i),n({err:e})}))}))}_animate(e,t){"function"==typeof e&&(t=e,e=null),t("Method not implemented for window",{shouldContinue:!0})}}t.BaseWindow=C,C.cache={},C.WINDOWSTATE=p.WINDOWSTATE,C.wrap=C.getInstance,C._windowReady=e=>new Promise((async t=>{d.default.system.debug(`windowServiceReady: ${e} waiting`);const n=l.default.subscribe(`Finsemble.Component.State.${e}`,((i,r)=>{const{state:o}=r.data;switch(d.default.system.debug(`windowServiceReady: ${e} state change: ${o}`),o){case"ready":case"reloading":case"closing":d.default.system.debug(`windowServiceReady: ${e} ${o}`),l.default.unsubscribe(n),t();break;default:d.default.system.debug(`windowServiceReady default: ${e} ${o}`)}}))}))},10600:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},57746:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},24508:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},74443:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},46888:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},95281:(e,t)=>{"use strict";var n,i,r;Object.defineProperty(t,"__esModule",{value:!0}),t.ChannelError=t.ResolveError=t.OpenError=void 0,(r=t.OpenError||(t.OpenError={})).AppNotFound="AppNotFound",r.ErrorOnLaunch="ErrorOnLaunch",r.AppTimeout="AppTimeout",r.ResolverUnavailable="ResolverUnavailable",(i=t.ResolveError||(t.ResolveError={})).NoAppsFound="NoAppsFound",i.ResolverUnavailable="ResolverUnavailable",i.ResolverTimeout="ResolverTimeout",(n=t.ChannelError||(t.ChannelError={})).NoChannelFound="NoChannelFound",n.AccessDenied="AccessDenied",n.CreationFailed="CreationFailed"},14414:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},56911:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},27154:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},86414:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},22225:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},896:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ContextTypes=void 0,(n=t.ContextTypes||(t.ContextTypes={})).Contact="fdc3.contact",n.ContactList="fdc3.contactList",n.Country="fdc3.country",n.Instrument="fdc3.instrument",n.Organization="fdc3.organization",n.Portfolio="fdc3.portfolio",n.Position="fdc3.position"},80976:(e,t)=>{"use strict";function n(e,t,n=""){if(n)throw Error(`Invalid value for key "${n}". Expected type ${JSON.stringify(e)} but got ${JSON.stringify(t)}`);throw Error(`Invalid value ${JSON.stringify(t)} for type ${JSON.stringify(e)}`)}function i(e){if(void 0===e.jsonToJS){const t={};e.props.forEach((e=>t[e.json]={key:e.js,typ:e.typ})),e.jsonToJS=t}return e.jsonToJS}function r(e){if(void 0===e.jsToJSON){const t={};e.props.forEach((e=>t[e.js]={key:e.json,typ:e.typ})),e.jsToJSON=t}return e.jsToJSON}function o(e,t,i,r=""){if("any"===t)return e;if(null===t)return null===e?e:n(t,e);if(!1===t)return n(t,e);for(;"object"==typeof t&&void 0!==t.ref;)t=h[t.ref];return Array.isArray(t)?function(e,t){return-1!==e.indexOf(t)?t:n(e,t)}(t,e):"object"==typeof t?t.hasOwnProperty("unionMembers")?function(e,t){const r=e.length;for(let n=0;n<r;n++){const r=e[n];try{return o(t,r,i)}catch(e){}}return n(e,t)}(t.unionMembers,e):t.hasOwnProperty("arrayItems")?function(e,t){return Array.isArray(t)?t.map((t=>o(t,e,i))):n("array",t)}(t.arrayItems,e):t.hasOwnProperty("props")?function(e,t,r){if(null===r||"object"!=typeof r||Array.isArray(r))return n("object",r);const s={};return Object.getOwnPropertyNames(e).forEach((t=>{const n=e[t],a=Object.prototype.hasOwnProperty.call(r,t)?r[t]:void 0;s[n.key]=o(a,n.typ,i,n.key)})),Object.getOwnPropertyNames(r).forEach((n=>{Object.prototype.hasOwnProperty.call(e,n)||(s[n]=o(r[n],t,i,n))})),s}(i(t),t.additional,e):n(t,e):t===Date&&"number"!=typeof e?function(e){if(null===e)return null;const t=new Date(e);return isNaN(t.valueOf())?n("Date",e):t}(e):function(e,t){return typeof e==typeof t?t:n(e,t,r)}(t,e)}function s(e,t){return o(e,t,i)}function a(e,t){return o(e,t,r)}function l(e){return{arrayItems:e}}function u(...e){return{unionMembers:e}}function d(e,t){return{props:e,additional:t}}function c(e){return{props:[],additional:e}}function f(e){return{ref:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Convert=void 0,t.Convert=class{static toContext(e){return s(JSON.parse(e),f("Context"))}static contextToJson(e){return JSON.stringify(a(e,f("Context")),null,2)}static toContact(e){return s(JSON.parse(e),f("Contact"))}static contactToJson(e){return JSON.stringify(a(e,f("Contact")),null,2)}static toContactList(e){return s(JSON.parse(e),f("ContactList"))}static contactListToJson(e){return JSON.stringify(a(e,f("ContactList")),null,2)}static toInstrument(e){return s(JSON.parse(e),f("Instrument"))}static instrumentToJson(e){return JSON.stringify(a(e,f("Instrument")),null,2)}static toInstrumentList(e){return s(JSON.parse(e),f("InstrumentList"))}static instrumentListToJson(e){return JSON.stringify(a(e,f("InstrumentList")),null,2)}static toCountry(e){return s(JSON.parse(e),f("Country"))}static countryToJson(e){return JSON.stringify(a(e,f("Country")),null,2)}static toOrganization(e){return s(JSON.parse(e),f("Organization"))}static organizationToJson(e){return JSON.stringify(a(e,f("Organization")),null,2)}static toPortfolio(e){return s(JSON.parse(e),f("Portfolio"))}static portfolioToJson(e){return JSON.stringify(a(e,f("Portfolio")),null,2)}static toPosition(e){return s(JSON.parse(e),f("Position"))}static positionToJson(e){return JSON.stringify(a(e,f("Position")),null,2)}};const h={Context:d([{json:"id",js:"id",typ:u(void 0,c(""))},{json:"name",js:"name",typ:u(void 0,"")},{json:"type",js:"type",typ:""}],"any"),ContactList:d([{json:"contacts",js:"contacts",typ:l(f("Contact"))},{json:"type",js:"type",typ:""},{json:"id",js:"id",typ:u(void 0,c(""))},{json:"name",js:"name",typ:u(void 0,"")}],"any"),Contact:d([{json:"id",js:"id",typ:f("ContactID")},{json:"type",js:"type",typ:""},{json:"name",js:"name",typ:u(void 0,"")}],"any"),ContactID:d([{json:"email",js:"email",typ:u(void 0,"")},{json:"FDS_ID",js:"FDS_ID",typ:u(void 0,"")}],""),InstrumentList:d([{json:"instruments",js:"instruments",typ:l(f("Instrument"))},{json:"type",js:"type",typ:""},{json:"id",js:"id",typ:u(void 0,c(""))},{json:"name",js:"name",typ:u(void 0,"")}],"any"),Instrument:d([{json:"id",js:"id",typ:f("InstrumentID")},{json:"type",js:"type",typ:""},{json:"name",js:"name",typ:u(void 0,"")}],"any"),InstrumentID:d([{json:"BBG",js:"BBG",typ:u(void 0,"")},{json:"CUSIP",js:"CUSIP",typ:u(void 0,"")},{json:"FDS_ID",js:"FDS_ID",typ:u(void 0,"")},{json:"FIGI",js:"FIGI",typ:u(void 0,"")},{json:"ISIN",js:"ISIN",typ:u(void 0,"")},{json:"PERMID",js:"PERMID",typ:u(void 0,"")},{json:"RIC",js:"RIC",typ:u(void 0,"")},{json:"SEDOL",js:"SEDOL",typ:u(void 0,"")},{json:"ticker",js:"ticker",typ:u(void 0,"")}],""),Country:d([{json:"id",js:"id",typ:f("CountryID")},{json:"type",js:"type",typ:""},{json:"name",js:"name",typ:u(void 0,"")}],"any"),CountryID:d([{json:"ISOALPHA2",js:"ISOALPHA2",typ:u(void 0,"")},{json:"ISOALPHA3",js:"ISOALPHA3",typ:u(void 0,"")}],""),Organization:d([{json:"id",js:"id",typ:f("OrganizationID")},{json:"type",js:"type",typ:""},{json:"name",js:"name",typ:u(void 0,"")}],"any"),OrganizationID:d([{json:"FDS_ID",js:"FDS_ID",typ:u(void 0,"")},{json:"LEI",js:"LEI",typ:u(void 0,"")},{json:"PERMID",js:"PERMID",typ:u(void 0,"")}],""),Portfolio:d([{json:"positions",js:"positions",typ:l(f("Position"))},{json:"type",js:"type",typ:""},{json:"id",js:"id",typ:u(void 0,c(""))},{json:"name",js:"name",typ:u(void 0,"")}],"any"),Position:d([{json:"holding",js:"holding",typ:3.14},{json:"instrument",js:"instrument",typ:f("Instrument")},{json:"type",js:"type",typ:""},{json:"id",js:"id",typ:u(void 0,c(""))},{json:"name",js:"name",typ:u(void 0,"")}],"any")}},63250:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(10600),t),r(n(57746),t),r(n(24508),t),r(n(22225),t),r(n(74443),t),r(n(46888),t),r(n(95281),t),r(n(56911),t),r(n(27154),t),r(n(86414),t),r(n(14414),t),r(n(896),t),r(n(80976),t),r(n(59579),t)},59579:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Intents=void 0,(n=t.Intents||(t.Intents={})).StartCall="StartCall",n.StartChat="StartChat",n.ViewChart="ViewChart",n.ViewContact="ViewContact",n.ViewQuote="ViewQuote",n.ViewNews="ViewNews",n.ViewInstrument="ViewInstrument",n.ViewAnalysis="ViewAnalysis"},21614:(e,t,n)=>{"use strict";var i;n.r(t),n.d(t,{NIL:()=>k,parse:()=>m,stringify:()=>d,v1:()=>g,v3:()=>A,v4:()=>L,v5:()=>O,validate:()=>a,version:()=>I});var r=new Uint8Array(16);function o(){if(!i&&!(i="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return i(r)}const s=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,a=function(e){return"string"==typeof e&&s.test(e)};for(var l=[],u=0;u<256;++u)l.push((u+256).toString(16).substr(1));const d=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(l[e[t+0]]+l[e[t+1]]+l[e[t+2]]+l[e[t+3]]+"-"+l[e[t+4]]+l[e[t+5]]+"-"+l[e[t+6]]+l[e[t+7]]+"-"+l[e[t+8]]+l[e[t+9]]+"-"+l[e[t+10]]+l[e[t+11]]+l[e[t+12]]+l[e[t+13]]+l[e[t+14]]+l[e[t+15]]).toLowerCase();if(!a(n))throw TypeError("Stringified UUID is invalid");return n};var c,f,h=0,p=0;const g=function(e,t,n){var i=t&&n||0,r=t||new Array(16),s=(e=e||{}).node||c,a=void 0!==e.clockseq?e.clockseq:f;if(null==s||null==a){var l=e.random||(e.rng||o)();null==s&&(s=c=[1|l[0],l[1],l[2],l[3],l[4],l[5]]),null==a&&(a=f=16383&(l[6]<<8|l[7]))}var u=void 0!==e.msecs?e.msecs:Date.now(),g=void 0!==e.nsecs?e.nsecs:p+1,m=u-h+(g-p)/1e4;if(m<0&&void 0===e.clockseq&&(a=a+1&16383),(m<0||u>h)&&void 0===e.nsecs&&(g=0),g>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");h=u,p=g,f=a;var w=(1e4*(268435455&(u+=122192928e5))+g)%4294967296;r[i++]=w>>>24&255,r[i++]=w>>>16&255,r[i++]=w>>>8&255,r[i++]=255&w;var y=u/4294967296*1e4&268435455;r[i++]=y>>>8&255,r[i++]=255&y,r[i++]=y>>>24&15|16,r[i++]=y>>>16&255,r[i++]=a>>>8|128,r[i++]=255&a;for(var v=0;v<6;++v)r[i+v]=s[v];return t||d(r)},m=function(e){if(!a(e))throw TypeError("Invalid UUID");var t,n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n};function w(e,t,n){function i(e,i,r,o){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=[],n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t}(e)),"string"==typeof i&&(i=m(i)),16!==i.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var s=new Uint8Array(16+e.length);if(s.set(i),s.set(e,i.length),(s=n(s))[6]=15&s[6]|t,s[8]=63&s[8]|128,r){o=o||0;for(var a=0;a<16;++a)r[o+a]=s[a];return r}return d(s)}try{i.name=e}catch(e){}return i.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",i.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",i}function y(e){return 14+(e+64>>>9<<4)+1}function v(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function b(e,t,n,i,r,o){return v((s=v(v(t,e),v(i,o)))<<(a=r)|s>>>32-a,n);var s,a}function S(e,t,n,i,r,o,s){return b(t&n|~t&i,e,t,r,o,s)}function C(e,t,n,i,r,o,s){return b(t&i|n&~i,e,t,r,o,s)}function _(e,t,n,i,r,o,s){return b(t^n^i,e,t,r,o,s)}function W(e,t,n,i,r,o,s){return b(n^(t|~i),e,t,r,o,s)}const A=w("v3",48,(function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var n=0;n<t.length;++n)e[n]=t.charCodeAt(n)}return function(e){for(var t=[],n=32*e.length,i="0123456789abcdef",r=0;r<n;r+=8){var o=e[r>>5]>>>r%32&255,s=parseInt(i.charAt(o>>>4&15)+i.charAt(15&o),16);t.push(s)}return t}(function(e,t){e[t>>5]|=128<<t%32,e[y(t)-1]=t;for(var n=1732584193,i=-271733879,r=-1732584194,o=271733878,s=0;s<e.length;s+=16){var a=n,l=i,u=r,d=o;n=S(n,i,r,o,e[s],7,-680876936),o=S(o,n,i,r,e[s+1],12,-389564586),r=S(r,o,n,i,e[s+2],17,606105819),i=S(i,r,o,n,e[s+3],22,-1044525330),n=S(n,i,r,o,e[s+4],7,-176418897),o=S(o,n,i,r,e[s+5],12,1200080426),r=S(r,o,n,i,e[s+6],17,-1473231341),i=S(i,r,o,n,e[s+7],22,-45705983),n=S(n,i,r,o,e[s+8],7,1770035416),o=S(o,n,i,r,e[s+9],12,-1958414417),r=S(r,o,n,i,e[s+10],17,-42063),i=S(i,r,o,n,e[s+11],22,-1990404162),n=S(n,i,r,o,e[s+12],7,1804603682),o=S(o,n,i,r,e[s+13],12,-40341101),r=S(r,o,n,i,e[s+14],17,-1502002290),n=C(n,i=S(i,r,o,n,e[s+15],22,1236535329),r,o,e[s+1],5,-165796510),o=C(o,n,i,r,e[s+6],9,-1069501632),r=C(r,o,n,i,e[s+11],14,643717713),i=C(i,r,o,n,e[s],20,-373897302),n=C(n,i,r,o,e[s+5],5,-701558691),o=C(o,n,i,r,e[s+10],9,38016083),r=C(r,o,n,i,e[s+15],14,-660478335),i=C(i,r,o,n,e[s+4],20,-405537848),n=C(n,i,r,o,e[s+9],5,568446438),o=C(o,n,i,r,e[s+14],9,-1019803690),r=C(r,o,n,i,e[s+3],14,-187363961),i=C(i,r,o,n,e[s+8],20,1163531501),n=C(n,i,r,o,e[s+13],5,-1444681467),o=C(o,n,i,r,e[s+2],9,-51403784),r=C(r,o,n,i,e[s+7],14,1735328473),n=_(n,i=C(i,r,o,n,e[s+12],20,-1926607734),r,o,e[s+5],4,-378558),o=_(o,n,i,r,e[s+8],11,-2022574463),r=_(r,o,n,i,e[s+11],16,1839030562),i=_(i,r,o,n,e[s+14],23,-35309556),n=_(n,i,r,o,e[s+1],4,-1530992060),o=_(o,n,i,r,e[s+4],11,1272893353),r=_(r,o,n,i,e[s+7],16,-155497632),i=_(i,r,o,n,e[s+10],23,-1094730640),n=_(n,i,r,o,e[s+13],4,681279174),o=_(o,n,i,r,e[s],11,-358537222),r=_(r,o,n,i,e[s+3],16,-722521979),i=_(i,r,o,n,e[s+6],23,76029189),n=_(n,i,r,o,e[s+9],4,-640364487),o=_(o,n,i,r,e[s+12],11,-421815835),r=_(r,o,n,i,e[s+15],16,530742520),n=W(n,i=_(i,r,o,n,e[s+2],23,-995338651),r,o,e[s],6,-198630844),o=W(o,n,i,r,e[s+7],10,1126891415),r=W(r,o,n,i,e[s+14],15,-1416354905),i=W(i,r,o,n,e[s+5],21,-57434055),n=W(n,i,r,o,e[s+12],6,1700485571),o=W(o,n,i,r,e[s+3],10,-1894986606),r=W(r,o,n,i,e[s+10],15,-1051523),i=W(i,r,o,n,e[s+1],21,-2054922799),n=W(n,i,r,o,e[s+8],6,1873313359),o=W(o,n,i,r,e[s+15],10,-30611744),r=W(r,o,n,i,e[s+6],15,-1560198380),i=W(i,r,o,n,e[s+13],21,1309151649),n=W(n,i,r,o,e[s+4],6,-145523070),o=W(o,n,i,r,e[s+11],10,-1120210379),r=W(r,o,n,i,e[s+2],15,718787259),i=W(i,r,o,n,e[s+9],21,-343485551),n=v(n,a),i=v(i,l),r=v(r,u),o=v(o,d)}return[n,i,r,o]}(function(e){if(0===e.length)return[];for(var t=8*e.length,n=new Uint32Array(y(t)),i=0;i<t;i+=8)n[i>>5]|=(255&e[i/8])<<i%32;return n}(e),8*e.length))})),L=function(e,t,n){var i=(e=e||{}).random||(e.rng||o)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t){n=n||0;for(var r=0;r<16;++r)t[n+r]=i[r];return t}return d(i)};function E(e,t,n,i){switch(e){case 0:return t&n^~t&i;case 1:case 3:return t^n^i;case 2:return t&n^t&i^n&i}}function T(e,t){return e<<t|e>>>32-t}const O=w("v5",80,(function(e){var t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var i=unescape(encodeURIComponent(e));e=[];for(var r=0;r<i.length;++r)e.push(i.charCodeAt(r))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var o=e.length/4+2,s=Math.ceil(o/16),a=new Array(s),l=0;l<s;++l){for(var u=new Uint32Array(16),d=0;d<16;++d)u[d]=e[64*l+4*d]<<24|e[64*l+4*d+1]<<16|e[64*l+4*d+2]<<8|e[64*l+4*d+3];a[l]=u}a[s-1][14]=8*(e.length-1)/Math.pow(2,32),a[s-1][14]=Math.floor(a[s-1][14]),a[s-1][15]=8*(e.length-1)&4294967295;for(var c=0;c<s;++c){for(var f=new Uint32Array(80),h=0;h<16;++h)f[h]=a[c][h];for(var p=16;p<80;++p)f[p]=T(f[p-3]^f[p-8]^f[p-14]^f[p-16],1);for(var g=n[0],m=n[1],w=n[2],y=n[3],v=n[4],b=0;b<80;++b){var S=Math.floor(b/20),C=T(g,5)+E(S,m,w,y)+v+t[S]+f[b]>>>0;v=y,y=w,w=T(m,30)>>>0,m=g,g=C}n[0]=n[0]+g>>>0,n[1]=n[1]+m>>>0,n[2]=n[2]+w>>>0,n[3]=n[3]+y>>>0,n[4]=n[4]+v>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]})),k="00000000-0000-0000-0000-000000000000",I=function(e){if(!a(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}},1641:(e,t,n)=>{"use strict";function i(e,...t){return(...n)=>e(...t,...n)}function r(e){return function(...t){var n=t.pop();return e.call(this,t,n)}}n.r(t),n.d(t,{default:()=>pt,apply:()=>i,applyEach:()=>k,applyEachSeries:()=>N,asyncify:()=>c,auto:()=>F,autoInject:()=>$,cargo:()=>q,cargoQueue:()=>V,compose:()=>K,concat:()=>Z,concatLimit:()=>J,concatSeries:()=>X,constant:()=>ee,detect:()=>ne,detectLimit:()=>ie,detectSeries:()=>re,dir:()=>se,doUntil:()=>le,doWhilst:()=>ae,each:()=>de,eachLimit:()=>ce,eachOf:()=>T,eachOfLimit:()=>A,eachOfSeries:()=>I,eachSeries:()=>fe,ensureAsync:()=>he,every:()=>pe,everyLimit:()=>ge,everySeries:()=>me,filter:()=>be,filterLimit:()=>Se,filterSeries:()=>Ce,forever:()=>_e,groupBy:()=>Ae,groupByLimit:()=>We,groupBySeries:()=>Le,log:()=>Ee,map:()=>O,mapLimit:()=>Q,mapSeries:()=>R,mapValues:()=>Oe,mapValuesLimit:()=>Te,mapValuesSeries:()=>ke,memoize:()=>Ie,nextTick:()=>Re,parallel:()=>Pe,parallelLimit:()=>Me,priorityQueue:()=>Be,queue:()=>Fe,race:()=>$e,reduce:()=>z,reduceRight:()=>Ue,reflect:()=>He,reflectAll:()=>Ge,reject:()=>Ve,rejectLimit:()=>ze,rejectSeries:()=>Ye,retry:()=>Qe,retryable:()=>Ze,seq:()=>Y,series:()=>Xe,setImmediate:()=>d,some:()=>et,someLimit:()=>tt,someSeries:()=>nt,sortBy:()=>it,timeout:()=>rt,times:()=>st,timesLimit:()=>ot,timesSeries:()=>at,transform:()=>lt,tryEach:()=>ut,unmemoize:()=>dt,until:()=>ft,waterfall:()=>ht,whilst:()=>ct,all:()=>pe,allLimit:()=>ge,allSeries:()=>me,any:()=>et,anyLimit:()=>tt,anySeries:()=>nt,find:()=>ne,findLimit:()=>ie,findSeries:()=>re,flatMap:()=>Z,flatMapLimit:()=>J,flatMapSeries:()=>X,forEach:()=>de,forEachSeries:()=>fe,forEachLimit:()=>ce,forEachOf:()=>T,forEachOfSeries:()=>I,forEachOfLimit:()=>A,inject:()=>z,foldl:()=>z,foldr:()=>Ue,select:()=>be,selectLimit:()=>Se,selectSeries:()=>Ce,wrapSync:()=>c,during:()=>ct,doDuring:()=>ae});var o="function"==typeof queueMicrotask&&queueMicrotask,s="function"==typeof setImmediate&&setImmediate,a="object"==typeof process&&"function"==typeof process.nextTick;function l(e){setTimeout(e,0)}function u(e){return(t,...n)=>e((()=>t(...n)))}var d=u(o?queueMicrotask:s?setImmediate:a?process.nextTick:l);function c(e){return p(e)?function(...t){const n=t.pop();return f(e.apply(this,t),n)}:r((function(t,n){var i;try{i=e.apply(this,t)}catch(e){return n(e)}if(i&&"function"==typeof i.then)return f(i,n);n(null,i)}))}function f(e,t){return e.then((e=>{h(t,null,e)}),(e=>{h(t,e&&e.message?e:new Error(e))}))}function h(e,t,n){try{e(t,n)}catch(e){d((e=>{throw e}),e)}}function p(e){return"AsyncFunction"===e[Symbol.toStringTag]}function g(e){if("function"!=typeof e)throw new Error("expected a function");return p(e)?c(e):e}function m(e,t=e.length){if(!t)throw new Error("arity is undefined");return function(...n){return"function"==typeof n[t-1]?e.apply(this,n):new Promise(((i,r)=>{n[t-1]=(e,...t)=>{if(e)return r(e);i(t.length>1?t:t[0])},e.apply(this,n)}))}}function w(e){return function(t,...n){return m((function(i){var r=this;return e(t,((e,t)=>{g(e).apply(r,n.concat(t))}),i)}))}}function y(e,t,n,i){t=t||[];var r=[],o=0,s=g(n);return e(t,((e,t,n)=>{var i=o++;s(e,((e,t)=>{r[i]=t,n(e)}))}),(e=>{i(e,r)}))}function v(e){return e&&"number"==typeof e.length&&e.length>=0&&e.length%1==0}const b={};function S(e){function t(...t){if(null!==e){var n=e;e=null,n.apply(this,t)}}return Object.assign(t,e),t}function C(e){return function(...t){if(null===e)throw new Error("Callback was already called.");var n=e;e=null,n.apply(this,t)}}function _(e,t,n,i){let r=!1,o=!1,s=!1,a=0,l=0;function u(){a>=t||s||r||(s=!0,e.next().then((({value:e,done:t})=>{if(!o&&!r){if(s=!1,t)return r=!0,void(a<=0&&i(null));a++,n(e,l,d),l++,u()}})).catch(c))}function d(e,t){if(a-=1,!o)return e?c(e):!1===e?(r=!0,void(o=!0)):t===b||r&&a<=0?(r=!0,i(null)):void u()}function c(e){o||(s=!1,r=!0,i(e))}u()}var W=e=>(t,n,i)=>{if(i=S(i),e<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!t)return i(null);if("AsyncGenerator"===t[Symbol.toStringTag])return _(t,e,n,i);if(function(e){return"function"==typeof e[Symbol.asyncIterator]}(t))return _(t[Symbol.asyncIterator](),e,n,i);var r=function(e){if(v(e))return function(e){var t=-1,n=e.length;return function(){return++t<n?{value:e[t],key:t}:null}}(e);var t,n,i,r,o=function(e){return e[Symbol.iterator]&&e[Symbol.iterator]()}(e);return o?function(e){var t=-1;return function(){var n=e.next();return n.done?null:(t++,{value:n.value,key:t})}}(o):(n=(t=e)?Object.keys(t):[],i=-1,r=n.length,function e(){var o=n[++i];return"__proto__"===o?e():i<r?{value:t[o],key:o}:null})}(t),o=!1,s=!1,a=0,l=!1;function u(e,t){if(!s)if(a-=1,e)o=!0,i(e);else if(!1===e)o=!0,s=!0;else{if(t===b||o&&a<=0)return o=!0,i(null);l||d()}}function d(){for(l=!0;a<e&&!o;){var t=r();if(null===t)return o=!0,void(a<=0&&i(null));a+=1,n(t.value,t.key,C(u))}l=!1}d()},A=m((function(e,t,n,i){return W(t)(e,g(n),i)}),4);function L(e,t,n){n=S(n);var i=0,r=0,{length:o}=e,s=!1;function a(e,t){!1===e&&(s=!0),!0!==s&&(e?n(e):++r!==o&&t!==b||n(null))}for(0===o&&n(null);i<o;i++)t(e[i],i,C(a))}function E(e,t,n){return A(e,1/0,t,n)}var T=m((function(e,t,n){return(v(e)?L:E)(e,g(t),n)}),3),O=m((function(e,t,n){return y(T,e,t,n)}),3),k=w(O),I=m((function(e,t,n){return A(e,1,t,n)}),3),R=m((function(e,t,n){return y(I,e,t,n)}),3),N=w(R);const P=Symbol("promiseCallback");function M(){let e,t;function n(n,...i){if(n)return t(n);e(i.length>1?i:i[0])}return n[P]=new Promise(((n,i)=>{e=n,t=i})),n}function F(e,t,n){"number"!=typeof t&&(n=t,t=null),n=S(n||M());var i=Object.keys(e).length;if(!i)return n(null);t||(t=i);var r={},o=0,s=!1,a=!1,l=Object.create(null),u=[],d=[],c={};function f(e,t){u.push((()=>function(e,t){if(!a){var i=C(((t,...i)=>{if(o--,!1!==t)if(i.length<2&&([i]=i),t){var u={};if(Object.keys(r).forEach((e=>{u[e]=r[e]})),u[e]=i,a=!0,l=Object.create(null),s)return;n(t,u)}else r[e]=i,(l[e]||[]).forEach((e=>e())),h();else s=!0}));o++;var u=g(t[t.length-1]);t.length>1?u(r,i):u(i)}}(e,t)))}function h(){if(!s){if(0===u.length&&0===o)return n(null,r);for(;u.length&&o<t;)u.shift()()}}function p(t){var n=[];return Object.keys(e).forEach((i=>{const r=e[i];Array.isArray(r)&&r.indexOf(t)>=0&&n.push(i)})),n}return Object.keys(e).forEach((t=>{var n=e[t];if(!Array.isArray(n))return f(t,[n]),void d.push(t);var i=n.slice(0,n.length-1),r=i.length;if(0===r)return f(t,n),void d.push(t);c[t]=r,i.forEach((o=>{if(!e[o])throw new Error("async.auto task `"+t+"` has a non-existent dependency `"+o+"` in "+i.join(", "));var s,a;(a=l[s=o])||(a=l[s]=[]),a.push((()=>{0==--r&&f(t,n)}))}))})),function(){for(var e=0;d.length;)e++,p(d.pop()).forEach((e=>{0==--c[e]&&d.push(e)}));if(e!==i)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}(),h(),n[P]}var D=/^(?:async\s+)?(?:function)?\s*\w*\s*\(\s*([^)]+)\s*\)(?:\s*{)/,j=/^(?:async\s+)?\(?\s*([^)=]+)\s*\)?(?:\s*=>)/,x=/,/,B=/(=.+)?(\s*)$/;function $(e,t){var n={};return Object.keys(e).forEach((t=>{var i,r=e[t],o=p(r),s=!o&&1===r.length||o&&0===r.length;if(Array.isArray(r))i=[...r],r=i.pop(),n[t]=i.concat(i.length>0?a:r);else if(s)n[t]=r;else{if(i=function(e){const t=function(e){let t="",n=0,i=e.indexOf("*/");for(;n<e.length;)if("/"===e[n]&&"/"===e[n+1]){let t=e.indexOf("\n",n);n=-1===t?e.length:t}else if(-1!==i&&"/"===e[n]&&"*"===e[n+1]){let r=e.indexOf("*/",n);-1!==r?(n=r+2,i=e.indexOf("*/",n)):(t+=e[n],n++)}else t+=e[n],n++;return t}(e.toString());let n=t.match(D);if(n||(n=t.match(j)),!n)throw new Error("could not parse args in autoInject\nSource:\n"+t);let[,i]=n;return i.replace(/\s/g,"").split(x).map((e=>e.replace(B,"").trim()))}(r),0===r.length&&!o&&0===i.length)throw new Error("autoInject task functions require explicit parameters.");o||i.pop(),n[t]=i.concat(a)}function a(e,t){var n=i.map((t=>e[t]));n.push(t),g(r)(...n)}})),F(n,t)}class U{constructor(){this.head=this.tail=null,this.length=0}removeLink(e){return e.prev?e.prev.next=e.next:this.head=e.next,e.next?e.next.prev=e.prev:this.tail=e.prev,e.prev=e.next=null,this.length-=1,e}empty(){for(;this.head;)this.shift();return this}insertAfter(e,t){t.prev=e,t.next=e.next,e.next?e.next.prev=t:this.tail=t,e.next=t,this.length+=1}insertBefore(e,t){t.prev=e.prev,t.next=e,e.prev?e.prev.next=t:this.head=t,e.prev=t,this.length+=1}unshift(e){this.head?this.insertBefore(this.head,e):H(this,e)}push(e){this.tail?this.insertAfter(this.tail,e):H(this,e)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){for(var e=this.head;e;)yield e.data,e=e.next}remove(e){for(var t=this.head;t;){var{next:n}=t;e(t)&&this.removeLink(t),t=n}return this}}function H(e,t){e.length=1,e.head=e.tail=t}function G(e,t,n){if(null==t)t=1;else if(0===t)throw new RangeError("Concurrency must not be zero");var i=g(e),r=0,o=[];const s={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function a(e,t){return e?t?void(s[e]=s[e].filter((e=>e!==t))):s[e]=[]:Object.keys(s).forEach((e=>s[e]=[]))}function l(e,...t){s[e].forEach((e=>e(...t)))}var u=!1;function c(e,t,n,i){if(null!=i&&"function"!=typeof i)throw new Error("task callback must be a function");var r,o;function s(e,...t){return e?n?o(e):r():t.length<=1?r(t[0]):void r(t)}w.started=!0;var a={data:e,callback:n?s:i||s};if(t?w._tasks.unshift(a):w._tasks.push(a),u||(u=!0,d((()=>{u=!1,w.process()}))),n||!i)return new Promise(((e,t)=>{r=e,o=t}))}function f(e){return function(t,...n){r-=1;for(var i=0,s=e.length;i<s;i++){var a=e[i],u=o.indexOf(a);0===u?o.shift():u>0&&o.splice(u,1),a.callback(t,...n),null!=t&&l("error",t,a.data)}r<=w.concurrency-w.buffer&&l("unsaturated"),w.idle()&&l("drain"),w.process()}}function h(e){return!(0!==e.length||!w.idle()||(d((()=>l("drain"))),0))}const p=e=>t=>{if(!t)return new Promise(((t,n)=>{!function(e,i){const r=(...i)=>{a(e,r),((e,i)=>{if(e)return n(e);t(i)})(...i)};s[e].push(r)}(e)}));a(e),function(e,t){s[e].push(t)}(e,t)};var m=!1,w={_tasks:new U,*[Symbol.iterator](){yield*w._tasks[Symbol.iterator]()},concurrency:t,payload:n,buffer:t/4,started:!1,paused:!1,push(e,t){if(Array.isArray(e)){if(h(e))return;return e.map((e=>c(e,!1,!1,t)))}return c(e,!1,!1,t)},pushAsync(e,t){if(Array.isArray(e)){if(h(e))return;return e.map((e=>c(e,!1,!0,t)))}return c(e,!1,!0,t)},kill(){a(),w._tasks.empty()},unshift(e,t){if(Array.isArray(e)){if(h(e))return;return e.map((e=>c(e,!0,!1,t)))}return c(e,!0,!1,t)},unshiftAsync(e,t){if(Array.isArray(e)){if(h(e))return;return e.map((e=>c(e,!0,!0,t)))}return c(e,!0,!0,t)},remove(e){w._tasks.remove(e)},process(){if(!m){for(m=!0;!w.paused&&r<w.concurrency&&w._tasks.length;){var e=[],t=[],n=w._tasks.length;w.payload&&(n=Math.min(n,w.payload));for(var s=0;s<n;s++){var a=w._tasks.shift();e.push(a),o.push(a),t.push(a.data)}r+=1,0===w._tasks.length&&l("empty"),r===w.concurrency&&l("saturated");var u=C(f(e));i(t,u)}m=!1}},length:()=>w._tasks.length,running:()=>r,workersList:()=>o,idle:()=>w._tasks.length+r===0,pause(){w.paused=!0},resume(){!1!==w.paused&&(w.paused=!1,d(w.process))}};return Object.defineProperties(w,{saturated:{writable:!1,value:p("saturated")},unsaturated:{writable:!1,value:p("unsaturated")},empty:{writable:!1,value:p("empty")},drain:{writable:!1,value:p("drain")},error:{writable:!1,value:p("error")}}),w}function q(e,t){return G(e,1,t)}function V(e,t,n){return G(e,t,n)}var z=m((function(e,t,n,i){i=S(i);var r=g(n);return I(e,((e,n,i)=>{r(t,e,((e,n)=>{t=n,i(e)}))}),(e=>i(e,t)))}),4);function Y(...e){var t=e.map(g);return function(...e){var n=this,i=e[e.length-1];return"function"==typeof i?e.pop():i=M(),z(t,e,((e,t,i)=>{t.apply(n,e.concat(((e,...t)=>{i(e,t)})))}),((e,t)=>i(e,...t))),i[P]}}function K(...e){return Y(...e.reverse())}var Q=m((function(e,t,n,i){return y(W(t),e,n,i)}),4),J=m((function(e,t,n,i){var r=g(n);return Q(e,t,((e,t)=>{r(e,((e,...n)=>e?t(e):t(e,n)))}),((e,t)=>{for(var n=[],r=0;r<t.length;r++)t[r]&&(n=n.concat(...t[r]));return i(e,n)}))}),4),Z=m((function(e,t,n){return J(e,1/0,t,n)}),3),X=m((function(e,t,n){return J(e,1,t,n)}),3);function ee(...e){return function(...t){return t.pop()(null,...e)}}function te(e,t){return(n,i,r,o)=>{var s,a=!1;const l=g(r);n(i,((n,i,r)=>{l(n,((i,o)=>i||!1===i?r(i):e(o)&&!s?(a=!0,s=t(!0,n),r(null,b)):void r()))}),(e=>{if(e)return o(e);o(null,a?s:t(!1))}))}}var ne=m((function(e,t,n){return te((e=>e),((e,t)=>t))(T,e,t,n)}),3),ie=m((function(e,t,n,i){return te((e=>e),((e,t)=>t))(W(t),e,n,i)}),4),re=m((function(e,t,n){return te((e=>e),((e,t)=>t))(W(1),e,t,n)}),3);function oe(e){return(t,...n)=>g(t)(...n,((t,...n)=>{"object"==typeof console&&(t?console.error&&console.error(t):console[e]&&n.forEach((t=>console[e](t))))}))}var se=oe("dir"),ae=m((function(e,t,n){n=C(n);var i,r=g(e),o=g(t);function s(e,...t){if(e)return n(e);!1!==e&&(i=t,o(...t,a))}function a(e,t){return e?n(e):!1!==e?t?void r(s):n(null,...i):void 0}return a(null,!0)}),3);function le(e,t,n){const i=g(t);return ae(e,((...e)=>{const t=e.pop();i(...e,((e,n)=>t(e,!n)))}),n)}function ue(e){return(t,n,i)=>e(t,i)}var de=m((function(e,t,n){return T(e,ue(g(t)),n)}),3),ce=m((function(e,t,n,i){return W(t)(e,ue(g(n)),i)}),4),fe=m((function(e,t,n){return ce(e,1,t,n)}),3);function he(e){return p(e)?e:function(...t){var n=t.pop(),i=!0;t.push(((...e)=>{i?d((()=>n(...e))):n(...e)})),e.apply(this,t),i=!1}}var pe=m((function(e,t,n){return te((e=>!e),(e=>!e))(T,e,t,n)}),3),ge=m((function(e,t,n,i){return te((e=>!e),(e=>!e))(W(t),e,n,i)}),4),me=m((function(e,t,n){return te((e=>!e),(e=>!e))(I,e,t,n)}),3);function we(e,t,n,i){var r=new Array(t.length);e(t,((e,t,i)=>{n(e,((e,n)=>{r[t]=!!n,i(e)}))}),(e=>{if(e)return i(e);for(var n=[],o=0;o<t.length;o++)r[o]&&n.push(t[o]);i(null,n)}))}function ye(e,t,n,i){var r=[];e(t,((e,t,i)=>{n(e,((n,o)=>{if(n)return i(n);o&&r.push({index:t,value:e}),i(n)}))}),(e=>{if(e)return i(e);i(null,r.sort(((e,t)=>e.index-t.index)).map((e=>e.value)))}))}function ve(e,t,n,i){return(v(t)?we:ye)(e,t,g(n),i)}var be=m((function(e,t,n){return ve(T,e,t,n)}),3),Se=m((function(e,t,n,i){return ve(W(t),e,n,i)}),4),Ce=m((function(e,t,n){return ve(I,e,t,n)}),3),_e=m((function(e,t){var n=C(t),i=g(he(e));return function e(t){if(t)return n(t);!1!==t&&i(e)}()}),2),We=m((function(e,t,n,i){var r=g(n);return Q(e,t,((e,t)=>{r(e,((n,i)=>n?t(n):t(n,{key:i,val:e})))}),((e,t)=>{for(var n={},{hasOwnProperty:r}=Object.prototype,o=0;o<t.length;o++)if(t[o]){var{key:s}=t[o],{val:a}=t[o];r.call(n,s)?n[s].push(a):n[s]=[a]}return i(e,n)}))}),4);function Ae(e,t,n){return We(e,1/0,t,n)}function Le(e,t,n){return We(e,1,t,n)}var Ee=oe("log"),Te=m((function(e,t,n,i){i=S(i);var r={},o=g(n);return W(t)(e,((e,t,n)=>{o(e,t,((e,i)=>{if(e)return n(e);r[t]=i,n(e)}))}),(e=>i(e,r)))}),4);function Oe(e,t,n){return Te(e,1/0,t,n)}function ke(e,t,n){return Te(e,1,t,n)}function Ie(e,t=(e=>e)){var n=Object.create(null),i=Object.create(null),o=g(e),s=r(((e,r)=>{var s=t(...e);s in n?d((()=>r(null,...n[s]))):s in i?i[s].push(r):(i[s]=[r],o(...e,((e,...t)=>{e||(n[s]=t);var r=i[s];delete i[s];for(var o=0,a=r.length;o<a;o++)r[o](e,...t)})))}));return s.memo=n,s.unmemoized=e,s}var Re=u(a?process.nextTick:s?setImmediate:l),Ne=m(((e,t,n)=>{var i=v(t)?[]:{};e(t,((e,t,n)=>{g(e)(((e,...r)=>{r.length<2&&([r]=r),i[t]=r,n(e)}))}),(e=>n(e,i)))}),3);function Pe(e,t){return Ne(T,e,t)}function Me(e,t,n){return Ne(W(t),e,n)}function Fe(e,t){var n=g(e);return G(((e,t)=>{n(e[0],t)}),t,1)}class De{constructor(){this.heap=[],this.pushCount=Number.MIN_SAFE_INTEGER}get length(){return this.heap.length}empty(){return this.heap=[],this}percUp(e){let t;for(;e>0&&xe(this.heap[e],this.heap[t=je(e)]);){let n=this.heap[e];this.heap[e]=this.heap[t],this.heap[t]=n,e=t}}percDown(e){let t;for(;(t=1+(e<<1))<this.heap.length&&(t+1<this.heap.length&&xe(this.heap[t+1],this.heap[t])&&(t+=1),!xe(this.heap[e],this.heap[t]));){let n=this.heap[e];this.heap[e]=this.heap[t],this.heap[t]=n,e=t}}push(e){e.pushCount=++this.pushCount,this.heap.push(e),this.percUp(this.heap.length-1)}unshift(e){return this.heap.push(e)}shift(){let[e]=this.heap;return this.heap[0]=this.heap[this.heap.length-1],this.heap.pop(),this.percDown(0),e}toArray(){return[...this]}*[Symbol.iterator](){for(let e=0;e<this.heap.length;e++)yield this.heap[e].data}remove(e){let t=0;for(let n=0;n<this.heap.length;n++)e(this.heap[n])||(this.heap[t]=this.heap[n],t++);this.heap.splice(t);for(let e=je(this.heap.length-1);e>=0;e--)this.percDown(e);return this}}function je(e){return(e+1>>1)-1}function xe(e,t){return e.priority!==t.priority?e.priority<t.priority:e.pushCount<t.pushCount}function Be(e,t){var n=Fe(e,t),i=!1;return n._tasks=new De,n.push=function(e,t=0,r=(()=>{})){if("function"!=typeof r)throw new Error("task callback must be a function");if(n.started=!0,Array.isArray(e)||(e=[e]),0===e.length&&n.idle())return d((()=>n.drain()));for(var o=0,s=e.length;o<s;o++){var a={data:e[o],priority:t,callback:r};n._tasks.push(a)}i||(i=!0,d((()=>{i=!1,n.process()})))},delete n.unshift,n}var $e=m((function(e,t){if(t=S(t),!Array.isArray(e))return t(new TypeError("First argument to race must be an array of functions"));if(!e.length)return t();for(var n=0,i=e.length;n<i;n++)g(e[n])(t)}),2);function Ue(e,t,n,i){var r=[...e].reverse();return z(r,t,n,i)}function He(e){var t=g(e);return r((function(e,n){return e.push(((e,...t)=>{let i={};if(e&&(i.error=e),t.length>0){var r=t;t.length<=1&&([r]=t),i.value=r}n(null,i)})),t.apply(this,e)}))}function Ge(e){var t;return Array.isArray(e)?t=e.map(He):(t={},Object.keys(e).forEach((n=>{t[n]=He.call(this,e[n])}))),t}function qe(e,t,n,i){const r=g(n);return ve(e,t,((e,t)=>{r(e,((e,n)=>{t(e,!n)}))}),i)}var Ve=m((function(e,t,n){return qe(T,e,t,n)}),3),ze=m((function(e,t,n,i){return qe(W(t),e,n,i)}),4),Ye=m((function(e,t,n){return qe(I,e,t,n)}),3);function Ke(e){return function(){return e}}function Qe(e,t,n){var i={times:5,intervalFunc:Ke(0)};if(arguments.length<3&&"function"==typeof e?(n=t||M(),t=e):(Je(i,e),n=n||M()),"function"!=typeof t)throw new Error("Invalid arguments for async.retry");var r=g(t),o=1;function s(){r(((e,...t)=>{!1!==e&&(e&&o++<i.times&&("function"!=typeof i.errorFilter||i.errorFilter(e))?setTimeout(s,i.intervalFunc(o-1)):n(e,...t))}))}return s(),n[P]}function Je(e,t){if("object"==typeof t)e.times=+t.times||5,e.intervalFunc="function"==typeof t.interval?t.interval:Ke(+t.interval||0),e.errorFilter=t.errorFilter;else{if("number"!=typeof t&&"string"!=typeof t)throw new Error("Invalid arguments for async.retry");e.times=+t||5}}function Ze(e,t){t||(t=e,e=null);let n=e&&e.arity||t.length;p(t)&&(n+=1);var i=g(t);return r(((t,r)=>{function o(e){i(...t,e)}return(t.length<n-1||null==r)&&(t.push(r),r=M()),e?Qe(e,o,r):Qe(o,r),r[P]}))}function Xe(e,t){return Ne(I,e,t)}var et=m((function(e,t,n){return te(Boolean,(e=>e))(T,e,t,n)}),3),tt=m((function(e,t,n,i){return te(Boolean,(e=>e))(W(t),e,n,i)}),4),nt=m((function(e,t,n){return te(Boolean,(e=>e))(I,e,t,n)}),3),it=m((function(e,t,n){var i=g(t);return O(e,((e,t)=>{i(e,((n,i)=>{if(n)return t(n);t(n,{value:e,criteria:i})}))}),((e,t)=>{if(e)return n(e);n(null,t.sort(r).map((e=>e.value)))}));function r(e,t){var n=e.criteria,i=t.criteria;return n<i?-1:n>i?1:0}}),3);function rt(e,t,n){var i=g(e);return r(((r,o)=>{var s,a=!1;r.push(((...e)=>{a||(o(...e),clearTimeout(s))})),s=setTimeout((function(){var t=e.name||"anonymous",i=new Error('Callback function "'+t+'" timed out.');i.code="ETIMEDOUT",n&&(i.info=n),a=!0,o(i)}),t),i(...r)}))}function ot(e,t,n,i){var r=g(n);return Q(function(e){for(var t=Array(e);e--;)t[e]=e;return t}(e),t,r,i)}function st(e,t,n){return ot(e,1/0,t,n)}function at(e,t,n){return ot(e,1,t,n)}function lt(e,t,n,i){arguments.length<=3&&"function"==typeof t&&(i=n,n=t,t=Array.isArray(e)?[]:{}),i=S(i||M());var r=g(n);return T(e,((e,n,i)=>{r(t,e,n,i)}),(e=>i(e,t))),i[P]}var ut=m((function(e,t){var n,i=null;return fe(e,((e,t)=>{g(e)(((e,...r)=>{if(!1===e)return t(e);r.length<2?[n]=r:n=r,i=e,t(e?null:{})}))}),(()=>t(i,n)))}));function dt(e){return(...t)=>(e.unmemoized||e)(...t)}var ct=m((function(e,t,n){n=C(n);var i=g(t),r=g(e),o=[];function s(e,...t){if(e)return n(e);o=t,!1!==e&&r(a)}function a(e,t){return e?n(e):!1!==e?t?void i(s):n(null,...o):void 0}return r(a)}),3);function ft(e,t,n){const i=g(e);return ct((e=>i(((t,n)=>e(t,!n)))),t,n)}var ht=m((function(e,t){if(t=S(t),!Array.isArray(e))return t(new Error("First argument to waterfall must be an array of functions"));if(!e.length)return t();var n=0;function i(t){g(e[n++])(...t,C(r))}function r(r,...o){if(!1!==r)return r||n===e.length?t(r,...o):void i(o)}i([])}));const pt={apply:i,applyEach:k,applyEachSeries:N,asyncify:c,auto:F,autoInject:$,cargo:q,cargoQueue:V,compose:K,concat:Z,concatLimit:J,concatSeries:X,constant:ee,detect:ne,detectLimit:ie,detectSeries:re,dir:se,doUntil:le,doWhilst:ae,each:de,eachLimit:ce,eachOf:T,eachOfLimit:A,eachOfSeries:I,eachSeries:fe,ensureAsync:he,every:pe,everyLimit:ge,everySeries:me,filter:be,filterLimit:Se,filterSeries:Ce,forever:_e,groupBy:Ae,groupByLimit:We,groupBySeries:Le,log:Ee,map:O,mapLimit:Q,mapSeries:R,mapValues:Oe,mapValuesLimit:Te,mapValuesSeries:ke,memoize:Ie,nextTick:Re,parallel:Pe,parallelLimit:Me,priorityQueue:Be,queue:Fe,race:$e,reduce:z,reduceRight:Ue,reflect:He,reflectAll:Ge,reject:Ve,rejectLimit:ze,rejectSeries:Ye,retry:Qe,retryable:Ze,seq:Y,series:Xe,setImmediate:d,some:et,someLimit:tt,someSeries:nt,sortBy:it,timeout:rt,times:st,timesLimit:ot,timesSeries:at,transform:lt,tryEach:ut,unmemoize:dt,until:ft,waterfall:ht,whilst:ct,all:pe,allLimit:ge,allSeries:me,any:et,anyLimit:tt,anySeries:nt,find:ne,findLimit:ie,findSeries:re,flatMap:Z,flatMapLimit:J,flatMapSeries:X,forEach:de,forEachSeries:fe,forEachLimit:ce,forEachOf:T,forEachOfSeries:I,forEachOfLimit:A,inject:z,foldl:z,foldr:Ue,select:be,selectLimit:Se,selectSeries:Ce,wrapSync:c,during:ct,doDuring:ae}},83027:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});class i{value;next;constructor(e){this.value=e}}class r{#e;#t;#n;constructor(){this.clear()}enqueue(e){const t=new i(e);this.#e?(this.#t.next=t,this.#t=t):(this.#e=t,this.#t=t),this.#n++}dequeue(){const e=this.#e;if(e)return this.#e=this.#e.next,this.#n--,e.value}clear(){this.#e=void 0,this.#t=void 0,this.#n=0}get size(){return this.#n}*[Symbol.iterator](){let e=this.#e;for(;e;)yield e.value,e=e.next}}function o(e){if(!Number.isInteger(e)&&e!==Number.POSITIVE_INFINITY||!(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,i,r)=>{n++;const o=(async()=>e(...r))();i(o);try{await o}catch{}n--,t.size>0&&t.dequeue()()},o=(r,...o)=>new Promise((s=>{((r,o,s)=>{t.enqueue(i.bind(void 0,r,o,s)),(async()=>{await Promise.resolve(),n<e&&t.size>0&&t.dequeue()()})()})(r,s,o)}));return Object.defineProperties(o,{activeCount:{get:()=>n},pendingCount:{get:()=>t.size},clearQueue:{value:()=>{t.clear()}}}),o}},62711:e=>{"use strict";e.exports=JSON.parse('{"F":{"0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","backspace":"Backspace","bs":"Backspace","bksp":"Backspace","tab":"Tab","escape":"Escape","esc":"Escape","clear":"Clear","enter":"Enter","return":"Enter","shift":"Shift","shft":"Shift","lshift":"Shift","lshft":"Shift","left shift":"Shift","leftshift":"Shift","rshift":"Shift","rshft":"Shift","right shift":"Shift","rightshift":"Shift","control":"Control","ctrl":"Control","commandorcontrol":"CommandOrControl","alt":"Alt","alternate":"Alt","pause":"Pause","caps lock":"Capslock","capslock":"Capslock","spacebar":"Space","space":"Space","space bar":"Space","page up":"PageUp","pgup":"PageUp","pg up":"PageUp","page down":"PageDown","pgdn":"PageDown","pg dn":"PageDown","pgdown":"PageDown","end":"End","home":"Home","left arrow":"Left","left":"Left","up arrow":"Up","up":"Up","right arrow":"Right","right":"Right","down arrow":"Down","down":"Down","select":"Select","slct":"Select","print":"PrintScreen","prnt":"PrintScreen","execute":"Execute","print screen":"PrintScreen","printscreen":"PrintScreen","print scrn":"PrintScreen","printscrn":"PrintScreen","prnt scrn":"PrintScreen","prntscrn":"PrintScreen","prt scrn":"PrintScreen","prtscrn":"PrintScreen","prt scn":"PrintScreen","prtscn":"PrintScreen","prt scr":"PrintScreen","prtscr":"PrintScreen","prt sc":"PrintScreen","prtsc":"PrintScreen","pr sc":"PrintScreen","prsc":"PrintScreen","insert":"Insert","ins":"Insert","delete":"Delete","del":"Delete","a":"A","b":"B","c":"C","d":"D","e":"E","f":"F","g":"G","h":"H","i":"I","j":"J","k":"K","l":"L","m":"M","n":"N","o":"O","p":"P","q":"Q","r":"R","s":"S","t":"T","u":"U","v":"V","w":"W","x":"X","y":"Y","z":"Z","windows":"Super","left windows":"Super","right windows":"Super","numpad 0":"num0","numpad 1":"num1","numpad 2":"num2","numpad 3":"num3","numpad 4":"num4","numpad 5":"num5","numpad 6":"num6","numpad 7":"num7","numpad 8":"num8","numpad 9":"num9","f1":"F1","fn1":"F1","function 1":"F1","f2":"F2","fn2":"F2","function 2":"F2","f3":"F3","fn3":"F3","function 3":"F3","f4":"F4","fn4":"F4","function 4":"F4","f5":"F5","fn5":"F5","function 5":"F5","f6":"F6","fn6":"F6","function 6":"F6","f7":"F7","fn7":"F7","function 7":"F7","f8":"F8","fn8":"F8","function 8":"F8","f9":"F9","fn9":"F9","function 9":"F9","f10":"F10","fn10":"F10","function 10":"F10","f11":"F11","fn11":"F11","function 11":"F11","f12":"F12","fn12":"F12","function 12":"F12","f13":"F13","fn":"F13","function 13":"F13","f14":"F14","fn14":"F14","function 14":"F14","f15":"F15","fn15":"F15","function 15":"F15","f16":"F16","fn16":"F16","function 16":"F16","num lock":"Numlock","numlock":"Numlock","number lock":"Numlock","numeric lock":"Numlock","scroll lock":"Scrolllock","sclk":"Scrolllock","scrlk":"Scrolllock","slk":"Scrolllock","*":"*","+":"+","-":"-","/":"/",";":";","=":"=",",":",","_":"-",".":".","`":"`","[":"[","]":"]","\'":"\'"}}')}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var o=t[i]={id:i,loaded:!1,exports:{}};return e[i].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},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),n(1918)})();
|
|
2
|
+
(()=>{var e={9996: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 i(e,t){return!1!==t.clone&&t.isMergeableObject(e)?a((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function r(e,t,n){return e.concat(t).map((function(e){return i(e,n)}))}function o(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return e.propertyIsEnumerable(t)})):[]}(e))}function s(e,t){try{return t in e}catch(e){return!1}}function a(e,n,l){(l=l||{}).arrayMerge=l.arrayMerge||r,l.isMergeableObject=l.isMergeableObject||t,l.cloneUnlessOtherwiseSpecified=i;var u=Array.isArray(n);return u===Array.isArray(e)?u?l.arrayMerge(e,n,l):function(e,t,n){var r={};return n.isMergeableObject(e)&&o(e).forEach((function(t){r[t]=i(e[t],n)})),o(t).forEach((function(o){(function(e,t){return s(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,o)||(s(e,o)&&n.isMergeableObject(t[o])?r[o]=function(e,t){if(!t.customMerge)return a;var n=t.customMerge(e);return"function"==typeof n?n:a}(o,n)(e[o],t[o],n):r[o]=i(t[o],n))})),r}(e,n,l):i(n,l)}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 l=a;e.exports=l},17187:e=>{"use strict";var t,n="object"==typeof Reflect?Reflect:null,i=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var r=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(n,i){function r(n){e.removeListener(t,o),i(n)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",r),n([].slice.call(arguments))}g(e,t,o,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&g(e,"error",t,{once:!0})}(e,r)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function u(e,t,n,i){var r,o,s,u;if(a(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),s=o[t]),void 0===s)s=o[t]=n,++e._eventsCount;else if("function"==typeof s?s=o[t]=i?[n,s]:[s,n]:i?s.unshift(n):s.push(n),(r=l(e))>0&&s.length>r&&!s.warned){s.warned=!0;var d=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");d.name="MaxListenersExceededWarning",d.emitter=e,d.type=t,d.count=s.length,u=d,console&&console.warn&&console.warn(u)}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 i={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},r=d.bind(i);return r.listener=n,i.wrapFn=r,r}function f(e,t,n){var i=e._events;if(void 0===i)return[];var r=i[t];return void 0===r?[]:"function"==typeof r?n?[r.listener||r]:[r]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(r):p(r,r.length)}function h(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 p(e,t){for(var n=new Array(t),i=0;i<t;++i)n[i]=e[i];return n}function g(e,t,n,i){if("function"==typeof e.on)i.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function r(o){i.once&&e.removeEventListener(t,r),n(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||r(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||r(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return l(this)},o.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,o=this._events;if(void 0!==o)r=r&&void 0===o.error;else if(!r)return!1;if(r){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var l=o[e];if(void 0===l)return!1;if("function"==typeof l)i(l,this,t);else{var u=l.length,d=p(l,u);for(n=0;n<u;++n)i(d[n],this,t)}return!0},o.prototype.addListener=function(e,t){return u(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return u(this,e,t,!0)},o.prototype.once=function(e,t){return a(t),this.on(e,c(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,c(this,e,t)),this},o.prototype.removeListener=function(e,t){var n,i,r,o,s;if(a(t),void 0===(i=this._events))return this;if(void 0===(n=i[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(r=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){s=n[o].listener,r=o;break}if(r<0)return this;0===r?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,r),1===n.length&&(i[e]=n[0]),void 0!==i.removeListener&&this.emit("removeListener",e,s||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,n,i;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var r,o=Object.keys(n);for(i=0;i<o.length;++i)"removeListener"!==(r=o[i])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(i=t.length-1;i>=0;i--)this.removeListener(e,t[i]);return this},o.prototype.listeners=function(e){return f(this,e,!0)},o.prototype.rawListeners=function(e){return f(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},o.prototype.listenerCount=h,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},18552:(e,t,n)=>{var i=n(10852)(n(55639),"DataView");e.exports=i},1989:(e,t,n)=>{var i=n(51789),r=n(80401),o=n(57667),s=n(21327),a=n(81866);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}l.prototype.clear=i,l.prototype.delete=r,l.prototype.get=o,l.prototype.has=s,l.prototype.set=a,e.exports=l},38407:(e,t,n)=>{var i=n(27040),r=n(14125),o=n(82117),s=n(67518),a=n(54705);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}l.prototype.clear=i,l.prototype.delete=r,l.prototype.get=o,l.prototype.has=s,l.prototype.set=a,e.exports=l},57071:(e,t,n)=>{var i=n(10852)(n(55639),"Map");e.exports=i},83369:(e,t,n)=>{var i=n(24785),r=n(11285),o=n(96e3),s=n(49916),a=n(95265);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}l.prototype.clear=i,l.prototype.delete=r,l.prototype.get=o,l.prototype.has=s,l.prototype.set=a,e.exports=l},53818:(e,t,n)=>{var i=n(10852)(n(55639),"Promise");e.exports=i},58525:(e,t,n)=>{var i=n(10852)(n(55639),"Set");e.exports=i},88668:(e,t,n)=>{var i=n(83369),r=n(90619),o=n(72385);function s(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new i;++t<n;)this.add(e[t])}s.prototype.add=s.prototype.push=r,s.prototype.has=o,e.exports=s},46384:(e,t,n)=>{var i=n(38407),r=n(37465),o=n(63779),s=n(67599),a=n(44758),l=n(34309);function u(e){var t=this.__data__=new i(e);this.size=t.size}u.prototype.clear=r,u.prototype.delete=o,u.prototype.get=s,u.prototype.has=a,u.prototype.set=l,e.exports=u},62705:(e,t,n)=>{var i=n(55639).Symbol;e.exports=i},11149:(e,t,n)=>{var i=n(55639).Uint8Array;e.exports=i},70577:(e,t,n)=>{var i=n(10852)(n(55639),"WeakMap");e.exports=i},96874: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)}},77412:e=>{e.exports=function(e,t){for(var n=-1,i=null==e?0:e.length;++n<i&&!1!==t(e[n],n,e););return e}},34963:e=>{e.exports=function(e,t){for(var n=-1,i=null==e?0:e.length,r=0,o=[];++n<i;){var s=e[n];t(s,n,e)&&(o[r++]=s)}return o}},14636:(e,t,n)=>{var i=n(22545),r=n(35694),o=n(1469),s=n(44144),a=n(65776),l=n(36719),u=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=o(e),d=!n&&r(e),c=!n&&!d&&s(e),f=!n&&!d&&!c&&l(e),h=n||d||c||f,p=h?i(e.length,String):[],g=p.length;for(var m in e)!t&&!u.call(e,m)||h&&("length"==m||c&&("offset"==m||"parent"==m)||f&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||a(m,g))||p.push(m);return p}},29932:e=>{e.exports=function(e,t){for(var n=-1,i=null==e?0:e.length,r=Array(i);++n<i;)r[n]=t(e[n],n,e);return r}},62488:e=>{e.exports=function(e,t){for(var n=-1,i=t.length,r=e.length;++n<i;)e[r+n]=t[n];return e}},82908:e=>{e.exports=function(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(t(e[n],n,e))return!0;return!1}},34865:(e,t,n)=>{var i=n(89465),r=n(77813),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var s=e[t];o.call(e,t)&&r(s,n)&&(void 0!==n||t in e)||i(e,t,n)}},18470:(e,t,n)=>{var i=n(77813);e.exports=function(e,t){for(var n=e.length;n--;)if(i(e[n][0],t))return n;return-1}},44037:(e,t,n)=>{var i=n(98363),r=n(3674);e.exports=function(e,t){return e&&i(t,r(t),e)}},63886:(e,t,n)=>{var i=n(98363),r=n(81704);e.exports=function(e,t){return e&&i(t,r(t),e)}},89465:(e,t,n)=>{var i=n(38777);e.exports=function(e,t,n){"__proto__"==t&&i?i(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},85990:(e,t,n)=>{var i=n(46384),r=n(77412),o=n(34865),s=n(44037),a=n(63886),l=n(64626),u=n(278),d=n(18805),c=n(1911),f=n(58234),h=n(46904),p=n(64160),g=n(43824),m=n(29148),w=n(38517),y=n(1469),v=n(44144),b=n(56688),S=n(13218),C=n(72928),_=n(3674),W=n(81704),A="[object Arguments]",L="[object Function]",E="[object Object]",T={};T[A]=T["[object Array]"]=T["[object ArrayBuffer]"]=T["[object DataView]"]=T["[object Boolean]"]=T["[object Date]"]=T["[object Float32Array]"]=T["[object Float64Array]"]=T["[object Int8Array]"]=T["[object Int16Array]"]=T["[object Int32Array]"]=T["[object Map]"]=T["[object Number]"]=T[E]=T["[object RegExp]"]=T["[object Set]"]=T["[object String]"]=T["[object Symbol]"]=T["[object Uint8Array]"]=T["[object Uint8ClampedArray]"]=T["[object Uint16Array]"]=T["[object Uint32Array]"]=!0,T["[object Error]"]=T[L]=T["[object WeakMap]"]=!1,e.exports=function e(t,n,O,k,I,R){var N,P=1&n,M=2&n,F=4&n;if(O&&(N=I?O(t,k,I,R):O(t)),void 0!==N)return N;if(!S(t))return t;var D=y(t);if(D){if(N=g(t),!P)return u(t,N)}else{var j=p(t),x=j==L||"[object GeneratorFunction]"==j;if(v(t))return l(t,P);if(j==E||j==A||x&&!I){if(N=M||x?{}:w(t),!P)return M?c(t,a(N,t)):d(t,s(N,t))}else{if(!T[j])return I?t:{};N=m(t,j,P)}}R||(R=new i);var B=R.get(t);if(B)return B;R.set(t,N),C(t)?t.forEach((function(i){N.add(e(i,n,O,i,t,R))})):b(t)&&t.forEach((function(i,r){N.set(r,e(i,n,O,r,t,R))}));var $=D?void 0:(F?M?h:f:M?W:_)(t);return r($||t,(function(i,r){$&&(i=t[r=i]),o(N,r,e(i,n,O,r,t,R))})),N}},3118:(e,t,n)=>{var i=n(13218),r=Object.create,o=function(){function e(){}return function(t){if(!i(t))return{};if(r)return r(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=o},21078:(e,t,n)=>{var i=n(62488),r=n(37285);e.exports=function e(t,n,o,s,a){var l=-1,u=t.length;for(o||(o=r),a||(a=[]);++l<u;){var d=t[l];n>0&&o(d)?n>1?e(d,n-1,o,s,a):i(a,d):s||(a[a.length]=d)}return a}},97786:(e,t,n)=>{var i=n(71811),r=n(40327);e.exports=function(e,t){for(var n=0,o=(t=i(t,e)).length;null!=e&&n<o;)e=e[r(t[n++])];return n&&n==o?e:void 0}},68866:(e,t,n)=>{var i=n(62488),r=n(1469);e.exports=function(e,t,n){var o=t(e);return r(e)?o:i(o,n(e))}},44239:(e,t,n)=>{var i=n(62705),r=n(89607),o=n(2333),s=i?i.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":s&&s in Object(e)?r(e):o(e)}},13:e=>{e.exports=function(e,t){return null!=e&&t in Object(e)}},9454:(e,t,n)=>{var i=n(44239),r=n(37005);e.exports=function(e){return r(e)&&"[object Arguments]"==i(e)}},90939:(e,t,n)=>{var i=n(2492),r=n(37005);e.exports=function e(t,n,o,s,a){return t===n||(null==t||null==n||!r(t)&&!r(n)?t!=t&&n!=n:i(t,n,o,s,e,a))}},2492:(e,t,n)=>{var i=n(46384),r=n(67114),o=n(18351),s=n(16096),a=n(64160),l=n(1469),u=n(44144),d=n(36719),c="[object Arguments]",f="[object Array]",h="[object Object]",p=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,g,m,w){var y=l(e),v=l(t),b=y?f:a(e),S=v?f:a(t),C=(b=b==c?h:b)==h,_=(S=S==c?h:S)==h,W=b==S;if(W&&u(e)){if(!u(t))return!1;y=!0,C=!1}if(W&&!C)return w||(w=new i),y||d(e)?r(e,t,n,g,m,w):o(e,t,b,n,g,m,w);if(!(1&n)){var A=C&&p.call(e,"__wrapped__"),L=_&&p.call(t,"__wrapped__");if(A||L){var E=A?e.value():e,T=L?t.value():t;return w||(w=new i),m(E,T,n,g,w)}}return!!W&&(w||(w=new i),s(e,t,n,g,m,w))}},25588:(e,t,n)=>{var i=n(64160),r=n(37005);e.exports=function(e){return r(e)&&"[object Map]"==i(e)}},28458:(e,t,n)=>{var i=n(23560),r=n(15346),o=n(13218),s=n(80346),a=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,d=l.toString,c=u.hasOwnProperty,f=RegExp("^"+d.call(c).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||r(e))&&(i(e)?f:a).test(s(e))}},29221:(e,t,n)=>{var i=n(64160),r=n(37005);e.exports=function(e){return r(e)&&"[object Set]"==i(e)}},38749:(e,t,n)=>{var i=n(44239),r=n(41780),o=n(37005),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&r(e.length)&&!!s[i(e)]}},280:(e,t,n)=>{var i=n(25726),r=n(86916),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!i(e))return r(e);var t=[];for(var n in Object(e))o.call(e,n)&&"constructor"!=n&&t.push(n);return t}},10313:(e,t,n)=>{var i=n(13218),r=n(25726),o=n(33498),s=Object.prototype.hasOwnProperty;e.exports=function(e){if(!i(e))return o(e);var t=r(e),n=[];for(var a in e)("constructor"!=a||!t&&s.call(e,a))&&n.push(a);return n}},25970:(e,t,n)=>{var i=n(63012),r=n(79095);e.exports=function(e,t){return i(e,t,(function(t,n){return r(e,n)}))}},63012:(e,t,n)=>{var i=n(97786),r=n(10611),o=n(71811);e.exports=function(e,t,n){for(var s=-1,a=t.length,l={};++s<a;){var u=t[s],d=i(e,u);n(d,u)&&r(l,o(u,e),d)}return l}},10611:(e,t,n)=>{var i=n(34865),r=n(71811),o=n(65776),s=n(13218),a=n(40327);e.exports=function(e,t,n,l){if(!s(e))return e;for(var u=-1,d=(t=r(t,e)).length,c=d-1,f=e;null!=f&&++u<d;){var h=a(t[u]),p=n;if("__proto__"===h||"constructor"===h||"prototype"===h)return e;if(u!=c){var g=f[h];void 0===(p=l?l(g,h,f):void 0)&&(p=s(g)?g:o(t[u+1])?[]:{})}i(f,h,p),f=f[h]}return e}},56560:(e,t,n)=>{var i=n(75703),r=n(38777),o=n(6557),s=r?function(e,t){return r(e,"toString",{configurable:!0,enumerable:!1,value:i(t),writable:!0})}:o;e.exports=s},22545:e=>{e.exports=function(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}},80531:(e,t,n)=>{var i=n(62705),r=n(29932),o=n(1469),s=n(33448),a=i?i.prototype:void 0,l=a?a.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(o(t))return r(t,e)+"";if(s(t))return l?l.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},27561:(e,t,n)=>{var i=n(67990),r=/^\s+/;e.exports=function(e){return e?e.slice(0,i(e)+1).replace(r,""):e}},7518:e=>{e.exports=function(e){return function(t){return e(t)}}},74757:e=>{e.exports=function(e,t){return e.has(t)}},71811:(e,t,n)=>{var i=n(1469),r=n(15403),o=n(55514),s=n(79833);e.exports=function(e,t){return i(e)?e:r(e,t)?[e]:o(s(e))}},74318:(e,t,n)=>{var i=n(11149);e.exports=function(e){var t=new e.constructor(e.byteLength);return new i(t).set(new i(e)),t}},64626:(e,t,n)=>{e=n.nmd(e);var i=n(55639),r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,s=o&&o.exports===r?i.Buffer:void 0,a=s?s.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,i=a?a(n):new e.constructor(n);return e.copy(i),i}},57157:(e,t,n)=>{var i=n(74318);e.exports=function(e,t){var n=t?i(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},93147:e=>{var t=/\w*$/;e.exports=function(e){var n=new e.constructor(e.source,t.exec(e));return n.lastIndex=e.lastIndex,n}},40419:(e,t,n)=>{var i=n(62705),r=i?i.prototype:void 0,o=r?r.valueOf:void 0;e.exports=function(e){return o?Object(o.call(e)):{}}},77133:(e,t,n)=>{var i=n(74318);e.exports=function(e,t){var n=t?i(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},278:e=>{e.exports=function(e,t){var n=-1,i=e.length;for(t||(t=Array(i));++n<i;)t[n]=e[n];return t}},98363:(e,t,n)=>{var i=n(34865),r=n(89465);e.exports=function(e,t,n,o){var s=!n;n||(n={});for(var a=-1,l=t.length;++a<l;){var u=t[a],d=o?o(n[u],e[u],u,n,e):void 0;void 0===d&&(d=e[u]),s?r(n,u,d):i(n,u,d)}return n}},18805:(e,t,n)=>{var i=n(98363),r=n(99551);e.exports=function(e,t){return i(e,r(e),t)}},1911:(e,t,n)=>{var i=n(98363),r=n(51442);e.exports=function(e,t){return i(e,r(e),t)}},14429:(e,t,n)=>{var i=n(55639)["__core-js_shared__"];e.exports=i},38777:(e,t,n)=>{var i=n(10852),r=function(){try{var e=i(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=r},67114:(e,t,n)=>{var i=n(88668),r=n(82908),o=n(74757);e.exports=function(e,t,n,s,a,l){var u=1&n,d=e.length,c=t.length;if(d!=c&&!(u&&c>d))return!1;var f=l.get(e),h=l.get(t);if(f&&h)return f==t&&h==e;var p=-1,g=!0,m=2&n?new i:void 0;for(l.set(e,t),l.set(t,e);++p<d;){var w=e[p],y=t[p];if(s)var v=u?s(y,w,p,t,e,l):s(w,y,p,e,t,l);if(void 0!==v){if(v)continue;g=!1;break}if(m){if(!r(t,(function(e,t){if(!o(m,t)&&(w===e||a(w,e,n,s,l)))return m.push(t)}))){g=!1;break}}else if(w!==y&&!a(w,y,n,s,l)){g=!1;break}}return l.delete(e),l.delete(t),g}},18351:(e,t,n)=>{var i=n(62705),r=n(11149),o=n(77813),s=n(67114),a=n(68776),l=n(21814),u=i?i.prototype:void 0,d=u?u.valueOf:void 0;e.exports=function(e,t,n,i,u,c,f){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!c(new r(e),new r(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var h=a;case"[object Set]":var p=1&i;if(h||(h=l),e.size!=t.size&&!p)return!1;var g=f.get(e);if(g)return g==t;i|=2,f.set(e,t);var m=s(h(e),h(t),i,u,c,f);return f.delete(e),m;case"[object Symbol]":if(d)return d.call(e)==d.call(t)}return!1}},16096:(e,t,n)=>{var i=n(58234),r=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,o,s,a){var l=1&n,u=i(e),d=u.length;if(d!=i(t).length&&!l)return!1;for(var c=d;c--;){var f=u[c];if(!(l?f in t:r.call(t,f)))return!1}var h=a.get(e),p=a.get(t);if(h&&p)return h==t&&p==e;var g=!0;a.set(e,t),a.set(t,e);for(var m=l;++c<d;){var w=e[f=u[c]],y=t[f];if(o)var v=l?o(y,w,f,t,e,a):o(w,y,f,e,t,a);if(!(void 0===v?w===y||s(w,y,n,o,a):v)){g=!1;break}m||(m="constructor"==f)}if(g&&!m){var b=e.constructor,S=t.constructor;b==S||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof S&&S instanceof S||(g=!1)}return a.delete(e),a.delete(t),g}},99021:(e,t,n)=>{var i=n(85564),r=n(45357),o=n(30061);e.exports=function(e){return o(r(e,void 0,i),e+"")}},31957:(e,t,n)=>{var i="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=i},58234:(e,t,n)=>{var i=n(68866),r=n(99551),o=n(3674);e.exports=function(e){return i(e,o,r)}},46904:(e,t,n)=>{var i=n(68866),r=n(51442),o=n(81704);e.exports=function(e){return i(e,o,r)}},45050:(e,t,n)=>{var i=n(37019);e.exports=function(e,t){var n=e.__data__;return i(t)?n["string"==typeof t?"string":"hash"]:n.map}},10852:(e,t,n)=>{var i=n(28458),r=n(47801);e.exports=function(e,t){var n=r(e,t);return i(n)?n:void 0}},85924:(e,t,n)=>{var i=n(5569)(Object.getPrototypeOf,Object);e.exports=i},89607:(e,t,n)=>{var i=n(62705),r=Object.prototype,o=r.hasOwnProperty,s=r.toString,a=i?i.toStringTag:void 0;e.exports=function(e){var t=o.call(e,a),n=e[a];try{e[a]=void 0;var i=!0}catch(e){}var r=s.call(e);return i&&(t?e[a]=n:delete e[a]),r}},99551:(e,t,n)=>{var i=n(34963),r=n(70479),o=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols,a=s?function(e){return null==e?[]:(e=Object(e),i(s(e),(function(t){return o.call(e,t)})))}:r;e.exports=a},51442:(e,t,n)=>{var i=n(62488),r=n(85924),o=n(99551),s=n(70479),a=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)i(t,o(e)),e=r(e);return t}:s;e.exports=a},64160:(e,t,n)=>{var i=n(18552),r=n(57071),o=n(53818),s=n(58525),a=n(70577),l=n(44239),u=n(80346),d="[object Map]",c="[object Promise]",f="[object Set]",h="[object WeakMap]",p="[object DataView]",g=u(i),m=u(r),w=u(o),y=u(s),v=u(a),b=l;(i&&b(new i(new ArrayBuffer(1)))!=p||r&&b(new r)!=d||o&&b(o.resolve())!=c||s&&b(new s)!=f||a&&b(new a)!=h)&&(b=function(e){var t=l(e),n="[object Object]"==t?e.constructor:void 0,i=n?u(n):"";if(i)switch(i){case g:return p;case m:return d;case w:return c;case y:return f;case v:return h}return t}),e.exports=b},47801:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},222:(e,t,n)=>{var i=n(71811),r=n(35694),o=n(1469),s=n(65776),a=n(41780),l=n(40327);e.exports=function(e,t,n){for(var u=-1,d=(t=i(t,e)).length,c=!1;++u<d;){var f=l(t[u]);if(!(c=null!=e&&n(e,f)))break;e=e[f]}return c||++u!=d?c:!!(d=null==e?0:e.length)&&a(d)&&s(f,d)&&(o(e)||r(e))}},51789:(e,t,n)=>{var i=n(94536);e.exports=function(){this.__data__=i?i(null):{},this.size=0}},80401:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},57667:(e,t,n)=>{var i=n(94536),r=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(i){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return r.call(t,e)?t[e]:void 0}},21327:(e,t,n)=>{var i=n(94536),r=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return i?void 0!==t[e]:r.call(t,e)}},81866:(e,t,n)=>{var i=n(94536);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=i&&void 0===t?"__lodash_hash_undefined__":t,this}},43824:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e){var n=e.length,i=new e.constructor(n);return n&&"string"==typeof e[0]&&t.call(e,"index")&&(i.index=e.index,i.input=e.input),i}},29148:(e,t,n)=>{var i=n(74318),r=n(57157),o=n(93147),s=n(40419),a=n(77133);e.exports=function(e,t,n){var l=e.constructor;switch(t){case"[object ArrayBuffer]":return i(e);case"[object Boolean]":case"[object Date]":return new l(+e);case"[object DataView]":return r(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return a(e,n);case"[object Map]":case"[object Set]":return new l;case"[object Number]":case"[object String]":return new l(e);case"[object RegExp]":return o(e);case"[object Symbol]":return s(e)}}},38517:(e,t,n)=>{var i=n(3118),r=n(85924),o=n(25726);e.exports=function(e){return"function"!=typeof e.constructor||o(e)?{}:i(r(e))}},37285:(e,t,n)=>{var i=n(62705),r=n(35694),o=n(1469),s=i?i.isConcatSpreadable:void 0;e.exports=function(e){return o(e)||r(e)||!!(s&&e&&e[s])}},65776:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var i=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==i||"symbol"!=i&&t.test(e))&&e>-1&&e%1==0&&e<n}},15403:(e,t,n)=>{var i=n(1469),r=n(33448),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;e.exports=function(e,t){if(i(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!r(e))||s.test(e)||!o.test(e)||null!=t&&e in Object(t)}},37019:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},15346:(e,t,n)=>{var i,r=n(14429),o=(i=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"";e.exports=function(e){return!!o&&o in e}},25726:e=>{var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},27040:e=>{e.exports=function(){this.__data__=[],this.size=0}},14125:(e,t,n)=>{var i=n(18470),r=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=i(t,e);return!(n<0||(n==t.length-1?t.pop():r.call(t,n,1),--this.size,0))}},82117:(e,t,n)=>{var i=n(18470);e.exports=function(e){var t=this.__data__,n=i(t,e);return n<0?void 0:t[n][1]}},67518:(e,t,n)=>{var i=n(18470);e.exports=function(e){return i(this.__data__,e)>-1}},54705:(e,t,n)=>{var i=n(18470);e.exports=function(e,t){var n=this.__data__,r=i(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}},24785:(e,t,n)=>{var i=n(1989),r=n(38407),o=n(57071);e.exports=function(){this.size=0,this.__data__={hash:new i,map:new(o||r),string:new i}}},11285:(e,t,n)=>{var i=n(45050);e.exports=function(e){var t=i(this,e).delete(e);return this.size-=t?1:0,t}},96e3:(e,t,n)=>{var i=n(45050);e.exports=function(e){return i(this,e).get(e)}},49916:(e,t,n)=>{var i=n(45050);e.exports=function(e){return i(this,e).has(e)}},95265:(e,t,n)=>{var i=n(45050);e.exports=function(e,t){var n=i(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}},68776:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,i){n[++t]=[i,e]})),n}},24523:(e,t,n)=>{var i=n(88306);e.exports=function(e){var t=i(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},94536:(e,t,n)=>{var i=n(10852)(Object,"create");e.exports=i},86916:(e,t,n)=>{var i=n(5569)(Object.keys,Object);e.exports=i},33498:e=>{e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},31167:(e,t,n)=>{e=n.nmd(e);var i=n(31957),r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,s=o&&o.exports===r&&i.process,a=function(){try{return o&&o.require&&o.require("util").types||s&&s.binding&&s.binding("util")}catch(e){}}();e.exports=a},2333:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},5569:e=>{e.exports=function(e,t){return function(n){return e(t(n))}}},45357:(e,t,n)=>{var i=n(96874),r=Math.max;e.exports=function(e,t,n){return t=r(void 0===t?e.length-1:t,0),function(){for(var o=arguments,s=-1,a=r(o.length-t,0),l=Array(a);++s<a;)l[s]=o[t+s];s=-1;for(var u=Array(t+1);++s<t;)u[s]=o[s];return u[t]=n(l),i(e,this,u)}}},55639:(e,t,n)=>{var i=n(31957),r="object"==typeof self&&self&&self.Object===Object&&self,o=i||r||Function("return this")();e.exports=o},90619:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},72385:e=>{e.exports=function(e){return this.__data__.has(e)}},21814:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},30061:(e,t,n)=>{var i=n(56560),r=n(21275)(i);e.exports=r},21275:e=>{var t=Date.now;e.exports=function(e){var n=0,i=0;return function(){var r=t(),o=16-(r-i);if(i=r,o>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},37465:(e,t,n)=>{var i=n(38407);e.exports=function(){this.__data__=new i,this.size=0}},63779:e=>{e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},67599:e=>{e.exports=function(e){return this.__data__.get(e)}},44758:e=>{e.exports=function(e){return this.__data__.has(e)}},34309:(e,t,n)=>{var i=n(38407),r=n(57071),o=n(83369);e.exports=function(e,t){var n=this.__data__;if(n instanceof i){var s=n.__data__;if(!r||s.length<199)return s.push([e,t]),this.size=++n.size,this;n=this.__data__=new o(s)}return n.set(e,t),this.size=n.size,this}},55514:(e,t,n)=>{var i=n(24523),r=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,s=i((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(r,(function(e,n,i,r){t.push(i?r.replace(o,"$1"):n||e)})),t}));e.exports=s},40327:(e,t,n)=>{var i=n(33448);e.exports=function(e){if("string"==typeof e||i(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},80346: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""}},67990:e=>{var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},50361:(e,t,n)=>{var i=n(85990);e.exports=function(e){return i(e,5)}},75703:e=>{e.exports=function(e){return function(){return e}}},23279:(e,t,n)=>{var i=n(13218),r=n(7771),o=n(14841),s=Math.max,a=Math.min;e.exports=function(e,t,n){var l,u,d,c,f,h,p=0,g=!1,m=!1,w=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=l,i=u;return l=u=void 0,p=t,c=e.apply(i,n)}function v(e){return p=e,f=setTimeout(S,t),g?y(e):c}function b(e){var n=e-h;return void 0===h||n>=t||n<0||m&&e-p>=d}function S(){var e=r();if(b(e))return C(e);f=setTimeout(S,function(e){var n=t-(e-h);return m?a(n,d-(e-p)):n}(e))}function C(e){return f=void 0,w&&l?y(e):(l=u=void 0,c)}function _(){var e=r(),n=b(e);if(l=arguments,u=this,h=e,n){if(void 0===f)return v(h);if(m)return clearTimeout(f),f=setTimeout(S,t),y(h)}return void 0===f&&(f=setTimeout(S,t)),c}return t=o(t)||0,i(n)&&(g=!!n.leading,d=(m="maxWait"in n)?s(o(n.maxWait)||0,t):d,w="trailing"in n?!!n.trailing:w),_.cancel=function(){void 0!==f&&clearTimeout(f),p=0,l=h=u=f=void 0},_.flush=function(){return void 0===f?c:C(r())},_}},77813:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},85564:(e,t,n)=>{var i=n(21078);e.exports=function(e){return null!=e&&e.length?i(e,1):[]}},27361:(e,t,n)=>{var i=n(97786);e.exports=function(e,t,n){var r=null==e?void 0:i(e,t);return void 0===r?n:r}},79095:(e,t,n)=>{var i=n(13),r=n(222);e.exports=function(e,t){return null!=e&&r(e,t,i)}},6557:e=>{e.exports=function(e){return e}},35694:(e,t,n)=>{var i=n(9454),r=n(37005),o=Object.prototype,s=o.hasOwnProperty,a=o.propertyIsEnumerable,l=i(function(){return arguments}())?i:function(e){return r(e)&&s.call(e,"callee")&&!a.call(e,"callee")};e.exports=l},1469:e=>{var t=Array.isArray;e.exports=t},98612:(e,t,n)=>{var i=n(23560),r=n(41780);e.exports=function(e){return null!=e&&r(e.length)&&!i(e)}},44144:(e,t,n)=>{e=n.nmd(e);var i=n(55639),r=n(95062),o=t&&!t.nodeType&&t,s=o&&e&&!e.nodeType&&e,a=s&&s.exports===o?i.Buffer:void 0,l=(a?a.isBuffer:void 0)||r;e.exports=l},18446:(e,t,n)=>{var i=n(90939);e.exports=function(e,t){return i(e,t)}},28368:(e,t,n)=>{var i=n(90939);e.exports=function(e,t,n){var r=(n="function"==typeof n?n:void 0)?n(e,t):void 0;return void 0===r?i(e,t,void 0,n):!!r}},23560:(e,t,n)=>{var i=n(44239),r=n(13218);e.exports=function(e){if(!r(e))return!1;var t=i(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},41780:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},56688:(e,t,n)=>{var i=n(25588),r=n(7518),o=n(31167),s=o&&o.isMap,a=s?r(s):i;e.exports=a},13218:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},37005:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},72928:(e,t,n)=>{var i=n(29221),r=n(7518),o=n(31167),s=o&&o.isSet,a=s?r(s):i;e.exports=a},33448:(e,t,n)=>{var i=n(44239),r=n(37005);e.exports=function(e){return"symbol"==typeof e||r(e)&&"[object Symbol]"==i(e)}},36719:(e,t,n)=>{var i=n(38749),r=n(7518),o=n(31167),s=o&&o.isTypedArray,a=s?r(s):i;e.exports=a},3674:(e,t,n)=>{var i=n(14636),r=n(280),o=n(98612);e.exports=function(e){return o(e)?i(e):r(e)}},81704:(e,t,n)=>{var i=n(14636),r=n(10313),o=n(98612);e.exports=function(e){return o(e)?i(e,!0):r(e)}},96486:function(e,t,n){var i;e=n.nmd(e),function(){var r,o="Expected a function",s="__lodash_hash_undefined__",a="__lodash_placeholder__",l=32,u=128,d=1/0,c=9007199254740991,f=NaN,h=4294967295,p=[["ary",u],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",l],["partialRight",64],["rearg",256]],g="[object Arguments]",m="[object Array]",w="[object Boolean]",y="[object Date]",v="[object Error]",b="[object Function]",S="[object GeneratorFunction]",C="[object Map]",_="[object Number]",W="[object Object]",A="[object Promise]",L="[object RegExp]",E="[object Set]",T="[object String]",O="[object Symbol]",k="[object WeakMap]",I="[object ArrayBuffer]",R="[object DataView]",N="[object Float32Array]",P="[object Float64Array]",M="[object Int8Array]",F="[object Int16Array]",D="[object Int32Array]",j="[object Uint8Array]",x="[object Uint8ClampedArray]",B="[object Uint16Array]",$="[object Uint32Array]",U=/\b__p \+= '';/g,H=/\b(__p \+=) '' \+/g,G=/(__e\(.*?\)|\b__t\)) \+\n'';/g,q=/&(?:amp|lt|gt|quot|#39);/g,V=/[&<>"']/g,z=RegExp(q.source),Y=RegExp(V.source),K=/<%-([\s\S]+?)%>/g,Q=/<%([\s\S]+?)%>/g,J=/<%=([\s\S]+?)%>/g,Z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,X=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,ne=RegExp(te.source),ie=/^\s+/,re=/\s/,oe=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,se=/\{\n\/\* \[wrapped with (.+)\] \*/,ae=/,? & /,le=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ue=/[()=,{}\[\]\/\s]/,de=/\\(\\)?/g,ce=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,fe=/\w*$/,he=/^[-+]0x[0-9a-f]+$/i,pe=/^0b[01]+$/i,ge=/^\[object .+?Constructor\]$/,me=/^0o[0-7]+$/i,we=/^(?:0|[1-9]\d*)$/,ye=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ve=/($^)/,be=/['\n\r\u2028\u2029\\]/g,Se="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ce="a-z\\xdf-\\xf6\\xf8-\\xff",_e="A-Z\\xc0-\\xd6\\xd8-\\xde",We="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ae="["+We+"]",Le="["+Se+"]",Ee="\\d+",Te="["+Ce+"]",Oe="[^\\ud800-\\udfff"+We+Ee+"\\u2700-\\u27bf"+Ce+_e+"]",ke="\\ud83c[\\udffb-\\udfff]",Ie="[^\\ud800-\\udfff]",Re="(?:\\ud83c[\\udde6-\\uddff]){2}",Ne="[\\ud800-\\udbff][\\udc00-\\udfff]",Pe="["+_e+"]",Me="(?:"+Te+"|"+Oe+")",Fe="(?:"+Pe+"|"+Oe+")",De="(?:['’](?:d|ll|m|re|s|t|ve))?",je="(?:['’](?:D|LL|M|RE|S|T|VE))?",xe="(?:"+Le+"|"+ke+")?",Be="[\\ufe0e\\ufe0f]?",$e=Be+xe+"(?:\\u200d(?:"+[Ie,Re,Ne].join("|")+")"+Be+xe+")*",Ue="(?:"+["[\\u2700-\\u27bf]",Re,Ne].join("|")+")"+$e,He="(?:"+[Ie+Le+"?",Le,Re,Ne,"[\\ud800-\\udfff]"].join("|")+")",Ge=RegExp("['’]","g"),qe=RegExp(Le,"g"),Ve=RegExp(ke+"(?="+ke+")|"+He+$e,"g"),ze=RegExp([Pe+"?"+Te+"+"+De+"(?="+[Ae,Pe,"$"].join("|")+")",Fe+"+"+je+"(?="+[Ae,Pe+Me,"$"].join("|")+")",Pe+"?"+Me+"+"+De,Pe+"+"+je,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ee,Ue].join("|"),"g"),Ye=RegExp("[\\u200d\\ud800-\\udfff"+Se+"\\ufe0e\\ufe0f]"),Ke=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Qe=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Je=-1,Ze={};Ze[N]=Ze[P]=Ze[M]=Ze[F]=Ze[D]=Ze[j]=Ze[x]=Ze[B]=Ze[$]=!0,Ze[g]=Ze[m]=Ze[I]=Ze[w]=Ze[R]=Ze[y]=Ze[v]=Ze[b]=Ze[C]=Ze[_]=Ze[W]=Ze[L]=Ze[E]=Ze[T]=Ze[k]=!1;var Xe={};Xe[g]=Xe[m]=Xe[I]=Xe[R]=Xe[w]=Xe[y]=Xe[N]=Xe[P]=Xe[M]=Xe[F]=Xe[D]=Xe[C]=Xe[_]=Xe[W]=Xe[L]=Xe[E]=Xe[T]=Xe[O]=Xe[j]=Xe[x]=Xe[B]=Xe[$]=!0,Xe[v]=Xe[b]=Xe[k]=!1;var et={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},tt=parseFloat,nt=parseInt,it="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,rt="object"==typeof self&&self&&self.Object===Object&&self,ot=it||rt||Function("return this")(),st=t&&!t.nodeType&&t,at=st&&e&&!e.nodeType&&e,lt=at&&at.exports===st,ut=lt&&it.process,dt=function(){try{return at&&at.require&&at.require("util").types||ut&&ut.binding&&ut.binding("util")}catch(e){}}(),ct=dt&&dt.isArrayBuffer,ft=dt&&dt.isDate,ht=dt&&dt.isMap,pt=dt&&dt.isRegExp,gt=dt&&dt.isSet,mt=dt&&dt.isTypedArray;function wt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function yt(e,t,n,i){for(var r=-1,o=null==e?0:e.length;++r<o;){var s=e[r];t(i,s,n(s),e)}return i}function vt(e,t){for(var n=-1,i=null==e?0:e.length;++n<i&&!1!==t(e[n],n,e););return e}function bt(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function St(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(!t(e[n],n,e))return!1;return!0}function Ct(e,t){for(var n=-1,i=null==e?0:e.length,r=0,o=[];++n<i;){var s=e[n];t(s,n,e)&&(o[r++]=s)}return o}function _t(e,t){return!(null==e||!e.length)&&Nt(e,t,0)>-1}function Wt(e,t,n){for(var i=-1,r=null==e?0:e.length;++i<r;)if(n(t,e[i]))return!0;return!1}function At(e,t){for(var n=-1,i=null==e?0:e.length,r=Array(i);++n<i;)r[n]=t(e[n],n,e);return r}function Lt(e,t){for(var n=-1,i=t.length,r=e.length;++n<i;)e[r+n]=t[n];return e}function Et(e,t,n,i){var r=-1,o=null==e?0:e.length;for(i&&o&&(n=e[++r]);++r<o;)n=t(n,e[r],r,e);return n}function Tt(e,t,n,i){var r=null==e?0:e.length;for(i&&r&&(n=e[--r]);r--;)n=t(n,e[r],r,e);return n}function Ot(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(t(e[n],n,e))return!0;return!1}var kt=Dt("length");function It(e,t,n){var i;return n(e,(function(e,n,r){if(t(e,n,r))return i=n,!1})),i}function Rt(e,t,n,i){for(var r=e.length,o=n+(i?1:-1);i?o--:++o<r;)if(t(e[o],o,e))return o;return-1}function Nt(e,t,n){return t==t?function(e,t,n){for(var i=n-1,r=e.length;++i<r;)if(e[i]===t)return i;return-1}(e,t,n):Rt(e,Mt,n)}function Pt(e,t,n,i){for(var r=n-1,o=e.length;++r<o;)if(i(e[r],t))return r;return-1}function Mt(e){return e!=e}function Ft(e,t){var n=null==e?0:e.length;return n?Bt(e,t)/n:f}function Dt(e){return function(t){return null==t?r:t[e]}}function jt(e){return function(t){return null==e?r:e[t]}}function xt(e,t,n,i,r){return r(e,(function(e,r,o){n=i?(i=!1,e):t(n,e,r,o)})),n}function Bt(e,t){for(var n,i=-1,o=e.length;++i<o;){var s=t(e[i]);s!==r&&(n=n===r?s:n+s)}return n}function $t(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}function Ut(e){return e?e.slice(0,an(e)+1).replace(ie,""):e}function Ht(e){return function(t){return e(t)}}function Gt(e,t){return At(t,(function(t){return e[t]}))}function qt(e,t){return e.has(t)}function Vt(e,t){for(var n=-1,i=e.length;++n<i&&Nt(t,e[n],0)>-1;);return n}function zt(e,t){for(var n=e.length;n--&&Nt(t,e[n],0)>-1;);return n}function Yt(e,t){for(var n=e.length,i=0;n--;)e[n]===t&&++i;return i}var Kt=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"}),Qt=jt({"&":"&","<":"<",">":">",'"':""","'":"'"});function Jt(e){return"\\"+et[e]}function Zt(e){return Ye.test(e)}function Xt(e){var t=-1,n=Array(e.size);return e.forEach((function(e,i){n[++t]=[i,e]})),n}function en(e,t){return function(n){return e(t(n))}}function tn(e,t){for(var n=-1,i=e.length,r=0,o=[];++n<i;){var s=e[n];s!==t&&s!==a||(e[n]=a,o[r++]=n)}return o}function nn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function rn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function on(e){return Zt(e)?function(e){for(var t=Ve.lastIndex=0;Ve.test(e);)++t;return t}(e):kt(e)}function sn(e){return Zt(e)?function(e){return e.match(Ve)||[]}(e):function(e){return e.split("")}(e)}function an(e){for(var t=e.length;t--&&re.test(e.charAt(t)););return t}var ln=jt({"&":"&","<":"<",">":">",""":'"',"'":"'"}),un=function e(t){var n,i=(t=null==t?ot:un.defaults(ot.Object(),t,un.pick(ot,Qe))).Array,re=t.Date,Se=t.Error,Ce=t.Function,_e=t.Math,We=t.Object,Ae=t.RegExp,Le=t.String,Ee=t.TypeError,Te=i.prototype,Oe=Ce.prototype,ke=We.prototype,Ie=t["__core-js_shared__"],Re=Oe.toString,Ne=ke.hasOwnProperty,Pe=0,Me=(n=/[^.]+$/.exec(Ie&&Ie.keys&&Ie.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Fe=ke.toString,De=Re.call(We),je=ot._,xe=Ae("^"+Re.call(Ne).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Be=lt?t.Buffer:r,$e=t.Symbol,Ue=t.Uint8Array,He=Be?Be.allocUnsafe:r,Ve=en(We.getPrototypeOf,We),Ye=We.create,et=ke.propertyIsEnumerable,it=Te.splice,rt=$e?$e.isConcatSpreadable:r,st=$e?$e.iterator:r,at=$e?$e.toStringTag:r,ut=function(){try{var e=uo(We,"defineProperty");return e({},"",{}),e}catch(e){}}(),dt=t.clearTimeout!==ot.clearTimeout&&t.clearTimeout,kt=re&&re.now!==ot.Date.now&&re.now,jt=t.setTimeout!==ot.setTimeout&&t.setTimeout,dn=_e.ceil,cn=_e.floor,fn=We.getOwnPropertySymbols,hn=Be?Be.isBuffer:r,pn=t.isFinite,gn=Te.join,mn=en(We.keys,We),wn=_e.max,yn=_e.min,vn=re.now,bn=t.parseInt,Sn=_e.random,Cn=Te.reverse,_n=uo(t,"DataView"),Wn=uo(t,"Map"),An=uo(t,"Promise"),Ln=uo(t,"Set"),En=uo(t,"WeakMap"),Tn=uo(We,"create"),On=En&&new En,kn={},In=xo(_n),Rn=xo(Wn),Nn=xo(An),Pn=xo(Ln),Mn=xo(En),Fn=$e?$e.prototype:r,Dn=Fn?Fn.valueOf:r,jn=Fn?Fn.toString:r;function xn(e){if(na(e)&&!qs(e)&&!(e instanceof Hn)){if(e instanceof Un)return e;if(Ne.call(e,"__wrapped__"))return Bo(e)}return new Un(e)}var Bn=function(){function e(){}return function(t){if(!ta(t))return{};if(Ye)return Ye(t);e.prototype=t;var n=new e;return e.prototype=r,n}}();function $n(){}function Un(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=r}function Hn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=h,this.__views__=[]}function Gn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function qn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Vn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function zn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Vn;++t<n;)this.add(e[t])}function Yn(e){var t=this.__data__=new qn(e);this.size=t.size}function Kn(e,t){var n=qs(e),i=!n&&Gs(e),r=!n&&!i&&Ks(e),o=!n&&!i&&!r&&da(e),s=n||i||r||o,a=s?$t(e.length,Le):[],l=a.length;for(var u in e)!t&&!Ne.call(e,u)||s&&("length"==u||r&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||wo(u,l))||a.push(u);return a}function Qn(e){var t=e.length;return t?e[Vi(0,t-1)]:r}function Jn(e,t){return Po(Er(e),si(t,0,e.length))}function Zn(e){return Po(Er(e))}function Xn(e,t,n){(n!==r&&!$s(e[t],n)||n===r&&!(t in e))&&ri(e,t,n)}function ei(e,t,n){var i=e[t];Ne.call(e,t)&&$s(i,n)&&(n!==r||t in e)||ri(e,t,n)}function ti(e,t){for(var n=e.length;n--;)if($s(e[n][0],t))return n;return-1}function ni(e,t,n,i){return ci(e,(function(e,r,o){t(i,e,n(e),o)})),i}function ii(e,t){return e&&Tr(t,Ra(t),e)}function ri(e,t,n){"__proto__"==t&&ut?ut(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function oi(e,t){for(var n=-1,o=t.length,s=i(o),a=null==e;++n<o;)s[n]=a?r:Ea(e,t[n]);return s}function si(e,t,n){return e==e&&(n!==r&&(e=e<=n?e:n),t!==r&&(e=e>=t?e:t)),e}function ai(e,t,n,i,o,s){var a,l=1&t,u=2&t,d=4&t;if(n&&(a=o?n(e,i,o,s):n(e)),a!==r)return a;if(!ta(e))return e;var c=qs(e);if(c){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Ne.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!l)return Er(e,a)}else{var f=ho(e),h=f==b||f==S;if(Ks(e))return Sr(e,l);if(f==W||f==g||h&&!o){if(a=u||h?{}:go(e),!l)return u?function(e,t){return Tr(e,fo(e),t)}(e,function(e,t){return e&&Tr(t,Na(t),e)}(a,e)):function(e,t){return Tr(e,co(e),t)}(e,ii(a,e))}else{if(!Xe[f])return o?e:{};a=function(e,t,n){var i,r=e.constructor;switch(t){case I:return Cr(e);case w:case y:return new r(+e);case R:return function(e,t){var n=t?Cr(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case N:case P:case M:case F:case D:case j:case x:case B:case $:return _r(e,n);case C:case E:return new r;case _:case T:return new r(e);case L:return function(e){var t=new e.constructor(e.source,fe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case O:return i=e,Dn?We(Dn.call(i)):{}}}(e,f,l)}}s||(s=new Yn);var p=s.get(e);if(p)return p;s.set(e,a),aa(e)?e.forEach((function(i){a.add(ai(i,t,n,i,e,s))})):ia(e)&&e.forEach((function(i,r){a.set(r,ai(i,t,n,r,e,s))}));var m=c?r:(d?u?no:to:u?Na:Ra)(e);return vt(m||e,(function(i,r){m&&(i=e[r=i]),ei(a,r,ai(i,t,n,r,e,s))})),a}function li(e,t,n){var i=n.length;if(null==e)return!i;for(e=We(e);i--;){var o=n[i],s=t[o],a=e[o];if(a===r&&!(o in e)||!s(a))return!1}return!0}function ui(e,t,n){if("function"!=typeof e)throw new Ee(o);return ko((function(){e.apply(r,n)}),t)}function di(e,t,n,i){var r=-1,o=_t,s=!0,a=e.length,l=[],u=t.length;if(!a)return l;n&&(t=At(t,Ht(n))),i?(o=Wt,s=!1):t.length>=200&&(o=qt,s=!1,t=new zn(t));e:for(;++r<a;){var d=e[r],c=null==n?d:n(d);if(d=i||0!==d?d:0,s&&c==c){for(var f=u;f--;)if(t[f]===c)continue e;l.push(d)}else o(t,c,i)||l.push(d)}return l}xn.templateSettings={escape:K,evaluate:Q,interpolate:J,variable:"",imports:{_:xn}},xn.prototype=$n.prototype,xn.prototype.constructor=xn,Un.prototype=Bn($n.prototype),Un.prototype.constructor=Un,Hn.prototype=Bn($n.prototype),Hn.prototype.constructor=Hn,Gn.prototype.clear=function(){this.__data__=Tn?Tn(null):{},this.size=0},Gn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Gn.prototype.get=function(e){var t=this.__data__;if(Tn){var n=t[e];return n===s?r:n}return Ne.call(t,e)?t[e]:r},Gn.prototype.has=function(e){var t=this.__data__;return Tn?t[e]!==r:Ne.call(t,e)},Gn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Tn&&t===r?s:t,this},qn.prototype.clear=function(){this.__data__=[],this.size=0},qn.prototype.delete=function(e){var t=this.__data__,n=ti(t,e);return!(n<0||(n==t.length-1?t.pop():it.call(t,n,1),--this.size,0))},qn.prototype.get=function(e){var t=this.__data__,n=ti(t,e);return n<0?r:t[n][1]},qn.prototype.has=function(e){return ti(this.__data__,e)>-1},qn.prototype.set=function(e,t){var n=this.__data__,i=ti(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this},Vn.prototype.clear=function(){this.size=0,this.__data__={hash:new Gn,map:new(Wn||qn),string:new Gn}},Vn.prototype.delete=function(e){var t=ao(this,e).delete(e);return this.size-=t?1:0,t},Vn.prototype.get=function(e){return ao(this,e).get(e)},Vn.prototype.has=function(e){return ao(this,e).has(e)},Vn.prototype.set=function(e,t){var n=ao(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this},zn.prototype.add=zn.prototype.push=function(e){return this.__data__.set(e,s),this},zn.prototype.has=function(e){return this.__data__.has(e)},Yn.prototype.clear=function(){this.__data__=new qn,this.size=0},Yn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Yn.prototype.get=function(e){return this.__data__.get(e)},Yn.prototype.has=function(e){return this.__data__.has(e)},Yn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof qn){var i=n.__data__;if(!Wn||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new Vn(i)}return n.set(e,t),this.size=n.size,this};var ci=Ir(vi),fi=Ir(bi,!0);function hi(e,t){var n=!0;return ci(e,(function(e,i,r){return n=!!t(e,i,r)})),n}function pi(e,t,n){for(var i=-1,o=e.length;++i<o;){var s=e[i],a=t(s);if(null!=a&&(l===r?a==a&&!ua(a):n(a,l)))var l=a,u=s}return u}function gi(e,t){var n=[];return ci(e,(function(e,i,r){t(e,i,r)&&n.push(e)})),n}function mi(e,t,n,i,r){var o=-1,s=e.length;for(n||(n=mo),r||(r=[]);++o<s;){var a=e[o];t>0&&n(a)?t>1?mi(a,t-1,n,i,r):Lt(r,a):i||(r[r.length]=a)}return r}var wi=Rr(),yi=Rr(!0);function vi(e,t){return e&&wi(e,t,Ra)}function bi(e,t){return e&&yi(e,t,Ra)}function Si(e,t){return Ct(t,(function(t){return Zs(e[t])}))}function Ci(e,t){for(var n=0,i=(t=wr(t,e)).length;null!=e&&n<i;)e=e[jo(t[n++])];return n&&n==i?e:r}function _i(e,t,n){var i=t(e);return qs(e)?i:Lt(i,n(e))}function Wi(e){return null==e?e===r?"[object Undefined]":"[object Null]":at&&at in We(e)?function(e){var t=Ne.call(e,at),n=e[at];try{e[at]=r;var i=!0}catch(e){}var o=Fe.call(e);return i&&(t?e[at]=n:delete e[at]),o}(e):function(e){return Fe.call(e)}(e)}function Ai(e,t){return e>t}function Li(e,t){return null!=e&&Ne.call(e,t)}function Ei(e,t){return null!=e&&t in We(e)}function Ti(e,t,n){for(var o=n?Wt:_t,s=e[0].length,a=e.length,l=a,u=i(a),d=1/0,c=[];l--;){var f=e[l];l&&t&&(f=At(f,Ht(t))),d=yn(f.length,d),u[l]=!n&&(t||s>=120&&f.length>=120)?new zn(l&&f):r}f=e[0];var h=-1,p=u[0];e:for(;++h<s&&c.length<d;){var g=f[h],m=t?t(g):g;if(g=n||0!==g?g:0,!(p?qt(p,m):o(c,m,n))){for(l=a;--l;){var w=u[l];if(!(w?qt(w,m):o(e[l],m,n)))continue e}p&&p.push(m),c.push(g)}}return c}function Oi(e,t,n){var i=null==(e=Lo(e,t=wr(t,e)))?e:e[jo(Jo(t))];return null==i?r:wt(i,e,n)}function ki(e){return na(e)&&Wi(e)==g}function Ii(e,t,n,i,o){return e===t||(null==e||null==t||!na(e)&&!na(t)?e!=e&&t!=t:function(e,t,n,i,o,s){var a=qs(e),l=qs(t),u=a?m:ho(e),d=l?m:ho(t),c=(u=u==g?W:u)==W,f=(d=d==g?W:d)==W,h=u==d;if(h&&Ks(e)){if(!Ks(t))return!1;a=!0,c=!1}if(h&&!c)return s||(s=new Yn),a||da(e)?Xr(e,t,n,i,o,s):function(e,t,n,i,r,o,s){switch(n){case R:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case I:return!(e.byteLength!=t.byteLength||!o(new Ue(e),new Ue(t)));case w:case y:case _:return $s(+e,+t);case v:return e.name==t.name&&e.message==t.message;case L:case T:return e==t+"";case C:var a=Xt;case E:var l=1&i;if(a||(a=nn),e.size!=t.size&&!l)return!1;var u=s.get(e);if(u)return u==t;i|=2,s.set(e,t);var d=Xr(a(e),a(t),i,r,o,s);return s.delete(e),d;case O:if(Dn)return Dn.call(e)==Dn.call(t)}return!1}(e,t,u,n,i,o,s);if(!(1&n)){var p=c&&Ne.call(e,"__wrapped__"),b=f&&Ne.call(t,"__wrapped__");if(p||b){var S=p?e.value():e,A=b?t.value():t;return s||(s=new Yn),o(S,A,n,i,s)}}return!!h&&(s||(s=new Yn),function(e,t,n,i,o,s){var a=1&n,l=to(e),u=l.length;if(u!=to(t).length&&!a)return!1;for(var d=u;d--;){var c=l[d];if(!(a?c in t:Ne.call(t,c)))return!1}var f=s.get(e),h=s.get(t);if(f&&h)return f==t&&h==e;var p=!0;s.set(e,t),s.set(t,e);for(var g=a;++d<u;){var m=e[c=l[d]],w=t[c];if(i)var y=a?i(w,m,c,t,e,s):i(m,w,c,e,t,s);if(!(y===r?m===w||o(m,w,n,i,s):y)){p=!1;break}g||(g="constructor"==c)}if(p&&!g){var v=e.constructor,b=t.constructor;v==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof v&&v instanceof v&&"function"==typeof b&&b instanceof b||(p=!1)}return s.delete(e),s.delete(t),p}(e,t,n,i,o,s))}(e,t,n,i,Ii,o))}function Ri(e,t,n,i){var o=n.length,s=o,a=!i;if(null==e)return!s;for(e=We(e);o--;){var l=n[o];if(a&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++o<s;){var u=(l=n[o])[0],d=e[u],c=l[1];if(a&&l[2]){if(d===r&&!(u in e))return!1}else{var f=new Yn;if(i)var h=i(d,c,u,e,t,f);if(!(h===r?Ii(c,d,3,i,f):h))return!1}}return!0}function Ni(e){return!(!ta(e)||(t=e,Me&&Me in t))&&(Zs(e)?xe:ge).test(xo(e));var t}function Pi(e){return"function"==typeof e?e:null==e?rl:"object"==typeof e?qs(e)?xi(e[0],e[1]):ji(e):hl(e)}function Mi(e){if(!Co(e))return mn(e);var t=[];for(var n in We(e))Ne.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Fi(e,t){return e<t}function Di(e,t){var n=-1,r=zs(e)?i(e.length):[];return ci(e,(function(e,i,o){r[++n]=t(e,i,o)})),r}function ji(e){var t=lo(e);return 1==t.length&&t[0][2]?Wo(t[0][0],t[0][1]):function(n){return n===e||Ri(n,e,t)}}function xi(e,t){return vo(e)&&_o(t)?Wo(jo(e),t):function(n){var i=Ea(n,e);return i===r&&i===t?Ta(n,e):Ii(t,i,3)}}function Bi(e,t,n,i,o){e!==t&&wi(t,(function(s,a){if(o||(o=new Yn),ta(s))!function(e,t,n,i,o,s,a){var l=To(e,n),u=To(t,n),d=a.get(u);if(d)Xn(e,n,d);else{var c=s?s(l,u,n+"",e,t,a):r,f=c===r;if(f){var h=qs(u),p=!h&&Ks(u),g=!h&&!p&&da(u);c=u,h||p||g?qs(l)?c=l:Ys(l)?c=Er(l):p?(f=!1,c=Sr(u,!0)):g?(f=!1,c=_r(u,!0)):c=[]:oa(u)||Gs(u)?(c=l,Gs(l)?c=ya(l):ta(l)&&!Zs(l)||(c=go(u))):f=!1}f&&(a.set(u,c),o(c,u,i,s,a),a.delete(u)),Xn(e,n,c)}}(e,t,a,n,Bi,i,o);else{var l=i?i(To(e,a),s,a+"",e,t,o):r;l===r&&(l=s),Xn(e,a,l)}}),Na)}function $i(e,t){var n=e.length;if(n)return wo(t+=t<0?n:0,n)?e[t]:r}function Ui(e,t,n){t=t.length?At(t,(function(e){return qs(e)?function(t){return Ci(t,1===e.length?e[0]:e)}:e})):[rl];var i=-1;t=At(t,Ht(so()));var r=Di(e,(function(e,n,r){var o=At(t,(function(t){return t(e)}));return{criteria:o,index:++i,value:e}}));return function(e,t){var i=e.length;for(e.sort((function(e,t){return function(e,t,n){for(var i=-1,r=e.criteria,o=t.criteria,s=r.length,a=n.length;++i<s;){var l=Wr(r[i],o[i]);if(l)return i>=a?l:l*("desc"==n[i]?-1:1)}return e.index-t.index}(e,t,n)}));i--;)e[i]=e[i].value;return e}(r)}function Hi(e,t,n){for(var i=-1,r=t.length,o={};++i<r;){var s=t[i],a=Ci(e,s);n(a,s)&&Ji(o,wr(s,e),a)}return o}function Gi(e,t,n,i){var r=i?Pt:Nt,o=-1,s=t.length,a=e;for(e===t&&(t=Er(t)),n&&(a=At(e,Ht(n)));++o<s;)for(var l=0,u=t[o],d=n?n(u):u;(l=r(a,d,l,i))>-1;)a!==e&&it.call(a,l,1),it.call(e,l,1);return e}function qi(e,t){for(var n=e?t.length:0,i=n-1;n--;){var r=t[n];if(n==i||r!==o){var o=r;wo(r)?it.call(e,r,1):ur(e,r)}}return e}function Vi(e,t){return e+cn(Sn()*(t-e+1))}function zi(e,t){var n="";if(!e||t<1||t>c)return n;do{t%2&&(n+=e),(t=cn(t/2))&&(e+=e)}while(t);return n}function Yi(e,t){return Io(Ao(e,t,rl),e+"")}function Ki(e){return Qn($a(e))}function Qi(e,t){var n=$a(e);return Po(n,si(t,0,n.length))}function Ji(e,t,n,i){if(!ta(e))return e;for(var o=-1,s=(t=wr(t,e)).length,a=s-1,l=e;null!=l&&++o<s;){var u=jo(t[o]),d=n;if("__proto__"===u||"constructor"===u||"prototype"===u)return e;if(o!=a){var c=l[u];(d=i?i(c,u,l):r)===r&&(d=ta(c)?c:wo(t[o+1])?[]:{})}ei(l,u,d),l=l[u]}return e}var Zi=On?function(e,t){return On.set(e,t),e}:rl,Xi=ut?function(e,t){return ut(e,"toString",{configurable:!0,enumerable:!1,value:tl(t),writable:!0})}:rl;function er(e){return Po($a(e))}function tr(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var s=i(o);++r<o;)s[r]=e[r+t];return s}function nr(e,t){var n;return ci(e,(function(e,i,r){return!(n=t(e,i,r))})),!!n}function ir(e,t,n){var i=0,r=null==e?i:e.length;if("number"==typeof t&&t==t&&r<=2147483647){for(;i<r;){var o=i+r>>>1,s=e[o];null!==s&&!ua(s)&&(n?s<=t:s<t)?i=o+1:r=o}return r}return rr(e,t,rl,n)}function rr(e,t,n,i){var o=0,s=null==e?0:e.length;if(0===s)return 0;for(var a=(t=n(t))!=t,l=null===t,u=ua(t),d=t===r;o<s;){var c=cn((o+s)/2),f=n(e[c]),h=f!==r,p=null===f,g=f==f,m=ua(f);if(a)var w=i||g;else w=d?g&&(i||h):l?g&&h&&(i||!p):u?g&&h&&!p&&(i||!m):!p&&!m&&(i?f<=t:f<t);w?o=c+1:s=c}return yn(s,4294967294)}function or(e,t){for(var n=-1,i=e.length,r=0,o=[];++n<i;){var s=e[n],a=t?t(s):s;if(!n||!$s(a,l)){var l=a;o[r++]=0===s?0:s}}return o}function sr(e){return"number"==typeof e?e:ua(e)?f:+e}function ar(e){if("string"==typeof e)return e;if(qs(e))return At(e,ar)+"";if(ua(e))return jn?jn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function lr(e,t,n){var i=-1,r=_t,o=e.length,s=!0,a=[],l=a;if(n)s=!1,r=Wt;else if(o>=200){var u=t?null:zr(e);if(u)return nn(u);s=!1,r=qt,l=new zn}else l=t?[]:a;e:for(;++i<o;){var d=e[i],c=t?t(d):d;if(d=n||0!==d?d:0,s&&c==c){for(var f=l.length;f--;)if(l[f]===c)continue e;t&&l.push(c),a.push(d)}else r(l,c,n)||(l!==a&&l.push(c),a.push(d))}return a}function ur(e,t){return null==(e=Lo(e,t=wr(t,e)))||delete e[jo(Jo(t))]}function dr(e,t,n,i){return Ji(e,t,n(Ci(e,t)),i)}function cr(e,t,n,i){for(var r=e.length,o=i?r:-1;(i?o--:++o<r)&&t(e[o],o,e););return n?tr(e,i?0:o,i?o+1:r):tr(e,i?o+1:0,i?r:o)}function fr(e,t){var n=e;return n instanceof Hn&&(n=n.value()),Et(t,(function(e,t){return t.func.apply(t.thisArg,Lt([e],t.args))}),n)}function hr(e,t,n){var r=e.length;if(r<2)return r?lr(e[0]):[];for(var o=-1,s=i(r);++o<r;)for(var a=e[o],l=-1;++l<r;)l!=o&&(s[o]=di(s[o]||a,e[l],t,n));return lr(mi(s,1),t,n)}function pr(e,t,n){for(var i=-1,o=e.length,s=t.length,a={};++i<o;){var l=i<s?t[i]:r;n(a,e[i],l)}return a}function gr(e){return Ys(e)?e:[]}function mr(e){return"function"==typeof e?e:rl}function wr(e,t){return qs(e)?e:vo(e,t)?[e]:Do(va(e))}var yr=Yi;function vr(e,t,n){var i=e.length;return n=n===r?i:n,!t&&n>=i?e:tr(e,t,n)}var br=dt||function(e){return ot.clearTimeout(e)};function Sr(e,t){if(t)return e.slice();var n=e.length,i=He?He(n):new e.constructor(n);return e.copy(i),i}function Cr(e){var t=new e.constructor(e.byteLength);return new Ue(t).set(new Ue(e)),t}function _r(e,t){var n=t?Cr(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Wr(e,t){if(e!==t){var n=e!==r,i=null===e,o=e==e,s=ua(e),a=t!==r,l=null===t,u=t==t,d=ua(t);if(!l&&!d&&!s&&e>t||s&&a&&u&&!l&&!d||i&&a&&u||!n&&u||!o)return 1;if(!i&&!s&&!d&&e<t||d&&n&&o&&!i&&!s||l&&n&&o||!a&&o||!u)return-1}return 0}function Ar(e,t,n,r){for(var o=-1,s=e.length,a=n.length,l=-1,u=t.length,d=wn(s-a,0),c=i(u+d),f=!r;++l<u;)c[l]=t[l];for(;++o<a;)(f||o<s)&&(c[n[o]]=e[o]);for(;d--;)c[l++]=e[o++];return c}function Lr(e,t,n,r){for(var o=-1,s=e.length,a=-1,l=n.length,u=-1,d=t.length,c=wn(s-l,0),f=i(c+d),h=!r;++o<c;)f[o]=e[o];for(var p=o;++u<d;)f[p+u]=t[u];for(;++a<l;)(h||o<s)&&(f[p+n[a]]=e[o++]);return f}function Er(e,t){var n=-1,r=e.length;for(t||(t=i(r));++n<r;)t[n]=e[n];return t}function Tr(e,t,n,i){var o=!n;n||(n={});for(var s=-1,a=t.length;++s<a;){var l=t[s],u=i?i(n[l],e[l],l,n,e):r;u===r&&(u=e[l]),o?ri(n,l,u):ei(n,l,u)}return n}function Or(e,t){return function(n,i){var r=qs(n)?yt:ni,o=t?t():{};return r(n,e,so(i,2),o)}}function kr(e){return Yi((function(t,n){var i=-1,o=n.length,s=o>1?n[o-1]:r,a=o>2?n[2]:r;for(s=e.length>3&&"function"==typeof s?(o--,s):r,a&&yo(n[0],n[1],a)&&(s=o<3?r:s,o=1),t=We(t);++i<o;){var l=n[i];l&&e(t,l,i,s)}return t}))}function Ir(e,t){return function(n,i){if(null==n)return n;if(!zs(n))return e(n,i);for(var r=n.length,o=t?r:-1,s=We(n);(t?o--:++o<r)&&!1!==i(s[o],o,s););return n}}function Rr(e){return function(t,n,i){for(var r=-1,o=We(t),s=i(t),a=s.length;a--;){var l=s[e?a:++r];if(!1===n(o[l],l,o))break}return t}}function Nr(e){return function(t){var n=Zt(t=va(t))?sn(t):r,i=n?n[0]:t.charAt(0),o=n?vr(n,1).join(""):t.slice(1);return i[e]()+o}}function Pr(e){return function(t){return Et(Za(Ga(t).replace(Ge,"")),e,"")}}function Mr(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Bn(e.prototype),i=e.apply(n,t);return ta(i)?i:n}}function Fr(e){return function(t,n,i){var o=We(t);if(!zs(t)){var s=so(n,3);t=Ra(t),n=function(e){return s(o[e],e,o)}}var a=e(t,n,i);return a>-1?o[s?t[a]:a]:r}}function Dr(e){return eo((function(t){var n=t.length,i=n,s=Un.prototype.thru;for(e&&t.reverse();i--;){var a=t[i];if("function"!=typeof a)throw new Ee(o);if(s&&!l&&"wrapper"==ro(a))var l=new Un([],!0)}for(i=l?i:n;++i<n;){var u=ro(a=t[i]),d="wrapper"==u?io(a):r;l=d&&bo(d[0])&&424==d[1]&&!d[4].length&&1==d[9]?l[ro(d[0])].apply(l,d[3]):1==a.length&&bo(a)?l[u]():l.thru(a)}return function(){var e=arguments,i=e[0];if(l&&1==e.length&&qs(i))return l.plant(i).value();for(var r=0,o=n?t[r].apply(this,e):i;++r<n;)o=t[r].call(this,o);return o}}))}function jr(e,t,n,o,s,a,l,d,c,f){var h=t&u,p=1&t,g=2&t,m=24&t,w=512&t,y=g?r:Mr(e);return function r(){for(var u=arguments.length,v=i(u),b=u;b--;)v[b]=arguments[b];if(m)var S=oo(r),C=Yt(v,S);if(o&&(v=Ar(v,o,s,m)),a&&(v=Lr(v,a,l,m)),u-=C,m&&u<f){var _=tn(v,S);return qr(e,t,jr,r.placeholder,n,v,_,d,c,f-u)}var W=p?n:this,A=g?W[e]:e;return u=v.length,d?v=Eo(v,d):w&&u>1&&v.reverse(),h&&c<u&&(v.length=c),this&&this!==ot&&this instanceof r&&(A=y||Mr(A)),A.apply(W,v)}}function xr(e,t){return function(n,i){return function(e,t,n,i){return vi(e,(function(e,r,o){t(i,n(e),r,o)})),i}(n,e,t(i),{})}}function Br(e,t){return function(n,i){var o;if(n===r&&i===r)return t;if(n!==r&&(o=n),i!==r){if(o===r)return i;"string"==typeof n||"string"==typeof i?(n=ar(n),i=ar(i)):(n=sr(n),i=sr(i)),o=e(n,i)}return o}}function $r(e){return eo((function(t){return t=At(t,Ht(so())),Yi((function(n){var i=this;return e(t,(function(e){return wt(e,i,n)}))}))}))}function Ur(e,t){var n=(t=t===r?" ":ar(t)).length;if(n<2)return n?zi(t,e):t;var i=zi(t,dn(e/on(t)));return Zt(t)?vr(sn(i),0,e).join(""):i.slice(0,e)}function Hr(e){return function(t,n,o){return o&&"number"!=typeof o&&yo(t,n,o)&&(n=o=r),t=pa(t),n===r?(n=t,t=0):n=pa(n),function(e,t,n,r){for(var o=-1,s=wn(dn((t-e)/(n||1)),0),a=i(s);s--;)a[r?s:++o]=e,e+=n;return a}(t,n,o=o===r?t<n?1:-1:pa(o),e)}}function Gr(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=wa(t),n=wa(n)),e(t,n)}}function qr(e,t,n,i,o,s,a,u,d,c){var f=8&t;t|=f?l:64,4&(t&=~(f?64:l))||(t&=-4);var h=[e,t,o,f?s:r,f?a:r,f?r:s,f?r:a,u,d,c],p=n.apply(r,h);return bo(e)&&Oo(p,h),p.placeholder=i,Ro(p,e,t)}function Vr(e){var t=_e[e];return function(e,n){if(e=wa(e),(n=null==n?0:yn(ga(n),292))&&pn(e)){var i=(va(e)+"e").split("e");return+((i=(va(t(i[0]+"e"+(+i[1]+n)))+"e").split("e"))[0]+"e"+(+i[1]-n))}return t(e)}}var zr=Ln&&1/nn(new Ln([,-0]))[1]==d?function(e){return new Ln(e)}:ul;function Yr(e){return function(t){var n=ho(t);return n==C?Xt(t):n==E?rn(t):function(e,t){return At(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Kr(e,t,n,s,d,c,f,h){var p=2&t;if(!p&&"function"!=typeof e)throw new Ee(o);var g=s?s.length:0;if(g||(t&=-97,s=d=r),f=f===r?f:wn(ga(f),0),h=h===r?h:ga(h),g-=d?d.length:0,64&t){var m=s,w=d;s=d=r}var y=p?r:io(e),v=[e,t,n,s,d,m,w,c,f,h];if(y&&function(e,t){var n=e[1],i=t[1],r=n|i,o=r<131,s=i==u&&8==n||i==u&&256==n&&e[7].length<=t[8]||384==i&&t[7].length<=t[8]&&8==n;if(!o&&!s)return e;1&i&&(e[2]=t[2],r|=1&n?0:4);var l=t[3];if(l){var d=e[3];e[3]=d?Ar(d,l,t[4]):l,e[4]=d?tn(e[3],a):t[4]}(l=t[5])&&(d=e[5],e[5]=d?Lr(d,l,t[6]):l,e[6]=d?tn(e[5],a):t[6]),(l=t[7])&&(e[7]=l),i&u&&(e[8]=null==e[8]?t[8]:yn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=r}(v,y),e=v[0],t=v[1],n=v[2],s=v[3],d=v[4],!(h=v[9]=v[9]===r?p?0:e.length:wn(v[9]-g,0))&&24&t&&(t&=-25),t&&1!=t)b=8==t||16==t?function(e,t,n){var o=Mr(e);return function s(){for(var a=arguments.length,l=i(a),u=a,d=oo(s);u--;)l[u]=arguments[u];var c=a<3&&l[0]!==d&&l[a-1]!==d?[]:tn(l,d);return(a-=c.length)<n?qr(e,t,jr,s.placeholder,r,l,c,r,r,n-a):wt(this&&this!==ot&&this instanceof s?o:e,this,l)}}(e,t,h):t!=l&&33!=t||d.length?jr.apply(r,v):function(e,t,n,r){var o=1&t,s=Mr(e);return function t(){for(var a=-1,l=arguments.length,u=-1,d=r.length,c=i(d+l),f=this&&this!==ot&&this instanceof t?s:e;++u<d;)c[u]=r[u];for(;l--;)c[u++]=arguments[++a];return wt(f,o?n:this,c)}}(e,t,n,s);else var b=function(e,t,n){var i=1&t,r=Mr(e);return function t(){return(this&&this!==ot&&this instanceof t?r:e).apply(i?n:this,arguments)}}(e,t,n);return Ro((y?Zi:Oo)(b,v),e,t)}function Qr(e,t,n,i){return e===r||$s(e,ke[n])&&!Ne.call(i,n)?t:e}function Jr(e,t,n,i,o,s){return ta(e)&&ta(t)&&(s.set(t,e),Bi(e,t,r,Jr,s),s.delete(t)),e}function Zr(e){return oa(e)?r:e}function Xr(e,t,n,i,o,s){var a=1&n,l=e.length,u=t.length;if(l!=u&&!(a&&u>l))return!1;var d=s.get(e),c=s.get(t);if(d&&c)return d==t&&c==e;var f=-1,h=!0,p=2&n?new zn:r;for(s.set(e,t),s.set(t,e);++f<l;){var g=e[f],m=t[f];if(i)var w=a?i(m,g,f,t,e,s):i(g,m,f,e,t,s);if(w!==r){if(w)continue;h=!1;break}if(p){if(!Ot(t,(function(e,t){if(!qt(p,t)&&(g===e||o(g,e,n,i,s)))return p.push(t)}))){h=!1;break}}else if(g!==m&&!o(g,m,n,i,s)){h=!1;break}}return s.delete(e),s.delete(t),h}function eo(e){return Io(Ao(e,r,Vo),e+"")}function to(e){return _i(e,Ra,co)}function no(e){return _i(e,Na,fo)}var io=On?function(e){return On.get(e)}:ul;function ro(e){for(var t=e.name+"",n=kn[t],i=Ne.call(kn,t)?n.length:0;i--;){var r=n[i],o=r.func;if(null==o||o==e)return r.name}return t}function oo(e){return(Ne.call(xn,"placeholder")?xn:e).placeholder}function so(){var e=xn.iteratee||ol;return e=e===ol?Pi:e,arguments.length?e(arguments[0],arguments[1]):e}function ao(e,t){var n,i,r=e.__data__;return("string"==(i=typeof(n=t))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==n:null===n)?r["string"==typeof t?"string":"hash"]:r.map}function lo(e){for(var t=Ra(e),n=t.length;n--;){var i=t[n],r=e[i];t[n]=[i,r,_o(r)]}return t}function uo(e,t){var n=function(e,t){return null==e?r:e[t]}(e,t);return Ni(n)?n:r}var co=fn?function(e){return null==e?[]:(e=We(e),Ct(fn(e),(function(t){return et.call(e,t)})))}:ml,fo=fn?function(e){for(var t=[];e;)Lt(t,co(e)),e=Ve(e);return t}:ml,ho=Wi;function po(e,t,n){for(var i=-1,r=(t=wr(t,e)).length,o=!1;++i<r;){var s=jo(t[i]);if(!(o=null!=e&&n(e,s)))break;e=e[s]}return o||++i!=r?o:!!(r=null==e?0:e.length)&&ea(r)&&wo(s,r)&&(qs(e)||Gs(e))}function go(e){return"function"!=typeof e.constructor||Co(e)?{}:Bn(Ve(e))}function mo(e){return qs(e)||Gs(e)||!!(rt&&e&&e[rt])}function wo(e,t){var n=typeof e;return!!(t=null==t?c:t)&&("number"==n||"symbol"!=n&&we.test(e))&&e>-1&&e%1==0&&e<t}function yo(e,t,n){if(!ta(n))return!1;var i=typeof t;return!!("number"==i?zs(n)&&wo(t,n.length):"string"==i&&t in n)&&$s(n[t],e)}function vo(e,t){if(qs(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!ua(e))||X.test(e)||!Z.test(e)||null!=t&&e in We(t)}function bo(e){var t=ro(e),n=xn[t];if("function"!=typeof n||!(t in Hn.prototype))return!1;if(e===n)return!0;var i=io(n);return!!i&&e===i[0]}(_n&&ho(new _n(new ArrayBuffer(1)))!=R||Wn&&ho(new Wn)!=C||An&&ho(An.resolve())!=A||Ln&&ho(new Ln)!=E||En&&ho(new En)!=k)&&(ho=function(e){var t=Wi(e),n=t==W?e.constructor:r,i=n?xo(n):"";if(i)switch(i){case In:return R;case Rn:return C;case Nn:return A;case Pn:return E;case Mn:return k}return t});var So=Ie?Zs:wl;function Co(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ke)}function _o(e){return e==e&&!ta(e)}function Wo(e,t){return function(n){return null!=n&&n[e]===t&&(t!==r||e in We(n))}}function Ao(e,t,n){return t=wn(t===r?e.length-1:t,0),function(){for(var r=arguments,o=-1,s=wn(r.length-t,0),a=i(s);++o<s;)a[o]=r[t+o];o=-1;for(var l=i(t+1);++o<t;)l[o]=r[o];return l[t]=n(a),wt(e,this,l)}}function Lo(e,t){return t.length<2?e:Ci(e,tr(t,0,-1))}function Eo(e,t){for(var n=e.length,i=yn(t.length,n),o=Er(e);i--;){var s=t[i];e[i]=wo(s,n)?o[s]:r}return e}function To(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Oo=No(Zi),ko=jt||function(e,t){return ot.setTimeout(e,t)},Io=No(Xi);function Ro(e,t,n){var i=t+"";return Io(e,function(e,t){var n=t.length;if(!n)return e;var i=n-1;return t[i]=(n>1?"& ":"")+t[i],t=t.join(n>2?", ":" "),e.replace(oe,"{\n/* [wrapped with "+t+"] */\n")}(i,function(e,t){return vt(p,(function(n){var i="_."+n[0];t&n[1]&&!_t(e,i)&&e.push(i)})),e.sort()}(function(e){var t=e.match(se);return t?t[1].split(ae):[]}(i),n)))}function No(e){var t=0,n=0;return function(){var i=vn(),o=16-(i-n);if(n=i,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(r,arguments)}}function Po(e,t){var n=-1,i=e.length,o=i-1;for(t=t===r?i:t;++n<t;){var s=Vi(n,o),a=e[s];e[s]=e[n],e[n]=a}return e.length=t,e}var Mo,Fo,Do=(Mo=Ms((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,(function(e,n,i,r){t.push(i?r.replace(de,"$1"):n||e)})),t}),(function(e){return 500===Fo.size&&Fo.clear(),e})),Fo=Mo.cache,Mo);function jo(e){if("string"==typeof e||ua(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function xo(e){if(null!=e){try{return Re.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Bo(e){if(e instanceof Hn)return e.clone();var t=new Un(e.__wrapped__,e.__chain__);return t.__actions__=Er(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var $o=Yi((function(e,t){return Ys(e)?di(e,mi(t,1,Ys,!0)):[]})),Uo=Yi((function(e,t){var n=Jo(t);return Ys(n)&&(n=r),Ys(e)?di(e,mi(t,1,Ys,!0),so(n,2)):[]})),Ho=Yi((function(e,t){var n=Jo(t);return Ys(n)&&(n=r),Ys(e)?di(e,mi(t,1,Ys,!0),r,n):[]}));function Go(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var r=null==n?0:ga(n);return r<0&&(r=wn(i+r,0)),Rt(e,so(t,3),r)}function qo(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var o=i-1;return n!==r&&(o=ga(n),o=n<0?wn(i+o,0):yn(o,i-1)),Rt(e,so(t,3),o,!0)}function Vo(e){return null!=e&&e.length?mi(e,1):[]}function zo(e){return e&&e.length?e[0]:r}var Yo=Yi((function(e){var t=At(e,gr);return t.length&&t[0]===e[0]?Ti(t):[]})),Ko=Yi((function(e){var t=Jo(e),n=At(e,gr);return t===Jo(n)?t=r:n.pop(),n.length&&n[0]===e[0]?Ti(n,so(t,2)):[]})),Qo=Yi((function(e){var t=Jo(e),n=At(e,gr);return(t="function"==typeof t?t:r)&&n.pop(),n.length&&n[0]===e[0]?Ti(n,r,t):[]}));function Jo(e){var t=null==e?0:e.length;return t?e[t-1]:r}var Zo=Yi(Xo);function Xo(e,t){return e&&e.length&&t&&t.length?Gi(e,t):e}var es=eo((function(e,t){var n=null==e?0:e.length,i=oi(e,t);return qi(e,At(t,(function(e){return wo(e,n)?+e:e})).sort(Wr)),i}));function ts(e){return null==e?e:Cn.call(e)}var ns=Yi((function(e){return lr(mi(e,1,Ys,!0))})),is=Yi((function(e){var t=Jo(e);return Ys(t)&&(t=r),lr(mi(e,1,Ys,!0),so(t,2))})),rs=Yi((function(e){var t=Jo(e);return t="function"==typeof t?t:r,lr(mi(e,1,Ys,!0),r,t)}));function os(e){if(!e||!e.length)return[];var t=0;return e=Ct(e,(function(e){if(Ys(e))return t=wn(e.length,t),!0})),$t(t,(function(t){return At(e,Dt(t))}))}function ss(e,t){if(!e||!e.length)return[];var n=os(e);return null==t?n:At(n,(function(e){return wt(t,r,e)}))}var as=Yi((function(e,t){return Ys(e)?di(e,t):[]})),ls=Yi((function(e){return hr(Ct(e,Ys))})),us=Yi((function(e){var t=Jo(e);return Ys(t)&&(t=r),hr(Ct(e,Ys),so(t,2))})),ds=Yi((function(e){var t=Jo(e);return t="function"==typeof t?t:r,hr(Ct(e,Ys),r,t)})),cs=Yi(os),fs=Yi((function(e){var t=e.length,n=t>1?e[t-1]:r;return n="function"==typeof n?(e.pop(),n):r,ss(e,n)}));function hs(e){var t=xn(e);return t.__chain__=!0,t}function ps(e,t){return t(e)}var gs=eo((function(e){var t=e.length,n=t?e[0]:0,i=this.__wrapped__,o=function(t){return oi(t,e)};return!(t>1||this.__actions__.length)&&i instanceof Hn&&wo(n)?((i=i.slice(n,+n+(t?1:0))).__actions__.push({func:ps,args:[o],thisArg:r}),new Un(i,this.__chain__).thru((function(e){return t&&!e.length&&e.push(r),e}))):this.thru(o)})),ms=Or((function(e,t,n){Ne.call(e,n)?++e[n]:ri(e,n,1)})),ws=Fr(Go),ys=Fr(qo);function vs(e,t){return(qs(e)?vt:ci)(e,so(t,3))}function bs(e,t){return(qs(e)?bt:fi)(e,so(t,3))}var Ss=Or((function(e,t,n){Ne.call(e,n)?e[n].push(t):ri(e,n,[t])})),Cs=Yi((function(e,t,n){var r=-1,o="function"==typeof t,s=zs(e)?i(e.length):[];return ci(e,(function(e){s[++r]=o?wt(t,e,n):Oi(e,t,n)})),s})),_s=Or((function(e,t,n){ri(e,n,t)}));function Ws(e,t){return(qs(e)?At:Di)(e,so(t,3))}var As=Or((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),Ls=Yi((function(e,t){if(null==e)return[];var n=t.length;return n>1&&yo(e,t[0],t[1])?t=[]:n>2&&yo(t[0],t[1],t[2])&&(t=[t[0]]),Ui(e,mi(t,1),[])})),Es=kt||function(){return ot.Date.now()};function Ts(e,t,n){return t=n?r:t,t=e&&null==t?e.length:t,Kr(e,u,r,r,r,r,t)}function Os(e,t){var n;if("function"!=typeof t)throw new Ee(o);return e=ga(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=r),n}}var ks=Yi((function(e,t,n){var i=1;if(n.length){var r=tn(n,oo(ks));i|=l}return Kr(e,i,t,n,r)})),Is=Yi((function(e,t,n){var i=3;if(n.length){var r=tn(n,oo(Is));i|=l}return Kr(t,i,e,n,r)}));function Rs(e,t,n){var i,s,a,l,u,d,c=0,f=!1,h=!1,p=!0;if("function"!=typeof e)throw new Ee(o);function g(t){var n=i,o=s;return i=s=r,c=t,l=e.apply(o,n)}function m(e){return c=e,u=ko(y,t),f?g(e):l}function w(e){var n=e-d;return d===r||n>=t||n<0||h&&e-c>=a}function y(){var e=Es();if(w(e))return v(e);u=ko(y,function(e){var n=t-(e-d);return h?yn(n,a-(e-c)):n}(e))}function v(e){return u=r,p&&i?g(e):(i=s=r,l)}function b(){var e=Es(),n=w(e);if(i=arguments,s=this,d=e,n){if(u===r)return m(d);if(h)return br(u),u=ko(y,t),g(d)}return u===r&&(u=ko(y,t)),l}return t=wa(t)||0,ta(n)&&(f=!!n.leading,a=(h="maxWait"in n)?wn(wa(n.maxWait)||0,t):a,p="trailing"in n?!!n.trailing:p),b.cancel=function(){u!==r&&br(u),c=0,i=d=s=u=r},b.flush=function(){return u===r?l:v(Es())},b}var Ns=Yi((function(e,t){return ui(e,1,t)})),Ps=Yi((function(e,t,n){return ui(e,wa(t)||0,n)}));function Ms(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ee(o);var n=function(){var i=arguments,r=t?t.apply(this,i):i[0],o=n.cache;if(o.has(r))return o.get(r);var s=e.apply(this,i);return n.cache=o.set(r,s)||o,s};return n.cache=new(Ms.Cache||Vn),n}function Fs(e){if("function"!=typeof e)throw new Ee(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Ms.Cache=Vn;var Ds=yr((function(e,t){var n=(t=1==t.length&&qs(t[0])?At(t[0],Ht(so())):At(mi(t,1),Ht(so()))).length;return Yi((function(i){for(var r=-1,o=yn(i.length,n);++r<o;)i[r]=t[r].call(this,i[r]);return wt(e,this,i)}))})),js=Yi((function(e,t){var n=tn(t,oo(js));return Kr(e,l,r,t,n)})),xs=Yi((function(e,t){var n=tn(t,oo(xs));return Kr(e,64,r,t,n)})),Bs=eo((function(e,t){return Kr(e,256,r,r,r,t)}));function $s(e,t){return e===t||e!=e&&t!=t}var Us=Gr(Ai),Hs=Gr((function(e,t){return e>=t})),Gs=ki(function(){return arguments}())?ki:function(e){return na(e)&&Ne.call(e,"callee")&&!et.call(e,"callee")},qs=i.isArray,Vs=ct?Ht(ct):function(e){return na(e)&&Wi(e)==I};function zs(e){return null!=e&&ea(e.length)&&!Zs(e)}function Ys(e){return na(e)&&zs(e)}var Ks=hn||wl,Qs=ft?Ht(ft):function(e){return na(e)&&Wi(e)==y};function Js(e){if(!na(e))return!1;var t=Wi(e);return t==v||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!oa(e)}function Zs(e){if(!ta(e))return!1;var t=Wi(e);return t==b||t==S||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Xs(e){return"number"==typeof e&&e==ga(e)}function ea(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=c}function ta(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function na(e){return null!=e&&"object"==typeof e}var ia=ht?Ht(ht):function(e){return na(e)&&ho(e)==C};function ra(e){return"number"==typeof e||na(e)&&Wi(e)==_}function oa(e){if(!na(e)||Wi(e)!=W)return!1;var t=Ve(e);if(null===t)return!0;var n=Ne.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Re.call(n)==De}var sa=pt?Ht(pt):function(e){return na(e)&&Wi(e)==L},aa=gt?Ht(gt):function(e){return na(e)&&ho(e)==E};function la(e){return"string"==typeof e||!qs(e)&&na(e)&&Wi(e)==T}function ua(e){return"symbol"==typeof e||na(e)&&Wi(e)==O}var da=mt?Ht(mt):function(e){return na(e)&&ea(e.length)&&!!Ze[Wi(e)]},ca=Gr(Fi),fa=Gr((function(e,t){return e<=t}));function ha(e){if(!e)return[];if(zs(e))return la(e)?sn(e):Er(e);if(st&&e[st])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[st]());var t=ho(e);return(t==C?Xt:t==E?nn:$a)(e)}function pa(e){return e?(e=wa(e))===d||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ga(e){var t=pa(e),n=t%1;return t==t?n?t-n:t:0}function ma(e){return e?si(ga(e),0,h):0}function wa(e){if("number"==typeof e)return e;if(ua(e))return f;if(ta(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ta(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Ut(e);var n=pe.test(e);return n||me.test(e)?nt(e.slice(2),n?2:8):he.test(e)?f:+e}function ya(e){return Tr(e,Na(e))}function va(e){return null==e?"":ar(e)}var ba=kr((function(e,t){if(Co(t)||zs(t))Tr(t,Ra(t),e);else for(var n in t)Ne.call(t,n)&&ei(e,n,t[n])})),Sa=kr((function(e,t){Tr(t,Na(t),e)})),Ca=kr((function(e,t,n,i){Tr(t,Na(t),e,i)})),_a=kr((function(e,t,n,i){Tr(t,Ra(t),e,i)})),Wa=eo(oi),Aa=Yi((function(e,t){e=We(e);var n=-1,i=t.length,o=i>2?t[2]:r;for(o&&yo(t[0],t[1],o)&&(i=1);++n<i;)for(var s=t[n],a=Na(s),l=-1,u=a.length;++l<u;){var d=a[l],c=e[d];(c===r||$s(c,ke[d])&&!Ne.call(e,d))&&(e[d]=s[d])}return e})),La=Yi((function(e){return e.push(r,Jr),wt(Ma,r,e)}));function Ea(e,t,n){var i=null==e?r:Ci(e,t);return i===r?n:i}function Ta(e,t){return null!=e&&po(e,t,Ei)}var Oa=xr((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Fe.call(t)),e[t]=n}),tl(rl)),ka=xr((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Fe.call(t)),Ne.call(e,t)?e[t].push(n):e[t]=[n]}),so),Ia=Yi(Oi);function Ra(e){return zs(e)?Kn(e):Mi(e)}function Na(e){return zs(e)?Kn(e,!0):function(e){if(!ta(e))return function(e){var t=[];if(null!=e)for(var n in We(e))t.push(n);return t}(e);var t=Co(e),n=[];for(var i in e)("constructor"!=i||!t&&Ne.call(e,i))&&n.push(i);return n}(e)}var Pa=kr((function(e,t,n){Bi(e,t,n)})),Ma=kr((function(e,t,n,i){Bi(e,t,n,i)})),Fa=eo((function(e,t){var n={};if(null==e)return n;var i=!1;t=At(t,(function(t){return t=wr(t,e),i||(i=t.length>1),t})),Tr(e,no(e),n),i&&(n=ai(n,7,Zr));for(var r=t.length;r--;)ur(n,t[r]);return n})),Da=eo((function(e,t){return null==e?{}:function(e,t){return Hi(e,t,(function(t,n){return Ta(e,n)}))}(e,t)}));function ja(e,t){if(null==e)return{};var n=At(no(e),(function(e){return[e]}));return t=so(t),Hi(e,n,(function(e,n){return t(e,n[0])}))}var xa=Yr(Ra),Ba=Yr(Na);function $a(e){return null==e?[]:Gt(e,Ra(e))}var Ua=Pr((function(e,t,n){return t=t.toLowerCase(),e+(n?Ha(t):t)}));function Ha(e){return Ja(va(e).toLowerCase())}function Ga(e){return(e=va(e))&&e.replace(ye,Kt).replace(qe,"")}var qa=Pr((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Va=Pr((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),za=Nr("toLowerCase"),Ya=Pr((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),Ka=Pr((function(e,t,n){return e+(n?" ":"")+Ja(t)})),Qa=Pr((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Ja=Nr("toUpperCase");function Za(e,t,n){return e=va(e),(t=n?r:t)===r?function(e){return Ke.test(e)}(e)?function(e){return e.match(ze)||[]}(e):function(e){return e.match(le)||[]}(e):e.match(t)||[]}var Xa=Yi((function(e,t){try{return wt(e,r,t)}catch(e){return Js(e)?e:new Se(e)}})),el=eo((function(e,t){return vt(t,(function(t){t=jo(t),ri(e,t,ks(e[t],e))})),e}));function tl(e){return function(){return e}}var nl=Dr(),il=Dr(!0);function rl(e){return e}function ol(e){return Pi("function"==typeof e?e:ai(e,1))}var sl=Yi((function(e,t){return function(n){return Oi(n,e,t)}})),al=Yi((function(e,t){return function(n){return Oi(e,n,t)}}));function ll(e,t,n){var i=Ra(t),r=Si(t,i);null!=n||ta(t)&&(r.length||!i.length)||(n=t,t=e,e=this,r=Si(t,Ra(t)));var o=!(ta(n)&&"chain"in n&&!n.chain),s=Zs(e);return vt(r,(function(n){var i=t[n];e[n]=i,s&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__),r=n.__actions__=Er(this.__actions__);return r.push({func:i,args:arguments,thisArg:e}),n.__chain__=t,n}return i.apply(e,Lt([this.value()],arguments))})})),e}function ul(){}var dl=$r(At),cl=$r(St),fl=$r(Ot);function hl(e){return vo(e)?Dt(jo(e)):function(e){return function(t){return Ci(t,e)}}(e)}var pl=Hr(),gl=Hr(!0);function ml(){return[]}function wl(){return!1}var yl,vl=Br((function(e,t){return e+t}),0),bl=Vr("ceil"),Sl=Br((function(e,t){return e/t}),1),Cl=Vr("floor"),_l=Br((function(e,t){return e*t}),1),Wl=Vr("round"),Al=Br((function(e,t){return e-t}),0);return xn.after=function(e,t){if("function"!=typeof t)throw new Ee(o);return e=ga(e),function(){if(--e<1)return t.apply(this,arguments)}},xn.ary=Ts,xn.assign=ba,xn.assignIn=Sa,xn.assignInWith=Ca,xn.assignWith=_a,xn.at=Wa,xn.before=Os,xn.bind=ks,xn.bindAll=el,xn.bindKey=Is,xn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return qs(e)?e:[e]},xn.chain=hs,xn.chunk=function(e,t,n){t=(n?yo(e,t,n):t===r)?1:wn(ga(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var s=0,a=0,l=i(dn(o/t));s<o;)l[a++]=tr(e,s,s+=t);return l},xn.compact=function(e){for(var t=-1,n=null==e?0:e.length,i=0,r=[];++t<n;){var o=e[t];o&&(r[i++]=o)}return r},xn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=i(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return Lt(qs(n)?Er(n):[n],mi(t,1))},xn.cond=function(e){var t=null==e?0:e.length,n=so();return e=t?At(e,(function(e){if("function"!=typeof e[1])throw new Ee(o);return[n(e[0]),e[1]]})):[],Yi((function(n){for(var i=-1;++i<t;){var r=e[i];if(wt(r[0],this,n))return wt(r[1],this,n)}}))},xn.conforms=function(e){return function(e){var t=Ra(e);return function(n){return li(n,e,t)}}(ai(e,1))},xn.constant=tl,xn.countBy=ms,xn.create=function(e,t){var n=Bn(e);return null==t?n:ii(n,t)},xn.curry=function e(t,n,i){var o=Kr(t,8,r,r,r,r,r,n=i?r:n);return o.placeholder=e.placeholder,o},xn.curryRight=function e(t,n,i){var o=Kr(t,16,r,r,r,r,r,n=i?r:n);return o.placeholder=e.placeholder,o},xn.debounce=Rs,xn.defaults=Aa,xn.defaultsDeep=La,xn.defer=Ns,xn.delay=Ps,xn.difference=$o,xn.differenceBy=Uo,xn.differenceWith=Ho,xn.drop=function(e,t,n){var i=null==e?0:e.length;return i?tr(e,(t=n||t===r?1:ga(t))<0?0:t,i):[]},xn.dropRight=function(e,t,n){var i=null==e?0:e.length;return i?tr(e,0,(t=i-(t=n||t===r?1:ga(t)))<0?0:t):[]},xn.dropRightWhile=function(e,t){return e&&e.length?cr(e,so(t,3),!0,!0):[]},xn.dropWhile=function(e,t){return e&&e.length?cr(e,so(t,3),!0):[]},xn.fill=function(e,t,n,i){var o=null==e?0:e.length;return o?(n&&"number"!=typeof n&&yo(e,t,n)&&(n=0,i=o),function(e,t,n,i){var o=e.length;for((n=ga(n))<0&&(n=-n>o?0:o+n),(i=i===r||i>o?o:ga(i))<0&&(i+=o),i=n>i?0:ma(i);n<i;)e[n++]=t;return e}(e,t,n,i)):[]},xn.filter=function(e,t){return(qs(e)?Ct:gi)(e,so(t,3))},xn.flatMap=function(e,t){return mi(Ws(e,t),1)},xn.flatMapDeep=function(e,t){return mi(Ws(e,t),d)},xn.flatMapDepth=function(e,t,n){return n=n===r?1:ga(n),mi(Ws(e,t),n)},xn.flatten=Vo,xn.flattenDeep=function(e){return null!=e&&e.length?mi(e,d):[]},xn.flattenDepth=function(e,t){return null!=e&&e.length?mi(e,t=t===r?1:ga(t)):[]},xn.flip=function(e){return Kr(e,512)},xn.flow=nl,xn.flowRight=il,xn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,i={};++t<n;){var r=e[t];i[r[0]]=r[1]}return i},xn.functions=function(e){return null==e?[]:Si(e,Ra(e))},xn.functionsIn=function(e){return null==e?[]:Si(e,Na(e))},xn.groupBy=Ss,xn.initial=function(e){return null!=e&&e.length?tr(e,0,-1):[]},xn.intersection=Yo,xn.intersectionBy=Ko,xn.intersectionWith=Qo,xn.invert=Oa,xn.invertBy=ka,xn.invokeMap=Cs,xn.iteratee=ol,xn.keyBy=_s,xn.keys=Ra,xn.keysIn=Na,xn.map=Ws,xn.mapKeys=function(e,t){var n={};return t=so(t,3),vi(e,(function(e,i,r){ri(n,t(e,i,r),e)})),n},xn.mapValues=function(e,t){var n={};return t=so(t,3),vi(e,(function(e,i,r){ri(n,i,t(e,i,r))})),n},xn.matches=function(e){return ji(ai(e,1))},xn.matchesProperty=function(e,t){return xi(e,ai(t,1))},xn.memoize=Ms,xn.merge=Pa,xn.mergeWith=Ma,xn.method=sl,xn.methodOf=al,xn.mixin=ll,xn.negate=Fs,xn.nthArg=function(e){return e=ga(e),Yi((function(t){return $i(t,e)}))},xn.omit=Fa,xn.omitBy=function(e,t){return ja(e,Fs(so(t)))},xn.once=function(e){return Os(2,e)},xn.orderBy=function(e,t,n,i){return null==e?[]:(qs(t)||(t=null==t?[]:[t]),qs(n=i?r:n)||(n=null==n?[]:[n]),Ui(e,t,n))},xn.over=dl,xn.overArgs=Ds,xn.overEvery=cl,xn.overSome=fl,xn.partial=js,xn.partialRight=xs,xn.partition=As,xn.pick=Da,xn.pickBy=ja,xn.property=hl,xn.propertyOf=function(e){return function(t){return null==e?r:Ci(e,t)}},xn.pull=Zo,xn.pullAll=Xo,xn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Gi(e,t,so(n,2)):e},xn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Gi(e,t,r,n):e},xn.pullAt=es,xn.range=pl,xn.rangeRight=gl,xn.rearg=Bs,xn.reject=function(e,t){return(qs(e)?Ct:gi)(e,Fs(so(t,3)))},xn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var i=-1,r=[],o=e.length;for(t=so(t,3);++i<o;){var s=e[i];t(s,i,e)&&(n.push(s),r.push(i))}return qi(e,r),n},xn.rest=function(e,t){if("function"!=typeof e)throw new Ee(o);return Yi(e,t=t===r?t:ga(t))},xn.reverse=ts,xn.sampleSize=function(e,t,n){return t=(n?yo(e,t,n):t===r)?1:ga(t),(qs(e)?Jn:Qi)(e,t)},xn.set=function(e,t,n){return null==e?e:Ji(e,t,n)},xn.setWith=function(e,t,n,i){return i="function"==typeof i?i:r,null==e?e:Ji(e,t,n,i)},xn.shuffle=function(e){return(qs(e)?Zn:er)(e)},xn.slice=function(e,t,n){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&yo(e,t,n)?(t=0,n=i):(t=null==t?0:ga(t),n=n===r?i:ga(n)),tr(e,t,n)):[]},xn.sortBy=Ls,xn.sortedUniq=function(e){return e&&e.length?or(e):[]},xn.sortedUniqBy=function(e,t){return e&&e.length?or(e,so(t,2)):[]},xn.split=function(e,t,n){return n&&"number"!=typeof n&&yo(e,t,n)&&(t=n=r),(n=n===r?h:n>>>0)?(e=va(e))&&("string"==typeof t||null!=t&&!sa(t))&&!(t=ar(t))&&Zt(e)?vr(sn(e),0,n):e.split(t,n):[]},xn.spread=function(e,t){if("function"!=typeof e)throw new Ee(o);return t=null==t?0:wn(ga(t),0),Yi((function(n){var i=n[t],r=vr(n,0,t);return i&&Lt(r,i),wt(e,this,r)}))},xn.tail=function(e){var t=null==e?0:e.length;return t?tr(e,1,t):[]},xn.take=function(e,t,n){return e&&e.length?tr(e,0,(t=n||t===r?1:ga(t))<0?0:t):[]},xn.takeRight=function(e,t,n){var i=null==e?0:e.length;return i?tr(e,(t=i-(t=n||t===r?1:ga(t)))<0?0:t,i):[]},xn.takeRightWhile=function(e,t){return e&&e.length?cr(e,so(t,3),!1,!0):[]},xn.takeWhile=function(e,t){return e&&e.length?cr(e,so(t,3)):[]},xn.tap=function(e,t){return t(e),e},xn.throttle=function(e,t,n){var i=!0,r=!0;if("function"!=typeof e)throw new Ee(o);return ta(n)&&(i="leading"in n?!!n.leading:i,r="trailing"in n?!!n.trailing:r),Rs(e,t,{leading:i,maxWait:t,trailing:r})},xn.thru=ps,xn.toArray=ha,xn.toPairs=xa,xn.toPairsIn=Ba,xn.toPath=function(e){return qs(e)?At(e,jo):ua(e)?[e]:Er(Do(va(e)))},xn.toPlainObject=ya,xn.transform=function(e,t,n){var i=qs(e),r=i||Ks(e)||da(e);if(t=so(t,4),null==n){var o=e&&e.constructor;n=r?i?new o:[]:ta(e)&&Zs(o)?Bn(Ve(e)):{}}return(r?vt:vi)(e,(function(e,i,r){return t(n,e,i,r)})),n},xn.unary=function(e){return Ts(e,1)},xn.union=ns,xn.unionBy=is,xn.unionWith=rs,xn.uniq=function(e){return e&&e.length?lr(e):[]},xn.uniqBy=function(e,t){return e&&e.length?lr(e,so(t,2)):[]},xn.uniqWith=function(e,t){return t="function"==typeof t?t:r,e&&e.length?lr(e,r,t):[]},xn.unset=function(e,t){return null==e||ur(e,t)},xn.unzip=os,xn.unzipWith=ss,xn.update=function(e,t,n){return null==e?e:dr(e,t,mr(n))},xn.updateWith=function(e,t,n,i){return i="function"==typeof i?i:r,null==e?e:dr(e,t,mr(n),i)},xn.values=$a,xn.valuesIn=function(e){return null==e?[]:Gt(e,Na(e))},xn.without=as,xn.words=Za,xn.wrap=function(e,t){return js(mr(t),e)},xn.xor=ls,xn.xorBy=us,xn.xorWith=ds,xn.zip=cs,xn.zipObject=function(e,t){return pr(e||[],t||[],ei)},xn.zipObjectDeep=function(e,t){return pr(e||[],t||[],Ji)},xn.zipWith=fs,xn.entries=xa,xn.entriesIn=Ba,xn.extend=Sa,xn.extendWith=Ca,ll(xn,xn),xn.add=vl,xn.attempt=Xa,xn.camelCase=Ua,xn.capitalize=Ha,xn.ceil=bl,xn.clamp=function(e,t,n){return n===r&&(n=t,t=r),n!==r&&(n=(n=wa(n))==n?n:0),t!==r&&(t=(t=wa(t))==t?t:0),si(wa(e),t,n)},xn.clone=function(e){return ai(e,4)},xn.cloneDeep=function(e){return ai(e,5)},xn.cloneDeepWith=function(e,t){return ai(e,5,t="function"==typeof t?t:r)},xn.cloneWith=function(e,t){return ai(e,4,t="function"==typeof t?t:r)},xn.conformsTo=function(e,t){return null==t||li(e,t,Ra(t))},xn.deburr=Ga,xn.defaultTo=function(e,t){return null==e||e!=e?t:e},xn.divide=Sl,xn.endsWith=function(e,t,n){e=va(e),t=ar(t);var i=e.length,o=n=n===r?i:si(ga(n),0,i);return(n-=t.length)>=0&&e.slice(n,o)==t},xn.eq=$s,xn.escape=function(e){return(e=va(e))&&Y.test(e)?e.replace(V,Qt):e},xn.escapeRegExp=function(e){return(e=va(e))&&ne.test(e)?e.replace(te,"\\$&"):e},xn.every=function(e,t,n){var i=qs(e)?St:hi;return n&&yo(e,t,n)&&(t=r),i(e,so(t,3))},xn.find=ws,xn.findIndex=Go,xn.findKey=function(e,t){return It(e,so(t,3),vi)},xn.findLast=ys,xn.findLastIndex=qo,xn.findLastKey=function(e,t){return It(e,so(t,3),bi)},xn.floor=Cl,xn.forEach=vs,xn.forEachRight=bs,xn.forIn=function(e,t){return null==e?e:wi(e,so(t,3),Na)},xn.forInRight=function(e,t){return null==e?e:yi(e,so(t,3),Na)},xn.forOwn=function(e,t){return e&&vi(e,so(t,3))},xn.forOwnRight=function(e,t){return e&&bi(e,so(t,3))},xn.get=Ea,xn.gt=Us,xn.gte=Hs,xn.has=function(e,t){return null!=e&&po(e,t,Li)},xn.hasIn=Ta,xn.head=zo,xn.identity=rl,xn.includes=function(e,t,n,i){e=zs(e)?e:$a(e),n=n&&!i?ga(n):0;var r=e.length;return n<0&&(n=wn(r+n,0)),la(e)?n<=r&&e.indexOf(t,n)>-1:!!r&&Nt(e,t,n)>-1},xn.indexOf=function(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var r=null==n?0:ga(n);return r<0&&(r=wn(i+r,0)),Nt(e,t,r)},xn.inRange=function(e,t,n){return t=pa(t),n===r?(n=t,t=0):n=pa(n),function(e,t,n){return e>=yn(t,n)&&e<wn(t,n)}(e=wa(e),t,n)},xn.invoke=Ia,xn.isArguments=Gs,xn.isArray=qs,xn.isArrayBuffer=Vs,xn.isArrayLike=zs,xn.isArrayLikeObject=Ys,xn.isBoolean=function(e){return!0===e||!1===e||na(e)&&Wi(e)==w},xn.isBuffer=Ks,xn.isDate=Qs,xn.isElement=function(e){return na(e)&&1===e.nodeType&&!oa(e)},xn.isEmpty=function(e){if(null==e)return!0;if(zs(e)&&(qs(e)||"string"==typeof e||"function"==typeof e.splice||Ks(e)||da(e)||Gs(e)))return!e.length;var t=ho(e);if(t==C||t==E)return!e.size;if(Co(e))return!Mi(e).length;for(var n in e)if(Ne.call(e,n))return!1;return!0},xn.isEqual=function(e,t){return Ii(e,t)},xn.isEqualWith=function(e,t,n){var i=(n="function"==typeof n?n:r)?n(e,t):r;return i===r?Ii(e,t,r,n):!!i},xn.isError=Js,xn.isFinite=function(e){return"number"==typeof e&&pn(e)},xn.isFunction=Zs,xn.isInteger=Xs,xn.isLength=ea,xn.isMap=ia,xn.isMatch=function(e,t){return e===t||Ri(e,t,lo(t))},xn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:r,Ri(e,t,lo(t),n)},xn.isNaN=function(e){return ra(e)&&e!=+e},xn.isNative=function(e){if(So(e))throw new Se("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Ni(e)},xn.isNil=function(e){return null==e},xn.isNull=function(e){return null===e},xn.isNumber=ra,xn.isObject=ta,xn.isObjectLike=na,xn.isPlainObject=oa,xn.isRegExp=sa,xn.isSafeInteger=function(e){return Xs(e)&&e>=-9007199254740991&&e<=c},xn.isSet=aa,xn.isString=la,xn.isSymbol=ua,xn.isTypedArray=da,xn.isUndefined=function(e){return e===r},xn.isWeakMap=function(e){return na(e)&&ho(e)==k},xn.isWeakSet=function(e){return na(e)&&"[object WeakSet]"==Wi(e)},xn.join=function(e,t){return null==e?"":gn.call(e,t)},xn.kebabCase=qa,xn.last=Jo,xn.lastIndexOf=function(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var o=i;return n!==r&&(o=(o=ga(n))<0?wn(i+o,0):yn(o,i-1)),t==t?function(e,t,n){for(var i=n+1;i--;)if(e[i]===t)return i;return i}(e,t,o):Rt(e,Mt,o,!0)},xn.lowerCase=Va,xn.lowerFirst=za,xn.lt=ca,xn.lte=fa,xn.max=function(e){return e&&e.length?pi(e,rl,Ai):r},xn.maxBy=function(e,t){return e&&e.length?pi(e,so(t,2),Ai):r},xn.mean=function(e){return Ft(e,rl)},xn.meanBy=function(e,t){return Ft(e,so(t,2))},xn.min=function(e){return e&&e.length?pi(e,rl,Fi):r},xn.minBy=function(e,t){return e&&e.length?pi(e,so(t,2),Fi):r},xn.stubArray=ml,xn.stubFalse=wl,xn.stubObject=function(){return{}},xn.stubString=function(){return""},xn.stubTrue=function(){return!0},xn.multiply=_l,xn.nth=function(e,t){return e&&e.length?$i(e,ga(t)):r},xn.noConflict=function(){return ot._===this&&(ot._=je),this},xn.noop=ul,xn.now=Es,xn.pad=function(e,t,n){e=va(e);var i=(t=ga(t))?on(e):0;if(!t||i>=t)return e;var r=(t-i)/2;return Ur(cn(r),n)+e+Ur(dn(r),n)},xn.padEnd=function(e,t,n){e=va(e);var i=(t=ga(t))?on(e):0;return t&&i<t?e+Ur(t-i,n):e},xn.padStart=function(e,t,n){e=va(e);var i=(t=ga(t))?on(e):0;return t&&i<t?Ur(t-i,n)+e:e},xn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),bn(va(e).replace(ie,""),t||0)},xn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&yo(e,t,n)&&(t=n=r),n===r&&("boolean"==typeof t?(n=t,t=r):"boolean"==typeof e&&(n=e,e=r)),e===r&&t===r?(e=0,t=1):(e=pa(e),t===r?(t=e,e=0):t=pa(t)),e>t){var i=e;e=t,t=i}if(n||e%1||t%1){var o=Sn();return yn(e+o*(t-e+tt("1e-"+((o+"").length-1))),t)}return Vi(e,t)},xn.reduce=function(e,t,n){var i=qs(e)?Et:xt,r=arguments.length<3;return i(e,so(t,4),n,r,ci)},xn.reduceRight=function(e,t,n){var i=qs(e)?Tt:xt,r=arguments.length<3;return i(e,so(t,4),n,r,fi)},xn.repeat=function(e,t,n){return t=(n?yo(e,t,n):t===r)?1:ga(t),zi(va(e),t)},xn.replace=function(){var e=arguments,t=va(e[0]);return e.length<3?t:t.replace(e[1],e[2])},xn.result=function(e,t,n){var i=-1,o=(t=wr(t,e)).length;for(o||(o=1,e=r);++i<o;){var s=null==e?r:e[jo(t[i])];s===r&&(i=o,s=n),e=Zs(s)?s.call(e):s}return e},xn.round=Wl,xn.runInContext=e,xn.sample=function(e){return(qs(e)?Qn:Ki)(e)},xn.size=function(e){if(null==e)return 0;if(zs(e))return la(e)?on(e):e.length;var t=ho(e);return t==C||t==E?e.size:Mi(e).length},xn.snakeCase=Ya,xn.some=function(e,t,n){var i=qs(e)?Ot:nr;return n&&yo(e,t,n)&&(t=r),i(e,so(t,3))},xn.sortedIndex=function(e,t){return ir(e,t)},xn.sortedIndexBy=function(e,t,n){return rr(e,t,so(n,2))},xn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var i=ir(e,t);if(i<n&&$s(e[i],t))return i}return-1},xn.sortedLastIndex=function(e,t){return ir(e,t,!0)},xn.sortedLastIndexBy=function(e,t,n){return rr(e,t,so(n,2),!0)},xn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=ir(e,t,!0)-1;if($s(e[n],t))return n}return-1},xn.startCase=Ka,xn.startsWith=function(e,t,n){return e=va(e),n=null==n?0:si(ga(n),0,e.length),t=ar(t),e.slice(n,n+t.length)==t},xn.subtract=Al,xn.sum=function(e){return e&&e.length?Bt(e,rl):0},xn.sumBy=function(e,t){return e&&e.length?Bt(e,so(t,2)):0},xn.template=function(e,t,n){var i=xn.templateSettings;n&&yo(e,t,n)&&(t=r),e=va(e),t=Ca({},t,i,Qr);var o,s,a=Ca({},t.imports,i.imports,Qr),l=Ra(a),u=Gt(a,l),d=0,c=t.interpolate||ve,f="__p += '",h=Ae((t.escape||ve).source+"|"+c.source+"|"+(c===J?ce:ve).source+"|"+(t.evaluate||ve).source+"|$","g"),p="//# sourceURL="+(Ne.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Je+"]")+"\n";e.replace(h,(function(t,n,i,r,a,l){return i||(i=r),f+=e.slice(d,l).replace(be,Jt),n&&(o=!0,f+="' +\n__e("+n+") +\n'"),a&&(s=!0,f+="';\n"+a+";\n__p += '"),i&&(f+="' +\n((__t = ("+i+")) == null ? '' : __t) +\n'"),d=l+t.length,t})),f+="';\n";var g=Ne.call(t,"variable")&&t.variable;if(g){if(ue.test(g))throw new Se("Invalid `variable` option passed into `_.template`")}else f="with (obj) {\n"+f+"\n}\n";f=(s?f.replace(U,""):f).replace(H,"$1").replace(G,"$1;"),f="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var m=Xa((function(){return Ce(l,p+"return "+f).apply(r,u)}));if(m.source=f,Js(m))throw m;return m},xn.times=function(e,t){if((e=ga(e))<1||e>c)return[];var n=h,i=yn(e,h);t=so(t),e-=h;for(var r=$t(i,t);++n<e;)t(n);return r},xn.toFinite=pa,xn.toInteger=ga,xn.toLength=ma,xn.toLower=function(e){return va(e).toLowerCase()},xn.toNumber=wa,xn.toSafeInteger=function(e){return e?si(ga(e),-9007199254740991,c):0===e?e:0},xn.toString=va,xn.toUpper=function(e){return va(e).toUpperCase()},xn.trim=function(e,t,n){if((e=va(e))&&(n||t===r))return Ut(e);if(!e||!(t=ar(t)))return e;var i=sn(e),o=sn(t);return vr(i,Vt(i,o),zt(i,o)+1).join("")},xn.trimEnd=function(e,t,n){if((e=va(e))&&(n||t===r))return e.slice(0,an(e)+1);if(!e||!(t=ar(t)))return e;var i=sn(e);return vr(i,0,zt(i,sn(t))+1).join("")},xn.trimStart=function(e,t,n){if((e=va(e))&&(n||t===r))return e.replace(ie,"");if(!e||!(t=ar(t)))return e;var i=sn(e);return vr(i,Vt(i,sn(t))).join("")},xn.truncate=function(e,t){var n=30,i="...";if(ta(t)){var o="separator"in t?t.separator:o;n="length"in t?ga(t.length):n,i="omission"in t?ar(t.omission):i}var s=(e=va(e)).length;if(Zt(e)){var a=sn(e);s=a.length}if(n>=s)return e;var l=n-on(i);if(l<1)return i;var u=a?vr(a,0,l).join(""):e.slice(0,l);if(o===r)return u+i;if(a&&(l+=u.length-l),sa(o)){if(e.slice(l).search(o)){var d,c=u;for(o.global||(o=Ae(o.source,va(fe.exec(o))+"g")),o.lastIndex=0;d=o.exec(c);)var f=d.index;u=u.slice(0,f===r?l:f)}}else if(e.indexOf(ar(o),l)!=l){var h=u.lastIndexOf(o);h>-1&&(u=u.slice(0,h))}return u+i},xn.unescape=function(e){return(e=va(e))&&z.test(e)?e.replace(q,ln):e},xn.uniqueId=function(e){var t=++Pe;return va(e)+t},xn.upperCase=Qa,xn.upperFirst=Ja,xn.each=vs,xn.eachRight=bs,xn.first=zo,ll(xn,(yl={},vi(xn,(function(e,t){Ne.call(xn.prototype,t)||(yl[t]=e)})),yl),{chain:!1}),xn.VERSION="4.17.21",vt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){xn[e].placeholder=xn})),vt(["drop","take"],(function(e,t){Hn.prototype[e]=function(n){n=n===r?1:wn(ga(n),0);var i=this.__filtered__&&!t?new Hn(this):this.clone();return i.__filtered__?i.__takeCount__=yn(n,i.__takeCount__):i.__views__.push({size:yn(n,h),type:e+(i.__dir__<0?"Right":"")}),i},Hn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),vt(["filter","map","takeWhile"],(function(e,t){var n=t+1,i=1==n||3==n;Hn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:so(e,3),type:n}),t.__filtered__=t.__filtered__||i,t}})),vt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Hn.prototype[e]=function(){return this[n](1).value()[0]}})),vt(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Hn.prototype[e]=function(){return this.__filtered__?new Hn(this):this[n](1)}})),Hn.prototype.compact=function(){return this.filter(rl)},Hn.prototype.find=function(e){return this.filter(e).head()},Hn.prototype.findLast=function(e){return this.reverse().find(e)},Hn.prototype.invokeMap=Yi((function(e,t){return"function"==typeof e?new Hn(this):this.map((function(n){return Oi(n,e,t)}))})),Hn.prototype.reject=function(e){return this.filter(Fs(so(e)))},Hn.prototype.slice=function(e,t){e=ga(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Hn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==r&&(n=(t=ga(t))<0?n.dropRight(-t):n.take(t-e)),n)},Hn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Hn.prototype.toArray=function(){return this.take(h)},vi(Hn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),o=xn[i?"take"+("last"==t?"Right":""):t],s=i||/^find/.test(t);o&&(xn.prototype[t]=function(){var t=this.__wrapped__,a=i?[1]:arguments,l=t instanceof Hn,u=a[0],d=l||qs(t),c=function(e){var t=o.apply(xn,Lt([e],a));return i&&f?t[0]:t};d&&n&&"function"==typeof u&&1!=u.length&&(l=d=!1);var f=this.__chain__,h=!!this.__actions__.length,p=s&&!f,g=l&&!h;if(!s&&d){t=g?t:new Hn(this);var m=e.apply(t,a);return m.__actions__.push({func:ps,args:[c],thisArg:r}),new Un(m,f)}return p&&g?e.apply(this,a):(m=this.thru(c),p?i?m.value()[0]:m.value():m)})})),vt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Te[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:pop|shift)$/.test(e);xn.prototype[e]=function(){var e=arguments;if(i&&!this.__chain__){var r=this.value();return t.apply(qs(r)?r:[],e)}return this[n]((function(n){return t.apply(qs(n)?n:[],e)}))}})),vi(Hn.prototype,(function(e,t){var n=xn[t];if(n){var i=n.name+"";Ne.call(kn,i)||(kn[i]=[]),kn[i].push({name:t,func:n})}})),kn[jr(r,2).name]=[{name:"wrapper",func:r}],Hn.prototype.clone=function(){var e=new Hn(this.__wrapped__);return e.__actions__=Er(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Er(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Er(this.__views__),e},Hn.prototype.reverse=function(){if(this.__filtered__){var e=new Hn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Hn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=qs(e),i=t<0,r=n?e.length:0,o=function(e,t,n){for(var i=-1,r=n.length;++i<r;){var o=n[i],s=o.size;switch(o.type){case"drop":e+=s;break;case"dropRight":t-=s;break;case"take":t=yn(t,e+s);break;case"takeRight":e=wn(e,t-s)}}return{start:e,end:t}}(0,r,this.__views__),s=o.start,a=o.end,l=a-s,u=i?a:s-1,d=this.__iteratees__,c=d.length,f=0,h=yn(l,this.__takeCount__);if(!n||!i&&r==l&&h==l)return fr(e,this.__actions__);var p=[];e:for(;l--&&f<h;){for(var g=-1,m=e[u+=t];++g<c;){var w=d[g],y=w.iteratee,v=w.type,b=y(m);if(2==v)m=b;else if(!b){if(1==v)continue e;break e}}p[f++]=m}return p},xn.prototype.at=gs,xn.prototype.chain=function(){return hs(this)},xn.prototype.commit=function(){return new Un(this.value(),this.__chain__)},xn.prototype.next=function(){this.__values__===r&&(this.__values__=ha(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?r:this.__values__[this.__index__++]}},xn.prototype.plant=function(e){for(var t,n=this;n instanceof $n;){var i=Bo(n);i.__index__=0,i.__values__=r,t?o.__wrapped__=i:t=i;var o=i;n=n.__wrapped__}return o.__wrapped__=e,t},xn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Hn){var t=e;return this.__actions__.length&&(t=new Hn(this)),(t=t.reverse()).__actions__.push({func:ps,args:[ts],thisArg:r}),new Un(t,this.__chain__)}return this.thru(ts)},xn.prototype.toJSON=xn.prototype.valueOf=xn.prototype.value=function(){return fr(this.__wrapped__,this.__actions__)},xn.prototype.first=xn.prototype.head,st&&(xn.prototype[st]=function(){return this}),xn}();ot._=un,(i=function(){return un}.call(t,n,t,e))===r||(e.exports=i)}.call(this)},88306:(e,t,n)=>{var i=n(83369);function r(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var i=arguments,r=t?t.apply(this,i):i[0],o=n.cache;if(o.has(r))return o.get(r);var s=e.apply(this,i);return n.cache=o.set(r,s)||o,s};return n.cache=new(r.Cache||i),n}r.Cache=i,e.exports=r},7771:(e,t,n)=>{var i=n(55639);e.exports=function(){return i.Date.now()}},78718:(e,t,n)=>{var i=n(25970),r=n(99021)((function(e,t){return null==e?{}:i(e,t)}));e.exports=r},70479:e=>{e.exports=function(){return[]}},95062:e=>{e.exports=function(){return!1}},23493:(e,t,n)=>{var i=n(23279),r=n(13218);e.exports=function(e,t,n){var o=!0,s=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return r(n)&&(o="leading"in n?!!n.leading:o,s="trailing"in n?!!n.trailing:s),i(e,t,{leading:o,maxWait:t,trailing:s})}},14841:(e,t,n)=>{var i=n(27561),r=n(13218),o=n(33448),s=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,l=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return NaN;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=i(e);var n=a.test(e);return n||l.test(e)?u(e.slice(2),n?2:8):s.test(e)?NaN:+e}},79833:(e,t,n)=>{var i=n(80531);e.exports=function(e){return null==e?"":i(e)}},79684:function(e,t,n){"use strict";var i,r,o,s,a,l,u,d,c,f,h,p,g,m,w=this&&this.__classPrivateFieldGet||function(e,t,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(e):i?i.value:t.get(e)},y=this&&this.__classPrivateFieldSet||function(e,t,n,i,r){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?r.call(e,n):r?r.value=n:t.set(e,n),n},v=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FinsembleDesktopAgent=void 0;const b=n(21614),S=n(63250),C=v(n(2518)),_=n(87406),W=n(87406);class A{constructor(){i.set(this,12e4),r.set(this,null),o.set(this,[])}start(){this.registerHeartbeat()}registerHeartbeat(){clearTimeout(w(this,r,"f")),C.default.system.debug("FinsembleDesktopAgent: heartbeat received"),y(this,r,setTimeout((()=>{C.default.system.warn(`FinsembleDesktopAgent: No heartbeat received within ${w(this,i,"f")} milliseconds`),this.notifyDisconnect()}),w(this,i,"f")),"f")}notifyDisconnect(){console.warn("fdc3 has lost connectivity to the interop service. You may need to restart this app."),w(this,o,"f").forEach((e=>{e(`No heartbeat received from interop service within ${w(this,i,"f")} milliseconds`)}))}onDisconnect(e){y(this,o,w(this,o,"f").concat(e),"f")}stop(){clearTimeout(w(this,r,"f"))}}i=new WeakMap,r=new WeakMap,o=new WeakMap;class L{constructor(e,t,n="app"){s.set(this,void 0),y(this,s,e,"f"),this.id=t,this.type=n}broadcast(e){w(this,s,"f").channelBroadcast(this.id,e)}getCurrentContext(e){return w(this,s,"f").channelGetCurrentContext(this.id,e)}addContextListener(e,t){return w(this,s,"f").channelAddContextListener(this.id,e,t)}}s=new WeakMap,t.FinsembleDesktopAgent=class{constructor({routerClient:e,startup:t}){if(a.set(this,!1),l.set(this,new A),u.set(this,!1),d.set(this,""),c.set(this,`FSBL.FDC3.Client.${(0,b.v4)()}`),f.set(this,{}),h.set(this,{}),p.set(this,[]),g.set(this,void 0),m.set(this,void 0),y(this,g,e,"f"),y(this,m,t,"f"),window&&window.Event&&window.dispatchEvent){const e=new Event("fdc3Ready");window.dispatchEvent(e)}}meta(){return{uuid:w(this,d,"f"),href:window.document?document.location.href:""}}handleHeartbeat(){w(this,l,"f").registerHeartbeat()}triggerContextListeners(e){var t,n;const{context:i}=e.payload;let r;if(e.meta.targetSubscriberId){let t;Object.values(w(this,h,"f")).every((n=>(t=n.find((t=>t.targetSubscriberId===e.meta.targetSubscriberId)),void 0===t))),r=t?[t]:[]}else r=(null!==(t=w(this,h,"f")[null==i?void 0:i.type])&&void 0!==t?t:[]).concat(null!==(n=w(this,h,"f")["*"])&&void 0!==n?n:[]);r.forEach((({handler:t,channel:n})=>{e.meta.channel===n||!e.meta.channel&&!n?(C.default.system.debug(`FDC3 Client: triggerContextListeners for all on ${null!=n?n:"default"} channel`,e.type,e),t(i)):C.default.system.debug(`FDC3 Client: triggerContextListeners skipped for all on ${null!=n?n:"default"} channel`,e.type,e)}))}triggerIntentListeners(e){const{intent:t,context:n}=e.payload,i=w(this,f,"f")[t];n&&(i||[]).forEach((e=>e(n)))}handleIncoming(e){switch(C.default.system.debug("FDC3 Client: handleIncoming",e.type,e),e.type){case"broadcast":this.triggerContextListeners(e);break;case"intent":this.triggerIntentListeners(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=w(this,d,"f")),e};w(this,p,"f").forEach((async t=>{const{message:n,handler:i,resolve:r}=t,{err:o,receiveMessage:s}=await this.exchange(e(n),i);r({err:o,receiveMessage:s})})),y(this,p,[],"f")}exchange(e,t=(()=>{})){return new Promise((async n=>{if(w(this,a,"f")){const{err:i,response:r}=await w(this,g,"f").query(_.SERVER_CHANNEL,e,t);n({err:i,receiveMessage:null==r?void 0:r.data})}else w(this,p,"f").push({message:e,handler:t,resolve:n}),this.start()}))}async connect(){const e=w(this,m,"f").getStartupData(),{windowName:t="Unknown window",authenticationToken:n}=e;C.default.system.log(`fdc3.connect StartupData for ${t}`,e),y(this,d,t,"f");const i={type:"register",meta:this.meta(),payload:{clientChannel:w(this,c,"f"),windowName:t,authenticationToken:n}};w(this,g,"f").query(_.SERVER_CHANNEL,i,(e=>{e?C.default.system.error("connect error",e):(w(this,g,"f").addResponder(w(this,c,"f"),((e,t)=>{if(e||!t){const t=(0,W.errorAsString)(null!=e?e:"No request received on responder");C.default.system.error(`FinsembleDesktopAgent can't listen on channel ${w(this,c,"f")} : ${t}`)}else t.data&&this.handleIncoming(t.data),t.sendQueryResponse(null)})),y(this,a,!0,"f"),this.releaseQueue(),w(this,l,"f").start())}))}async start(){w(this,u,"f")||(y(this,u,!0,"f"),await w(this,m,"f").onReady(),this.connect())}async stop(){w(this,l,"f").stop();const e={type:"unregister",meta:this.meta()};await this.exchange(e),y(this,u,!1,"f"),w(this,g,"f").removeResponder(w(this,c,"f")),y(this,a,!1,"f")}onDisconnect(e){w(this,l,"f").onDisconnect(e)}async channelGetCurrentContext(e,t){const n={type:"currentContextRequest",meta:Object.assign(Object.assign({},this.meta()),{channel:e}),payload:{contextType:t}},{err:i,receiveMessage:r}=await this.exchange(n);return i?null:"currentContext"===(null==r?void 0:r.type)?r.payload.context:null}broadcast(e){const t={type:"broadcast",meta:this.meta(),payload:{context:e}};this.exchange(t)}channelBroadcast(e,t){const n={type:"broadcast",meta:Object.assign(Object.assign({},this.meta()),{channel:e}),payload:{context:t}};this.exchange(n)}async getSystemChannels(){var e;const t={type:"systemChannelRequest",meta:this.meta()},{err:n,receiveMessage:i}=await this.exchange(t);return n?[]:("systemChannels"===(null==i?void 0:i.type)?null===(e=null==i?void 0:i.payload)||void 0===e?void 0:e.channels:[]).map((e=>new L(this,e,"system")))}async open(e,t){const n={type:"open",meta:this.meta(),payload:{target:e,context:t}},{err:i,receiveMessage:r}=await this.exchange(n),o=r;if(i)throw S.OpenError.ResolverUnavailable;if(o.payload.error)throw o.payload.error}async findIntent(e,t){const n={type:"findIntent",meta:this.meta(),payload:{intent:e,context:t}},{err:i,receiveMessage:r}=await this.exchange(n),o=r;if(i)throw S.ResolveError.ResolverUnavailable;if(o.payload.error)throw o.payload.error;if(!o.payload.appIntent)throw"Invalid response returned from InteropService for findIntent. No appIntent and no error.";return o.payload.appIntent}async findIntentsByContext(e){const t={type:"findIntentsByContext",meta:this.meta(),payload:{context:e}},{receiveMessage:n}=await this.exchange(t),i=n;if(i.payload.error)throw i.payload.error;return i.payload.intents||[]}async raiseIntent(e,t,n){const i={type:"raiseIntent",meta:this.meta(),payload:{intent:e,context:t,target:n}},{err:r,receiveMessage:o}=await this.exchange(i),s=o;if(r)throw S.ResolveError.ResolverUnavailable;if(s.payload.error)throw s.payload.error;if(!s.payload.data)throw"Invalid response returned from InteropService for raiseIntent. No data.";return s.payload.data}async raiseIntentForContext(e,t){const n={type:"raiseIntent",meta:this.meta(),payload:{context:e,target:t}},{err:i,receiveMessage:r}=await this.exchange(n),o=r;if(i)throw S.ResolveError.ResolverUnavailable;if(o.payload.error)throw o.payload.error;if(!o.payload.data)throw"Invalid response returned from InteropService for raiseIntentForContext. No data.";return o.payload.data}addIntentListener(e,t){w(this,f,"f")[e]=(0,W.mmAdd)(w(this,f,"f"),e,t);const n={type:"subscribeIntent",meta:this.meta(),payload:{intent:e}};return this.exchange(n),{unsubscribe:()=>{const n={type:"unsubscribeIntent",meta:this.meta(),payload:{intent:e}};this.exchange(n),w(this,f,"f")[e]=(0,W.mmRemove)(w(this,f,"f"),e,t)}}}channelAddContextListener(e,t,n){const i=n&&t||"*";n||(n=t);const r=`subscriberId.${Date.now()}_${Math.random()}`,o={handler:n,channel:e,targetSubscriberId:r};w(this,h,"f")[i]=(0,W.mmAdd)(w(this,h,"f"),i,o);let s={type:"subscribeContext",meta:Object.assign(Object.assign({},this.meta()),{targetSubscriberId:r}),payload:{contextType:i}};return e&&(s.meta.channel=e),this.exchange(s),{unsubscribe:()=>{let t={type:"unsubscribeContext",meta:this.meta(),payload:{contextType:i}};e&&(t.meta.channel=e),w(this,h,"f")[i]=(0,W.mmRemove)(w(this,h,"f"),i,o),this.exchange(t)}}}addContextListener(e,t){return this.channelAddContextListener(null,e,t)}async joinChannel(e){const t={type:"joinChannels",meta:this.meta(),payload:{channels:[e]}};await this.exchange(t)}async getOrCreateChannel(e){return new L(this,e)}async getCurrentChannels(){const e={type:"getCurrentChannels",meta:this.meta()},{err:t,receiveMessage:n}=await this.exchange(e),i=n;if(t)throw t;if(i.payload.error)throw i.payload.error;if(!i.payload.data)throw"Invalid response returned from InteropService for getCurrentChannels. No data.";return i.payload.data.map((e=>new L(this,e.channel,"system")))}async getCurrentChannel(){const e=await this.getCurrentChannels();return e&&e.length?e[0]:null}async leaveCurrentChannel(){const e={type:"leaveChannels",meta:this.meta(),payload:{}};await this.exchange(e)}getInfo(){return{fdc3Version:"1.2",provider:"Finsemble",providerVersion:process.env.npm_package_version}}},a=new WeakMap,l=new WeakMap,u=new WeakMap,d=new WeakMap,c=new WeakMap,f=new WeakMap,h=new WeakMap,p=new WeakMap,g=new WeakMap,m=new WeakMap},87406:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AnonymousAuthenticationToken=t.INTENT_RESOLVER_CHANNEL=t.SERVER_CHANNEL=t.GLOBAL_CHANNEL=t.errorAsString=t.mmRemove=t.concatNoDups=t.mmAdd=void 0,t.mmAdd=(e,t,n)=>(e[t]||[]).concat([n]),t.concatNoDups=(e,t)=>{const n=Array.isArray(t)?t:[t],i=e?n.concat(e):n;return Array.from(new Set(i))},t.mmRemove=(e,t,n)=>(e[t]||[]).filter((e=>e!==n)),t.errorAsString=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},t.GLOBAL_CHANNEL="global",t.SERVER_CHANNEL="FSBL.FDC3.Interop.Server",t.INTENT_RESOLVER_CHANNEL="FSBL.FDC3.intent.resolver",t.AnonymousAuthenticationToken={signatureString:"",signatureStringType:"unauthenticated",meta:{name:"Anonymous app"}}},51806:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FSBLService=void 0;const i=n(11314),r=n(47107),o=n(91374),s=n(10166),a=n(21614),l=n(44137),u=n(79684);t.FSBLService=class{async startApp(){var e,t,n,d,c,f,h,p;const g=await(0,r.getSystemStartupData)(),m=o.System.Window.getCurrent(),w=null!==(n=null!==(e=m.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",y=null!==(f=null!==(d=m.name)&&void 0!==d?d:null===(c=null===document||void 0===document?void 0:document.location)||void 0===c?void 0:c.href)&&void 0!==f?f:`Unknown window-${(0,a.v4)()}`,v=null!==(h=m.webContentsName)&&void 0!==h?h:y,b=null!==(p=(0,r.getManifestFromStartupData)(g))&&void 0!==p?p:{},S=(0,r.getRouterConfig)({windowName:y,systemManifest:b});await i.RouterController.start(S);const C=s.Startup.getInstance();C.setStartupData({windowName:y,webContentsName:v,authenticationToken:{signatureString:"",signatureStringType:"unauthenticated",meta:{name:w}}}),l.Globals.fdc3=new u.FinsembleDesktopAgent({routerClient:i.RouterClient,startup:C}),C.setReady()}async stopApp(){i.RouterController.stop()}}},47107:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getManifestFromStartupData=t.getSystemStartupData=t.getRouterConfig=t.getRecommendedTransport=void 0;const r=i(n(2518)),o=n(91374),s=n(64324),a={sameDomainTransport:"FinsembleTransport",crossDomainTransport:"FinsembleTransport",transportSettings:{FinsembleTransport:{serverAddress:"ws://127.0.0.1:3376"}},transportName:"FinsembleTransport"},l=e=>{if(!e)return r.default.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,i=window.location.protocol===t.protocol,o=(void 0!==window.location.port?window.location.port:80)===(void 0!==t.port?t.port:80),s=n&&o&&i;return r.default.system.debug(`Transport crossDomain=${l} (${n}:${i}:${o})`),!s};t.getRecommendedTransport=e=>{const{moduleRoot:t,router:n}=null==e?void 0:e.finsemble,{sameDomainTransport:i="SharedWorker",crossDomainTransport:r="IPCBus"}=null!=n?n:{};return l(t)?r:i},t.getRouterConfig=({windowName:e,systemManifest:n,transportSettings:i})=>n?((e,n)=>{var i,o,s,l;if(r.default.system.info("WINDOW LIFECYCLE:STARTUP:RouterClient:routerConfigFromManifest"),e&&"string"!=typeof e){const r=e.finsemble,a=null!==(s=null!==(o=null===(i=null==r?void 0:r.router)||void 0===i?void 0:i.transportSettings)&&void 0!==o?o:null==r?void 0:r.IAC)&&void 0!==s?s:{},u=null!==(l=null==r?void 0:r.notificationURL)&&void 0!==l?l:`${r.moduleRoot}/components/system/notification/notification.html`;return{windowName:n,routerDomainRoot:r.moduleRoot,transportName:(0,t.getRecommendedTransport)(e),transportSettings:a,notificationURL:u}}return r.default.system.error("WINDOW LIFECYCLE:STARTUP:RouterClient:routerConfigFromManifest failed -- fatal error. No manifest found.",e),Object.assign(Object.assign({},a),{windowName:n})})(n,e):Object.assign(Object.assign({},a),{windowName:e,transportSettings:null!=i?i:{}}),t.getSystemStartupData=async()=>new Promise((e=>{o.System.Window.getCurrent().getOptions((t=>{e(t)}))})),t.getManifestFromStartupData=e=>{let t=null==e?void 0:e.manifest;return(null==t?void 0:t.finsemble)&&s.ConfigUtilInstance.resolveManifestMacros(t,t.finsemble),t}},10166:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Startup=void 0;const i=n(87406),r=n(44137),o=n(21614),s=n(7860),a=`Unknown window-${(0,o.v4)()}`;class l{constructor(){this.isReady=!1,this.onReadyListeners=[],this.currentStartupData={authenticationToken:i.AnonymousAuthenticationToken,windowName:a,webContentsName:a}}static getInstance(){return l.instance?l.instance:l.instance=(0,s.singleton)("Startup",l)}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()})),r.Globals.dispatchEvent&&r.Globals.dispatchEvent(new Event("FSBLReady"))}}t.Startup=l,l.instance=null},27917:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return r(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.StoreModel=void 0;const a=n(1641),l=o(n(31482)),u=s(n(2518));class d{constructor(e,t,n){var i,r;this.isGlobal=!1,this.values={},this.listeners={},this.registeredDispatchListeners=[],this.mapping={},this.subs={},this.Dispatcher={register:e=>{this.registeredDispatchListeners.push(e)},dispatch:e=>{this.isGlobal?this.routerClient.transmit(`storeService.dispatch.${this.name}`,e):this.handleDispatchedMessages(null,{data:e})}},this.handleChanges=(e,t)=>{if(e)u.default.system.error("DistributedStoreClient",e);else{const{store:e,field:n,storeData:i,value:r}=t.data;if(e){const e=n?`.${n}`:"",t=`${this.name}${e}`,o=i||r;this.triggerListeners(t,o)}}},this.routerClient=t,this.removeStoreCallback=n,this.isGlobal=!!e.global,this.name=null!==(r=null!==(i=e.name)&&void 0!==i?i:e.store)&&void 0!==r?r:"StoreModel() invariant. store.name not provided.",e.values&&(this.values=e.values),l.initObject(this.values,null,this.mapping),this.isGlobal&&this.routerClient.addListener(`storeService.dispatch.${this.name}`,((e,t)=>{this.handleDispatchedMessages(e,t)}))}handleDispatchedMessages(e,t){(null==t?void 0:t.data)&&this.registeredDispatchListeners.forEach((e=>{e(t.data)}))}setValue(e,t){if(e.field||u.default.system.error("DistributedStore.setValue:no field provided",e),e.hasOwnProperty("value")||u.default.system.error("DistributedStore.setValue:no value provided",e),this.isGlobal){const n={store:this.name,field:e.field,value:e.value};this.routerClient.query("storeService.setValue",n,(e=>{t&&t(e)}))}else{const n=l.checkForObjectChange(this.values,e.field,this.mapping);l.setPath(this.values,e.field,e.value),l.mapField(this.values,e.field,this.mapping),n&&this.sendRemovals(n),this.triggerListeners(this.name,this),this.publishObjectUpdates(e.field,this.mapping),t&&t(null)}}publishObjectUpdates(e,t){const n=t;for(;e;)this.triggerListeners(`${this.name}.${e}`,l.byString(this.values,e)),e=n[e]}sendRemovals(e){for(let t in e)this.triggerListeners(`${this.name}.${t}`,l.byString(this.values,t))}setValues(e,t){return e?Array.isArray(e)?void(0,a.each)(e,((e,t)=>{this.setValue(e,t)}),(e=>t?t(e):null)):u.default.system.error("DistributedStore.setValues:params must be an array"):u.default.system.error("DistributedStore.setValues:no params given")}getValue(e,t){if("string"==typeof e&&(e={field:e}),!e.field)return null==t||t("no field provided"),"no field provided";if(!this.isGlobal){const n=l.byString(this.values,e.field);return void 0!==n?(null==t||t(null,n),n):(null==t||t("couldn't find a value"),null)}return this.getGlobalValue(e.field,t),null}getAll(e){if(!this.isGlobal)return e&&e(null,this.values),this.values;this.getGlobalValues(null,e)}getValues(e,t){if(null===e&&(e=t),"function"==typeof e)return t=e,this.isGlobal?this.getGlobalValues(null,t):t?t(null,this.values):this.values;if(!Array.isArray(e))return{[e]:this.getValue(e,t)};if(this.isGlobal)return this.getGlobalValues(e,t);const n={};for(let t=0;t<e.length;t++){const i=e[t],r="string"==typeof i?i:i.field,o=l.byString(this.values,r);n[r]=o}return t?t(null,n):n}async getGlobalValue(e,t){const{err:n,response:i}=await this.routerClient.query("storeService.getValue",{store:this.name,field:e});return null==t||t(n,i.data),{err:n,data:i.data}}getGlobalValues(e,t){this.routerClient.query("storeService.getValues",{store:this.name,fields:e},((e,n)=>{t&&t(e,n.data)}))}removeValue(e,t){const n={field:"string"==typeof e?e:e.field,value:null};return this.setValue(n,t)}removeValues(e,t){if(!Array.isArray(e))return t("The passed in parameter needs to be an array");(0,a.map)(e,this.removeValue,((e,n)=>t(e,n)))}destroy(e){const t={store:this.name,global:this.isGlobal};this.removeStoreCallback(t,(t=>{t?e&&e(t):e&&e(null,!0)}))}changeSub(e){this.subs[e]||(this.isGlobal&&this.routerClient.subscribe(`storeService${e}`,this.handleChanges),this.subs[e]=!0)}addListener(e,t,n){var i;"function"==typeof e&&(t=e,e={});const{field:r}=e,o=r?`.${r}`:"",s=`${this.name}${o}`;this.listeners[s]=[t].concat(null!==(i=this.listeners[s])&&void 0!==i?i:[]),this.changeSub(s),null==n||n()}addListeners(e,t,n){var i;if(!Array.isArray(e))return u.default.deprecated("distributedStoreClient StoreModel - addListeners() with an object instead of an array is deprecated. Please use addListener() instead."),void this.addListener(e,t,n);const r="function"==typeof t?t:null;for(let t=0;t<e.length;t++){const n=e[t];let o="string"==typeof n?n:n.field;const s="string"!=typeof n?n.listener:r;if(s){const e=o?`.${o}`:"",t=`${this.name}${e}`;this.listeners[t]=[s].concat(null!==(i=this.listeners[t])&&void 0!==i?i:[]),this.changeSub(t)}}null==n||n()}removeListener(e,t,n){const{field:i}=e,r=i?`.${i}`:"",o=`${this.name}${r}`;if(this.listeners[o])for(let e=0;e<this.listeners[o].length;e++)if(this.listeners[o][e]===t)return this.listeners[o].splice(e,1),void(null==n||n(null,!0));null==n||n(null,!1)}removeListeners(e,t,n){if(!Array.isArray(e))return"function"==typeof e?this.removeListener({},e,n):e.field&&t&&this.removeListener(e,t,n),null==n?void 0:n(null,!0);const i="function"==typeof t?t:null;e.forEach((e=>{const t="string"==typeof e?e:e.field,n="string"!=typeof e?e.listener:i,r=t?`.${t}`:"",o=`${this.name}${r}`;this.listeners[o]=this.listeners[o].filter((e=>e!==n))})),null==n||n(null,!0)}triggerListeners(e,t){var n;(null!==(n=this.listeners[e])&&void 0!==n?n:[]).forEach((n=>{u.default.system.debug("DistributedStore.triggerListeners",e,t),n(null,{field:e,value:t})}))}}t.StoreModel=d,t.default=d},25232:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t._BaseClient=void 0;const r=i(n(11314)),o=n(2518),s=n(91374),a=n(25495);t._BaseClient=class{constructor(e){this.onReadyCallback=e=>{e()},this.isReady=!1,this.startupDependencies={services:[],clients:[]},this.clientReadyQueue=[],this.windowName="",this.processClientReadyQueue=()=>{for(const e of this.clientReadyQueue)e();this.clientReadyQueue=[]},this.onReady=e=>{this.isReady?e():this.clientReadyQueue.push(e)},this.setClientOnline=()=>{var e;this.isReady=!0;const t=`STARTUP:CLIENT:ONLINE:${null===(e=this.finWindow)||void 0===e?void 0:e.name}:${this.name}`;this.logger.system.log(t),this.onReadyCallback((()=>{this.logger.system.debug(t),a.FSBLDependencyManagerSingleton.setClientOnline(this.name),this.processClientReadyQueue()}))},this.initialize=e=>{var t;this.logger.system.log("baseClient initialize",this.name),this.finWindow=s.System.Window.getCurrent(),this.windowName=null===(t=this.finWindow)||void 0===t?void 0:t.name,this.logger.system.debug("baseClient Init Router Ready",this.name,"DEPENDENCIES",this.startupDependencies),a.FSBLDependencyManagerSingleton.startup.waitFor(this.startupDependencies,(()=>{this.logger.system.log("baseClient initialize waitfor done",this.name),null==e||e(),this.setClientOnline()}),`${this.windowName}(${this.name})`)},this.name=e.name,e.onReady&&(this.onReadyCallback=e.onReady),this.startupDependencies=e.startupDependencies||{services:[],clients:[]},this.logger=o.Logger,this.routerClient=r.default}onClose(e){null==e||e()}}},9381:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigClient=void 0;const r=i(n(20670)),o=n(25232),s=i(n(84795)),a=i(n(2518));class l extends o._BaseClient{constructor(){super({startupDependencies:{},onReady(e){null==e||e()},name:"configClient"}),this.listeners={},this.subs={},this.handleChanges=(e,t)=>{if(e)a.default.system.error("ConfigClient handleChanges() error",e);else{t.data.field||(t.data.field=null);const{field:e,storeData:n,value:i}=t.data,r=n||i;this.triggerListeners(e||"configService",r)}},this.triggerListeners=(e,t)=>{var n;(null!==(n=this.listeners[e])&&void 0!==n?n:[]).forEach((n=>{a.default.system.debug("ConfigClient.triggerListeners",e,t),n(null,{field:e,value:t})}))}}async getManifest(e){await s.default.waitForStartup("configService");const{err:t,response:n}=await this.routerClient.query("configService.getValues",{fields:null});return null==e||e(t,n.data),{err:t,data:n.data}}async getValue(e,t){if("string"==typeof e&&(e={field:e}),!e.field){const e="no field provided";return null==t||t(e),{err:e}}await s.default.waitForStartup("configService");const{err:n,response:i}=await this.routerClient.query("configService.getValue",{field:e.field});return null==t||t(n,i.data),{err:n,data:i.data}}async getValues(e,t){if("function"==typeof e&&(t=e,e=null),e&&!Array.isArray(e))return this.getValue(e,t);await s.default.waitForStartup("configService");const{err:n,response:i}=await this.routerClient.query("configService.getValues",{fields:e});return null==t||t(n,i.data),{err:n,data:i.data}}async setValue(e,t){const n={field:e.field,value:e.value};await s.default.waitForStartup("configService");const{err:i}=await this.routerClient.query("configService.setValue",n);return null==t||t(i),{err:i}}async setValues(e,t){if(!e){const e="ConfigClient.SetValues. No params given";return a.default.system.error(e),null==t||t(e),{err:e}}if(!Array.isArray(e)){const e="ConfigClient.SetValues. Params must be an array";return a.default.system.error(e),null==t||t(e),{err:e}}await s.default.waitForStartup("configService");const{err:n}=await this.routerClient.query("configService.setValues",e);return null==t||t(n),{err:n}}async removeValue(e,t){let n={};if("string"!=typeof e){const e="No field provided";return null==t||t(e),{err:e}}return n.field=e,n.value=null,await this.setValue(n,t)}removeValues(e,t){return new Promise((n=>{if(!Array.isArray(e)){const e="The passed in parameter must be an array";return null==t||t(e),n({err:e})}const i=e.map((e=>this.removeValue(e)));Promise.all(i).then((e=>{const i=e.some((e=>e.err))?"Some values couldn't be removed. Check central logger.":null;null==t||t(i),n({err:i})}))}))}async changeSub(e){if(this.subs||(this.subs={}),!this.subs[e]){this.subs[e]=!0,await s.default.waitForStartup("configService");const{err:t}=await this.routerClient.query("configService.addListener",e);t&&a.default.system.error("Error adding listener to config service",t),await this.routerClient.subscribe(e,this.handleChanges)}}addListener(e,t,n){var i;let r=null;"function"==typeof e&&(t=e,e={field:null}),({field:r}=e);const o="configService"+(r?`.${r}`:"");this.listeners[o]=[t].concat(null!==(i=this.listeners[o])&&void 0!==i?i:[]),this.changeSub(o),null==n||n()}addListeners(e,t,n){var i;if(!Array.isArray(e))return a.default.deprecated("configClient - addListeners() with an object instead of an array is deprecated. Please use addListener() instead."),this.addListener(e,t,n);const r="function"==typeof t?t:null;for(let t=0;t<e.length;t++){const n=e[t],o="string"==typeof n?n:n.field,s="string"!=typeof n?n.listener:r;if(s){const e="configService"+(o?`.${o}`:"");this.listeners[e]=[s].concat(null!==(i=this.listeners[e])&&void 0!==i?i:[]),this.changeSub(e)}}null==n||n()}removeListener(e,t,n){let i=null;"function"==typeof e&&(n=t,t=e,e={field:i}),({field:i}=e);const r="configService"+(i?`.${i}`:"");if(this.listeners[r])for(let e=0;e<this.listeners[r].length;e++)if(this.listeners[r][e]===t)return this.listeners[r].splice(e,1),void(null==n||n(null,!0));null==n||n(null,!1)}removeListeners(e,t,n){if(!Array.isArray(e))return"function"==typeof e?this.removeListener({},e,n):e.field&&t&&this.removeListener(e,t,n),null==n?void 0:n(null,!0);const i="function"==typeof t?t:null;e.forEach((e=>{const t="string"==typeof e?e:e.field,n="string"!=typeof e?e.listener:i,r="configService"+(t?`.${t}`:"");this.listeners[r]=this.listeners[r].filter((e=>e!==n))})),null==n||n(null,!0)}async processAndSet(e,t){if(a.default.system.debug("ConfigClient.processAndSet",e),r.default.args(e,"object",t,"function=")&&r.default.args2("params.newConfig",e.newConfig,"object","params.overwrite",e.overwrite,"boolean=","params.replace",e.replace,"boolean="),!e.overwrite&&e.replace){const e="cannot use replace option unless overwrite is also true";return a.default.system.warn("ConfigClient.processAndSet:",e),null==t||t(e),{err:e}}{await s.default.waitForStartup("configService");const{err:n,response:i}=await this.routerClient.query("configService.processAndSet",e);return null==t||t(n,i),{err:n,data:i.data}}}async setPreference(e,t){const{err:n,response:i}=await this.routerClient.query("PreferencesService.setPreference",e);return null==t||t(n,i.data),{err:n,data:i.data}}async getPreferences(e){await s.default.waitForStartup("preferencesService");const{err:t,response:n}=await this.routerClient.query("PreferencesService.getPreferences",{});return a.default.system.debug("PreferencesService.getPreferences response",n),null==e||e(t,n.data),{err:t,data:n.data}}async unsetPreference(e,t){a.default.system.debug("ConfigClient.unsetPreference",e);const{err:n,response:i}=await this.routerClient.query("PreferencesService.unsetPreference",e);return null==t||t(n,i.data),{err:n,data:i.data}}}t.ConfigClient=l;const u=new l;t.default=u},47913:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.DistributedStoreClient=void 0;const r=n(25232),o=i(n(2518)),s=i(n(27917)),a=i(n(84795)),l=n(11314),u=()=>new Promise((e=>{l.RouterClient.subscribe("distributedStoresLoading",((t,n)=>{if(t||!n.data){const n=`Error waiting for persistent stores ${t}`;o.default.system.error(n),e(n)}"done"===n.data.State&&e(null)}))}));class d extends r._BaseClient{constructor(){super({startupDependencies:{},onReady:e=>{e&&e()},name:"distributedStoreClient"}),this.localStore={}}async getGlobalStore(e,t){if(o.default.system.info("DistributedStoreClient:getGlobalStore()",e),e.waitForPersistentStoreToLoad){const e=await u();if(e)return null==t||t(e),{err:e}}else await a.default.waitForStartup("dataStoreService");const{err:n,response:i}=await this.routerClient.query("storeService.getStore",e);if(i.data){const e=new s.default(i.data,this.routerClient,this.removeStore.bind(this));return t&&t(n,e),{err:n,data:e}}return o.default.system.error("DistributedStoreClient:getGlobalStore() Failed to get a global store",e.store,n),t&&t(n),{err:n}}async removeGlobalStore(e,t){const{err:n}=await this.routerClient.query("storeService.removeStore",e);return t&&t(n,!!n),{err:n,data:!!n}}async getStore(e,t){if(e.global)return this.getGlobalStore(e,t);{const n=e.store?this.localStore[e.store]:null;return n?(t&&t(null,n),{data:n}):this.getGlobalStore(e,t)}}async createGlobalStore(e,t){if(e.persist){const e=await u();if(e)return null==t||t(e),{err:e}}else await a.default.waitForStartup("dataStoreService");const{err:n,response:i}=await this.routerClient.query("storeService.createStore",e);if(n)return o.default.system.error("DistributedStoreClient:createStore() Failed to create a global store",e.store,n),null==t||t(n),{err:n};const r=new s.default(i.data,this.routerClient,this.removeStore.bind(this));return null==t||t(n,r),{err:n,data:r}}async createLocalStore(e,t){const n=this.localStore[e.store];if(n)return t&&t(null,n),{data:n};const i=new s.default(Object.assign(Object.assign({},e),{name:e.store}),this.routerClient,this.removeStore.bind(this));return this.localStore[i.name]=i,t&&t(null,i),{data:i}}async createStore(e,t){return o.default.system.info("DistributedStoreClient:createStore()",e),e.global?this.createGlobalStore(e,t):this.createLocalStore(e,t)}async removeStore(e,t){return e.global?this.removeGlobalStore(e,t):this.localStore[e.store]?(delete this.localStore[e.store],t&&t(null,!0),{data:!0}):{err:`Local store named ${e.store} not found`}}}t.DistributedStoreClient=d;const c=new d;t.default=c},90693:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.HotkeyClient=void 0;const r=n(17187),o=n(25232),s=i(n(2518)),a=n(62711).F,l=new r.EventEmitter,u=e=>{const t=[];return e.keys.forEach((e=>{if("string"!=typeof e)return s.default.system.error("FSBL.Clients.HotkeyClient - one of the keys passed into a function was not a string: ",e);e=e.toLowerCase();const n=a[e];if(!n)return s.default.system.error(`FSBL.Clients.HotkeyClient - At least one of the key codes does not map to a supported key - registering hotkey unsuccessful. Unsupported keys: ${e}`);t.push(n)})),t};class d{constructor(){this.keyStrokeHandlers=[],this.key=null,this.shift=!1,this.ctrl=!1,this.alt=!1,this.cmd=!1,this.capsLock=!1,this.noKeyCapture=!1,this.downValue=null}registerKeyHandler(e){this.keyStrokeHandlers.push(e)}unregisterKeyHandler(e){this.keyStrokeHandlers=this.keyStrokeHandlers.filter((t=>t.keyString!==e.keyString||t.handler!==e.handler))}unregisterAllUsersKeyHandlers(){this.keyStrokeHandlers=this.keyStrokeHandlers.filter((e=>!0!==e.addedByUser))}keyup(e){switch(e.key){case"Shift":return this.shift=!1,void this.gotKeyStroke(e.key);case"Control":case"Alt":return this.ctrl=!1,void this.gotKeyStroke(e.key);case"Meta":case"Win":return this.cmd=!1,void this.gotKeyStroke(e.key)}this.key&&this.gotKeyStroke(this.key)}keydown(e){if(!this.noKeyCapture)switch(this.key=e.key,e.key){case"Meta":case"Win":this.cmd=!0;break;case"Shift":this.shift=!0;break;case"Control":case"Alt":this.ctrl=!0;break;case"CapsLock":this.capsLock=!this.capsLock;break;case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"Up":case"Down":case"Left":case"Right":this.key=null,this.gotKeyStroke(e.key)}}keypress(e){if(this.noKeyCapture)return;const t=e.which;t<32||t>222||(this.key=e.key)}gotKeyStroke(e){const t=[e];this.ctrl&&t.push("control"),this.shift&&t.push("shift"),this.alt&&t.push("alt"),this.cmd&&t.push("command");const n=t.sort().toString();this.keyStrokeHandlers.forEach((e=>{const t=e.keyString.toUpperCase(),i=n.toUpperCase();i!==t&&i.replace(/(CONTROL|COMMAND)/,"COMMANDORCONTROL")!==t||e.handler()}))}initialize(){document.addEventListener("keyup",(e=>{this.keyup(e)})),document.addEventListener("keydown",(e=>{this.downValue=e.key,this.keydown(e)})),document.addEventListener("keypress",(e=>{this.keypress(e)})),window.addEventListener("blur",(()=>{this.ctrl=!1,this.gotKeyStroke("Control")}))}}class c extends o._BaseClient{constructor(){super({onReady:e=>{this.start(),null==e||e()},name:"hotkeyClient"}),this.localListeners={},this.keyStrokes=null}async addLocalHotkey(e,t,n){return s.default.system.info("HotkeyClient.addLocalHotkey"),s.default.system.debug("HotkeyClient.addLocalHotkey, keyArr: ",e),this.addBrowserHotkey(e,t,!0),null==n||n(null),{err:null}}addBrowserHotkey(e,t,n){this.keyStrokes||(this.keyStrokes=new d,this.keyStrokes.initialize());const i=u({keys:e}).sort().toString();this.keyStrokes.registerKeyHandler({keyString:i,handler:t,addedByUser:n})}removeBrowserHotkey(e,t){var n;s.default.system.info("HotkeyClient.removeBrowserHotkey"),s.default.system.debug("HotkeyClient.removeBrowserHotkey, keyArr: ",e);const i=u({keys:e}).sort().toString();null===(n=this.keyStrokes)||void 0===n||n.unregisterKeyHandler({keyString:i,handler:t})}async removeLocalHotkey(e,t,n){return s.default.system.info("HotkeyClient.removeLocalHotkey"),s.default.system.debug("HotkeyClient.removeLocalHotkey, keyArr: ",e),this.removeBrowserHotkey(e,t),null==n||n(null),{err:null}}async addGlobalHotkey(e,t,n){s.default.system.info("HotkeyClient.addGlobalHotkey"),s.default.system.debug("HotkeyClient.addGlobalHotkey, keyArr: ",e);const i=u({keys:e}).sort().join("+");l.addListener(i,t);const{err:r}=await this.routerClient.query("hotkeysService.registerGlobalHotkey",{keys:i,windowName:this.windowName});return null==n||n(r),{err:r}}async removeGlobalHotkey(e,t,n){s.default.system.info("HotkeyClient.removeGlobalHotkey"),s.default.system.debug("HotkeyClient.removeGlobalHotkey, keyArr: ",e);const i=u({keys:e}).sort().join("+");l.removeListener(i,t);const{err:r}=await this.routerClient.query("hotkeysService.unregisterGlobalHotkey",{keys:i,windowName:this.windowName});return null==n||n(r),{err:r}}async removeAllHotkeys(e){var t;l.removeAllListeners();const{err:n}=await this.routerClient.query("hotkeysService.removeAllHotkeysForWindow",{windowName:this.windowName});return null===(t=this.keyStrokes)||void 0===t||t.unregisterAllUsersKeyHandlers(),null==e||e(n),{err:n}}start(){this.routerClient.addListener("HotkeyTriggered",((e,t)=>{e?console.error(`Hotkey Channel Error: ${JSON.stringify(e)}`):(null==t?void 0:t.data.windows.includes(this.windowName))&&l.emit(t.data.keys)}))}onClose(e){this.removeAllHotkeys(e)}}t.HotkeyClient=c;const f=new c;t.default=f},49136:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.LauncherClient=t.isMouseOverDOMElement=t.isPointInBox=t.getDesktopBoundingBox=void 0;const r=n(25232),o=n(23099),s=i(n(20670)),a=n(91374),l=i(n(2518)),u=n(24074),d=n(44137),c=i(n(84795)),f=n(24137),h=n(94017),p={},{finsembleWindow:g}=d.FEAGlobals;t.getDesktopBoundingBox=async e=>{var t,n;const i="string"==typeof e?document.querySelector(e):e;i||l.default.system.error("getDesktopBoundingBox can't find element",e);const r=i?i.getBoundingClientRect():{top:0,left:0,width:0,height:0},o=await g.getBounds(),s=o.data;o.err&&l.default.system.error("getDesktopBoundingBox: finsembleWindow.getBounds() error",o.err);const a=null!==(t=null==s?void 0:s.top)&&void 0!==t?t:0,u=null!==(n=null==s?void 0:s.left)&&void 0!==n?n:0,d={top:a+r.top,left:u+r.left,width:r.width,height:r.height,right:0,bottom:0};return d.right=d.left+d.width,d.bottom=d.top+d.height,d},t.isPointInBox=(e,t)=>(t.bottom||(t.bottom=t.top+t.height),t.right||(t.right=t.left+t.width),e.x>t.left&&e.x<t.right&&e.y<t.bottom&&e.y>t.top),t.isMouseOverDOMElement=async(e,n=Function.prototype)=>{const i=await(0,t.getDesktopBoundingBox)(e),r=await a.System.getMousePosition(),o=(0,t.isPointInBox)(r,i);return n(o),o};class m extends r._BaseClient{constructor(){super({onReady:e=>{l.default.system.debug("launcherClient ready",window.name),this.start(e)},name:"launcherClient"})}async getComponentList(e){s.default.args(e,"function="),await c.default.waitForStartup("windowService");const{err:t,response:n}=await this.routerClient.query("Launcher.componentList",{});return null==e||e(t,n.data),{err:t,data:n.data}}async getComponentDefaultConfig(e,t){s.default.args(t,"function=");const{err:n,data:i}=await this.getComponentList(),r=null==i?void 0:i[e];return null==t||t(n,r),{err:n,data:r}}async getMonitorInfoAll(e){return l.default.system.debug("LauncherClient.getMonitorInfoAll()"),(0,h.getAllMonitorsClientSide)(this.routerClient,e)}async getMonitorInfo(e={},t){return l.default.system.debug("LauncherClient.getMonitorInfo()"),"all"===e.monitor?(l.default.deprecated('Use of type "all" in LauncherClient.getMonitorInfo() is deprecated. Pleae use LauncherClient.getMonitorInfoAll()'),this.getMonitorInfoAll(t)):(0,h.getWhichMonitorClientSide)(this.routerClient,e,t)}async registerComponent(e,t){await c.default.waitForStartup("windowService");const{err:n,response:i}=await this.routerClient.query("LauncherService.registerComponent",e);return null==t||t(n,i.data),{err:n,data:i.data}}async unRegisterComponent(e,t){if(!e.componentType){const e="No componentType provided";return null==t||t(e),{err:e}}await c.default.waitForStartup("windowService");const{err:n,response:i}=await this.routerClient.query("LauncherService.unRegisterComponent",e);return null==t||t(n,i.data),{err:n,data:i.data}}locatorToIdentifier(e){let t={};return t.windowName="windowName"in e?e.windowName:"","componentType"in e&&(t.componentType=e.componentType),"uuid"in e&&(t.uuid=e.uuid),t}toggleWindowOnClick(e,n,i){var r,o;const s=this.locatorToIdentifier(n),a=null!==(o=null!==(r=s.windowName)&&void 0!==r?r:s.componentType)&&void 0!==o?o:"";!1!==p[a]?(i.position||(i.position="absolute"),this.showWindow(n,i,((n,i)=>{if(!i)return;const{finWindow:r}=i,o=()=>{p[a]=!0,(0,t.isMouseOverDOMElement)(e,(e=>{p[a]=!e})),r.removeEventListener("blurred",o)};r.addEventListener("blurred",o)}))):p[a]=!0}async showWindow(e,t,n){s.default.args(e,"object",t,"object=",n,"function="),t||(t={}),(t=(0,o.clone)(t)).staggerPixels||0===t.staggerPixels||(t.staggerPixels=100),t.windowIdentifier=this.locatorToIdentifier(e);const i=await(0,o.getMyWindowIdentifier)();t.relativeWindow||(t.relativeWindow=i),await c.default.waitForStartup("windowService");const{err:r,response:a}=await this.routerClient.query("Launcher.showWindow",t);if(r)return null==n||n(r),{err:r};{const e=a.data.windowIdentifier.windowName,{wrap:t}=await u.FinsembleWindow.getInstance({name:e}),i=Object.assign(Object.assign({},a.data),{windowIdentifier:Object.assign(Object.assign({},a.data.windowIdentifier),{name:e}),finWindow:t});return null==n||n(r,i),{err:r,data:i}}}async callSpawn(e){const t=e=>new Promise((t=>{const n=this.routerClient.subscribe(`Finsemble.${e}.componentReady`,((e,i)=>{e||!i.data?(l.default.system.error(`RouterClient.callSpawn() Error subscribing for component ready state ${e}`),t(e)):Object.keys(i.data).length&&(this.routerClient.unsubscribe(n),t(null))}))}));await c.default.waitForStartup("windowService");const{err:n,response:i}=await this.routerClient.query("Launcher.spawn",e);if(l.default.system.debug("CallSpawn","Initial launcher callback params",n,i),n||!i)return{err:null!=n?n:'Internal error: callSpawn(): No data returned from service for "Launcher.spawn"'};{const{data:e}=i;let r,o=[];Array.isArray(e)?(o=e.reduce(((e,t)=>(e.push(t.windowIdentifier.windowName),e)),[]),r=e[0]):r=e;const s=r.windowIdentifier.windowName,{wrap:a}=await u.FinsembleWindow.getInstance({name:s}),d=Object.assign(Object.assign({},r),{windowIdentifier:Object.assign(Object.assign({},r.windowIdentifier),{name:s}),finWindow:a});if(o.length>0&&(d.launchGroupWindows=o),d.windowDescriptor.native)return{err:n,result:d};{l.default.system.debug("CallSpawn","Waiting for ready signal",s);const e=await t(s);return l.default.system.debug("CallSpawn","Got ready signal",s),{err:e,result:d}}}}async spawn(e,t,n){s.default.args(e,"string",t,"object=",n,"function="),t||(t={}),(t=(0,o.clone)(t)).component=e,t.options||(t.options={}),t.options.customData||(t.options.customData={}),t.staggerPixels||0===t.staggerPixels||(t.staggerPixels=50),l.default.system.debug(`LauncherClient.spawn starting for componentType:${e}`);const i=await(0,o.getMyWindowIdentifier)();t.launchingWindow=i;const{err:r,result:a}=await this.callSpawn(t);return l.default.system.debug(`LauncherClient.spawn completing for componentType:${e}`,r),null==n||n(r,a),{error:r,response:a}}async getMonitor(e,t){return l.default.system.deprecated("This method is deprecated and will be removed in a future release. Use the method getMonitorInfo instead."),s.default.args(t,"function="),this.getMonitorInfo({windowIdentifier:e},t)}async getMyWindowIdentifier(e){s.default.args(e,"function=");const t=await(0,o.getMyWindowIdentifier)();return null==e||e(t),t}async getActiveDescriptors(e){s.default.args(e,"function="),await c.default.waitForStartup("windowService");const{err:t,response:n}=await this.routerClient.query("Launcher.getActiveDescriptors",{});return t&&l.default.system.error(t),null==e||e(t,n.data),{err:t,data:n.data}}getActiveAndPendingWindowNames(e=Function.prototype){return l.default.deprecated("LauncherClient.getActiveAndPendingWindowNames is deprecated and will be removed"),(0,f.deprecatedGetActiveAndPendingWindowNames)(this.routerClient,e)}async getPendingWindows(){l.default.deprecated("LauncherClient.getPendingWindows is deprecated and will be removed"),await c.default.waitForStartup("windowService");const{err:e,response:t}=await this.routerClient.query("Launcher.getPendingWindows",{});return{err:e,data:t.data}}async addUserDefinedComponent(e,t){s.default.args(t,"function="),await c.default.waitForStartup("windowService");const{err:n}=await this.routerClient.query("Launcher.userDefinedComponentUpdate",{type:"add",name:e.name,url:e.url});return n&&l.default.system.error(n),null==t||t(n),{err:n}}async removeUserDefinedComponent(e,t){s.default.args(t,"function="),await c.default.waitForStartup("windowService");const{err:n}=await this.routerClient.query("Launcher.userDefinedComponentUpdate",{type:"remove",name:e.name,url:e.url});return n&&l.default.system.error(n),null==t||t(n),{err:n}}getComponentsThatCanReceiveDataTypes(e,t=Function.prototype){return s.default.args(t,"function="),l.default.deprecated("LauncherClient.getComponentsThatCanReceiveDataTypes is deprecated and will be removed"),new Promise((n=>{if(!e||!e.dataTypes){const e="Invalid params. Expected: {dataTypes: string[]}";return t(e),n({err:e})}Array.isArray(e.dataTypes)||(e.dataTypes=[e.dataTypes]),this.routerClient.query("LauncherService.getComponentsThatCanReceiveDataTypes",e,((e,i)=>{t(e,i.data),n({err:e,data:i.data})}))}))}async bringWindowsToFront(e={},t=Function.prototype){return s.default.args(t,"function="),e.windowList&&!Array.isArray(e.windowList)&&(e.windowList=[e.windowList]),e.groupName&&s.default.args(e.groupName,"string"),e.componentType&&s.default.args(e.componentType,"string"),await c.default.waitForStartup("windowService"),this.routerClient.query("LauncherService.bringWindowsToFront",e,((e,n)=>{t(e,n)})),Promise.resolve()}async hyperFocus(e,t){l.default.system.deprecated("hyperFocus is deprecated as of version 4.0.0. This functionality may be removed in a future release"),s.default.args(t,"function="),e.windowList&&!Array.isArray(e.windowList)&&(e.windowList=[e.windowList]);const n=await(0,o.getMyWindowIdentifier)();e.windowList||e.groupName||e.componentType||(e.windowList=n?[n]:[]),e.groupName&&s.default.args(e.groupName,"string"),e.componentType&&s.default.args(e.componentType,"string"),await c.default.waitForStartup("windowService"),await this.routerClient.transmit("LauncherService.hyperFocus",e),null==t||t()}async minimizeWindows(e,t){s.default.args(t,"function="),e.windowList&&!Array.isArray(e.windowList)&&(e.windowList=[e.windowList]),e.groupName&&s.default.args(e.groupName,"string"),e.componentType&&s.default.args(e.componentType,"string"),await c.default.waitForStartup("windowService"),this.routerClient.transmit("LauncherService.minimizeWindows",e),null==t||t()}createWindowGroup(e,t=Function.prototype){return s.default.args(t,"function="),l.default.deprecated("LauncherClient.createWindowGroup is deprecated and will be removed"),e.windowList&&!Array.isArray(e.windowList)&&(e.windowList=[e.windowList],delete e.groupName),s.default.args(e.groupName,"string"),new Promise((async n=>{if(!e.groupName){const e="Invalid Parameters";return n({err:e}),void t(e)}await c.default.waitForStartup("windowService"),this.routerClient.query("LauncherService.createWindowGroup",e,((e,i)=>{t(e,i),n({err:e,data:i})}))}))}addWindowsToGroup(e,t=Function.prototype){return s.default.args(t,"function="),l.default.deprecated("LauncherClient.addWindowsToGroup is deprecated and will be removed"),new Promise((async n=>{if(!e.groupName||!e.windowList){const e="Invalid Parameters";return n({err:e}),void t(e)}e.windowList&&!Array.isArray(e.windowList)&&(e.windowList=[e.windowList]),s.default.args(e.groupName,"string"),await c.default.waitForStartup("windowService"),this.routerClient.query("LauncherService.addWindowsToGroup",e,((e,i)=>{t(e,i),n({err:e,data:i})}))}))}removeWindowsFromGroup(e,t=Function.prototype){return s.default.args(t,"function="),l.default.deprecated("LauncherClient.removeWindowsFromGroup is deprecated and will be removed"),new Promise((async n=>{if(!e.groupName||!e.windowList){const e="Invalid Parameters";return n({err:e}),void t(e)}e.windowList&&!Array.isArray(e.windowList)&&(e.windowList=[e.windowList]),await c.default.waitForStartup("windowService"),this.routerClient.query("LauncherService.removeWindowsFromGroup",e,((e,i)=>{t(e,i),n({err:e,data:i})}))}))}getGroupsForWindow(e,t=Function.prototype){return s.default.args(t,"function="),l.default.deprecated("LauncherClient.getGroupsForWindow is deprecated and will be removed"),"function"==typeof e&&(t=e,e=null),new Promise((async n=>{e&&e.windowIdentifier?(await c.default.waitForStartup("windowService"),this.routerClient.query("LauncherService.getGroupsForWindow",e,((e,i)=>{n({err:e,data:i.data}),t(e,i.data)}))):g.getComponentState({field:"finsemble:windowGroups"},((e,i)=>{n({err:e,data:i}),t(e,i)}))}))}async addToGroups(e,t){var n;s.default.args(t,"function="),s.default.args(e.groupNames,"array"),l.default.deprecated("LauncherClient.addToGroups is deprecated and will be removed");const i=await(0,o.getMyWindowIdentifier)();e.windowIdentifier=null!==(n=e.windowIdentifier)&&void 0!==n?n:i,await c.default.waitForStartup("windowService");const{err:r}=await this.routerClient.query("LauncherService.addWindowToGroups",e);return null==t||t(r),{err:r}}_createWrap(e,t){this.routerClient.query("LauncherService.createWrap",e,t)}start(e){if(g){const e=async()=>{await c.default.waitForStartup("windowService"),this.routerClient.subscribe(`Finsemble.LauncherService.updateGroups.${this.windowName}`,((e,t)=>{Array.isArray(t.data)&&g.setComponentState({field:"finsemble:windowGroups",value:t.data})}))};g.getComponentState({field:"finsemble:windowGroups"},((t,n)=>{if(!t&&n)return this.addToGroups({groupNames:n},e);e()}))}setInterval((()=>{this.routerClient.transmit("Finsemble.heartbeat",{type:"component",windowName:this.windowName,componentType:"finsemble",isBrowserView:a.System.isBrowserView()})}),1e3),e()}}t.LauncherClient=m;const w=new m;t.default=w},2518:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Logger=t.LoggerClient=t.LocalLogger=t.LoggerConnection=void 0;const r=n(91374),o=n(10166),s=n(31219),a=i(n(11314)),l=n(7860),u=n(23493),d=n(96486),c={Error:!0,Warn:!0,Info:!0,Log:!0,Debug:!0,Verbose:!1,LocalOnly:!1},f=1e4,h={console:{Error:!0,Warn:!0,Info:!0,Log:!0,Debug:!0,Verbose:!0,LocalOnly:!1},dev:c,system:c,perf:c},p=()=>{const{stack:e}=function(){try{throw Error("")}catch(e){return e}}();let t=6;e.includes("console.error")&&t++;const n=("\n",i=t,e.split("\n",i).join("\n").length);var i;return`Log Stack: \n${e.substring(n).substr(1)}`},g=e=>{const t=[],n=[e];let i=0,r=0;for(;n.length&&r<1e3;){r++;const e=n.pop();if("boolean"==typeof e)i+=4;else if("string"==typeof e)i+=2*e.length;else if("number"==typeof e)i+=8;else if("object"==typeof e&&-1===t.indexOf(e)){t.push(e);for(const t in e)n.push(e[t])}}return i},m=(e,t,n=0,i=1)=>{const r=t/2,o=r/2,s="*STRIPPED*",a=e=>{let t=g(e);e.length>0&&t>o&&(e[0]=m(e[0],r,n,i+1),e[1]=`*STRIPPED* from size ${e.length}`,e.length=2)};let l=(0,d.cloneDeep)(e);if("object"!=typeof l)l=s,n+=g(l);else if(Array.isArray(l))a(l),n+=g(l);else{let e=Object.getOwnPropertyNames(l);for(let u=0;u<e.length;u++){let d=g(l[e[u]]);n>r&&d>100&&i>=3&&u>=1||n>f&&d>=10?l[e[u]]=s:d>o&&(Array.isArray(l[e[u]])?a(l[e[u]]):l[e[u]]=m(l[e[u]],t/1.2,n,i+1)),n+=g(l[e[u]])}}return l},w=e=>"logger.service.logMessages"===e||"Finsemble.heartbeat"===e,y=console.error.bind(window.console);console.standardError=console.error;class v{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=r.System.Window.getCurrent().name,this.onLogStateChangeCallback=[],this.currentLogState=h,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:250;this.transmitAndClearQueue=u((()=>{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:i}=this;this.system.debug("Logger updateQueueBasedOnState",e,i,"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+i),[t];console.log(t.category,t.logType,t.logTimestamp-s.Performance.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{console.error("Logging Queue Overflowed! Dumping queue here then continuing",t.length);let e,n=0;for(;e=t.shift();)console.log("Message "+n++,e);this.system.error("Logging Queue Overflowed! Dumping queue in client then continuing.")}}callStack(){return p()}setting(){return this.currentLogState}outputToConsole(e,t){const n={Debug:console.debug,Info:console.info,Warn:console.warn,Error:y,Log:console.log,Verbose:console.log};try{n[e](...t)}catch(e){y("Error outputting log to console",e,p())}}formatAndQueueMessage(e,t,n){var i;const o="forceObjectsToLogger"===n[0],a=n.flatMap((e=>{if(!o&&g(e)>f){this.outputToConsole("Warn",["Message too large to send to the logger.",...n]);let t=m(e,f);return["NOTE: LOG ARG STRIPPED since greater than 10KB. Check origin's local Console to see output of the complete object.",`OldSize=${g(e)} NewSize=${g(t)}`,t]}return e instanceof Error?[e.toString()]:"forceObjectsToLogger"===e?[]:[e]}));let l=null;try{l=JSON.stringify(a)}catch(e){l=`*** Logger error can't JSON.stringify: ${p()}`}"Error"!==t&&"Warn"!==t&&"console"!==e||this.outputToConsole(t,n);const u=null!==(i=this.viewId)&&void 0!==i?i:r.System.isBrowserView()&&r.System.getWebContentsId(),d={category:"console"===e?"system":e,logType:t,logClientName:u?`${this.loggerClientName}: view-${u}`:this.loggerClientName,logData:l,logTimestamp:s.Performance.timing.navigationStart+s.Performance.now()+this.calibratedTimeStampOffset};u&&(d.viewId=u),this.addToQueue(d),this.isRegistered&&this.transmitAndClearQueue()}logIt(e,t,n){if(this.currentLogState[e][t])if("Warn"!==t&&"Error"!==t||n.push(p()),this.currentLogState[e].LocalOnly){const i=t.toLowerCase();n.unshift(`${e} ${i} (${s.Performance.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){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):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}=o.Startup.getInstance().getStartupData();this.loggerClientName=window&&window.top!==window?`${t}.Frame`:t;const i=`finsemble.logger.client.${this.loggerClientName}`;!this.viewId&&r.System.isBrowserView()&&(this.viewId=r.System.getWebContentsId()),this.system.debug("logger.service.registering",this.loggerClientName),r.System.Window.getCurrent().getOptions((async e=>{var r,o;const s=null===(o=null===(r=null==e?void 0:e.customData)||void 0===r?void 0:r.component)||void 0===o?void 0:o.centralLoggerNamePrefix;if(!this.routerClient)return;const{err:a,response:l}=await this.routerClient.query("logger.service.register",{clientName:this.loggerClientName,clientChannel:i,displayName:null!=n?n:t,windowName:t,viewId:this.viewId,centralLoggerNamePrefix:s});a?(console.warn("Logger service not available. Trying to connect again in 750ms.",a),setTimeout((()=>{this.registerWithLoggerService()}),750)):this.completeRegistration(l.data)})),null===(e=this.routerClient)||void 0===e||e.addListener(i,((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 i=e||{clientName:this.loggerClientName,viewId:this.viewId};null===(n=this.routerClient)||void 0===n||n.query("logger.service.unregister",i,t)}waitForServiceAndCalibrate(){var e;const t=null===(e=this.routerClient)||void 0===e?void 0:e.subscribe("Finsemble.Service.State.loggerService",((e,n)=>{var i,r;"ready"===n.data.state&&(this.system.debug("Logger onReady",this.loggerClientName),null===(i=this.routerClient)||void 0===i||i.calibrateTimeWithRouterService((e=>{this.newCalibratedTimeStampOffset=e,this.isRegistering||(this.isRegistering=!0,this.startupTime=performance.now()-this.startupTime,this.registerWithLoggerService())})),t&&(null===(r=this.routerClient)||void 0===r||r.unsubscribe(t)))}))}async start(e){if(this.routerClient=null!=e?e:a.default,this.startupTime=performance.now(),"routerService"===window.name){const{err:e}=await this.routerClient.query("logger.service.register",{});e?setTimeout((()=>{this.waitForServiceAndCalibrate()}),750):this.waitForServiceAndCalibrate()}else this.waitForServiceAndCalibrate();r.System.isBrowserView()&&window.addEventListener("beforeunload",(()=>{this.unregisterClient()}))}}t.LoggerConnection=v;const b={start:e=>{(0,l.singleton)("LoggerClient",v).start(e)},channelFilter:e=>w(e),setting:()=>(0,l.singleton)("LoggerClient",v).setting(),callStack:()=>(0,l.singleton)("LoggerClient",v).callStack(),unregisterClient:(e,t)=>{(0,l.singleton)("LoggerClient",v).unregisterClient(e,t)},setRouterClient:e=>{(0,l.singleton)("LoggerClient",v).setRouterClient(e)},onStateChanged(e){(0,l.singleton)("LoggerClient",v).onStateChanged(e)},error:(...e)=>(0,l.singleton)("LoggerClient",v).error(...e),warn:(...e)=>(0,l.singleton)("LoggerClient",v).warn(...e),info:(...e)=>(0,l.singleton)("LoggerClient",v).info(...e),log:(...e)=>(0,l.singleton)("LoggerClient",v).log(...e),debug:(...e)=>(0,l.singleton)("LoggerClient",v).debug(...e),verbose:(...e)=>(0,l.singleton)("LoggerClient",v).verbose(...e),deprecated:(...e)=>(0,l.singleton)("LoggerClient",v).deprecated(...e),system:{error:(...e)=>(0,l.singleton)("LoggerClient",v).system.error(...e),warn:(...e)=>(0,l.singleton)("LoggerClient",v).system.warn(...e),info:(...e)=>(0,l.singleton)("LoggerClient",v).system.info(...e),log:(...e)=>(0,l.singleton)("LoggerClient",v).system.log(...e),debug:(...e)=>(0,l.singleton)("LoggerClient",v).system.debug(...e),verbose:(...e)=>(0,l.singleton)("LoggerClient",v).system.verbose(...e),deprecated:(...e)=>(0,l.singleton)("LoggerClient",v).system.deprecated(...e)},perf:{error:(...e)=>(0,l.singleton)("LoggerClient",v).perf.error(...e),warn:(...e)=>(0,l.singleton)("LoggerClient",v).perf.warn(...e),info:(...e)=>(0,l.singleton)("LoggerClient",v).perf.info(...e),log:(...e)=>(0,l.singleton)("LoggerClient",v).perf.log(...e),debug:(...e)=>(0,l.singleton)("LoggerClient",v).perf.debug(...e),verbose:(...e)=>(0,l.singleton)("LoggerClient",v).perf.verbose(...e),deprecated:(...e)=>(0,l.singleton)("LoggerClient",v).perf.deprecated(...e)},console:{error:(...e)=>(0,l.singleton)("LoggerClient",v).console.error(...e),warn:(...e)=>(0,l.singleton)("LoggerClient",v).console.warn(...e),info:(...e)=>(0,l.singleton)("LoggerClient",v).console.info(...e),log:(...e)=>(0,l.singleton)("LoggerClient",v).console.log(...e),debug:(...e)=>(0,l.singleton)("LoggerClient",v).console.debug(...e),verbose:(...e)=>(0,l.singleton)("LoggerClient",v).console.verbose(...e),deprecated:(...e)=>(0,l.singleton)("LoggerClient",v).console.deprecated(...e)}};r.System.isBrowserView()?b.console.log("Logger client console.error is not wrapped to capture logs."):(b.console.log("Logger client console.error is wrapped to capture logs."),console.error=function(...e){let t;e.push("(console error)");try{t=JSON.parse(JSON.stringify(e))}catch(n){t="console.error: arguments could not be serialized for logging",e.push("arguments could not be serialized to send to Central Logger"),y(...e)}b.console.error(...t)}),window.addEventListener("error",(e=>{(null==e?void 0:e.message)&&(null==e?void 0:e.filename)?b.console.error(`Logger client caught ErrorEvent. Error: ${e.message}`,`File: ${e.filename}`,`Line number: ${e.lineno}`):(b.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.`),console.warn("Event Details (for above message)",e))}),!0),window.addEventListener("unhandledrejection",(e=>{b.console.error("Logger client caught Unhandled rejection","reason",e.reason,JSON.stringify(e))}),!0),t.LocalLogger={start:()=>{},channelFilter:w,setting:()=>h,callStack:()=>p(),unregisterClient:()=>{},setRouterClient:()=>{},onStateChanged:()=>{},warn:console.warn,info:console.info,log:console.log,debug:console.debug,error:console.error,verbose:console.debug,deprecated:console.error,system:{warn:console.warn,info:console.info,log:console.log,debug:console.debug,error:console.error,verbose:console.debug,deprecated:console.error},perf:{warn:console.warn,info:console.info,log:console.log,debug:console.debug,error:console.error,verbose:console.debug,deprecated:console.error},console:{warn:console.warn,info:console.info,log:console.log,debug:console.debug,error:console.error,verbose:console.debug,deprecated:console.error}};const S="undefined"==typeof window;t.LoggerClient=S?t.LocalLogger:b,t.Logger=t.LoggerClient,t.default=t.LoggerClient},5395:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.NotificationClient=t.ActionTypes=t.ROUTER_NAMESPACE=void 0;const r=n(46215);Object.defineProperty(t,"ActionTypes",{enumerable:!0,get:function(){return r.ActionTypes}});const o=n(252),s=n(25232),a=i(n(9381)),l=i(n(97525)),u=i(n(49136)),d=i(n(9060)),c="notification.",f="unsubscribe";t.ROUTER_NAMESPACE={ACTION_PREFIX:"notification.action."};class h extends s._BaseClient{constructor(e){super(e),this.subscriptions=[],this.Notification=r.Notification,this.ActionTypes=r.ActionTypes,this.Subscription=r.Subscription,this.Action=r.Action,this.Filter=r.Filter,this.actionTypes=r.ActionTypes,this.onClose=e=>{this.unsubscribeAll(),e&&e()},this.publicEventManager=new d.default({name:"notificationClient",sourceType:"notification"})}async applyOverrides(){var e,t;const{data:n}=await a.default.getValue("finsemble.servicesConfig.notifications.applyNotificationOverrides");if(!n)return;const i=l.default.getWindowIdentifier().windowName,{data:r}=await u.default.getActiveDescriptors(),o=Object.keys(r).filter((e=>e===i)).map((e=>r[e]));let s,d="Unknown Source";1!==o.length?this.logger.system.warn("Unable to fetch component to extract type or display name"):(s=o[0],d=(null===(t=null===(e=s.customData)||void 0===e?void 0:e.component)||void 0===t?void 0:t.displayName)||s.componentType);const c=(e,t)=>{t.finsembleSource=d,this.notify(JSON.parse(JSON.stringify({title:e,options:t})))},f=window.Notification;c.requestPermission=f.requestPermission.bind(f),Object.defineProperty(c,"permission",{get:function(){return f.permission}}),window.Notification=c}addEventListener(e,t){this.publicEventManager.addEventListener(e,t)}removeEventListener(e,t){this.publicEventManager.removeEventListener(e,t)}query(e,t,n,i){return new Promise((async(r,o)=>{try{null==n&&(n=c),this.logger.system.info(`sending message on ${n+e} channel`,t);const s=await this.routerClient.query(n+e,t);s.err?(this.logger.system.error("Error: ",s.err),o(s.err)):(this.logger.system.log(`${e} raw response: `,s),i&&i(null,s.response.data.data),r(s.response.data.data))}catch(e){this.logger.system.error("Error: ",e),i&&i(e),o(e)}}))}async fetchHistory(e,t){return this.logger.system.info("FetchHistory() called with params: ",e,t),await this.query("fetch_history",{options:e,filter:t})}async getLastIssuedAt(e){return this.logger.system.info("getLastIssued called with params: ",e),await this.query("last_issued",e)}async performAction(e,t){return this.logger.system.info("performAction() called with params: ",e,t),Array.isArray(e)||(e=[e]),await this.query("perform_action",{notifications:e,action:t})}async markRead(e){this.logger.system.info("markRead() called with params: ",e),Array.isArray(e)||(e=[e]),await this.query("mark_read",{notifications:e,isRead:!0})}async markUnread(e){this.logger.system.info("markUnread() called with params: ",e),Array.isArray(e)||(e=[e]),await this.query("mark_unread",{notifications:e,isRead:!1})}deleteNotifications(e){return this.logger.system.info("deleteNotifications() called with params: ",e),new Promise((async(t,n)=>{try{t(this.query("delete",e))}catch(e){n(e)}}))}async notify(e){this.logger.system.info("notify() called with params: ",e);try{await this.query("notify",Array.isArray(e)?e:[e])}catch(t){if(!t.includes("No responder"))throw t;await(0,o.sleep)(500),await this.notify(e)}}async subscribe(e,t){this.logger.system.info("subscribe() called with params: ",e,t);const n=await this.query("subscribe",JSON.parse(JSON.stringify(e)));return this.logger.system.info("Got a return value containing a channel",n),await this.monitorChannel(n.channel,t),this.subscriptions.push(n),n}async unsubscribe(e){this.logger.system.info("unsubscribe() called with params: ",e),await this.query(f,e),this.cleanupSubscription(e)}removeResponder(e,t){null==t&&(t=c),this.routerClient.removeResponder(t+e)}unsubscribeAll(){this.logger.system.info("unsubscribeAll() called"),this.subscriptions.forEach((e=>{this.query(f,e.id).then(),this.removeResponder(e.id)})),this.subscriptions=[]}async mute(e){return this.logger.system.info("mute() called with params: ",e),await this.query("mute",{filter:e})}async unmute(e){return this.logger.system.info("unmute() called with params: ",e),await this.query("unmute",{filter:e})}async getSources(){return this.logger.system.info("getSources() called"),await this.query("sources",{})}async getMuteFilters(){return this.logger.system.info("getSources() called"),await this.query("mute_filters",{})}async getPreferences(){return this.logger.system.info("getPreferences() called"),await this.query("preferences",{})}cleanupSubscription(e){const t=this.subscriptions.findIndex((t=>t.id===e));t>-1&&(this.removeResponder(this.subscriptions[t].channel),this.subscriptions.splice(t,1))}addResponder(e,t,n){null==n&&(n=c),this.logger.system.info(`Adding responder for endpoint: ${n+e}`),this.routerClient.addResponder(n+e,((n,i)=>{if(this.logger.system.info(`Message received on ${e}: `,i),!n&&i)try{this.logger.system.info(`Processing message on channel ${e}: `,i);const n=t(i.data);this.logger.system.info(`Message response on ${e}: `,n),i.sendQueryResponse(null,{status:"success",data:n})}catch(e){this.logger.system.error("Failed to process query",e),i.sendQueryResponse(e)}else this.logger.system.error(`Failed to setup ${e} responder`,n)}))}monitorChannel(e,t){return new Promise((n=>{this.logger.system.info("Listening for messages on channel",e),this.addResponder(e,(e=>{this.logger.system.info("Notification received: ",e.id);try{t(e)}catch(e){this.logger.system.error("Error thrown in the subscription.onNotification()",e)}return{message:"success"}})),n()}))}}t.NotificationClient=h;const p=new h({onReady:function(e){p.applyOverrides(),this.logger.system.log("notificationClient Online"),e()},name:"notificationClient"});t.default=p},11314:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RouterClient=t.RouterController=t.RouterConnection=void 0;const r=i(n(78268)),o=i(n(20670)),s=i(n(16994)),a=n(2518),l=n(44137),u=n(31219),d=n(21614),c=n(7860);function f(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]?f(e[n],null):t[n];return t}class h{constructor(){this.queue=[],this.started=!1,this.clientName="RouterClient.clientName not yet set",this.transport=null,this.isRouterReady=!1,this.parentReadyCallbackQueue=[],this.notificationURL="",this.mapListeners={},this.mapQueryResponders={},this.mapPubSubResponders={},this.mapPubSubResponderState={},this.mapPubSubResponderRegEx={},this.pubsubListOfSubscribers={},this.mapSubscribersID={},this.mapSubscribersTopic={},this.mapQueryResponses={},this.mapQueryResponseTimeOut={}}onReadyCallBack(){for(a.LoggerClient.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient Ready"),this.isRouterReady=!0;this.parentReadyCallbackQueue.length>0;){a.LoggerClient.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient parentReady invoked");const e=this.parentReadyCallbackQueue.shift();null==e||e()}}sendToRouterService(e){this.transport?this.transport.send(e):(a.LoggerClient.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,i=this.mapListeners[t]||[];Array.isArray(i)&&0!==i.length?(e.originatedHere=()=>this.originatedHere(e),i.forEach((i=>{a.LoggerClient.channelFilter(t)||a.LoggerClient.system.info("RouterClient: incoming transmit","CHANNEL",t,"FROM",n,"MESSAGE",e),i(null,e)}))):a.LoggerClient.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:i,error:r}=e.header;a.LoggerClient.system.info("RouterClient: incoming query","CHANNEL",t,"FROM",n,"QUERY MESSAGE",e);const o=(e,n)=>{a.LoggerClient.system.info("RouterClient: outgoing query response","CHANNEL",t,"RESPONSE DATA",n,"QUERY ID",i);let r={header:{origin:this.clientName,queryID:i,type:"queryResponse"},data:n};r.header.error=e?e.toString():null,this.sendToRouterService(r)},s=this.mapQueryResponders[t];void 0===s?e.header.logWhenNoResponder&&a.LoggerClient.system.warn(`RouterClient: No query responder defined on channel ${t} for incoming from ${n}.`,e):r?(a.LoggerClient.system.warn("RouterClient: queryResponder error",e),s(r),delete this.mapQueryResponders[t]):s(null,Object.assign(Object.assign({},e),{originatedHere:()=>this.originatedHere(e),sendQueryResponse:(e,t)=>{o(e,t)}}))}invokeQueryResponse(e){var t;a.LoggerClient.system.info("RouterClient: incoming query response","CHANNEL",e.header.channel,"QUERY ID",e.header.queryID,"message",e);const{queryID:n}=e.header,i=this.mapQueryResponseTimeOut[n];delete this.mapQueryResponseTimeOut[n],i&&clearTimeout(i);const r=this.mapQueryResponses[n];r?(delete this.mapQueryResponses[n],r(null!==(t=e.header.error)&&void 0!==t?t:null,e)):a.LoggerClient.system.warn("Invariant: RouterClient: no handler found for incoming query response.",e)}invokeNotifyCallback(e){const{subscribeID:t,error:n}=e.header,i=this.mapSubscribersID[t];i?n?(a.LoggerClient.system.info("RouterClient: incoming PubSub notify error for subscriberID","SUBSCRIBER ID",t,"NOTIFY MESSAGE",e),i(n,e)):(e.originatedHere=()=>this.originatedHere(e),a.LoggerClient.system.info("RouterClient: incoming PubSub notify","SUBSCRIBER ID",t,"NOTIFY MESSAGE",e),i(null,e)):a.LoggerClient.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 i=(e,n,i)=>{var r;n?a.LoggerClient.system.warn("RouterClient: incoming publish rejected by pubsub responder",n,i):(this.mapPubSubResponderState[t]=i,(null!==(r=this.pubsubListOfSubscribers[t])&&void 0!==r?r:[]).forEach((e=>{a.LoggerClient.system.info("RouterClient: sending pubsub notify","TOPIC",t,"NOTIFY DATA",i);const n={header:{origin:this.clientName,type:"notify",topic:t,subscribeID:e},data:i};this.sendToRouterService(n)})))};if(a.LoggerClient.system.info("RouterClient: incoming PubSub publish "+(n.publishCallback?"(publishCallback hook invoked)":""),"TOPIC",t,"PUBLISH MESSAGE",e),n.publishCallback){const t=Object.assign(Object.assign({},e),{sendNotifyToAllSubscribers:(t,n)=>{i(e,t,n)}});n.publishCallback(null,t)}else i(e,null,e.data)}else a.LoggerClient.system.warn("RouterClient: no pubsub responder defined for incoming publish","TOPIC",t,"PUBLISH MESSAGE",e)}invokeSubscribeEvent(e){var t;const{topic:n,error:i}=e.header;a.LoggerClient.system.info("RouterClient: PubSub subscribe","TOPIC",n);let r=this.mapPubSubResponders[n];if(!r)for(const e in this.mapPubSubResponderRegEx)if(this.mapPubSubResponderRegEx[e].test(n)){r=this.mapPubSubResponders[e],this.mapPubSubResponderState[n]=null!==(t=this.mapPubSubResponderState[n])&&void 0!==t?t:this.mapPubSubResponderState[e];break}if(r)if(i)a.LoggerClient.system.warn(`RouterClient: pubsub error received from router service: ${i}`,e);else if(r.subscribeCallback){const t=Object.assign(Object.assign({},e),{sendNotifyToSubscriber:(t,n)=>{this.sendNotifyToSubscriber(e,t,n)}});e.data=this.mapPubSubResponderState[n],r.subscribeCallback(null,t)}else this.sendNotifyToSubscriber(e,null,this.mapPubSubResponderState[n]);else a.LoggerClient.system.warn("RouterClient: no pubsub responder defined for incoming subscribe event",e)}invokeUnsubscribeEvent(e){const{topic:t,subscribeID:n}=e.header;let i=this.findResponder(t);if(!i)for(const e in this.mapPubSubResponderRegEx)if(this.mapPubSubResponderRegEx[e].test(t)){i=this.mapPubSubResponders[e];break}if(i)if(a.LoggerClient.system.info("RouterClient: incoming unsubscribe "+(i.unsubscribeCallback?"with unsubscribeCallback hook":""),"TOPIC",t,"UNSUBSCRIBE MESSAGE",e),i.unsubscribeCallback){const r=Object.assign(Object.assign({},e),{removeSubscriber:()=>{this.removeSubscribers(t,n)}});i.unsubscribeCallback(null,r)}else this.removeSubscribers(t,n);else a.LoggerClient.system.warn("RouterClient: no pubsub responder defined for incoming unsubscribe event","TOPIC",t,"UNSUBSCRIBE MESSAGE",e)}sendNotifyToSubscriber(e,t,n){const{topic:i,subscribeID:r}=e.header;if(void 0!==n){let e={header:{origin:this.clientName,type:"notify",topic:i,subscribeID:r},data:n};t&&(e.header.error=t),this.sendToRouterService(e)}t?a.LoggerClient.system.warn("RouterClient: incoming subscription rejected by pubsub responder","TOPIC",i,"MESSAGE",this):(i in this.pubsubListOfSubscribers?this.pubsubListOfSubscribers[i].push(r):this.pubsubListOfSubscribers[i]=[r],a.LoggerClient.system.info("RouterClient: incoming subscription added","TOPIC",i,"MESSAGE"))}removeSubscribers(e,t){let n=!1;if(e in this.pubsubListOfSubscribers){const i=this.pubsubListOfSubscribers[e];for(let r=0;r<i.length;r++)if(t===i[r]){i.splice(r,1),0===i.length&&delete this.pubsubListOfSubscribers[e],n=!0,a.LoggerClient.system.info("RouterClient: PubSub removeListener","TOPIC",e,"FROM",t);break}}n||a.LoggerClient.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(a.LoggerClient.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){a.LoggerClient.system.debug(`Name of transport to establish: ${t}`),e.notificationURL&&(this.notificationURL=e.notificationURL);let i=null,o=0,l=!1,u=0,d=null;const c=()=>{if(clearInterval(i),u++,u<=3)a.LoggerClient.console.error("WINDOW LIFECYCLE:STARTUP:RouterClient: failure to connect to router service. Retrying...",u,e),null==d||d();else{const t="A cross domain transport has failed to connect. Cross domain components may not work. Please contact your administrator.";a.LoggerClient.console.error(t,e),s.default.alert("dev","ONCE-SINCE-STARTUP","FSBL-Internal-Transport-Failure",t,{url:this.notificationURL})}},f=()=>{a.LoggerClient.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient: sendHandshake",o);const e={header:{origin:this.clientName,type:"initialHandshake"}};this.sendToRouterService(e),o++>50&&c()},h=()=>{if(!l){a.LoggerClient.system.debug(`WINDOW LIFECYCLE:STARTUP:RouterClient connected: Starting ${this.clientName} with transport ${this.transport.identifier()}`),l=!0,clearInterval(i);for(let e=0;e<this.queue.length;e++){a.LoggerClient.system.debug("RouterClient: releasing queued msg");const t=this.queue[e];this.transport.send(Object.assign(Object.assign({},t),{header:Object.assign(Object.assign({},t.header),{origin:this.clientName})}))}null==n||n()}},p=e=>{o=0,a.LoggerClient.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient:transport ready","TRANSPORT OBJECT",e),this.transport=e,this.handshakeHandler=h,f(),i=setInterval(f,200)};d=()=>{a.LoggerClient.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient:getClientTransport","ROUTER PARAMS:",e),r.default.getTransport(e,t,((e,t)=>{t.header.lastClient=this.clientName,t.header.incomingTransportInfo=e,this.routeIncomingMessage(t)}),this.clientName,"RouterService").then(p).catch((e=>{a.LoggerClient.console.error("RouterClient getTransport error",e)}))},d()}addPubSubResponderCallBack(e,t,n,i){const r=e.toString();return!this.mapPubSubResponders[r]&&(e instanceof RegExp&&(this.mapPubSubResponderRegEx[r]=e,a.LoggerClient.system.info(`RouterClient: PubSub RegEx added for topic ${r}`)),this.mapPubSubResponders[r]={subscribeCallback:t,publishCallback:n,unsubscribeCallback:i},!0)}calibrateTimeWithRouterService(e){let t=0,n=0,i=1/0;const r={header:{origin:this.clientName,type:"timeCalibration"},clientBaseTime:[],serviceBaseTime:[]};this.timeCalibrationHandler=r=>{if(t++,t>5)(t=>{const{clientBaseTime:r,serviceBaseTime:o}=t;let s=0;for(let e=1;e<5;e++){const t=r[e-1],l=r[e]-t,u=o[e-1]-(t+l/2);l<i&&(i=l,n=u),s+=u,a.LoggerClient.system.debug("calibrationCalculation Intermediate Values","lastRRT",l,"lastOffset",u,"fastestOffset",n,"fastestRRT",i)}s/=4,a.LoggerClient.system.debug("RouterClient calibrationCalculation","Average Offset",s,"Chosen FastestOffset",n,t),e(n)})(r);else{r.clientBaseTime.push(u.Performance.timing.navigationStart+u.Performance.now());const e={header:{origin:this.clientName,type:"timeCalibration"},clientBaseTime:r.clientBaseTime,serviceBaseTime:r.serviceBaseTime};this.sendToRouterService(e)}},this.timeCalibrationHandler(r)}start(e){return new Promise((async t=>{if(this.started){const e="RouterClient.start() called twice. Ignoring second call.";return a.LoggerClient.system.warn(e),t(e)}this.started=!0,this.clientName=`RouterClient.${e.windowName}.${(0,d.v4)()}`;const n=`"RouterClient Check: connecting new client for ${this.clientName}`;a.LoggerClient.system.debug(n),console.debug(n),r.default.setTransports(),this.asyncConnectToEventRouter(e,e.transportName,(()=>{this.onReadyCallBack(),t(null)}))}))}stop(){this.disconnectAll(),r.default.close(),this.started=!1}onReady(e){return new Promise((t=>{o.default.args(e,"function");const n=()=>{e&&e(),t()};this.isRouterReady?n():this.parentReadyCallbackQueue.push(n)}))}addListener(e,t){a.LoggerClient.system.info("RouterClient.addListener","CHANNEL",e),o.default.args(e,"string",t,"function");const n=this.mapListeners[e];if(n&&0!==n.length)n.some((e=>t===e))?a.LoggerClient.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){a.LoggerClient.channelFilter(e)||a.LoggerClient.system.info("RouterClient.transmit","TO CHANNEL",e,"DATA",t),o.default.args(e,"string",t,"any");const i={header:{origin:this.clientName,type:"transmit",channel:e},data:t,options:n};this.sendToRouterService(i)}removeListener(e,t){if(a.LoggerClient.system.info("RouterClient.removeListener","CHANNEL",e,"EVENT HANDLER",t),o.default.args(e,"string",t,"function"),!this.mapListeners[e])return a.LoggerClient.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(a.LoggerClient.system.info("RouterClient.addResponder","CHANNEL",e),o.default.args(e,"string",t,"function"),this.mapQueryResponders[e]){const n=`RouterClient.addResponder: Responder already locally defined for channel ${e}`;a.LoggerClient.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,i){var r,s,c,f;const h=`${this.clientName}.${(0,d.v4)()}.${e}`,p=u.Performance.timing.navigationStart+u.Performance.now(),g=u.Performance.timing.navigationStart,m=u.Performance.now();a.LoggerClient.system.info("RouterClient.query","RESPONDER CHANNEL",e,"QUERY EVENT",t,"PARAMS",n,"QUERY ID",h,{timestamp:p,navstart:g,timenow:m});const w=null!=i?i:"function"==typeof n?n:null,y=null!==(s=null===(r=n)||void 0===r?void 0:r.timeout)&&void 0!==s?s:2e4,v=null===(f=null===(c=n)||void 0===c?void 0:c.logWhenNoResponder)||void 0===f||f;return o.default.args(e,"string",t,"any=",n,"object=",w,"function"),new Promise((n=>{this.mapQueryResponses[h]=(e,t)=>{null==w||w(e,t),n({err:e,response:t})},!l.Globals.runningInFSBLUnitTest&&y>0&&(this.mapQueryResponseTimeOut[h]=setTimeout((()=>{a.LoggerClient.system.warn(`RouterClient: timeout after ${y} ms waiting on query response on channel ${e} for queryID ${h}`),delete this.mapQueryResponseTimeOut[h]}),y));const i={header:{origin:this.clientName,type:"query",queryID:h,channel:e,logWhenNoResponder:v},data:t};this.sendToRouterService(i)}))}removeResponder(e){if(a.LoggerClient.system.info("RouterClient.removeResponder","RESPONDER CHANNEL",e),o.default.args(e,"string"),this.mapQueryResponders[e]){delete this.mapQueryResponders[e];const t={header:{origin:this.clientName,type:"removeResponder",channel:e}};this.sendToRouterService(t)}}addPubSubResponder(e,t,n,i){let r,s;if(a.LoggerClient.system.info("RouterClient.addPubSubResponder","TOPIC",e,"INITIAL STATE",t,"PARAMS",n),o.default.args(e,"any",t,"object=",n,"object="),n=n||{},o.default.args2("params.subscribeCallback",n.subscribeCallback,"function=","params.publishCallback",n.publishCallback,"function=")&&o.default.args2("params.unsubscribeCallback",n.unsubscribeCallback,"function="),void 0===n.subscribeCallback&&void 0===n.publishCallback&&void 0===n.unsubscribeCallback){t=t||{};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()]=f(t);const n={header:{origin:this.clientName,type:"addPubSubResponder",topic:e.toString(),handleOnServer:!1},data:t};this.sendToRouterService(n),s="success"}else r=`RouterClient.addPubSubResponder: Responder already locally defined for topic ${e}`,a.LoggerClient.system.error(r);i&&i(r,s)}removePubSubResponder(e){a.LoggerClient.system.info("RouterClient.removePubSubResponder","TOPIC",e),o.default.args(e,"any");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 a.LoggerClient.system.warn(`RouterClient.removePubSubResponder failed: Could not find responder for topic ${e}`)}subscribe(e,t){a.LoggerClient.system.info("RouterClient.subscribe","TOPIC",e),o.default.args(e,"string",t,"function");const n=`${this.clientName}.${(0,d.v4)()}`;this.mapSubscribersID[n]=t,this.mapSubscribersTopic[n]=e;const i={header:{origin:this.clientName,type:"subscribe",subscribeID:n,topic:e}};return this.sendToRouterService(i),{subscribeID:n,topic:e}}publish(e,t){a.LoggerClient.system.info("RouterClient.publish","TOPIC",e,"EVENT",t),o.default.args(e,"string",t,"any");const n={header:{origin:this.clientName,type:"publish",topic:e},data:t};this.sendToRouterService(n)}unsubscribe(e){a.LoggerClient.system.info("RouterClient.unsubscribe","SUBSCRIBE ID",e),o.default.args(e,"object")&&o.default.args2("subscribeIDStruct.subscribeID",e.subscribeID,"string");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 a.LoggerClient.system.warn(`RouterClient.unsubscribe: Could not find subscribeID for topic ${e.topic}`)}trustedMessage(e){let t=!1;return a.LoggerClient.system.debug("RouterClient.trustedMessage header",e.header),"SharedWorker"===e.header.originIncomingTransportInfo.transportID&&(t=!0),t}disconnectAll(){a.LoggerClient.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.removeResponder(e)})),Object.keys(this.mapSubscribersID).forEach((e=>{const t=this.mapSubscribersTopic[e];this.unsubscribe({topic:t,subscribeID:e})}))}}t.RouterConnection=h,t.RouterController={start:e=>{const t=(0,c.singleton)("RouterClient",h);return a.LoggerClient.setRouterClient(t),t.start(e)},stop:()=>{(0,c.singleton)("RouterClient",h).stop()},calibrateTimeWithRouterService(e){(0,c.singleton)("RouterClient",h).calibrateTimeWithRouterService(e)}},t.RouterClient={onReady:e=>(0,c.singleton)("RouterClient",h).onReady(e),addListener:(e,t)=>(0,c.singleton)("RouterClient",h).addListener(e,t),transmit:(e,t,n)=>{(0,c.singleton)("RouterClient",h).transmit(e,t,n)},removeListener:(e,t)=>{(0,c.singleton)("RouterClient",h).removeListener(e,t)},addResponder:(e,t)=>{(0,c.singleton)("RouterClient",h).addResponder(e,t)},query:(e,t,n,i)=>(0,c.singleton)("RouterClient",h).query(e,t,n,i),removeResponder:e=>{(0,c.singleton)("RouterClient",h).removeResponder(e)},addPubSubResponder:(e,t,n,i)=>{(0,c.singleton)("RouterClient",h).addPubSubResponder(e,t,n,i)},removePubSubResponder:e=>{(0,c.singleton)("RouterClient",h).removePubSubResponder(e)},subscribe:(e,t)=>(0,c.singleton)("RouterClient",h).subscribe(e,t),publish:(e,t)=>{(0,c.singleton)("RouterClient",h).publish(e,t)},unsubscribe:e=>{(0,c.singleton)("RouterClient",h).unsubscribe(e)},trustedMessage:e=>(0,c.singleton)("RouterClient",h).trustedMessage(e),disconnectAll:()=>{(0,c.singleton)("RouterClient",h).disconnectAll()},calibrateTimeWithRouterService(e){(0,c.singleton)("RouterClient",h).calibrateTimeWithRouterService(e)}},t.default=t.RouterClient},95085:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.StorageClient=void 0;const r=i(n(83027)),o=i(n(20670)),s=i(n(2518)),a=n(25232),l=n(252),u=(0,r.default)(1);class d extends a._BaseClient{constructor(){super({onReady:e=>{null==e||e(),this.clientReady=!0},name:"storageClient"}),this.clientReady=!1}log(e,...t){(e?s.default.system.error:s.default.system.info)(...t,e)}async setUser(e,t){this.clientReady||s.default.system.error("storageClient invoked before ready"),o.default.args(e.user,"string",t,"function=");const{err:n,response:i}=await this.routerClient.query("Storage.setUser",{user:e.user});return this.log(n,"APPLICATION LIFECYCLE:StorageClient.setUser",e,n,i.data),null==t||t(n),{err:n}}async setStore(e,t){s.default.deprecated("StorageClient.setStore() has been deprecated and will be removed in a future release"),this.clientReady||s.default.system.error("storageClient.setStore() invoked before ready"),o.default.args(e.topic,"string",e.dataStore,"string=",t,"function="),s.default.system.log("APPLICATION LIFECYCLE:StorageClient.setStore",e,t);const{err:n,response:i}=await this.routerClient.query("Storage.setStore",e);return this.log(n,"Storage.setStore",i),null==t||t(n,i.data),{err:n,data:i.data}}async save(e,t){if(this.clientReady||s.default.system.error("storageClient.save() invoked before ready"),"string"!=typeof e.key||"string"!=typeof e.topic)throw new Error("Values for key and topic must be strings.");o.default.args(e.topic,"string",e.key,"string",e.value,"any",t,"function=");const{err:n,response:i}=await this.routerClient.query("Storage.save",e);if(this.log(n,"Storage.save",i.data),null==t||t(n,i.data),n)throw n;return{err:n,data:i.data}}save1(e){return u((()=>this.save(e)))}async get(e,t){const{err:n,data:i}=await this.getStandardized(e);if(null==t||t(n,i),n)throw n;return i}async getStandardized(e,t){if(this.clientReady||s.default.system.error("storageClient invoked before ready"),"string"!=typeof e.key||"string"!=typeof e.topic)throw new Error("Values for key and topic must be strings.");o.default.args(e.topic,"string",e.key,"string",t,"function=");const{err:n,response:i}=await this.routerClient.query("Storage.get",e);return this.log(n,"Storage.get",i.data),null==t||t(n,i.data),{err:n,data:i.data}}get1(e,t){return u((()=>this.get(e,t)))}async keys(e,t){this.clientReady||s.default.system.error("storageClient invoked before ready"),o.default.args(e.topic,"string",t,"function="),s.default.system.debug("StorageClient.keys",e,t);const{err:n,response:i}=await this.routerClient.query("Storage.keys",e);return this.log(n,"Storage.keys",i.data),null==t||t(n,i.data),{err:n,data:i.data}}keys1(e){return s.default.deprecated("StorageClient.keys1 is deprecated and will be removed in a future release"),u((()=>(0,l.promisify)(this.keys.bind(this))(e)))}async getMultiple(e,t){s.default.deprecated("StorageClient.getMultiple() is deprecated and will be removed in a future release"),this.clientReady||s.default.system.error("storageClient invoked before ready"),s.default.system.info("StorageClient.getMultiple",e,t);const{err:n,response:i}=await this.routerClient.query("Storage.getMultiple",e);return this.log(n,"StorageClient.getMultiple:",e,i),null==t||t(n,i),{err:n,data:i.data}}async remove(e,t){this.clientReady||s.default.system.error("storageClient invoked before ready"),o.default.args(e.topic,"string",e.key,"string",t,"function=");const{err:n,response:i}=await this.routerClient.query("Storage.delete",e);if(this.log(n,"StorageClient.delete",i.data),null==t||t(n,i.data),n)throw n;return{err:n,data:i.data}}remove1(e){return u((()=>this.remove(e)))}delete(...e){s.default.deprecated("StorageClient.delete() is deprecated and will be removed in a future release"),this.remove.apply(e)}async clearCache(e){s.default.system.log("StorageClient.clearCache",e);const{err:t,response:n}=await this.routerClient.query("Storage.clearCache",null);return this.log(t,"StorageClient.clearCache",n.data),null==e||e(t,n.data),{err:t,data:n.data}}}t.StorageClient=d;var c=new d;t.default=c},97525:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.WindowClient=void 0;const r=n(1641),o=i(n(90693)),s=i(n(49136)),a=n(91374),l=n(25232),u=i(n(2518)),d=i(n(20670)),c=i(n(11314)),f=i(n(9381)),h=n(252),p=n(44137),g=n(49136),m=n(94017),w=n(24137);let y=!1,v=!1;const b=async e=>{y&&(v=!0);const{name:t}=p.FEAGlobals.finsembleWindow;c.default.transmit("DockingService.deregisterWindow",{name:t,userInitiated:e})};class S extends l._BaseClient{constructor(){super({startupDependencies:{},onReady:e=>{this.start(e)},name:"windowClient"}),this.options={},this.title=null,this.windowGroups=[],this.enableWindowsAeroSnap=!1,this.bindFunctions()}bindFunctions(){this.onWindowRestored=this.onWindowRestored.bind(this),this.onWindowMaximized=this.onWindowMaximized.bind(this),this.onWindowBlurred=this.onWindowBlurred.bind(this),this.onWindowFocused=this.onWindowFocused.bind(this),this.onMinimizedRestored=this.onMinimizedRestored.bind(this),this.onWindowMinimized=this.onWindowMinimized.bind(this),this.close=this.close.bind(this),this.getInitialOptions=this.getInitialOptions.bind(this)}onWindowRestored(){this.updateHeaderState("Maximize",{hide:!1})}onWindowMaximized(){this.updateHeaderState("Maximize",{hide:!0})}onWindowBlurred(){(0,w.deprecatedSetActive)(!1)}onWindowFocused(){(0,w.deprecatedSetActive)(!0)}onMinimizedRestored(){this.routerClient.transmit("DockingService.windowRestored",p.FEAGlobals.finsembleWindow.name),p.FEAGlobals.finsembleWindow.removeEventListener("restored",this.onMinimizedRestored)}onWindowMinimized(){this.routerClient.query("DockingService.windowMinimized",{windowName:p.FEAGlobals.finsembleWindow.name}),p.FEAGlobals.finsembleWindow.addEventListener("restored",this.onMinimizedRestored)}getWindowGroups(){return this.windowGroups}groupUpdateHandler(e,t){e?u.default.error(e):t.data&&t.data.groupData&&(this.windowGroups=Object.values(t.data.groupData).filter((e=>e.windowNames.includes((0,w.deprecatedGetWindowNameForDocking)(p.FEAGlobals.finsembleWindow)))))}close(e,t){e||(e={removeFromWorkspace:!0,closeWindow:!0});const{parentWindow:n}=p.FEAGlobals.finsembleWindow;return e.userInitiated&&n?n.close(e,t):p.FEAGlobals.finsembleWindow.close(e,t)}getWindowTitle(){return this.title}async retrieveMonitorDimensions(e){u.default.deprecated("WindowClient.retrieveMonitorDimensions() is deprecated and will be removed in a future release.");const t=await(0,m.getMonitor)();p.FEAGlobals.finsembleWindow.updateOptions({options:{monitorDimensions:t.monitorRect}}),null==e||e(t.monitorRect)}listenForHashChanges(){var e;if(a.System.isTitlebarWindow())return;const t=null!==(e=window.top)&&void 0!==e?e:window,n=t.location.href;p.FEAGlobals.finsembleWindow.updateOptions({url:n}),function(e){const{pushState:n}=e;e.pushState=function(i){"function"==typeof e.onpushstate&&e.onpushstate({state:i}),n.apply(e,arguments);const r=t.location.href;p.FEAGlobals.finsembleWindow.updateOptions({url:r})};const{replaceState:i}=e;e.replaceState=function(n){"function"==typeof e.onreplacestate&&e.onreplacestate({state:n}),i.apply(e,arguments);const r=t.location.href;p.FEAGlobals.finsembleWindow.updateOptions({url:r})}}(window.history),window.addEventListener("hashchange",(()=>{const e=t.location.href;p.FEAGlobals.finsembleWindow.updateOptions({url:e})}))}async getInitialOptions(e){if(this.isInAService)this.options={},u.default.system.debug("WindowClient:getting options empty",this.options),null==e||e();else{const{data:t}=await p.FEAGlobals.finsembleWindow.getOptions(),n=null!=t?t:{};p.FEAGlobals.finsembleWindow.windowOptions=this.options=n,u.default.system.debug("WindowClient:getting options",this.options),null==e||e()}}async cacheInitialBounds(){var e;if(a.System.isTitlebarWindow())return;const t=null!==(e=window.top)&&void 0!==e?e:window;await this.cacheBounds();try{p.FEAGlobals.finsembleWindow.windowOptions.customData.foreign.components["Window Manager"].persistWindowState&&p.FEAGlobals.finsembleWindow.updateOptions({options:{url:t.location.toString()}})}catch(e){u.default.system.warn('customData.foreign.components["Window Manager" is undefined')}}getWindowBounds(){return u.default.deprecated("WindowClient.getWindowBounds() is deprecated and will be removed in a future version."),{top:p.FEAGlobals.finsembleWindow.windowOptions.defaultTop,left:p.FEAGlobals.finsembleWindow.windowOptions.defaultLeft,width:p.FEAGlobals.finsembleWindow.windowOptions.defaultWidth,height:p.FEAGlobals.finsembleWindow.windowOptions.defaultHeight}}saveWindowBounds(e,t){if(u.default.system.debug("WINDOW LIFECYCLE:SavingBounds:",e,"setActiveWorkspaceDirty",t),void 0===t&&(t=!1),d.default.args(e,"object")&&d.default.args2("bounds.top",e.top,"number"),e){p.FEAGlobals.finsembleWindow.updateOptions({options:{top:Math.round(e.top),defaultTop:Math.round(e.top),left:Math.round(e.left),defaultLeft:Math.round(e.left),width:Math.round(e.width),defaultWidth:Math.round(e.width),height:Math.round(e.height),defaultHeight:Math.round(e.height)}});try{p.FEAGlobals.finsembleWindow.windowOptions.customData.foreign.components["Window Manager"].persistWindowState}catch(e){}}}maximize(e){return p.FEAGlobals.finsembleWindow.maximize(null,e)}minimize(e){return p.FEAGlobals.finsembleWindow.minimize(null,e)}bringToFront(e){return p.FEAGlobals.finsembleWindow.bringToFront({forceFocus:!0},e)}bringWindowToFront(e){p.FEAGlobals.finsembleWindow.bringToFront({forceFocus:!0},e)}setAlwaysOnTop(e,t){return p.FEAGlobals.finsembleWindow.setAlwaysOnTop({alwaysOnTop:e},t)}restore(e){return p.FEAGlobals.finsembleWindow.restore(null,e)}setTaskbarIconOverlay(e){p.FEAGlobals.fin.desktop.Window.setTaskbarIconOverlay({iconURL:e})}async cacheBounds(){const{err:e,data:t}=await p.FEAGlobals.finsembleWindow.getBounds();!e&&t?await p.FEAGlobals.finsembleWindow.updateOptions({options:{defaultLeft:t.left,defaultTop:t.top,defaultWidth:t.width,defaultHeight:t.height}}):console.warn("Get bounds error.",e,"Window may not be registered with the window service")}injectDOM(e){if(u.default.system.debug("injectDOM",e),u.default.system.deprecated("WindowClient.injectDOM() has been deprecated and will be removed in a future release"),document.getElementById("FSBLHeader"))return;window.scrollTo(0,0);const t=document.createElement("div"),n=e?` style=height:${e}`:"";t.innerHTML=`<div id="FSBLHeader"${n}></div>`,t.firstChild&&document.body.insertBefore(t.firstChild,document.body.firstChild)}getComponentState(e,t){return new Promise((n=>{e||(e={}),e.fields&&!Array.isArray(e.fields)&&(e.fields=[e.fields]),d.default.args(e,"object",t,"function"),p.FEAGlobals.finsembleWindow.getComponentState(e,((e,i)=>{null==t||t(e,i),n({err:e,data:i})}))}))}async setComponentState(e,t){return d.default.args(e,"object",t,"function=")&&d.default.args2("params.field",e.field,"string"),new Promise((n=>{p.FEAGlobals.finsembleWindow.setComponentState(e,(e=>{null==t||t(e),n({err:e})}))}))}async removeComponentState(e,t){return d.default.args(e,"object",t,"function=")&&d.default.args2("params.field",e.field,"string"),new Promise((n=>{p.FEAGlobals.finsembleWindow.removeComponentState(e,(e=>{null==t||t(e),n({err:e})}))}))}getWindowNameForDocking(){return u.default.deprecated("WindowClient.getWindowNameForDocking is deprecated and will be removed"),(0,w.deprecatedGetWindowNameForDocking)(p.FEAGlobals.finsembleWindow)}formGroup(){p.FEAGlobals.finsembleWindow.formGroup()}preventUnintendedDropEvents(){const e=e=>{e.preventDefault()};window.addEventListener("dragover",e,!1),window.addEventListener("drop",e,!1)}rejectWindowsKeyResizes(){let e=!1;const t=async t=>{this.enableWindowsAeroSnap?"Meta"===t.key&&c.default.transmit("Finsemble.WindowService.WindowsKey","up"):"Meta"===t.key&&e&&(e=!1,a.System.Window.getCurrent().updateOptions({resizable:!0}))},n=t=>{this.enableWindowsAeroSnap?"Meta"===t.key&&c.default.transmit("Finsemble.WindowService.WindowsKey","down"):"Meta"===t.key&&(e=!0,a.System.Window.getCurrent().updateOptions({resizable:!1}))};o.default.onReady((()=>{window.addEventListener("keyup",t),window.addEventListener("keydown",n)}))}modifyReload(){document.addEventListener("keydown",(e=>{e.ctrlKey&&"r"===e.key.toLowerCase()&&(e.preventDefault(),e.stopPropagation(),p.FEAGlobals.finsembleWindow.reload())}))}addListeners(){p.FEAGlobals.finsembleWindow.addListener("setParent",(()=>{u.default.system.info("WindowClient.setParent deregisterWithDockingManager"),b()})),p.FEAGlobals.finsembleWindow.addEventListener("maximized",this.onWindowMaximized),p.FEAGlobals.finsembleWindow.addEventListener("minimized",this.onWindowMinimized),p.FEAGlobals.finsembleWindow.addEventListener("restored",this.onWindowRestored),p.FEAGlobals.finsembleWindow.addEventListener("blurred",this.onWindowBlurred),p.FEAGlobals.finsembleWindow.addEventListener("focused",this.onWindowFocused)}updateHeaderState(e,t){var n;null===(n=this.commandChannel)||void 0===n||n.call(this,e,t)}headerCommandChannel(e){this.commandChannel=e}ejectFromGroup(){u.default.deprecated("WindowClient.ejectFromGroup is deprecated and will be removed"),p.FEAGlobals.finsembleWindow.ejectFromGroup()}setWindowTitle(e){u.default.system.deprecated("This method is deprecated and will be removed in a future release. Please simply set the application's `document.title` element to change the title. Or, set `components['Window Manager'].title` in the app's manifest."),this.setWindowTitlePrivate(e)}setWindowTitlePrivate(e){d.default.args(e,"string"),this.title=e,this.updateHeaderState("Main",{windowTitle:e}),p.FEAGlobals.finsembleWindow.setTitle(e)}getSpawnData(){var e,t,n;return null!==(n=null===(t=null===(e=this.options)||void 0===e?void 0:e.customData)||void 0===t?void 0:t.spawnData)&&void 0!==n?n:{}}getCurrentWindow(){return a.System.Window.getCurrent()}async getDesktopBoundingBox(e){return u.default.deprecated("WindowClient.getDesktopBoundingBox() is deprecated and will be removed in a future release."),(0,g.getDesktopBoundingBox)(e)}isPointInBox(e,t){return u.default.deprecated("WindowClient.isPointInBox() is deprecated and will be removed in a future release."),(0,g.isPointInBox)(e,t)}isMouseOverDOMElement(e,t){return(0,g.isMouseOverDOMElement)(e,t)}getWindowIdentifier(){var e,t,n,i;return{windowName:p.FEAGlobals.finsembleWindow?p.FEAGlobals.finsembleWindow.name:window.name,uuid:p.FEAGlobals.finsembleWindow?p.FEAGlobals.finsembleWindow.uuid:void 0,componentType:null!==(i=null===(n=null===(t=null===(e=this.options)||void 0===e?void 0:e.customData)||void 0===t?void 0:t.component)||void 0===n?void 0:n.type)&&void 0!==i?i:null}}setActive(e){u.default.deprecated("WindowClient.setActive is deprecated and will be removed"),(0,w.deprecatedSetActive)(e)}getBounds(e){return p.FEAGlobals.finsembleWindow.getBounds(e)}setShape(e,t=Function.prototype){p.FEAGlobals.finsembleWindow.setShape(e,t)}startTilingOrTabbing(e,t){u.default.deprecated("WindowClient.startTilingOrTabbing is deprecated and will be removed"),c.default.transmit("DockingService.startTilingOrTabbing",e),null==t||t()}startMovingWindow(e){a.System.Window.getCurrent().startMovingWindow(e)}stopMovingWindow(){a.System.Window.getCurrent().stopMovingWindow()}cancelTilingOrTabbing(e,t){u.default.deprecated("WindowClient.cancelTilingOrTabbing is deprecated and will be removed"),console.debug("CancelTilingOrTabbing"),c.default.transmit("DockingService.cancelTilingOrTabbing",e),null==t||t()}sendIdentifierForTilingOrTabbing(e,t){u.default.deprecated("WindowClient.sendIdentifierForTilingOrTabbing is deprecated and will be removed"),c.default.transmit("DockingService.identifierForTilingOrTabbing",e),null==t||t()}stopTilingOrTabbing(e,t){u.default.deprecated("WindowClient.stopTilingOrTabbing is deprecated and will be removed");const n=()=>{c.default.query("DockingService.stopTilingOrTabbing",e,(()=>{null==t||t()})),c.default.transmit("DockingService.stopTilingOrTabbing",e)};e.mousePosition?(n(),e.allowDropOnSelf||null==t||t()):a.System.getMousePosition(((i,r)=>{e.mousePosition=r,n(),e.allowDropOnSelf||null==t||t()}))}getStackedWindow(e,t){if(u.default.deprecated("WindowClient.getStackedWindow is deprecated and will be removed"),u.default.system.debug("WindowClient.getStackedWindow",e),t=t||e,(e=e||{}).windowIdentifiers=e.windowIdentifiers||[],!p.FEAGlobals.finsembleWindow.parentWindow&&e.create){const n=e=>{const{parentName:i}=e.data;p.FEAGlobals.finsembleWindow.setParent({windowName:i},((e,n)=>{null==t||t(e,n)})),p.FEAGlobals.finsembleWindow.removeListener("parent-set",n)};p.FEAGlobals.finsembleWindow.addListener("parent-set",n),s.default.spawn("StackedWindow",{windowType:"StackedWindow",data:{windowIdentifiers:e.windowIdentifiers},options:{newStack:!0}},((e,n)=>{u.default.system.debug("WindowClient.getStackedWindow-success",e,n),e&&(null==t||t(e,null))}))}else p.FEAGlobals.finsembleWindow.getParent(t)}async getMonitorInfo(e={},t){return u.default.deprecated("WindowClient.getMonitorInfo() is deprecated and will be removed. Please use LauncherClient.getMonitorInfo()"),(0,m.getWhichMonitorClientSide)(this.routerClient,e,t)}showAtMousePosition(){this.routerClient.transmit("DockingService.showAtMousePosition",this.getWindowIdentifier())}async fitToDOM(e,t){var n,i,r,o,s,a;"function"==typeof e&&(t=e,e=null);let l=document.documentElement.offsetHeight+(null!==(i=null===(n=null==e?void 0:e.padding)||void 0===n?void 0:n.height)&&void 0!==i?i:0),d=document.documentElement.offsetWidth+(null!==(o=null===(r=null==e?void 0:e.padding)||void 0===r?void 0:r.width)&&void 0!==o?o:0);l=Math.min(l,null!==(s=null==e?void 0:e.maxHeight)&&void 0!==s?s:l),d=Math.min(d,null!==(a=null==e?void 0:e.maxWidth)&&void 0!==a?a:d),u.default.system.debug("WindowClient.FitToDOM:newHeight:newWidth",l,d,e);const{data:c}=await(0,m.getWhichMonitorClientSide)(this.routerClient,{});c&&(l=Math.min(l,c.availableRect.height),d=Math.min(d,c.availableRect.width)),u.default.system.debug("WindowClient.FitToDOM:fixBounds",l,d);const{data:f}=await p.FEAGlobals.finsembleWindow.getBounds();!f||f.width==d&&f.height==l||await p.FEAGlobals.finsembleWindow.setBounds({bounds:Object.assign(Object.assign({},f),{width:d,height:l})}),null==t||t()}async start(e){if((0,h.iAmAServiceWindow)())return this.isInAService=!0,void(null==e||e());setInterval((()=>{(a.System.isBrowserView()||!a.System.isTitlebarWindow())&&(null===document||void 0===document?void 0:document.title)&&this.title!==document.title&&this.setWindowTitlePrivate(document.title)}),200),this.listenForHashChanges(),this.preventUnintendedDropEvents(),this.rejectWindowsKeyResizes(),this.modifyReload(),this.addListeners(),this.routerClient.subscribe("Finsemble.WorkspaceService.groupUpdate",((e,t)=>this.groupUpdateHandler(e,t))),await this.getInitialOptions(),(0,r.parallel)([e=>{f.default.getValue("finsemble",((t,n)=>{t&&u.default.system.error("Error reading windowService config from finsemble"),this.enableWindowsAeroSnap=n.services.windowService.config.enableWindowsAeroSnap,e()}))},async()=>{await(async e=>{var t,n,i,r,o,s,l,d,f,g,m,w,S,C,_,W,A,L,E,T,O,k,I,R,N,P,M,F,D,j,x,B,$,U,H,G,q,V,z,Y,K,Q,J,Z,X,ee,te,ne;if(!e)return void u.default.system.error(`No window options found for window ${window.name}`);const ie=e.customData;if(a.System.isBrowserView()||!(null==ie?void 0:ie.component)||(0,h.iAmAServiceWindow)())return;const re=null===(i=null===(n=null===(t=null==ie?void 0:ie.foreign)||void 0===t?void 0:t.components)||void 0===n?void 0:n["Window Manager"])||void 0===i?void 0:i.FSBLHeader,oe=null===(r=null==ie?void 0:ie.window)||void 0===r?void 0:r.dockable,se=null!==(g=null!==(f=null!==(d=null===(l=null===(s=null===(o=null==ie?void 0:ie.foreign)||void 0===o?void 0:o.services)||void 0===s?void 0:s.windowService)||void 0===l?void 0:l.manageWindowMovement)&&void 0!==d?d:re)&&void 0!==f?f:oe)&&void 0!==g&&g,ae=null!==(C=null===(S=null===(w=null===(m=null==ie?void 0:ie.foreign)||void 0===m?void 0:m.services)||void 0===w?void 0:w.windowService)||void 0===S?void 0:S.allowAutoArrange)&&void 0!==C?C:se,le=null!==(L=null===(A=null===(W=null===(_=null==ie?void 0:ie.foreign)||void 0===_?void 0:_.services)||void 0===W?void 0:W.windowService)||void 0===A?void 0:A.allowSnapping)&&void 0!==L?L:se,ue={allowAutoArrange:ae,snapping:!(null===(E=null==ie?void 0:ie.window)||void 0===E?void 0:E.ephemeral)&&le,tiling:null!==(I=null===(k=null===(O=null===(T=null==ie?void 0:ie.foreign)||void 0===T?void 0:T.services)||void 0===O?void 0:O.windowService)||void 0===k?void 0:k.allowTiling)&&void 0!==I?I:se,tabbing:null!==(M=null===(P=null===(N=null===(R=null==ie?void 0:ie.foreign)||void 0===R?void 0:R.services)||void 0===N?void 0:N.windowService)||void 0===P?void 0:P.allowTabbing)&&void 0!==M?M:se,canGroup:null!==(x=null===(j=null===(D=null===(F=null==ie?void 0:ie.foreign)||void 0===F?void 0:F.services)||void 0===D?void 0:D.windowService)||void 0===j?void 0:j.allowGrouping)&&void 0!==x?x:se,canMinimize:null!==(q=null!==(H=null===(U=null===($=null===(B=null==ie?void 0:ie.foreign)||void 0===B?void 0:B.services)||void 0===$?void 0:$.windowService)||void 0===U?void 0:U.allowMinimize)&&void 0!==H?H:null===(G=null==ie?void 0:ie.component)||void 0===G?void 0:G.canMinimize)&&void 0!==q?q:se,canMaximize:null!==(J=null!==(K=null===(Y=null===(z=null===(V=null==ie?void 0:ie.foreign)||void 0===V?void 0:V.services)||void 0===z?void 0:z.windowService)||void 0===Y?void 0:Y.allowMaximize)&&void 0!==K?K:null===(Q=null==ie?void 0:ie.component)||void 0===Q?void 0:Q.canMaximize)&&void 0!==J?J:se,overwriteStartDocked:null!==(te=null===(ee=null===(X=null===(Z=null==ie?void 0:ie.foreign)||void 0===Z?void 0:Z.services)||void 0===X?void 0:X.workspaceService)||void 0===ee?void 0:ee.global)&&void 0!==te&&te};(se||ae||"Toolbar"===(null===(ne=ie.component)||void 0===ne?void 0:ne.type))&&await(async e=>{if(p.FEAGlobals.finsembleWindow.parentWindow)return void u.default.system.debug("registerWithDockingManager ignore registration request if has a parent");const{uuid:t,name:n}=p.FEAGlobals.finsembleWindow;y=!0,await c.default.query("DockingService.registerWindow",{name:n,uuid:t,options:e,windowType:"WebWindow"}),y=!1,v&&(b(),v=!1),u.default.system.debug("WINDOW LIFECYCLE: Docking Registration complete.")})(Object.assign(Object.assign({},ie.window),ue))})(this.options),await this.cacheInitialBounds()}],e)}}t.WindowClient=S;const C=new S;t.default=C},2740:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return r(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceClient=void 0;const a=n(25232),l=o(n(23099)),u=s(n(20670)),d=s(n(2518)),c=n(26604),f=n(64324),h=s(n(9060));class p extends a._BaseClient{constructor(e){super(e),this.workspaces=[],this.setWorkspaces=this.setWorkspaceOrder,this.createNewWorkspace=this.createWorkspace,this.getWorkspaceDefinition=this.export,this.addWorkspaceDefinition=this.import,this.saveWorkspaceTemplateToConfigFile=this.exportToFile,u.default.args(e,"object=")&&e&&u.default.args2("params.onReady",e.onReady,"function="),this.publicEventManager=new h.default({name:"workspaceClient",sourceType:"workspace"})}_serviceResponseHandler(e,t,n,i,r=Function.prototype){if(e)return i(new Error(e)),r(e);t||(t={data:null}),n(t.data),r(null,t.data)}addEventListener(e,t){this.publicEventManager.addEventListener(e,t)}removeEventListener(e,t){this.publicEventManager.removeEventListener(e,t)}async addWindow(e,t=null){u.default.args(e,"object",t,"function=")&&e&&u.default.args2("params.name",e.name,"string");const{err:n,response:i}=await this.routerClient.query("WorkspaceService.addWindow",e,(()=>{}));if(d.default.system.log(`WORKSPACE LIFECYCLE: Window added:WorkspaceClient.addWindow: Name (${e.name})`),t&&t(n,i),!t&&n)throw n;return i}removeWindow(e,t=Function.prototype){u.default.args(e,"object",t,"function=")&&u.default.args2("params.name",e.name,"string"),this.routerClient.query("WorkspaceService.removeWindow",e,((n,i)=>{if(n)return d.default.system.error(n);d.default.system.log(`WORKSPACE LIFECYCLE:WorkspaceClient.removeWindow:Window removed: Name (${e.name})`),t(n,i?i.data:null)}))}async autoArrange(e,t){u.default.args(e,"object",t,"function="),e=e||{};const n=await l.getMyWindowIdentifier(),{err:i}=await this.routerClient.query("DockingService.autoArrange",{windowIdentifier:n});return t&&t(i),{err:i}}async minimizeAll(e,t){var n;u.default.args(e,"object",t,"function=");const i=await l.getMyWindowIdentifier();let r=null!=e?e:{monitor:"all"};r.windowIdentifier=null!==(n=r.windowIdentifier)&&void 0!==n?n:i;const{err:o}=await this.routerClient.query("WorkspaceService.minimizeAll",r);return t&&t(o),{err:o}}async bringWindowsToFront(e,t){var n;u.default.args(e,"object",t,"function=");const i=await l.getMyWindowIdentifier(),r=null!=e?e:{monitor:"all"};r.windowIdentifier=null!==(n=r.windowIdentifier)&&void 0!==n?n:i;const{err:o}=await this.routerClient.query("WorkspaceService.bringWindowsToFront",r);return t&&t(o),{err:o}}async getActiveWorkspace(e){var t;if(d.default.system.debug("WorkspaceClient.getActiveWorkspace"),this.activeWorkspace)return d.default.system.info("WorkspaceClient.getActiveWorkspace - returning from cache"),e&&e(null,{data:this.activeWorkspace}),{data:this.activeWorkspace};const{response:n}=await this.routerClient.query(c.WORKSPACE.API_CHANNELS.GET_ACTIVE_WORKSPACE,{});if(this.activeWorkspace=n.data,n.data.err)throw e&&e(n.data.err),new Error(n.data.err);return e&&e(null,{data:null!==(t=n.data)&&void 0!==t?t:{}}),{data:n.data}}getWorkspaces(e){return u.default.args(e,"function="),d.default.system.debug("WorkspaceClient.getWorkspaces"),new Promise((async(t,n)=>{this.routerClient.query(c.WORKSPACE.API_CHANNELS.GET_WORKSPACES,{},((i,r)=>{this._serviceResponseHandler(i,r,t,n,e)}))}))}getWorkspaceActions(e){return e(null,c.WORKSPACE.API_CHANNELS)}getWorkspaceNames(e){return u.default.args(e,"function="),d.default.system.debug("WorkspaceClient.getWorkspaceNames"),this.workspaces?(d.default.system.info("WorkspaceClient.getWorkspaceNames - returning from cache"),e&&e(null,this.workspaces),Promise.resolve(this.workspaces)):new Promise((async(t,n)=>{this.routerClient.query(c.WORKSPACE.API_CHANNELS.GET_WORKSPACE_NAMES,{},((i,r)=>{this._serviceResponseHandler(i,r,t,n,e)}))}))}setWorkspaceOrder(e,t){const{workspaces:n}=e;return u.default.args(t,"function"),d.default.system.debug("WorkspaceClient.setWorkspaceOrder",e),new Promise(((i,r)=>{this.routerClient.query(c.WORKSPACE.API_CHANNELS.SET_WORKSPACE_ORDER,n||e,((e,n)=>{this._serviceResponseHandler(e,n,i,r,t)}))}))}remove(e,t=Function.prototype){return u.default.args(e,"object",t,"function=")&&!e.name&&!e.workspace&&u.default.args2("params.name",e.name,"string"),d.default.system.debug("WorkspaceClient.remove",e),new Promise((async(n,i)=>{var r;e.name||(e.name=null===(r=e.workspace)||void 0===r?void 0:r.name,delete e.workspace);const o=(await this.getActiveWorkspace()).data;if(e.name===o.name){d.default.system.error(`APPLICATION LIFECYCLE: Cannot remove active workspace: WorkspaceClient.remove:attempt to remove active workspace name:${o.name}`);const e="Cannot remove active workspace";return this._serviceResponseHandler(e,null,n,i,t)}this.routerClient.query(c.WORKSPACE.API_CHANNELS.REMOVE,e,((e,r)=>{this._serviceResponseHandler(e,r,n,i,t)}))}))}rename(e,t=Function.prototype){return u.default.args(e,"object",t,"function=")&&u.default.args2("params.oldName",e.oldName,"string","params.newName",e.newName,"string"),d.default.system.debug("WorkspaceClient.rename",e),new Promise(((n,i)=>{if(!e.overwriteExisting&&this.workspaceExists(e.newName)){const e="Workspace Already Exists";return this._serviceResponseHandler(e,null,n,i,t)}this.routerClient.query(c.WORKSPACE.API_CHANNELS.RENAME,e,((e,r)=>{this._serviceResponseHandler(e,r,n,i,t)}))}))}save(e=Function.prototype){return d.default.system.debug("WorkspaceClient.save"),new Promise(((t,n)=>{this.routerClient.query(c.WORKSPACE.API_CHANNELS.SAVE,{},((i,r)=>{this._serviceResponseHandler(i,r,t,n,e)}))}))}workspaceExists(e){return u.default.args(e,"string"),this.workspaces.indexOf(e)>-1}saveAs(e,t=Function.prototype){return u.default.args(e,"object",t,"function=")&&u.default.args2("params.name",e.name,"string"),d.default.system.debug("WorkspaceClient.saveAs",e),new Promise(((n,i)=>{if(!e.force&&this.workspaceExists(e.name))return this._serviceResponseHandler("Workspace Already Exists",null,n,i,t);this.routerClient.query(c.WORKSPACE.API_CHANNELS.SAVE_AS,e,((e,r)=>{this._serviceResponseHandler(e,r,n,i,t)}))}))}async switchTo(e,t){u.default.args(e,"object",t,"function")&&u.default.args2("params.name",e.name,"string"),d.default.system.debug("WorkspaceClient.switchTo",e);const{err:n,response:i}=await this.routerClient.query(c.WORKSPACE.API_CHANNELS.SWITCH_TO,e);if(n)throw t&&t(n),new Error(n.toString());return t&&t(n,i.data),{data:i.data}}async _setWindowState(e){var t,n;if(!this.activeWorkspace)throw"Workspace is not yet ready";if(!this.activeWorkspace.windows.includes(e.windowName))throw"Cannot set state for Window not in workspace";d.default.system.debug("WorkspaceClient.setWindowData",e);const{response:i}=await this.routerClient.query(c.WORKSPACE.API_CHANNELS.SET_WINDOW_STATE,e);return Object.assign(Object.assign({},i),{data:null!==(t=i.data)&&void 0!==t?t:{},header:null!==(n=i.header)&&void 0!==n?n:{}})}async _getWindowState(e){var t,n;d.default.system.debug("WorkspaceClient.getWindowData",e);const{response:i}=await this.routerClient.query(c.WORKSPACE.API_CHANNELS.GET_WINDOW_STATE,e);return Object.assign(Object.assign({},i),{data:null!==(t=i.data)&&void 0!==t?t:{},header:null!==(n=i.header)&&void 0!==n?n:{}})}async isWorkspaceDirty(e=Function.prototype){u.default.args(e,"function"),d.default.system.debug("WorkspaceClient.isWorkspaceDirty");const{err:t,response:n}=await this.routerClient.query(c.WORKSPACE.API_CHANNELS.GET_ACTIVE_WORKSPACE_DIRTY,{},(()=>{}));return e(t,n),n.data}async createWorkspace(e,t,n=((e,t)=>{e&&(d.default.system.error(`Error creating workspace: ${e}`),d.default.system.info(`Result from create workspace: ${t}`))})){d.default.system.log(`WorkspaceClient: Creating Workspace Request for name "${e}"`);const i=(await this.routerClient.query(c.WORKSPACE.API_CHANNELS.NEW_WORKSPACE,{workspaceName:e})).response.data;!1!==t.switchAfterCreation&&await this.switchTo({name:i});const r={workspaceName:i};return n(null,r),r}export(e,t){return u.default.args(e,"object",t,"function")&&u.default.args2("params.workspaceName",e.workspaceName,"string"),d.default.system.debug("WorkspaceClient.export",e),new Promise(((n,i)=>{this.routerClient.query(c.WORKSPACE.API_CHANNELS.EXPORT,e,((r,o)=>{const s={};s[e.workspaceName]=o.data,this._serviceResponseHandler(r,{data:s},n,i,t)}))}))}async import(e,t){u.default.args(e,"object",t,"function=")&&u.default.args2("params.workspaceJSONDefinition",e.workspaceJSONDefinition,"object"),d.default.system.debug("WorkspaceClient.import",e);const n=(await this.routerClient.query(c.WORKSPACE.API_CHANNELS.IMPORT,e)).response.data;if(n&&n.err)throw t(n.err),new Error(n.err);return t&&t(null,n),n}exportToFile(e){d.default.system.info("workspaceClient.saveWorkspaceTemplateToConfigFile",e),u.default.args(e,"object")&&u.default.args2("params.workspaceTemplateDefinition",e.workspaceTemplateDefinition,"object");const{workspaceTemplateDefinition:t}=e;if("object"==typeof t){const e=Object.keys(t)[0];if(e&&t[e].templateDefinitionFlag){const n={workspaceTemplates:t};f.ConfigUtilInstance.promptAndSaveJSONToLocalFile(`workspaceConfig-${e}`,n)}else d.default.system.error("workspaceClient.saveWorkspaceTemplateToConfigFile. Input is not a legal template")}else d.default.system.error("workspaceClient.saveWorkspaceTemplateToConfigFile: Input is not a legal object")}async start(e){this.routerClient.subscribe(c.WORKSPACE.UPDATE_PUBSUB,((t,n)=>{d.default.system.debug(`${c.WORKSPACE.UPDATE_PUBSUB} response`,t,n),t?d.default.system.error(t):(this.activeWorkspace=n.data.activeWorkspace,this.workspaces=n.data.workspaces,e&&e())}))}}t.WorkspaceClient=p;let g=new p({onReady:e=>{g.start(e)},name:"workspaceClient"});t.default=g},44137:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FreestandingGlobals=t.FEAGlobals=t.Globals=void 0,t.Globals="undefined"==typeof window?n.g:window,t.FEAGlobals="undefined"==typeof window?n.g:window,t.FreestandingGlobals="undefined"==typeof window?n.g:window},94017:function(e,t,n){"use strict";var i,r,o=this&&this.__classPrivateFieldGet||function(e,t,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(e):i?i.value:t.get(e)},s=this&&this.__classPrivateFieldSet||function(e,t,n,i,r){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?r.call(e,n):r?r.value=n:t.set(e,n),n},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getTaskbar=t.adjustBoundsToBeOnMonitorAsync=t.adjustBoundsToBeOnMonitor=t.getMonitorsInstance=t.getMonitor=t.getAllMonitors=t.getAllMonitorsClientSide=t.getWhichMonitor=t.getWhichMonitorClientSide=t.getMonitorFromWindow=t.getMonitorFromScaledXY=t.onMonitorsChanged=void 0;const l=n(17187),u=a(n(2518)),d=n(91374),c=n(7860),f=n(23099),h=n(23099),p=a(n(84795));class g extends l.EventEmitter{constructor(){super(),this.allMonitors=[],this.ready=!1}static async getInstance(){return o(g,i,"f",r)||(s(g,i,(0,c.singleton)("Monitors",g),"f",r),await o(g,i,"f",r).initialize()),o(g,i,"f",r)}async initialize(){await this.refreshMonitors(),d.System.addEventListener("monitor-info-changed",(()=>{this.refreshMonitors()}))}async refreshMonitors(){u.default.system.info("refreshing cached monitors");const e=await d.System.getMonitorInfo();this.allMonitors=[];let{primaryMonitor:t}=e;t.whichMonitor="primary",t.position=0,this.allMonitors.push(Object.assign({},t));for(let t=0;t<e.nonPrimaryMonitors.length;t++){let n=e.nonPrimaryMonitors[t];n.whichMonitor=t,n.position=t+1,this.allMonitors.push(n)}return this.emit("monitors-changed",{monitors:this.allMonitors}),this.ready=!0,this.allMonitors}}i=g,r={value:null},t.onMonitorsChanged=async e=>{(await g.getInstance()).on("monitors-changed",e)},t.getMonitorFromScaledXY=async(e,n)=>{const i=await g.getInstance();if(!i.ready)return await i.refreshMonitors(),await(0,t.getMonitorFromScaledXY)(e,n);let r=null;const o=i.allMonitors;for(let t of o){const{monitorRect:i}=t;if(e>=i.left&&e<i.right&&n>=i.top&&n<i.bottom){r=t;break}}return null!=r?r:o[0]},t.getMonitorFromWindow=async e=>{var n,i,r,o;const s=null!==(n=Number.isFinite(e.x)?e.x:e.defaultLeft)&&void 0!==n?n:0,a=null!==(i=Number.isFinite(e.y)?e.y:e.defaultTop)&&void 0!==i?i:0,l=s+(null!==(r=e.defaultWidth)&&void 0!==r?r:0),d=a+(null!==(o=e.defaultHeight)&&void 0!==o?o:0);let c=await(0,t.getMonitorFromScaledXY)(s,a);if(c)return(0,f.clone)(c);{u.default.system.debug("getMonitorFromWindow - top-left is off screen, trying bottom right");let e=await(0,t.getMonitorFromScaledXY)(l,d);if(e)return(0,f.clone)(e);{u.default.system.debug("getMonitorFromWindow - bottom-right is off screen, getting primary");const e=await(0,t.getAllMonitors)();return(0,f.clone)(e[0])}}},t.getWhichMonitorClientSide=async(e,t={},n)=>{var i;await p.default.waitForStartup("windowService");const r=await(0,h.getMyWindowIdentifier)();t.windowIdentifier=null!==(i=t.windowIdentifier)&&void 0!==i?i:r;const{err:o,response:s}=await e.query("Launcher.getMonitorInfo",t);return null==n||n(o,s.data),{err:o,data:s.data}},t.getWhichMonitor=e=>new Promise((n=>{let i,{commandMonitor:r,monitors:o,launchingMonitorPosition:s}=e;const a="number"==typeof r;if("mine"!==r){if("primary"===r)i=o.find((e=>"primary"===e.whichMonitor));else if("next"===r){let e=s+1;e>=o.length&&(e=0),i=o[e]}else if("previous"===r){let e=s-1;e<0&&(e=o.length-1),i=o[e]}else a?(r>=o.length&&(r=o.length-1),i=o.filter((e=>e.position===r))[0]):s&&(i=o[s]);i||(i=o[0]),n(i)}else{const r=e.activeWindows.getWindow(e.windowIdentifier.windowName);r?r._getBounds({},(async(e,r)=>{if(e)i=o[0],n(i);else{const e=await(0,t.getMonitorFromScaledXY)(r.left,r.top);n(e)}})):(i=o[0],n(i))}})),t.getAllMonitorsClientSide=async(e,t)=>{await p.default.waitForStartup("windowService");const{err:n,response:i}=await e.query("Launcher.getMonitorInfoAll",{});return null==t||t(n,i.data),{err:n,data:i.data}},t.getAllMonitors=async()=>{const e=await g.getInstance(),t=e.ready?e.allMonitors:await e.refreshMonitors();return JSON.parse(JSON.stringify(t))},t.getMonitor=async e=>{const n=await(0,f.getWindowDescriptor)(e);if(n)return await(0,t.getMonitorFromWindow)(n);throw"getMonitor: Can't locate windowDescriptor."},t.getMonitorsInstance=async()=>await g.getInstance(),t.adjustBoundsToBeOnMonitor=(e,t,n="availableRect")=>{if(!e)return t;if(((e,t)=>e.allMonitors.some((e=>{const{monitorRect:n}=e;return t.left>=n.left&&t.left<=n.right&&t.right>=n.left&&t.right<=n.right&&t.top>=n.top&&t.top<=n.bottom&&t.bottom>=n.top&&t.bottom<=n.bottom&&t.height<=n.height&&t.width<=n.width})))(e,t))return u.default.system.info("Launcher.adjustWindowDescriptorBoundsToBeOnMonitor: on monitor."),t;const i=e.allMonitors.map((e=>((e,t,n="availableRect")=>{const i=e[n]||e.availableRect||e.monitorRect,r=(0,f.clone)(t);return t.top<i.top?r.top=i.top:t.top>i.bottom-t.height&&(r.top=i.bottom-t.height),t.left<i.left?r.left=i.left:t.left>i.right-t.width&&(r.left=i.right-t.width),r.bottom=r.top+r.height,r.right=r.left+r.width,r.right>i.right&&(r.right=i.right),r.top<i.top&&(r.top=i.top),r.left<i.left&&(r.left=i.left),r.bottom>i.bottom&&(r.bottom=i.bottom),r.height=r.bottom-r.top,r.width=r.right-r.left,{newBounds:r,distanceMoved:Math.sqrt((t.left-r.left)**2)+(t.top-r.top)**2,monitor:e}})(e.rawMonitor?e.rawMonitor:e,t,n))),r=i.sort(((e,t)=>e.distanceMoved-t.distanceMoved))[0];return u.default.system.info("Launcher.adjustWindowDescriptorBoundsToBeOnMonitor: not on monitor. bounds",t,"monitor name",r.monitor.name,"newBounds",r.newBounds),r.newBounds},t.adjustBoundsToBeOnMonitorAsync=async(e,n="availableRect")=>{const i=await g.getInstance();return(0,t.adjustBoundsToBeOnMonitor)(i,e,n)},t.getTaskbar=e=>e.monitorRect.bottom!=e.availableRect.bottom?{top:e.availableRect.bottom,left:e.availableRect.left,right:e.availableRect.right,bottom:e.monitorRect.bottom,width:e.availableRect.width,height:e.monitorRect.bottom-e.availableRect.bottom,edge:"bottom"}:e.monitorRect.top!=e.availableRect.top?{top:e.monitorRect.top,left:e.availableRect.left,right:e.availableRect.right,bottom:e.availableRect.top,width:e.availableRect.width,height:e.monitorRect.top-e.availableRect.top,edge:"top"}:e.monitorRect.right!=e.availableRect.right?{top:e.monitorRect.top,left:e.availableRect.right,right:e.monitorRect.right,bottom:e.availableRect.bottom,width:e.monitorRect.width-e.availableRect.width,height:e.monitorRect.height,edge:"right"}:e.monitorRect.left!=e.availableRect.left?{top:e.monitorRect.top,left:e.monitorRect.left,right:e.availableRect.left,bottom:e.availableRect.bottom,width:e.monitorRect.width-e.availableRect.width,height:e.monitorRect.height,edge:"left"}:null},31219:(e,t,n)=>{"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.Performance=void 0;const r=n(44137),o={navigationStart:Date.now()};t.Performance={now:()=>{var e;return r.Globals.performance?null===(e=r.Globals.performance)||void 0===e?void 0:e.now():Date.now()},timing:(null===(i=r.Globals.performance)||void 0===i?void 0:i.timing)?r.Globals.performance.timing:o}},7860:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.singleton=void 0,t.singleton=(e,t)=>{const i=Symbol.for(`com.finsemble.singleton.${e}`);return Object.getOwnPropertySymbols(n.g).indexOf(i)>-1||(n.g[i]=new t),n.g[i]}},64324:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigUtilInstance=t.ConfigUtil=void 0;const r=i(n(2518)),o=n(91374),s=i(n(96486)),a=async()=>new Promise((e=>{o.System.getManifest((t=>{e({err:null,data:t})}))})),l=(e,t)=>{var n,i;return null!==(n=e.finsemble[t])&&void 0!==n?n:null===(i=e.finsemble)||void 0===i?void 0:i.custom[t]},u=(e,t)=>{let n=!1;const i=t.split(/[/\\:?=&\s]/);for(let o=0;o<i.length;o++)if("$"===i[o][0]){const s=i[o].substring(1),a=l(e,s);if(void 0===a)r.default.system.warn("ConfigUtil.resolveString",`Missing [${s}] variable from finsemble.custom configuration object`);else{const e=t.replace(i[o],a);r.default.system.verbose("forceObjectsToLogger","ConfigUtil.resolveManifestMacros:resolveString configString",i[o],s,a,"old value=",t,"value=",e),n=!0,t=e}}return{configString:t,replacedMacro:n}},d=(e,t,n)=>{let i=!1;if(n>1e3)return r.default.system.error("ConfigUtil resolveArray maxiumum recursion level reached"),{replacedMacro:i};r.default.system.verbose("forceObjectsToLogger","resolveArray","recursionLevel",n,"configArray:",t);for(let r=0;r<t.length;r++){const o=t[r];if("string"==typeof o&&o.indexOf("$")>-1){const n=u(e,o);t[r]=n.configString,i=i||n.replacedMacro}else o instanceof Array?d(e,o,n+1):"object"==typeof o&&c(e,o,n+1)}return{replacedMacro:i}},c=(e,t,n)=>{let i=!1;return n>1e3?(r.default.system.error("ConfigUtil resolveObject maxiumum recursion level reached"),{replacedMacro:i}):(t=t||{},r.default.system.verbose("forceObjectsToLogger","ConfigUtil.resolveManifestMacros:resolveObject","recursionLevel",n,"configObject:",t),Object.keys(t).forEach((r=>{const o=t[r];if("string"==typeof o&&o.indexOf("$")>-1){const n=u(e,o);t[r]=n.configString,i=i||n.replacedMacro}else o instanceof Array?d(e,o,n+1):"object"==typeof o&&c(e,o,n+1)})),{replacedMacro:i})};class f{resolveManifestMacros(e,t){let n;for(n=0;n<100;n++){const{replacedMacro:n}=c(e,t,1);if(!n)break}n>=100&&r.default.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(){r.default.system.debug("ConfigUtil.getExpandedRawManifest starting");const{err:e,data:t}=await a();return e||!t?r.default.system.error("ConfigUtil.getExpandedRawManifest:application.getManifest:err",e):(r.default.system.debug("forceObjectsToLogger","ConfigUtil.getExpandedRawManifest:getExpandedRawManifest: manifest retrieved. Pre-variable resolution",t),this.resolveManifestMacros(t,t.finsemble),r.default.system.debug("forceObjectsToLogger","ConfigUtil.getExpandedRawManifest:getExpandedRawManifest:Complete. post-variable resolution",t)),{err:e,data:t}}async fetchConfigFile(e){let t,n=null;r.default.system.debug(`fetching import ${e}`);try{const i=await fetch(e,{credentials:"include",cache:"no-cache"});200!=i.status?n=`HTTP get error for ${e}: ${i.status} ${i.statusText}`:t=await i.json()}catch(t){n=`Failure importing config from ${e} ${t.toString()}`}return{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),r.default.system.debug("forceObjectsToLogger","ConfigUtil.getInitialManifest:getCoreConfig:Initial Manifest after variables Resolved",e)}async getInitialManifest(){const{err:e,data:t}=await a();if(!e&&t){t.finsemble=t.finsemble||{},this.resolveManifestMacros(t,t.finsemble),t.finsemble.applicationRoot||r.default.system.error("FATAL ERROR: applicationRoot was not defined in manifest file.");const e=`${t.finsemble.moduleRoot}/configs/core/config.json`,{err:n,data:i}=await this.fetchConfigFile(e);!n&&i?this.graftImportOnToManifest(t,i):r.default.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){r.default.system.debug("saveJSONToLocalFile",e,t);const n=JSON.stringify(t,null,"\t"),i=`data:application/json;charset=utf-8,${encodeURIComponent(n)}`,o=`${e}.json`,s=document.createElement("a");s.setAttribute("href",i),s.setAttribute("download",o),s.click()}configFormatForExport(e,t){r.default.system.debug("configFormatForExport starting",e,t);let n=s.default.cloneDeep(t);if("raw"===e);else if("all"===e)delete n.importConfig,delete n.comment;else if("application"===e)delete n.importConfig,delete n.comment,delete n.system,delete n.services;else if("workspace"===e)n={workspace:n};else if("workspaceTemplate"===e){const e={};e[n.name]=n,n={workspaceTemplates:e}}else"services"===e?n=n.services:"components"===e&&(n=n.components);return n}getDefault(e,t,n){let i=n;if(e){try{const n=t.split(".");let r=e;for(let e=1;e<n.length;e++)r=r[n[e]];i=r}catch(e){i=n}void 0===i&&(i=n)}return i}}t.ConfigUtil=f,t.ConfigUtilInstance=new f},26604:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.MOVE_REASON=t.LAUNCHER_SERVICE=t.HEARTBEAT_TIMEOUT_CHANNEL=t.COMPONENT_STATE_STORAGE_TOPIC=t.WINDOW_SERVICE_REQUESTS=t.WORKSPACE=t.WINDOW=t.INTERRUPTIBLE_EVENTS=t.EVENT_INTERRUPT_CHANNEL=t.DOCKING=t.SERVICE_STOP_CHANNEL=t.SERVICE_START_CHANNEL=t.WINDOWSTATE=t.SERVICES_STATE_CHANNEL=t.CLIENT_SERVER_MAPPING=t.SERVICE_QUERY_READY_CHANNEL=t.SERVICE_CLOSED_CHANNEL=t.SERVICE_CLOSING_CHANNEL=t.SERVICE_READY_CHANNEL=t.SERVICE_INITIALIZING_CHANNEL=t.APPLICATION_STATE_CHANNEL=t.WRAPPERS=void 0,t.WRAPPERS={EVENTS:["title-changed","bringToFront","setBounds","alwaysOnTop","setOpacity"]},t.APPLICATION_STATE_CHANNEL="Finsemble.Application.State",t.SERVICE_INITIALIZING_CHANNEL="Finsemble.ServiceManager.serviceInitializing",t.SERVICE_READY_CHANNEL="Finsemble.ServiceManager.serviceReady",t.SERVICE_CLOSING_CHANNEL="Finsemble.ServiceManager.serviceClosing",t.SERVICE_CLOSED_CHANNEL="Finsemble.ServiceManager.serviceClosed",t.SERVICE_QUERY_READY_CHANNEL=e=>`Finsemble.ServiceManager.queryReady.${e}`,t.CLIENT_SERVER_MAPPING=e=>({authenticationClient:"authenticationService",configClient:"configService",distributedStoreClient:"dataStoreService",hotkeysClient:"hotkeysService",linkerClient:"linkerService",logger:"loggerService",searchClient:"searchService",storageClient:"storageService",windowClient:"windowService",workspaceClient:"workspaceService"}[e]),t.SERVICES_STATE_CHANNEL="Finsemble.State.Services",(n=t.WINDOWSTATE||(t.WINDOWSTATE={}))[n.NORMAL=0]="NORMAL",n[n.MINIMIZED_WAS_NORMAL=1]="MINIMIZED_WAS_NORMAL",n[n.MAXIMIZED=2]="MAXIMIZED",n[n.MINIMIZED_WAS_MAXIMIZED=3]="MINIMIZED_WAS_MAXIMIZED",n[n.TRANSITIONING=4]="TRANSITIONING",t.SERVICE_START_CHANNEL="Finsemble.Service.Start",t.SERVICE_STOP_CHANNEL="Finsemble.Service.Stop",t.DOCKING={GROUP_UPDATE:"DockingService.groupUpdate",WORKSPACE_GROUP_UPDATE:"Finsemble.WorkspaceService.groupUpdate",REQUEST_PUBLISH:"DockingService.requestGroupDataPublish"},t.EVENT_INTERRUPT_CHANNEL="Finsemble.Event.Interrupt",t.INTERRUPTIBLE_EVENTS=["close-requested","closed","close-complete","_container-close-handlers"],t.WINDOW={DELAYABLE_EVENTS:["close-requested","closed","close-complete","_container-close-handlers"],CANCELABLE_EVENTS:["close-requested"]},t.WORKSPACE={DELAYABLE_EVENTS:["load-requested","close-requested","save-requested"],CANCELABLE_EVENTS:["close-requested"],CLEAN_SHUTDOWN:"Finsemble.Workspace.cleanShutdown",UPDATE_PUBSUB:"Finsemble.WorkspaceService.update",STORAGE_TOPIC:"finsemble.workspace",CACHE_STORAGE_TOPIC:"finsemble.workspace.cache",ALL_WORKSPACES:"finsemble.allWorkspaces",ACTIVE_WORKSPACE:"activeWorkspace",LAST_USED_WORKSPACE_TOPIC:"finsemble",LAST_USED_WORKSPACE_NAME:"finsemble.lastUsedWorkspace.name",LAST_USED_WORKSPACE:"finsemble.lastUsedWorkspace",INITIAL_WORKSPACE_PREFERENCE:"finsemble.initialWorkspace",PUBLISH_REASONS:{INIT:"workspace:initialization",LOAD_DATA_RETRIEVED:"workspace:load:dataRetrieved",LOAD_FINISHED:"workspace:load:finished",WINDOW_REMOVED:"window:remove",WINDOW_ADDED:"window:add",LOAD_STARTED:"workspace:load:start",WORKSPACE_REMOVED:"Workspace:remove",WORKSPACE_RENAMED:"rename",SWITCHTO_TERMINATED:"workspace:switchTo:terminated",NEW_WORKSPACE:"new workspace",SAVE_AS:"APPLICATION LIFECYCLE:WORKSPACE LIFECYCLE:SaveAs:Workspace:Save As"},API_CHANNELS:{NEW_WORKSPACE:"Finsemble.Workspace.NewWorkspace",SAVE:"Finsemble.Workspace.Save",RENAME:"Finsemble.Workspace.Rename",SAVE_AS:"Finsemble.Workspace.SaveAs",SWITCH_TO:"Finsemble.Workspace.SwitchTo",IMPORT:"Finsemble.Workspace.Import",EXPORT:"Finsemble.Workspace.Export",REMOVE:"Finsemble.Workspace.Remove",SAVE_GLOBAL_DATA:"Finsemble.Workspace.SaveGlobalData",SAVE_VIEW_DATA:"Finsemble.Workspace.SaveViewData",GET_GLOBAL_DATA:"Finsemble.Workspace.GetGlobalData",GET_VIEW_DATA:"Finsemble.Workspace.GetViewData",GET_WORKSPACES:"Finsemble.Workspace.GetWorkspaces",GET_WORKSPACE_NAMES:"Finsemble.Workspace.GetWorkspaceNames",SET_WORKSPACE_ORDER:"Finsemble.Workspace.SetWorkspaceOrder",GET_ACTIVE_WORKSPACE:"Finsemble.Workspace.GetActiveWorkspace",GET_ACTIVE_WORKSPACE_DIRTY:"Finsemble.Workspace.GetActiveWorkspaceDirty",GET_TEMPLATES:"Finsemble.Workspace.GetTemplates",IMPORT_TEMPLATE:"Finsemble.Workspace.ImportTemplate",EXPORT_TEMPLATE:"Finsemble.Workspace.ExportTemplate",REMOVE_TEMPLATE:"Finsemble.Workspace.RemoveTemplate",SET_WINDOW_STATE:"Finsemble.Workspace.SetWindowData",GET_WINDOW_STATE:"Finsemble.Workspace.GetWindowData",ADD_WINDOW:"WorkspaceService.addWindow",REMOVE_WINDOW:"WorkspaceService.removeWindow"},DEFAULT_WINDOW_PROPS:["name","componentType","windowType","alwaysOnTop","autoShow","minWidth","minHeight","maxWidth","maxHeight","resizable","maximizable","minimizable","opacity","windowState","left","top","width","height","right","bottom","defaultLeft","defaultTop","defaultWidth","defaultHeight","defaultRight","defaultBottom","monitorInfo","icon","cachedBounds","showTaskbarIcon","isEvergreen","launchGroupComponentData"],ADDITIONAL_WINDOW_PROPS:{WebWindow:["url","fullscreen","frame","backgroundColor","transparent","waitForPageLoad","affinity","appUUID"],NativeWindow:["path","alias","arguments","argumentsAsQueryString","isWPF"],StackedWindow:["childWindowIdentifiers","visibleWindowIdentifier","bounds"]}},t.WINDOW_SERVICE_REQUESTS={REMOTE_FOCUS:"WindowService.remoteFocus",SET_ALWAYS_ON_TOP:"WindowService-Request-setAlwaysOnTop",IS_ALWAYS_ON_TOP:"WindowService-Request-isAlwaysOnTop"},t.COMPONENT_STATE_STORAGE_TOPIC="finsemble.componentStateStorage",t.HEARTBEAT_TIMEOUT_CHANNEL="Finsemble.WindowService.HeartbeatTimeout",t.LAUNCHER_SERVICE={WINDOW_CLOSED:"LauncherService.WindowClosed"},t.MOVE_REASON={AERO_KEY:"aero_key",SYSTEM_RESTORED:"system_restored"}},25495:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FSBLDependencyManagerSingleton=t.FSBLDependencyManager=void 0;const r=n(17187),o=i(n(11314)),s=n(26604),a=i(n(84795)),l=i(n(2518));class u extends r.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 d(){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 c{constructor(){this.servicesAreAllOnline={},this.clientsAreAllOnline={},this.onlineClients=[],this.dependencies={},this.startupTimers={},this.startupTimerFired=!1,this.bindCorrectContext()}waitFor(e,t,n){const i=d();e.clients||(e.clients=[]),e.clients.length&&(e.clients=e.clients.map((e=>e.charAt(0).toLowerCase()+e.slice(1))));const r=new u({dependencies:e,callback:t,whoAmI:n});return r.setStartupTimer(),r.on("timeout",(()=>{this.onDependencyTimeout(r)})),this.dependencies[i]=r,this.checkDependencies(),r}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(", ")}.`),l.default.system.warn(n),e.emit("err",n)}checkDependencies(){for(const e in this.dependencies){const t=this.dependencies[e],{dependencies:n,callback:i}=t;(!n.clients.length||this.clientsAreAllOnline[e]||(this.clientsAreAllOnline[e]=this.checkClients(n.clients),this.clientsAreAllOnline[e]))&&(delete this.dependencies[e],t.clearStartupTimer(),i&&i())}}getOfflineClients(){let e=[];for(const t in this.dependencies){const{dependencies:n}=this.dependencies[t];e=e.concat(n.clients.filter((e=>!this.onlineClients.includes(e))))}return e.filter(((t,n)=>e.indexOf(t)===n))}checkClients(e){return e.every((e=>this.onlineClients.includes(e)))}setClientOnline(e){this.onlineClients.includes(e)||(this.onlineClients.push(e),this.checkDependencies())}getOnlineClients(){return this.onlineClients}bindCorrectContext(){this.checkDependencies=this.checkDependencies.bind(this),this.checkClients=this.checkClients.bind(this),this.getOfflineClients=this.getOfflineClients.bind(this),this.onDependencyTimeout=this.onDependencyTimeout.bind(this),this.waitFor=this.waitFor.bind(this)}}class f{constructor(){this.offlineServices=[],this.dependencies={},this.checkDependencies=this.checkDependencies.bind(this)}waitFor(e,t){l.default.system.debug("DependencyManager:waitFor",e),e.services||(e.services=[]);const n=d();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];(l.default.system.debug("DependencyManager:checkDependency",t.services,this.offlineServices),!t.services.length||this.checkServices(t.services))&&(console.debug("checkDependencies callback"),delete this.dependencies[e],n&&n())}}checkServices(e){return e.every((e=>this.offlineServices.includes(e)))}setServiceOffline(e){l.default.system.debug("setServiceOffline",e),console.debug("setServiceOffline",e),this.offlineServices.push(e),this.checkDependencies()}}class h extends r.EventEmitter{constructor(){super(),this.startup=new c,this.shutdown=new f,this.RouterClient=o.default,this.AuthorizationCompleted=!1,this.bindCorrectContext(),this.onAuthorizationCompleted(this.startup.checkDependencies),o.default.onReady(this.listenForServices)}bindCorrectContext(){this.listenForServices=this.listenForServices.bind(this),this.onAuthorizationCompleted=this.onAuthorizationCompleted.bind(this)}setClientOnline(e){this.startup.setClientOnline(e)}onServiceStateChange(e){Object.keys(e).forEach((t=>{const{state:n}=e[t];"closed"===n&&this.shutdown.setServiceOffline(t)}))}listenForServices(){l.default.system.debug("DependencyManager:listenForServices before wait"),a.default.waitForBootStage("kernel","stageEntered",(()=>{l.default.system.debug("DependencyManager:listenForServices after wait"),this.RouterClient.subscribe(s.SERVICES_STATE_CHANNEL,((e,t)=>{l.default.system.debug("DependencyManager:listenForServices SERVICES_STATE_CHANNEL",t.data),this.onServiceStateChange(t.data)})),this.RouterClient.addListener(s.SERVICE_CLOSED_CHANNEL,((e,t)=>{l.default.system.debug("DependencyManager:listenForServices SERVICE_CLOSED_CHANNEL",t.data);const n={};n[t.data.name]={state:"closed"},this.onServiceStateChange(n)})),this.RouterClient.subscribe(s.APPLICATION_STATE_CHANNEL,((e,t)=>{"closing"===t.data.state&&this.shutdown.checkDependencies()}))}))}onAuthorizationCompleted(e){this.AuthorizationCompleted?e():this.addListener("AuthorizationCompleted",e)}}t.FSBLDependencyManager=h,t.FSBLDependencyManagerSingleton=new h,t.default=t.FSBLDependencyManagerSingleton},252:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.checkDeprecatedConfigs=t.isEqualIgnoringArrayOrder=t.sleep=t.checkIfBoundsAreEqual=t.isStackedWindow=t.wrapWithTimeout=t.timeoutPromise=t.getRandomWindowName=t.composeRL=t.promisify=t.identity=t.Timeout=t.fastClone=t.isServiceInWindow=t.iAmAServiceWindow=t.guuid=void 0;const r=n(21614),o=i(n(27361)),s=i(n(78718)),a=i(n(18446)),l=i(n(28368)),u=n(64324),d=i(n(2518)),c=n(44137);function f(e,t){return new Promise(((n,i)=>{const r=setTimeout((()=>{clearTimeout(r),i(t)}),e)}))}function h(e,t,n){return`${e}.${t}.${n}`}function p(e,t,n){const i=`${h(e.baseString,e.newPath,e.newValue)}`;d.default.system.deprecated(`${h(e.baseString,t,n)} has been deprecated in favor of ${i}`)}t.guuid=function(){return(0,r.v4)()},t.iAmAServiceWindow=function(){return!(!c.Globals.finsembleServices||!c.Globals.finsembleServices.length)},t.isServiceInWindow=function(e){return c.Globals.finsembleServices&&c.Globals.finsembleServices.find((t=>t.name===e))},t.fastClone=e=>{if(!e)return e;if(Array.isArray(e))return e.slice();try{return JSON.parse(JSON.stringify(e))}catch(e){return d.default.error("disentangledUtils: clone error",e),e}},t.Timeout=class{constructor(e,t){this.fired=!1,this.id=setTimeout((()=>{e(),this.fired=!0}),t),this.clear=this.clear.bind(this),this.didFire=this.didFire.bind(this)}clear(){this.fired||clearTimeout(this.id)}didFire(){return this.fired}},t.identity=function(e){return e},t.promisify=function(e,t){return function(){const n=Array.prototype.slice.call(arguments);return new Promise(((i,r)=>{n.push(((e,t)=>e?r(e):i(t))),e.apply(t,n)}))}},t.composeRL=(...e)=>e.reduce(((e,t)=>(...n)=>e(t(...n)))),t.getRandomWindowName=function(e="RouterClient"){return`${e}-${(0,r.v4)()}`},t.timeoutPromise=f,t.wrapWithTimeout=function(e,t,n){return Promise.race([e,f(t,n)])},t.isStackedWindow=function(e){return e&&"StackedWindow"===((0,o.default)(e,"windowIdentifier.windowType")||e.windowType)},t.checkIfBoundsAreEqual=function(e,t){if(!e||!t)return!1;const n=["left","right","top","bottom","width","height"],i=(0,s.default)(e,n),r=(0,s.default)(t,n);return!!(0,a.default)(i,r)},t.sleep=function(e,t=!1){return new Promise(((n,i)=>{t?setTimeout((()=>{try{i("timeout expired")}catch(e){}}),e):setTimeout(n,e)}))},t.isEqualIgnoringArrayOrder=(e,n)=>{const i=(0,t.fastClone)(e),r=(0,t.fastClone)(n);return(0,l.default)(i,r,((e,t)=>{if(Array.isArray(e)&&Array.isArray(t))return(0,l.default)(e.sort(),t.sort())}))},t.checkDeprecatedConfigs=function(e,t,n){const{baseString:i,oldPath:r,newPath:o,oldValue:s,newValue:a}=t;let l=u.ConfigUtilInstance.getDefault(e,h(i,o,a),null);return null===l&&(l=u.ConfigUtilInstance.getDefault(e,h(i,o,s),null),l?p(t,o,s):(l=u.ConfigUtilInstance.getDefault(e,h(i,r,a),null),l?p(t,r,a):(l=u.ConfigUtilInstance.getDefault(e,h(i,r,s),null),l?p(t,r,s):l=n))),l}},28936:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=n(11314),a=o(n(26604));t.default=class{constructor(e,t){var n;this.allowDelay=!1,this.delayed=!1,this.allowCancel=!1,this.canceled=!1,this.completed=!1,this.event=e.event,this.source=e.source,this.sourceType=e.sourceType,this.listenerGuid=e.listenerGuid,a[this.sourceType.toUpperCase()]&&a[this.sourceType.toUpperCase()].DELAYABLE_EVENTS.includes(this.event)&&(this.allowDelay=!0),a[this.sourceType.toUpperCase()]&&a[this.sourceType.toUpperCase()].CANCELABLE_EVENTS.includes(this.event)&&(this.allowCancel=!0),this.handler=e.handler,this.queryMessage=t,this.guid=null===(n=null==t?void 0:t.data)||void 0===n?void 0:n.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,{delayed:!0})):this.done()}done(e){var t;this.completed=!0,this.delayed?s.RouterClient.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})}}},23893:function(e,t,n){"use strict";var i,r=this&&this.__classPrivateFieldSet||function(e,t,n,i,r){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?r.call(e,n):r?r.value=n:t.set(e,n),n},o=this&&this.__classPrivateFieldGet||function(e,t,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(e):i?i.value:t.get(e)},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=s(n(11314)),l=s(n(2518)),u=s(n(9060)),d=s(n(27102)),c=n(252),f=n(26604);class h extends u.default{constructor(e){super(e),i.set(this,void 0),this.eventList=[],this.eventInternalHandlerMap={},this.remoteListenerEventMap={},this.windowToGuidsMap={},this.waitList={},this.unsubscribes=[],this.unsubscribes.push(a.default.addListener(`Finsemble.RegisterInterruptibleEvent.${this.name}`,((e,t)=>{this.registerRemoteEventHandler(t.data.event,t.data.listenerGuid,t.data.windowName)}))),this.unsubscribes.push(a.default.addListener(`Finsemble.UnregisterInterruptibleEvent.${this.name}`,((e,t)=>{this.unregisterRemoteEventHandler(t.data.event,t.data.listenerGuid,t.data.windowName)}))),r(this,i,a.default.addListener(f.LAUNCHER_SERVICE.WINDOW_CLOSED,((e,t)=>{if(e)l.default.system.error(`PrivateEventManager: Error listening for ${f.LAUNCHER_SERVICE.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 i;this.remoteListenerEventMap[e]||(this.remoteListenerEventMap[e]=[]),this.remoteListenerEventMap[e].push(t),this.windowToGuidsMap[n]=[t].concat(null!==(i=this.windowToGuidsMap[n])&&void 0!==i?i:[])}unregisterRemoteEventHandler(e,t,n){var i;this.remoteListenerEventMap[e]?(this.remoteListenerEventMap[e]=this.remoteListenerEventMap[e].filter((e=>e!==t)),this.windowToGuidsMap[n]=(null!==(i=this.windowToGuidsMap[n])&&void 0!==i?i:[]).filter((e=>e!==t)),0===this.windowToGuidsMap[n].length&&delete this.windowToGuidsMap[n]):this.windowToGuidsMap[n]&&l.default.system.warn(`PrivateEventManager.unregisterListener() attempt to remove unregistered event "${e}" for window ${n}`)}awaitRemoteDelayer(e,t){return new Promise(((n,i)=>{const r=(o,s)=>{a.default.removeListener(`Finsemble.Listener.Done.${e}.${t}`,r),!0===s.data.canceled?i("canceled"):n(s.data.data)};this.waitList[e]=r,a.default.addListener(`Finsemble.Listener.Done.${e}.${t}`,r)}))}async queryRemoteListener(e,t,n,i){const r=`${this.name}_private_${Date.now()}_${Math.random()}`,o={event:e,guid:r,data:n},s=this.awaitRemoteDelayer(r,t),{err:l,response:u}=await Promise.race([a.default.query(`Finsemble.Interrupt.${t}`,o,{timeout:0,logWhenNoResponder:!1},(()=>{})),(0,c.sleep)(i.initialQueryTimeout,!0)]).catch((()=>{throw a.default.removeListener(`Finsemble.Listener.Done.${r}.${t}`,this.waitList[r]),"eventHandler failed initial response"}));if(l||!u.data)return;let d=!0;if(!0===u.data.delayed)try{return d=!1,await Promise.race([s,(0,c.sleep)(i.timeout,!0)])}catch(e){if("timeout expired"!==e)throw"event was canceled";d=!0}if(d&&a.default.removeListener(`Finsemble.Listener.Done.${r}.${t}`,this.waitList[r]),!0===u.data.canceled)throw"event was canceled";return u.data.data}async trigger(e,t=null,n={initialQueryTimeout:1e3,timeout:1e4}){l.default.verbose(`Triggering ${e} for ${this.name}`,t);const i=[];if(this.remoteListenerEventMap[e])for(let r of this.remoteListenerEventMap[e])i.push(this.queryRemoteListener(e,r,t,n));this.handlers.filter((t=>t.event===e)).forEach((n=>{const r=new d.default({source:this.name,sourceType:this.sourceType,handler:n.handler,event:e,data:t,guid:n.listenerGuid});i.push(r.complete)}));try{return await Promise.all(i)}catch(t){if("eventHandler failed initial response"!==t)throw"event was canceled";console.debug(`No response for interupt on event ${e}. Window is probably already closed.`)}}addEventListener(e,t){l.default.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){l.default.system.debug("PrivateEventManager.removeEventListener:",e);const n=this.handlers.findIndex((n=>n.event===e&&n.handler===t));-1!=n?this.handlers.splice(n,1):l.default.system.warn(`PrivateEventManager.removeEventListener() attempt to remove unregistered event "${e}"`)}cleanup(){o(this,i,"f")&&o(this,i,"f").call(this),this.unsubscribes.forEach((e=>{e()})),this.unsubscribes=[]}}i=new WeakMap,t.default=h},27102:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=o(n(26604));t.default=class{constructor(e){this.allowDelay=!1,this.delayed=!1,this.allowCancel=!1,this.canceled=!1,this.completed=!1,this.event=e.event,this.source=e.source,this.sourceType=e.sourceType,this.data=e.data,this.guid=e.guid,s[this.sourceType.toUpperCase()]&&s[this.sourceType.toUpperCase()].DELAYABLE_EVENTS.includes(this.event)&&(this.allowDelay=!0),s[this.sourceType.toUpperCase()]&&s[this.sourceType.toUpperCase()].CANCELABLE_EVENTS.includes(this.event)&&(this.allowCancel=!0),this.handler=e.handler,this.complete=new Promise(((e,t)=>{this.eventCanceled=t,this.eventComplete=e})),this.internalHandler()}async internalHandler(){this.handler&&await this.handler(this),this.delayed||this.canceled||this.completed||this.done()}cancel(){this.allowCancel&&(this.canceled=!0,this.done())}wait(){this.allowDelay?this.delayed=!0:this.done()}done(e){this.completed=!0,this.canceled?this.eventCanceled&&this.eventCanceled():this.eventComplete&&this.eventComplete(e)}}},9060:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=i(n(11314)),o=i(n(2518)),s=i(n(28936));t.default=class{constructor(e){var t;this.eventList=[],this.cleanedUp=!1,this.openResponders=[],this.handlers=[],this.name=e.name,this.thisWindowName=window.name,this.sourceType=null!==(t=e.sourceType)&&void 0!==t?t:"undefined",window.addEventListener("beforeunload",(()=>{this.cleanup()}))}addListener(e,t){return this.addEventListener(e,t)}removeListener(e,t){return this.removeEventListener(e,t)}addEventListener(e,t){o.default.system.debug("PublicEventmanager.addEventListener:",e);const n=`${this.name}_public_${Date.now()}_${Math.random()}`;this.handlers.push({event:e,handler:t,listenerGuid:n}),r.default.transmit(`Finsemble.RegisterInterruptibleEvent.${this.name}`,{event:e,listenerGuid:n,windowName:this.thisWindowName});const i=`Finsemble.Interrupt.${n}`;return r.default.addResponder(i,((i,r)=>{new s.default({source:this.name,sourceType:this.sourceType,listenerGuid:n,handler:t,event:e},r)})),this.openResponders.push(i),()=>{this.removeEventListener(e,t)}}removeEventListener(e,t,n=!0){if(o.default.system.debug("PublicEventManager.removeEventListener:",e),this.cleanedUp)return;const i=this.handlers.findIndex((n=>n.event===e&&n.handler===t));if(-1===i)return void(n&&o.default.system.warn(`PublicEventManager.removeEventListener() attempt to remove unregistered event "${e}"`));const{listenerGuid:s}=this.handlers[i];r.default.transmit(`Finsemble.UnregisterInterruptibleEvent.${this.name}`,{event:e,listenerGuid:s,windowName:this.thisWindowName}),r.default.removeResponder(`Finsemble.Interrupt.${s}`),this.handlers.splice(i,1)}cleanup(){this.cleanedUp=!0,this.handlers=[],this.openResponders.forEach((e=>{r.default.removeResponder(e)}))}}},78268:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=i(n(2518)),o=n(91374),s={},a={activeTransports:{},liveTransport:null,setTransports(){a.addTransport("SharedWorker",s.SharedWorkerTransport),a.addTransport("IPCBus",s.IPCTransport),a.addTransport("FinsembleTransport",s.FinsembleTransport)},addTransport(e,t){this.activeTransports[e]=t},getActiveTransports(e){const t=[],n=e=>{-1===t.indexOf(e)&&t.push(e)};return o.System.InterApplicationBus&&n("IPCBus"),n("FinsembleTransport"),SharedWorker&&n("SharedWorker"),n(e.sameDomainTransport),n(e.crossDomainTransport),r.default.system.log("getActiveTransports",t),t},getTransport:(e,t,n,i,o)=>new Promise(((s,l)=>{const u=a.activeTransports[t];if(u)a.liveTransport=new u(e,n,i,o,(e=>{s(e)}));else{const e=`routerTransport.getTransport() Unknown router transport name: ${t}`;r.default.warn(e),l(e)}})),close(){a.liveTransport&&(a.liveTransport.close(),a.liveTransport=null)}};s.SharedWorkerTransport=function(e,t,n,i,o){let s;this.send=function(e,t){1===arguments.length?(t=arguments[0],e=null):(e=arguments[0],t=arguments[1]),r.default.system.verbose("SharedWorkerTransport Outgoing Transport",t);try{s.port.postMessage([e,t])}catch(e){r.default.system.error(`SharedWorkerTransport: post message failed: ${JSON.stringify(e)}`,"Probable cause is sending illegal data type (e.g. function).")}},this.identifier=()=>"SharedWorker";const a=e.transportSettings.SharedWorker&&e.transportSettings.SharedWorker.workerPath?e.transportSettings.SharedWorker.workerPath:`${e.routerDomainRoot}/common/routerSharedWorker.js`;r.default.console.log(`SharedWorker Transport Initializing for ${n} using ${a}`),s=new SharedWorker(a,{name:"Finsemble",credentials:"include"}),s.port.onmessage=e=>{const n=e.data[0],i=e.data[1],o={transportID:this.identifier(),port:n};r.default.system.verbose("SharedWorkerTransport Incoming Transport",o,"Message",i),t(o,i)},s.onerror=e=>{r.default.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==o||o(this)},s.IPCTransport=function(e,t,n,i,s){this.send=function(e,t){let n;1===arguments.length?(n=i,t=arguments[0]):(n=e.name,t=arguments[1]),r.default.system.verbose("IPCTransport Outgoing Transport",n,"Message",t),o.System.InterApplicationBus.publish(n,t,(()=>{}),(()=>{}))},this.identifier=()=>"IPCBus",r.default.console.log(`IPCBus Transport Initializing for ${n}`);const a=o.System.InterApplicationBus.subscribe("*",n,(e=>{const n={transportID:this.identifier(),name:e.header.origin};r.default.system.verbose("IPCTransport Incoming Transport",n,"Message",e),t(n,e)}),(()=>{}),(e=>r.default.console.error(`IPCBus Subscribe Failure: ${e}`)));this.close=()=>o.System.InterApplicationBus.unsubscribe(a),null==s||s(this)},s.FinsembleTransport=function(e,t,n,i,o){var s,a,l,u,d;const c=`${null!==(d=null!==(l=null===(a=null===(s=null==e?void 0:e.transportSettings)||void 0===s?void 0:s.FinsembleTransport)||void 0===a?void 0:a.serverAddress)&&void 0!==l?l:null===(u=null==e?void 0:e.transportSettings)||void 0===u?void 0:u.serverAddress)&&void 0!==d?d:"ws://127.0.0.1:3376"}/router`;let f;const h=e=>{const n={transportID:this.identifier(),client:e.clientMessage.header.origin};r.default.system.verbose("FinsembleTransport Incoming Transport",n,"Message",e),t(n,e.clientMessage)},p=()=>{r.default.console.error(`FinsembleTransport Connection Timeout for ${n}`),null==o||o(this)},g=()=>{r.default.console.log(`FinsembleTransport Transport Initializing for ${n} using ${c}`),c.startsWith("ws:")||c.startsWith("wss:")||r.default.system.error(`Illegal WebSocket address "${c}" (Missing ws:// or wss:// ?)`),f=new WebSocket(c);const e=setTimeout(p,3e3);f.addEventListener("open",(()=>{clearTimeout(e),r.default.console.log("FinsembleTransport connected to server"),f.addEventListener("message",(e=>{const t=JSON.parse(e.data);(n===t.message.client||"RouterService"===n&&"ROUTER_SERVICE"==t.dest)&&h(t.message)})),null==o||o(this)}))};this.send=function(e,t){let n,i;1===arguments.length?(n="ROUTER_SERVICE",i={clientMessage:t=arguments[0]}):(n="ROUTER_CLIENT",t=arguments[1],i={client:e.client,clientMessage:t}),r.default.system.verbose("FinsembleTransport Outgoing Transport",n,"NewMessage",i),f.readyState===WebSocket.OPEN&&f.send(JSON.stringify({dest:n,message:i})),f.readyState===WebSocket.CONNECTING&&f.addEventListener("open",(()=>{f.send(JSON.stringify({dest:n,message:i}))})),f.readyState===WebSocket.CLOSED&&(g(),f.addEventListener("open",(()=>{f.send(JSON.stringify({dest:n,message:i}))}))),f.readyState===WebSocket.CLOSING&&(f.onclose=()=>{g(),f.addEventListener("open",(()=>{f.send(JSON.stringify({dest:n,message:i}))}))})},this.identifier=()=>"FinsembleTransport",this.close=()=>f.close(),g()},t.default=a},31482:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkForObjectChange=t.mapField=t.initObject=t.setPath=t.byString=void 0,t.byString=(e,t)=>{const n=(t=t.replace(/^\./,"")).split(/\.(?![^[]*])/g);for(let t=0;t<n.length;++t){const i=n[t].replace(/[["\]]/g,"");if(!e)return null;if("string"==typeof e)return null;if(!(i in e))return null;e=e[i]}return e},t.setPath=(e,t,n)=>t.split(".").reduce(((e,i)=>e[i]=t.split(".").pop()===i?n:e[i]||{}),e),t.initObject=function e(t,n,i){let r;if(n||(n=null),"object"!=typeof t)return r=n?`${n}.${t}`:t,void(i[r]=n);for(const o in t)"object"==typeof t[o]&&"undefined"!==t[o]?(r=n?`${n}.${o}`:o,i[r]=n,e(t[o],r,i)):(r=n?`${n}.${o}`:o,i[r]=n)},t.mapField=(e,n,i)=>{if(i[n])return;const r=(n=(n=n.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"")).split("."),o=n;if(!i.hasOwnProperty(o)){let e=null;r.length>1&&(r.pop(),e=r.join(".")),i[o]=e}const s=(0,t.byString)(e,o);if("undefined"!==s&&"object"==typeof s)for(const n in s)(0,t.mapField)(e,`${o}.${n}`,i)};t.checkForObjectChange=(e,n,i)=>{const r=(0,t.byString)(e,n);return null!==r&&("object"==typeof r||"object"!=typeof r&&"object"==typeof n?((e,t)=>{const n=[];for(const i in e){const r=`${t}.`;i.includes(r)&&(n.push(i),delete e[i])}return n})(i,n):null)}},91374:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.System=void 0;const i=n(10166),r=n(2518),o=n(11314);class s{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 a{static createNew(e,t){t("Cannot create freestanding windows")}static getCurrent(){const{windowName:e}=i.Startup.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 l{constructor(){return new fin.desktop.System.Clipboard}static writeText(e,t,n,i){return r.Logger.deprecated("FSBL.System.Clipboard.writeText is deprecated"),fin.desktop.System.Clipboard.writeText(e,t,n,i)}static writeHTML(e,t,n,i){return r.Logger.deprecated("FSBL.System.Clipboard.writeHTML is deprecated"),fin.desktop.System.Clipboard.writeHTML(e,t,n,i)}static writeRTF(e,t,n,i){return r.Logger.deprecated("FSBL.System.Clipboard.writeRTF is deprecated"),fin.desktop.System.Clipboard.writeRTF(e,t,n,i)}static readText(e,t,n){return r.Logger.deprecated("FSBL.System.Clipboard.readText is deprecated"),fin.desktop.System.Clipboard.readText(e,t,n)}static readHTML(e,t,n){return r.Logger.deprecated("FSBL.System.Clipboard.readHTML is deprecated"),fin.desktop.System.Clipboard.readHTML(e,t,n)}static readRTF(e,t,n){return r.Logger.deprecated("FSBL.System.Clipboard.readRTF is deprecated"),fin.desktop.System.Clipboard.readRTF(e,t,n)}}class u{static get Application(){return{getCurrent:()=>(r.Logger.deprecated("FSBL.System.Application is deprecated"),{restart:()=>{o.RouterClient.transmit("Application.restart",{})},getWindow:()=>fin.desktop.Window,addEventListener:(e,t,n,i)=>{fin.desktop.Window.addEventListener(e,t,n,i)},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)=>{u.getManifest(e)},getParentUuid:(e,t)=>{null==e||e("Finsemble")},getInfo:(e,t)=>{u.getVersion(e)},getTrayIconInfo:(e,t)=>{null==e||e({})},isRunning:(e,t)=>{null==e||e(!0)},registerUser:(e,t,n,i)=>{null==n||n()},removeEventListener:(e,t,n,i)=>{fin.desktop.Window.removeEventListener(e,t,n,i)},removeTrayIcon:(e,t)=>{fin.desktop.Window.removeTrayIcon(e,t)},run:(e,t)=>{},scheduleRestart:(e,t)=>{null==e||e()},setTrayIcon:(e,t,n,i)=>{fin.desktop.Window.setTrayIcon(e,t,n,i)},terminate:(e,t)=>{u.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 u.isFreestanding()?a:s}static get Notification(){return{send:e=>{fin.desktop.Notification.send(e)}}}static get Clipboard(){return l}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!u.isFreestanding()&&fin.isBrowserView()}static getViewId(){return r.Logger.deprecated("FSBL.system.getViewId() is deprecated. Use FSBL.system.getWebContentsId()"),fin.getWebContentsId()}static getWebContentsId(){return fin.getWebContentsId()}static hasBrowserView(){return r.Logger.deprecated("FSBL.system.hasBrowserView() is deprecated. Use FSBL.system.isTitlebarWindow()"),u.isTitlebarWindow()}static isTitlebarWindow(){return!u.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 get clearCache(){return fin.desktop.System.clearCache}static get showDeveloperTools(){return fin.desktop.System.showDeveloperTools}static get addEventListener(){return u.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 startupApplicationHandshake(){fin.desktop.System.startupApplicationHandshake&&fin.desktop.System.startupApplicationHandshake()}static terminate(){fin.desktop.System.terminate()}static restart(){fin.desktop.System.restart()}}t.System=u},84795:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=i(n(11314)),o=i(n(2518)),s=n(53912),a=n(38144),l=n(37331),u=new class{publishBootStatus(e,t,n,i){o.default.system.debug("publishBootStatus",e,t,n),r.default.publish((0,l.statusChannel)(e),{name:e,type:t,state:n,error:i})}waitForBootStage(e,t,n=Function.prototype){return new Promise(((i,l)=>{o.default.system.debug("SystemManagerClient.waitForBootStage entry",e,t);const u=s.ALL_BOOT_STAGES.indexOf(e);"microkernel"===e&&"stageEntered"===t&&o.default.system.error("Cannot wait on `stageEntered` for microkernel because router isn't up yet. So will instead wait for microkernal stage complete.");const d=r.default.subscribe(a.STAGE_CHANNEL,((a,c)=>{if(o.default.system.debug("SystemManagerClient.waitForBootStage new stage",c.data.stage,d),a)o.default.system.error("SystemManagerClient.waitForBootStage subscribe error",a),n(a),l(a);else if(-1===u)a="illegal stage argument",o.default.system.debug("SystemManagerClient.waitForBootStage subscribe error",a,e),n(a),l(a);else{const a=s.ALL_BOOT_STAGES.indexOf(c.data.stage);o.default.system.debug("SystemManagerClient.waitForBootStage new stage",c.data,d),"stageEntered"===t&&a+1>=u?(o.default.system.debug("SystemManagerClient.waitForBootStage stageEntered",e,d,n.name),n(),i(),r.default.unsubscribe(d)):"stageCompleted"===t&&a>=u?(o.default.system.debug("SystemManagerClient.waitForBootStage completed",e,d),n(),i(),r.default.unsubscribe(d)):o.default.system.debug(`SystemManagerClient.waitForBootStage else currentStageIndex=${a} stageIndex=${u} `,a,u,e,d)}}))}))}waitForStartup(e,t=Function.prototype){return new Promise(((n,i)=>{o.default.system.debug(`SystemManagerClient.waitForStartup.${e}`,e);const s=r.default.subscribe((0,l.statusChannel)(e),((a,l)=>{o.default.system.debug("SystemManagerClient.waitForStartup subscribe",e,a,l),a?(o.default.system.error("SystemManagerClient.waitForStartup subscribe error",a),t(a),i()):l.data.name===e&&"completed"===l.data.state&&(o.default.system.debug("SystemManagerClient.waitForStartup completed",e),t(),n(),r.default.unsubscribe(s))}))}))}publishCheckpointState(e,t,n){o.default.system.debug("publishCheckpoint",e,t,n,(0,l.checkpointChannel)(e,t)),r.default.publish((0,l.checkpointChannel)(e,t),{windowName:e,checkpointName:t,state:n})}showSystemLog(){o.default.system.debug("SystemManagerClient.showSystemLog"),r.default.transmit(a.SHOW_SYSLOG_CHANNEL,!0)}systemLog(e,t){o.default.system.debug("SystemManagerClient.systemLog",e,t),r.default.transmit(a.SYSLOG_CHANNEL,{params:e,logMessage:t})}};t.default=u},65582:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SystemSettings=void 0;class n{constructor(){this.currentDiagLevel=3}diagLevel(){return this.currentDiagLevel}setDiagLevel(e){this.currentDiagLevel=e}validationEnabled(){return this.currentDiagLevel>=4}}t.SystemSettings=n,t.default=new n},16994:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.UserNotification=void 0;const r=i(n(2518)),o=n(64324),s=n(91374),a=i(n(84795));let l=null;t.UserNotification=function(){const e={},t={};let i=null;this.getDefaultTemplateURL=function(e){i?setTimeout((()=>{e(i)}),0):(l||(l=n(9381).default),l.getValue({field:"finsemble"},((t,n)=>{i=o.ConfigUtilInstance.getDefault(n,"finsemble.notificationURL",`${n.moduleRoot}/components/system/notification/notification.html`),e(i)})))},this.alert=function(e,t,n,i,r){const o=this;r&&r.url?this.alertInternal(e,t,n,i,r,r.url):this.getDefaultTemplateURL((s=>{o.alertInternal(e,t,n,i,r,s)}))},this.alertInternal=function(n,i,o,l,u,d){let c=!1;const f=`UserNotification.alert.${o}`,h=(u=u||{}).duration||864e5;switch(i){case"ONCE-SINCE-STARTUP":f in e?c=!1:(c=!0,e[f]=!0);break;case"MAX-COUNT":{let e=0;const n=u.maxCount||1;f in t&&(e=t[f]),t[f]=++e,e<=n&&(c=!0);break}default:c=!0}if(r.default.log("UserNotification.alert",n,c,i,o,l,u),c){const e=Object.assign(Object.assign({url:d,message:l,timeout:h},u),{devModeOnly:"devModeOnly"===n});a.default.systemLog({notification:!0},`Notification: ${l}`),s.System.Notification.send(e)}}},t.default=new t.UserNotification},23099:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.windowNameFromRouterHeader=t.getWindowType=t.isWindows=t.injectJS=t.camelCase=t.getMyWindowIdentifier=t.getWindowDescriptor=t.getFinWindow=t.crossDomain=t.isPercentage=t.clone=void 0;const r=n(91374),o=i(n(2518));function s(e,t){return new Promise(((n,i)=>{const o=r.System.Window.getCurrent();if(null==e?void 0:e.windowName)try{const i=r.System.Window.wrap(e.windowName);null==t||t(i),n(i)}catch(n){null==t||t(null),i(`Window ${e.windowName} not found. UUID: ${e.uuid}`),console.debug(`util.getFinWindow: Window ${e.windowName} not found`)}else if(null==e?void 0:e.componentType){const r="LauncherService";if(void 0!==window[r]){const o=window[r].componentFinder(e);o?(n(o),null==t||t(o)):(i(`util.getFinWindow: Component ${e.componentType} not found.`),null==t||t(null))}else i("getFinWindow by componentType is currently only operable within LaunchService"),null==t||t(null)}else null==t||t(o),n(o)}))}t.clone=function e(t,n={}){if(null===t||"object"!=typeof t)return t;if(t.constructor==Date||t.constructor==RegExp||t.constructor==Function||t.constructor==String||t.constructor==Number||t.constructor==Boolean)return new t.constructor(t);n=n||new t.constructor;for(const i in t)n[i]=void 0===n[i]?e(t[i],null):n[i];return n},t.isPercentage=function(e){return"string"==typeof e&&-1!==e.indexOf("%")},t.crossDomain=function(e){const t=document.createElement("a");t.href=e;const n=window.location.hostname===t.hostname,i=window.location.protocol===t.protocol,r=(void 0!==window.location.port?window.location.port:80)===(void 0!==t.port?t.port:80),s=!(n&&r&&i);return o.default.system.debug(`Launcher crossDomain=${s} (${n}:${i}:${r})`),s},t.getFinWindow=s,t.getWindowDescriptor=function(e,t){return new Promise(((n,i)=>{s(e).then((e=>{e.getOptions((e=>{null==t||t(e),n(e)}))})).catch((e=>{console.warn(e),null==t||t(null),i(e)}))}))},t.getMyWindowIdentifier=e=>{const t=r.System.Window.getCurrent();return new Promise((n=>{t.getOptions((i=>{let r=null;const{customData:o}=i;o&&o.component&&(r=o.component.type);const s={windowName:t.name,componentType:r};null==e||e(s),n(s)}))}))},t.camelCase=function(...e){let t="";for(let n=0;n<e.length;n++)t=`${t} ${e[n]}`;return t.replace(/\s(.)/g,(e=>e.toUpperCase())).replace(/\s/g,"").replace(/^(.)/,(e=>e.toLowerCase()))},t.injectJS=function(e,t){const n=document.createElement("script");t&&(n.onload=t),n.type="text/javascript",n.async=!0,n.src=e;const i=document.getElementsByTagName("head")[0],r=i.getElementsByTagName("script")[0];i.insertBefore(n,r)},t.isWindows=async function(e){const t=(await r.System.getHostSpecs()).name.toUpperCase().includes("WINDOWS");return null==e||e(t),t},t.getWindowType=function(e){const t="WebWindow";if(e.windowType&&!["assimilation","assimilated","native","application","NativeWindow","FinsembleNativeWindow","CompoundWindow","WebWindow","WebApplication","StackedWindow"].includes(e.windowType))return o.default.system.error(`Invalid windowType: ${e.windowType}, defaulting to windowType: WebWindow`),t;let n=e.windowType||t;switch(e.windowType){case"assimilation":case"assimilated":n="NativeWindow";break;case"native":n="FinsembleNativeWindow";break;case"application":n="WebApplication";break;case"Web":n="WebWindow";break;case"StackedWindow":n="StackedWindow"}return e.native&&(n="NativeWindow"),e.compound&&(n="CompoundWindow"),n},t.windowNameFromRouterHeader=e=>{let t,n=/\.(.*)\./s;try{t=e.origin.match(n)[1]}catch(n){t=e.origin.split(".")[1]}return t}},20670:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Validate=void 0;const r=i(n(65582));class o{warningMsg(e,t,n){const i=function(){try{throw Error("")}catch(e){return e}}();if(i.stack){const r=i.stack.split("\n")[5],o=r.indexOf("at "),s=r.slice(o+2,r.length),a=i.stack.split("\n")[6],l=a.indexOf("at "),u=a.slice(l+2,a.length);console.warn(`parameter validation failed: parameter ${e} is of type '${typeof t}' but should be of type '${n}' in${s} called by${u}`)}else console.warn(`parameter validation failed: parameter ${e} is of type '${typeof t}' but should be of type '${n}' inunknown called byunknown`)}args(...e){if(!r.default.validationEnabled())return!0;const t=e.length;if((t+1)%2!=0)for(let n=0;n<t;n+=2){let t=!1;const i=e[n];let r=e[n+1];"="===r.slice(-1)&&(r=r.slice(0,-1),t=!0);const o=void 0===i&&t,s=void 0!==i&&"any"===r;if(typeof i!==r&&!o&&!s){const e=""+(n/2+1);return this.warningMsg(e,i,r),!1}}else console.warn(`validate.args requires an even number of parameters: ${JSON.stringify(e)}`);return!0}args2(...e){if(!r.default.validationEnabled())return!0;const t=e.length;if((t+1)%3!=0)for(let n=0;n<t;n+=3){let t=!1;const i=e[n],r=e[n+1];let o=e[n+2];"="===o.slice(-1)&&(o=o.slice(0,-1),t=!0);const s=void 0===r&&t,a=void 0!==r&&"any"===o;if(typeof r!==o&&!s&&!a)return this.warningMsg(i,r,o),!1}else console.warn(`validate.args requires an even number of parameters: ${JSON.stringify(e)}`);return!0}}t.Validate=o,t.default=new o},766:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FinsembleView=void 0,t.FinsembleView=class{constructor(e){this.win=e.win,this.id=e.id}async remove(e=Function.prototype){await this.win.removeBrowserView(this,e)}async setBounds(e,t=Function.prototype){await this.win.setViewBounds({view:this,bounds:e},t)}async bringToFront(e=Function.prototype){await this.win.bringViewToFront(this,e)}}},24074:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return r(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FinsembleWindow=void 0;const a=n(11314),l=n(2518),u=o(n(23099)),d=s(n(9060)),c=n(26604),f=n(91374),h=n(766),p=n(44137),g=s(n(50361));class m extends d.default{constructor(e){super({name:e.name,sourceType:"Window"}),this.types={},this.wrapState=e.wrapState||"initializing",this.componentState={},this.windowState=c.WINDOWSTATE.NORMAL,this.type=null,this.windowType=null,this.bounds={},this.guid=`${Date.now()}_${Math.random()}`,this.WINDOWSTATE=c.WINDOWSTATE,this.windowOptions={},this.doConstruction(e),this.TITLE_CHANGED_CHANNEL=`Finsemble.${this.name}.titleChanged`,this.componentKey=u.camelCase("activeWorkspace",this.name,this.name),this.windowKey=u.camelCase("activeWorkspace",this.name),m.bindFunctions(this)}standardizeEventName(e){switch(e){case"bounds-set":case"stoppedMoving":return"bounds-change-end";case"startedMoving":return"bounds-change-start";case"bringToFront":return"broughtToFront";case"setParent":return"parent-set";case"clearParent":return"parent-unset";default:return e}}addEventListener(e,t){return e=this.standardizeEventName(e),super.addEventListener(e,t)}removeEventListener(e,t,n=!1){if("closed"!==e||!p.FEAGlobals.finsembleWindow||this.name!==p.FEAGlobals.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 m(e);if(e)for(const t in e)this[t]=e[t];this.name||(this.name=e.windowName),this.windowType=this.setWindowType}static registerType(e,t){const n=m;n.types||(n.types={}),n.types[e]=t}static bindFunctions(e){e.setParent=e.setParent.bind(e),e.getParent=e.getParent.bind(e),e.eventChannelName=e.eventChannelName.bind(e),e.windowServiceChannelName=e.windowServiceChannelName.bind(e),e.handleWrapRemoveRequest=e.handleWrapRemoveRequest.bind(e),e.reload=e.reload.bind(e)}static async createWrapFromUUIDAndName(e,t){var n;const{uuid:i,windowType:r}=t;if(!1!==t.waitForReady)try{await m._windowReady(e),t.wrapState="ready"}catch(e){return{err:e}}l.Logger.system.debug("WRAP LIFECYCLE:",e,"All information for wrap passed in, creating wrap locally");const o=m.cache[e];return o?(l.Logger.system.debug("WRAP LIFECYCLE:",e,"Window found in the cache, returning without going to the Launcher"),{data:o}):{data:(await m._createWrap(Object.assign(Object.assign({},t),{windowIdentifier:null!==(n=t.windowIdentifier)&&void 0!==n?n:{uuid:i,name:e,windowName:e,windowType:r}}))).wrap}}static getInstance(e,t){var n;const i=f.System.Window.getCurrent().name,r=null!==(n=null==(e=(0,g.default)(e))?void 0:e.windowName)&&void 0!==n?n:null==e?void 0:e.name;return new Promise((async(n,o)=>{if(!r){const e='"name" is a required param';return null==t||t(e),void o(e)}e.windowName=r;let s=m.cache[r];if(s)return l.Logger.system.debug("WRAP LIFECYCLE:",r,"Window found in the cache, returning without going to the Launcher"),null==t||t(null,s),void n({wrap:s});if(e.name){const{err:i,data:s}=await m.createWrapFromUUIDAndName(r,e);return i||!s?(null==t||t(i),void o(i)):(null==t||t(null,s),void n({wrap:s}))}if(!1!==e.waitForReady)try{await m._windowReady(r),e.wrapState="ready"}catch(u){return null==t||t(u,null),void o(u)}const{err:u,response:d}=await a.RouterClient.query("WindowService-Request-getWindowIdentifier",{windowName:r,requester:i});if(u)return l.Logger.system.error(u),null==t||t(u,null),void o(u);if(s=m.cache[r],s)return l.Logger.system.debug("WRAP LIFECYCLE:",e.name,"Information received from launcher, but wrap exists in cache. Returning cached wrap."),null==t||t(null,s),void n({wrap:s});l.Logger.system.debug("WRAP LIFECYCLE:",r,"Information received from launcher. Creating wrap.");const{identifier:c}=d.data;c.windowName&&(c.name=c.windowName),e.retrievedIdentifier=c,({wrap:s}=await m._createWrap(e)),d.data.descriptor&&(s.descriptor=d.data.descriptor),null==t||t(null,s),n({wrap:s})}))}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 i=Object.assign({},n);i=Object.assign(i,e),i.setWindowType=i.windowType,delete i.windowType,l.Logger.system.debug("WRAP LIFECYCLE: Placing wrap into the local cache.",n.windowName);let r=new m(i);m.cache[n.windowName]=r,r.windowType=n.windowType,r.identifier=n,r.addEventListener("closed",r.handleWrapRemoveRequest),r.addEventListener("maximized",(()=>{r.windowState=c.WINDOWSTATE.MAXIMIZED,r.windowOptions.windowState=c.WINDOWSTATE.MAXIMIZED})),r.addEventListener("minimized",(()=>{r.windowState===c.WINDOWSTATE.MAXIMIZED?(r.windowState=c.WINDOWSTATE.MINIMIZED_WAS_MAXIMIZED,r.windowOptions.windowState=c.WINDOWSTATE.MINIMIZED_WAS_MAXIMIZED):r.windowState===c.WINDOWSTATE.NORMAL?(r.windowState=c.WINDOWSTATE.MINIMIZED_WAS_NORMAL,r.windowOptions.windowState=c.WINDOWSTATE.MINIMIZED_WAS_NORMAL):l.Logger.system.warn("Invalid window state received listening to window minimize",r.windowState)})),r.addEventListener("restored",(()=>{r.windowState=c.WINDOWSTATE.NORMAL,r.windowOptions.windowState=c.WINDOWSTATE.NORMAL}));const o=a.RouterClient.subscribe(`Finsemble.Component.State.${n.windowName}`,((e,t)=>{if(e)l.Logger.system.error("Finsemble component state change error",e);else{const{state:e}=t.data;r.wrapState=e,a.RouterClient.unsubscribe(o)}}));await(async(e,t)=>new Promise((n=>{e.parentSubscribeID=a.RouterClient.subscribe(`Finsemble.parentChange.${t.windowName}`,(async(t,i)=>{if(t)l.Logger.system.error("FinsembleWindow parent change notification error",t);else{const t=i.data||{};"Added"===t.type?(l.Logger.system.debug("FinsembleWindow Parent Notification: window.addedToStack listener",t),await e.setParent(t.stackedWindowIdentifier)):"Exists"===t.type?(l.Logger.system.debug("FinsembleWindow Parent Notification: Parent already exists, checking if added to wrap",t),await e.setParentOnWrap(t.stackedWindowIdentifier)):"Removed"===t.type?(l.Logger.system.debug("FinsembleWindow Parent Notification: window.removedFromStack listener",t),e.clearParent()):t.type&&l.Logger.system.error("FinsembleWindow Parent Notification: unknown type",t)}n()}))})))(r,n),t({wrap:r})}))}static _getRemoveWrapChannel(e){return`${f.System.Window.getCurrent().name}.removeWrap.${e}`}async handleWrapRemoveRequest(e){e&&e.wait(),l.Logger.system.debug("WRAP Destructor. Removing cached window",this.name,"in ",window.name),this.removeListeners&&this.removeListeners(),this.cleanupRouter(),this.cleanup(),this.name!==p.FEAGlobals.name&&this.name&&delete m.cache[this.name],e&&e.done()}static closeAllWraps(){Object.values(m.cache).forEach((e=>{e.handleWrapRemoveRequest()}))}cleanupRouter(){const e=m._getRemoveWrapChannel(this.name);a.RouterClient.removeResponder(e),this.TITLE_CHANGED_SUBSCRIPTION&&a.RouterClient.unsubscribe(this.TITLE_CHANGED_SUBSCRIPTION),a.RouterClient.unsubscribe(this.parentSubscribeID)}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=Object.assign(Object.assign({},t),{windowIdentifier:this.identifier}),l.Logger.setting().system.Debug&&(t.callstack=l.Logger.callStack()),new Promise((async(i,r)=>{var o;if("close"!==e&&"setParent"!==e&&"ready"!==this.wrapState)return await this.onReady(),this.wrapState="ready",void i(await this.queryWindowService(e,t));l.Logger.system.debug("FinsembleWindow.queryWindowService",this.windowServiceChannelName(e),t);const{err:s,response:u}=await a.RouterClient.query(this.windowServiceChannelName(e),t);let d=null!==(o=u.data)&&void 0!==o?o:null;if(s){if(l.Logger.system.debug(`WindowService.${e}: failed`,s),console.debug(`WindowService.${e}: failed`,s),"getComponentState"!==e&&"Not found"!==s)return void r(s)}else l.Logger.system.debug(`${this.windowServiceChannelName(e)} successful`,d),console.debug(`${this.windowServiceChannelName(e)} successful`,d);i(d),n(s,d)}))}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(((i,r)=>{i||!r?l.Logger.system.warn(`Error getting bounds, cached bounds will not be set: ${i}`):this.updateOptions({options:{defaultLeft:r.left,defaultTop:r.top,defaultWidth:r.width,defaultHeight:r.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 i={ignore:new Boolean(e).valueOf(),options:new Boolean(t).valueOf()?t:{forward:!1}};this.queryWindowService("setIgnoreMouseEvents",i,n)}setShape(e,t=Function.prototype){this.queryWindowService("setShape",e,t)}async addBrowserView(e,t=Function.prototype){const n=await this.queryWindowService("addBrowserView",e,t);return new h.FinsembleView({id:n,win:this})}async removeBrowserView(e,t=Function.prototype){await this.queryWindowService("removeBrowserView",{viewId:e.id},t)}async bringViewToFront(e,t=Function.prototype){await this.queryWindowService("bringViewToFront",{viewId:e.id},t)}async setViewBounds(e,t=Function.prototype){await this.queryWindowService("setViewBounds",{viewId:e.view.id,bounds:e.bounds},t)}setBounds(e={bounds:{}},t){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 i="function"==typeof e?e:t;this.queryWindowService("getBounds",{},((e,t)=>{null==i||i(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,i)=>{null==t||t(e,i),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,i)=>{null==t||t(e,i),n({err:e})}))}))}showAt(e={},t=Function.prototype){this.queryWindowService("showAt",e,t)}close(e={},t){return new Promise((n=>{l.Logger.system.debug("WRAP CLOSE. Public close initiated for",this.name,e),this.queryWindowService("close",e,(e=>{l.Logger.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((()=>{a.RouterClient.query("DockingService.registerWindow",{type:this.type,windowType:this.windowType,windowMsg:e,name:this.windowName},t)}))}showNativeOpenDialog(e={},t){this.queryWindowService("showNativeOpenDialog",e,t)}unRegisterWithDocking(){a.RouterClient.transmit("DockingService.deregisterWindow",{name:this.windowName})}initializeWindow({manageWindowMovement:e,identifier:t},n=Function.prototype){const i=()=>{a.RouterClient.publish(`Finsemble.${this.windowName}.componentReady`,{name:this.windowName}),n()};e?this.registerWithDocking(t,i):i()}wrapReady(){a.RouterClient.publish(`Finsemble.${this.windowName}.wrapReady`,{name:this.windowName,state:"open"})}setOpacity(e,t=Function.prototype){this.queryWindowService("setOpacity",e,t)}startTabTileMonitoring(e={}){l.Logger.system.debug("FinsembleWindow.startTabTileMonitoring",e),a.RouterClient.transmit("TabTile.startTabTile",{params:e})}stopTabTileMonitoring(e={},t=Function.prototype){l.Logger.system.debug("FinsembleWindow.stopTabTileMonitoring",e),a.RouterClient.query("TabTile.stopTabTile",{params:e},(function(e,n){e?l.Logger.system.warn("TabTile.stopTabTile: query failed",e):l.Logger.system.debug("TabTile.stopTabTile results",n.data);const i=n.data;t?t(e,i,this.defaultStopTrackingAction):this.defaultTabTileAction(i)}))}defaultTabTileAction(e){const t=this;switch(l.Logger.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:l.Logger.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={}){l.Logger.system.debug("FinsembleWindow.startMove",e),e.windowIdentifier=this.identifier,a.RouterClient.transmit(this.eventChannelName("startedMoving"),{})}stopMove(e={}){l.Logger.system.debug("FinsembleWindow.stopMove",e),e.windowIdentifier=this.identifier,a.RouterClient.transmit(this.eventChannelName("stoppedMoving"),{})}getMonitor(e){a.RouterClient.query("DockingService.getMonitorForWindow",{windowIdentifier:this.identifier},((t,n)=>n?e(n.data):e()))}getComponentState(e,t){this.queryWindowService("getComponentState",e,t)}getWindowState(e,t){this.queryWindowService("getWindowState",e,t)}setComponentState(e,t=(()=>{})){this.queryWindowService("setComponentState",e,t)}removeComponentState(e,t=(()=>{})){this.queryWindowService("removeComponentState",e,t)}setWindowState(e,t=(()=>{})){this.queryWindowService("setWindowState",e,t)}saveCompleteWindowState(e={},t=Function.prototype){this.queryWindowService("saveCompleteWindowState",e,t)}cancelTabTileMonitoring(e={}){l.Logger.system.debug("FinsembleWindow.cancelTabTileMonitoring",e),a.RouterClient.transmit("TabTile.cancelTabTile",{params:e})}getParent(e){this.settingParent?m.getInstance(this.settingParent,((t,n)=>{e(null,n)})):this.parentWindow?e(null,this.parentWindow):e(null,null)}async setParent(e,t){return new Promise((n=>{this.settingParent?this.getParent(((e,i)=>{null==t||t(e,i),n({err:e,data:i})})):(this.settingParent=e,this.parentWindow&&this.parentWindow.name===e.windowName?(l.Logger.system.debug("FinsembleWindow.setParent already set",e),this.settingParent=!1,null==t||t(null,this.parentWindow),n({data:this.parentWindow})):this.queryWindowService("setParent",e,(()=>{l.Logger.system.debug("FinsembleWindow.setParent",e),m.getInstance(e,((i,r)=>{i?l.Logger.system.error("FinsembleWindow.setParent error",i):(l.Logger.system.debug("FinsembleWindow.setParent wrap success",e),this.parentWindow=r,this.parentWindow.windowType.includes("StackedWindow")||l.Logger.system.error("FinsembleWindow.setParent error",this.parentWindow.name,e.windowName)),a.RouterClient.transmit(c.DOCKING.REQUEST_PUBLISH,null),this.settingParent=!1;const o=()=>{this.removeEventListener("parent-set",o),null==t||t(i,r),n({err:i,data:r})};this.addEventListener("parent-set",o)}))})))}))}setParentOnWrap(e,t=Function.prototype){this.parentWindow&&this.parentWindow.name===e.windowName?(l.Logger.system.debug("FinsembleWindow.setParentOnWrap already set",e),t(null,this.parentWindow)):this.queryWindowService("setParent",e,(()=>{l.Logger.system.debug("FinsembleWindow.setParentOnWrap",e),m.getInstance(e,((n,i)=>{n?l.Logger.system.error("FinsembleWindow.setParentOnWrap error",n):(l.Logger.system.debug("FinsembleWindow.setParentOnWrap success getting wrap",e),this.parentWindow=i,!1===this.parentWindow.windowType.includes("StackedWindow")&&l.Logger.system.error("FinsembleWindow.setParentOnWrap error",this.parentWindow.name,e.windowName)),t(n,i)}))}))}clearParent(){l.Logger.system.debug("FinsembleWindow.clearParent",this.parentWindow),this.parentWindow=null}setTitle(e){l.Logger.system.debug("Title change",e),a.RouterClient.publish(this.TITLE_CHANGED_CHANNEL,{title:e,windowName:this.windowName})}getOptions(e){return new Promise((t=>{this.queryWindowService("getOptions",{},((n,i)=>{null==e||e(n,i),t({err:n,data:i})}))}))}_privateManagementPreface(e,t){var n,i;return"function"==typeof t&&l.Logger.system.error("StackedWindowWrapper.wrapPreface bad params",t),(t=t||{}).stackedWindowIdentifier={windowName:null===(n=this.identifier)||void 0===n?void 0:n.windowName,windowType:null===(i=this.identifier)||void 0===i?void 0:i.windowType},l.Logger.system.debug(`StackedWindow.${e} _privateManagementPreface`,t),t}addWindow(e,t=Function.prototype){return e=this._privateManagementPreface("addWindow",e),new Promise((n=>{a.RouterClient.query("StackedWindow.addWindow",e,((e,i)=>{l.Logger.system.debug("StackedWindow.addWindow callback",e,i),t(e,i.data),n({err:e,data:i.data})}))}))}removeWindow(e,t=Function.prototype){return e=this._privateManagementPreface("removeWindow",e),new Promise((n=>{a.RouterClient.query("StackedWindow.removeWindow",e,((e,i)=>{l.Logger.system.debug("StackedWindow.removeWindow callback",e,i),t(e,i.data),n({err:e,data:i.data})}))}))}deleteWindow(e,t=Function.prototype){return e=this._privateManagementPreface("deleteWindow",e),new Promise((n=>{a.RouterClient.query("StackedWindow.deleteWindow",e,((e,i)=>{l.Logger.system.debug("StackedWindow.deleteWindow callback",e,i),t(e,i.data),n({err:e,data:i.data})}))}))}setVisibleWindow(e,t=Function.prototype){return e=this._privateManagementPreface("setVisibleWindow",e),new Promise((n=>{a.RouterClient.query("StackedWindow.setVisibleWindow",e,((e,i)=>{l.Logger.system.debug("StackedWindow.setVisibleWindow callback",e,i),t(e,i.data),n({err:e,data:i.data})}))}))}reorder(e,t=Function.prototype){return e=this._privateManagementPreface("reorder",e),new Promise((n=>{a.RouterClient.query("StackedWindow.reorder",e,((e,i)=>{l.Logger.system.debug("StackedWindow.reorder callback",e,i),t(e,i.data),n({err:e,data:i.data})}))}))}formGroup(){const e=this.parentWindow?this.parentWindow.name:this.name;a.RouterClient.transmit("DockingService.formGroup",{windowName:e})}ejectFromGroup(){const e=this.parentWindow?this.parentWindow.name:this.name;a.RouterClient.query("DockingService.leaveGroup",{name:e},(()=>{}))}}t.FinsembleWindow=m,m.WINDOWSTATE=c.WINDOWSTATE,m.wrap=m.getInstance,m.cache={},m._windowReady=function(e){let t;return l.Logger.system.debug(`windowServiceReady: ${e} starting`),new Promise((async(n,i)=>{l.Logger.system.debug(`windowServiceReady: ${e} waiting`),t=a.RouterClient.subscribe(`Finsemble.Component.State.${e}`,((i,r)=>{const{state:o}=r.data;switch(l.Logger.system.debug(`windowServiceReady: ${e} state change: ${o}`),o){case"ready":case"reloading":case"closing":l.Logger.system.debug(`windowServiceReady: ${e} ${o}`),a.RouterClient.unsubscribe(t),n()}}))}))}},24137:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.openSharedData=t.deprecatedGetWindowNameForDocking=t.deprecatedSetActive=t.deprecatedGetActiveAndPendingWindowNames=void 0;const r=i(n(2518)),o=i(n(49136)),s=i(n(95393));function a(e,t){return e.classList?e.classList.contains(t):!!e.className.match(new RegExp(`(\\s|^)${t}(\\s|$)`))}t.deprecatedGetActiveAndPendingWindowNames=(e,t=Function.prototype)=>new Promise((n=>{e.query("Launcher.getActiveAndPendingWindowNames",{},((e,i)=>{e&&r.default.system.error(e),t(e,i.data),n({err:e,data:i.data})}))})),t.deprecatedSetActive=e=>{var t,n;e?(n="desktop-active",(t=document.documentElement).classList?t.classList.add(n):a(t,n)||(t.className=`${t.className} ${n}`)):function(e,t){if(e.classList)e.classList.remove(t);else if(a(e,t)){const n=new RegExp(`(\\s|^)${t}(\\s|$)`);e.className=e.className.replace(n," ")}}(document.documentElement,"desktop-active")},t.deprecatedGetWindowNameForDocking=e=>{const t=e.parentWindow;return t?t.name:e.name},t.openSharedData=function(e,t){const n=o.default,i=s.default;e.multipleOpenerHandler||(e.multipleOpenerHandler=function(e){let t,n=0;for(const i of Object.keys(e))e[i].length>n&&(t=i,n=e[i].length);return[t]});const a=[],l={};n.getComponentsThatCanReceiveDataTypes({dataTypes:Object.keys(e.data)},((o,s)=>{for(const e of Object.keys(s))if(s[e].componentTypes.length)for(const t of s[e].componentTypes)l[t]?l[t].push(e):l[t]=[e];else{const t=`No Components Available to Handle the type: ${e}`;a.push(t),r.default.system.error(t)}let u=Object.keys(l);if(u.length){u.length>1&&(u=e.multipleOpenerHandler(l));const r=Object.keys(i.channels);if(r.length)if(i.getLinkedComponents({componentTypes:u,windowIdentifier:i.windowIdentifier()}).length||e.publishOnly)i.publish({dataType:"Finsemble.DragAndDropClient",data:e.data},(()=>{})),t&&t(a.length?a:null,"Data published");else{for(const t of u)n.spawn(t,{data:{sharedData:e.data,linker:{channels:r}},addToWorkspace:!0});t&&t(a.length?a:null,"Linked Window(s) spawned with data")}else if(!e.publishOnly){for(const t of u)n.spawn(t,{data:{sharedData:e.data},addToWorkspace:!0});t&&t(a.length?a:null,"New Window(s) spawned with data")}}else t&&t(a.length?a:null,null)}))}},95393:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.LinkerClient=void 0;const r=n(1641),o=i(n(20670)),s=n(25232),a=i(n(97525)),l=i(n(49136)),u=i(n(47913)),d=i(n(2518)),c=i(n(18446));d.default.system.debug("Starting LinkerClient");const f=d.default.system.info,h=d.default.system.debug;function p(e){return e.windowName.replace(/\./g,"_")}function g(e,t){return t&&t(null,e),e}class m extends s._BaseClient{constructor(e){super(e),this.stateChangeListeners=[],this.allChannels=[],this.channels={},this.clients={},this.channelListenerList=[],this.dataListenerList={},this.handleListeners=(e,t)=>{const n=this.dataListenerList[t.data.type];if(n&&n.length>0)for(let e=0;e<n.length;e++)n[e](t.data.data,{data:t.data.data,header:t.header,originatedHere:t.originatedHere})},this.onClose=e=>{const t=p(a.default.getWindowIdentifier());this.clients[t]&&(this.clients[t]=null,this.updateClientInStore(t)),this.linkerStore.removeListener({field:`clients.${t}`},this.clientsKeyValueChangeStoreListener,((e,n)=>{n||d.default.system.warn("Linker Client Onclose: clientsKeyValueChangeStoreListener removeListener failed",t)})),this.linkerStore.removeListener({field:{}},this.anyFieldChangeStoreListener,((e,t)=>{t||d.default.system.warn("Linker Client Onclose: anyFieldChangeStoreListener removeListener failed")})),d.default.system.debug("LINKER-4 cleanup",t),e&&e()},this.groups=this.channels,this.allGroups=this.allChannels,this.onLinksUpdate={push:e=>{this.stateChangeListeners.push(((t,n)=>{n&&(n.groups=n.channels),e(t,{groups:n})}))}},this.linkerWindow=null,this.loading=!1,o.default.args(e,"object=")&&e&&o.default.args2("params.onReady",e.onReady,"function="),this.clientsKeyValueChangeStoreListener=this.clientsKeyValueChangeStoreListener.bind(this),this.anyFieldChangeStoreListener=this.anyFieldChangeStoreListener.bind(this)}getChannel(e){return this.allChannels.filter((t=>t.name===e)).length>0}createChannel(e,t){return d.default.system.deprecated("This method is deprecated and will be removed in a future release. Please use FSBL.Interop which provides channel linking automatically."),f("LinkerClient.createChannel","PARAMS",e),o.default.args(e,"object"),e.name?this.getChannel(e.name)?(h(`LinkerClient.createChannel: Channel ${e.name} Already Exists`),g(this.allChannels,t)):(this.allChannels.push(e),this.allGroups=this.allChannels,this.linkerStore.setValue({field:"channels",value:this.allChannels}),g(this.allChannels,t)):(h("LinkerClient.createChannel: Name is required"),g(this.allChannels,t))}removeChannel(e,t){if(f("LinkerClient.removeChannel","NAME",e),d.default.system.deprecated("This method is deprecated and will be removed in a future release. Please use FSBL.Interop which provides channel linking automatically."),o.default.args(e,"string"),!this.getChannel(e))return h(`Channel ${e}does not exist`,null),g(this.allChannels,t);const n=this.allChannels;for(let t=0;t<n.length;t++)if(e===n[t].name){n.splice(t,1);break}this.linkerStore.setValue({field:"channels",value:this.allChannels});const{clients:i}=this;for(const t in i){const n=i[t];for(const t in n.channels)if(e===t){delete n[t];break}}return this.linkerStore.setValue({field:"clients",value:this.clients}),g(this.allChannels,t)}updateClientInStore(e){this.linkerStore.setValue({field:`clients.${e}`,value:this.clients[e]})}linkToChannel(e,t,n){d.default.system.deprecated("This method is deprecated and will be removed in a future release. Please use FSBL.Interop which provides channel linking automatically."),f("LinkerClient.linkToChannel","CHANNEL",e,"COMPONENT",t),o.default.args(e,"string",t),t||(t=a.default.getWindowIdentifier());const i=p(t);if(this.clients[i]||(this.clients[i]={client:t,channels:{}}),Array.isArray(e))for(let t=0;t<e.length;t++)this.clients[i].channels[e[t]]=!0;else this.clients[i].channels[e]=!0;return this.updateClientInStore(i),g(this.getState(t),n)}unlinkFromChannel(e,t,n){d.default.system.deprecated("This method is deprecated and will be removed in a future release. Please use FSBL.Interop which provides channel linking automatically."),f("LinkerClient.unlinkFromChannel","CHANNEL",e,"WINDOW IDENTIFIER",t),o.default.args(e,"string",t),t||(t=a.default.getWindowIdentifier());const i=p(t),r=this.clients[i];if(Array.isArray(e))for(let t=0;t<e.length;t++)delete r.channels[e[t]];else if(e){if(!r||!r.channels[e]){const r=this.clients[i];return h(`Component was not in specified channel ${e}`,r,r.channels[e]),g(this.getState(t),n)}delete r.channels[e]}else for(const e in r.channels)delete r.channels[e];return this.updateClientInStore(i),g(this.getState(t),n)}getAllChannels(e){return f("LinkerClient.getAllChannels"),g(this.allChannels,e)}getState(e,t){f("LinkerClient.getState","WINDOW IDENTIFIER",e);const n={channels:[],allChannels:this.allChannels};if(e||(e=a.default.getWindowIdentifier()),!Object.keys(this.clients).length)return g(n,t);const i=p(e),r=this.clients[i];return r?(n.channels=this.allChannels.filter((e=>r.channels&&!0===r.channels[e.name])),d.default.system.debug("LINKER-3",this.allChannels,"state.channels",n.channels,"key",i,"windowIdentifier",e,"componentEntry",r),r.active||(r.active=!0,this.linkerStore.setValue({field:`clients.${i}`,value:r})),g(n,t)):g(n,t)}unsubscribe(e,t){d.default.system.deprecated("This method is deprecated and will be removed in a future release. Please use FSBL.Interop which provides channel linking automatically."),f("LinkerClient.unsubscribe","DATA TYPE",e),o.default.args(e,"string"),this.dataListenerList[e]&&(t?this.dataListenerList[e]=this.dataListenerList[e].filter((e=>e!==t)):delete this.dataListenerList[e])}publish(e,t){f("LinkerClient.publish","PARAMS",e),o.default.args(e.dataType,"string",e.data,"any");let{channels:n}=e;n||(n=Object.keys(this.channels));for(let t=0;t<n.length;t++){const i=n[t];this.routerClient.transmit(`${i}.${e.dataType}`,{type:e.dataType,data:e.data}),this.routerClient.transmit(i,{type:e.dataType,data:e.data})}return g({},t)}subscribe(e,t){d.default.system.deprecated("This method is deprecated and will be removed in a future release. Please use FSBL.Interop which provides channel linking automatically."),f("LinkerClient.subscribe","DATA TYPE",e),o.default.args(e,"string",t,"function"),this.dataListenerList[e]?this.dataListenerList[e].includes(t)||this.dataListenerList[e].push(t):this.dataListenerList[e]=[t]}getLinkedComponents(e,t){d.default.system.deprecated("This method is deprecated and will be removed in a future release. Please use FSBL.Interop which provides channel linking automatically."),f("LinkerClient.getLinkedComponents","PARAMS",e);const n=[];if(e||(e={}),e.channels&&!Array.isArray(e.channels)&&(o.default.args(e.channels,"string"),e.channels=[e.channels]),e.componentTypes&&!Array.isArray(e.componentTypes)&&(o.default.args(e.componentTypes,"string"),e.componentTypes=[e.componentTypes]),e.componentTypes&&o.default.args(e.componentTypes,"array"),e.windowIdentifier){const t=p(e.windowIdentifier),n=Object.keys(this.clients[t].channels);e.channels?e.channels=e.channels.filter((e=>n.includes(e))):e.channels=n}e.channels||(e.channels=this.getAllChannels().map((e=>e.name)));for(const t in this.clients){let i=this.clients[t];if(!i)continue;i.channels||(i=i[Object.keys(i)[0]]);const r=Object.keys(i.channels).filter((t=>{var n;return null===(n=null==e?void 0:e.channels)||void 0===n?void 0:n.includes(t)})).length;let o=!0;e.componentTypes&&(o=e.componentTypes.includes(i.client.componentType)),i.active&&r&&o&&n.push({windowName:i.client.windowName,componentType:i.client.componentType,uuid:i.client.uuid,channels:Object.keys(i.channels)})}return g(n,t)}updateListeners(){for(let e=this.channelListenerList.length-1;e>=0;e--){const t=this.channelListenerList[e];Object.keys(this.channels).filter((e=>e==t)).length||(this.routerClient.removeListener(t,this.handleListeners),this.channelListenerList.splice(e,1))}const e=Object.keys(this.channels);for(let t=0;t<e.length;t++){const n=e[t];this.channelListenerList.includes(n)||(this.routerClient.addListener(n,this.handleListeners),this.channelListenerList.push(n))}const t=this.getState();for(let e=0;e<this.stateChangeListeners.length;e++)this.stateChangeListeners[e](null,t)}onStateChange(e){this.stateChangeListeners.push(e)}persistState(e){a.default.setComponentState({field:"Finsemble_Linker",value:e})}clientsKeyValueChangeStoreListener(e,t){if(h("My Channels Updated"),!t.value)return;const n=t.value.channels||t.value.groups,i=(0,c.default)(n,this.channels);(n&&0!==Object.keys(n).length&&!i||0===Object.keys(n).length&&0!==Object.keys(this.channels).length)&&(this.persistState(n),this.channels=n,this.updateListeners())}anyFieldChangeStoreListener(e,t){const{values:n}=t.value;this.allChannels=n.channels,n.groups&&(this.allChannels=n.groups),d.default.system.debug("LINKER-2",this.allChannels),this.allGroups=this.allChannels,this.clients=n.clients}start(e){this.dontPersistYet=!0,h("LinkerClient Loading Channels");const t=a.default.getWindowIdentifier(),n=p(t);u.default.getStore({store:"Finsemble_Linker",global:!0},((i,r)=>{this.linkerStore=r,null==r||r.addListener({field:`clients.${n}`},this.clientsKeyValueChangeStoreListener),null==r||r.addListener({},this.anyFieldChangeStoreListener),null==r||r.getValues(["channels",`clients.${n}`],((i,r)=>{r&&r.channels&&(this.allChannels=r.channels,d.default.system.debug("LINKER-1",this.allChannels),this.allGroups=this.allChannels),a.default.getComponentState({field:"Finsemble_Linker"},((i,o)=>{var s;this.channels=[],this.clients[n]={client:t,active:!0,channels:{}},o?(this.channels=o,this.clients[n].channels=o):(null===(s=r[`clients.${n}`])||void 0===s?void 0:s.channels)&&(this.clients[n].channels=r[`clients.${n}`].channels),this.updateClientInStore(n);const l=a.default.getSpawnData();if(l&&l.linker){let e=l.linker.channels;l.linker.groups&&(e=l.linker.groups),this.linkToChannel(e,t)}else this.updateListeners();e()}))}))}))}hyperFocus(e){l.default.hyperFocus({windowList:this.getLinkedComponents({channels:e})})}bringAllToFront(e){const{channel:t}=e;l.default.bringWindowsToFront({windowList:this.getLinkedComponents({channels:t})})}createGroup(e,t){return this.createChannel(e,t)}deleteGroup(e,t){return this.removeChannel(e,t)}addToGroup(e,t,n){const i=this.linkToChannel(e,t);return n&&n(null,i),i}removeFromGroup(e,t,n){const i=this.unlinkFromChannel(e,t);return n&&n(null,i),i}getAllGroups(e){const t=this.getAllChannels();return e&&e(t),t}getGroups(e,t){const n=this.getState(e);return n.groups=n.channels,g(n,t)}unSubscribe(e,t){this.unsubscribe(e,t)}getLinkedWindows(e,t){return e||(e={}),e.groups=e.channels,e.windowIdentifier=e.client,this.getLinkedComponents(e,t)}windowIdentifier(e,t){return g(a.default.getWindowIdentifier(),t)}openLinkerWindow(e){if(o.default.args(e,"function"),this.loading)return;const t=()=>{this.routerClient.query("Finsemble.LinkerWindow.Show",{groups:this.getGroups().groups,windowIdentifier:a.default.getWindowIdentifier(),windowBounds:a.default.getWindowBounds()},(()=>{}))};this.linkerWindow?this.linkerWindow.isShowing((e=>{e?this.linkerWindow.hide():t()})):t()}}function w(e){return new m({clients:e=e||{},startupDependencies:{clients:["windowClient","launcherClient"]},onReady(e){h("Linker onReady"),setTimeout((()=>{(0,r.parallel)([e=>{y.start(e)},e=>{l.default.onReady(e)}],e)}),0)},name:"linkerClient"})}t.LinkerClient=m;const y=w();y.constructInstance=w,t.default=y},23712:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=n(21614),o=i(n(27361)),s=i(n(48406)),a=i(n(11314)),l=i(n(49136)),u=n(91374),d=i(n(2518)),c=n(26604),{REMOTE_FOCUS:f}=c.WINDOW_SERVICE_REQUESTS;l.default.initialize();const h=e=>(0,o.default)(e,"window.descriptor.isWPF",(0,o.default)(e,"descriptor.isWPF"));class p extends s.default{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){d.default.system.verbose("APPLICATION LIFECYCLE:Assimilation:onGetBoundsReturned",e.ref,e),a.default.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;"info"!==t&&"debug"!==t||(t="verbose"),"function"==typeof d.default.system[t]?d.default.system[t](`Assimilation EXE: ${n}`):d.default.system.warn(`Assimilation unable to log type ${t} from EXE. Defaulting to warn: ${n}`)}onNewApp(e){if(d.default.system.debug("APPLICATION LIFECYCLE:Assimilation:openNewApp",e),e.error&&!e.error.startsWith("The operation completed successfully"))return d.default.system.error(e.error);try{const t=JSON.parse(e.window),n=this.assimilationWindowManager.updateSpawningWindow(e.ref,t.uuid);this.assimilationWindowManager.handleSpawnComplete(n,t)}catch(e){d.default.system.error("No Window found. Either the executable path is wrong or it has no window")}}onCloseWindow(e){d.default.system.debug("APPLICATION LIFECYCLE:Assimilation:closeWindow",e)}onWindowStartMove(e){d.default.system.debug("APPLICATION LIFECYCLE:Assimilation:onWindowStartMove",e),e.uuid?this.assimilationWindowManager.setMovingWindow(this.assimilationWindowManager.getWindowByUUID(e.uuid)).setStartBounds(e):d.default.system.error("window is missing uuid",e)}onWindowMoveUpdate(e){d.default.system.debug("APPLICATION LIFECYCLE:Assimilation:onWindowMoveUpdate",e);const t=this.assimilationWindowManager.getMovingWindow();null==t||t.calculateWindowLocation(e),a.default.transmit(`AssimilationService.bounds-change-request.${null==t?void 0:t.window.name}`,Object.assign({},null==t?void 0:t.location))}onWindowMaximize(e){d.default.system.debug("APPLICATION LIFECYCLE:Assimilation:onWindowMaximize",e);const{uuid:t}=e.data?JSON.parse(e.data):e,n=this.assimilationWindowManager.getWindowByUUID(t);n&&n.maximize({fromAssimilation:!0})}onWindowMinimize(e){d.default.system.debug("APPLICATION LIFECYCLE:Assimilation:onWindowMinimize",e);const{uuid:t}=e.data?JSON.parse(e.data):e,n=this.assimilationWindowManager.getWindowByUUID(t);n&&(n.cachedLocation=n.location,n.minimize({fromAssimilation:!0}))}onWindowRestore(e){d.default.system.debug("APPLICATION LIFECYCLE:Assimilation:onWindowRestore",e);const{uuid:t}=e.data?JSON.parse(e.data):e,n=this.assimilationWindowManager.getWindowByUUID(t);n&&(n.state="restore",Date.now()-n.lastMinimized<this.assimilationWindowManager.assimilationHelper.manifest.eventIgnore||n.restore({fromAssimilation:!0}))}onWindowFocused(e){d.default.system.debug("APPLICATION LIFECYCLE:Assimilation:onWindowFocused",e);const t=JSON.parse(e.data),n=this.assimilationWindowManager.getWindowByUUID(t.uuid),i={name:n&&n.name||t.name,windowHandle:t.uuid};a.default.transmit(f,i),n&&setTimeout((()=>{"minimize"!==n.state&&(Date.now()-n.lastRestored<this.assimilationWindowManager.assimilationHelper.manifest.eventIgnore||n.focus({fromAssimilation:!0}))}),this.assimilationWindowManager.assimilationHelper.manifest.focusDelay)}onRemoveWindow(e){const t=JSON.parse(e.window);this.assimilationWindowManager.removeWindow(t.uuid,!0)}onWindowClicked(e){d.default.system.debug("APPLICATION LIFECYCLE:Assimilation:onWindowClicked",e);const t=JSON.parse(e.data);this.onWindowFocused(e);const n=this.assimilationWindowManager.getWindowByUUID(t.uuid);if(n&&!h(n)){if(this.keyboard[162]){const e=n.parentWindow?n.parentWindow.windowName:n.windowName;a.default.query("DockingService.getGroupObjectsForWindow",{name:e},((t,n)=>{let i=!1;for(let e=0;e<n.data.length;e++)if(n.data[e].isMovable){i=!0;break}return i?a.default.query("DockingService.leaveGroup",{name:e},(()=>{})):a.default.transmit("DockingService.formGroup",{windowName:e})}))}}else d.default.system.debug("APPLICATION LIFECYCLE:Assimilation:onWindowClicked no window found for window UUID",t.uuid)}onApplicationList(e){d.default.system.debug("APPLICATION LIFECYCLE:Assimilation:onApplicationList",e),this.assimilationWindowManager.parseApplicationList(e.list)}onLocationResponse(e){if(!e.window)return;const t=JSON.parse(e.window),n=this.assimilationWindowManager.getWindowByUUID(t.uuid);n&&a.default.transmit("DockingService.updateWindowLocation",{windowName:n.windowName,location:{left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top}})}onAddWindow(e){const t=JSON.parse(e.window);t.uuid&&(d.default.system.debug("Assimilation.AssimilationWindowManager.onAddWindow invoking addNativeWindow:",t),this.assimilationWindowManager.addNativeWindow(t))}onMoveEnd(e){d.default.system.info("moveEnd",e);const t=this.assimilationWindowManager.getMovingWindow();if(t){if(this.keyboard[162]&&!h(t)){if(t.window.grouped)return a.default.query("DockingService.leaveGroup",{name:t.window.windowName},(()=>{}));a.default.transmit("DockingService.formGroup",{windowName:t.window.windowName})}e.location=t.window.location,a.default.transmit(`${t.window.name}.endMovement`,e),this.assimilationWindowManager.saveWindow({data:{key:t.window.uuid,location:t.window.location}})}}onKeyUp(e){d.default.system.debug("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),a.default.transmit("finsemble.assimilation.keyup",{key:e.key})}onKeyDown(e){d.default.system.debug("APPLICATION LIFECYCLE:Assimilation:onKeyDown",e),e.key=Number(e.key),this.keyboard[e.key]&&clearTimeout(this.keyboard[e.key]),this.keyboard[e.key]=setTimeout((()=>this.onKeyUp(e)),this.manifest.hotkeyTimeout),160===e.key&&(self.shift=!0),a.default.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){d.default.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(){d.default.system.log("APPLICATION LIFECYCLE:Assimilation:onSocketClosed"),this.connect()}onSocketOpened(){d.default.system.log("APPLICATION LIFECYCLE:Assimilation:onSocketOpened"),clearTimeout(this.wsConnectionFailureTimeout),this.onSocketConnected()}setThrottle(e){d.default.system.log("APPLICATION LIFECYCLE:Assimilation:enable move throttle",e),this.send(this.prepareAction({topic:"throttle",throttle:e}))}enableAppHooks(){d.default.system.info("APPLICATION LIFECYCLE:Assimilation:Enable Assimilation hooks"),this.send(this.prepareAction({topic:"enableHooks",data:{whitelist:[],blacklist:[]}}))}connect(e){d.default.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"),d.default.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=(0,r.v4)();e.ref=t;const n=JSON.stringify(e);return e.expiry=Date.now()+3e3,n}getMonitorInfo(){d.default.system.debug("APPLICATION LIFECYCLE:Assimilation:getMonitorInfo"),u.System.getMonitorInfo((e=>{this.send(JSON.stringify({topic:"monitorInfo",data:e}))}))}setMonitorInfo(e){d.default.system.debug("APPLICATION LIFECYCLE:Assimilation:setMonitorInfo"),this.send(JSON.stringify({topic:"monitorInfo",data:e}))}getApplicationList(){this.send(this.prepareAction({topic:"applicationList"}))}}t.default=p},48406:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=n(17187),o=i(n(2518));class s extends r.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}o.default.system.debug("Assimilation connecting to :",`ws://127.0.0.1:${this.port}`);const e=this.ws=new WebSocket(`ws://127.0.0.1:${this.port}`);e.onopen=()=>{o.default.system.debug("Assimilation connected to socket"),this.emit("socketOpen")},e.onerror=e=>{this.emit("socketError",e)},e.onmessage=e=>{let t;try{if(t=JSON.parse(e.data),!t.topic)return;return this.emit(t.topic,t)}catch(t){o.default.system.error("Assimilation:Socket.onMessage:err:",t,e)}},e.onclose=()=>{this.emit("socketClosed"),o.default.system.log("SERVICE LIFECYCLE:Web socket closed")}}send(e){(!this.ws||this.ws.readyState>1)&&this.connect(),this.ws&&1===this.ws.readyState?this.ws.send(e):this.on("socketOpen",(()=>this.send(e)))}}t.default=s},44709:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n={x:-1,y:-1},i={left:-1,top:-1,bottom:-1,right:-1,x:-1,y:-1,width:-1,height:-1,resizeType:"None"},r={top:-1,left:-1};t.default=class{constructor(e){this.edge=null,this.direction="None",this.window=e,this.mouseLocation=n,this.mouseOffset=r,this.startBounds=i,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,i,{left:r,right:o=0,top:s,bottom:a=0}=this.location,l=0;if(this.edge){switch(l=1,this.edge){case"left":r=t.x;break;case"right":o=t.x;break;case"top":s=t.y;break;case"bottom":a=t.y;break;case"top-left":r=t.x,s=t.y;break;case"top-right":o=t.x,s=t.y;break;case"bottom-left":r=t.x,a=t.y;break;case"bottom-right":o=t.x,a=t.y}i=o-r,n=a-s}else r=t.x-Number(this.mouseOffset.left),s=t.y-Number(this.mouseOffset.top),a=Number(a)-(t.y-this.mouseLocation.y),o=Number(o)-(t.x-this.mouseLocation.x),n=Number(this.location.height),i=Number(this.location.width);const u=this.location;return u.changeType=l,u.left=Number(r),u.top=Number(s),u.bottom=Number(a),u.right=Number(o),u.height=Number(n),u.width=Number(i),this.mouseLocation=t,this.location=u,u}getResizeEdge(e,t,n){if("None"===n)return null;let i=null;switch(n){case"WE":i=Math.abs(t.x-e.left)<Math.abs(t.x-e.right)?"left":"right";break;case"NS":i=Math.abs(t.y-e.bottom)<Math.abs(t.y-e.top)?"bottom":"top";break;case"NESW":i=Math.abs(t.y-e.top)<Math.abs(t.y-e.bottom)?"top-right":"bottom-left";break;case"NWSE":i=Math.abs(t.y-e.top)<Math.abs(t.y-e.bottom)?"top-left":"bottom-right"}return i}}},1918:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.serviceInstance=void 0;const r=i(n(27361)),o=n(25478),s=i(n(11314)),a=i(n(5395)),l=i(n(9381)),u=i(n(49136)),d=n(64324),c=i(n(16994)),f=n(24074),h=i(n(2518)),p=i(n(47913)),g=n(91374),m=i(n(84795)),w=i(n(89554)),y=i(n(71688)),v=i(n(23712));p.default.initialize(),u.default.initialize(),l.default.initialize(),a.default.initialize(),h.default.start();class b extends o.BaseService{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=s.default,this.load=this.load.bind(this),this.getApplicationList=this.getApplicationList.bind(this),this.onBaseServiceReady((async e=>{h.default.system.debug("assimilation.onBaseServiceReady"),g.System.getFEAInfo((e=>{this.version=e.FEA})),s.default.addPubSubResponder(/.*humanInterface.*/,{}),m.default.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.substr(t.length-8),t}createRouterEndpoints(){s.default.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)})),s.default.addResponder("Assimilation.alwaysOnTop",((e,t)=>{this.assimilationWindowManager.alwaysOnTop(t),null==t||t.sendQueryResponse(null,null)})),s.default.addResponder("Assimilation.moveWindow",((e,t)=>{this.assimilationWindowManager.moveWindow(null==t?void 0:t.data,this.ws),null==t||t.sendQueryResponse(null,null)})),s.default.addListener("Assimilation.saveWindow",((e,t)=>{this.assimilationWindowManager.saveWindow(t)})),s.default.addResponder("Assimilation.showWindow",((e,t)=>{this.assimilationWindowManager.showWindow(t),null==t||t.sendQueryResponse(null,null)})),s.default.addResponder("Assimilation.maximizeWindow",((e,t)=>{this.assimilationWindowManager.maximizeWindow(t),null==t||t.sendQueryResponse(null,null)})),s.default.addResponder("Assimilation.restoreWindow",((e,t)=>{this.assimilationWindowManager.restoreWindow(t),null==t||t.sendQueryResponse(null,null)})),s.default.addResponder("Assimilation.minimizeWindow",((e,t)=>{this.assimilationWindowManager.minimizeWindow(t),null==t||t.sendQueryResponse(null,null)})),s.default.addResponder("Assimilation.hideWindow",((e,t)=>{this.assimilationWindowManager.hideWindow(t),null==t||t.sendQueryResponse(null,null)})),s.default.addResponder("Assimilation.dockWindow",((e,t)=>{this.assimilationWindowManager.dockWindow(t),null==t||t.sendQueryResponse(null,null)})),s.default.addResponder("Assimilation.undockWindow",((e,t)=>{this.assimilationWindowManager.undockWindow(t),null==t||t.sendQueryResponse(null,null)})),s.default.addResponder("Assimilation.bringToFront",((e,t)=>{this.assimilationWindowManager.bringToFront(t),null==t||t.sendQueryResponse(null,null)})),s.default.addResponder("Assimilation.closeWindow",((e,t)=>{this.assimilationWindowManager.closeWindow(t)})),s.default.addListener("Assimilation.hookWindowByHandle",((e,t)=>{this.assimilationWindowManager.updateSpawningWindowFromWindowObject(t)})),s.default.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()}`;s.default.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})})),s.default.addResponder("Assimilation.spawnNative",((e,t)=>{t&&this.spawnAsset(this.constructNativeWindowParams(t),(()=>{null==t||t.sendQueryResponse(e,!0)}))})),s.default.addListener("Assimilation.windowClosed",((e,t)=>{console.log("Window closed!!!",t),h.default.system.debug("APPLICATION LIFECYCLE:Assmilation:windowClosed",t)})),s.default.addListener("Finsemble.Assimilation.register",((e,t)=>{var n,i,r,o,a,l;const u=null==t?void 0:t.data,d=this.assimilationWindowManager.awaitingAssimilationSpawn;let c=!0;for(const e in d)if(d[e].name==u.windowName){if(c=!1,u.windowHandle){const t=this.convertHandle(u.windowHandle),s=this.assimilationWindowManager.updateSpawningWindow(e,t),d={left:null===(n=s.descriptor)||void 0===n?void 0:n.left,top:null===(i=s.descriptor)||void 0===i?void 0:i.top,right:null===(r=s.descriptor)||void 0===r?void 0:r.right,bottom:null===(o=s.descriptor)||void 0===o?void 0:o.bottom,width:null===(a=s.descriptor)||void 0===a?void 0:a.width,height:null===(l=s.descriptor)||void 0===l?void 0:l.height};this.assimilationWindowManager.handleSpawnComplete(s,d)}else{const t=this.assimilationWindowManager.updateSpawningWindow(e,null);this.assimilationWindowManager.handleSpawnComplete(t,null)}break}if(c){const e=`${Date.now()}_${Math.random()}`;u.windowHandle&&s.default.query("Finsemble.NewNativeWindow",{appUUID:e,name:u.windowName,windowType:"NativeWindow"},(async()=>{const{wrap:t}=await f.FinsembleWindow.getInstance({name:u.windowName}),n=this.convertHandle(u.windowHandle);t.uuid=n,t.outsideOfFinsemble=!0,this.assimilationWindowManager.activeWindows[n]=t,s.default.addListener(`${e}-Assimilation.boundsUpdate`,((e,n)=>{this.assimilationWindowManager.handleSpawnComplete(t,null==n?void 0:n.data)}));const{bounds:i}=u;i?this.assimilationWindowManager.handleSpawnComplete(t,i):this.assimilationWindowManager.sendSocketMessage(JSON.stringify({ref:e,uuid:t.uuid,topic:"getBounds"}))}))}}))}shouldHideTitleBar(e,t){var n;return!!e||(0,r.default)(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||(0,r.default)(t,"customData.window.argumentsAsQueryString");return t.hideTitleBar=this.shouldHideTitleBar(n,t),n&&(t=Object.assign({params:t},this.getArgumentsWPF(e)),t.spawnDefaultViewer=!0),this.constructPath(t),t}getArgumentsWPF(e){const t=Object.assign({},e.data);t.generatedArguments=t.arguments||"",this.uuidByName[t.name]||(this.uuidByName[t.name]=`uuid${Date.now()}_${Math.round(1e4*Math.random())}`),t.uuid||(t.uuid=this.uuidByName[t.name]);const n=new Map([["finsembleWindowName",t.name],["componentType",t.customData.component.type],["uuid",this.uuidByName[t.name]],["left",t.defaultLeft],["top",t.defaultTop],["width",t.defaultWidth],["height",t.defaultHeight],["iac",!0],["serverAddress",this.serverAddress]]);return t.path&&t.customData.window.argumentsAsQueryString?n.forEach(((e,n)=>{t.generatedArguments=`${t.generatedArguments}&${n}=${e}`})):n.forEach(((e,n)=>{t.generatedArguments=`${t.generatedArguments} "${n}=${e}"`})),t.alias||t.path||(t.path=t.customData.window.path,t.alias=t.customData.window.alias),t.componentType=t.customData.component.type,this.configCache[t.name]=t,t}constructPath(e){if(void 0===e.path||e.customData&&e.customData.window&&!1===Boolean(e.customData.window.argumentsAsQueryString))return;const t=new URL(e.path),n=new URLSearchParams(e.generatedArguments),i=new URLSearchParams("");[...t.searchParams.entries(),...n.entries()].forEach((function(e){i.append(e[0],e[1])})),t.search=i.toString(),e.generatedPath=t.toString(),e.generatedArguments=""}launchAssimilationExe(){g.System.launchExternalProcess({alias:"assimilation",arguments:`PORT=${this.port}`,listener:e=>{"exited"===e.topic?(h.default.system.log("APPLICATION LIFECYCLE:Exited Assimilation Process",e),h.default.system.debug("APPLICATION LIFECYCLE:Exited Assimilation Process")):(h.default.system.log("APPLICATION LIFECYCLE:Running Assimilation Process",e),h.default.system.debug("APPLICATION LIFECYCLE:Running Assimilation Process"))}},(e=>{h.default.system.log("APPLICATION LIFECYCLE:Assimilation process successfully launched"),h.default.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 l.default.getManifest();if(!t&&n){this.fullManifest=n;const t=null==n?void 0:n.finsemble.services.assimilationService.config,i=null==n?void 0:n.finsemble.servicesConfig.assimilation,r=null==n?void 0:n.finsemble.betaFeatures.assimilation;r&&h.default.system.error("Assimilation is no longer a beta feature. Move assimilation under serviceConfigs."),this.assimilationManifest=Object.assign(t,i||r),this.appAssets=null!==(e=null==n?void 0:n.appAssets)&&void 0!==e?e:null,this.assimilationHelper=new y.default({appAssets:null==n?void 0:n.appAssets,manifest:this.assimilationManifest}),this.assimilationWindowManager=new w.default(this.assimilationHelper);const o="ws://127.0.0.1:3376";this.serverAddress=d.ConfigUtilInstance.getDefault(n,"fullManifest.finsemble.router.transportSettings.FinsembleTransport.serverAddress",o)}}async load(){var e,t,n;h.default.system.debug("APPLICATION LIFECYCLE:Assimilation:load");const i=this;await this.getAllConfigs();const o=this.assimilationManifest;if((null==o?void 0:o.port)&&(this.port=o.port),!o.enabled)return h.default.system.log("APPLICATION LIFECYCLE:Assimilation Not Enabled"),!1;if(-1==navigator.platform.indexOf("Win"))return h.default.system.warn("APPLICATION LIFECYCLE:Assimilation disabled due to incompatible platform",navigator.platform),!1;h.default.system.debug("APPLICATION LIFECYCLE:Assimilation: Is Enabled");const s=(e,t)=>{const n=d.ConfigUtilInstance.getDefault(i.fullManifest,"manifest.finsemble.notificationURL",`${i.fullManifest.finsemble.moduleRoot}/components/system/notification/notification.html`);c.default.alert("dev","ONCE-SINCE-STARTUP",e,t,{url:n}),h.default.system.error("APPLICATION LIFECYCLE:Assimilation Error:",e,t)},a=null===(e=this.assimilationHelper)||void 0===e?void 0:e.findAssetByAlias("assimilation");return a?this.compareVersion("3.6.0",a.version)<0?(s("assimilationService-bad-version",`This version of ${(null===(n=null===(t=this.fullManifest)||void 0===t?void 0:t.startup_app)||void 0===n?void 0:n.name)||"Finsemble"} requires assimilation version >= 3.6.0. Check your manifest.`),!1):(this.assimilationWindowManager.setFloatingTitlebar((0,r.default)(i.fullManifest,"finsemble.Window Manager.floatingTitlebarComponent","floatingTitlebar")),this.createRouterEndpoints(),h.default.system.log("APPLICATION LIFECYCLE:Assimilation Enabled"),this.launchAssimilationExe(),!0):(s("assimilationService-not-found","Could not find assimilation asset. Ensure that appAssets is properly formatted in your application's manifest."),!1)}onLoggerStateChanged(e){var t,n;let i={topic:"onLogLevel"};["Error","Warn","Info","Log","Debug"].forEach((t=>{i[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(i)))}socketConnectionHandler(e){var t,n,i;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===(i=this.assimilationManifest)||void 0===i?void 0:i.throttle:20)):this.notifyAssimilationLaunchFailure(e.error),this.onLoggerStateChanged(h.default.setting()),this.readyFunction&&this.readyFunction()}notifyAssimilationLaunchFailure(e){h.default.system.error("Assimilation.launchAssimilationExe Error:",e),l.default.setValue({field:"finsemble.servicesConfig.servicesConfig.assimilation.enabled",value:!1}),a.default.onReady((()=>{const e=new a.default.Notification,t=new a.default.Action;t.buttonText="Dismiss",t.type=a.default.ActionTypes.DISMISS,e.title="Critical Failure in Assimilation Service",e.details="Assimilation failed To launch. Native applications will not work. Check the Central Logger for additional details.",e.actions=[t],a.default.notify(e)}))}connectSockets(){var e;(null===(e=this.assimilationManifest)||void 0===e?void 0:e.port)&&(this.port=this.assimilationManifest.port),this.ws=new v.default(this.assimilationManifest,this.assimilationWindowManager),this.ws.connect(this.socketConnectionHandler.bind(this)),void 0!==h.default.onStateChanged&&h.default.onStateChanged((e=>{this.onLoggerStateChanged(e)}))}compareVersion(e,t){if(!e)return 1;if(!t)return-1;const n=e.split("."),i=t.split(".");for(let e=0;e<Math.max(n.length,i.length);e++){if(e==n.length&&e==i.length)return 0;if(e>=i.length)return-1;if(e>=n.length)return 1;const t=parseInt(n[e]),r=parseInt(i[e]);if(t>r)return-1;if(r>t)return 1}return 0}spawnAsset(e,t){const n={name:e.name,uuid:e.uuid,componentType:e.componentType,windowType:"NativeWindow",waitForReady:!1};return f.FinsembleWindow.getInstance(n,((n,i)=>(e.minWidth=e.minWidth&&e.minWidth>100?e.minWidth:100,e.minHeight=e.minHeight&&e.minHeight>25?e.minHeight:25,e.maxWidth=e.maxWidth&&e.maxWidth>100?e.maxWidth:1/0,e.maxHeight=e.maxHeight&&e.maxHeight>25?e.maxHeight:1/0,e.maxWidth<e.defaultWidth&&(e.defaultWidth=e.maxWidth),e.minWidth>e.defaultWidth&&(e.defaultWidth=e.minWidth),e.maxHeight<e.defaultHeight&&(e.defaultHeight=e.maxHeight),e.minHeight>e.defaultHeight&&(e.defaultHeight=e.minHeight),i.descriptor=e,this.assimilationWindowManager.spawnWindow(i,this.ws),t())))}getApplicationList(){this.ws&&this.ws.getApplicationList()}}t.serviceInstance=new b("assimilationService")},89554:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=n(21614),o=i(n(27361)),s=i(n(2518)),a=i(n(49136)),l=i(n(2740)),u=n(24074),d=n(91374),c=i(n(11314)),f=i(n(44709)),h=i(n(84795)),p=n(43762);a.default.initialize(),t.default=class{constructor(e){this.assimilationHelper=e,this.activeWindows={},this.awaitingAssimilationSpawn={},this.awaitingSpawn={},this.allWindows={},this.movingWindow=null,this.floatingTitlebar=null,this.updateActiveWindowHeartbeats(),this.dockedToolbarOnStart=!1}setWebsocket(e){this.ws=e}sendSocketMessage(e){if(!this.ws)return setTimeout((()=>{this.sendSocketMessage(e)}),100);this.ws.send(e)}setMovingWindow(e){return s.default.system.debug("Assimilation.AssimilationWindowManager.setMovingWindow",e),this.movingWindow=new f.default(e)}getMovingWindow(){return s.default.system.debug("Assimilation.AssimilationWindowManager.getMovingWindow"),this.movingWindow}getWindowByUUID(e){return s.default.system.debug("Assimilation.AssimilationWindowManager.getWindowByUUID:",e),this.activeWindows[e]}getWindowByName(e){s.default.system.debug("Assimilation.AssimilationWindowManager.getWindowByName:",e);const t=Object.keys(this.activeWindows);for(let n=0;n<t.length;n++){const i=this.activeWindows[t[n]];if(i.windowName===e)return i}}updateSpawningWindow(e,t){s.default.system.debug("Assimilation.AssimilationWindowManager.updateSpawningWindow:",e,t);const n=this.awaitingAssimilationSpawn[e];if(n)return t||(n.windowLess=!0,t=e),n.uuid=t,this.activeWindows[t]=n,delete this.awaitingAssimilationSpawn[e],n}updateSpawningWindowFromWindowObject(e){const t=e.data,n={name:e.data.name,windowType:"FinsembleNativeWindow"};return u.FinsembleWindow.getInstance(n,(async(e,n)=>{n&&n.descriptor&&(n.descriptor.hideTitleBar=!0),n.uuid=parseInt(t.windowHandle,10).toString(16),this.activeWindows[n.uuid]=n;const i=await n.getBounds();i.data&&this.handleSpawnComplete(n,i.data)}))}handleSpawnComplete(e,t){if(s.default.system.debug("Assimilation.AssimilationWindowManager.handleSpawnComplete:",e,t),!e)return s.default.system.error("no window reference found");const n=(0,o.default)(e,"descriptor.customData.foreign.services.windowService.manageWindowMovement",!0);t&&n&&this.assimilationHelper.canHookWindow(e)&&(e.location=t,e.setBounds({bounds:t}),e.onReady((()=>{c.default.transmit(`${e.name}.endMovement`,{location:e.location})}))),this.registerWindow(e,e)}addNativeWindow(e){s.default.system.debug("Assimilation.AssimilationWindowManager.addNativeWindow:",e),this.allWindows[e.uuid]=e;let t=this;t.assimilationHelper.canHookWindow(e)&&(s.default.system.debug("Assimilation.AssimilationWindowManager.addNativeWindow: executableInConfig",e),this.assimilationHelper.executableInConfig(e,((n,i)=>{i||(e.windowName=e.name,a.default._createWrap({name:e.uuid},((n,i)=>{n&&s.default.system.error("Error inside of createWrap:",n),u.FinsembleWindow.getInstance(i.data,((n,i)=>{if(n)return s.default.system.error("Could not create wrap for window",e);t.activeWindows[e.uuid]=i,i.uuid=e.uuid;const{top:r,left:o,right:a,bottom:l}=e,u={top:r,left:o,width:a-o,height:l-r};t.handleSpawnComplete(i,u)}))})))})))}moveWindow(e){if(s.default.system.debug("Assimilation.AssimilationWindowManager.moveWindow:",e),console.log(e),!e.location)return;if(!e.name)return;let t=this.getWindowByUUID(e.key);if(!t){if(t=this.getWindowByName(e.name),!t)return void s.default.system.error("MoveWindow - could not find window. Name:",e.name,"Handle:",e.key);s.default.system.warn("MoveWindow - Could not find window by UUID, but did find window by name. Name:",e.name,"Handle:",e.key)}e.location.width=Math.round(e.location.width),e.location.bottom=Math.round(e.location.bottom),e.location.height=Math.round(e.location.height),e.location.left=Math.round(e.location.left),e.location.right=Math.round(e.location.right),isNaN(e.location.left)||(isNaN(e.location.height)&&(e.location.height=e.location.bottom-e.location.top,e.location.width=e.location.right-e.location.left),t.location=Object.assign({},e.location),this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"moveWindow",uuid:t.uuid,windowId:t.uuid,location:e.location})))}showWindow(e){if(s.default.system.debug("Assimilation.AssimilationWindowManager.showWindow:",e),e.data.name){const t=this.getWindowByName(e.data.name);e.data.key=t.uuid}this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"showWindow",uuid:e.data.key,windowId:e.data.key}))}hideWindow(e){if(s.default.system.debug("Assimilation.AssimilationWindowManager.hideWindow:",e),e.data.name){const t=this.getWindowByName(e.data.name);e.data.key=t.uuid}this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"hideWindow",uuid:e.data.key,windowId:e.data.key}))}dockWindow(e){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){s.default.system.debug("Assimilation.AssimilationWindowManager.closeWindow:",e);const t=this.getWindowByName(e.data.name);t&&(t.windowLess?(c.default.transmit(`Finsemble.Assimilation.close.${t.windowName}`,{}),t.queryResponder=e.sendQueryResponse,this.removeWindow(t.uuid,!1)):t.spawnedByFea?this._closeSpawned(t.finUUID,e.sendQueryResponse):(t.queryResponder=e.sendQueryResponse,this._closeAssimilationSpawned(t.uuid)))}_closeAssimilationSpawned(e){s.default.system.debug("Assimilation.AssimilationWindowManager._closeAssimilationSpawned:",e),this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"closeWindow",uuid:e,windowId:e})),setTimeout((()=>{this.getWindowByUUID(e)&&this._closeAssimilationSpawned(e)}),1e3)}_closeSpawned(e,t){s.default.system.debug("Assimilation.AssimilationWindowManager._closeSpawned:",e),d.System.terminateExternalProcess(e,0,(e=>{t&&t(null,null),s.default.system.debug("Assimilation window closed:",e)}),(e=>{t&&t(null,null),s.default.system.error("Assimilation window closed error:",e)}))}closeAllWindows(e){s.default.system.debug("Assimilation.AssimilationWindowManager.closeAllWindows:",e),Object.keys(this.activeWindows).forEach((e=>{c.default.transmit("LauncherService.shutdownResponse",{waitForMe:!1,name:this.activeWindows[e].windowName}),this.removeWindow(e,!1),this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"closeWindow",uuid:e,windowId:e}))}))}bringToFront(e){var t;let n;if(s.default.system.debug("Assimilation.AssimilationWindowManager.bringToFront:",e),e.data.name){if(n=this.getWindowByName(e.data.name),!n)return void console.log("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){s.default.system.debug("Assimilation.AssimilationWindowManager.minimizeWindow:",e);const t=this.getWindowByName(e.data.name);e.data.name&&(e.data.key=t.uuid),t.state="minimize",t.lastMinimized=Date.now(),this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"minimize",uuid:e.data.key,windowId:e.data.key}))}maximizeWindow(e){if(s.default.system.debug("Assimilation.AssimilationWindowManager.maximizeWindow:",e),e.data.name){const t=this.getWindowByName(e.data.name);e.data.key=t.uuid,t.state="maximize"}this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"maximize",uuid:e.data.key,windowId:e.data.key}))}restoreWindow(e){if(s.default.system.debug("Assimilation.AssimilationWindowManager.restoreWindow:",e),e.data.name){const t=this.getWindowByName(e.data.name);e.data.key=t.uuid,t.state="restore"}this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"restore",uuid:e.data.key,windowId:e.data.key})),c.default.transmit(`${e.data.name}.restored`,{})}alwaysOnTop(e){let t;t=e.data.name&&!e.data.key?this.getWindowByName(e.data.name):this.getWindowByUUID(e.data.key),(t||e.data.key)&&(s.default.system.debug("Assimilation.AssimilationWindowManager.alwaysOnTop:",e),this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"alwaysOnTop",uuid:e.data.key||t.uuid,alwaysOnTop:e.data.alwaysonTop})),t.descriptor&&t.descriptor.alwaysOnTop!==e.data.alwaysonTop&&t.updateOptions({alwaysOnTop:e.data.alwaysonTop},Function.prototype))}removeWindow(e,t){s.default.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):n.close({fromAssimilation:!0,removeFromWorkspace:t}),delete this.activeWindows[e],delete this.allWindows[e],c.default.query("Launcher.removeComponent",{name:n.windowName},(()=>{}))}parseApplicationList(e){s.default.system.debug("Assimilation.AssimilationWindowManager.parseApplicationList:",e);const t=JSON.parse(e);this.checkForRemoved(t);for(let e=0;e<t.length;e++){const n=t[e];this.allWindows[n.uuid]||(s.default.system.debug("Assimilation.AssimilationWindowManager.parseApplicationList invoking addNativeWindow:",n),this.addNativeWindow(n))}}checkForRemoved(e){s.default.system.debug("Assimilation.AssimilationWindowManager.checkForRemoved:",e);let t=!1;for(const n in this.allWindows)if(t=!1,!this.allWindows[n].windowLess){for(let i=0;i<e.length;i++)if(e[i].uuid===this.allWindows[n].uuid){t=!0;break}t||(this.activeWindows[n]&&this.activeWindows[n].unRegisterWithDocking(),delete this.activeWindows[n],delete this.allWindows[n])}}registerWindow(e,t){var n,i,r,o;s.default.system.debug("Assimilation.AssimilationWindowManager.registerWindow:",t.windowName,e,t),e.name=t.windowName;const a={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===(i=t.descriptor)||void 0===i?void 0:i.minHeight)||0,maxWidth:(null===(r=t.descriptor)||void 0===r?void 0:r.maxWidth)||1/0,maxHeight:(null===(o=t.descriptor)||void 0===o?void 0:o.maxHeight)||1/0}};let l=`Finsemble.${t.windowName}.wrapReady`,u=c.default.subscribe(l,((n,i)=>{t.wrapState="ready",t.initializeWindow({identifier:a,manageWindowMovement:Boolean(e.location)}),i.data&&i.data.name===a.name&&"closed"!==i.data.state&&(c.default.transmit(`${e.name}.onSpawned`,a),h.default.publishBootStatus(t.componentType,"components","completed"),c.default.unsubscribe(u))}));e.location&&this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"hookWindow",uuid:t.uuid}))}unRegisterAllWindows(){if(s.default.system.debug("Assimilation.AssimilationWindowManager.unRegisterAllWindows:"),Object.keys(this.activeWindows).length>0)for(const e in this.activeWindows)this.activeWindows[e].unRegisterWithDocking();this.activeWindows={}}spawnWindow(e){s.default.system.debug("Assimilation.AssimilationWindowManager.spawnWindow:",e);const t=this.assimilationHelper.manifest.useFeaSpawn,n=e.descriptor.customData.window.hasOwnProperty("useFeaSpawn")?e.descriptor.customData.window.useFeaSpawn:t;if(e.descriptor.alias)return n?this._spawnByAlias(e):this._SpawnByAlias(e);n?this._spawnByPathThroughContainer(e):this._spawnByPath(e)}async saveWindow(e){s.default.system.debug("Assimilation.AssimilationWindowManager.saveWindow:",e);const t=this.getWindowByUUID(e.data.key);if(t&&(e.data.location&&(t.location=e.data.location,t.location.width||(t.location.width=t.location.right-t.location.left),t.location.height||(t.location.height=t.location.bottom-t.location.top),t.descriptor.defaultLeft=t.location.left,t.descriptor.defaultTop=t.location.top,t.descriptor.defaultWidth=t.location.width,t.descriptor.defaultHeight=t.location.height,t.descriptor.defaultRight=t.location.left+t.location.width,t.descriptor.defaultBottom=t.location.top+t.location.height,t.descriptor.left=t.location.left,t.descriptor.top=t.location.top,t.descriptor.width=t.location.width,t.descriptor.height=t.location.height,t.descriptor.right=t.descriptor.defaultRight,t.descriptor.bottom=t.descriptor.defaultBottom),t.descriptor.cacheLocation=t.restoreBounds,e.data.options&&e.data.options.autoShow&&(t.descriptor.autoShow=e.data.options.autoShow),t.descriptor=Object.assign(t.descriptor,e.data),t.descriptor.customData&&delete t.descriptor.customData.manifest,delete t.descriptor.url,!t.outsideOfFinsemble)){const e=await p.BaseWindow.cleanupState(t.descriptor);await l.default._setWindowState({windowName:t.descriptor.name,state:{windowData: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&&c.default.transmit("Finsemble.heartbeat",{type:"component",windowName:t.windowName})}}),1e3)}_spawnByPath(e){console.log(`Spawning ${e.name}`),s.default.system.debug("Assimilation.AssimilationWindowManager._spawnByPath:",e);const t=(0,r.v4)();e.ref=t,this.awaitingAssimilationSpawn[t]=e;const n={topic:"openNewApp",env:e.descriptor.env,path:e.descriptor.generatedPath||e.descriptor.path,arguments:e.descriptor.generatedArguments||e.descriptor.arguments,autoShow:!e.descriptor.hasOwnProperty("autoShow")||e.descriptor.autoShow,alwaysOnTop:!!e.descriptor.hasOwnProperty("alwaysOnTop")&&e.descriptor.alwaysOnTop,spawnDefaultViewer:!!e.descriptor.hasOwnProperty("spawnDefaultViewer")&&e.descriptor.spawnDefaultViewer,ref:t,location:{left:e.descriptor.defaultLeft,top:e.descriptor.defaultTop,height:e.descriptor.defaultHeight,width:e.descriptor.defaultWidth},windowTitleWhiteList:(0,o.default)(e,"descriptor.customData.window.windowTitleWhiteList"),windowTitleBlackList:(0,o.default)(e,"descriptor.customData.window.windowTitleBlackList"),windowSpawnTimeout:(0,o.default)(e,"descriptor.customData.window.windowSpawnTimeout")};this.sendSocketMessage(JSON.stringify(n))}_SpawnByAlias(e){s.default.system.debug("Assimilation.AssimilationWindowManager._SpawnByAlias:",e);const t=(0,r.v4)();e.ref=t,this.awaitingAssimilationSpawn[t]=e;const n=this.assimilationHelper.findAssetByAlias(e.descriptor.alias||e.descriptor.generatedPath||e.descriptor.path);if(!n)return s.default.system.error("The alias or path for this asset is missing");const i={topic:"openAssetApp",alias:n.alias,env:e.descriptor.env,arguments:e.descriptor.generatedArguments||e.descriptor.arguments,version:n.version,target:n.target,autoShow:!e.descriptor.hasOwnProperty("autoShow")||e.descriptor.autoShow,spawnDefaultViewer:!!e.descriptor.hasOwnProperty("spawnDefaultViewer")&&e.descriptor.spawnDefaultViewer,ref:t,location:{left:e.descriptor.defaultLeft,top:e.descriptor.defaultTop,height:e.descriptor.defaultHeight,width:e.descriptor.defaultWidth},windowTitleWhiteList:(0,o.default)(e,"descriptor.customData.window.windowTitleWhiteList"),windowTitleBlackList:(0,o.default)(e,"descriptor.customData.window.windowTitleBlackList"),windowSpawnTimeout:(0,o.default)(e,"descriptor.customData.window.windowSpawnTimeout")};this.sendSocketMessage(JSON.stringify(i))}_spawnByPathThroughContainer(e){s.default.system.debug("Assimilation.AssimilationWindowManager._spawnByPath:",e);const t=(0,r.v4)();e.ref=t,e.spawnedByFea=!0,this.awaitingSpawn[t]=e,d.System.launchExternalProcess({path:e.descriptor.generatedPath||e.descriptor.path,arguments:e.descriptor.generatedArguments||e.descriptor.arguments,listener:t=>{"exited"===t.topic?(this.removeWindow(e.uuid,!0),s.default.system.log("Assimilation.AssimilationWindowManager:Exited External Process",t)):s.default.system.log("Assimilation.AssimilationWindowManager:Running External Process",t)}},(t=>{e.finUUID=t.uuid}),(e=>{s.default.system.error("Error in spawnByPath",e)}))}_spawnByAlias(e){s.default.system.debug("Assimilation.AssimilationWindowManager._spawnByAlias:",e);const t=(0,r.v4)();e.ref=t,e.spawnedByFea=!0,e.appAsset=this.assimilationHelper.findAssetByAlias(e.descriptor.alias),this.awaitingSpawn[t]=e,d.System.launchExternalProcess({alias:e.descriptor.alias,arguments:e.descriptor.generatedArguments||e.descriptor.arguments,listener:t=>{"exited"===t.topic?(this.removeWindow(e.uuid,!0),s.default.system.log("Assimilation.AssimilationWindowManager:Exited External Process",t)):s.default.system.log("Assimilation.AssimilationWindowManager:Running External Process",t)}},(t=>{e.finUUID=t.uuid}),(e=>{s.default.system.error(e)}))}}},71688:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=n(21614),o=i(n(2518)),s=i(n(9381));s.default.initialize(),t.default=class{constructor(e){this.appAssets=e.appAssets,this.manifest=e.manifest,this.blacklist=this.manifest.blacklist.map((e=>e.toUpperCase())),this.whitelist=this.manifest.whitelist.map((e=>e.toUpperCase()))}canHookWindow(e){const t=this.manifest.onlySpawned;return!(t&&!e.descriptor||(t&&e.descriptor&&!this.checkBlacklist(e)?(o.default.system.debug("Assimilation.canHookWindow: true"),0):this.checkBlacklist(e)||!this.checkWhitelist(e)&&this.whitelist.length>0))}executableInConfig(e,t){if(!e.executablePath)return t("not found",!1);const n=e.executablePath.replace(/^.*[\\\/]/,"").toUpperCase();s.default.getValue({field:"finsemble.components"},((i,r)=>{const o=Object.keys(r);for(let i=0;i<o.length;i++){const s=r[o[i]];if(s.window&&s.window.path){const i=s.window.path.replace(/^.*[\\\/]/,"").toUpperCase();if(e.executablePath&&i===n)return t(null,!0)}}return this.executableInAssets(e,t)}))}executableInAssets(e,t){for(let n=0;n<this.appAssets.length;n++)if(this.appAssets[n].target.toUpperCase()===e.executablePath.replace(/^.*[\\\/]/,"").toUpperCase())return t(null,!0);return t(null,!1)}checkBlacklist(e){if(!e.windowName)return!1;if(this.blacklist.length>0&&this.blacklist.includes(e.windowName.toUpperCase()))return!0;for(let t=0;t<this.blacklist.length;t++){const n=new RegExp(`^.*\\${this.blacklist[t]}$`);if(n.test(e.windowName.toUpperCase()))return!1;if(e.executablePath&&n.test(e.executablePath.toUpperCase()))return!1}return!1}checkWhitelist(e){if(!e.windowName)return!1;for(let t=0;t<this.whitelist.length;t++){const n=new RegExp(`^.*\\${this.whitelist[t]}$`);if(n.test(e.windowName.toUpperCase()))return!0;if(e.executablePath&&n.test(e.executablePath.toUpperCase()))return!0}return!1}prepareAction(e){const t=(0,r.v4)();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}}},25478:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return r(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseService=void 0;const a=n(1641),l=n(25495),u=s(n(11314)),d=s(n(2518)),c=s(n(84795)),f=n(91374),h=o(n(26604)),p=n(44137),g=n(51806),{SERVICE_INITIALIZING_CHANNEL:m,SERVICE_READY_CHANNEL:w,SERVICE_QUERY_READY_CHANNEL:y,SERVICE_CLOSING_CHANNEL:v,SERVICE_CLOSED_CHANNEL:b,SERVICE_STOP_CHANNEL:S}=h,C={startupDependencies:{services:[],clients:[]},shutdownDependencies:{services:[]},name:window.name};t.BaseService=class{constructor(e=C){!function(e){e.startupDependencies?(e.startupDependencies.services||(e.startupDependencies.services=C.startupDependencies.services),e.startupDependencies.clients||(e.startupDependencies.clients=C.startupDependencies.clients)):e.startupDependencies=C.startupDependencies,e.shutdownDependencies?e.shutdownDependencies.services||(e.shutdownDependencies.services=C.shutdownDependencies.services):e.shutdownDependencies=C.shutdownDependencies}(e),this.name=e.name?e.name:window.name,this.startupDependencies=e.startupDependencies,this.shutdownDependencies=e.shutdownDependencies,this.Logger=d.default,this.RouterClient=u.default,this.onBaseServiceReadyCB=null,this.setOnConnectionCompleteCB=null,this.listeners={},this.start=()=>{},this.started=!1,this.status="initializing",this.setOnline=this.setOnline.bind(this),this.onBaseServiceReady=this.onBaseServiceReady.bind(this),this.handleShutdown=this.handleShutdown.bind(this),this.waitForDependencies(),p.Globals.finsembleServices?p.Globals.finsembleServices.push(this):p.Globals.finsembleServices=[this]}async initialize(e){e()}waitForDependencies(){const e=this;if(this.started)return;this.started=!0;const t=this;function n(e){d.default.system.debug("BaseService.start.setParentUUID"),f.System.Window.getCurrent().getOptions((n=>{t.customData=n.customData,e()}))}async function i(){await(new g.FSBLService).startApp(),u.default.addResponder(y(e.name),((t,n)=>{(e.status="ready")?null==n||n.sendQueryResponse(null):null==n||n.sendQueryResponse("service not ready")})),"routerService"!==t.name&&u.default.transmit(m,{name:t.name}),window.addEventListener("beforeunload",t.RouterClient.disconnectAll),d.default.system.debug("APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.onRouterReady")}function r(e){const n=t.customData.debugServiceDelay||0;if(d.default.system.debug(`Custom Data: ${t.name} custom data`,t.customData),Number.isInteger(n))n>0&&d.default.system.debug(`APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.debugDelay: ${t.name} startup will delayed by ${n} milliseconds for debugging`);else{const e=`debugDelay has an illegal value ("${n}") for ${t.name}. Value must be an integer.`;d.default.system.error(`APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start: ${e}`),c.default.systemLog({error:!0},e)}setTimeout(e,n)}function o(e){d.default.system.debug(`APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.readyToGo ${t.name}`),d.default.console.log("Startup Dependencies for",t.name,t.startupDependencies),d.default.console.log("Shutdown Dependencies for",t.name,t.shutdownDependencies),l.FSBLDependencyManagerSingleton.shutdown.waitFor(t.shutdownDependencies,t.handleShutdown),d.default.system.debug(`APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.readyToGo after wait ${t.name}`),u.default.transmit(`${f.System.Window.getCurrent().name}.onSpawned`,{name:f.System.Window.getCurrent().name},{suppressWarnings:!0}),l.FSBLDependencyManagerSingleton.startup.waitFor(t.startupDependencies,e,t.name).on("err",(e=>{d.default.system.error(e)}))}function s(e){const n=f.System.Window.getCurrent();n.isShowing((i=>{i&&!1!==t.customData.showDevConsoleOnVisible?f.System.showDeveloperTools(n.name,null,e):(d.default.system.debug("APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.delayStartup done"),e())}))}return d.default.system.debug(`${this.name} starting`),new Promise((e=>{(0,a.series)([i,n,s,r,o],(t=>{t&&console.log("waitForDependencies async.series results",t),e(),this.onDependenciesReady()}))}))}setOnline(){"ready"!==this.status&&(this.RouterClient.addListener(`${S}.${this.name}`,(()=>{l.FSBLDependencyManagerSingleton.shutdown.checkDependencies()})),this.status="ready",u.default.transmit(w,{serviceName:this.name},{suppressWarnings:!0}),d.default.system.log("APPLICATION LIFECYCLE:STARTUP:SERVICE ONLINE",this.name),c.default.publishBootStatus(this.name,"services","completed"))}onDependenciesReady(){d.default.system.debug("APPLICATION LIFECYCLE:STARTUP:BaseService onDependenciesReady",this.name),this.status="initializing",this.onBaseServiceReadyCB?this.onBaseServiceReadyCB(this.setOnline):this.initialize?this.initialize(this.setOnline):setTimeout((()=>{"ready"!==this.status&&"routerService"!==this.name&&(console.error("No onBaseServiceReadyCB on initialize function defined on your service. Ensure that service.setOnline is called"),d.default.system.error("No onBaseServiceReadyCB on initialize function defined on your service. Ensure that service.setOnline is called"))}),3e3)}onBaseServiceReady(e){"initializing"===this.status?this.onBaseServiceReadyCB=()=>{e(this.setOnline)}:e(this.setOnline)}addEventListener(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)}onShutdown(e){this.addEventListener("onShutdown",e)}handleShutdown(){d.default.system.debug("BaseService.handleShutdown");const e=this;this.listeners.onShutdown?(u.default.transmit(v,{waitForMe:!0,name:this.name}),(0,a.each)(this.listeners.onShutdown,(function(e,t){(0,a.asyncify)(e)(null,t)}),(function(t){t&&d.default.system.error(t),e.shutdownComplete()}))):(u.default.transmit(v,{waitForMe:!1,name:this.name}),e.shutdownComplete())}shutdownComplete(){d.default.system.info(`"APPLICATION LIFECYCLE:SHUTDOWN:SERVICE SHUTDOWN: ${this.name}`),u.default.transmit(b,{name:this.name})}}},41552:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Action=void 0,t.Action=class{constructor(){this.id="",this.buttonText="",this.type=""}}},99259:(e,t)=>{"use strict";var n,i;Object.defineProperty(t,"__esModule",{value:!0}),t.FinsembleNotificationOptions=t.ActionTypes=void 0,(i=t.ActionTypes||(t.ActionTypes={})).DISMISS="DISMISS",i.SNOOZE="SNOOZE",i.SPAWN="SPAWN",i.QUERY="QUERY",i.PUBLISH="PUBLISH",i.TRANSMIT="TRANSMIT",(n=t.FinsembleNotificationOptions||(t.FinsembleNotificationOptions={})).MARK_AS_UNREAD="MARK_AS_UNREAD",n.MARK_AS_READ="MARK_AS_READ",n.SNOOZE="SNOOZE",n.DISMISS="DISMISS",n.SETTINGS="SETTINGS",n.DETAILS="DETAILS"},47505:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},98379:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Filter=void 0,t.Filter=class{constructor(){this.include=[],this.exclude=[]}}},45115:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},27749:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},42303:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},15074:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},90382:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2094:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},68994:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},62671:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},12573:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},85058:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},61765:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},77610:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LastIssued=void 0,t.LastIssued=class{constructor(e,t){this.source=e,this.issuedAt=t}}},56164:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Meta=void 0,t.Meta=class{}},42649:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Notification=void 0;const i=n(56164);t.Notification=class{constructor(){this.actions=[],this.isRead=!1,this.isSnoozed=!1,this.isMuted=!1,this.isDeleted=!1,this.actionsHistory=[],this.meta=new i.Meta,this.stateHistory=[],this.issuedAt="",this.title="",this.devModeOnly=!1}}},39195:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},71039:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},12758:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PerformedAction=void 0,t.PerformedAction=class{constructor(){this.id="",this.type="",this.datePerformed=""}}},70887:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SnoozeTimer=void 0,t.SnoozeTimer=class{}},35874:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Subscription=void 0,t.Subscription=class{constructor(e,t){this.id=e||null,this.filter=t,this.channel=""}}},46215:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(41552),t),r(n(99259),t),r(n(47505),t),r(n(98379),t),r(n(45115),t),r(n(27749),t),r(n(42303),t),r(n(15074),t),r(n(90382),t),r(n(2094),t),r(n(68994),t),r(n(62671),t),r(n(12573),t),r(n(85058),t),r(n(61765),t),r(n(77610),t),r(n(56164),t),r(n(42649),t),r(n(39195),t),r(n(71039),t),r(n(12758),t),r(n(70887),t),r(n(35874),t)},38144:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CHECKPOINT_CHANNEL_BASE=t.STAGE_CHANNEL=t.STATUS_CHANNEL_BASE=t.SHOW_SYSLOG_CHANNEL=t.SYSLOG_CHANNEL=t.CRITICAL_BOOT_STAGES=t.ALL_BOOT_STAGES=void 0,t.ALL_BOOT_STAGES=["microkernel","kernel","authentication","preuser","earlyuser","user"],t.CRITICAL_BOOT_STAGES=["microkernel","kernel"],t.SYSLOG_CHANNEL="systemManager.systemlog",t.SHOW_SYSLOG_CHANNEL="systemManager.showSystemlog",t.STATUS_CHANNEL_BASE="systemManager.boot.status",t.STAGE_CHANNEL="systemManager.boot.stage",t.CHECKPOINT_CHANNEL_BASE="systemManager.checkpoint"},37331:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkpointChannel=t.statusChannel=void 0;const i=n(38144);t.statusChannel=function(e){return`${i.STATUS_CHANNEL_BASE}.${e}`},t.checkpointChannel=function(e,t){return`${i.CHECKPOINT_CHANNEL_BASE}.${e}.${t}`}},53912:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BootReadyItem=t.ALL_BOOT_STAGES=void 0,t.ALL_BOOT_STAGES=["microkernel","kernel","authentication","preuser","earlyuser","user"],t.BootReadyItem=class{constructor(e,t,n){this.name=e,this.type=t,this.config=n}}},43762:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return r(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseWindow=void 0;const a=s(n(9996)),l=s(n(11314)),u=s(n(9381)),d=s(n(2518)),c=n(252),f=o(n(23099)),h=s(n(23893)),p=o(n(26604)),g=n(91374),m=n(26604),w=s(n(47913)),y=s(n(95085)),v=s(n(2740)),b=s(n(50361)),S=n(252);w.default.initialize(),y.default.initialize(),u.default.initialize(),v.default.initialize();class C{constructor(e){this.name="Unknown window",this.windowName="Unknown window",this.eventlistenerHandlerMap={},this.handleWrapStateChange=(e,t)=>{const{state:n}=t.data;n&&n!==this.wrapState&&"closed"!==n&&(this.wrapState=n,this.eventManager.trigger(n),this.eventManager.trigger("wrap-state-changed",{state:n}))},this.types={},this.guid=(0,S.guuid)(),this.wrapState="initializing",this.componentState={},this.windowState=C.WINDOWSTATE.NORMAL,this.type=null,this.windowType=null,this.windowOptions={},this.bounds={},this.name,this.enableWindowsAeroSnap=!1,this.doConstruction(e),this.TITLE_CHANGED_CHANNEL=`Finsemble.${this.name}.titleChanged`,this.componentKey=f.camelCase("activeWorkspace",this.name,this.name),this.windowKey=f.camelCase("activeWorkspace",this.name),C.bindFunctions(this),this.wrapStateChangeSubscription=l.default.subscribe(`Finsemble.Component.State.${this.name}`,this.handleWrapStateChange),this.eventManager=new h.default({name:this.name,sourceType:"Window"}),this.finishedMove=!0,this.oldState={}}windowServiceChannelName(e){return`WindowService-Request-${e}`}eventChannelName(e){return`WindowService-Event-${this.name||this.windowName}-${e}`}_startMove(e=0){window.aeroMode=!1,0===e&&(this.finishedMove=!1)}_stopMove(){this.finishedMove=!0}doConstruction(e){if(e.setWindowType||e.windowType||(e.windowType="WebWindow"),e.windowType)return e.setWindowType=e.windowType,delete e.windowType,new C.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=C;n.types||(n.types={}),n.types[e]=t}static bindFunctions(e){e.setParent=e.setParent.bind(e),e.getParent=e.getParent.bind(e),e.eventChannelName=e.eventChannelName.bind(e),e.windowServiceChannelName=e.windowServiceChannelName.bind(e),e.setupListeners=e.setupListeners.bind(e),e.onTitleChanged=e.onTitleChanged.bind(e),e.handleWrapRemoveRequest=e.handleWrapRemoveRequest.bind(e)}setupListeners(e){d.default.system.debug("BaseWindow parent change notification setup",e),this.parentSubscribeID=l.default.subscribe(`Finsemble.parentChange.${e}`,((e,t)=>{if(e)d.default.system.error("BaseWindow parent change notification error",e);else{const e=t.data||{};"Added"==e.type?(d.default.system.debug("BaseWindow Parent Notification: window.addedToStack listener",e),this.setParent(e.stackedWindowIdentifier)):"Removed"==e.type?(d.default.system.debug("BaseWindow Parent Notification: window.removedFromStack listener",e),this.clearParent()):"Exists"===e.type||e.type&&d.default.system.error("BaseWindow Parent Notification: unknown type",e)}})),this.TITLE_CHANGED_SUBSCRIPTION=l.default.subscribe(this.TITLE_CHANGED_CHANNEL,this.onTitleChanged)}async onTitleChanged(e,t){var n,i,r;if(("string"==typeof(null===(n=t.data)||void 0===n?void 0:n.title)||"number"==typeof t.data.title)&&(this._updateOptions&&this._updateOptions({title:t.data.title}),(null===(i=t.data)||void 0===i?void 0:i.windowName)&&(null===(r=t.data)||void 0===r?void 0:r.title))){d.default.debug(`Component window "${t.data.windowName}" is changing title to "${t.data.title}"`);try{const e=await(async()=>{let{data:e}=await w.default.createGlobalStore({store:"window-tab-title"});return e})();if(!e)return void d.default.warn("Error setting tab title: the store was not found");await e.setValue({field:t.data.windowName,value:t.data.title})}catch(e){d.default.system.warn(`Error saving window "${t.data.windowName}" tab name "${t.data.title}" to store "window-tab-title"`,e)}finally{this.eventManager.trigger("title-changed",{name:this.name,title:t.data.title})}}}static async getInstanceStandardized(e){try{return{data:(await C.getInstance(e)).wrap}}catch(e){return{err:e}}}static getInstance(e,t){return new Promise((async(n,i)=>{var r,o;const s=g.System.Window.getCurrent().name,a=null!==(r=null==e?void 0:e.name)&&void 0!==r?r:null==e?void 0:e.windowName,{waitForReady:u,uuid:c,windowType:f}=e;if(!a){const e='"name" is a required parameter';return null==t||t(e),void i(e)}if(e.windowName=a,!1!==u&&(d.default.system.debug("WRAP LIFECYCLE:WAIT FOR READY",a),await C._windowReady(a),d.default.system.debug("WRAP LIFECYCLE:WAIT DONE -- READY",a)),C.cache[a]){d.default.system.debug("WRAP LIFECYCLE:",a,"Window found in the cache, returning without going to the Launcher");const e=C.cache[a];return n({wrap:e}),void(null==t||t(null,e))}if(c&&a){const i={uuid:c,name:a,windowName:a,windowType:f};d.default.system.debug("WRAP LIFECYCLE:",a,"All information for wrap passed in, creating wrap locally");const{wrap:r}=await C._createWrap(Object.assign(Object.assign({},e),{windowIdentifier:null!==(o=e.windowIdentifier)&&void 0!==o?o:i}));return n({wrap:r}),void(null==t||t(null,r))}l.default.query("WindowService-Request-getWindowIdentifier",{windowName:e.name,requester:s},(async(r,o)=>{var s;if(r||!o.data)return d.default.system.error(r),i(r),void(null==t||t(r));if(C.cache[a]){const e=C.cache[a];return d.default.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:l}=o.data;d.default.system.debug("WRAP LIFECYCLE:",a,"Information received from launcher. Creating wrap.");const{wrap:u}=await C._createWrap(Object.assign(Object.assign({},e),{retrievedIdentifier:Object.assign(Object.assign({},l),{name:null!==(s=l.windowName)&&void 0!==s?s:l.name})}));n({wrap:u}),null==t||t(null,u)}))}))}static _createWrap(e){return new Promise((t=>{const n=e.retrievedIdentifier||e.windowIdentifier;(e.setWindowType||n.windowType)&&"WebApplication"!==n.windowType||(n.windowType="WebWindow");let i=Object.assign({},n);i=Object.assign(i,e),i=Object.assign(i,n),i.setWindowType=i.windowType,delete i.windowType,d.default.system.debug("WRAP LIFECYCLE: Placing wrap into the local cache.",n.windowName);const r=C;C.cache.hasOwnProperty(n.windowName)?d.default.system.error("DUPLICATE WRAPPER for",n.windowName):C.cache[n.windowName]=new r.types[i.setWindowType](i);let o=C.cache[n.windowName];o.windowType=n.windowType,o.identifier=n,o.setupListeners(n.windowName),t({wrap:o})}))}static _getRemoveWrapChannel(e){return`${g.System.Window.getCurrent().name}.removeWrap.${e}`}handleWrapRemoveRequest(){this.removeListeners&&this.removeListeners(),this.eventManager.cleanup();for(const e in this.eventlistenerHandlerMap)for(let t=0;t<this.eventlistenerHandlerMap[e].length;t++)this.eventlistenerHandlerMap[e][t].interceptor.removeAllListeners();this.eventManager.cleanup(),d.default.system.debug("WRAP CLOSE. Deleting cached wrap."),delete C.cache[this.name],this.cleanupRouter()}cleanupRouter(){const e=C._getRemoveWrapChannel(this.name);l.default.removeResponder(e),this.TITLE_CHANGED_SUBSCRIPTION&&l.default.unsubscribe(this.TITLE_CHANGED_SUBSCRIPTION),l.default.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,d.default.system.debug("FinsembleWindow.queryWindowService",this.windowServiceChannelName(e),t),console.debug("FinsembleWindow.queryWindowService",this,this.windowServiceChannelName(e),t);let i=null;l.default.query(this.windowServiceChannelName(e),t,((t,r)=>{t?(d.default.system.warn(`WindowService.${e}: failed`,t),console.debug(`WindowService.${e}: failed`,t)):(i=r.data,d.default.system.debug(`${this.windowServiceChannelName(e)} successful`,i),console.debug(`${this.windowServiceChannelName(e)} successful`,i)),n&&n(t,i)}))}addEventListener(e,t){this.eventManager.addEventListener(e,t)}removeEventListener(e,t){return this.eventManager.removeEventListener(e,t)}registerWithDocking(e,t){l.default.query("DockingService.registerWindow",{type:this.type,windowType:this.windowType,windowMsg:e,name:this.windowName},t)}unRegisterWithDocking(){l.default.transmit("DockingService.deregisterWindow",{name:this.windowName})}initializeWindow(e){this.registerWithDocking(e,(()=>{l.default.publish(`Finsemble.${this.windowName}.componentReady`,{name:this.windowName})}))}wrapReady(){l.default.publish(`Finsemble.${this.windowName}.wrapReady`,{name:this.windowName,state:"open"})}_minimize(e,t=Function.prototype){d.default.system.debug("BaseWindow._minimize",e),!(e=e||{}).invokedByParent&&this.parentWindow?(e.windowIdentifier=this.identifier,this.parentWindow._minimize(e,((e,n)=>{d.default.system.debug("BaseWindow._minimize parent",n),t(e,{shouldContinue:!1})}))):t(null,{shouldContinue:!0})}_maximize(e,t=Function.prototype){d.default.system.debug("BaseWindow._maximize",e),t(null,{shouldContinue:!0})}_restore(e,t){return new Promise((n=>{d.default.system.debug("BaseWindow._restore",e),!(e=e||{}).invokedByParent&&this.parentWindow?(e.windowIdentifier=this.identifier,this.parentWindow._restore(e,((e,i)=>{d.default.system.debug("BaseWindow._restore parent",i),null==t||t(e,{shouldContinue:!1}),n({err:e,data:{shouldContinue:!1}})}))):(null==t||t(null,{shouldContinue:!0}),n({data:{shouldContinue:!0}}))}))}_blur(e,t=Function.prototype){d.default.system.debug("BaseWindow._blur",e),!(e=e||{}).invokedByParent&&this.parentWindow?(e.windowIdentifier=this.identifier,this.parentWindow._blur(e,((e,n)=>{d.default.system.debug("BaseWindow._blur parent",n),t(e,{shouldContinue:!1})}))):t(null,{shouldContinue:!0})}_focus(e,t=Function.prototype){d.default.system.debug("BaseWindow._focus",e),!(e=e||{}).invokedByParent&&this.parentWindow?(e.windowIdentifier=this.identifier,this.parentWindow._focus(e,((e,n)=>{d.default.system.debug("BaseWindow._focus parent",n),t(e,{shouldContinue:!1})}))):t(null,{shouldContinue:!0})}_bringToFront(e,t=Function.prototype){d.default.system.debug("BaseWindow._bringToFront",e),!(e=e||{}).invokedByParent&&this.parentWindow?(e.windowIdentifier=this.identifier,this.parentWindow._bringToFront(e,((e,n)=>{d.default.system.debug("BaseWindow._bringToFront parent",n),t(e,{shouldContinue:!1})}))):t(null,{shouldContinue:!0})}_isShowing(e,t=Function.prototype){d.default.system.debug("BaseWindow._isShowing",e),!(e=e||{}).invokedByParent&&this.parentWindow?(e.windowIdentifier=this.identifier,this.parentWindow._isShowing(e,((e,n)=>{d.default.system.debug("BaseWindow._isShowing parent",n),t(e,{shouldContinue:!1})}))):t(null,{shouldContinue:!0})}disableFrame(e){null==e||e()}_setBounds(e,t=Function.prototype){d.default.system.verbose("BaseWindow._setBounds",e),e=e||{};const{bounds:n}=e;this.mergeBounds(n),!e.invokedByParent&&this.parentWindow?(e.windowIdentifier=this.identifier,this.parentWindow._setBounds(e,((e,n)=>{d.default.system.verbose("BaseWindow._setBounds parent",n),t(e,{shouldContinue:!1})}))):t(null,{shouldContinue:!0})}_getBounds(e,t){return new Promise((n=>{d.default.system.verbose("BaseWindow._getBounds",e),!(e=e||{}).invokedByParent&&this.parentWindow?(e.windowIdentifier=this.identifier,this.parentWindow._getBounds(e,((e,i)=>{d.default.system.verbose("BaseWindow._getBounds parent",i),t(e,i),n({err:e,data:i})}))):(t(null,{shouldContinue:!0}),n({data:{shouldContinue:!0}}))}))}_getBoundsFromSystem(e,t){d.default.system.debug("BaseWindow._getBoundsFromSystem",e),!(e=e||{}).invokedByParent&&this.parentWindow?(e.windowIdentifier=this.identifier,this.parentWindow._getBoundsFromSystem(e,((e,n)=>{d.default.system.verbose("BaseWindow._getBoundsFromSystem parent",n),t(e,n)}))):t(null,{shouldContinue:!0})}_updateOptions(e,t=Function.prototype){d.default.system.debug("BaseWindow._updateOptions",e),!(e=e||{}).invokedByParent&&this.parentWindow?(e.windowIdentifier=this.identifier,this.parentWindow._updateOptions(e,((e,n)=>{d.default.system.debug("BaseWindow._updateOptions parent",n),t(e,{shouldContinue:!1})}))):t(null,{shouldContinue:!0})}_hide(e,t=Function.prototype){d.default.system.debug("BaseWindow._hide",e),!(e=e||{}).invokedByParent&&this.parentWindow?(e.windowIdentifier=this.identifier,this.parentWindow._hide(e,((e,n)=>{d.default.system.debug("BaseWindow._hide parent",n),t(e,{shouldContinue:!1})}))):t(null,{shouldContinue:!0})}async _show(e,t){if(d.default.system.debug("BaseWindow._show",e),!(e=e||{}).invokedByParent&&this.parentWindow){e.windowIdentifier=this.identifier;const{err:n,data:i}=await this.parentWindow._show(e);return d.default.system.debug("BaseWindow._show parent",i),null==t||t(n,{shouldContinue:!1}),{err:n,data:{shouldContinue:!1}}}return null==t||t(null,{shouldContinue:!0}),{data:{shouldContinue:!0}}}_showAt(e,t=Function.prototype){d.default.system.debug("BaseWindow._showAt",e),!(e=e||{}).invokedByParent&&this.parentWindow?(e.windowIdentifier=this.identifier,this.parentWindow._showAt(e,((e,n)=>{d.default.system.debug("BaseWindow._showAt parent",n),t(e,{shouldContinue:!1})}))):t(null,{shouldContinue:!0})}_close(e={},t){return new Promise((n=>{d.default.system.debug("WRAP CLOSE. BaseWindow._close",this.name,e);const{parentWindow:i}=this;e.fromSystem?i&&"stackedwindow"===i.componentType.toLowerCase()?((e={}).removeFromWorkspace=!0,e.fromSystem=!0,e.stackedWindowIdentifier=i.identifier,i.close(e,((e,i)=>{d.default.system.debug("BaseWindow.close stacked window",i),null==t||t(e,{shouldContinue:!1}),n({err:e,data:{shouldContinue:!1}})}))):(null==t||t(null,{shouldContinue:!0}),n({data:{shouldContinue:!0}})):e.invokedByParent||e.ignoreParent||!i?(null==t||t(null,{shouldContinue:!0}),n({data:{shouldContinue:!0}})):(e.windowIdentifier=this.identifier,e.noDocking=!0,i._removeWindow(e,((e,i)=>{d.default.system.debug("BaseWindow._close parent",i),null==t||t(e,{shouldContinue:!0}),n({err:e,data:{shouldContinue:!0}})})))}))}_alwaysOnTop(e,t=Function.prototype){d.default.system.debug("BaseWindow._alwaysOnTop",e),!(e=e||{}).invokedByParent&&this.parentWindow?(e.windowIdentifier=this.identifier,this.parentWindow._alwaysOnTop(e,((e,n)=>{d.default.system.debug("BaseWindow._alwaysOnTop parent",n),t(e,{shouldContinue:!1})}))):t(null,{shouldContinue:!0})}_isAlwaysOnTop(e={},t=Function.prototype){return t(null,Boolean(this.windowOptions.alwaysOnTop)),Boolean(this.windowOptions.alwaysOnTop)}_setOpacity(e,t=Function.prototype){d.default.system.debug("BaseWindow._setOpacity",e),!(e=e||{}).invokedByParent&&this.parentWindow?(e.windowIdentifier=this.identifier,this.parentWindow._setOpacity(e,((e,n)=>{d.default.system.debug("BaseWindow._setOpacity parent",n),t(e,{shouldContinue:!1})}))):t(null,{shouldContinue:!0})}_saveWindowOptions(e,t=Function.prototype){d.default.system.debug("BaseWindow._saveWindowOptions",e),!(e=e||{}).invokedByParent&&this.parentWindow?(e.windowIdentifier=this.identifier,this.parentWindow._saveWindowOptions(e,((e,n)=>{d.default.system.debug("BaseWindow._saveWindowOptions parent",n),t(e,{shouldContinue:!0})}))):t(null,{shouldContinue:!0})}_getOptions(e,t=Function.prototype){return t(null,{})}startTabTileMonitoring(e){d.default.system.debug("BaseWindow.startTabTileMonitoring",e),l.default.transmit("TabTile.startTabTile",{params:e})}stopTabTileMonitoring(e,t){d.default.system.debug("BaseWindow.stopTabTileMonitoring",e),l.default.query("TabTile.stopTabTile",{params:e},(function(e,n){e?d.default.system.warn("TabTile.stopTabTile: query failed",e):d.default.system.debug("TabTile.stopTabTile results",n.data);const i=n.data;t?t(e,i,this.defaultStopTrackingAction):this.defaultTabTileAction(i)}))}defaultTabTileAction(e){const t=this;switch(d.default.system.debug("BaseWindow.defaultTabTileAction",e),e.stoppedLocation){case"OutsideWindow":case"TabSection":break;case"InsideWindow":e.tileGroupId?t.Group.addWindow(this.identifier,e.tileGroupId,e.dropCoordinates):t.Group.createGroup((function(n){t.Group.addWindow(this.identifier,n,e.dropCoordinates,{startingWindowIdentifier:e.droppedOnWindowIdentifier})}));break;default:d.default.system.error("stopTracking returned an unknown stoppedLocation result",e)}}mergeBounds(e){if(!e||!Number.isInteger(e.top))return console.error("Invalid bounds",e),void d.default.system.warn("BaseWindow.mergeBounds Invalid bounds","bounds=",e);const t={top:Math.round(e.top),left:Math.round(e.left),width:Math.round(e.width),height:Math.round(e.height)};t.bottom=t.top+t.height,t.right=t.left+t.width;const n={defaultLeft:t.left,defaultWidth:t.width,defaultTop:t.top,defaultHeight:t.height};Object.assign(this.windowOptions,t),Object.assign(this.windowOptions,n),this.windowOptions.bounds=t}startMove(e){d.default.system.debug("BaseWindow.startMove",e),(e=e||{}).windowIdentifier=this.identifier,this.eventManager.trigger("bounds-change-start",Object.assign({},this.windowOptions.bounds))}stopMove(e){d.default.system.debug("BaseWindow.stopMove",e),(e=e||{}).windowIdentifier=this.identifier,this.eventManager.trigger("bounds-change-end",Object.assign({name:this.name,eventName:"bounds-change-end",dockedPosition:this.dockedPosition},this.windowOptions.bounds))}async getFSBLState(e,t){d.default.system.debug("BaseWindow.getState",e);const{err:n,data:i}=await y.default.getStandardized({topic:m.WORKSPACE.CACHE_STORAGE_TOPIC,key:e.key});"componentState"===e.stateVar&&(this.componentState=i);const{field:r,fields:o}=e;if(!n&&i){if(r)return null==t||t(n,i[r]),{data:i[r]};if(o){const e={};for(let t=0;t<o.length;t++)i[o[t]]&&(e[o[t]]=i[o[t]]);return null==t||t(null,e),{data:e}}return null==t||t(null,i),{data:i}}{const r="Not found";return d.default.system.info("WindowClient:getComponentState:error, response, params",n,i,e),null==t||t(r,i),{err:r}}}getComponentState(e,t){return e||(e={}),e.fields&&!Array.isArray(e.fields)&&(e.fields=[e.fields]),this.getFSBLState(Object.assign(Object.assign({},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(Object.assign(Object.assign({},e),{key:this.componentKey,stateVar:"componentState"}),t)}removeComponentState(e,t=(()=>{})){return e.fields&&!Array.isArray(e.fields)&&(e.fields=[e.fields]),this.removeFSBLState(Object.assign(Object.assign({},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(Object.assign(Object.assign({},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(!C.additionalWorkspaceFields)try{const e=await u.default.getValue("finsemble.servicesConfig.window.additionalWorkspaceFields");C.additionalWorkspaceFields=e.data||[]}catch(e){C.additionalWorkspaceFields=[]}let n;n=m.WORKSPACE.ADDITIONAL_WINDOW_PROPS[e.windowType]?m.WORKSPACE.ADDITIONAL_WINDOW_PROPS[e.windowType]:m.WORKSPACE.ADDITIONAL_WINDOW_PROPS.WebWindow,"WebApplication"===e.windowType&&(e.windowType="WebWindow");const i=[...m.WORKSPACE.DEFAULT_WINDOW_PROPS,...n,...C.additionalWorkspaceFields];for(const n of i)void 0!==e[n]&&(t[n]=e[n]);return t}async saveCompleteWindowState(e,t=Function.prototype){if(d.default.system.debug("COMPONENT LIFECYCLE:SAVING STATE:",e.name),e){"StackedWindow"===e.windowType&&(e.componentType="StackedWindow",this.mergeBounds(e.bounds));const n=await C.cleanupState(e);if((0,c.isEqualIgnoringArrayOrder)(this.oldState,n))d.default.system.debug("saveCompleteWindowState -- deep equal"),t();else{d.default.system.debug("saveCompleteWindowState -- not deep equal",this.oldState,n),this.oldState=(0,b.default)(n);try{await v.default._setWindowState({windowName:this.windowName,state:{windowData:n}})}catch(e){}t()}}else t("No State Provided")}async setFSBLState(e,t){const n={key:e.key,stateVar:e.stateVar};n.key||("componentState"===n.stateVar?n.key=this.componentKey:"windowData"===n.stateVar&&(n.key=this.windowKey));const i="componentState"===e.stateVar?"componentState":"windowOptions";await this.getFSBLState(n),d.default.system.debug("BaseWindow.getState",e);let r=(0,a.default)(this[i],{}),{fields:o}=e;e.field&&(o=[{field:e.field,value:e.value}]);for(let e=0;e<o.length;e++){const t=o[e];t.field&&void 0!==t.value&&(r[t.field]=t.value)}e.value=r,d.default.system.debug(`COMPONENT LIFECYCLE: SAVING ${e.stateVar}:`,r),"windowData"===e.stateVar&&(r=await C.cleanupState(r));try{await v.default._setWindowState({windowName:this.windowName,state:{[e.stateVar]:r}})}catch(e){}this[i]=r,null==t||t()}removeFSBLState(e,t=(()=>{})){var n;const i={key:e.key,stateVar:e.stateVar},r="componentState"===i.stateVar?this.componentKey:this.windowKey,o=null!==(n=i.key)&&void 0!==n?n:r,s="componentState"===e.stateVar?"componentState":"windowOptions";this.getFSBLState(Object.assign(Object.assign({},i),{key:o}),(async()=>{var n;d.default.system.debug("BaseWindow.getState",e);let i=(0,a.default)(this[s],{}),{fields:r=[]}=e;e.field&&(r=[{field:e.field}]);for(let e=0;e<r.length;e++){const t=r[e];t.field&&delete i[t.field]}e.value=i,d.default.system.debug(`COMPONENT LIFECYCLE: SAVING ${e.stateVar}:`,i),"windowData"===e.stateVar&&(i=await C.cleanupState(i));const o=null!==(n=e.stateVar)&&void 0!==n?n:"windowData";try{await v.default._setWindowState({windowName:this.windowName,state:{[o]:i}})}catch(e){}this[s]=i,t(null)}))}cancelTabTileMonitoring(e){d.default.system.debug("BaseWindow.cancelTabTileMonitoring",e),l.default.transmit("TabTile.cancelTabTile",{params:e})}getParent(){return this.parentWindow}setParent(e,t=Function.prototype){this.parentWindow&&this.parentWindow.name===e.windowName?(d.default.system.debug("BaseWindow.setParent already set",e),t(null,e)):(d.default.system.debug("BaseWindow.setParent",e),C.getInstance(e,((n,i)=>{n?d.default.system.error("BaseWindow.setParent error",n):(d.default.system.debug("BaseWindow.setParent wrap success",e),console.debug("BaseWindow.setParent wrap success",this,i),this.parentWindow=i,this.eventManager.trigger("parent-set",{parentName:this.parentWindow.name})),t(n,e)})))}clearParent(){d.default.system.debug("BaseWindow.clearParent"),this.parentWindow=null,this.eventManager.trigger("parent-unset",this.parentWindow)}setTitle(e){this.windowOptions&&(this.windowOptions.title=e),d.default.system.debug("Title change",e),l.default.publish(this.TITLE_CHANGED_CHANNEL,{title:e,windowName:this.windowName})}close(e={},t){return new Promise((n=>{this.queryWindowService("close",e,((e,i)=>{null==t||t(e,i),n({err:e})}))}))}_animate(e,t){"function"==typeof e&&(t=e,e=null),t("Method not implemented for window",{shouldContinue:!0})}}t.BaseWindow=C,C.cache={},C.WINDOWSTATE=p.WINDOWSTATE,C.wrap=C.getInstance,C._windowReady=e=>new Promise((async t=>{d.default.system.debug(`windowServiceReady: ${e} waiting`);const n=l.default.subscribe(`Finsemble.Component.State.${e}`,((i,r)=>{const{state:o}=r.data;switch(d.default.system.debug(`windowServiceReady: ${e} state change: ${o}`),o){case"ready":case"reloading":case"closing":d.default.system.debug(`windowServiceReady: ${e} ${o}`),l.default.unsubscribe(n),t();break;default:d.default.system.debug(`windowServiceReady default: ${e} ${o}`)}}))}))},10600:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},57746:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},24508:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},74443:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},46888:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},95281:(e,t)=>{"use strict";var n,i,r;Object.defineProperty(t,"__esModule",{value:!0}),t.ChannelError=t.ResolveError=t.OpenError=void 0,(r=t.OpenError||(t.OpenError={})).AppNotFound="AppNotFound",r.ErrorOnLaunch="ErrorOnLaunch",r.AppTimeout="AppTimeout",r.ResolverUnavailable="ResolverUnavailable",(i=t.ResolveError||(t.ResolveError={})).NoAppsFound="NoAppsFound",i.ResolverUnavailable="ResolverUnavailable",i.ResolverTimeout="ResolverTimeout",(n=t.ChannelError||(t.ChannelError={})).NoChannelFound="NoChannelFound",n.AccessDenied="AccessDenied",n.CreationFailed="CreationFailed"},14414:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},56911:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},27154:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},86414:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},22225:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},896:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ContextTypes=void 0,(n=t.ContextTypes||(t.ContextTypes={})).Contact="fdc3.contact",n.ContactList="fdc3.contactList",n.Country="fdc3.country",n.Instrument="fdc3.instrument",n.Organization="fdc3.organization",n.Portfolio="fdc3.portfolio",n.Position="fdc3.position"},80976:(e,t)=>{"use strict";function n(e,t,n=""){if(n)throw Error(`Invalid value for key "${n}". Expected type ${JSON.stringify(e)} but got ${JSON.stringify(t)}`);throw Error(`Invalid value ${JSON.stringify(t)} for type ${JSON.stringify(e)}`)}function i(e){if(void 0===e.jsonToJS){const t={};e.props.forEach((e=>t[e.json]={key:e.js,typ:e.typ})),e.jsonToJS=t}return e.jsonToJS}function r(e){if(void 0===e.jsToJSON){const t={};e.props.forEach((e=>t[e.js]={key:e.json,typ:e.typ})),e.jsToJSON=t}return e.jsToJSON}function o(e,t,i,r=""){if("any"===t)return e;if(null===t)return null===e?e:n(t,e);if(!1===t)return n(t,e);for(;"object"==typeof t&&void 0!==t.ref;)t=h[t.ref];return Array.isArray(t)?function(e,t){return-1!==e.indexOf(t)?t:n(e,t)}(t,e):"object"==typeof t?t.hasOwnProperty("unionMembers")?function(e,t){const r=e.length;for(let n=0;n<r;n++){const r=e[n];try{return o(t,r,i)}catch(e){}}return n(e,t)}(t.unionMembers,e):t.hasOwnProperty("arrayItems")?function(e,t){return Array.isArray(t)?t.map((t=>o(t,e,i))):n("array",t)}(t.arrayItems,e):t.hasOwnProperty("props")?function(e,t,r){if(null===r||"object"!=typeof r||Array.isArray(r))return n("object",r);const s={};return Object.getOwnPropertyNames(e).forEach((t=>{const n=e[t],a=Object.prototype.hasOwnProperty.call(r,t)?r[t]:void 0;s[n.key]=o(a,n.typ,i,n.key)})),Object.getOwnPropertyNames(r).forEach((n=>{Object.prototype.hasOwnProperty.call(e,n)||(s[n]=o(r[n],t,i,n))})),s}(i(t),t.additional,e):n(t,e):t===Date&&"number"!=typeof e?function(e){if(null===e)return null;const t=new Date(e);return isNaN(t.valueOf())?n("Date",e):t}(e):function(e,t){return typeof e==typeof t?t:n(e,t,r)}(t,e)}function s(e,t){return o(e,t,i)}function a(e,t){return o(e,t,r)}function l(e){return{arrayItems:e}}function u(...e){return{unionMembers:e}}function d(e,t){return{props:e,additional:t}}function c(e){return{props:[],additional:e}}function f(e){return{ref:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Convert=void 0,t.Convert=class{static toContext(e){return s(JSON.parse(e),f("Context"))}static contextToJson(e){return JSON.stringify(a(e,f("Context")),null,2)}static toContact(e){return s(JSON.parse(e),f("Contact"))}static contactToJson(e){return JSON.stringify(a(e,f("Contact")),null,2)}static toContactList(e){return s(JSON.parse(e),f("ContactList"))}static contactListToJson(e){return JSON.stringify(a(e,f("ContactList")),null,2)}static toInstrument(e){return s(JSON.parse(e),f("Instrument"))}static instrumentToJson(e){return JSON.stringify(a(e,f("Instrument")),null,2)}static toInstrumentList(e){return s(JSON.parse(e),f("InstrumentList"))}static instrumentListToJson(e){return JSON.stringify(a(e,f("InstrumentList")),null,2)}static toCountry(e){return s(JSON.parse(e),f("Country"))}static countryToJson(e){return JSON.stringify(a(e,f("Country")),null,2)}static toOrganization(e){return s(JSON.parse(e),f("Organization"))}static organizationToJson(e){return JSON.stringify(a(e,f("Organization")),null,2)}static toPortfolio(e){return s(JSON.parse(e),f("Portfolio"))}static portfolioToJson(e){return JSON.stringify(a(e,f("Portfolio")),null,2)}static toPosition(e){return s(JSON.parse(e),f("Position"))}static positionToJson(e){return JSON.stringify(a(e,f("Position")),null,2)}};const h={Context:d([{json:"id",js:"id",typ:u(void 0,c(""))},{json:"name",js:"name",typ:u(void 0,"")},{json:"type",js:"type",typ:""}],"any"),ContactList:d([{json:"contacts",js:"contacts",typ:l(f("Contact"))},{json:"type",js:"type",typ:""},{json:"id",js:"id",typ:u(void 0,c(""))},{json:"name",js:"name",typ:u(void 0,"")}],"any"),Contact:d([{json:"id",js:"id",typ:f("ContactID")},{json:"type",js:"type",typ:""},{json:"name",js:"name",typ:u(void 0,"")}],"any"),ContactID:d([{json:"email",js:"email",typ:u(void 0,"")},{json:"FDS_ID",js:"FDS_ID",typ:u(void 0,"")}],""),InstrumentList:d([{json:"instruments",js:"instruments",typ:l(f("Instrument"))},{json:"type",js:"type",typ:""},{json:"id",js:"id",typ:u(void 0,c(""))},{json:"name",js:"name",typ:u(void 0,"")}],"any"),Instrument:d([{json:"id",js:"id",typ:f("InstrumentID")},{json:"type",js:"type",typ:""},{json:"name",js:"name",typ:u(void 0,"")}],"any"),InstrumentID:d([{json:"BBG",js:"BBG",typ:u(void 0,"")},{json:"CUSIP",js:"CUSIP",typ:u(void 0,"")},{json:"FDS_ID",js:"FDS_ID",typ:u(void 0,"")},{json:"FIGI",js:"FIGI",typ:u(void 0,"")},{json:"ISIN",js:"ISIN",typ:u(void 0,"")},{json:"PERMID",js:"PERMID",typ:u(void 0,"")},{json:"RIC",js:"RIC",typ:u(void 0,"")},{json:"SEDOL",js:"SEDOL",typ:u(void 0,"")},{json:"ticker",js:"ticker",typ:u(void 0,"")}],""),Country:d([{json:"id",js:"id",typ:f("CountryID")},{json:"type",js:"type",typ:""},{json:"name",js:"name",typ:u(void 0,"")}],"any"),CountryID:d([{json:"ISOALPHA2",js:"ISOALPHA2",typ:u(void 0,"")},{json:"ISOALPHA3",js:"ISOALPHA3",typ:u(void 0,"")}],""),Organization:d([{json:"id",js:"id",typ:f("OrganizationID")},{json:"type",js:"type",typ:""},{json:"name",js:"name",typ:u(void 0,"")}],"any"),OrganizationID:d([{json:"FDS_ID",js:"FDS_ID",typ:u(void 0,"")},{json:"LEI",js:"LEI",typ:u(void 0,"")},{json:"PERMID",js:"PERMID",typ:u(void 0,"")}],""),Portfolio:d([{json:"positions",js:"positions",typ:l(f("Position"))},{json:"type",js:"type",typ:""},{json:"id",js:"id",typ:u(void 0,c(""))},{json:"name",js:"name",typ:u(void 0,"")}],"any"),Position:d([{json:"holding",js:"holding",typ:3.14},{json:"instrument",js:"instrument",typ:f("Instrument")},{json:"type",js:"type",typ:""},{json:"id",js:"id",typ:u(void 0,c(""))},{json:"name",js:"name",typ:u(void 0,"")}],"any")}},63250:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(10600),t),r(n(57746),t),r(n(24508),t),r(n(22225),t),r(n(74443),t),r(n(46888),t),r(n(95281),t),r(n(56911),t),r(n(27154),t),r(n(86414),t),r(n(14414),t),r(n(896),t),r(n(80976),t),r(n(59579),t)},59579:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Intents=void 0,(n=t.Intents||(t.Intents={})).StartCall="StartCall",n.StartChat="StartChat",n.ViewChart="ViewChart",n.ViewContact="ViewContact",n.ViewQuote="ViewQuote",n.ViewNews="ViewNews",n.ViewInstrument="ViewInstrument",n.ViewAnalysis="ViewAnalysis"},21614:(e,t,n)=>{"use strict";var i;n.r(t),n.d(t,{NIL:()=>k,parse:()=>m,stringify:()=>d,v1:()=>g,v3:()=>A,v4:()=>L,v5:()=>O,validate:()=>a,version:()=>I});var r=new Uint8Array(16);function o(){if(!i&&!(i="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return i(r)}const s=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,a=function(e){return"string"==typeof e&&s.test(e)};for(var l=[],u=0;u<256;++u)l.push((u+256).toString(16).substr(1));const d=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(l[e[t+0]]+l[e[t+1]]+l[e[t+2]]+l[e[t+3]]+"-"+l[e[t+4]]+l[e[t+5]]+"-"+l[e[t+6]]+l[e[t+7]]+"-"+l[e[t+8]]+l[e[t+9]]+"-"+l[e[t+10]]+l[e[t+11]]+l[e[t+12]]+l[e[t+13]]+l[e[t+14]]+l[e[t+15]]).toLowerCase();if(!a(n))throw TypeError("Stringified UUID is invalid");return n};var c,f,h=0,p=0;const g=function(e,t,n){var i=t&&n||0,r=t||new Array(16),s=(e=e||{}).node||c,a=void 0!==e.clockseq?e.clockseq:f;if(null==s||null==a){var l=e.random||(e.rng||o)();null==s&&(s=c=[1|l[0],l[1],l[2],l[3],l[4],l[5]]),null==a&&(a=f=16383&(l[6]<<8|l[7]))}var u=void 0!==e.msecs?e.msecs:Date.now(),g=void 0!==e.nsecs?e.nsecs:p+1,m=u-h+(g-p)/1e4;if(m<0&&void 0===e.clockseq&&(a=a+1&16383),(m<0||u>h)&&void 0===e.nsecs&&(g=0),g>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");h=u,p=g,f=a;var w=(1e4*(268435455&(u+=122192928e5))+g)%4294967296;r[i++]=w>>>24&255,r[i++]=w>>>16&255,r[i++]=w>>>8&255,r[i++]=255&w;var y=u/4294967296*1e4&268435455;r[i++]=y>>>8&255,r[i++]=255&y,r[i++]=y>>>24&15|16,r[i++]=y>>>16&255,r[i++]=a>>>8|128,r[i++]=255&a;for(var v=0;v<6;++v)r[i+v]=s[v];return t||d(r)},m=function(e){if(!a(e))throw TypeError("Invalid UUID");var t,n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n};function w(e,t,n){function i(e,i,r,o){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=[],n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t}(e)),"string"==typeof i&&(i=m(i)),16!==i.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var s=new Uint8Array(16+e.length);if(s.set(i),s.set(e,i.length),(s=n(s))[6]=15&s[6]|t,s[8]=63&s[8]|128,r){o=o||0;for(var a=0;a<16;++a)r[o+a]=s[a];return r}return d(s)}try{i.name=e}catch(e){}return i.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",i.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",i}function y(e){return 14+(e+64>>>9<<4)+1}function v(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function b(e,t,n,i,r,o){return v((s=v(v(t,e),v(i,o)))<<(a=r)|s>>>32-a,n);var s,a}function S(e,t,n,i,r,o,s){return b(t&n|~t&i,e,t,r,o,s)}function C(e,t,n,i,r,o,s){return b(t&i|n&~i,e,t,r,o,s)}function _(e,t,n,i,r,o,s){return b(t^n^i,e,t,r,o,s)}function W(e,t,n,i,r,o,s){return b(n^(t|~i),e,t,r,o,s)}const A=w("v3",48,(function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var n=0;n<t.length;++n)e[n]=t.charCodeAt(n)}return function(e){for(var t=[],n=32*e.length,i="0123456789abcdef",r=0;r<n;r+=8){var o=e[r>>5]>>>r%32&255,s=parseInt(i.charAt(o>>>4&15)+i.charAt(15&o),16);t.push(s)}return t}(function(e,t){e[t>>5]|=128<<t%32,e[y(t)-1]=t;for(var n=1732584193,i=-271733879,r=-1732584194,o=271733878,s=0;s<e.length;s+=16){var a=n,l=i,u=r,d=o;n=S(n,i,r,o,e[s],7,-680876936),o=S(o,n,i,r,e[s+1],12,-389564586),r=S(r,o,n,i,e[s+2],17,606105819),i=S(i,r,o,n,e[s+3],22,-1044525330),n=S(n,i,r,o,e[s+4],7,-176418897),o=S(o,n,i,r,e[s+5],12,1200080426),r=S(r,o,n,i,e[s+6],17,-1473231341),i=S(i,r,o,n,e[s+7],22,-45705983),n=S(n,i,r,o,e[s+8],7,1770035416),o=S(o,n,i,r,e[s+9],12,-1958414417),r=S(r,o,n,i,e[s+10],17,-42063),i=S(i,r,o,n,e[s+11],22,-1990404162),n=S(n,i,r,o,e[s+12],7,1804603682),o=S(o,n,i,r,e[s+13],12,-40341101),r=S(r,o,n,i,e[s+14],17,-1502002290),n=C(n,i=S(i,r,o,n,e[s+15],22,1236535329),r,o,e[s+1],5,-165796510),o=C(o,n,i,r,e[s+6],9,-1069501632),r=C(r,o,n,i,e[s+11],14,643717713),i=C(i,r,o,n,e[s],20,-373897302),n=C(n,i,r,o,e[s+5],5,-701558691),o=C(o,n,i,r,e[s+10],9,38016083),r=C(r,o,n,i,e[s+15],14,-660478335),i=C(i,r,o,n,e[s+4],20,-405537848),n=C(n,i,r,o,e[s+9],5,568446438),o=C(o,n,i,r,e[s+14],9,-1019803690),r=C(r,o,n,i,e[s+3],14,-187363961),i=C(i,r,o,n,e[s+8],20,1163531501),n=C(n,i,r,o,e[s+13],5,-1444681467),o=C(o,n,i,r,e[s+2],9,-51403784),r=C(r,o,n,i,e[s+7],14,1735328473),n=_(n,i=C(i,r,o,n,e[s+12],20,-1926607734),r,o,e[s+5],4,-378558),o=_(o,n,i,r,e[s+8],11,-2022574463),r=_(r,o,n,i,e[s+11],16,1839030562),i=_(i,r,o,n,e[s+14],23,-35309556),n=_(n,i,r,o,e[s+1],4,-1530992060),o=_(o,n,i,r,e[s+4],11,1272893353),r=_(r,o,n,i,e[s+7],16,-155497632),i=_(i,r,o,n,e[s+10],23,-1094730640),n=_(n,i,r,o,e[s+13],4,681279174),o=_(o,n,i,r,e[s],11,-358537222),r=_(r,o,n,i,e[s+3],16,-722521979),i=_(i,r,o,n,e[s+6],23,76029189),n=_(n,i,r,o,e[s+9],4,-640364487),o=_(o,n,i,r,e[s+12],11,-421815835),r=_(r,o,n,i,e[s+15],16,530742520),n=W(n,i=_(i,r,o,n,e[s+2],23,-995338651),r,o,e[s],6,-198630844),o=W(o,n,i,r,e[s+7],10,1126891415),r=W(r,o,n,i,e[s+14],15,-1416354905),i=W(i,r,o,n,e[s+5],21,-57434055),n=W(n,i,r,o,e[s+12],6,1700485571),o=W(o,n,i,r,e[s+3],10,-1894986606),r=W(r,o,n,i,e[s+10],15,-1051523),i=W(i,r,o,n,e[s+1],21,-2054922799),n=W(n,i,r,o,e[s+8],6,1873313359),o=W(o,n,i,r,e[s+15],10,-30611744),r=W(r,o,n,i,e[s+6],15,-1560198380),i=W(i,r,o,n,e[s+13],21,1309151649),n=W(n,i,r,o,e[s+4],6,-145523070),o=W(o,n,i,r,e[s+11],10,-1120210379),r=W(r,o,n,i,e[s+2],15,718787259),i=W(i,r,o,n,e[s+9],21,-343485551),n=v(n,a),i=v(i,l),r=v(r,u),o=v(o,d)}return[n,i,r,o]}(function(e){if(0===e.length)return[];for(var t=8*e.length,n=new Uint32Array(y(t)),i=0;i<t;i+=8)n[i>>5]|=(255&e[i/8])<<i%32;return n}(e),8*e.length))})),L=function(e,t,n){var i=(e=e||{}).random||(e.rng||o)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t){n=n||0;for(var r=0;r<16;++r)t[n+r]=i[r];return t}return d(i)};function E(e,t,n,i){switch(e){case 0:return t&n^~t&i;case 1:case 3:return t^n^i;case 2:return t&n^t&i^n&i}}function T(e,t){return e<<t|e>>>32-t}const O=w("v5",80,(function(e){var t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var i=unescape(encodeURIComponent(e));e=[];for(var r=0;r<i.length;++r)e.push(i.charCodeAt(r))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var o=e.length/4+2,s=Math.ceil(o/16),a=new Array(s),l=0;l<s;++l){for(var u=new Uint32Array(16),d=0;d<16;++d)u[d]=e[64*l+4*d]<<24|e[64*l+4*d+1]<<16|e[64*l+4*d+2]<<8|e[64*l+4*d+3];a[l]=u}a[s-1][14]=8*(e.length-1)/Math.pow(2,32),a[s-1][14]=Math.floor(a[s-1][14]),a[s-1][15]=8*(e.length-1)&4294967295;for(var c=0;c<s;++c){for(var f=new Uint32Array(80),h=0;h<16;++h)f[h]=a[c][h];for(var p=16;p<80;++p)f[p]=T(f[p-3]^f[p-8]^f[p-14]^f[p-16],1);for(var g=n[0],m=n[1],w=n[2],y=n[3],v=n[4],b=0;b<80;++b){var S=Math.floor(b/20),C=T(g,5)+E(S,m,w,y)+v+t[S]+f[b]>>>0;v=y,y=w,w=T(m,30)>>>0,m=g,g=C}n[0]=n[0]+g>>>0,n[1]=n[1]+m>>>0,n[2]=n[2]+w>>>0,n[3]=n[3]+y>>>0,n[4]=n[4]+v>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]})),k="00000000-0000-0000-0000-000000000000",I=function(e){if(!a(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}},1641:(e,t,n)=>{"use strict";function i(e,...t){return(...n)=>e(...t,...n)}function r(e){return function(...t){var n=t.pop();return e.call(this,t,n)}}n.r(t),n.d(t,{default:()=>pt,apply:()=>i,applyEach:()=>k,applyEachSeries:()=>N,asyncify:()=>c,auto:()=>F,autoInject:()=>$,cargo:()=>q,cargoQueue:()=>V,compose:()=>K,concat:()=>Z,concatLimit:()=>J,concatSeries:()=>X,constant:()=>ee,detect:()=>ne,detectLimit:()=>ie,detectSeries:()=>re,dir:()=>se,doUntil:()=>le,doWhilst:()=>ae,each:()=>de,eachLimit:()=>ce,eachOf:()=>T,eachOfLimit:()=>A,eachOfSeries:()=>I,eachSeries:()=>fe,ensureAsync:()=>he,every:()=>pe,everyLimit:()=>ge,everySeries:()=>me,filter:()=>be,filterLimit:()=>Se,filterSeries:()=>Ce,forever:()=>_e,groupBy:()=>Ae,groupByLimit:()=>We,groupBySeries:()=>Le,log:()=>Ee,map:()=>O,mapLimit:()=>Q,mapSeries:()=>R,mapValues:()=>Oe,mapValuesLimit:()=>Te,mapValuesSeries:()=>ke,memoize:()=>Ie,nextTick:()=>Re,parallel:()=>Pe,parallelLimit:()=>Me,priorityQueue:()=>Be,queue:()=>Fe,race:()=>$e,reduce:()=>z,reduceRight:()=>Ue,reflect:()=>He,reflectAll:()=>Ge,reject:()=>Ve,rejectLimit:()=>ze,rejectSeries:()=>Ye,retry:()=>Qe,retryable:()=>Ze,seq:()=>Y,series:()=>Xe,setImmediate:()=>d,some:()=>et,someLimit:()=>tt,someSeries:()=>nt,sortBy:()=>it,timeout:()=>rt,times:()=>st,timesLimit:()=>ot,timesSeries:()=>at,transform:()=>lt,tryEach:()=>ut,unmemoize:()=>dt,until:()=>ft,waterfall:()=>ht,whilst:()=>ct,all:()=>pe,allLimit:()=>ge,allSeries:()=>me,any:()=>et,anyLimit:()=>tt,anySeries:()=>nt,find:()=>ne,findLimit:()=>ie,findSeries:()=>re,flatMap:()=>Z,flatMapLimit:()=>J,flatMapSeries:()=>X,forEach:()=>de,forEachSeries:()=>fe,forEachLimit:()=>ce,forEachOf:()=>T,forEachOfSeries:()=>I,forEachOfLimit:()=>A,inject:()=>z,foldl:()=>z,foldr:()=>Ue,select:()=>be,selectLimit:()=>Se,selectSeries:()=>Ce,wrapSync:()=>c,during:()=>ct,doDuring:()=>ae});var o="function"==typeof queueMicrotask&&queueMicrotask,s="function"==typeof setImmediate&&setImmediate,a="object"==typeof process&&"function"==typeof process.nextTick;function l(e){setTimeout(e,0)}function u(e){return(t,...n)=>e((()=>t(...n)))}var d=u(o?queueMicrotask:s?setImmediate:a?process.nextTick:l);function c(e){return p(e)?function(...t){const n=t.pop();return f(e.apply(this,t),n)}:r((function(t,n){var i;try{i=e.apply(this,t)}catch(e){return n(e)}if(i&&"function"==typeof i.then)return f(i,n);n(null,i)}))}function f(e,t){return e.then((e=>{h(t,null,e)}),(e=>{h(t,e&&e.message?e:new Error(e))}))}function h(e,t,n){try{e(t,n)}catch(e){d((e=>{throw e}),e)}}function p(e){return"AsyncFunction"===e[Symbol.toStringTag]}function g(e){if("function"!=typeof e)throw new Error("expected a function");return p(e)?c(e):e}function m(e,t=e.length){if(!t)throw new Error("arity is undefined");return function(...n){return"function"==typeof n[t-1]?e.apply(this,n):new Promise(((i,r)=>{n[t-1]=(e,...t)=>{if(e)return r(e);i(t.length>1?t:t[0])},e.apply(this,n)}))}}function w(e){return function(t,...n){return m((function(i){var r=this;return e(t,((e,t)=>{g(e).apply(r,n.concat(t))}),i)}))}}function y(e,t,n,i){t=t||[];var r=[],o=0,s=g(n);return e(t,((e,t,n)=>{var i=o++;s(e,((e,t)=>{r[i]=t,n(e)}))}),(e=>{i(e,r)}))}function v(e){return e&&"number"==typeof e.length&&e.length>=0&&e.length%1==0}const b={};function S(e){function t(...t){if(null!==e){var n=e;e=null,n.apply(this,t)}}return Object.assign(t,e),t}function C(e){return function(...t){if(null===e)throw new Error("Callback was already called.");var n=e;e=null,n.apply(this,t)}}function _(e,t,n,i){let r=!1,o=!1,s=!1,a=0,l=0;function u(){a>=t||s||r||(s=!0,e.next().then((({value:e,done:t})=>{if(!o&&!r){if(s=!1,t)return r=!0,void(a<=0&&i(null));a++,n(e,l,d),l++,u()}})).catch(c))}function d(e,t){if(a-=1,!o)return e?c(e):!1===e?(r=!0,void(o=!0)):t===b||r&&a<=0?(r=!0,i(null)):void u()}function c(e){o||(s=!1,r=!0,i(e))}u()}var W=e=>(t,n,i)=>{if(i=S(i),e<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!t)return i(null);if("AsyncGenerator"===t[Symbol.toStringTag])return _(t,e,n,i);if(function(e){return"function"==typeof e[Symbol.asyncIterator]}(t))return _(t[Symbol.asyncIterator](),e,n,i);var r=function(e){if(v(e))return function(e){var t=-1,n=e.length;return function(){return++t<n?{value:e[t],key:t}:null}}(e);var t,n,i,r,o=function(e){return e[Symbol.iterator]&&e[Symbol.iterator]()}(e);return o?function(e){var t=-1;return function(){var n=e.next();return n.done?null:(t++,{value:n.value,key:t})}}(o):(n=(t=e)?Object.keys(t):[],i=-1,r=n.length,function e(){var o=n[++i];return"__proto__"===o?e():i<r?{value:t[o],key:o}:null})}(t),o=!1,s=!1,a=0,l=!1;function u(e,t){if(!s)if(a-=1,e)o=!0,i(e);else if(!1===e)o=!0,s=!0;else{if(t===b||o&&a<=0)return o=!0,i(null);l||d()}}function d(){for(l=!0;a<e&&!o;){var t=r();if(null===t)return o=!0,void(a<=0&&i(null));a+=1,n(t.value,t.key,C(u))}l=!1}d()},A=m((function(e,t,n,i){return W(t)(e,g(n),i)}),4);function L(e,t,n){n=S(n);var i=0,r=0,{length:o}=e,s=!1;function a(e,t){!1===e&&(s=!0),!0!==s&&(e?n(e):++r!==o&&t!==b||n(null))}for(0===o&&n(null);i<o;i++)t(e[i],i,C(a))}function E(e,t,n){return A(e,1/0,t,n)}var T=m((function(e,t,n){return(v(e)?L:E)(e,g(t),n)}),3),O=m((function(e,t,n){return y(T,e,t,n)}),3),k=w(O),I=m((function(e,t,n){return A(e,1,t,n)}),3),R=m((function(e,t,n){return y(I,e,t,n)}),3),N=w(R);const P=Symbol("promiseCallback");function M(){let e,t;function n(n,...i){if(n)return t(n);e(i.length>1?i:i[0])}return n[P]=new Promise(((n,i)=>{e=n,t=i})),n}function F(e,t,n){"number"!=typeof t&&(n=t,t=null),n=S(n||M());var i=Object.keys(e).length;if(!i)return n(null);t||(t=i);var r={},o=0,s=!1,a=!1,l=Object.create(null),u=[],d=[],c={};function f(e,t){u.push((()=>function(e,t){if(!a){var i=C(((t,...i)=>{if(o--,!1!==t)if(i.length<2&&([i]=i),t){var u={};if(Object.keys(r).forEach((e=>{u[e]=r[e]})),u[e]=i,a=!0,l=Object.create(null),s)return;n(t,u)}else r[e]=i,(l[e]||[]).forEach((e=>e())),h();else s=!0}));o++;var u=g(t[t.length-1]);t.length>1?u(r,i):u(i)}}(e,t)))}function h(){if(!s){if(0===u.length&&0===o)return n(null,r);for(;u.length&&o<t;)u.shift()()}}function p(t){var n=[];return Object.keys(e).forEach((i=>{const r=e[i];Array.isArray(r)&&r.indexOf(t)>=0&&n.push(i)})),n}return Object.keys(e).forEach((t=>{var n=e[t];if(!Array.isArray(n))return f(t,[n]),void d.push(t);var i=n.slice(0,n.length-1),r=i.length;if(0===r)return f(t,n),void d.push(t);c[t]=r,i.forEach((o=>{if(!e[o])throw new Error("async.auto task `"+t+"` has a non-existent dependency `"+o+"` in "+i.join(", "));var s,a;(a=l[s=o])||(a=l[s]=[]),a.push((()=>{0==--r&&f(t,n)}))}))})),function(){for(var e=0;d.length;)e++,p(d.pop()).forEach((e=>{0==--c[e]&&d.push(e)}));if(e!==i)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}(),h(),n[P]}var D=/^(?:async\s+)?(?:function)?\s*\w*\s*\(\s*([^)]+)\s*\)(?:\s*{)/,j=/^(?:async\s+)?\(?\s*([^)=]+)\s*\)?(?:\s*=>)/,x=/,/,B=/(=.+)?(\s*)$/;function $(e,t){var n={};return Object.keys(e).forEach((t=>{var i,r=e[t],o=p(r),s=!o&&1===r.length||o&&0===r.length;if(Array.isArray(r))i=[...r],r=i.pop(),n[t]=i.concat(i.length>0?a:r);else if(s)n[t]=r;else{if(i=function(e){const t=function(e){let t="",n=0,i=e.indexOf("*/");for(;n<e.length;)if("/"===e[n]&&"/"===e[n+1]){let t=e.indexOf("\n",n);n=-1===t?e.length:t}else if(-1!==i&&"/"===e[n]&&"*"===e[n+1]){let r=e.indexOf("*/",n);-1!==r?(n=r+2,i=e.indexOf("*/",n)):(t+=e[n],n++)}else t+=e[n],n++;return t}(e.toString());let n=t.match(D);if(n||(n=t.match(j)),!n)throw new Error("could not parse args in autoInject\nSource:\n"+t);let[,i]=n;return i.replace(/\s/g,"").split(x).map((e=>e.replace(B,"").trim()))}(r),0===r.length&&!o&&0===i.length)throw new Error("autoInject task functions require explicit parameters.");o||i.pop(),n[t]=i.concat(a)}function a(e,t){var n=i.map((t=>e[t]));n.push(t),g(r)(...n)}})),F(n,t)}class U{constructor(){this.head=this.tail=null,this.length=0}removeLink(e){return e.prev?e.prev.next=e.next:this.head=e.next,e.next?e.next.prev=e.prev:this.tail=e.prev,e.prev=e.next=null,this.length-=1,e}empty(){for(;this.head;)this.shift();return this}insertAfter(e,t){t.prev=e,t.next=e.next,e.next?e.next.prev=t:this.tail=t,e.next=t,this.length+=1}insertBefore(e,t){t.prev=e.prev,t.next=e,e.prev?e.prev.next=t:this.head=t,e.prev=t,this.length+=1}unshift(e){this.head?this.insertBefore(this.head,e):H(this,e)}push(e){this.tail?this.insertAfter(this.tail,e):H(this,e)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){for(var e=this.head;e;)yield e.data,e=e.next}remove(e){for(var t=this.head;t;){var{next:n}=t;e(t)&&this.removeLink(t),t=n}return this}}function H(e,t){e.length=1,e.head=e.tail=t}function G(e,t,n){if(null==t)t=1;else if(0===t)throw new RangeError("Concurrency must not be zero");var i=g(e),r=0,o=[];const s={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function a(e,t){return e?t?void(s[e]=s[e].filter((e=>e!==t))):s[e]=[]:Object.keys(s).forEach((e=>s[e]=[]))}function l(e,...t){s[e].forEach((e=>e(...t)))}var u=!1;function c(e,t,n,i){if(null!=i&&"function"!=typeof i)throw new Error("task callback must be a function");var r,o;function s(e,...t){return e?n?o(e):r():t.length<=1?r(t[0]):void r(t)}w.started=!0;var a={data:e,callback:n?s:i||s};if(t?w._tasks.unshift(a):w._tasks.push(a),u||(u=!0,d((()=>{u=!1,w.process()}))),n||!i)return new Promise(((e,t)=>{r=e,o=t}))}function f(e){return function(t,...n){r-=1;for(var i=0,s=e.length;i<s;i++){var a=e[i],u=o.indexOf(a);0===u?o.shift():u>0&&o.splice(u,1),a.callback(t,...n),null!=t&&l("error",t,a.data)}r<=w.concurrency-w.buffer&&l("unsaturated"),w.idle()&&l("drain"),w.process()}}function h(e){return!(0!==e.length||!w.idle()||(d((()=>l("drain"))),0))}const p=e=>t=>{if(!t)return new Promise(((t,n)=>{!function(e,i){const r=(...i)=>{a(e,r),((e,i)=>{if(e)return n(e);t(i)})(...i)};s[e].push(r)}(e)}));a(e),function(e,t){s[e].push(t)}(e,t)};var m=!1,w={_tasks:new U,*[Symbol.iterator](){yield*w._tasks[Symbol.iterator]()},concurrency:t,payload:n,buffer:t/4,started:!1,paused:!1,push(e,t){if(Array.isArray(e)){if(h(e))return;return e.map((e=>c(e,!1,!1,t)))}return c(e,!1,!1,t)},pushAsync(e,t){if(Array.isArray(e)){if(h(e))return;return e.map((e=>c(e,!1,!0,t)))}return c(e,!1,!0,t)},kill(){a(),w._tasks.empty()},unshift(e,t){if(Array.isArray(e)){if(h(e))return;return e.map((e=>c(e,!0,!1,t)))}return c(e,!0,!1,t)},unshiftAsync(e,t){if(Array.isArray(e)){if(h(e))return;return e.map((e=>c(e,!0,!0,t)))}return c(e,!0,!0,t)},remove(e){w._tasks.remove(e)},process(){if(!m){for(m=!0;!w.paused&&r<w.concurrency&&w._tasks.length;){var e=[],t=[],n=w._tasks.length;w.payload&&(n=Math.min(n,w.payload));for(var s=0;s<n;s++){var a=w._tasks.shift();e.push(a),o.push(a),t.push(a.data)}r+=1,0===w._tasks.length&&l("empty"),r===w.concurrency&&l("saturated");var u=C(f(e));i(t,u)}m=!1}},length:()=>w._tasks.length,running:()=>r,workersList:()=>o,idle:()=>w._tasks.length+r===0,pause(){w.paused=!0},resume(){!1!==w.paused&&(w.paused=!1,d(w.process))}};return Object.defineProperties(w,{saturated:{writable:!1,value:p("saturated")},unsaturated:{writable:!1,value:p("unsaturated")},empty:{writable:!1,value:p("empty")},drain:{writable:!1,value:p("drain")},error:{writable:!1,value:p("error")}}),w}function q(e,t){return G(e,1,t)}function V(e,t,n){return G(e,t,n)}var z=m((function(e,t,n,i){i=S(i);var r=g(n);return I(e,((e,n,i)=>{r(t,e,((e,n)=>{t=n,i(e)}))}),(e=>i(e,t)))}),4);function Y(...e){var t=e.map(g);return function(...e){var n=this,i=e[e.length-1];return"function"==typeof i?e.pop():i=M(),z(t,e,((e,t,i)=>{t.apply(n,e.concat(((e,...t)=>{i(e,t)})))}),((e,t)=>i(e,...t))),i[P]}}function K(...e){return Y(...e.reverse())}var Q=m((function(e,t,n,i){return y(W(t),e,n,i)}),4),J=m((function(e,t,n,i){var r=g(n);return Q(e,t,((e,t)=>{r(e,((e,...n)=>e?t(e):t(e,n)))}),((e,t)=>{for(var n=[],r=0;r<t.length;r++)t[r]&&(n=n.concat(...t[r]));return i(e,n)}))}),4),Z=m((function(e,t,n){return J(e,1/0,t,n)}),3),X=m((function(e,t,n){return J(e,1,t,n)}),3);function ee(...e){return function(...t){return t.pop()(null,...e)}}function te(e,t){return(n,i,r,o)=>{var s,a=!1;const l=g(r);n(i,((n,i,r)=>{l(n,((i,o)=>i||!1===i?r(i):e(o)&&!s?(a=!0,s=t(!0,n),r(null,b)):void r()))}),(e=>{if(e)return o(e);o(null,a?s:t(!1))}))}}var ne=m((function(e,t,n){return te((e=>e),((e,t)=>t))(T,e,t,n)}),3),ie=m((function(e,t,n,i){return te((e=>e),((e,t)=>t))(W(t),e,n,i)}),4),re=m((function(e,t,n){return te((e=>e),((e,t)=>t))(W(1),e,t,n)}),3);function oe(e){return(t,...n)=>g(t)(...n,((t,...n)=>{"object"==typeof console&&(t?console.error&&console.error(t):console[e]&&n.forEach((t=>console[e](t))))}))}var se=oe("dir"),ae=m((function(e,t,n){n=C(n);var i,r=g(e),o=g(t);function s(e,...t){if(e)return n(e);!1!==e&&(i=t,o(...t,a))}function a(e,t){return e?n(e):!1!==e?t?void r(s):n(null,...i):void 0}return a(null,!0)}),3);function le(e,t,n){const i=g(t);return ae(e,((...e)=>{const t=e.pop();i(...e,((e,n)=>t(e,!n)))}),n)}function ue(e){return(t,n,i)=>e(t,i)}var de=m((function(e,t,n){return T(e,ue(g(t)),n)}),3),ce=m((function(e,t,n,i){return W(t)(e,ue(g(n)),i)}),4),fe=m((function(e,t,n){return ce(e,1,t,n)}),3);function he(e){return p(e)?e:function(...t){var n=t.pop(),i=!0;t.push(((...e)=>{i?d((()=>n(...e))):n(...e)})),e.apply(this,t),i=!1}}var pe=m((function(e,t,n){return te((e=>!e),(e=>!e))(T,e,t,n)}),3),ge=m((function(e,t,n,i){return te((e=>!e),(e=>!e))(W(t),e,n,i)}),4),me=m((function(e,t,n){return te((e=>!e),(e=>!e))(I,e,t,n)}),3);function we(e,t,n,i){var r=new Array(t.length);e(t,((e,t,i)=>{n(e,((e,n)=>{r[t]=!!n,i(e)}))}),(e=>{if(e)return i(e);for(var n=[],o=0;o<t.length;o++)r[o]&&n.push(t[o]);i(null,n)}))}function ye(e,t,n,i){var r=[];e(t,((e,t,i)=>{n(e,((n,o)=>{if(n)return i(n);o&&r.push({index:t,value:e}),i(n)}))}),(e=>{if(e)return i(e);i(null,r.sort(((e,t)=>e.index-t.index)).map((e=>e.value)))}))}function ve(e,t,n,i){return(v(t)?we:ye)(e,t,g(n),i)}var be=m((function(e,t,n){return ve(T,e,t,n)}),3),Se=m((function(e,t,n,i){return ve(W(t),e,n,i)}),4),Ce=m((function(e,t,n){return ve(I,e,t,n)}),3),_e=m((function(e,t){var n=C(t),i=g(he(e));return function e(t){if(t)return n(t);!1!==t&&i(e)}()}),2),We=m((function(e,t,n,i){var r=g(n);return Q(e,t,((e,t)=>{r(e,((n,i)=>n?t(n):t(n,{key:i,val:e})))}),((e,t)=>{for(var n={},{hasOwnProperty:r}=Object.prototype,o=0;o<t.length;o++)if(t[o]){var{key:s}=t[o],{val:a}=t[o];r.call(n,s)?n[s].push(a):n[s]=[a]}return i(e,n)}))}),4);function Ae(e,t,n){return We(e,1/0,t,n)}function Le(e,t,n){return We(e,1,t,n)}var Ee=oe("log"),Te=m((function(e,t,n,i){i=S(i);var r={},o=g(n);return W(t)(e,((e,t,n)=>{o(e,t,((e,i)=>{if(e)return n(e);r[t]=i,n(e)}))}),(e=>i(e,r)))}),4);function Oe(e,t,n){return Te(e,1/0,t,n)}function ke(e,t,n){return Te(e,1,t,n)}function Ie(e,t=(e=>e)){var n=Object.create(null),i=Object.create(null),o=g(e),s=r(((e,r)=>{var s=t(...e);s in n?d((()=>r(null,...n[s]))):s in i?i[s].push(r):(i[s]=[r],o(...e,((e,...t)=>{e||(n[s]=t);var r=i[s];delete i[s];for(var o=0,a=r.length;o<a;o++)r[o](e,...t)})))}));return s.memo=n,s.unmemoized=e,s}var Re=u(a?process.nextTick:s?setImmediate:l),Ne=m(((e,t,n)=>{var i=v(t)?[]:{};e(t,((e,t,n)=>{g(e)(((e,...r)=>{r.length<2&&([r]=r),i[t]=r,n(e)}))}),(e=>n(e,i)))}),3);function Pe(e,t){return Ne(T,e,t)}function Me(e,t,n){return Ne(W(t),e,n)}function Fe(e,t){var n=g(e);return G(((e,t)=>{n(e[0],t)}),t,1)}class De{constructor(){this.heap=[],this.pushCount=Number.MIN_SAFE_INTEGER}get length(){return this.heap.length}empty(){return this.heap=[],this}percUp(e){let t;for(;e>0&&xe(this.heap[e],this.heap[t=je(e)]);){let n=this.heap[e];this.heap[e]=this.heap[t],this.heap[t]=n,e=t}}percDown(e){let t;for(;(t=1+(e<<1))<this.heap.length&&(t+1<this.heap.length&&xe(this.heap[t+1],this.heap[t])&&(t+=1),!xe(this.heap[e],this.heap[t]));){let n=this.heap[e];this.heap[e]=this.heap[t],this.heap[t]=n,e=t}}push(e){e.pushCount=++this.pushCount,this.heap.push(e),this.percUp(this.heap.length-1)}unshift(e){return this.heap.push(e)}shift(){let[e]=this.heap;return this.heap[0]=this.heap[this.heap.length-1],this.heap.pop(),this.percDown(0),e}toArray(){return[...this]}*[Symbol.iterator](){for(let e=0;e<this.heap.length;e++)yield this.heap[e].data}remove(e){let t=0;for(let n=0;n<this.heap.length;n++)e(this.heap[n])||(this.heap[t]=this.heap[n],t++);this.heap.splice(t);for(let e=je(this.heap.length-1);e>=0;e--)this.percDown(e);return this}}function je(e){return(e+1>>1)-1}function xe(e,t){return e.priority!==t.priority?e.priority<t.priority:e.pushCount<t.pushCount}function Be(e,t){var n=Fe(e,t),i=!1;return n._tasks=new De,n.push=function(e,t=0,r=(()=>{})){if("function"!=typeof r)throw new Error("task callback must be a function");if(n.started=!0,Array.isArray(e)||(e=[e]),0===e.length&&n.idle())return d((()=>n.drain()));for(var o=0,s=e.length;o<s;o++){var a={data:e[o],priority:t,callback:r};n._tasks.push(a)}i||(i=!0,d((()=>{i=!1,n.process()})))},delete n.unshift,n}var $e=m((function(e,t){if(t=S(t),!Array.isArray(e))return t(new TypeError("First argument to race must be an array of functions"));if(!e.length)return t();for(var n=0,i=e.length;n<i;n++)g(e[n])(t)}),2);function Ue(e,t,n,i){var r=[...e].reverse();return z(r,t,n,i)}function He(e){var t=g(e);return r((function(e,n){return e.push(((e,...t)=>{let i={};if(e&&(i.error=e),t.length>0){var r=t;t.length<=1&&([r]=t),i.value=r}n(null,i)})),t.apply(this,e)}))}function Ge(e){var t;return Array.isArray(e)?t=e.map(He):(t={},Object.keys(e).forEach((n=>{t[n]=He.call(this,e[n])}))),t}function qe(e,t,n,i){const r=g(n);return ve(e,t,((e,t)=>{r(e,((e,n)=>{t(e,!n)}))}),i)}var Ve=m((function(e,t,n){return qe(T,e,t,n)}),3),ze=m((function(e,t,n,i){return qe(W(t),e,n,i)}),4),Ye=m((function(e,t,n){return qe(I,e,t,n)}),3);function Ke(e){return function(){return e}}function Qe(e,t,n){var i={times:5,intervalFunc:Ke(0)};if(arguments.length<3&&"function"==typeof e?(n=t||M(),t=e):(Je(i,e),n=n||M()),"function"!=typeof t)throw new Error("Invalid arguments for async.retry");var r=g(t),o=1;function s(){r(((e,...t)=>{!1!==e&&(e&&o++<i.times&&("function"!=typeof i.errorFilter||i.errorFilter(e))?setTimeout(s,i.intervalFunc(o-1)):n(e,...t))}))}return s(),n[P]}function Je(e,t){if("object"==typeof t)e.times=+t.times||5,e.intervalFunc="function"==typeof t.interval?t.interval:Ke(+t.interval||0),e.errorFilter=t.errorFilter;else{if("number"!=typeof t&&"string"!=typeof t)throw new Error("Invalid arguments for async.retry");e.times=+t||5}}function Ze(e,t){t||(t=e,e=null);let n=e&&e.arity||t.length;p(t)&&(n+=1);var i=g(t);return r(((t,r)=>{function o(e){i(...t,e)}return(t.length<n-1||null==r)&&(t.push(r),r=M()),e?Qe(e,o,r):Qe(o,r),r[P]}))}function Xe(e,t){return Ne(I,e,t)}var et=m((function(e,t,n){return te(Boolean,(e=>e))(T,e,t,n)}),3),tt=m((function(e,t,n,i){return te(Boolean,(e=>e))(W(t),e,n,i)}),4),nt=m((function(e,t,n){return te(Boolean,(e=>e))(I,e,t,n)}),3),it=m((function(e,t,n){var i=g(t);return O(e,((e,t)=>{i(e,((n,i)=>{if(n)return t(n);t(n,{value:e,criteria:i})}))}),((e,t)=>{if(e)return n(e);n(null,t.sort(r).map((e=>e.value)))}));function r(e,t){var n=e.criteria,i=t.criteria;return n<i?-1:n>i?1:0}}),3);function rt(e,t,n){var i=g(e);return r(((r,o)=>{var s,a=!1;r.push(((...e)=>{a||(o(...e),clearTimeout(s))})),s=setTimeout((function(){var t=e.name||"anonymous",i=new Error('Callback function "'+t+'" timed out.');i.code="ETIMEDOUT",n&&(i.info=n),a=!0,o(i)}),t),i(...r)}))}function ot(e,t,n,i){var r=g(n);return Q(function(e){for(var t=Array(e);e--;)t[e]=e;return t}(e),t,r,i)}function st(e,t,n){return ot(e,1/0,t,n)}function at(e,t,n){return ot(e,1,t,n)}function lt(e,t,n,i){arguments.length<=3&&"function"==typeof t&&(i=n,n=t,t=Array.isArray(e)?[]:{}),i=S(i||M());var r=g(n);return T(e,((e,n,i)=>{r(t,e,n,i)}),(e=>i(e,t))),i[P]}var ut=m((function(e,t){var n,i=null;return fe(e,((e,t)=>{g(e)(((e,...r)=>{if(!1===e)return t(e);r.length<2?[n]=r:n=r,i=e,t(e?null:{})}))}),(()=>t(i,n)))}));function dt(e){return(...t)=>(e.unmemoized||e)(...t)}var ct=m((function(e,t,n){n=C(n);var i=g(t),r=g(e),o=[];function s(e,...t){if(e)return n(e);o=t,!1!==e&&r(a)}function a(e,t){return e?n(e):!1!==e?t?void i(s):n(null,...o):void 0}return r(a)}),3);function ft(e,t,n){const i=g(e);return ct((e=>i(((t,n)=>e(t,!n)))),t,n)}var ht=m((function(e,t){if(t=S(t),!Array.isArray(e))return t(new Error("First argument to waterfall must be an array of functions"));if(!e.length)return t();var n=0;function i(t){g(e[n++])(...t,C(r))}function r(r,...o){if(!1!==r)return r||n===e.length?t(r,...o):void i(o)}i([])}));const pt={apply:i,applyEach:k,applyEachSeries:N,asyncify:c,auto:F,autoInject:$,cargo:q,cargoQueue:V,compose:K,concat:Z,concatLimit:J,concatSeries:X,constant:ee,detect:ne,detectLimit:ie,detectSeries:re,dir:se,doUntil:le,doWhilst:ae,each:de,eachLimit:ce,eachOf:T,eachOfLimit:A,eachOfSeries:I,eachSeries:fe,ensureAsync:he,every:pe,everyLimit:ge,everySeries:me,filter:be,filterLimit:Se,filterSeries:Ce,forever:_e,groupBy:Ae,groupByLimit:We,groupBySeries:Le,log:Ee,map:O,mapLimit:Q,mapSeries:R,mapValues:Oe,mapValuesLimit:Te,mapValuesSeries:ke,memoize:Ie,nextTick:Re,parallel:Pe,parallelLimit:Me,priorityQueue:Be,queue:Fe,race:$e,reduce:z,reduceRight:Ue,reflect:He,reflectAll:Ge,reject:Ve,rejectLimit:ze,rejectSeries:Ye,retry:Qe,retryable:Ze,seq:Y,series:Xe,setImmediate:d,some:et,someLimit:tt,someSeries:nt,sortBy:it,timeout:rt,times:st,timesLimit:ot,timesSeries:at,transform:lt,tryEach:ut,unmemoize:dt,until:ft,waterfall:ht,whilst:ct,all:pe,allLimit:ge,allSeries:me,any:et,anyLimit:tt,anySeries:nt,find:ne,findLimit:ie,findSeries:re,flatMap:Z,flatMapLimit:J,flatMapSeries:X,forEach:de,forEachSeries:fe,forEachLimit:ce,forEachOf:T,forEachOfSeries:I,forEachOfLimit:A,inject:z,foldl:z,foldr:Ue,select:be,selectLimit:Se,selectSeries:Ce,wrapSync:c,during:ct,doDuring:ae}},83027:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});class i{value;next;constructor(e){this.value=e}}class r{#e;#t;#n;constructor(){this.clear()}enqueue(e){const t=new i(e);this.#e?(this.#t.next=t,this.#t=t):(this.#e=t,this.#t=t),this.#n++}dequeue(){const e=this.#e;if(e)return this.#e=this.#e.next,this.#n--,e.value}clear(){this.#e=void 0,this.#t=void 0,this.#n=0}get size(){return this.#n}*[Symbol.iterator](){let e=this.#e;for(;e;)yield e.value,e=e.next}}function o(e){if(!Number.isInteger(e)&&e!==Number.POSITIVE_INFINITY||!(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,i,r)=>{n++;const o=(async()=>e(...r))();i(o);try{await o}catch{}n--,t.size>0&&t.dequeue()()},o=(r,...o)=>new Promise((s=>{((r,o,s)=>{t.enqueue(i.bind(void 0,r,o,s)),(async()=>{await Promise.resolve(),n<e&&t.size>0&&t.dequeue()()})()})(r,s,o)}));return Object.defineProperties(o,{activeCount:{get:()=>n},pendingCount:{get:()=>t.size},clearQueue:{value:()=>{t.clear()}}}),o}},62711:e=>{"use strict";e.exports=JSON.parse('{"F":{"0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","backspace":"Backspace","bs":"Backspace","bksp":"Backspace","tab":"Tab","escape":"Escape","esc":"Escape","clear":"Clear","enter":"Enter","return":"Enter","shift":"Shift","shft":"Shift","lshift":"Shift","lshft":"Shift","left shift":"Shift","leftshift":"Shift","rshift":"Shift","rshft":"Shift","right shift":"Shift","rightshift":"Shift","control":"Control","ctrl":"Control","commandorcontrol":"CommandOrControl","alt":"Alt","alternate":"Alt","pause":"Pause","caps lock":"Capslock","capslock":"Capslock","spacebar":"Space","space":"Space","space bar":"Space","page up":"PageUp","pgup":"PageUp","pg up":"PageUp","page down":"PageDown","pgdn":"PageDown","pg dn":"PageDown","pgdown":"PageDown","end":"End","home":"Home","left arrow":"Left","left":"Left","up arrow":"Up","up":"Up","right arrow":"Right","right":"Right","down arrow":"Down","down":"Down","select":"Select","slct":"Select","print":"PrintScreen","prnt":"PrintScreen","execute":"Execute","print screen":"PrintScreen","printscreen":"PrintScreen","print scrn":"PrintScreen","printscrn":"PrintScreen","prnt scrn":"PrintScreen","prntscrn":"PrintScreen","prt scrn":"PrintScreen","prtscrn":"PrintScreen","prt scn":"PrintScreen","prtscn":"PrintScreen","prt scr":"PrintScreen","prtscr":"PrintScreen","prt sc":"PrintScreen","prtsc":"PrintScreen","pr sc":"PrintScreen","prsc":"PrintScreen","insert":"Insert","ins":"Insert","delete":"Delete","del":"Delete","a":"A","b":"B","c":"C","d":"D","e":"E","f":"F","g":"G","h":"H","i":"I","j":"J","k":"K","l":"L","m":"M","n":"N","o":"O","p":"P","q":"Q","r":"R","s":"S","t":"T","u":"U","v":"V","w":"W","x":"X","y":"Y","z":"Z","windows":"Super","left windows":"Super","right windows":"Super","numpad 0":"num0","numpad 1":"num1","numpad 2":"num2","numpad 3":"num3","numpad 4":"num4","numpad 5":"num5","numpad 6":"num6","numpad 7":"num7","numpad 8":"num8","numpad 9":"num9","f1":"F1","fn1":"F1","function 1":"F1","f2":"F2","fn2":"F2","function 2":"F2","f3":"F3","fn3":"F3","function 3":"F3","f4":"F4","fn4":"F4","function 4":"F4","f5":"F5","fn5":"F5","function 5":"F5","f6":"F6","fn6":"F6","function 6":"F6","f7":"F7","fn7":"F7","function 7":"F7","f8":"F8","fn8":"F8","function 8":"F8","f9":"F9","fn9":"F9","function 9":"F9","f10":"F10","fn10":"F10","function 10":"F10","f11":"F11","fn11":"F11","function 11":"F11","f12":"F12","fn12":"F12","function 12":"F12","f13":"F13","fn":"F13","function 13":"F13","f14":"F14","fn14":"F14","function 14":"F14","f15":"F15","fn15":"F15","function 15":"F15","f16":"F16","fn16":"F16","function 16":"F16","num lock":"Numlock","numlock":"Numlock","number lock":"Numlock","numeric lock":"Numlock","scroll lock":"Scrolllock","sclk":"Scrolllock","scrlk":"Scrolllock","slk":"Scrolllock","*":"*","+":"+","-":"-","/":"/",";":";","=":"=",",":",","_":"-",".":".","`":"`","[":"[","]":"]","\'":"\'"}}')}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var o=t[i]={id:i,loaded:!1,exports:{}};return e[i].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},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),n(1918)})();
|
|
3
3
|
//# sourceMappingURL=assimilationService.js.map
|