UNPKG

webcom

Version:

Webcom library

17 lines 166 kB
/*! * Webcom. Build realtime apps. Share and sync data instantly between your clients * * Module name: Webcom * Version: 3.8.0 * Created: 2025-06-26T13:36:54.411Z * * Copyright (C) <2015-2025> Orange * * This software is confidential and proprietary information of Orange. * You shall not disclose such Confidential Information and shall use it only in * accordance with the terms of the agreement you entered into. * Unauthorized copying of this file, via any medium is strictly prohibited. * * If you are Orange employee you shall use this software in accordance with * the Orange Source Charter (http://opensource.itn.ftgroup/index.php/Orange_Source_Charter) */(()=>{var e={228:e=>{e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i},e.exports.__esModule=!0,e.exports.default=e.exports},858:e=>{e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},646:(e,t,n)=>{var i=n(228);e.exports=function(e){if(Array.isArray(e))return i(e)},e.exports.__esModule=!0,e.exports.default=e.exports},506:e=>{e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports},926:e=>{function t(e,t,n,i,r,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(i,r)}e.exports=function(e){return function(){var n=this,i=arguments;return new Promise((function(r,o){var a=e.apply(n,i);function s(e){t(a,r,o,s,u,"next",e)}function u(e){t(a,r,o,s,u,"throw",e)}s(void 0)}))}},e.exports.__esModule=!0,e.exports.default=e.exports},575:e=>{e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},100:(e,t,n)=>{var i=n(489),r=n(67);function o(t,n,a){return r()?(e.exports=o=Reflect.construct,e.exports.__esModule=!0,e.exports.default=e.exports):(e.exports=o=function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&i(o,n.prototype),o},e.exports.__esModule=!0,e.exports.default=e.exports),o.apply(null,arguments)}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},913:e=>{function t(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}e.exports=function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},713:e=>{e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},525:(e,t,n)=>{var i=n(331);function r(){return"undefined"!=typeof Reflect&&Reflect.get?(e.exports=r=Reflect.get,e.exports.__esModule=!0,e.exports.default=e.exports):(e.exports=r=function(e,t,n){var r=i(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},e.exports.__esModule=!0,e.exports.default=e.exports),r.apply(this,arguments)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports},754:e=>{function t(n){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},205:(e,t,n)=>{var i=n(489);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&i(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},67:e=>{e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}},e.exports.__esModule=!0,e.exports.default=e.exports},860:e=>{e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports},884:e=>{e.exports=function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(i=n.next()).done)&&(o.push(i.value),!t||o.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw r}}return o}},e.exports.__esModule=!0,e.exports.default=e.exports},521:e=>{e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},206:e=>{e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},585:(e,t,n)=>{var i=n(8).default,r=n(506);e.exports=function(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return r(e)},e.exports.__esModule=!0,e.exports.default=e.exports},489:e=>{function t(n,i){return e.exports=t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,i)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},38:(e,t,n)=>{var i=n(858),r=n(884),o=n(379),a=n(521);e.exports=function(e,t){return i(e)||r(e,t)||o(e,t)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},331:(e,t,n)=>{var i=n(754);e.exports=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=i(e)););return e},e.exports.__esModule=!0,e.exports.default=e.exports},319:(e,t,n)=>{var i=n(646),r=n(860),o=n(379),a=n(206);e.exports=function(e){return i(e)||r(e)||o(e)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},8:e=>{function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},379:(e,t,n)=>{var i=n(228);e.exports=function(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},553:e=>{var t=function(e){"use strict";var t,n=Object.prototype,i=n.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",a=r.asyncIterator||"@@asyncIterator",s=r.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function c(e,t,n,i){var r=t&&t.prototype instanceof _?t:_,o=Object.create(r.prototype),a=new D(i||[]);return o._invoke=function(e,t,n){var i=h;return function(r,o){if(i===d)throw new Error("Generator is already running");if(i===v){if("throw"===r)throw o;return x()}for(n.method=r,n.arg=o;;){var a=n.delegate;if(a){var s=S(a,n);if(s){if(s===p)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===h)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=d;var u=l(e,t,n);if("normal"===u.type){if(i=n.done?v:f,u.arg===p)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(i=v,n.method="throw",n.arg=u.arg)}}}(e,n,a),o}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var h="suspendedStart",f="suspendedYield",d="executing",v="completed",p={};function _(){}function g(){}function y(){}var m={};u(m,o,(function(){return this}));var k=Object.getPrototypeOf,b=k&&k(k(N([])));b&&b!==n&&i.call(b,o)&&(m=b);var w=y.prototype=_.prototype=Object.create(m);function C(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function n(r,o,a,s){var u=l(e[r],e,o);if("throw"!==u.type){var c=u.arg,h=c.value;return h&&"object"==typeof h&&i.call(h,"__await")?t.resolve(h.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(h).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(u.arg)}var r;this._invoke=function(e,i){function o(){return new t((function(t,r){n(e,i,t,r)}))}return r=r?r.then(o,o):o()}}function S(e,n){var i=e.iterator[n.method];if(i===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,S(e,n),"throw"===n.method))return p;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var r=l(i,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,p;var o=r.arg;return o?o.done?(n[e.resultName]=o.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,p):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,p)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function R(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function D(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function N(e){if(e){var n=e[o];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,a=function n(){for(;++r<e.length;)if(i.call(e,r))return n.value=e[r],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}return{next:x}}function x(){return{value:t,done:!0}}return g.prototype=y,u(w,"constructor",y),u(y,"constructor",g),g.displayName=u(y,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,u(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},C(E.prototype),u(E.prototype,a,(function(){return this})),e.AsyncIterator=E,e.async=function(t,n,i,r,o){void 0===o&&(o=Promise);var a=new E(c(t,n,i,r),o);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},C(w),u(w,s,"Generator"),u(w,o,(function(){return this})),u(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var i=t.pop();if(i in e)return n.value=i,n.done=!1,n}return n.done=!0,n}},e.values=N,D.prototype={constructor:D,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(R),!e)for(var n in this)"t"===n.charAt(0)&&i.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function r(i,r){return s.type="throw",s.arg=e,n.next=i,r&&(n.method="next",n.arg=t),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var u=i.call(a,"catchLoc"),c=i.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),R(n),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var i=n.completion;if("throw"===i.type){var r=i.arg;R(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,i){return this.delegate={iterator:N(e),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=t),p}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}},757:(e,t,n)=>{e.exports=n(553)},842:(e,t,n)=>{"use strict";n.d(t,{Yk:()=>v,ZP:()=>O,ab:()=>x,hu:()=>A});var i=n(319),r=n.n(i),o=n(575),a=n.n(o),s=n(913),u=n.n(s),c=n(38),l=n.n(c),h=n(924),f=n(55),d=n(857),v=" ",p=!1,_=15,g=[],y={},m={},k={},b="_leaf_";function w(e){return e?e.split("."):[]}function C(e){return{disabledDepth:T(e,k),enabledDepth:T(e,m)}}function E(e,t,n,i){for(var r=0;r<e.length;){var o=e[r++];t.hasOwnProperty(o)||(t[o]={}),t=t[o]}i&&Object.keys(t).forEach((function(e){return delete t[e]})),t._leaf_=n}function S(e,t){for(var n=0;n<e.length;){var i=e[n++];if(!t.hasOwnProperty(i))return;t=t[i]}delete t._leaf_}function T(e,t){var n=-1,i=0;do{t.hasOwnProperty(b)&&(n=i)}while(i<e.length&&(t=t[e[i++]]));return n}function R(e,t){Object.entries(e||{}).forEach((function(e){var n=l()(e,2),i=n[0],r=n[1];i===b?t(r):R(r,t)}))}function D(e,t){for(var n=[],i=0;t&&i<e.length;)t=t[e[i++]];return R(t,(function(e){return n.push(e)})),n}function N(e){p=e,g.forEach((function(e){return e.displayTimestamp=p}))}var x="LogManager",O=function(){function e(){a()(this,e)}return u()(e,null,[{key:"enable",value:function(t){(0,d.T2)([x,".enable"],arguments,(0,d.jt)(d.Z_));var n=w(t),i=C(n),r=i.enabledDepth,o=i.disabledDepth;r<=o&&(o<0&&e.disable(),E(n,m,!0,!0),S(n,k),D(n,y).forEach((function(e){return e.setLevel(P)})))}},{key:"disable",value:function(e){(0,d.T2)([x,".disable"],arguments,(0,d.jt)(d.Z_));var t=w(e),n=C(t),i=n.enabledDepth,r=n.disabledDepth;r<=i&&(E(t,k,!0,!0),S(t,m),D(t,y).forEach((function(e){return e.setLevel(-1)})))}},{key:"showTimestamp",value:function(){(0,d.T2)([x,".showTimestamp"],arguments),N(!0)}},{key:"hideTimestamp",value:function(){(0,d.T2)([x,".hideTimestamp"],arguments),N(!1)}},{key:"setPrefixWidth",value:function(e){(0,d.T2)([x,".setPrefixWidth"],arguments,d.Dp),e<0?e=0:e>v.length&&(e=v.length),_=e,g.forEach((function(e){return e.setPrefixWidth(_)}))}},{key:"level",get:function(){return P},set:function(e){(0,d.T2)([x,".level"],arguments,d.Dp),e>-1&&e!==P&&(g.forEach((function(t){return t.updateLevel(e)})),P=e)}},{key:"LOG",get:function(){return 4}},{key:"INFO",get:function(){return 3}},{key:"WARN",get:function(){return 2}},{key:"ERROR",get:function(){return 1}},{key:"NONE",get:function(){return 0}},{key:"debugOnCallback",value:function(e){var t=e&&e.toUpperCase();return function(e,n){return f.i.log("********** UPDATE ".concat(t||e.ref().pathString()," **********"),e.toString(),n?"[<<".concat(n,"]"):"")}}},{key:"debugOnCompletionCallback",value:function(e,t){var n=e&&e.toUpperCase();return function(e){return e?f.i.log("********** REVOKED ".concat(n," **********"),e):f.i.log("********** COMPLETED ".concat(n," **********")),t}}},{key:"debugOnCallbackWithCancel",value:function(t){var n=t&&t.toUpperCase();return[e.debugOnCallback(t),function(e){return f.i.log.apply(f.i,["********** COMPLETE ".concat(n," **********")].concat(r()(e?["FAILED:",e.code,e.message]:["cancelled"])))}]}}]),e}();function A(e,t){var n=w(e),i=new h.Z(n,t||n[n.length-1],p,_);return function(e){var t=e.fqdn;E(t,y,e),g.push(e);var n=C(t),i=n.disabledDepth,r=n.enabledDepth;e.setLevel(r>=i?P:-1)}(i),i}var P=O.INFO},466:(e,t,n)=>{"use strict";n.d(t,{DV:()=>l,RY:()=>h,s2:()=>f});n(24);var i=n(28),r="browser",o="mobile/",a="node",s="".concat(o,"android"),u="".concat(o,"iOS"),c={browser:"b"};c[s]="a",c[u]="i",c.node="n";var l,h=!0,f=!1,d="device",v=i.sZ.device;v||p(a);function p(e){v=e,h=e===r,f=0===e.indexOf(o),l=(c[e]||"")+"3.8.0"}(0,i.x$)(d,(function(){return v}),(function(e){return p(e)}))},55:(e,t,n)=>{"use strict";n.d(t,{X:()=>l,i:()=>c});var i=n(319),r=n.n(i),o=n(24),a=n(28),s=n(303),u="console",c=a.sZ.console,l=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];var o=function(e){return(0,s.Kn)(e)?JSON.stringify(e):(e||"undefined").toString()};if((0,s.HD)(e)){var a=0;return[e=e.replace(/%(.)/g,(function(e,t){switch(t){case"%":return"%";case"s":case"o":case"O":return o(n[a++]);case"d":case"i":case"f":return n[a++];default:return e}}))].concat(r()(n.slice(a).map(o))).join(" ")}return[e].concat(n).map(o).join(" ")};function h(e,t,n,i,r){if(!n||!i||!r){var o=t,a=function(e){return function(t){return o("[".concat(e,"] ").concat(t))}};n=n||a("INFO"),i=i||a("WARN"),r=r||a("ERR!"),t=a("LOG ")}return{log:function(){return t.call(e,l.apply(void 0,arguments))},info:function(){return n.call(e,l.apply(void 0,arguments))},warn:function(){return i.call(e,l.apply(void 0,arguments))},error:function(){return r.call(e,l.apply(void 0,arguments))}}}if((0,s.mf)(c))c=h(o.Z,c);else if((0,s.Kn)(c)&&c){var f=c,d=f.log,v=f.info,p=f.warn,_=f.error;c=h(c,d,v,p,_)}else{var g=function(e,t,n){for(var i=arguments.length,r=new Array(i>3?i-3:0),o=3;o<i;o++)r[o-3]=arguments[o];(0,s.HD)(n)?(n="[".concat(e,"] ")+n,t.apply(void 0,[n].concat(r))):t.apply(void 0,["[".concat(e,"] "),n].concat(r))};c={log:g.bind(void 0,"LOG ",o.Z.console.log),info:g.bind(void 0,"INFO",o.Z.console.info),warn:g.bind(void 0,"WARN",o.Z.console.warn),error:g.bind(void 0,"ERR!",o.Z.console.error)}}(0,a.x$)(u,(function(){return c}),(function(e){return c=e}))},28:(e,t,n)=>{"use strict";n.d(t,{HO:()=>r,sZ:()=>i,x$:()=>o});var i=n(24).Z.WebcomDependencies||{},r={};function o(e,t,n){Object.defineProperty(r,e,{enumerable:!0,get:t,set:n})}},618:(e,t,n)=>{"use strict";n.d(t,{Zi:()=>l,cv:()=>f,gr:()=>u,iK:()=>a});var i=n(24),r=n(28),o="setTimeout",a=r.sZ.setTimeout;a||(a=i.Z.setTimeout),(0,r.x$)(o,(function(){return a}),(function(e){return a=e})),i.Z.setTimeout||(i.Z.setTimeout=a),i.Z.setImmediate||(i.Z.setImmediate=a);var s="clearTimeout",u=r.sZ.clearTimeout;u||(u=i.Z.clearTimeout),(0,r.x$)(s,(function(){return u}),(function(e){return u=e})),i.Z.clearTimeout||(i.Z.clearTimeout=u),i.Z.clearImmediate||(i.Z.clearImmediate=u);var c="setInterval",l=r.sZ.setInterval;l||(l=i.Z.setInterval),(0,r.x$)(c,(function(){return l}),(function(e){return l=e}));var h="clearInterval",f=r.sZ.clearInterval;f||(f=i.Z.clearInterval),(0,r.x$)(h,(function(){return f}),(function(e){return f=e}))},600:(e,t,n)=>{"use strict";n.d(t,{h:()=>_});var i=n(38),r=n.n(i),o=n(575),a=n.n(o),s=n(913),u=n.n(s),c=n(995);const l=require("http");var h=n.n(l);const f=require("https");var d=n.n(f),v=n(303),p=n(857),_=function(){function e(){a()(this,e),this.readyState=0,this._headers={},this.status=0}return u()(e,[{key:"open",value:function(e,t){this._method=e,this._href=t}},{key:"setRequestHeader",value:function(e,t){this._headers[e]=t}},{key:"send",value:function(e){(0,v.mf)(this.onreadystatechange)||(0,p._y)("NodeXmlHttpRequest","missing onreadystatechange event handler"),e&&(e=Buffer.from(e),this._headers["Content-Length"]=e.length),y.call(this,e)}},{key:"getAllResponseHeaders",value:function(){return Object.entries(this._headers).reduce((function(e,t){var n=r()(t,2),i=n[0],o=n[1];return"".concat(e,"\n").concat(i,": ").concat(o)}),"")}}],[{key:"DONE",get:function(){return 4}}]),e}();function g(e){this.responseText=e.message,this._headers={},this.readyState=4,this.onreadystatechange()}function y(e){var t=this,n=(0,c.A)(this._href),i=n.url,r=n.secure,o=n.proxy;if(o)if(r){var a=i.hostname+":443",s=h().request({protocol:o.protocol,hostname:o.hostname,port:o.port,method:"CONNECT",path:a});s.on("connect",(function(n,r){if(200===n.statusCode){var o=d().request({host:i.host,path:i.pathname+i.search+i.hash,method:t._method,agent:new(d().Agent)({socket:r})});m.call(t,o,e)}else g.call(t,new Error("Status ".concat(n.statusCode)))})),s.on("error",g.bind(this)),s.setHeader("Host",a),s.end()}else{var u=h().request({protocol:o.protocol,hostname:o.hostname,port:o.port,method:this._method,path:i.href});u.setHeader("Host",i.host),m.call(this,u,e)}else{var l=(r?d():h()).request({protocol:i.protocol,hostname:i.hostname,port:i.port,method:this._method,path:i.pathname+i.search+i.hash});l.setHeader("Host",i.host),m.call(this,l,e)}}function m(e,t){var n=this;Object.entries(this._headers).forEach((function(t){var n=r()(t,2),i=n[0],o=n[1];return e.setHeader(i,o)})),t&&e.write(t),e.on("error",g.bind(this)),e.on("response",(function(e){var i=[];e.on("data",(function(e){return i.push(e)})),e.on("error",g.bind(n)),e.on("end",(function(){n.status=e.statusCode;var r=[301,302,303,307,308].includes(n.status)&&e.headers.location;r?(n._href=r,y.call(n,t)):(n.readyState=4,n.responseText=Buffer.concat(i).toString("utf8"),n._headers=e.headers,n.onreadystatechange())}))})),e.end()}},995:(e,t,n)=>{"use strict";n.d(t,{A:()=>f});var i=n(28),r="env",o=i.sZ.env;o||(o=process.env),(0,i.x$)(r,(function(){return o}),(function(e){return o=e}));var a,s,u,c,l=(0,n(842).hu)("network.nodeProxy");function h(e){try{return new URL(e)}catch(e){return null}}function f(e){var t=new URL(e);switch(t.protocol){case"http:":case"ws:":return a&&c(t)?{url:t,secure:!1,proxy:a}:{url:t,secure:!1};case"https:":case"wss:":return s&&c(t)?{url:t,secure:!0,proxy:s}:{url:t,secure:!0};default:return{url:t,secure:!1}}}!function(){if(a=h(o.http_proxy||o.HTTP_PROXY),s=h(o.https_proxy||o.HTTPS_PROXY),u=o.no_proxy||o.NO_PROXY,l.log("Node.js proxy layer set to: http_proxy='".concat(a,"'; https_proxy='").concat(s,"'; no_proxy=").concat(u)),u){var e=u.split(",");c=e.indexOf("*")<0?function(t){return e.every((function(e){return!t.origin.endsWith(e)}))}:function(){return!1}}else c=function(){return!0}}()},730:(e,t)=>{"use strict";var n,i={cipher:{},hash:{},keyexchange:{},mode:{},misc:{},codec:{},exception:{corrupt:function(e){this.toString=function(){return"CORRUPT: "+this.message},this.message=e},invalid:function(e){this.toString=function(){return"INVALID: "+this.message},this.message=e},bug:function(e){this.toString=function(){return"BUG: "+this.message},this.message=e},notReady:function(e){this.toString=function(){return"NOT READY: "+this.message},this.message=e}}};i.bitArray={bitSlice:function(e,t,n){return e=i.bitArray._shiftRight(e.slice(t/32),32-(31&t)).slice(1),void 0===n?e:i.bitArray.clamp(e,n-t)},extract:function(e,t,n){var i=Math.floor(-t-n&31);return(-32&(t+n-1^t)?e[t/32|0]<<32-i^e[t/32+1|0]>>>i:e[t/32|0]>>>i)&(1<<n)-1},concat:function(e,t){if(0===e.length||0===t.length)return e.concat(t);var n=e[e.length-1],r=i.bitArray.getPartial(n);return 32===r?e.concat(t):i.bitArray._shiftRight(t,r,0|n,e.slice(0,e.length-1))},bitLength:function(e){var t,n=e.length;return 0===n?0:(t=e[n-1],32*(n-1)+i.bitArray.getPartial(t))},clamp:function(e,t){if(32*e.length<t)return e;var n=(e=e.slice(0,Math.ceil(t/32))).length;return t&=31,n>0&&t&&(e[n-1]=i.bitArray.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial:function(e,t,n){return 32===e?t:(n?0|t:t<<32-e)+1099511627776*e},getPartial:function(e){return Math.round(e/1099511627776)||32},equal:function(e,t){if(i.bitArray.bitLength(e)!==i.bitArray.bitLength(t))return!1;var n,r=0;for(n=0;n<e.length;n++)r|=e[n]^t[n];return 0===r},_shiftRight:function(e,t,n,r){var o,a,s;for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(o=0;o<e.length;o++)r.push(n|e[o]>>>t),n=e[o]<<32-t;return a=e.length?e[e.length-1]:0,s=i.bitArray.getPartial(a),r.push(i.bitArray.partial(t+s&31,t+s>32?n:r.pop(),1)),r},_xor4:function(e,t){return[e[0]^t[0],e[1]^t[1],e[2]^t[2],e[3]^t[3]]},byteswapM:function(e){var t,n;for(t=0;t<e.length;++t)n=e[t],e[t]=n>>>24|n>>>8&65280|(65280&n)<<8|n<<24;return e}},i.codec.utf8String={fromBits:function(e){var t,n,r="",o=i.bitArray.bitLength(e);for(t=0;t<o/8;t++)0==(3&t)&&(n=e[t/4]),r+=String.fromCharCode(n>>>8>>>8>>>8),n<<=8;return decodeURIComponent(escape(r))},toBits:function(e){e=unescape(encodeURIComponent(e));var t,n=[],r=0;for(t=0;t<e.length;t++)r=r<<8|e.charCodeAt(t),3==(3&t)&&(n.push(r),r=0);return 3&t&&n.push(i.bitArray.partial(8*(3&t),r)),n}},i.codec.base64={_chars:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",fromBits:function(e,t,n){var r,o="",a=0,s=i.codec.base64._chars,u=0,c=i.bitArray.bitLength(e);for(n&&(s=s.substr(0,62)+"-_"),r=0;6*o.length<c;)o+=s.charAt((u^e[r]>>>a)>>>26),a<6?(u=e[r]<<6-a,a+=26,r++):(u<<=6,a-=6);for(;3&o.length&&!t;)o+="=";return o},toBits:function(e,t){e=e.replace(/\s|=/g,"");var n,r,o=[],a=0,s=i.codec.base64._chars,u=0;for(t&&(s=s.substr(0,62)+"-_"),n=0;n<e.length;n++){if((r=s.indexOf(e.charAt(n)))<0)throw new i.exception.invalid("this isn't base64!");a>26?(a-=26,o.push(u^r>>>a),u=r<<32-a):u^=r<<32-(a+=6)}return 56&a&&o.push(i.bitArray.partial(56&a,u,1)),o}},i.codec.base64url={fromBits:function(e){return i.codec.base64.fromBits(e,1,1)},toBits:function(e){return i.codec.base64.toBits(e,1)}},i.hash.sha256=function(e){this._key[0]||this._precompute(),e?(this._h=e._h.slice(0),this._buffer=e._buffer.slice(0),this._length=e._length):this.reset()},i.hash.sha256.hash=function(e){return(new i.hash.sha256).update(e).finalize()},i.hash.sha256.prototype={blockSize:512,reset:function(){return this._h=this._init.slice(0),this._buffer=[],this._length=0,this},update:function(e){"string"==typeof e&&(e=i.codec.utf8String.toBits(e));var t,n=this._buffer=i.bitArray.concat(this._buffer,e),r=this._length,o=this._length=r+i.bitArray.bitLength(e);if(o>9007199254740991)throw new i.exception.invalid("Cannot hash more than 2^53 - 1 bits");if("undefined"!=typeof Uint32Array){var a=new Uint32Array(n),s=0;for(t=512+r-(512+r&511);t<=o;t+=512)this._block(a.subarray(16*s,16*(s+1))),s+=1;n.splice(0,16*s)}else for(t=512+r-(512+r&511);t<=o;t+=512)this._block(n.splice(0,16));return this},finalize:function(){var e,t=this._buffer,n=this._h;for(e=(t=i.bitArray.concat(t,[i.bitArray.partial(1,1)])).length+2;15&e;e++)t.push(0);for(t.push(Math.floor(this._length/4294967296)),t.push(0|this._length);t.length;)this._block(t.splice(0,16));return this.reset(),n},_init:[],_key:[],_precompute:function(){var e,t,n=0,i=2;function r(e){return 4294967296*(e-Math.floor(e))|0}for(;n<64;i++){for(t=!0,e=2;e*e<=i;e++)if(i%e==0){t=!1;break}t&&(n<8&&(this._init[n]=r(Math.pow(i,.5))),this._key[n]=r(Math.pow(i,1/3)),n++)}},_block:function(e){var t,n,i,r,o=this._h,a=this._key,s=o[0],u=o[1],c=o[2],l=o[3],h=o[4],f=o[5],d=o[6],v=o[7];for(t=0;t<64;t++)t<16?n=e[t]:(i=e[t+1&15],r=e[t+14&15],n=e[15&t]=(i>>>7^i>>>18^i>>>3^i<<25^i<<14)+(r>>>17^r>>>19^r>>>10^r<<15^r<<13)+e[15&t]+e[t+9&15]|0),n=n+v+(h>>>6^h>>>11^h>>>25^h<<26^h<<21^h<<7)+(d^h&(f^d))+a[t],v=d,d=f,f=h,h=l+n|0,l=c,c=u,s=n+((u=s)&c^l&(u^c))+(u>>>2^u>>>13^u>>>22^u<<30^u<<19^u<<10)|0;o[0]=o[0]+s|0,o[1]=o[1]+u|0,o[2]=o[2]+c|0,o[3]=o[3]+l|0,o[4]=o[4]+h|0,o[5]=o[5]+f|0,o[6]=o[6]+d|0,o[7]=o[7]+v|0}},i.hash.sha1=function(e){e?(this._h=e._h.slice(0),this._buffer=e._buffer.slice(0),this._length=e._length):this.reset()},i.hash.sha1.hash=function(e){return(new i.hash.sha1).update(e).finalize()},i.hash.sha1.prototype={blockSize:512,reset:function(){return this._h=this._init.slice(0),this._buffer=[],this._length=0,this},update:function(e){"string"==typeof e&&(e=i.codec.utf8String.toBits(e));var t,n=this._buffer=i.bitArray.concat(this._buffer,e),r=this._length,o=this._length=r+i.bitArray.bitLength(e);if(o>9007199254740991)throw new i.exception.invalid("Cannot hash more than 2^53 - 1 bits");if("undefined"!=typeof Uint32Array){var a=new Uint32Array(n),s=0;for(t=this.blockSize+r-(this.blockSize+r&this.blockSize-1);t<=o;t+=this.blockSize)this._block(a.subarray(16*s,16*(s+1))),s+=1;n.splice(0,16*s)}else for(t=this.blockSize+r-(this.blockSize+r&this.blockSize-1);t<=o;t+=this.blockSize)this._block(n.splice(0,16));return this},finalize:function(){var e,t=this._buffer,n=this._h;for(e=(t=i.bitArray.concat(t,[i.bitArray.partial(1,1)])).length+2;15&e;e++)t.push(0);for(t.push(Math.floor(this._length/4294967296)),t.push(0|this._length);t.length;)this._block(t.splice(0,16));return this.reset(),n},_init:[1732584193,4023233417,2562383102,271733878,3285377520],_key:[1518500249,1859775393,2400959708,3395469782],_f:function(e,t,n,i){return e<=19?t&n|~t&i:e<=39?t^n^i:e<=59?t&n|t&i|n&i:e<=79?t^n^i:void 0},_S:function(e,t){return t<<e|t>>>32-e},_block:function(e){var t,n,i,r,o,a,s,u,c=this._h;if("undefined"!=typeof Uint32Array){u=Array(80);for(var l=0;l<16;l++)u[l]=e[l]}else u=e;for(i=c[0],r=c[1],o=c[2],a=c[3],s=c[4],t=0;t<=79;t++)t>=16&&(u[t]=this._S(1,u[t-3]^u[t-8]^u[t-14]^u[t-16])),n=this._S(5,i)+this._f(t,r,o,a)+s+u[t]+this._key[Math.floor(t/20)]|0,s=a,a=o,o=this._S(30,r),r=i,i=n;c[0]=c[0]+i|0,c[1]=c[1]+r|0,c[2]=c[2]+o|0,c[3]=c[3]+a|0,c[4]=c[4]+s|0}},e.exports&&(e.exports=i),void 0===(n=function(){return i}.apply(t,[]))||(e.exports=n)},924:(e,t,n)=>{"use strict";n.d(t,{Z:()=>y,k:()=>g});var i=n(575),r=n.n(i),o=n(913),a=n.n(o),s=n(319),u=n.n(s),c=n(842),l=n(55),h=n(303),f=n(857),d=n(455),v={};function p(e,t){var n=e.length;return n>=t?e.substring(0,t):e+c.Yk.substring(0,t-n)}function _(e){return e.map((function(e){return(0,h.mf)(e)?e():e}))}function g(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];(0,f._y)(f.O4,l.X.apply(void 0,u()(_(t))))}var y=function(){function e(t,n,i,o){r()(this,e),this._fqdn=t,this._prefix=n;var a=t.join(".");this._count=void 0===v[a]?v[a]=0:++v[a],this.displayTimestamp=i,this.setPrefixWidth(o||8),this._log=this._emitLog.bind(this,l.i.log),this._info=this._emitLog.bind(this,l.i.info),this._warn=this._emitLog.bind(this,l.i.warn),this._error=this._emitLog.bind(this,l.i.error),this._enabled=!0}return a()(e,[{key:"fqdn",get:function(){return this._fqdn}},{key:"_emitLog",value:function(e,t){var n=this.displayTimestamp?[(new Date).toISOString()]:[];n.push(this._displayedPrefix);for(var i=arguments.length,r=new Array(i>2?i-2:0),o=2;o<i;o++)r[o-2]=arguments[o];(0,h.HD)(t)?(n.push(t),t=n.join(" "),e.apply(void 0,[t].concat(u()(_(r))))):e.apply(void 0,n.concat(u()(_([t].concat(r)))))}},{key:"setPrefixWidth",value:function(e){this._displayedPrefix="".concat(p(this._prefix,e)," #").concat(p(this._count.toString(),3))}},{key:"setLevel",value:function(e){this._enabled=e>=0,this.log=e>=c.ZP.LOG?this._log:d.ZT,this.info=e>=c.ZP.INFO?this._info:d.ZT,this.warn=e>=c.ZP.WARN?this._warn:d.ZT,this.error=e>=c.ZP.ERROR?this._error:d.ZT}},{key:"updateLevel",value:function(e){this._enabled&&this.setLevel(e)}}]),e}()},455:(e,t,n)=>{"use strict";n.d(t,{Rk:()=>a,Tl:()=>o,ZT:()=>r,mb:()=>s});var i=n(618),r=Function.prototype;function o(e){try{e()}catch(e){(0,i.iK)((function(){throw e}))}}function a(e,t){var n=e||r;try{return t(n)}catch(e){n(e)}}function s(e){return new Promise((function(t,n){return e((function(e,i){return e&&n(e)||t(i)}))}))}},24:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var i=function(){if("undefined"!=typeof globalThis)return globalThis;return global}()},303:(e,t,n)=>{"use strict";n.d(t,{HD:()=>s,Kn:()=>l,hj:()=>u,jn:()=>a,lk:()=>h,mf:()=>c});var i=n(8),r=n.n(i),o=n(466);function a(e){return"boolean"==typeof e}function s(e){return"string"==typeof e}function u(e){return"number"==typeof e}function c(e){return"function"==typeof e}function l(e){return"object"===r()(e)}function h(){return o.RY&&(window.navigator.userAgent.match(/CriOS|Twitter for iPhone|FBAN\/FBIOS|Windows Phone/)||window.navigator.standalone)}},857:(e,t,n)=>{"use strict";n.d(t,{Dp:()=>T,Hk:()=>N,IH:()=>f,O3:()=>c,O4:()=>u,O7:()=>S,Q3:()=>_,Ry:()=>R,T2:()=>p,Yl:()=>E,Z_:()=>C,_T:()=>d,__:()=>m,_y:()=>v,hu:()=>l,jt:()=>g,kw:()=>x,l4:()=>k,sR:()=>w,vA:()=>y,wB:()=>A,wE:()=>D});var i=n(8),r=n.n(i),o=n(319),a=n.n(o),s=n(303),u="Webcom internal error";function c(){v(u,"not (yet) implemented abstract member!")}function l(e,t){e||v(u,t)}var h={values:[]};function f(e,t){for(var n=arguments.length,i=new Array(n>2?n-2:0),r=2;r<n;r++)i[r-2]=arguments[r];Object.assign(h,{method:e,args:t||[],checkers:i})}function d(e,t,n){h.values.push({name:e,value:t,checker:n})}var v=function(e,t){var n;throw new Error("".concat((n="").concat.apply(n,a()(e)),": ").concat(t))};function p(e,t){if(!h.method){for(var n=arguments.length,i=new Array(n>2?n-2:0),r=2;r<n;r++)i[r-2]=arguments[r];f.apply(void 0,[e,t].concat(i))}var o=h.method,a=h.args,s=h.checkers,u=h.values;Object.assign(h,{method:void 0,args:void 0,checkers:void 0,values:[]}),a.length>s.length&&v(o,"too many arguments, ".concat(a.length," instead of ").concat(s.length)),s.forEach((function(e,t){return _(e,a[t],o,(function(e){return"argument #".concat(t+1," ").concat(e)}))})),u.forEach((function(e){var t=e.name,n=e.value;return _(e.checker,n,o,(function(e){return"".concat(t," ").concat(e)}))}))}function _(e,t,n,i){var r=e(t);r&&v(n,i(r))}function g(e){return function(t){return b("undefined")(t)&&e&&e(t)}}function y(e){return function(t){return null===t?"must not be null":e&&e(t)}}var m=function(e){return void 0===e?"is missing":""};function k(e){return function(t){return!(t instanceof e)&&"must be an instance of ".concat(e.name)}}function b(e){return function(t){return r()(t)!==e&&"must be a ".concat(e)}}var w=b("undefined"),C=b("string"),E=b("function"),S=b("boolean"),T=O(Number.isFinite,"must be a finite number"),R=b("object");function D(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return t.every((function(t){return t(e)}))&&"either ".concat(t.map((function(t){return t(e)})).join(" or "))}}function N(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){var n;return t.some((function(t){return n=t(e)}))&&n}}function x(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return t.every((function(t){return t!==e}))&&"must be either ".concat(t.join(" or "))}}function O(e,t){return function(n){return!e(n)&&(t||"is not valid")}}O((function(e){return(0,s.hj)(e)&&Math.floor(e)===e}),"must be an integer");function A(e,t){return O((function(t){return e.test(t)}),t)}},380:e=>{"use strict";e.exports=require("faye-websocket")},113:e=>{"use strict";e.exports=require("crypto")},147:e=>{"use strict";e.exports=require("fs")}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var o=t[i]={exports:{}};return e[i](o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var i={};(()=>{"use strict";n.d(i,{default:()=>R});var e=n(24),t=n(575),r=n.n(t),o=n(913),a=n.n(o),s=n(38),u=n.n(s),c=n(857),l=n(842),h=n(303),f="WebcomApp",d=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r()(this,e),(0,c.T2)(["new ",f],arguments,(0,c.wB)(/^[a-z0-9](?:[-a-z0-9]{0,38}[a-z0-9])?$/),(0,c.jt)((0,c.wE)(c.Ry,c.Z_))),this._logger=(0,l.hu)("api.WebcomApp",f),this._services={},this.appId=t,this.config={},(0,h.HD)(n)&&(n=Object.keys(g).reduce((function(e,t){return e[t]={baseUrl:n},e}),{})),this._fillConfig(n),this._logger.log("Initialized %s with options %s",t,JSON.stringify(this.config))}return a()(e,[{key:"dispose",value:function(){(0,c.T2)([f,"#dispose"],arguments),Object.values(this._services).forEach((function(e){return e._dispose()})),this._services={}}},{key:"_fillConfig",value:function(e){v.call(this,e,g)}},{key:"toString",value:function(){return"".concat(this.appId,"{").concat(Object.keys(this._services).join(","),"}")}}]),e}();function v(e,t){var n=this;!function e(t,i,r,o){var a=function(e){return"".concat(f,".Configuration.").concat(o.concat(e).join("."))};i=Object.assign({},i),Object.entries(r).forEach((function(r){var s=u()(r,2),l=s[0],h=s[1];if(h instanceof Object&&!(h instanceof Array))t[l]=t[l]||{},e(t[l],i[l]||{},h,o.concat(l));else{var f=i[l],d=h[1]||function(e){return e};try{t[l]=d(void 0===f?void 0===t[l]?h.length?h[0]:h:t[l]:f)}catch(e){var v=a(l);void 0===e.value?(0,c._y)(v,e.message):(n._logger.warn("%s: %s",v,e.message),t[l]=e.value)}}delete i[l]})),Object.keys(i).forEach((function(e){return n._logger.warn("%s: unknown config key",a(e))}))}(this.config,e,t,[])}function p(e,t){var n=t.baseUrl;return"/".concat(n.protocol.slice(0,-1),"/").concat(n.host,"/").concat(e.appId,"/")}function _(e,t,n){return"".concat(n.key,":").concat(t,":").concat(p(e,n))}var g={},y=n(28),m="-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz",k=m.length,b=k-1,w=0,C=[];function E(e){var t=e===w;w=e;var n,i=new Array(8);for(n=7;n>=0;n--)i[n]=m.charAt(e%k),e=Math.floor(e/k);(0,c.hu)(0===e,"Cannot push at time == 0");var r=i.join("");if(t){for(n=11;n>=0&&C[n]===b;n--)C[n]=0;C[n]++}else for(n=0;n<12;n++)C[n]=Math.floor(Math.random()*k);for(n=0;n<12;n++)r+=m.charAt(C[n]);return(0,c.hu)(20===r.length,"nextPushId: Length should be 20."),r}function S(e){for(var t=e.substring(0,8),n=0,i=0;i<8;++i)n=n*k+m.indexOf(t[i]);return n}var T="Webcom",R=function(){function e(){r()(this,e),this._init.apply(this,arguments)}return a()(e,[{key:"_init",value:function(){(0,c._y)(["new ",T],"this static class cannot be instantiated")}}],[{key:"SDK_VERSION",get:function(){return"3.8.0"}},{key:"Log",get:function(){return l.ZP}},{key:"App",value:function(e,t){return new d(e,t)}},{key:"getUniqueKeyDate",value:function(e){return new Date(S(e))}},{key:"dependencies",get:function(){return y.HO}}]),e}(),D=(0,l.hu)("api.Webcom",T),N=n(319),x=n.n(N),O=n(466);function A(e){"http:"===e.protocol&&O.RY&&"https:"===window.location.protocol&&this._logger.warn("Insecure access to a Webcom service from a secure page. Please setup your service with an https protocol.")}var P=new RegExp("^(?:([^:]+:)//)?(?:[^/@]+@)?([^/:]+(?::\\d+)?)(?:/.*)?$"),L="io.datasync.orange.com";function I(t){if(t&&(e.Z.URL&&t instanceof URL||t.href&&t.protocol&&t.host))return t;var n=t?P.exec(t):[L,void 0,L];if(n){var i=u()(n,3),r=i[0],o=i[1],a=i[2];return o||(r="".concat(o="https:","//").concat(r)),{href:r,protocol:o,host:a}}throw new Error("cannot parse base URL: ".concat(t))}function j(e,t){return function(n){var i=e(n);if(i)throw new Error(i);return t?t(n):n}}var F=n(8),M=n.n(F);function V(e,t,n,i){return U(e.prototype,t,n,i)}function q(e,t,n,i){return W(e,t,{value:n},i)}function U(e,t,n,i){return W(e,t,{get:n},i)}function W(e,t,n,i){return Object.defineProperty(e,t,Object.assign(n,{enumerable:i,configurable:!0}))}var Z="some",H="required",Q="none",K=function(){function e(t,n){r()(this,e),(0,c.hu)(t===Z||t===H||t===Q,"Wrong state value for a new State object: expecting 'some', 'required' or 'none'."),this.state=t,(0,c.hu)(t!==Z||n&&n.webcomAuthToken,"Missing details or webcomAuthToken for a new 'some' State"),this.details=n}return a()(e,[{key:"isUnauthenticated",value:function(){return this.state===Q}},{key:"isAuthenticated",value:function(){return this.state===Z}},{key:"isRequired",value:function(){return this.state===H}},{key:"isSameAs",value:function(e){return this.state===e.state&&(this.state!==Z||this.details.webcomAuthToken===e.details.webcomAuthToken)}}]),e}(),B=new K(Q),J=new K(H),G=function(e){return new K(Z,e)};function z(e){try{return new K(e.state,e.details)}catch(e){return B}}var Y,$="Authentication";function X(e){switch((0,c.T2)([T,".avatarURL"],arguments,c.Ry),e&&e.provider){case"facebook":return"https://graph.facebook.com/".concat(e.providerUid,"/picture?type=large");case"github":return e.providerProfile.avatar_url;case"gitlab":case"google":return e.providerProfile.picture}}g.Authentication={from:[void 0,j((0,c.jt)((0,c.l4)(d)))],baseUrl:[null,I],storage:[void 0,j((0,c.jt)((0,c.wE)(c.Z_,c.Yl)))],initialState:[void 0,function(e){return e&&JSON.parse(e)}],key:[void 0,j(c.sR,(function(){return"auth"}))]},V(d,"authentication",(function(){var e=this._services.Authentication;if(!e){var t=this.config.Authentication.from;e=t?t.authentication:Y(this),this._services.Authentication=e}return e}));var ee=n(618);function te(e){var t=e.code||"UNKNOWN_ERROR",n=e.message||JSON.stringify(e),i=new Error("".concat(t,"[").concat(n,"]"));return i.code=t,i}var ne=function(){function e(){r()(this,e),this.cache_={}}return a()(e,[{key:"length",get:function(){return Object.keys(this.cache_).length}},{key:"key",value:function(e){var t=Object.keys(this.cache_);return 0<=e&&e<t.length?t[e]:null}},{key:"getItem",value:function(e){return this.cache_.hasOwnProperty(e)?this.cache_[e]:null}},{key:"setItem",value:function(e,t){this.cache_[e]=t}},{key:"removeItem",value:function(e){delete this.cache_[e]}},{key:"clear",value:function(){this.cache_={}}}]),e}(),ie="localStorage",re=y.sZ.localStorage;re||(re=e.Z.localStorage||new ne),(0,y.x$)(ie,(function(){return re}),(function(e){return re=e}));var oe="sessionStorage",ae=y.sZ.sessionStorage;function se(e){return"webcom:"+e}ae||(ae=e.Z.sessionStorage||null),(0,y.x$)(oe,(function(){return ae}),(function(e){return ae=e}));var ue=a()((function e(t,n){r()(this,e);var i=t();if(i){var o=se("sentinel");i.setItem(o,""),i.removeItem(o)}function a(){return t()||(0,c._y)("JSONStorage","the ".concat(n," implementation could not be found!"))}this.set=function(e,t){if(null===t)a().removeItem(se(e));else{var n=JSON.stringify(t);a().setItem(se(e),"string"==typeof n?n:"null")}},this.get=function(e){var t=a().getItem(se(e));return t&&JSON.parse(t)},this.remove=function(e){a().removeItem(se(e))}})),ce=new ue((function(){return re}),"localStorage"),le=new ue((function(){return ae}),"sessionStorage"),he=n(730),fe=n.n(he);function de(e){return decodeURIComponent(e.replace(/\+/g," "))}function ve(){var e=2147483648;return Math.floor(Math.random()*e).toString(36)+Math.abs(Math.floor(Math.random()*e)^Date.now()).toString(36)}function pe(e){var t={};return e.replace(/^[^?]*\?/,"").split("&").forEach((function(e){var n=e.indexOf("=");if(n<0)t[de(e)]=!0;else{var i=de(e.substring(0,n));t[i]=de(e.substring(n+1))}})),t}function _e(e){if(!e)return"";var t=[];return Object.entries(e).forEach((function(e){var n=u()(e,2),i=n[0],r=n[1];null!=r&&((0,h.Kn)(r)&&(r=JSON.stringify(r)),t.push(encodeURIComponent(i)+"="+encodeURIComponent(r)))})),t.join("&")}function ge(e,t){var n=e.indexOf("?"),i=t?(n<0?"?":"&")+_e(t):"",r=e.indexOf("#");return r<0?e+i:e.substring(0,r)+i+e.substring(r)}function ye(e,t){return fe().codec.base64.fromBits(fe().hash.sha1.hash(e),!1,t)}var me=n(100),ke=n.n(me);var be="XMLHttpRequest",we=y.sZ.XMLHttpRequest;we||(we=n(600).h),(0,y.x$)(be,(function(){return we}),(function(e){return we=e}));var Ce=(0,l.hu)("network.HttpRequest","HttpRequest"),Ee="application/x-www-form-urlencoded",Se="application/json",Te="Content-Type",Re="PUT",De="PATCH",Ne="POST",xe="DELETE",Oe="GET",Ae=a()((function e(t,n){r()(this,e),this.name=t,this.value=n})),Pe="HttpRequest",Le=function(){function e(t,n){r()(this,e);for(var i=arguments.length,o=new Array(i>2?i-2:0),a=2;a<i;a++)o[a-2]=arguments[a];this.url=ge([n].concat(x()(o.filter((function(e){return e&&e.length})).map((function(e){return encodeURIComponent(e)})))).join("/"),{c:O.DV}),this.method=t.toUpperCase(),this.headers={Accept:"application/json, text/plain"}}return a()(e,[{key:"addQueryParameters",value:function(e){return this.url=ge(this.url,e),this}},{key:"addJson",value:function(e){return this.contentType=Se,this.data=e,this}},{key:"addForm",value:function(e){return this.contentType=Ee,this.data=e,this}},{key:"addHeader",value:function(e){return(0,c.T2)([Pe,"#addHeader"],arguments,(0,c.jt)((0,c.l4)(Ae))),e&&(this.headers[e.name]=e.value),this}},{key:"readResponseHeaders",value:function(){return this.readHeaders=!0,this}},{key:"send",value:function(){var e=this;return new Promise((function(t,n){var i=null;void 0!==e.data&&[Ne,Re,De].indexOf(e.method)>=0&&((i=e.contentType===Ee?_e(e.data):e.contentType===Se?JSON.stringify(e.data):e.data)?e.headers[Te]=e.contentType:delete e.headers[Te]),Ce.log("==> ".concat(e.method," ").concat(e.url)),Object.keys(e.headers).forEach((function(t){return Ce.log(" > HEADER ".concat(t,": ").concat(e.headers[t]))})),i&&Ce.log(" > DATA: ".concat(i)),e._open(i,t,(function(e){Ce.log("<== ERROR: ".concat(JSON.stringify(e))),n(te(e))}))}))}},{key:"_open",value:function(e,t,n){var i=this,r=new we,o="RESPONSE_PAYLOAD_ERROR";r.onreadystatechange=function(){if(4===r.readyState){var e=r.responseText,a=r.status;if(a>=500)n({code:o,message:"HTTP status ".concat(a)});else try{var s=e.length?JSON.parse(e):{};if(a>=400)n(s.error||s);else if(a>=200&&a<300||304===a){var u={body:s},c=u.body.error||null;c?n((0,h.Kn)(c)?c:{code:u.body.status,message:c}):(i.readHeaders&&(u.headers=function(e){var t=e.getAllResponseHeaders().trim().split(/[\r\n]+/),n={};return t.forEach((function(e){var t=e.indexOf(": "),i=e.substring(0,t).toLowerCase();n[i]=e.substring(t+2)})),n}(r)),Ce.log("<== ".concat(JSON.stringify(u))),t(u))}else n({code:o,message:"HTTP status ".concat(a)})}catch(e){n({code:o,message:"invalid response payload, not a Json content type"})}}},r.open(this.method,this.url,!0),Object.entries(this.headers).forEach((function(e){var t=u()(e,2),n=t[0],i=t[1];return r.setRequestHeader(n,i)})),r.send(e)}}]),e}();function Ie(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return ke()(Le,[Oe,e].concat(n))}function je(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return ke()(Le,[Re,e].concat(n))}function Fe(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return ke()(Le,[Ne,e].concat(n))}function Me(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return ke()(Le,[xe,e].concat(n))}function Ve(e){if(e)return new Ae("Authorization","Bearer ".concat(e))}var qe=function(){function e(t){r()(this,e),q(this,"name",t),this.counters_={}}return a()(e,[{key:"attach",value:function(e){this.counters_=e.counters_}},{key:"incrementCounter",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.counters_[e]=(this.counters_[e]||0)+t}},{key:"get",value:function(){return Object.assign({},this.counters_)}}]),e}(),Ue=new qe("deprecated"),We=n(455);function Ze(e,t,n,i){i=i&&i.concat(": ")||"",n=n?"use ".concat(n," instead"):"it should no longer be used",e.warn("".concat(i).concat(t," is deprecated, ").concat(n,".")),Ue.incrementCounter(t)}q(l.ZP,"showDeprecations",(function(){(0,c.T2)([l.ab,"showDeprecations"],arguments),He=Ze})),q(l.ZP,"hideDeprecations",(function(){(0,c.T2)([l.ab,"hideDeprecations"],arguments),He=We.ZT}));var He=Ze;q(R,"Authentication",{avatarURL:X}),U(R,"avatarURL",(function(){return He(D,"Webcom.avatarURL","Webcom.Authentication.avatarURL"),X}));var Qe={code:"USER_DENIED",message:"The user aborted authentication"},Ke={facebook:{height:650,width:680},google:{height:460,width:490},github:{height:760,width:340},gitlab:{height:710,width:800},orange:{height:700,width:1e3},mobileconnectOFR:{height:540,width:700}},Be={menubar:0,location:0,resizable:0,scrollbars:1,status:0,dialog:1,width:700,height:375};function Je(e,t){var n=e.config.Authentication;return(0,h.HD)(n.storage)?n.storage:_(e,"state",n)+t}function Ge(e,t,n){(0,ee.iK)((function(){return e(t,n)}))}function ze(){return O.RY&&(le.get(this._oauthSessionKey)||ce.get(this._oauthSessionKey))}var Ye,$e,Xe,et=function(){function e(t){r()(this,e),this._logger=(0,l.hu)("api.Authentication",$),this._logger.log("Initializing with options ".concat(JSON.stringify(t.config.Authentication))),this._app=t,this._init(t)}return a()(e,[{key:"_init",value:function(e){var t=e.config.Authentication;A.call(this,t.baseUrl);var n=this._logger._count;this._currentState=z(function(e,t){var n=e.config.Authentication;return n.initialState||((0,h.mf)(n.storage)?{}:ce.get(Je(e,t)))}(e,n)),this._authStateSetter=function(e,t){var n=e.config.Authentication;if((0,h.mf)(n.storage))return function(e){return n.storage(JSON.stringify(e))};var i=Je(e,t);return function(e){return e&&!e.isUnauthenticated()?ce.set(i,e):ce.remove(i)}}(e,n),this._oauthSessionKey=_(e,"ongoing",t)+n,this.isAuthContextual=!1,this._firstSubscriptions=[],this._lastSubscriptions=[],this._authRoute="".concat(t.baseUrl.href,"/auth/v2/").concat(e.appId),this._resumeAuthState(),this._logger.log("Initialized for appId %s",e.appId)}},{key:"_dispose",value:function(){}},{key:"currentState",get:function(){return this._currentState},set:function(e){this._currentState.isSameAs(e)||(this._currentState=function(e){if(e.isAuthenticated()){var t=Object.assign({},e.details);return delete t.extra,G(t)}return e}(e),this._authStateSetter(this._currentState),this._notifyErrorOrAuthStateChanged(null,e))}},{key:"_resumeAuthState",value:function(){var e=this;if(O.RY)if("popup"===ce.get(this._oauthSessionKey))document.body.style.display="none",ce.set(this._oauthSessionKey,pe(location.search).__wcsession),window.close();else{var t=le.get(this._oauthSessionKey);if(t){var n=pe(location.search).__wcsession;if(n)return void(this._oauthSessionPr