(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[342],{3239:()=>{"use strict";Math.abs,String.fromCharCode,Object.assign},8315:t=>{"use strict";t.exports=function(t,e){var n=new Array(arguments.length-1),r=0,o=2,i=!0;for(;o{"use strict";var n=e;n.length=function(t){var e=t.length;if(!e)return 0;for(var n=0;--e%4>1&&"="===t.charAt(e);)++n;return Math.ceil(3*t.length)/4-n};for(var r=new Array(64),o=new Array(123),i=0;i<64;)o[r[i]=i<26?i+65:i<52?i+71:i<62?i-4:i-59|43]=i++;n.encode=function(t,e,n){for(var o,i=null,a=[],s=0,c=0;e>2],o=(3&l)<<4,c=1;break;case 1:a[s++]=r[o|l>>4],o=(15&l)<<2,c=2;break;case 2:a[s++]=r[o|l>>6],a[s++]=r[63&l],c=0}s>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,a)),s=0)}return c&&(a[s++]=r[o],a[s++]=61,1===c&&(a[s++]=61)),i?(s&&i.push(String.fromCharCode.apply(String,a.slice(0,s))),i.join("")):String.fromCharCode.apply(String,a.slice(0,s))};var a="invalid encoding";n.decode=function(t,e,n){for(var r,i=n,s=0,c=0;c1)break;if(void 0===(l=o[l]))throw Error(a);switch(s){case 0:r=l,s=1;break;case 1:e[n++]=r<<2|(48&l)>>4,r=l,s=2;break;case 2:e[n++]=(15&r)<<4|(60&l)>>2,r=l,s=3;break;case 3:e[n++]=(3&r)<<6|l,s=0}}if(1===s)throw Error(a);return n-i},n.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)}},5985:t=>{"use strict";function e(){this._listeners={}}t.exports=e,e.prototype.on=function(t,e,n){return(this._listeners[t]||(this._listeners[t]=[])).push({fn:e,ctx:n||this}),this},e.prototype.off=function(t,e){if(void 0===t)this._listeners={};else if(void 0===e)this._listeners[t]=[];else for(var n=this._listeners[t],r=0;r{"use strict";function e(t){return"undefined"!=typeof Float32Array?function(){var e=new Float32Array([-0]),n=new Uint8Array(e.buffer),r=128===n[3];function o(t,r,o){e[0]=t,r[o]=n[0],r[o+1]=n[1],r[o+2]=n[2],r[o+3]=n[3]}function i(t,r,o){e[0]=t,r[o]=n[3],r[o+1]=n[2],r[o+2]=n[1],r[o+3]=n[0]}function a(t,r){return n[0]=t[r],n[1]=t[r+1],n[2]=t[r+2],n[3]=t[r+3],e[0]}function s(t,r){return n[3]=t[r],n[2]=t[r+1],n[1]=t[r+2],n[0]=t[r+3],e[0]}t.writeFloatLE=r?o:i,t.writeFloatBE=r?i:o,t.readFloatLE=r?a:s,t.readFloatBE=r?s:a}():function(){function e(t,e,n,r){var o=e<0?1:0;if(o&&(e=-e),0===e)t(1/e>0?0:2147483648,n,r);else if(isNaN(e))t(2143289344,n,r);else if(e>34028234663852886e22)t((o<<31|2139095040)>>>0,n,r);else if(e<11754943508222875e-54)t((o<<31|Math.round(e/1401298464324817e-60))>>>0,n,r);else{var i=Math.floor(Math.log(e)/Math.LN2);t((o<<31|i+127<<23|8388607&Math.round(e*Math.pow(2,-i)*8388608))>>>0,n,r)}}function a(t,e,n){var r=t(e,n),o=2*(r>>31)+1,i=r>>>23&255,a=8388607&r;return 255===i?a?NaN:o*(1/0):0===i?1401298464324817e-60*o*a:o*Math.pow(2,i-150)*(a+8388608)}t.writeFloatLE=e.bind(null,n),t.writeFloatBE=e.bind(null,r),t.readFloatLE=a.bind(null,o),t.readFloatBE=a.bind(null,i)}(),"undefined"!=typeof Float64Array?function(){var e=new Float64Array([-0]),n=new Uint8Array(e.buffer),r=128===n[7];function o(t,r,o){e[0]=t,r[o]=n[0],r[o+1]=n[1],r[o+2]=n[2],r[o+3]=n[3],r[o+4]=n[4],r[o+5]=n[5],r[o+6]=n[6],r[o+7]=n[7]}function i(t,r,o){e[0]=t,r[o]=n[7],r[o+1]=n[6],r[o+2]=n[5],r[o+3]=n[4],r[o+4]=n[3],r[o+5]=n[2],r[o+6]=n[1],r[o+7]=n[0]}function a(t,r){return n[0]=t[r],n[1]=t[r+1],n[2]=t[r+2],n[3]=t[r+3],n[4]=t[r+4],n[5]=t[r+5],n[6]=t[r+6],n[7]=t[r+7],e[0]}function s(t,r){return n[7]=t[r],n[6]=t[r+1],n[5]=t[r+2],n[4]=t[r+3],n[3]=t[r+4],n[2]=t[r+5],n[1]=t[r+6],n[0]=t[r+7],e[0]}t.writeDoubleLE=r?o:i,t.writeDoubleBE=r?i:o,t.readDoubleLE=r?a:s,t.readDoubleBE=r?s:a}():function(){function e(t,e,n,r,o,i){var a=r<0?1:0;if(a&&(r=-r),0===r)t(0,o,i+e),t(1/r>0?0:2147483648,o,i+n);else if(isNaN(r))t(0,o,i+e),t(2146959360,o,i+n);else if(r>17976931348623157e292)t(0,o,i+e),t((a<<31|2146435072)>>>0,o,i+n);else{var s;if(r<22250738585072014e-324)t((s=r/5e-324)>>>0,o,i+e),t((a<<31|s/4294967296)>>>0,o,i+n);else{var c=Math.floor(Math.log(r)/Math.LN2);1024===c&&(c=1023),t(4503599627370496*(s=r*Math.pow(2,-c))>>>0,o,i+e),t((a<<31|c+1023<<20|1048576*s&1048575)>>>0,o,i+n)}}}function a(t,e,n,r,o){var i=t(r,o+e),a=t(r,o+n),s=2*(a>>31)+1,c=a>>>20&2047,l=4294967296*(1048575&a)+i;return 2047===c?l?NaN:s*(1/0):0===c?5e-324*s*l:s*Math.pow(2,c-1075)*(l+4503599627370496)}t.writeDoubleLE=e.bind(null,n,0,4),t.writeDoubleBE=e.bind(null,r,4,0),t.readDoubleLE=a.bind(null,o,0,4),t.readDoubleBE=a.bind(null,i,4,0)}(),t}function n(t,e,n){e[n]=255&t,e[n+1]=t>>>8&255,e[n+2]=t>>>16&255,e[n+3]=t>>>24}function r(t,e,n){e[n]=t>>>24,e[n+1]=t>>>16&255,e[n+2]=t>>>8&255,e[n+3]=255&t}function o(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24)>>>0}function i(t,e){return(t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3])>>>0}t.exports=e(e)},7789:module=>{"use strict";function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(t){}return null}module.exports=inquire},5057:t=>{"use strict";t.exports=function(t,e,n){var r=n||8192,o=r>>>1,i=null,a=r;return function(n){if(n<1||n>o)return t(n);a+n>r&&(i=t(r),a=0);var s=e.call(i,a,a+=n);return 7&a&&(a=1+(7|a)),s}}},2025:(t,e)=>{"use strict";var n=e;n.length=function(t){for(var e=0,n=0,r=0;r191&&r<224?i[a++]=(31&r)<<6|63&t[e++]:r>239&&r<365?(r=((7&r)<<18|(63&t[e++])<<12|(63&t[e++])<<6|63&t[e++])-65536,i[a++]=55296+(r>>10),i[a++]=56320+(1023&r)):i[a++]=(15&r)<<12|(63&t[e++])<<6|63&t[e++],a>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,i)),a=0);return o?(a&&o.push(String.fromCharCode.apply(String,i.slice(0,a))),o.join("")):String.fromCharCode.apply(String,i.slice(0,a))},n.write=function(t,e,n){for(var r,o,i=n,a=0;a>6|192,e[n++]=63&r|128):55296==(64512&r)&&56320==(64512&(o=t.charCodeAt(a+1)))?(r=65536+((1023&r)<<10)+(1023&o),++a,e[n++]=r>>18|240,e[n++]=r>>12&63|128,e[n++]=r>>6&63|128,e[n++]=63&r|128):(e[n++]=r>>12|224,e[n++]=r>>6&63|128,e[n++]=63&r|128);return n-i}},283:(t,e,n)=>{"use strict";function r(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r3?e.i-4:e.i:Array.isArray(t)?1:p(t)?2:f(t)?3:0}function c(t,e){return 2===s(t)?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function l(t,e){return 2===s(t)?t.get(e):t[e]}function u(t,e,n){var r=s(t);2===r?t.set(e,n):3===r?t.add(n):t[e]=n}function h(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function p(t){return j&&t instanceof Map}function f(t){return H&&t instanceof Set}function d(t){return t.o||t.t}function m(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=X(t);delete e[G];for(var n=Q(e),r=0;r1&&(t.set=t.add=t.clear=t.delete=v),Object.freeze(t),e&&a(t,(function(t,e){return g(e,!0)}),!0)),t}function v(){r(2)}function y(t){return null==t||"object"!=typeof t||Object.isFrozen(t)}function b(t){var e=Y[t];return e||r(18,t),e}function _(t,e){Y[t]||(Y[t]=e)}function E(){return z}function w(t,e){e&&(b("Patches"),t.u=[],t.s=[],t.v=e)}function A(t){S(t),t.p.forEach(T),t.p=null}function S(t){t===z&&(z=t.l)}function C(t){return z={p:[],l:z,h:t,m:!0,_:0}}function T(t){var e=t[G];0===e.i||1===e.i?e.j():e.g=!0}function L(t,e){e._=e.p.length;var n=e.p[0],o=void 0!==t&&t!==n;return e.h.O||b("ES5").S(e,t,o),o?(n[G].P&&(A(e),r(4)),i(t)&&(t=O(e,t),e.l||k(e,t)),e.u&&b("Patches").M(n[G].t,t,e.u,e.s)):t=O(e,n,[]),A(e),e.u&&e.v(e.u,e.s),t!==W?t:void 0}function O(t,e,n){if(y(e))return e;var r=e[G];if(!r)return a(e,(function(o,i){return x(t,r,e,o,i,n)}),!0),e;if(r.A!==t)return e;if(!r.P)return k(t,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=4===r.i||5===r.i?r.o=m(r.k):r.o,i=o,s=!1;3===r.i&&(i=new Set(o),o.clear(),s=!0),a(i,(function(e,i){return x(t,r,o,e,i,n,s)})),k(t,o,!1),n&&t.u&&b("Patches").N(r,n,t.u,t.s)}return r.o}function x(t,e,n,r,a,s,l){if(o(a)){var h=O(t,a,s&&e&&3!==e.i&&!c(e.R,r)?s.concat(r):void 0);if(u(n,r,h),!o(h))return;t.m=!1}else l&&n.add(a);if(i(a)&&!y(a)){if(!t.h.D&&t._<1)return;O(t,a),e&&e.A.l||k(t,a)}}function k(t,e,n){void 0===n&&(n=!1),!t.l&&t.h.D&&t.m&&g(e,n)}function P(t,e){var n=t[G];return(n?d(n):t)[e]}function N(t,e){if(e in t)for(var n=Object.getPrototypeOf(t);n;){var r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function I(t){t.P||(t.P=!0,t.l&&I(t.l))}function R(t){t.o||(t.o=m(t.t))}function M(t,e,n){var r=p(e)?b("MapSet").F(e,n):f(e)?b("MapSet").T(e,n):t.O?function(t,e){var n=Array.isArray(t),r={i:n?1:0,A:e?e.A:E(),P:!1,I:!1,R:{},l:e,t,k:null,o:null,j:null,C:!1},o=r,i=Z;n&&(o=[r],i=J);var a=Proxy.revocable(o,i),s=a.revoke,c=a.proxy;return r.k=c,r.j=s,c}(e,n):b("ES5").J(e,n);return(n?n.A:E()).p.push(r),r}function F(t){return o(t)||r(22,t),function t(e){if(!i(e))return e;var n,r=e[G],o=s(e);if(r){if(!r.P&&(r.i<4||!b("ES5").K(r)))return r.t;r.I=!0,n=D(e,o),r.I=!1}else n=D(e,o);return a(n,(function(e,o){r&&l(r.t,e)===o||u(n,e,t(o))})),3===o?new Set(n):n}(t)}function D(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return m(t)}function V(){function t(t,e){var n=i[t];return n?n.enumerable=e:i[t]=n={configurable:!0,enumerable:e,get:function(){var e=this[G];return Z.get(e,t)},set:function(e){var n=this[G];Z.set(n,t,e)}},n}function e(t){for(var e=t.length-1;e>=0;e--){var o=t[e][G];if(!o.P)switch(o.i){case 5:r(o)&&I(o);break;case 4:n(o)&&I(o)}}}function n(t){for(var e=t.t,n=t.k,r=Q(n),o=r.length-1;o>=0;o--){var i=r[o];if(i!==G){var a=e[i];if(void 0===a&&!c(e,i))return!0;var s=n[i],l=s&&s[G];if(l?l.t!==a:!h(s,a))return!0}}var u=!!e[G];return r.length!==Q(e).length+(u?0:1)}function r(t){var e=t.k;if(e.length!==t.t.length)return!0;var n=Object.getOwnPropertyDescriptor(e,e.length-1);if(n&&!n.get)return!0;for(var r=0;rAt});var B,z,U="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),j="undefined"!=typeof Map,H="undefined"!=typeof Set,q="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,W=U?Symbol.for("immer-nothing"):((B={})["immer-nothing"]=!0,B),$=U?Symbol.for("immer-draftable"):"__$immer_draftable",G=U?Symbol.for("immer-state"):"__$immer_state",K=("undefined"!=typeof Symbol&&Symbol.iterator,""+Object.prototype.constructor),Q="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,X=Object.getOwnPropertyDescriptors||function(t){var e={};return Q(t).forEach((function(n){e[n]=Object.getOwnPropertyDescriptor(t,n)})),e},Y={},Z={get:function(t,e){if(e===G)return t;var n=d(t);if(!c(n,e))return function(t,e,n){var r,o=N(e,n);return o?"value"in o?o.value:null===(r=o.get)||void 0===r?void 0:r.call(t.k):void 0}(t,n,e);var r=n[e];return t.I||!i(r)?r:r===P(t.t,e)?(R(t),t.o[e]=M(t.A.h,r,t)):r},has:function(t,e){return e in d(t)},ownKeys:function(t){return Reflect.ownKeys(d(t))},set:function(t,e,n){var r=N(d(t),e);if(null==r?void 0:r.set)return r.set.call(t.k,n),!0;if(!t.P){var o=P(d(t),e),i=null==o?void 0:o[G];if(i&&i.t===n)return t.o[e]=n,t.R[e]=!1,!0;if(h(n,o)&&(void 0!==n||c(t.t,e)))return!0;R(t),I(t)}return t.o[e]===n&&(void 0!==n||e in t.o)||Number.isNaN(n)&&Number.isNaN(t.o[e])||(t.o[e]=n,t.R[e]=!0),!0},deleteProperty:function(t,e){return void 0!==P(t.t,e)||e in t.t?(t.R[e]=!1,R(t),I(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var n=d(t),r=Reflect.getOwnPropertyDescriptor(n,e);return r?{writable:!0,configurable:1!==t.i||"length"!==e,enumerable:r.enumerable,value:n[e]}:r},defineProperty:function(){r(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){r(12)}},J={};a(Z,(function(t,e){J[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),J.deleteProperty=function(t,e){return J.set.call(this,t,e,void 0)},J.set=function(t,e,n){return Z.set.call(this,t[0],e,n,t[0])};var tt=function(){function t(t){var e=this;this.O=q,this.D=!0,this.produce=function(t,n,o){if("function"==typeof t&&"function"!=typeof n){var a=n;n=t;var s=e;return function(t){var e=this;void 0===t&&(t=a);for(var r=arguments.length,o=Array(r>1?r-1:0),i=1;i1?r-1:0),i=1;i=0;n--){var r=e[n];if(0===r.path.length&&"replace"===r.op){t=r.value;break}}n>-1&&(e=e.slice(n+1));var i=b("Patches").$;return o(t)?i(t,e):this.produce(t,(function(t){return i(t,e)}))},t}(),et=new tt,nt=et.produce;et.produceWithPatches.bind(et),et.setAutoFreeze.bind(et),et.setUseProxies.bind(et),et.applyPatches.bind(et),et.createDraft.bind(et),et.finishDraft.bind(et);const rt=nt;"function"==typeof Symbol&&Symbol.observable;var ot=function(){return Math.random().toString(36).substring(7).split("").join(".")};ot(),ot();function it(){for(var t=arguments.length,e=new Array(t),n=0;n0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(t){for(var e=1;ea,Gh:()=>f,HS:()=>d,Oi:()=>i,pb:()=>l,tH:()=>v,yD:()=>p}),function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"}(o||(o={}));function i(t,e){if(!1===t||null==t)throw new Error(e)}function a(t){let{pathname:e="/",search:n="",hash:r=""}=t;return n&&"?"!==n&&(e+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(e+="#"===r.charAt(0)?r:"#"+r),e}function s(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substr(r),t=t.substr(0,r)),t&&(e.pathname=t)}return e}var c;!function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"}(c||(c={}));new Set(["lazy","caseSensitive","path","id","index","children"]);function l(t,e){if("/"===e)return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&"/"!==r?null:t.slice(n)||"/"}function u(t,e,n,r){return"Cannot include a '"+t+"' character in a manually specified `to."+e+"` field ["+JSON.stringify(r)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in and the router will parse it for you.'}function h(t){return t.filter(((t,e)=>0===e||t.route.path&&t.route.path.length>0))}function p(t,e){let n=h(t);return e?n.map(((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)):n.map((t=>t.pathnameBase))}function f(t,e,n,o){let a;void 0===o&&(o=!1),"string"==typeof t?a=s(t):(a=r({},t),i(!a.pathname||!a.pathname.includes("?"),u("?","pathname","search",a)),i(!a.pathname||!a.pathname.includes("#"),u("#","pathname","hash",a)),i(!a.search||!a.search.includes("#"),u("#","search","hash",a)));let c,l=""===t||""===a.pathname,h=l?"/":a.pathname;if(null==h)c=n;else{let t=e.length-1;if(!o&&h.startsWith("..")){let e=h.split("/");for(;".."===e[0];)e.shift(),t-=1;a.pathname=e.join("/")}c=t>=0?e[t]:"/"}let p=function(t,e){void 0===e&&(e="/");let{pathname:n,search:r="",hash:o=""}="string"==typeof t?s(t):t,i=n?n.startsWith("/")?n:function(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach((t=>{".."===t?n.length>1&&n.pop():"."!==t&&n.push(t)})),n.length>1?n.join("/"):"/"}(n,e):e;return{pathname:i,search:m(r),hash:g(o)}}(a,c),f=h&&"/"!==h&&h.endsWith("/"),d=(l||"."===h)&&n.endsWith("/");return p.pathname.endsWith("/")||!f&&!d||(p.pathname+="/"),p}const d=t=>t.join("/").replace(/\/\/+/g,"/"),m=t=>t&&"?"!==t?t.startsWith("?")?t:"?"+t:"",g=t=>t&&"#"!==t?t.startsWith("#")?t:"#"+t:"";class v extends Error{}const y=["post","put","patch","delete"],b=(new Set(y),["get",...y]);new Set(b),new Set([301,302,303,307,308]),new Set([307,308]);Symbol("deferred")},7377:(t,e,n)=>{"use strict";function r(t,e){void 0===e&&(e=!1);var n=t.getBoundingClientRect();return{width:n.width/1,height:n.height/1,top:n.top/1,right:n.right/1,bottom:n.bottom/1,left:n.left/1,x:n.left/1,y:n.top/1}}function o(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function i(t){var e=o(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function a(t){return t instanceof o(t).Element||t instanceof Element}function s(t){return t instanceof o(t).HTMLElement||t instanceof HTMLElement}function c(t){return"undefined"!=typeof ShadowRoot&&(t instanceof o(t).ShadowRoot||t instanceof ShadowRoot)}function l(t){return t?(t.nodeName||"").toLowerCase():null}function u(t){return((a(t)?t.ownerDocument:t.document)||window.document).documentElement}function h(t){return r(u(t)).left+i(t).scrollLeft}function p(t){return o(t).getComputedStyle(t)}function f(t){var e=p(t),n=e.overflow,r=e.overflowX,o=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function d(t,e,n){void 0===n&&(n=!1);var a,c,p=s(e),d=s(e)&&function(t){var e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,r=e.height/t.offsetHeight||1;return 1!==n||1!==r}(e),m=u(e),g=r(t,d),v={scrollLeft:0,scrollTop:0},y={x:0,y:0};return(p||!p&&!n)&&(("body"!==l(e)||f(m))&&(v=(a=e)!==o(a)&&s(a)?{scrollLeft:(c=a).scrollLeft,scrollTop:c.scrollTop}:i(a)),s(e)?((y=r(e,!0)).x+=e.clientLeft,y.y+=e.clientTop):m&&(y.x=h(m))),{x:g.left+v.scrollLeft-y.x,y:g.top+v.scrollTop-y.y,width:g.width,height:g.height}}function m(t){var e=r(t),n=t.offsetWidth,o=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-o)<=1&&(o=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:o}}function g(t){return"html"===l(t)?t:t.assignedSlot||t.parentNode||(c(t)?t.host:null)||u(t)}function v(t){return["html","body","#document"].indexOf(l(t))>=0?t.ownerDocument.body:s(t)&&f(t)?t:v(g(t))}function y(t,e){var n;void 0===e&&(e=[]);var r=v(t),i=r===(null==(n=t.ownerDocument)?void 0:n.body),a=o(r),s=i?[a].concat(a.visualViewport||[],f(r)?r:[]):r,c=e.concat(s);return i?c:c.concat(y(g(s)))}function b(t){return["table","td","th"].indexOf(l(t))>=0}function _(t){return s(t)&&"fixed"!==p(t).position?t.offsetParent:null}function E(t){for(var e=o(t),n=_(t);n&&b(n)&&"static"===p(n).position;)n=_(n);return n&&("html"===l(n)||"body"===l(n)&&"static"===p(n).position)?e:n||function(t){var e=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&s(t)&&"fixed"===p(t).position)return null;for(var n=g(t);s(n)&&["html","body"].indexOf(l(n))<0;){var r=p(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||e&&"filter"===r.willChange||e&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(t)||e}n.d(e,{Ay:()=>we});var w="top",A="bottom",S="right",C="left",T="auto",L=[w,A,S,C],O="start",x="end",k="clippingParents",P="viewport",N="popper",I="reference",R=L.reduce((function(t,e){return t.concat([e+"-"+O,e+"-"+x])}),[]),M=[].concat(L,[T]).reduce((function(t,e){return t.concat([e,e+"-"+O,e+"-"+x])}),[]),F=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function D(t){var e=new Map,n=new Set,r=[];function o(t){n.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!n.has(t)){var r=e.get(t);r&&o(r)}})),r.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){n.has(t.name)||o(t)})),r}var V={placement:"bottom",modifiers:[],strategy:"absolute"};function B(){for(var t=arguments.length,e=new Array(t),n=0;n=0?"x":"y"}function $(t){var e,n=t.reference,r=t.element,o=t.placement,i=o?H(o):null,a=o?q(o):null,s=n.x+n.width/2-r.width/2,c=n.y+n.height/2-r.height/2;switch(i){case w:e={x:s,y:n.y-r.height};break;case A:e={x:s,y:n.y+n.height};break;case S:e={x:n.x+n.width,y:c};break;case C:e={x:n.x-r.width,y:c};break;default:e={x:n.x,y:n.y}}var l=i?W(i):null;if(null!=l){var u="y"===l?"height":"width";switch(a){case O:e[l]=e[l]-(n[u]/2-r[u]/2);break;case x:e[l]=e[l]+(n[u]/2-r[u]/2)}}return e}const G={name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,n=t.name;e.modifiersData[n]=$({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}};var K=Math.max,Q=Math.min,X=Math.round,Y={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Z(t){var e,n=t.popper,r=t.popperRect,i=t.placement,a=t.variation,s=t.offsets,c=t.position,l=t.gpuAcceleration,h=t.adaptive,f=t.roundOffsets,d=!0===f?function(t){var e=t.x,n=t.y,r=window.devicePixelRatio||1;return{x:X(X(e*r)/r)||0,y:X(X(n*r)/r)||0}}(s):"function"==typeof f?f(s):s,m=d.x,g=void 0===m?0:m,v=d.y,y=void 0===v?0:v,b=s.hasOwnProperty("x"),_=s.hasOwnProperty("y"),T=C,L=w,O=window;if(h){var k=E(n),P="clientHeight",N="clientWidth";k===o(n)&&"static"!==p(k=u(n)).position&&"absolute"===c&&(P="scrollHeight",N="scrollWidth"),i!==w&&(i!==C&&i!==S||a!==x)||(L=A,y-=k[P]-r.height,y*=l?1:-1),i!==C&&(i!==w&&i!==A||a!==x)||(T=S,g-=k[N]-r.width,g*=l?1:-1)}var I,R=Object.assign({position:c},h&&Y);return l?Object.assign({},R,((I={})[L]=_?"0":"",I[T]=b?"0":"",I.transform=(O.devicePixelRatio||1)<=1?"translate("+g+"px, "+y+"px)":"translate3d("+g+"px, "+y+"px, 0)",I)):Object.assign({},R,((e={})[L]=_?y+"px":"",e[T]=b?g+"px":"",e.transform="",e))}const J={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var n=e.styles[t]||{},r=e.attributes[t]||{},o=e.elements[t];s(o)&&l(o)&&(Object.assign(o.style,n),Object.keys(r).forEach((function(t){var e=r[t];!1===e?o.removeAttribute(t):o.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach((function(t){var r=e.elements[t],o=e.attributes[t]||{},i=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:n[t]).reduce((function(t,e){return t[e]="",t}),{});s(r)&&l(r)&&(Object.assign(r.style,i),Object.keys(o).forEach((function(t){r.removeAttribute(t)})))}))}},requires:["computeStyles"]};const tt={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,n=t.options,r=t.name,o=n.offset,i=void 0===o?[0,0]:o,a=M.reduce((function(t,n){return t[n]=function(t,e,n){var r=H(t),o=[C,w].indexOf(r)>=0?-1:1,i="function"==typeof n?n(Object.assign({},e,{placement:t})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[C,S].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,e.rects,i),t}),{}),s=a[e.placement],c=s.x,l=s.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=c,e.modifiersData.popperOffsets.y+=l),e.modifiersData[r]=a}};var et={left:"right",right:"left",bottom:"top",top:"bottom"};function nt(t){return t.replace(/left|right|bottom|top/g,(function(t){return et[t]}))}var rt={start:"end",end:"start"};function ot(t){return t.replace(/start|end/g,(function(t){return rt[t]}))}function it(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&c(n)){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function at(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function st(t,e){return e===P?at(function(t){var e=o(t),n=u(t),r=e.visualViewport,i=n.clientWidth,a=n.clientHeight,s=0,c=0;return r&&(i=r.width,a=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(s=r.offsetLeft,c=r.offsetTop)),{width:i,height:a,x:s+h(t),y:c}}(t)):s(e)?function(t){var e=r(t);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}(e):at(function(t){var e,n=u(t),r=i(t),o=null==(e=t.ownerDocument)?void 0:e.body,a=K(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=K(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),c=-r.scrollLeft+h(t),l=-r.scrollTop;return"rtl"===p(o||n).direction&&(c+=K(n.clientWidth,o?o.clientWidth:0)-a),{width:a,height:s,x:c,y:l}}(u(t)))}function ct(t,e,n){var r="clippingParents"===e?function(t){var e=y(g(t)),n=["absolute","fixed"].indexOf(p(t).position)>=0&&s(t)?E(t):t;return a(n)?e.filter((function(t){return a(t)&&it(t,n)&&"body"!==l(t)})):[]}(t):[].concat(e),o=[].concat(r,[n]),i=o[0],c=o.reduce((function(e,n){var r=st(t,n);return e.top=K(r.top,e.top),e.right=Q(r.right,e.right),e.bottom=Q(r.bottom,e.bottom),e.left=K(r.left,e.left),e}),st(t,i));return c.width=c.right-c.left,c.height=c.bottom-c.top,c.x=c.left,c.y=c.top,c}function lt(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function ut(t,e){return e.reduce((function(e,n){return e[n]=t,e}),{})}function ht(t,e){void 0===e&&(e={});var n=e,o=n.placement,i=void 0===o?t.placement:o,s=n.boundary,c=void 0===s?k:s,l=n.rootBoundary,h=void 0===l?P:l,p=n.elementContext,f=void 0===p?N:p,d=n.altBoundary,m=void 0!==d&&d,g=n.padding,v=void 0===g?0:g,y=lt("number"!=typeof v?v:ut(v,L)),b=f===N?I:N,_=t.rects.popper,E=t.elements[m?b:f],C=ct(a(E)?E:E.contextElement||u(t.elements.popper),c,h),T=r(t.elements.reference),O=$({reference:T,element:_,strategy:"absolute",placement:i}),x=at(Object.assign({},_,O)),R=f===N?x:T,M={top:C.top-R.top+y.top,bottom:R.bottom-C.bottom+y.bottom,left:C.left-R.left+y.left,right:R.right-C.right+y.right},F=t.modifiersData.offset;if(f===N&&F){var D=F[i];Object.keys(M).forEach((function(t){var e=[S,A].indexOf(t)>=0?1:-1,n=[w,A].indexOf(t)>=0?"y":"x";M[t]+=D[n]*e}))}return M}function pt(t,e,n){return K(t,Q(e,n))}const ft={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,r=t.name,o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0!==a&&a,c=n.boundary,l=n.rootBoundary,u=n.altBoundary,h=n.padding,p=n.tether,f=void 0===p||p,d=n.tetherOffset,g=void 0===d?0:d,v=ht(e,{boundary:c,rootBoundary:l,padding:h,altBoundary:u}),y=H(e.placement),b=q(e.placement),_=!b,T=W(y),L="x"===T?"y":"x",x=e.modifiersData.popperOffsets,k=e.rects.reference,P=e.rects.popper,N="function"==typeof g?g(Object.assign({},e.rects,{placement:e.placement})):g,I={x:0,y:0};if(x){if(i||s){var R="y"===T?w:C,M="y"===T?A:S,F="y"===T?"height":"width",D=x[T],V=x[T]+v[R],B=x[T]-v[M],z=f?-P[F]/2:0,U=b===O?k[F]:P[F],j=b===O?-P[F]:-k[F],$=e.elements.arrow,G=f&&$?m($):{width:0,height:0},X=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Y=X[R],Z=X[M],J=pt(0,k[F],G[F]),tt=_?k[F]/2-z-J-Y-N:U-J-Y-N,et=_?-k[F]/2+z+J+Z+N:j+J+Z+N,nt=e.elements.arrow&&E(e.elements.arrow),rt=nt?"y"===T?nt.clientTop||0:nt.clientLeft||0:0,ot=e.modifiersData.offset?e.modifiersData.offset[e.placement][T]:0,it=x[T]+tt-ot-rt,at=x[T]+et-ot;if(i){var st=pt(f?Q(V,it):V,D,f?K(B,at):B);x[T]=st,I[T]=st-D}if(s){var ct="x"===T?w:C,lt="x"===T?A:S,ut=x[L],ft=ut+v[ct],dt=ut-v[lt],mt=pt(f?Q(ft,it):ft,ut,f?K(dt,at):dt);x[L]=mt,I[L]=mt-ut}}e.modifiersData[r]=I}},requiresIfExists:["offset"]};const dt={name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,n=t.state,r=t.name,o=t.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=H(n.placement),c=W(s),l=[C,S].indexOf(s)>=0?"height":"width";if(i&&a){var u=function(t,e){return lt("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:ut(t,L))}(o.padding,n),h=m(i),p="y"===c?w:C,f="y"===c?A:S,d=n.rects.reference[l]+n.rects.reference[c]-a[c]-n.rects.popper[l],g=a[c]-n.rects.reference[c],v=E(i),y=v?"y"===c?v.clientHeight||0:v.clientWidth||0:0,b=d/2-g/2,_=u[p],T=y-h[l]-u[f],O=y/2-h[l]/2+b,x=pt(_,O,T),k=c;n.modifiersData[r]=((e={})[k]=x,e.centerOffset=x-O,e)}},effect:function(t){var e=t.state,n=t.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=e.elements.popper.querySelector(r)))&&it(e.elements.popper,r)&&(e.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function mt(t,e,n){return void 0===n&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function gt(t){return[w,S,A,C].some((function(e){return t[e]>=0}))}var vt=z({defaultModifiers:[j,G,{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,n=t.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,a=void 0===i||i,s=n.roundOffsets,c=void 0===s||s,l={placement:H(e.placement),variation:q(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:o};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,Z(Object.assign({},l,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:a,roundOffsets:c})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,Z(Object.assign({},l,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},J,tt,{name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0===a||a,c=n.fallbackPlacements,l=n.padding,u=n.boundary,h=n.rootBoundary,p=n.altBoundary,f=n.flipVariations,d=void 0===f||f,m=n.allowedAutoPlacements,g=e.options.placement,v=H(g),y=c||(v===g||!d?[nt(g)]:function(t){if(H(t)===T)return[];var e=nt(t);return[ot(t),e,ot(e)]}(g)),b=[g].concat(y).reduce((function(t,n){return t.concat(H(n)===T?function(t,e){void 0===e&&(e={});var n=e,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,c=n.allowedAutoPlacements,l=void 0===c?M:c,u=q(r),h=u?s?R:R.filter((function(t){return q(t)===u})):L,p=h.filter((function(t){return l.indexOf(t)>=0}));0===p.length&&(p=h);var f=p.reduce((function(e,n){return e[n]=ht(t,{placement:n,boundary:o,rootBoundary:i,padding:a})[H(n)],e}),{});return Object.keys(f).sort((function(t,e){return f[t]-f[e]}))}(e,{placement:n,boundary:u,rootBoundary:h,padding:l,flipVariations:d,allowedAutoPlacements:m}):n)}),[]),_=e.rects.reference,E=e.rects.popper,x=new Map,k=!0,P=b[0],N=0;N=0,B=V?"width":"height",z=ht(e,{placement:I,boundary:u,rootBoundary:h,altBoundary:p,padding:l}),U=V?D?S:C:D?A:w;_[B]>E[B]&&(U=nt(U));var j=nt(U),W=[];if(i&&W.push(z[F]<=0),s&&W.push(z[U]<=0,z[j]<=0),W.every((function(t){return t}))){P=I,k=!1;break}x.set(I,W)}if(k)for(var $=function(t){var e=b.find((function(e){var n=x.get(e);if(n)return n.slice(0,t).every((function(t){return t}))}));if(e)return P=e,"break"},G=d?3:1;G>0;G--){if("break"===$(G))break}e.placement!==P&&(e.modifiersData[r]._skip=!0,e.placement=P,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},ft,dt,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,n=t.name,r=e.rects.reference,o=e.rects.popper,i=e.modifiersData.preventOverflow,a=ht(e,{elementContext:"reference"}),s=ht(e,{altBoundary:!0}),c=mt(a,r),l=mt(s,o,i),u=gt(c),h=gt(l);e.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:l,isReferenceHidden:u,hasPopperEscaped:h},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":h})}}]}),yt="tippy-content",bt="tippy-backdrop",_t="tippy-arrow",Et="tippy-svg-arrow",wt={passive:!0,capture:!0},At=function(){return document.body};function St(t,e,n){if(Array.isArray(t)){var r=t[e];return null==r?Array.isArray(n)?n[e]:n:r}return t}function Ct(t,e){var n={}.toString.call(t);return 0===n.indexOf("[object")&&n.indexOf(e+"]")>-1}function Tt(t,e){return"function"==typeof t?t.apply(void 0,e):t}function Lt(t,e){return 0===e?t:function(r){clearTimeout(n),n=setTimeout((function(){t(r)}),e)};var n}function Ot(t){return[].concat(t)}function xt(t,e){-1===t.indexOf(e)&&t.push(e)}function kt(t){return t.split("-")[0]}function Pt(t){return[].slice.call(t)}function Nt(t){return Object.keys(t).reduce((function(e,n){return void 0!==t[n]&&(e[n]=t[n]),e}),{})}function It(){return document.createElement("div")}function Rt(t){return["Element","Fragment"].some((function(e){return Ct(t,e)}))}function Mt(t){return Ct(t,"MouseEvent")}function Ft(t){return!(!t||!t._tippy||t._tippy.reference!==t)}function Dt(t){return Rt(t)?[t]:function(t){return Ct(t,"NodeList")}(t)?Pt(t):Array.isArray(t)?t:Pt(document.querySelectorAll(t))}function Vt(t,e){t.forEach((function(t){t&&(t.style.transitionDuration=e+"ms")}))}function Bt(t,e){t.forEach((function(t){t&&t.setAttribute("data-state",e)}))}function zt(t){var e,n=Ot(t)[0];return null!=n&&null!=(e=n.ownerDocument)&&e.body?n.ownerDocument:document}function Ut(t,e,n){var r=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(e){t[r](e,n)}))}function jt(t,e){for(var n=e;n;){var r;if(t.contains(n))return!0;n=null==n.getRootNode||null==(r=n.getRootNode())?void 0:r.host}return!1}var Ht={isTouch:!1},qt=0;function Wt(){Ht.isTouch||(Ht.isTouch=!0,window.performance&&document.addEventListener("mousemove",$t))}function $t(){var t=performance.now();t-qt<20&&(Ht.isTouch=!1,document.removeEventListener("mousemove",$t)),qt=t}function Gt(){var t=document.activeElement;if(Ft(t)){var e=t._tippy;t.blur&&!e.state.isVisible&&t.blur()}}var Kt=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto;var Qt={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Xt=Object.assign({appendTo:At,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Qt,{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),Yt=Object.keys(Xt);function Zt(t){var e=(t.plugins||[]).reduce((function(e,n){var r,o=n.name,i=n.defaultValue;o&&(e[o]=void 0!==t[o]?t[o]:null!=(r=Xt[o])?r:i);return e}),{});return Object.assign({},t,e)}function Jt(t,e){var n=Object.assign({},e,{content:Tt(e.content,[t])},e.ignoreAttributes?{}:function(t,e){return(e?Object.keys(Zt(Object.assign({},Xt,{plugins:e}))):Yt).reduce((function(e,n){var r=(t.getAttribute("data-tippy-"+n)||"").trim();if(!r)return e;if("content"===n)e[n]=r;else try{e[n]=JSON.parse(r)}catch(t){e[n]=r}return e}),{})}(t,e.plugins));return n.aria=Object.assign({},Xt.aria,n.aria),n.aria={expanded:"auto"===n.aria.expanded?e.interactive:n.aria.expanded,content:"auto"===n.aria.content?e.interactive?null:"describedby":n.aria.content},n}function te(t){var e=t.firstElementChild,n=Pt(e.children);return{box:e,content:n.find((function(t){return t.classList.contains(yt)})),arrow:n.find((function(t){return t.classList.contains(_t)||t.classList.contains(Et)})),backdrop:n.find((function(t){return t.classList.contains(bt)}))}}var ee=1,ne=[],re=[];function oe(t,e){var n,r,o,i,a,s,c,l,u=Jt(t,Object.assign({},Xt,Zt(Nt(e)))),h=!1,p=!1,f=!1,d=!1,m=[],g=Lt(G,u.interactiveDebounce),v=ee++,y=(l=u.plugins).filter((function(t,e){return l.indexOf(t)===e})),b={id:v,reference:t,popper:It(),popperInstance:null,props:u,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:y,clearDelayTimeouts:function(){clearTimeout(n),clearTimeout(r),cancelAnimationFrame(o)},setProps:function(e){0;if(b.state.isDestroyed)return;I("onBeforeUpdate",[b,e]),W();var n=b.props,r=Jt(t,Object.assign({},n,Nt(e),{ignoreAttributes:!0}));b.props=r,q(),n.interactiveDebounce!==r.interactiveDebounce&&(F(),g=Lt(G,r.interactiveDebounce));n.triggerTarget&&!r.triggerTarget?Ot(n.triggerTarget).forEach((function(t){t.removeAttribute("aria-expanded")})):r.triggerTarget&&t.removeAttribute("aria-expanded");M(),N(),w&&w(n,r);b.popperInstance&&(Y(),J().forEach((function(t){requestAnimationFrame(t._tippy.popperInstance.forceUpdate)})));I("onAfterUpdate",[b,e])},setContent:function(t){b.setProps({content:t})},show:function(){0;var t=b.state.isVisible,e=b.state.isDestroyed,n=!b.state.isEnabled,r=Ht.isTouch&&!b.props.touch,o=St(b.props.duration,0,Xt.duration);if(t||e||n||r)return;if(O().hasAttribute("disabled"))return;if(I("onShow",[b],!1),!1===b.props.onShow(b))return;b.state.isVisible=!0,L()&&(E.style.visibility="visible");N(),z(),b.state.isMounted||(E.style.transition="none");if(L()){var i=k();Vt([i.box,i.content],0)}s=function(){var t;if(b.state.isVisible&&!d){if(d=!0,E.offsetHeight,E.style.transition=b.props.moveTransition,L()&&b.props.animation){var e=k(),n=e.box,r=e.content;Vt([n,r],o),Bt([n,r],"visible")}R(),M(),xt(re,b),null==(t=b.popperInstance)||t.forceUpdate(),I("onMount",[b]),b.props.animation&&L()&&function(t,e){j(t,e)}(o,(function(){b.state.isShown=!0,I("onShown",[b])}))}},function(){var t,e=b.props.appendTo,n=O();t=b.props.interactive&&e===At||"parent"===e?n.parentNode:Tt(e,[n]);t.contains(E)||t.appendChild(E);b.state.isMounted=!0,Y(),!1}()},hide:function(){0;var t=!b.state.isVisible,e=b.state.isDestroyed,n=!b.state.isEnabled,r=St(b.props.duration,1,Xt.duration);if(t||e||n)return;if(I("onHide",[b],!1),!1===b.props.onHide(b))return;b.state.isVisible=!1,b.state.isShown=!1,d=!1,h=!1,L()&&(E.style.visibility="hidden");if(F(),U(),N(!0),L()){var o=k(),i=o.box,a=o.content;b.props.animation&&(Vt([i,a],r),Bt([i,a],"hidden"))}R(),M(),b.props.animation?L()&&function(t,e){j(t,(function(){!b.state.isVisible&&E.parentNode&&E.parentNode.contains(E)&&e()}))}(r,b.unmount):b.unmount()},hideWithInteractivity:function(t){0;x().addEventListener("mousemove",g),xt(ne,g),g(t)},enable:function(){b.state.isEnabled=!0},disable:function(){b.hide(),b.state.isEnabled=!1},unmount:function(){0;b.state.isVisible&&b.hide();if(!b.state.isMounted)return;Z(),J().forEach((function(t){t._tippy.unmount()})),E.parentNode&&E.parentNode.removeChild(E);re=re.filter((function(t){return t!==b})),b.state.isMounted=!1,I("onHidden",[b])},destroy:function(){0;if(b.state.isDestroyed)return;b.clearDelayTimeouts(),b.unmount(),W(),delete t._tippy,b.state.isDestroyed=!0,I("onDestroy",[b])}};if(!u.render)return b;var _=u.render(b),E=_.popper,w=_.onUpdate;E.setAttribute("data-tippy-root",""),E.id="tippy-"+b.id,b.popper=E,t._tippy=b,E._tippy=b;var A=y.map((function(t){return t.fn(b)})),S=t.hasAttribute("aria-expanded");return q(),M(),N(),I("onCreate",[b]),u.showOnCreate&&tt(),E.addEventListener("mouseenter",(function(){b.props.interactive&&b.state.isVisible&&b.clearDelayTimeouts()})),E.addEventListener("mouseleave",(function(){b.props.interactive&&b.props.trigger.indexOf("mouseenter")>=0&&x().addEventListener("mousemove",g)})),b;function C(){var t=b.props.touch;return Array.isArray(t)?t:[t,0]}function T(){return"hold"===C()[0]}function L(){var t;return!(null==(t=b.props.render)||!t.$$tippy)}function O(){return c||t}function x(){var t=O().parentNode;return t?zt(t):document}function k(){return te(E)}function P(t){return b.state.isMounted&&!b.state.isVisible||Ht.isTouch||i&&"focus"===i.type?0:St(b.props.delay,t?0:1,Xt.delay)}function N(t){void 0===t&&(t=!1),E.style.pointerEvents=b.props.interactive&&!t?"":"none",E.style.zIndex=""+b.props.zIndex}function I(t,e,n){var r;(void 0===n&&(n=!0),A.forEach((function(n){n[t]&&n[t].apply(n,e)})),n)&&(r=b.props)[t].apply(r,e)}function R(){var e=b.props.aria;if(e.content){var n="aria-"+e.content,r=E.id;Ot(b.props.triggerTarget||t).forEach((function(t){var e=t.getAttribute(n);if(b.state.isVisible)t.setAttribute(n,e?e+" "+r:r);else{var o=e&&e.replace(r,"").trim();o?t.setAttribute(n,o):t.removeAttribute(n)}}))}}function M(){!S&&b.props.aria.expanded&&Ot(b.props.triggerTarget||t).forEach((function(t){b.props.interactive?t.setAttribute("aria-expanded",b.state.isVisible&&t===O()?"true":"false"):t.removeAttribute("aria-expanded")}))}function F(){x().removeEventListener("mousemove",g),ne=ne.filter((function(t){return t!==g}))}function D(e){if(!Ht.isTouch||!f&&"mousedown"!==e.type){var n=e.composedPath&&e.composedPath()[0]||e.target;if(!b.props.interactive||!jt(E,n)){if(Ot(b.props.triggerTarget||t).some((function(t){return jt(t,n)}))){if(Ht.isTouch)return;if(b.state.isVisible&&b.props.trigger.indexOf("click")>=0)return}else I("onClickOutside",[b,e]);!0===b.props.hideOnClick&&(b.clearDelayTimeouts(),b.hide(),p=!0,setTimeout((function(){p=!1})),b.state.isMounted||U())}}}function V(){f=!0}function B(){f=!1}function z(){var t=x();t.addEventListener("mousedown",D,!0),t.addEventListener("touchend",D,wt),t.addEventListener("touchstart",B,wt),t.addEventListener("touchmove",V,wt)}function U(){var t=x();t.removeEventListener("mousedown",D,!0),t.removeEventListener("touchend",D,wt),t.removeEventListener("touchstart",B,wt),t.removeEventListener("touchmove",V,wt)}function j(t,e){var n=k().box;function r(t){t.target===n&&(Ut(n,"remove",r),e())}if(0===t)return e();Ut(n,"remove",a),Ut(n,"add",r),a=r}function H(e,n,r){void 0===r&&(r=!1),Ot(b.props.triggerTarget||t).forEach((function(t){t.addEventListener(e,n,r),m.push({node:t,eventType:e,handler:n,options:r})}))}function q(){var t;T()&&(H("touchstart",$,{passive:!0}),H("touchend",K,{passive:!0})),(t=b.props.trigger,t.split(/\s+/).filter(Boolean)).forEach((function(t){if("manual"!==t)switch(H(t,$),t){case"mouseenter":H("mouseleave",K);break;case"focus":H(Kt?"focusout":"blur",Q);break;case"focusin":H("focusout",Q)}}))}function W(){m.forEach((function(t){var e=t.node,n=t.eventType,r=t.handler,o=t.options;e.removeEventListener(n,r,o)})),m=[]}function $(t){var e,n=!1;if(b.state.isEnabled&&!X(t)&&!p){var r="focus"===(null==(e=i)?void 0:e.type);i=t,c=t.currentTarget,M(),!b.state.isVisible&&Mt(t)&&ne.forEach((function(e){return e(t)})),"click"===t.type&&(b.props.trigger.indexOf("mouseenter")<0||h)&&!1!==b.props.hideOnClick&&b.state.isVisible?n=!0:tt(t),"click"===t.type&&(h=!n),n&&!r&&et(t)}}function G(t){var e=t.target,n=O().contains(e)||E.contains(e);if("mousemove"!==t.type||!n){var r=J().concat(E).map((function(t){var e,n=null==(e=t._tippy.popperInstance)?void 0:e.state;return n?{popperRect:t.getBoundingClientRect(),popperState:n,props:u}:null})).filter(Boolean);(function(t,e){var n=e.clientX,r=e.clientY;return t.every((function(t){var e=t.popperRect,o=t.popperState,i=t.props.interactiveBorder,a=kt(o.placement),s=o.modifiersData.offset;if(!s)return!0;var c="bottom"===a?s.top.y:0,l="top"===a?s.bottom.y:0,u="right"===a?s.left.x:0,h="left"===a?s.right.x:0,p=e.top-r+c>i,f=r-e.bottom-l>i,d=e.left-n+u>i,m=n-e.right-h>i;return p||f||d||m}))})(r,t)&&(F(),et(t))}}function K(t){X(t)||b.props.trigger.indexOf("click")>=0&&h||(b.props.interactive?b.hideWithInteractivity(t):et(t))}function Q(t){b.props.trigger.indexOf("focusin")<0&&t.target!==O()||b.props.interactive&&t.relatedTarget&&E.contains(t.relatedTarget)||et(t)}function X(t){return!!Ht.isTouch&&T()!==t.type.indexOf("touch")>=0}function Y(){Z();var e=b.props,n=e.popperOptions,r=e.placement,o=e.offset,i=e.getReferenceClientRect,a=e.moveTransition,c=L()?te(E).arrow:null,l=i?{getBoundingClientRect:i,contextElement:i.contextElement||O()}:t,u={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(t){var e=t.state;if(L()){var n=k().box;["placement","reference-hidden","escaped"].forEach((function(t){"placement"===t?n.setAttribute("data-placement",e.placement):e.attributes.popper["data-popper-"+t]?n.setAttribute("data-"+t,""):n.removeAttribute("data-"+t)})),e.attributes.popper={}}}},h=[{name:"offset",options:{offset:o}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!a}},u];L()&&c&&h.push({name:"arrow",options:{element:c,padding:3}}),h.push.apply(h,(null==n?void 0:n.modifiers)||[]),b.popperInstance=vt(l,E,Object.assign({},n,{placement:r,onFirstUpdate:s,modifiers:h}))}function Z(){b.popperInstance&&(b.popperInstance.destroy(),b.popperInstance=null)}function J(){return Pt(E.querySelectorAll("[data-tippy-root]"))}function tt(t){b.clearDelayTimeouts(),t&&I("onTrigger",[b,t]),z();var e=P(!0),r=C(),o=r[0],i=r[1];Ht.isTouch&&"hold"===o&&i&&(e=i),e?n=setTimeout((function(){b.show()}),e):b.show()}function et(t){if(b.clearDelayTimeouts(),I("onUntrigger",[b,t]),b.state.isVisible){if(!(b.props.trigger.indexOf("mouseenter")>=0&&b.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(t.type)>=0&&h)){var e=P(!1);e?r=setTimeout((function(){b.state.isVisible&&b.hide()}),e):o=requestAnimationFrame((function(){b.hide()}))}}else U()}}function ie(t,e){void 0===e&&(e={});var n=Xt.plugins.concat(e.plugins||[]);document.addEventListener("touchstart",Wt,wt),window.addEventListener("blur",Gt);var r=Object.assign({},e,{plugins:n}),o=Dt(t).reduce((function(t,e){var n=e&&oe(e,r);return n&&t.push(n),t}),[]);return Rt(t)?o[0]:o}ie.defaultProps=Xt,ie.setDefaultProps=function(t){Object.keys(t).forEach((function(e){Xt[e]=t[e]}))},ie.currentInput=Ht;Object.assign({},J,{effect:function(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow)}});ie.setDefaultProps({animation:!1});const ae=ie;var se=n(758),ce=n(8143);function le(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r=0||(o[n]=t[n]);return o}var ue="undefined"!=typeof window&&"undefined"!=typeof document;function he(t,e){t&&("function"==typeof t&&t(e),{}.hasOwnProperty.call(t,"current")&&(t.current=e))}function pe(){return ue&&document.createElement("div")}function fe(t,e){if(t===e)return!0;if("object"==typeof t&&null!=t&&"object"==typeof e&&null!=e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(var n in t){if(!e.hasOwnProperty(n))return!1;if(!fe(t[n],e[n]))return!1}return!0}return!1}function de(t){var e=[];return t.forEach((function(t){e.find((function(e){return fe(t,e)}))||e.push(t)})),e}function me(t,e){var n,r;return Object.assign({},e,{popperOptions:Object.assign({},t.popperOptions,e.popperOptions,{modifiers:de([].concat((null==(n=t.popperOptions)?void 0:n.modifiers)||[],(null==(r=e.popperOptions)?void 0:r.modifiers)||[]))})})}var ge=ue?se.useLayoutEffect:se.useEffect;function ve(t){var e=(0,se.useRef)();return e.current||(e.current="function"==typeof t?t():t),e.current}function ye(t,e,n){n.split(/\s+/).forEach((function(n){n&&t.classList[e](n)}))}var be={name:"className",defaultValue:"",fn:function(t){var e=t.popper.firstElementChild,n=function(){var e;return!!(null==(e=t.props.render)?void 0:e.$$tippy)};function r(){t.props.className&&!n()||ye(e,"add",t.props.className)}return{onCreate:r,onBeforeUpdate:function(){n()&&ye(e,"remove",t.props.className)},onAfterUpdate:r}}};function _e(t){return function(e){var n=e.children,r=e.content,o=e.visible,i=e.singleton,a=e.render,s=e.reference,c=e.disabled,l=void 0!==c&&c,u=e.ignoreAttributes,h=void 0===u||u,p=(e.__source,e.__self,le(e,["children","content","visible","singleton","render","reference","disabled","ignoreAttributes","__source","__self"])),f=void 0!==o,d=void 0!==i,m=(0,se.useState)(!1),g=m[0],v=m[1],y=(0,se.useState)({}),b=y[0],_=y[1],E=(0,se.useState)(),w=E[0],A=E[1],S=ve((function(){return{container:pe(),renders:1}})),C=Object.assign({ignoreAttributes:h},p,{content:S.container});f&&(C.trigger="manual",C.hideOnClick=!1),d&&(l=!0);var T=C,L=C.plugins||[];a&&(T=Object.assign({},C,{plugins:d&&null!=i.data?[].concat(L,[{fn:function(){return{onTrigger:function(t,e){var n=i.data.children.find((function(t){return t.instance.reference===e.currentTarget}));t.state.$$activeSingletonInstance=n.instance,A(n.content)}}}}]):L,render:function(){return{popper:S.container}}}));var O=[s].concat(n?[n.type]:[]);return ge((function(){var e=s;s&&s.hasOwnProperty("current")&&(e=s.current);var n=t(e||S.ref||pe(),Object.assign({},T,{plugins:[be].concat(C.plugins||[])}));return S.instance=n,l&&n.disable(),o&&n.show(),d&&i.hook({instance:n,content:r,props:T,setSingletonContent:A}),v(!0),function(){n.destroy(),null==i||i.cleanup(n)}}),O),ge((function(){var t;if(1!==S.renders){var e=S.instance;e.setProps(me(e.props,T)),null==(t=e.popperInstance)||t.forceUpdate(),l?e.disable():e.enable(),f&&(o?e.show():e.hide()),d&&i.hook({instance:e,content:r,props:T,setSingletonContent:A})}else S.renders++})),ge((function(){var t;if(a){var e=S.instance;e.setProps({popperOptions:Object.assign({},e.props.popperOptions,{modifiers:[].concat(((null==(t=e.props.popperOptions)?void 0:t.modifiers)||[]).filter((function(t){return"$$tippyReact"!==t.name})),[{name:"$$tippyReact",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(t){var e,n=t.state,r=null==(e=n.modifiersData)?void 0:e.hide;b.placement===n.placement&&b.referenceHidden===(null==r?void 0:r.isReferenceHidden)&&b.escaped===(null==r?void 0:r.hasPopperEscaped)||_({placement:n.placement,referenceHidden:null==r?void 0:r.isReferenceHidden,escaped:null==r?void 0:r.hasPopperEscaped}),n.attributes.popper={}}}])})})}}),[b.placement,b.referenceHidden,b.escaped].concat(O)),se.createElement(se.Fragment,null,n?(0,se.cloneElement)(n,{ref:function(t){S.ref=t,he(n.ref,t)}}):null,g&&(0,ce.createPortal)(a?a(function(t){var e={"data-placement":t.placement};return t.referenceHidden&&(e["data-reference-hidden"]=""),t.escaped&&(e["data-escaped"]=""),e}(b),w,S.instance):r,S.container))}}var Ee=function(t,e){return(0,se.forwardRef)((function(n,r){var o=n.children,i=le(n,["children"]);return se.createElement(t,Object.assign({},e,i),o?(0,se.cloneElement)(o,{ref:function(t){he(r,t),he(o.ref,t)}}):null)}))};const we=Ee(_e(ae),{render:function(){return""}})},9208:t=>{"use strict";const{AbortController:e,AbortSignal:n}="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0;t.exports=e,t.exports.AbortSignal=n,t.exports.default=e},2714:(t,e,n)=>{"use strict";n.r(e),n.d(e,{Base62:()=>r,Base64:()=>o});var r={};n.r(r),n.d(r,{fromBytes:()=>f,fromHex:()=>g,toBytes:()=>d,toHex:()=>m});var o={};n.r(o),n.d(o,{decode:()=>E,encode:()=>_});const i="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",a={},s={};function c(t,e,n){let r=0;for(let o=0;o{const t=[];for(let e=0;e<256;++e)t[e]=255;for(let e=0;e<64;++e)t[v.charCodeAt(e)]=e;return String.fromCharCode(...t)})();let _=function(t){const e=String(t),n=[],r=e.length;let o=0;for(;o>2),v.charAt((3&t)<<4),"==");break}const i=e.charCodeAt(o++);if(o===r){n.push(v.charAt(t>>2),v.charAt((3&t)<<4|(240&i)>>4),v.charAt((15&i)<<2),"=");break}const a=e.charCodeAt(o++);n.push(v.charAt(t>>2),v.charAt((3&t)<<4|(240&i)>>4),v.charAt((15&i)<<2|(192&a)>>6),v.charAt(63&a))}return n.join("")},E=function(t){const e=String(t),n=[],r=e.length;let o,i,a=0;for(;;){do{o=b.charCodeAt(255&e.charCodeAt(a++))}while(255===o&&a>4));do{o=b.charCodeAt(255&e.charCodeAt(a++))}while(255===o&&a>2));do{i=b.charCodeAt(255&e.charCodeAt(a++))}while(255===i&&awindow.btoa(t),E=t=>window.atob(t))},521:(t,e,n)=>{"use strict";n.d(e,{bk:()=>p});class r{constructor(t,e){this.defaultPrevented=!1,this.immediateStopped=!1,this.stopped=!1,this.type=t,this.data=e}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.stopped=!0}stopImmediatePropagation(){this.immediateStopped=!0}}n(5603);const o="undefined"!=typeof window,i=[];function a(){var t;const e=i.splice(0);if(e.length)for(let n=0,r=e.length;n{const e=!i.length;i.push(t),e&&s()};function l(t,e,n){for(let r=0,o=t.length;rthis._dispatchFromStore(this._listeners,n))),n}emitSync(t,e){if(!t)throw new TypeError("Argument `eventType` is required.");const n=this.createEvent(t,e);return this._dispatchFromStore(this._listeners,n),n}emitEvent(t){return c((()=>this._dispatchFromStore(this._listeners,t))),t}emitEventSync(t){return this._dispatchFromStore(this._listeners,t),t}emitAndWait(t,e,n){if(!t)throw new TypeError("Argument `eventType` is required.");const r=this.createEvent(t,e);return c((()=>{this._dispatchFromStore(this._listeners,r),n.call(this,r)})),r}emitEventAndWait(t,e){return c((()=>{this._dispatchFromStore(this._listeners,t),e.call(this,t)})),t}proxyEmit(t,e,n){if(!t||"function"!=typeof t.on)throw new TypeError("Proxy source must be an EventEmitter");if(t===this)throw new ReferenceError("Cannot create recursive proxy.");if(!e||!n)throw new TypeError("Parameter sourceType and targetType are required.");const r=t=>{t.stopped||this.emitAndWait(n,t.data,(e=>{e.defaultPrevented&&t.preventDefault()}))};return t.on(e,r),r}proxyEmitSync(t,e,n){if(!t||"function"!=typeof t.on)throw new TypeError("Proxy source must be an EventEmitter");if(t===this)throw new ReferenceError("Cannot create recursive proxy.");if(!e||!n)throw new TypeError("Parameter sourceType and targetType are required.");const r=t=>{if(t.stopped)return;const e=this.createEvent(n,t.data);this.emitEventSync(e),e.defaultPrevented&&t.preventDefault()};return t.on(e,r),r}proxyEmitAll(t,e){for(const n in e)e.hasOwnProperty(n)&&this.proxyEmit(t,n,e[n])}proxyEmitAllSync(t,e){for(const n in e)e.hasOwnProperty(n)&&this.proxyEmitSync(t,n,e[n])}onAddListener(t,e,n={}){const r=this._metaListeners.add;return u(r,t,e,n)&&h(r,t,e,n),this}onRemoveListener(t,e,n={}){const r=this._metaListeners.remove;return u(r,t,e,n)&&h(r,t,e,n),this}}},7783:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createSemanticMetricClient=void 0,e.createSemanticMetricClient=function(t){return{name:"SemanticMetricClient",environments:["browser","device"],data:t}}},710:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createSemanticMetricClientNonAuth=void 0,e.createSemanticMetricClientNonAuth=function(t){return{name:"SemanticMetricClientNonAuth",environments:["browsernonauth","devicenonauth"],data:t}}},3892:(t,e)=>{"use strict";e.I=void 0,e.I=function(t){return{name:"EventSenderStats2NonAuth",environments:["devicenonauth","browsernonauth","desktopnonauth"],data:t}}},9907:(t,e)=>{"use strict";e.R=void 0,e.R=function(t){return{name:"RejectedClientEventNonAuth",environments:["browsernonauth","desktopnonauth","devicenonauth"],data:t}}},7574:(t,e)=>{"use strict"},269:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hexToBase64=void 0;var r=n(2714);e.hexToBase64=function(t){if(!t||t.length%2!=0)throw new TypeError("Invalid hexString value.");var e=t.split("").reduce((function(t,e,n){return n%2==0?(t.push(e),t):(t[t.length-1]=""+t[t.length-1]+e,t)}),[]),n=String.fromCharCode.apply(null,e.map((function(t){var e=parseInt(t,16);if(isNaN(e))throw new TypeError("Invalid hexString value.");return e})));return r.Base64.encode(n)}},3284:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createApplicationContext=void 0,e.createApplicationContext=function(t){return function(){return{name:"context_application",data:t}}}},4694:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createApplicationDesktopContext=void 0,e.createApplicationDesktopContext=function(t){return function(){return{name:"context_application_desktop",data:t}}}},7785:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createCacheIdContext=void 0;var r=n(269);e.createCacheIdContext=function(t){var e=r.hexToBase64(t);return function(){return{name:"context_cache_id",data:{value:e}}}}},5294:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createClientIdContext=void 0;var r=n(269);e.createClientIdContext=function(t){var e=r.hexToBase64(t);return function(){return{name:"context_client_id",data:{value:e}}}}},3554:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createClientIpContext=void 0,e.createClientIpContext=function(t){return function(){return{name:"context_client_ip",data:{value:t}}}}},6271:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createCorrelationIdContext=void 0,e.createCorrelationIdContext=function(t){return function(){return{name:"context_correlation_id",data:{value:t}}}}},6926:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createDeviceContext=void 0,e.createDeviceContext=function(t){return function(){return{name:"context_device",data:t}}}},6408:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createDeviceDesktopContext=void 0,e.createDeviceDesktopContext=function(t){return function(){return{name:"context_device_desktop",data:t}}}},7886:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3422);r.__exportStar(n(3284),e),r.__exportStar(n(4694),e),r.__exportStar(n(7785),e),r.__exportStar(n(5294),e),r.__exportStar(n(3554),e),r.__exportStar(n(6271),e),r.__exportStar(n(6926),e),r.__exportStar(n(6408),e),r.__exportStar(n(677),e),r.__exportStar(n(2162),e),r.__exportStar(n(3078),e)},677:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createInstallationIdContext=void 0;var r=n(269);e.createInstallationIdContext=function(t){var e=r.hexToBase64(t);return function(){return{name:"context_installation_id",data:{value:e}}}}},2162:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createOsContext=void 0,e.createOsContext=function(t){return function(){return{name:"context_os",data:t}}}},3078:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createUserAgentContext=void 0,e.createUserAgentContext=function(t){if(!t&&"undefined"==typeof navigator)throw new Error("userAgent is not provided and navigator.UserAgent is not available");return function(){return{name:"context_user_agent",data:{value:t||navigator.userAgent}}}}},2021:(t,e,n)=>{"use strict";var r;n.r(e),n.d(e,{Environment:()=>r,EventSenderEvent:()=>m,createEventSender:()=>B}),function(t){t.BACKEND="BACKEND",t.BROWSER="BROWSER",t.BROWSER_NON_AUTH="BROWSER_NON_AUTH",t.DESKTOP="DESKTOP",t.DESKTOP_NON_AUTH="DESKTOP_NON_AUTH",t.DEVICE="DEVICE",t.DEVICE_NON_AUTH="DEVICE_NON_AUTH"}(r||(r={}));var o,i=n(3422),a=n(4382);!function(t){t[t.NONE=0]="NONE",t[t.LOG=1]="LOG",t[t.DEBUG=2]="DEBUG",t[t.INFO=4]="INFO",t[t.WARN=8]="WARN",t[t.ERROR=16]="ERROR"}(o||(o={}));const s=class{constructor(){this.tag="",this.description=""}matchesTag(){return!1}setLevel(){}enable(){}disable(){}log(){}debug(){}info(){}warn(){}error(){}},c="__dbgLoggerRegistry";let l=n.g[c];l||(l={map:{},list:[],loggingPredicate:function(){}},Object.defineProperty?Object.defineProperty(n.g,c,{value:l}):n.g[c]=l);const u=l.map,h=l.list;function p(t){return!(!l.loggingPredicate||!l.loggingPredicate(t))}let f="log";function d(t,e){let n,r;if("string"==typeof t?(n=t.toLowerCase(),r=e):(n=t.tag,r=t.description),u.hasOwnProperty(n)&&u[n])return u[n];const o=new s(n,r,p);return o.setLevel(f),u[n]=o,h.push(o),o}var m,g=n(521);!function(t){t.UPLOAD_SUCCEEDED="upload_succeeded",t.UPLOAD_FAILED="upload_failed",t.UPLOAD_REQUEST_FAILED="upload_request_failed"}(m||(m={}));const v=d("Uploader");function y(t,e){const{event_name:n,fragments:r}=t,{message:o}=r;return{reason:e,contexts:(0,i.__rest)(r,["message"]),event_data:{name:n,data:o}}}class b extends g.bk{constructor(t){var e;super(),this._suppressPersist=!1,this._backoff=!1,this._authorize=null===(e=t.authorize)||void 0===e||e,this._transport=t.transport,this._suppressPersist=!!t.suppressPersist,this._endpoint=this._authorize?"":""}_uploadBatch(t,e=!1){const n=this._transport,r=e&&this._authorize?n.appendLastTokenQuery(this._endpoint):this._endpoint;return this._transport.request(r,{method:a.Method.POST,metadata:{eventSenderEventNames:t.map((t=>t.event_name))},headers:{"content-type":"application/json"},responseType:"json",parseResponseHeaders:!0,payload:JSON.stringify({suppress_persist:this._suppressPersist,events:t}),forget:e,authorize:!e&&this._authorize}).then(this._parseUploadResponse.bind(this,t,e))}_parseUploadResponse(t,e,n){if(e)return Promise.resolve([]);const{body:r,headers:o,status:i}=n,a=this._authorize;if(200!==i||!r)return v.warn("Upload request failed",n),this.emit(m.UPLOAD_REQUEST_FAILED,{authorize:a,status:i}),this._backoff=!0,Promise.resolve(t);const s=[],c=[],l=[];if(r.error&&r.error.length){v.info("response errors",t,r.error);for(let e=0,n=r.error.length;e0&&this.emit(m.UPLOAD_FAILED,{authorize:a,rejected:l,will_retry:c}),h>0&&this.emit(m.UPLOAD_SUCCEEDED,{authorize:this._authorize,num_events:h}),Promise.resolve(s)}upload(t,e=[]){let n=e;if(!t.length)return Promise.resolve({nack:n,backoff:this._backoff});const r=[...t];return this._uploadBatch(r.splice(0,20)).then((t=>{if(n=[...n,...t],this._backoff)n=[...n,...r];else if(r.length)return this.upload(r,n);return{nack:n,backoff:this._backoff}}))}lastUpload(t){return t.length?this._uploadBatch(t.splice(0,100),!0).then((t=>0===t.length),(()=>!1)):Promise.resolve(!0)}shouldBackoff(){return this._backoff}}function _(t){return new b(t)}const E=200,w=0,A="linear",S=!0;class C{constructor(t={}){this._curve=t.curve||A,this._baseTime=t.baseTime||E,this._ceiling=t.ceiling||w,this._jitter="jitter"in t?!!t.jitter:S}getTime(t){let e;switch(this._curve){case"static":e=1;break;case"logarithmic":e=Math.log(t);break;case"exponential":e=Math.pow(Math.E,t);break;default:e=t+1}let n=Math.min(4294967296,Math.floor(e*this._baseTime));return this._ceiling&&(n=Math.min(n,this._ceiling)),this._jitter?function(t){const e=t/5;return Math.floor(t-e/2+Math.random()*e)}(n):n}}const T={backoffInitial:!1,baseTime:200,ceiling:0,curve:"linear",jitter:!0,maxDuration:1/0,maxRetries:1/0,maxTime:1/0,retryPredicate:()=>!0};class L{constructor(t,e){this._resolver=function(){let t,e;return{promise:new Promise(((n,r)=>{t=n,e=r})),resolve:t,reject:e}}(),this._ts=0,this._callCount=0,this._tickInterval=0,this._isRunning=!1,this._isDestroyed=!1;const n=Object.assign(Object.assign({},T),e),{backoffInitial:r,maxDuration:o,maxRetries:a,maxTime:s,retryPredicate:c}=n,l=(0,i.__rest)(n,["backoffInitial","maxDuration","maxRetries","maxTime","retryPredicate"]);this._fn=t,this._backoffInitial=r,this._maxDuration=o,this._maxRetries=a,this._maxTime=s,this._retryPredicate=c,this._backoffInitial=r,this._counter=new C(l),this._backoffInitial&&(this._maxRetries+=1)}static init(t,e={}){return new L(t,e).start()}_destroy(){this._isRunning=!1,this._isDestroyed=!0}_failure(t){if(!this._isDestroyed)if(t&&"retryAfter"in t)this._retryAfter(t);else{const e=this._counter.getTime(this._callCount);this._shouldRetry(e,t)?(this._callCount++,this._tickInterval=setTimeout((()=>this._tick()),e)):(this._resolver.reject(t),this._destroy())}}_retryAfter(t){this._callCount++,this._tickInterval=setTimeout((()=>this._tick()),t.retryAfter)}_success(...t){this._isDestroyed||(this._resolver.resolve(...t),this._destroy())}_shouldRetry(t,e){const n=Date.now()-this._ts+t;return this._callCountthis._success(...t))).catch((t=>this._failure(t)))}getResolver(){return this._resolver.promise}start(){return this._isDestroyed?Promise.reject(new Error("Backoff already consumed")):(this._isRunning||(this._ts=Date.now(),this._isRunning=!0,this._backoffInitial?(this._callCount=1,this._tickInterval=setTimeout((()=>this._tick()),this._counter.getTime(0))):this._tick()),this._resolver.promise)}stop(){clearTimeout(this._tickInterval),this._destroy()}getRetryCount(){return this._callCount}}var O,x=n(9907);!function(t){t.INVALID_PAYLOAD="INVALID_PAYLOAD",t.INVALID_NAME="INVALID_NAME",t.UNKNOWN_OWNER="UNKNOWN_OWNER",t.PAYLOAD_SIZE_LIMIT_EXCEEDED="PAYLOAD_SIZE_LIMIT_EXCEEDED"}(O||(O={}));const k="4.0.3";var P=n(3892);class N{static pushToArrIfMissing(t,e){-1===t.indexOf(e)&&t.push(e)}static isMissingFromArray(t,e){return-1===t.indexOf(e)}}class I{_addEventsToEventSenderStatsData(t,e){Object.keys(e).map((n=>{for(let r=0;r{if(N.isMissingFromArray(e.sequence_ids,t))e.sequence_ids.push(t),e.loss_stats_num_entries_per_sequence_id.push(Object.keys(n).length);else{const r=e.sequence_ids.indexOf(t);e.loss_stats_num_entries_per_sequence_id[r]+=Object.keys(n).length}Object.entries(n).map((([t,n])=>{N.pushToArrIfMissing(e.event_names,t);const r=e.event_names.indexOf(t);e.loss_stats_event_name_index.push(r);const o=Object.keys(n);for(let t=0;tt&&e)).catch((()=>!1))}initializeContexts(t){if(!(null==t?void 0:t.length))return;const e=this._instanceContexts;for(const n of t){const t=n();(null==t?void 0:t.name)&&(e[t.name]=t.data)}}initFlush(t){const e=this._uploaders[t].shouldBackoff(),{ceiling:n,maxDuration:r,baseTime:o}=this._backoffTimeSettings;return L.init((()=>this.upload(t)),{curve:"exponential",backoffInitial:e,retryPredicate:()=>this._transport.isOnline(),ceiling:n,baseTime:e?n:o,maxDuration:r})}waitForConnection(){return new Promise((t=>{this._transport.once(a.TransportEvent.CONNECTION_ONLINE,(()=>t()))}))}upload(t){return this._uploaders[t].upload(this._events[t].splice(0)).then((e=>{if(e.nack.length)throw this._events[t]=e.nack.concat(this._events[t]),new Error("Backoff requested");return e}))}sendToGabito(t){const e=t?"authorized":"unauthorized";this._transport.isOnline()||this._ongoingUploads[e]||(this._ongoingUploads[e]=this.waitForConnection());const n=this._ongoingUploads[e];if(n)return this._uploadWaiting[e]||(this._uploadWaiting[e]=!0,this._ongoingUploads[e]=n.then((()=>(this._ongoingUploads[e]=!1,this._uploadWaiting[e]=!1,this.sendToGabito(t))))),this._ongoingUploads[e];if(!this._events[e].length)return Promise.resolve({nack:this._events[e],backoff:this._uploaders[e].shouldBackoff()});if(!this._essLastSent||Date.now()-this._essLastSent.getTime()>3e5){const t=[this.makeEvent(this._statsSender.createESSEvent(this._events,this._sequenceIdGenerator.getAllSequenceNumberCounters(),this._sequenceIdGenerator.getSequenceId()))];this._uploaders.unauthorized.upload(t).finally((()=>{this._essLastSent=new Date}))}const r=this.initFlush(e).then((t=>(this._ongoingUploads[e]=!1,t))).catch((()=>(this._ongoingUploads[e]=!1,this._transport.isOnline()?(V.consoleLogger.warn(`The events in the queue could not be uploaded. Throwing away ${this._events[e].length} ${e} events.`),this._events[e]=[],{nack:this._events[e],backoff:this._uploaders[e].shouldBackoff()}):this.sendToGabito(t))));return this._ongoingUploads[e]=r,r}storeEvent(t,e){return;const n=this.makeEvent(e);this._events[t?"authorized":"unauthorized"].push(n)}makeEvent(t){const e=this._sequenceIdGenerator;return{sequence_id:e.getSequenceId(),sequence_number:e.nextSequenceNumber(t.name),event_name:t.name,fragments:Object.assign(Object.assign({context_sdk:{version_name:this._sdkVersion,type:"javascript"},context_time:{timestamp:Date.now()}},this._instanceContexts),{message:t.data})}}validateEventData(t,e,n){return t.name?function(t){let e=t.length,n=e;for(;n--;){const r=t.charCodeAt(n);r>127&&r<=2047?e++:r>2047&&r<=65535&&(e+=2),r>=56320&&r<=57343&&n--}return e}(JSON.stringify(t.data))>5e3?O.PAYLOAD_SIZE_LIMIT_EXCEEDED:e&&n&&!n()?O.UNKNOWN_OWNER:null:O.INVALID_NAME}checkIsEventAuthorized(t){return!t.endsWith("NonAuth")}flush(t=!0){return this.sendToGabito(t).then((()=>{})).catch((()=>{}))}flushAll(){return Promise.all([this.sendToGabito(!0),this.sendToGabito(!1)]).then((()=>{})).catch((()=>{}))}finalFlush(){return this.uploadFlush()}log(t,e={}){this.send(t,e)}send(t,{flush:e=!0}={}){const n=this.checkIsEventAuthorized(t.name);let r=this.validateEventData(t,n,this._ownerProvider);if(r===O.UNKNOWN_OWNER&&(V.consoleLogger.warn(`Trying to send an authenticated event without a current owner: ${t.name}`),r=null),r){const e=(0,x.R)({event_name:t.name,reject_reason:r});return this.storeEvent(!1,e),Promise.reject(new TypeError(`The event is invalid and has been rejected for reason: ${r}`))}return this.storeEvent(n,t),e?this.flush(n):Promise.resolve()}hasContext(...t){return t.every((t=>!!this._instanceContexts[t]))}}function B(t){const e={suppressPersist:t.suppressPersist,transport:t.transport};return new V(Object.assign(Object.assign({},t),{uploaders:{authorized:_(e),unauthorized:_(Object.assign(Object.assign({},e),{authorize:!1}))}}))}V.consoleLogger=d("EventSender")},556:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.silly=e.verbose=e.debug=e.info=e.warn=e.error=e.log=e.logger=e.default=void 0;var o=n(3086);Object.defineProperty(e,"default",{enumerable:!0,get:function(){return r(o).default}}),Object.defineProperty(e,"logger",{enumerable:!0,get:function(){return o.logger}}),Object.defineProperty(e,"log",{enumerable:!0,get:function(){return o.log}}),Object.defineProperty(e,"error",{enumerable:!0,get:function(){return o.error}}),Object.defineProperty(e,"warn",{enumerable:!0,get:function(){return o.warn}}),Object.defineProperty(e,"info",{enumerable:!0,get:function(){return o.info}}),Object.defineProperty(e,"debug",{enumerable:!0,get:function(){return o.debug}}),Object.defineProperty(e,"verbose",{enumerable:!0,get:function(){return o.verbose}}),Object.defineProperty(e,"silly",{enumerable:!0,get:function(){return o.silly}})},3086:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.silly=e.verbose=e.debug=e.info=e.warn=e.error=e.log=e.logger=void 0,e.logger={log:(...t)=>console.log(...t),error:(...t)=>console.error(...t),warn:(...t)=>console.warn(...t),info:(...t)=>console.info(...t),debug:(...t)=>console.debug(...t),verbose:(...t)=>console.log("verbose:",...t),silly:(...t)=>console.log("silly:",...t)},e.default=e.logger,e.log=e.logger.log.bind(e.logger),e.error=e.logger.error.bind(e.logger),e.warn=e.logger.warn.bind(e.logger),e.info=e.logger.info.bind(e.logger),e.debug=e.logger.debug.bind(e.logger),e.verbose=e.logger.verbose.bind(e.logger),e.silly=e.logger.silly.bind(e.logger)},1956:(t,e,n)=>{"use strict";n.d(e,{tZ:()=>m,O_:()=>o});var r=n(6857);function o(t){let e=!0;const n=(0,r.h64)();return i((t=>{n.update(t),e=!1}),t),e?void 0:n.digest().toString(16)}function i(t,e){switch(typeof e){case"boolean":return void function(t,e){t(`boolean:${e}`)}(t,e);case"number":return void function(t,e){t(`number:${e}`)}(t,e);case"string":return void function(t,e){t(`string:${e.length}:${e}`)}(t,e);case"object":return null===e?void a(t):Array.isArray(e)?void function(t,e){t(`array:${e.length}:`);for(const n of e)void 0===n?a(t):i(t,n)}(t,e):"toJSON"in e&&"function"==typeof e.toJSON?void i(t,e.toJSON()):void function(t,e){const n=Object.keys(e).filter((t=>void 0!==e[t]));n.sort(),t(`object:${n.length}:`);for(const r of n)t(`${r}:`),i(t,e[r])}(t,e);default:return}}function a(t){t("null")}const s=["error","warn","info","debug"];const c="",l=["0","1","2","3","4","5","6","7","8"];let u=t=>{console[t.level](function(t){let e=0;for(let n=0;n{};function p(t,e){const n=s.indexOf(e);return s.reduce(((e,r,o)=>(e[r]=o<=n?function(t,e){return(...n)=>{if("object"==typeof n[0]){const[r,o,...i]=n;return u({name:e,level:t,timestamp:Date.now(),data:Object.create(null,r),msg:o,args:i})}const[r,...o]=n;return u({name:e,level:t,timestamp:Date.now(),data:Object.create(null),msg:r,args:o})}}(r,t):h,e)),{})}const f=function(){let t;return t="undefined"!=typeof localStorage?localStorage.getItem("rcLogLevel"):{}.RC_LOG_LEVEL,t?"string"==typeof(e=t)&&s.includes(e)?t:"error":"error";var e}(),d=new Map;function m(t){const e=d.get(t);if(e)return e;const n=p(t,f);return d.set(t,n),n}var g=n(7252),v=n.n(g),y=n(4848),b=n.n(y);var _;!function(t){t[t.APP_PLATFORM_UNKNOWN=0]="APP_PLATFORM_UNKNOWN",t[t.APP_PLATFORM_ANDROID=1]="APP_PLATFORM_ANDROID",t[t.APP_PLATFORM_IOS=2]="APP_PLATFORM_IOS",t[t.APP_PLATFORM_WEB=3]="APP_PLATFORM_WEB",t[t.APP_PLATFORM_DESKTOP=4]="APP_PLATFORM_DESKTOP",t[t.UNRECOGNIZED=-1]="UNRECOGNIZED"}(_||(_={}));var E,w;!function(t){t[t.BLOCKING=0]="BLOCKING",t[t.BACKGROUND_SYNC=1]="BACKGROUND_SYNC",t[t.ASYNC=2]="ASYNC",t[t.PUSH_INITIATED=3]="PUSH_INITIATED",t[t.RECONNECT=4]="RECONNECT",t[t.UNRECOGNIZED=-1]="UNRECOGNIZED"}(E||(E={})),function(t){t[t.KNOWN_CONTEXT_INVALID=0]="KNOWN_CONTEXT_INVALID",t[t.KNOWN_CONTEXT_USER_ID=1]="KNOWN_CONTEXT_USER_ID",t[t.KNOWN_CONTEXT_INSTALLATION_ID=2]="KNOWN_CONTEXT_INSTALLATION_ID",t[t.KNOWN_CONTEXT_VERSION=3]="KNOWN_CONTEXT_VERSION",t[t.UNRECOGNIZED=-1]="UNRECOGNIZED"}(w||(w={}));(()=>{if("undefined"!=typeof globalThis)return globalThis;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n.g)return n.g;throw"Unable to locate global object"})();b().util.Long!==v()&&(b().util.Long=v(),b().configure());var A=(()=>{if(void 0!==A)return A;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n.g)return n.g;throw"Unable to locate global object"})();A.atob;A.btoa;b().util.Long!==v()&&(b().util.Long=v(),b().configure());m("common");"object"==typeof performance&&performance.now},1987:(t,e,n)=>{"use strict";var r=n(758),o=n(8835);new o.Vk.Delegate((()=>{throw new Error("Please wrap your component in RemoteConfig Provider")}));n(1956);o.Vk.Delegate},8835:(t,e,n)=>{"use strict";n.d(e,{Vk:()=>b,m9:()=>d,BL:()=>g,HW:()=>m});var r=n(1956),o=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);ot.upper)throw new TypeError(`Expected value in range [${t.lower},${t.upper}]`);break;case"internal":break;default:throw new TypeError(`Unknown property type "${t.type}"`)}}t.match=function(t){return e=>{var{type:n}=e,r=o(e,["type"]);return t[n](r)}},t.assertValue=e,t.validateValue=function(t,n){try{return e(t,n),!0}catch(t){return!1}},t.getPropertySetId=function(t,e,n=[]){const a=[t,Array.from(e).reduce(((t,e)=>{var{name:n}=e,r=o(e,["name"]);return Object.assign(Object.assign({},t),{[n]:r})}),{})],s=new Set(n);return s.size&&a.push(Array.from(s).sort()),i.debug("property-set-id sources",...a),(0,r.O_)(a)}}(a||(a={}));var s=n(3212),c=n.n(s),l=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);ot.toBuilder())).reduce(((t,e)=>t.merge(e)),new r).build()},t.empty=function(){return new e};class r extends e{setValues(t){for(const[e,n]of t)this.setValue(e,n);return this}withAccessListener(t){return this.accessListeners.add(t),this}setValue(t,e){return p(t),this.values.set(t,e),this}merge(t){for(const[e,n]of t.values)this.values.set(e,n);for(const e of t.accessListeners)this.accessListeners.add(e);return this}getValue(t){const e=p(t);return this.values.has(t)?this.values.get(t):e.default}build(){return new e(this.values,this.accessListeners)}[Symbol.iterator](){return this.values.entries()}static fromJSON(t){return new r(n(t))}}t.Builder=r;t.Delegate=class{constructor(t){this.provider=t}getValue(t){return this.provider().getValue(t)}toJSON(t){return this.provider().toJSON(t)}toBuilder(){return this.provider().toBuilder()}}}(b||(b={}))},8762:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((r=r.apply(t,e||[])).next())}))},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.sendMetric=e.reportMetrics=e.createSemanticMetrics=e.asNanoseconds=e.MetricTypes=void 0;const i=o(n(556)),a=n(8448);e.MetricTypes={COUNTER:"counter",GAUGE:"gauge",TIMER:"timer"},e.asNanoseconds=function(t){return t};const s=(t,e)=>r(void 0,void 0,void 0,(function*(){if(Array.isArray(e.reporter)){const n=e.reporter.map((e=>e.send(t)));yield Promise.all(n)}else yield e.reporter.send(t)}));e.reportMetrics=s;const c=t=>{void 0!==t.dev&&t.dev&&(t.reporter=new a.NoopReporter);const e={queue:[],timeout:void 0,flush(){return r(this,void 0,void 0,(function*(){yield s(this.queue,t),this.queue=[],this.timeout=void 0}))}};let n=!1;void 0===t.batching&&(t.batching={delay:4e3}),t.batching&&"object"==typeof window&&"function"==typeof window.addEventListener&&window.addEventListener("beforeunload",(()=>{n=!0,e.flush()}));return{sendMetric:o=>r(void 0,void 0,void 0,(function*(){var r,i;const a=Object.assign({},o);if(o.tags&&(a.tags=Object.assign({},o.tags)),a.key=a.key||t.key,!a.key)throw new Error(`metric.key is required. Got: "${a.key}". Set it in createSemanticMetrics(...) or pass it to sendMetric(...).`);a.tags=Object.assign({app:null!==(r=t.app)&&void 0!==r?r:a.key,application:null!==(i=t.app)&&void 0!==i?i:a.key},a.tags),t.component_id?a.component_id=a.component_id||t.component_id:a.component_id=t.key,t.batching&&!n?(e.queue.push(a),e.timeout||(e.timeout=setTimeout((()=>e.flush()),t.batching.delay))):yield s([a],t)})),config:t,isWindowUnloading:n,flush:()=>t.batching?e.flush():(i.default.warn("Manual flushing only supported in batch mode. Set config.batching: true"),Promise.resolve())}};e.createSemanticMetrics=c;class l{static init(t){l.config&&i.default.error("SemanticMetrics has already been initialized. This may lead to dangerous side effects such as your metrics disappearing from Grafana due to the `key` value being overwritten by something else"),i.default.warn("The singleton usage of SemanticMetrics will be deprecated. Please use createSemanticMetrics()"),l.config=t;const{sendMetric:e,isWindowUnloading:n}=c(t);l.sendMetric=e,l.isWindowUnloading=n}}e.default=l;e.sendMetric=t=>r(void 0,void 0,void 0,(function*(){if(!l.config)throw new Error("SemanticMetrics has not been initialized. Call SemanticMetrics.init()");return l.sendMetric(t)}))},1662:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WEBAPI_URL=e.INTERNAL_WEBGATE_URL=void 0,e.INTERNAL_WEBGATE_URL="https://wgint.spotify.net",e.WEBAPI_URL="https://api.spotify.com"},4693:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,o(n(7044),e),o(n(1203),e),o(n(3450),e);var a=n(8762);Object.defineProperty(e,"default",{enumerable:!0,get:function(){return i(a).default}})},7044:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),e.Time=e.Timer=void 0,o(n(8762),e),o(n(4653),e),o(n(5395),e),o(n(1451),e);var i=n(9948);Object.defineProperty(e,"Timer",{enumerable:!0,get:function(){return i.Timer}});var a=n(8348);Object.defineProperty(e,"Time",{enumerable:!0,get:function(){return a.Time}})},3450:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BrowserMetrics=void 0;const r=n(8762),o=n(8348);function i(){const[t]=window.performance.getEntriesByType("navigation");return t}function a(t){return new Promise(((e,n)=>window.performance&&"function"==typeof performance.getEntriesByType?window.addEventListener("load",(()=>{const r=performance.getEntriesByType("paint"),o=r.find((({name:e})=>e===t));return void 0!==r&&o?e(o.startTime):n("Time to paint api is not supported on this browser")})):n("window.performance api is not supported in this browser")))}function s({name:t,label:e,value:n},r){let i;return i="cls"===t.toLowerCase()?{metric_type:"gauge",value:n}:{metric_type:"timer",value:o.Time.fromMillis(Math.round(n)).asNanos()},Object.assign(Object.assign({what:`web_vitals_${t.toLowerCase()}`},i),{tags:Object.assign({name:t,label:e},r)})}const c={getPageLoadTime:function(){return new Promise(((t,e)=>{if(!window.performance||"function"!=typeof performance.getEntriesByType)return e("window.performance api is not supported in this browser");if(void 0===i())return e("navigationTiming api is not supported in this browser");const{loadEventEnd:n}=i();return n>0?t(n):window.addEventListener("load",(()=>{setTimeout((()=>{const{loadEventEnd:e}=i();return t(e)}),0)}))}))},getResourceTiming:function(){return window.performance.getEntriesByType("resource")},getTimeToFirstPaint:function(){return a("first-paint")},getTimeToFirstContentfulPaint:function(){return a("first-contentful-paint")},sendWebVitalsMetric:function(t,e){return r.sendMetric(s(t,e))},getWebVitalsMetric:s};e.BrowserMetrics=c},1451:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((r=r.apply(t,e||[])).next())}))},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.ConsoleReporter=void 0;const i=o(n(556));e.ConsoleReporter=class{constructor(t=2,e="info"){this.spacingLevel=t,this.logLevel=e}send(t){return r(this,void 0,void 0,(function*(){i.default.log(this.logLevel,`[semantic-metrics] ${JSON.stringify(t,null,this.spacingLevel)}`)}))}}},5395:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((r=r.apply(t,e||[])).next())}))},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.EventSenderReporter=void 0;const i=n(2021),a=n(7783),s=n(710),c=o(n(556)),l=n(4382),u=n(1662);function h(t){return e=>t.isAuthenticated()?a.createSemanticMetricClient(e):s.createSemanticMetricClientNonAuth(e)}class p{constructor(t,e,n="browser",r){this.eventSender=t,this.createEvent=e,this.environment=n,this.transport=r}static create(t){const e="getToken"in t?t.getToken:null,n="ownerProvider"in t?t.ownerProvider:null,o=t.context?[...t.context]:void 0,a=t.environment,s=l.createBaseTransport({providers:{endpoints:(()=>{const e=l.createXResolveProvider();return n=>r(this,void 0,void 0,(function*(){const r=yield e(n);return Object.assign(Object.assign({},r),t.internal&&{webgate:u.INTERNAL_WEBGATE_URL})}))})(),token:()=>new Promise((t=>{e?e(((e,n)=>{t(void 0===n?e:[e,n])})):t("")}))}});e&&(s.on(l.TransportEvent.CONNECTED,(()=>{s.authenticate().catch((t=>{var e,n;c.default.debug("authentication fail.",null!==(n=null!==(e=null==t?void 0:t.message)&&void 0!==e?e:null==t?void 0:t.code)&&void 0!==n?n:"")}))})),s.on(l.TransportEvent.AUTHENTICATED,(()=>{c.default.debug("created authenticated browser transport")})),s.on(l.TransportEvent.TOKEN_PROVIDER_ERROR,(()=>{c.default.debug("the token provided isn't working.")}))),s.connect();const f=i.createEventSender(Object.assign({transport:s,context:o},n&&{ownerProvider:n})),d=h(s);return new p(f,d,a,s)}static createWithCustomTransport(t){const e="ownerProvider"in t?t.ownerProvider:null,n=t.context?[...t.context]:void 0,r=i.createEventSender(Object.assign({transport:t.transport,context:n},e&&{ownerProvider:e})),o=h(t.transport);return new p(r,o,t.environment,t.transport)}send(t){return r(this,void 0,void 0,(function*(){for(const e of t){const t=Object.assign({},e);t.tags=Object.assign({},t.tags),t.tags.environment&&c.default.error("`tags.environment` must not be set. It is a reserved tag and will be overwritten."),t.tags.environment=this.environment;const n=this.createEvent(Object.assign({},t));this.eventSender.send(n,{flush:!1})}return this.eventSender.flush(this.transport.isAuthenticated())}))}}e.EventSenderReporter=p},8448:function(t,e){"use strict";var n=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((r=r.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.NoopReporter=void 0;e.NoopReporter=class{send(t){return n(this,void 0,void 0,(function*(){}))}}},4653:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},8348:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Time=void 0;class n{constructor(t=0){this.nanos=t}static fromNanos(t){return new n(t)}static fromMicros(t){return new n(1e3*t)}static fromMillis(t){return new n(1e6*t)}static fromSeconds(t){return new n(1e9*t)}static from(t){return new n(t.asNanos())}asSeconds(){return this.nanos/1e9}asMillis(){return this.nanos/1e6}asMicros(){return this.nanos/1e3}asNanos(){return Math.round(this.nanos)}}e.Time=n,n.ZERO=new n(0)},9948:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Timer=e.getHighResolutionTime=e.getLowResolutionTime=e.getTime=e.getBrowserTime=e.supportsHighResolutionTime=void 0;const r=n(8348),o=n(8762);e.supportsHighResolutionTime=()=>"undefined"==typeof window&&"function"==typeof process.hrtime;e.getBrowserTime=()=>"undefined"!=typeof performance?performance.now():Date.now();e.getTime=()=>e.supportsHighResolutionTime()?process.hrtime():e.getBrowserTime();e.getLowResolutionTime=t=>{const n=e.getTime()-t,i=r.Time.fromMillis(n);return{nanoseconds:o.asNanoseconds(i.asNanos()),milliseconds:i.asMillis(),seconds:i.asSeconds()}};e.getHighResolutionTime=t=>{const[e,n]=process.hrtime(t),r=1e9*e+n,i=r/1e6,a=r/1e9;return{nanoseconds:o.asNanoseconds(r),milliseconds:i,seconds:a}};class i{constructor(t){this.startTime=t}static start(){return new i(e.getTime())}end(){return e.supportsHighResolutionTime()?e.getHighResolutionTime(this.startTime):e.getLowResolutionTime(this.startTime)}}e.Timer=i},1203:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createUniversalReporter=void 0;const r=n(5395),o=n(7886);e.createUniversalReporter=function(t={}){const e=t.context?[o.createUserAgentContext(),...t.context]:[o.createUserAgentContext()];return r.EventSenderReporter.create(Object.assign(Object.assign({environment:"browser"},t),{context:e}))}},4382:(t,e,n)=>{"use strict";n.r(e),n.d(e,{ConnectionObserver:()=>f,DEALER_PLUGIN_NAME:()=>M,DealerErrors:()=>T,DisconnectionReason:()=>c,Method:()=>a,PluginEvent:()=>s,REQUEST_TRANSFORMER_PLUGIN_NAME:()=>$t,TransportErrors:()=>o,TransportEvent:()=>i,createAbortControllerLike:()=>A,createAbortSignalWithTimeout:()=>S,createBaseTransport:()=>Qt,createSpotifyComEndpointsProvider:()=>Ht,createSpotifyComProviders:()=>Wt,createSpotifyComTokenProvider:()=>qt,createTransport:()=>Xt,createXResolveProvider:()=>jt,dealerCreator:()=>D,requestTransformerCreator:()=>Kt});var r={};n.r(r),n.d(r,{isSupported:()=>et,request:()=>nt});var o,i,a,s,c,l={};n.r(l),n.d(l,{request:()=>Mt}),function(t){t.HTTP_REQUEST_ABORTED="HTTP_REQUEST_ABORTED",t.HTTP_REQUEST_FAILED="HTTP_REQUEST_FAILED",t.HTTP_REQUEST_TIMEOUT="HTTP_REQUEST_TIMEOUT",t.LOGGING_REQUEST_FAILED="LOGGING_REQUEST_FAILED",t.TRANSPORT_ENDPOINTS_PROVIDER_ERROR="TRANSPORT_ENDPOINTS_PROVIDER_ERROR",t.TRANSPORT_INVALID_STATE="TRANSPORT_INVALID_STATE",t.TRANSPORT_INVALID_TOKEN="TRANSPORT_INVALID_TOKEN",t.TRANSPORT_STALE_TOKEN="TRANSPORT_STALE_TOKEN ",t.TRANSPORT_TOKEN_PROVIDER_ERROR="TRANSPORT_TOKEN_PROVIDER_ERROR",t.TRANSPORT_LIFECYCLE_DISABLED="TRANSPORT_LIFECYCLE_DISABLED",t.TRANSPORT_UNSUPPORTED_OPTION="TRANSPORT_UNSUPPORTED_OPTION",t.XRESOLVE_INCOMPLETE_RESPONSE="XRESOLVE_INCOMPLETE_RESPONSE",t.XRESOLVE_INVALID_RESPONSE="XRESOLVE_INVALID_RESPONSE",t.XRESOLVE_REQUEST_FAILED_WITH_STATUS="XRESOLVE_REQUEST_FAILED_WITH_STATUS"}(o||(o={})),function(t){t.CONNECTION_ONLINE="online",t.CONNECTION_OFFLINE="offline",t.PRODUCT_STATE_CHANGED="product_state_changed",t.ACCESS_TOKEN="access_token",t.AUTHENTICATED="authenticated",t.AUTHENTICATION_FAILED="authentication_failed",t.BEFORE_OFFLINE_DISCONNECT="before_offline_disconnect",t.BEFORE_ONLINE_DISCONNECT="before_online_disconnect",t.CONNECTED="connected",t.CONNECTION_FAILED="connection_failed",t.CONNECTION_ID="connection_id",t.DISCONNECTED="disconnected",t.ENDPOINTS_RESOLVED="endpoints_resolved",t.LOGGED_OUT="logged_out",t.SHORT_SESSION_DISCONNECTED="short_session_disconnected",t.TOKEN_PROVIDER_ERROR="token_provider_error",t.RECONNECTED="reconnected",t.RECONNECTING="reconnecting",t.WINDOW_BEFORE_UNLOAD="beforeunload"}(i||(i={})),function(t){t.DELETE="DELETE",t.GET="GET",t.OPTIONS="OPTIONS",t.PATCH="PATCH",t.POST="POST",t.PUT="PUT",t.TRACE="TRACE"}(a||(a={})),function(t){t.TRANSPORT_AUTHENTICATE="transport_authenticate",t.TRANSPORT_AUTHENTICATE_FAILED="transport_authenticate_failed",t.TRANSPORT_CONNECT="transport_connect",t.TRANSPORT_DISCONNECT="transport_disconnect",t.TRANSPORT_ENDPOINTS_RESOLVED="transport_endpoints_resolved",t.TRANSPORT_BEFORE_PROCESS_REQUEST="transport_before_process_request",t.TRANSPORT_BEFORE_SEND_REQUEST="transport_before_send_request",t.TRANSPORT_BEFORE_RETURN_RESPONSE="transport_before_return_response",t.TRANSPORT_REQUEST="transport_request",t.PLUGIN_CONNECTION_INFO="plugin_connection_info",t.PLUGIN_DISCONNECTED="plugin_disconnected",t.PLUGIN_MESSAGE="plugin_message",t.PLUGIN_REQUEST="plugin_request",t.PLUGIN_ERROR="plugin_error"}(s||(s={})),function(t){t.RECONNECTION_FAILED="reconnection_failed",t.EXPLICIT="explicit",t.LOG_OUT="log_out",t.WINDOW_BEFORE_UNLOAD="window_before_unload"}(c||(c={}));var u,h,p=n(521);class f extends p.bk{}class d extends f{constructor(t){super();const e="undefined"!=typeof window,n=t&&t.notifyBeforeUnload;this._navigator=e&&window.navigator||null,e&&"function"==typeof window.addEventListener&&(window.addEventListener("online",this.emitSync.bind(this,i.CONNECTION_ONLINE,null)),window.addEventListener("offline",this.emitSync.bind(this,i.CONNECTION_OFFLINE,null)),n&&window.addEventListener(i.WINDOW_BEFORE_UNLOAD,this.emitSync.bind(this,i.WINDOW_BEFORE_UNLOAD,null)))}static create(t){return new d(t)}isOnline(){const t=this._navigator;return!t||!("onLine"in t)||t.onLine}}class m extends Error{constructor(t,e,n,r){super(t),this.name="RequestError",this.message=t,this.code=e,this.status=n||0,this.url=r}}class g extends m{constructor(t,e){super("Request aborted by signal.",o.HTTP_REQUEST_ABORTED,0,t),this.name="RequestAbortedError",this.reason=e}}class v extends m{constructor(t,e){super("Request aborted by timeout.",o.HTTP_REQUEST_TIMEOUT,0,t),this.name="RequestTimeoutError",this.reason=e}}const y="Signal is aborted without reason";function b(t,e){const n=new Error(e);return n.name=t,n}class _ extends p.bk{constructor(){super(),this._aborted=!1,this._reason=void 0,this.onabort=null,this.on("abort",(()=>{var t;return null===(t=this.onabort)||void 0===t?void 0:t.call(this)}))}static abort(t){const e=new _;return e._aborted=!0,e._reason=b("AbortError",null!=t?t:y),e}static signalAbort(t,e){"_aborted"in t&&!t._aborted&&(t._aborted=!0,"_reason"in t&&(t._reason=e||b("AbortError",y)),t.emit("abort",null))}static timeout(t){if(!isFinite(t))throw new TypeError('Value of "delay" is not supported.');const e=new _;return setTimeout((()=>{_.signalAbort(e,b("TimeoutError","Signal timed out"))}),t),e}get aborted(){return this._aborted}set aborted(t){}get reason(){return this._reason}addEventListener(t,e){this.addListener(t,e)}removeEventListener(t,e){this.removeListener(t,e)}dispatchEvent(){}}class E{constructor(){this.signal=new _}abort(t){const e=this.signal;_.signalAbort(e,t)}}function w(){return"undefined"!=typeof window&&"function"==typeof window.AbortController}const A=w()?()=>new AbortController:()=>new E,S=("undefined"!=typeof window&&"function"==typeof(null===(u=window.AbortSignal)||void 0===u?void 0:u.any)&&window.AbortSignal.any,"undefined"!=typeof window&&"function"==typeof(null===(h=window.AbortSignal)||void 0===h?void 0:h.timeout)?window.AbortSignal.timeout:_.timeout);function C(t,e){var n;return"TimeoutError"===(null===(n=e.reason)||void 0===n?void 0:n.name)?new v(t,e.reason):new g(t,e.reason)}var T,L,O;!function(t){t.DEALER_CONNECTION_ERROR="DEALER_CONNECTION_ERROR",t.DEALER_AUTHENTICATION_FAILED="DEALER_AUTHENTICATION_FAILED",t.DEALER_ERROR="DEALER_ERROR",t.DEALER_DISCONNECTED_BEFORE_EVENTS="DEALER_DISCONNECTED_BEFORE_EVENTS",t.ENDPOINT_NOT_DEFINED="ENDPOINT_NOT_DEFINED",t.INVALID_ENDPOINT="INVALID_ENDPOINT"}(T||(T={}));class x extends Error{constructor(t=T.DEALER_ERROR,e,n={}){super(e),this.name="DealerError",this.message=e,this.code=t,this.raw=n,this.wsCode=n.code||null,this.wsReason=n.reason||null}}function k(){let t,e;return{promise:new Promise(((n,r)=>{t=n,e=r})),resolve:t,reject:e}}!function(t){t.AUTHENTICATED="authenticated",t.AUTHENTICATION_FAILED="authentication_failed",t.CONNECTED="connected",t.CONNECTION_ID="connection_id",t.ERROR="error",t.DISCONNECTED="disconnected",t.MESSAGE="message",t.REQUEST="request"}(L||(L={})),function(t){t[t.CLOSE=4e3]="CLOSE",t[t.TIMEOUT=4001]="TIMEOUT"}(O||(O={}));const P=function(){},N=/hm:\/\/pusher\/(?:[^]+)?\/connections\/([^]+)/,I="undefined"!=typeof window;class R extends p.bk{constructor(t){super(),this._socket=null,this._lastPingDeferred=null,this._waitingForConnectionId=!0,this._connectionId=null,this._connectionURI=null,this._heartbeatToken=0,this._heartbeatTimeoutToken=0,this._connected=!1,this._endpoint=null,this._closeBeforeEventsRejector=null,this._WebSocket=t.WebSocket||WebSocket,this._heartbeatTimeout=t.heartbeatTimeout||1e4}static create(t){return new R(t)}_startHeartbeat(t){const e=()=>{this.ping().then((()=>this._onHeartbeatSuccess()),(()=>this._onHeartbeatError())),this._heartbeatTimeoutToken=setTimeout((()=>this._onHeartbeatError()),this._heartbeatTimeout)};t?e():this._heartbeatToken=setTimeout((()=>e()),3e4)}_onHeartbeatError(){this._stopHeartbeat(),this._socket&&this._socket.close(O.TIMEOUT,"internal-timeout")}_onHeartbeatSuccess(){this._stopHeartbeat(),this._startHeartbeat()}_stopHeartbeat(){null!==this._heartbeatToken&&clearTimeout(this._heartbeatToken),null!==this._heartbeatTimeoutToken&&clearTimeout(this._heartbeatTimeoutToken)}_prepareConnectionId(t){var e;if(!t.uri)return!1;const[,n]=null!==(e=t.uri.match(N))&&void 0!==e?e:[];if(!n)return!1;let r;return r=t.headers&&t.headers["Spotify-Connection-Id"]?t.headers["Spotify-Connection-Id"]:decodeURIComponent(n),this._connectionId=r,this._connectionURI=t.uri,this.emit(L.CONNECTION_ID,{id:r,uri:t.uri}),!0}_reply(t,e){if(!t)throw new TypeError("Invalid key.");const n=this._socket;if(!n||1!==n.readyState)return;const r={type:"reply",key:t,payload:e};n.send(JSON.stringify(r))}_parseMessage(t){let e;try{e=JSON.parse(t)}catch(t){return}if("message"===e.type)this._waitingForConnectionId&&this._prepareConnectionId(e)?(this._waitingForConnectionId=!1,this._startHeartbeat(!0)):this.emit(L.MESSAGE,{message:e});else if("pong"===e.type&&this._lastPingDeferred)this._lastPingDeferred.resolve(!0),this._lastPingDeferred=null;else if("request"===e.type){const t=e.key;t&&this.emit(L.REQUEST,{request:e,reply:this._reply.bind(this,t)})}}_handleOpen(t){t.resolve(!0),this._connected=!0,this.emit(L.AUTHENTICATED,null)}_handleMessage(t){const e=this,n=t.data;if(I&&window.Blob&&n instanceof window.Blob){const t=new FileReader;t.onloadend=function(){if(!this.result)return;let t;if(this.result instanceof ArrayBuffer){t="";const e=new Uint8Array(this.result);for(let n=0;n{this.once(L.CONNECTION_ID,(e=>{t(e.data.id)}))})):Promise.resolve(this._connectionId)}getConnectionInfo(){return this._waitingForConnectionId?new Promise((t=>{this.once(L.CONNECTION_ID,(e=>{t({id:e.data.id,uri:e.data.uri})}))})):Promise.resolve({id:this._connectionId,uri:this._connectionURI})}hasConnectionId(){return!this._waitingForConnectionId&&!!this._connectionId}}const M="dealer";class F{constructor(t){this.name=M,this._dealer=new R(t),this.api={hasConnectionInfo:()=>this._dealer.hasConnectionId(),getConnectionInfo:()=>this._dealer.getConnectionInfo().then((t=>Object.assign({plugin:this.name},t)))},this._onDealerConnectionId=this._onDealerConnectionId.bind(this),this._onDealerDisconnected=this._onDealerDisconnected.bind(this),this._onDealerMessage=this._onDealerMessage.bind(this),this._onDealerRequest=this._onDealerRequest.bind(this),this._onTransportConnect=this._onTransportConnect.bind(this),this._onTransportAuthenticate=this._onTransportAuthenticate.bind(this),this._onTransportDisconnect=this._onTransportDisconnect.bind(this)}_onDealerConnectionId(t){this._mediator&&this._mediator.emit(s.PLUGIN_CONNECTION_INFO,Object.assign({plugin:this.name},t.data))}_onDealerDisconnected(t){if(!this._mediator)return;const e=t.data;this._mediator.emit(s.PLUGIN_DISCONNECTED,{plugin:this.name,code:e.wsCode,reason:e.reason})}_onDealerMessage(t){this._mediator&&this._mediator.emit(s.PLUGIN_MESSAGE,Object.assign({plugin:this.name},t.data))}_onDealerRequest(t){this._mediator&&this._mediator.emit(s.PLUGIN_REQUEST,Object.assign({plugin:this.name},t.data))}_onTransportConnect(t){const e=t.data.endpoints,n=t.data.awaitPromise;e.dealer?/^wss:/.test(e.dealer)?n(this._dealer.connect(e.dealer)):n(Promise.reject(new x(T.INVALID_ENDPOINT,"Dealer endpoint needs to be wss://"))):n(Promise.reject(new x(T.ENDPOINT_NOT_DEFINED,'No "dealer" endpoint defined.')))}_onTransportAuthenticate(t){const e=t.data;e.awaitPromise(this._dealer.authenticate(e.token))}_onTransportDisconnect(){this._dealer.disconnect()}_onDealerError(t){var e;null===(e=this._mediator)||void 0===e||e.emit(s.PLUGIN_ERROR,{plugin:this.name,error:t.data.error})}attach(t,e){this._mediator=e,e.addListeners({[s.TRANSPORT_CONNECT]:this._onTransportConnect,[s.TRANSPORT_AUTHENTICATE]:this._onTransportAuthenticate,[s.TRANSPORT_DISCONNECT]:this._onTransportDisconnect}),this._dealer.addListeners({[L.DISCONNECTED]:this._onDealerDisconnected,[L.CONNECTION_ID]:this._onDealerConnectionId,[L.MESSAGE]:this._onDealerMessage,[L.REQUEST]:this._onDealerRequest,[L.ERROR]:this._onDealerError})}detach(t,e){this._mediator=void 0,e.removeListeners({[s.TRANSPORT_CONNECT]:this._onTransportConnect,[s.TRANSPORT_AUTHENTICATE]:this._onTransportAuthenticate,[s.TRANSPORT_DISCONNECT]:this._onTransportDisconnect}),this._dealer.removeListeners({[L.DISCONNECTED]:this._onDealerDisconnected,[L.CONNECTION_ID]:this._onDealerConnectionId,[L.MESSAGE]:this._onDealerMessage,[L.REQUEST]:this._onDealerRequest,[L.ERROR]:this._onDealerError})}}function D(t,e){return new F(e)}var V;!function(t){t[t.NONE=0]="NONE",t[t.LOG=1]="LOG",t[t.DEBUG=2]="DEBUG",t[t.INFO=4]="INFO",t[t.WARN=8]="WARN",t[t.ERROR=16]="ERROR"}(V||(V={}));let B=class{constructor(){this.tag="",this.description=""}matchesTag(){return!1}setLevel(){}enable(){}disable(){}log(){}debug(){}info(){}warn(){}error(){}};try{0}catch(t){}const z="__dbgLoggerRegistry";let U=n.g[z];U||(U={map:{},list:[],loggingPredicate:function(){}},Object.defineProperty?Object.defineProperty(n.g,z,{value:U}):n.g[z]=U);const j=U.map,H=U.list;function q(t){return!(!U.loggingPredicate||!U.loggingPredicate(t))}let W="log";function $(t,e){let n,r;if("string"==typeof t?(n=t.toLowerCase(),r=e):(n=t.tag,r=t.description),j.hasOwnProperty(n)&&j[n])return j[n];const o=new B(n,r,q);return o.setLevel(W),j[n]=o,H.push(o),o}const G=function(t,e){try{if("number"==typeof t())return t}catch(t){}const n=e();let r=0;return()=>(r=Math.max(r,e()-n),r)}((()=>performance.now()),Date.now),K=(t,e=G())=>Math.round(Math.abs(e-t)),Q={POST:!0,PUT:!0,PATCH:!0,DELETE:!0};var X;!function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.OK=200]="OK",t[t.CREATED=201]="CREATED",t[t.ACCEPTED=202]="ACCEPTED",t[t.NO_CONTENT=204]="NO_CONTENT",t[t.PARTIAL_CONTENT=206]="PARTIAL_CONTENT",t[t.BAD_REQUEST=400]="BAD_REQUEST",t[t.UNAUTHORIZED=401]="UNAUTHORIZED",t[t.PAYMENT_REQUIRED=402]="PAYMENT_REQUIRED",t[t.FORBIDDEN=403]="FORBIDDEN",t[t.NOT_FOUND=404]="NOT_FOUND",t[t.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",t[t.NOT_ACCEPTABLE=406]="NOT_ACCEPTABLE",t[t.PROXY_AUTHENTICATION_REQUIRED=407]="PROXY_AUTHENTICATION_REQUIRED",t[t.TIMED_OUT=408]="TIMED_OUT",t[t.REQUEST_TIMEOUT=408]="REQUEST_TIMEOUT",t[t.CONFLICT=409]="CONFLICT",t[t.GONE=410]="GONE",t[t.LENGTH_REQUIRED=411]="LENGTH_REQUIRED",t[t.PRECONDITION_FAILED=412]="PRECONDITION_FAILED",t[t.REQUEST_ENTITY_TOO_LARGE=413]="REQUEST_ENTITY_TOO_LARGE",t[t.REQUEST_URI_TOO_LONG=414]="REQUEST_URI_TOO_LONG",t[t.UNSUPPORTED_MEDIA_TYPE=415]="UNSUPPORTED_MEDIA_TYPE",t[t.REQUESTED_RANGE_NOT_SATISFIABLE=416]="REQUESTED_RANGE_NOT_SATISFIABLE",t[t.EXPECTATION_FAILED=417]="EXPECTATION_FAILED",t[t.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",t[t.NOT_IMPLEMENTED=501]="NOT_IMPLEMENTED",t[t.BAD_GATEWAY=502]="BAD_GATEWAY",t[t.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",t[t.GATEWAY_TIMEOUT=504]="GATEWAY_TIMEOUT",t[t.HTTP_VERSION_NOT_SUPPORTED=505]="HTTP_VERSION_NOT_SUPPORTED"}(X||(X={}));class Y{constructor(t){this.get=t.get.bind(t),this.has=t.has.bind(t)}get(t){return null}has(t){return!1}}class Z{constructor(t,e=0){this.url="",this.status=0,this.headers=null,this.body=null,this.offline=!1,this.timing=null,this.metadata=null,this.retries={count:0},this.url=t,this.status=e,this.ok=e>=200&&e<=299}getStatusFamily(){return 0|this.status/100}}const J=$("transport.http.fetch"),tt={json:!0,text:!0,arraybuffer:!0,blob:!0};function et(){return"function"==typeof fetch}function nt(t){if(!et())return Promise.reject(new TypeError("Fetch is not supported"));const e=t.options.signal;if(null==e?void 0:e.aborted)return Promise.reject(C(t.url,e));if(!t.url)return Promise.reject(new TypeError("Request URL cannot be blank."));const n=t.method||"GET";let r=t.url,o=null;if(n in Q&&!0===Q[n]&&t.payload?o=t.payload:t.payload&&(r+=`?${t.payload}`),t.options.responseType&&!(t.options.responseType in tt))return Promise.reject(new TypeError("Cannot set responseType: not supported in browser."));const i={mode:t.options.mode||"cors",credentials:t.options.credentials||"same-origin",redirect:t.options.redirect||"follow",signal:e,method:n};t.headers.count()&&(i.headers=t.headers.toJSON()),o&&(i.body=o);const a=G();return fetch(r,i).then((function(e){let n;n=t.options.ignoreResponseBody||e.status===X.NO_CONTENT?null:"json"===t.options.responseType?e.json().catch((function(t){return J.warn("Could not parse response as JSON:",t),null})):"arraybuffer"===t.options.responseType?e.arrayBuffer():"blob"===t.options.responseType?e.blob():e.text();const r=t.options.parseResponseHeaders||e.status>299?new Y(e.headers):null;return Promise.all([e.url,e.status,r,n])})).then((function([e,n,r,o]){const i=G(),s=new Z(e,n);return s.body=o,s.headers=r,t.options.timing&&(s.timing={completed:K(a,i)}),s})).catch((function(e){const n=G();if("AbortError"===(null==e?void 0:e.name))throw new g(r);if("TimeoutError"===(null==e?void 0:e.name))throw new v(r);const o=new Z(r);return t.options.timing&&(o.timing={completed:K(a,n)}),o})).then((function(e){return t.options.connectionObserver&&(e.offline=!t.options.connectionObserver.isOnline()),e}))}var rt=n(3422);const ot=200,it=0,at="linear",st=!0;class ct{constructor(t={}){this._curve=t.curve||at,this._baseTime=t.baseTime||ot,this._ceiling=t.ceiling||it,this._jitter="jitter"in t?!!t.jitter:st}getTime(t){let e;switch(this._curve){case"static":e=1;break;case"logarithmic":e=Math.log(t);break;case"exponential":e=Math.pow(Math.E,t);break;default:e=t+1}let n=Math.min(4294967296,Math.floor(e*this._baseTime));return this._ceiling&&(n=Math.min(n,this._ceiling)),this._jitter?function(t){const e=t/5;return Math.floor(t-e/2+Math.random()*e)}(n):n}}const lt={backoffInitial:!1,baseTime:200,ceiling:0,curve:"linear",jitter:!0,maxDuration:1/0,maxRetries:1/0,maxTime:1/0,retryPredicate:()=>!0};class ut{constructor(t,e){this._resolver=k(),this._ts=0,this._callCount=0,this._tickInterval=0,this._isRunning=!1,this._isDestroyed=!1;const n=Object.assign(Object.assign({},lt),e),{backoffInitial:r,maxDuration:o,maxRetries:i,maxTime:a,retryPredicate:s}=n,c=(0,rt.__rest)(n,["backoffInitial","maxDuration","maxRetries","maxTime","retryPredicate"]);this._fn=t,this._backoffInitial=r,this._maxDuration=o,this._maxRetries=i,this._maxTime=a,this._retryPredicate=s,this._backoffInitial=r,this._counter=new ct(c),this._backoffInitial&&(this._maxRetries+=1)}static init(t,e={}){return new ut(t,e).start()}_destroy(){this._isRunning=!1,this._isDestroyed=!0}_failure(t){if(!this._isDestroyed)if(t&&"retryAfter"in t)this._retryAfter(t);else{const e=this._counter.getTime(this._callCount);this._shouldRetry(e,t)?(this._callCount++,this._tickInterval=setTimeout((()=>this._tick()),e)):(this._resolver.reject(t),this._destroy())}}_retryAfter(t){this._callCount++,this._tickInterval=setTimeout((()=>this._tick()),t.retryAfter)}_success(...t){this._isDestroyed||(this._resolver.resolve(...t),this._destroy())}_shouldRetry(t,e){const n=Date.now()-this._ts+t;return this._callCountthis._success(...t))).catch((t=>this._failure(t)))}getResolver(){return this._resolver.promise}start(){return this._isDestroyed?Promise.reject(new Error("Backoff already consumed")):(this._isRunning||(this._ts=Date.now(),this._isRunning=!0,this._backoffInitial?(this._callCount=1,this._tickInterval=setTimeout((()=>this._tick()),this._counter.getTime(0))):this._tick()),this._resolver.promise)}stop(){clearTimeout(this._tickInterval),this._destroy()}getRetryCount(){return this._callCount}}var ht,pt;!function(t){t[t.CONNECTION_ERROR=0]="CONNECTION_ERROR",t[t.INFORMATIONAL=1]="INFORMATIONAL",t[t.SUCCESS=2]="SUCCESS",t[t.REDIRECTION=3]="REDIRECTION",t[t.CLIENT_ERROR=4]="CLIENT_ERROR",t[t.SERVER_ERROR=5]="SERVER_ERROR"}(ht||(ht={}));class ft extends Error{constructor(t,e,n=null){super(e),this.name="TransportError",this.message=e,this.code=t,this.origin=n}}class dt{constructor(t){this._headers={},this._count=0,this._setAll(t)}_setAll(t){let e=0;for(const n in t)t.hasOwnProperty(n)&&t[n]&&(this._headers[n.toLowerCase()]=t[n],e++);this._count=e}get(t){return this._headers[t.toLowerCase()]||null}has(t){return!!this._headers[t.toLowerCase()]}set(t,e){this._headers[t.toLowerCase()]=e,this._count++}delete(t){const e=t.toLowerCase();this._headers[e]&&this._count--,delete this._headers[t.toLowerCase()]}count(){return this._count}toJSON(){return Object.assign({},this._headers)}}class mt{constructor(t,e){this.url=t,this.method=(null==e?void 0:e.method)||"GET",this.headers=new dt(null==e?void 0:e.headers),this.options=(null==e?void 0:e.options)||{},this.payload=null==e?void 0:e.payload,this.urlExpanded=(null==e?void 0:e.urlExpanded)||!1,this.retryOptions=(null==e?void 0:e.retryOptions)||{}}static create(t,e){return new mt(t,e)}clone(){const t=new mt(this.url);return t.method=this.method,t.headers=new dt(this.headers.toJSON()),t.options=this.options,t.payload=this.payload,t.urlExpanded=this.urlExpanded,t.retryOptions=this.retryOptions,t}}!function(t){t.EVENT_ACCESS_TOKEN="access_token",t.EVENT_CONNECTION_ID="connection_id",t.EVENT_CONNECTION_OFFLINE="connection_offline",t.EVENT_CONNECTION_ONLINE="connection_online",t.EVENT_ENDPOINTS_RESOLVED="endpoints_resolved"}(pt||(pt={}));class gt extends p.bk{constructor(t,e){super(),this.EVENT_ACCESS_TOKEN=pt.EVENT_ACCESS_TOKEN,this.EVENT_CONNECTION_ID=pt.EVENT_CONNECTION_ID,this.EVENT_CONNECTION_OFFLINE=pt.EVENT_CONNECTION_OFFLINE,this.EVENT_CONNECTION_ONLINE=pt.EVENT_CONNECTION_ONLINE,this.EVENT_ENDPOINTS_RESOLVED=pt.EVENT_ENDPOINTS_RESOLVED,this.StatusCode=X,this.StatusFamily=ht,this.getConnectionId=t.getConnectionId.bind(t),this.getEndpoints=t.getEndpoints.bind(t),this.getInitTime=t.getInitTime.bind(t),this.getLastToken=t.getLastToken.bind(t),this.matchMessages=t.matchMessages.bind(t),this.unmatchMessages=t.unmatchMessages.bind(t),this.handlePushRequests=t.handlePushRequests.bind(t),this.unhandlePushRequests=t.unhandlePushRequests.bind(t),this.hasPlugin=t.hasPlugin.bind(t),this.getPluginAPI=t.getPluginAPI.bind(t);const n=t.request.bind(t);(null==e?void 0:e.requestOptions)?this.request=(t,r)=>n(t,r?Object.assign(Object.assign(Object.assign({},null==e?void 0:e.requestOptions),r),{metadata:Object.assign(Object.assign({},e.requestOptions.metadata),null==r?void 0:r.metadata),retry:Object.assign(Object.assign({},e.requestOptions.retry),null==r?void 0:r.retry)}):e.requestOptions):this.request=n,this.proxyEmit(t,i.ACCESS_TOKEN,pt.EVENT_ACCESS_TOKEN),this.proxyEmit(t,i.CONNECTION_OFFLINE,pt.EVENT_CONNECTION_OFFLINE),this.proxyEmit(t,i.CONNECTION_ONLINE,pt.EVENT_CONNECTION_ONLINE),this.proxyEmit(t,i.ENDPOINTS_RESOLVED,pt.EVENT_ENDPOINTS_RESOLVED),this.onAddListener(pt.EVENT_CONNECTION_ID,this._onAddConnectionIdListener.bind(this,t.on.bind(t))),this.onRemoveListener(pt.EVENT_CONNECTION_ID,this._onRemoveConnectionIdListener.bind(this,t.removeListener.bind(t)))}_onAddConnectionIdListener(t,e){e.preventDefault();const n=e.data.listener,r=t=>{const e=this.createEvent(pt.EVENT_CONNECTION_ID,t.data);n.call(this,e)};n.$proxy_wrapper=r,t(i.CONNECTION_ID,r,e.data.options)}_onRemoveConnectionIdListener(t,e){e.preventDefault();const n=e.data.listener;n.$proxy_wrapper&&t(i.CONNECTION_ID,n.$proxy_wrapper,e.data.options)}removeAllListeners(){return this}}class vt{constructor(){this._startTime=null,this._endTime=null}static create(){return new vt}start(){if(null!==this._startTime)throw new Error("Measurement is already in progress.");this._startTime=Date.now()}end(){if(null===this._startTime||null!==this._endTime)throw new Error("Measurement is not in progress.");this._endTime=Date.now()}getMetrics(){if(null===this._startTime||null===this._endTime)throw new Error("Measurement is not done.");return{start_time:this._startTime,end_time:this._endTime}}}const yt=$("transport.transport"),bt=/^(?:https?:\/\/)?@([^\/]+)\//,_t=/^(ws|http)s?:\/\/.*[^\/]$/,Et=/^([a-zA-Z]{3},\ \d{1,2}\ [a-zA-Z]{3}\ (\d{1,2}.){3})/,wt={xhr:!0,fetch:!0},At=1,St=4;function Ct(t,e){const n=`access_token=${encodeURIComponent(e)}`,[r,o]=t.split("?");if(!o)return`${r}?${n}`;const i=o.replace(/access_token=[^&]*(&|$)/,`${n}$1`);return i!==o?`${r}?${i}`:`${r}?${n}&${o}`}class Tt extends p.bk{constructor(t){if(super(),this._plugins={},this._pluginMediator=new p.bk,this._connectCalled=!1,this._authenticateCalled=!1,this._endpoints=null,this._lastToken=null,this._lastTokenExpiry=0,this._refreshTokenPromise=null,this._authenticationPromise=null,this._reconnectTimeout=0,this._isReconnecting=!1,this._initTime=0,this._lastDisconnect=0,this._stateMask=0,this._quickDisconnectCount=0,this._counter=new ct({curve:"exponential",baseTime:5e3,ceiling:15e3}),this._stateAwareListeners={connected:[],authenticated:[],connection_id:[],transport_connect:[],transport_authenticate:[]},this._stateAwareOperationMetrics={authenticated:null},this._stateAwareRunners={connected:null,authenticated:null,connection_id:null,transport_connect:null,transport_authenticate:null},!t)throw new TypeError("Argument `options` for Transport cannot be null.");if(!t.providers)throw new TypeError("Argument `options.providers` for Transport cannot be null.");this._ownerRef="ownerRef"in t?Object(t.ownerRef):{},this._tokenProvider=t.providers.token,this._endpointsProvider=t.providers.endpoints,this._XHR=t.XHR,this._Fetch=t.Fetch,this._reconnectionRetries=t.reconnectionRetries>=0?t.reconnectionRetries:3,this._requestMode=t.requestMode in wt?t.requestMode:"xhr",this._forcePolyfillTypes=t.forcePolyfillTypes||{},this._disableAutoLogout="disableAutoLogout"in t&&!!t.disableAutoLogout,this._disconnectBeforeUnload=t.disconnectBeforeUnload||!1;const e=t.createConnectionObserver||d.create;this._connectionObserver=e({notifyBeforeUnload:this._disconnectBeforeUnload}),this.authenticate=this.authenticate.bind(this),this._authenticateWithToken=this._authenticateWithToken.bind(this),this._connectToEndpoints=this._connectToEndpoints.bind(this),this._parseProvidedToken=this._parseProvidedToken.bind(this),this._onConnected=this._onConnected.bind(this),this._onAuthenticated=this._onAuthenticated.bind(this),this._onAuthenticationFailed=this._onAuthenticationFailed.bind(this),this._init()}static create(t){return new Tt(t)}_init(){this.onAddListener(i.CONNECTED,this._onAddListener.bind(this,"connected")),this.onAddListener(i.AUTHENTICATED,this._onAddListener.bind(this,"authenticated")),this.onAddListener(i.CONNECTION_ID,this._onAddListener.bind(this,"connection_id")),this.onRemoveListener(i.CONNECTED,this._onRemoveListener.bind(this,"connected")),this.onRemoveListener(i.AUTHENTICATED,this._onRemoveListener.bind(this,"authenticated")),this.onRemoveListener(i.CONNECTION_ID,this._onRemoveListener.bind(this,"connection_id")),this._pluginMediator.onAddListener(s.TRANSPORT_CONNECT,this._onAddListener.bind(this,"transport_connect")),this._pluginMediator.onAddListener(s.TRANSPORT_AUTHENTICATE,this._onAddListener.bind(this,"transport_authenticate")),this._pluginMediator.onRemoveListener(s.TRANSPORT_CONNECT,this._onRemoveListener.bind(this,"transport_connect")),this._pluginMediator.onRemoveListener(s.TRANSPORT_AUTHENTICATE,this._onRemoveListener.bind(this,"transport_authenticate")),"fetch"!==this._requestMode||this._Fetch&&this._Fetch.isSupported()||(yt.warn('Default "fetch" request mode unavailable; Fallback to "xhr"'),this._requestMode="xhr");const t=this._pluginMediator;t.addListeners({[s.PLUGIN_DISCONNECTED]:this._onPluginDisconnected.bind(this)}),this.proxyEmit(t,s.PLUGIN_CONNECTION_INFO,i.CONNECTION_ID),this._disableAutoLogout||this.matchMessages("client:logout",(()=>this._onLogout())),this._connectionObserver.on(i.CONNECTION_ONLINE,(()=>this._onOnline())),this._connectionObserver.on(i.CONNECTION_OFFLINE,(()=>this._onOffline())),this._connectionObserver.on(i.WINDOW_BEFORE_UNLOAD,(()=>this._disconnect(c.WINDOW_BEFORE_UNLOAD)))}_runStateAwareQueues(t,e){const n=this._stateAwareListeners[t].splice(0);try{for(const t of n)t.call(this,e)}finally{this._stateAwareRunners[t]=null}}_connect(){return this._stateMask&At?Promise.resolve(!1):this._connectionObserver.isOnline()?this._performConnect():new Promise(((t,e)=>{yt.info("Waiting to go online before connecting"),this._connectionObserver.once(i.CONNECTION_ONLINE,(()=>{this._performConnect().then(t,e)}))}))}_performConnect(){return new Promise((t=>{yt.info("Resolving endpoints"),t(this._endpointsProvider(this.toPublic()))})).catch((t=>{const e=(null==t?void 0:t.code)?t:new ft(o.TRANSPORT_ENDPOINTS_PROVIDER_ERROR,(null==t?void 0:t.message)||"Endpoints provider error",null!=t?t:null);return yt.error("Endpoints resolution failed",e),Promise.reject(e)})).then(this._connectToEndpoints).then(this._onConnected).catch((t=>{const e=t&&t.error?t.error:t;return this.emit(i.CONNECTION_FAILED,{error:e}),yt.error("Connection failed",e),Promise.reject(e)}))}_connectToEndpoints(t){const e={webgate:"",webapi:""};for(const n in t){if(!t.hasOwnProperty(n))continue;let r=t[n];r&&(_t.test(r)&&(r+="/"),e[n]=r)}this._endpoints=e,this.emit(i.ENDPOINTS_RESOLVED,{endpoints:Object.assign({},e)}),yt.info("Endpoints resolved");const n=[],r=t=>{n.push(t)};return yt.info("Waiting for plugins to connect"),new Promise(((t,o)=>{this._pluginMediator.emitAndWait(s.TRANSPORT_CONNECT,{endpoints:Object.assign({},e),awaitPromise:r},(()=>{Promise.all(n).then((()=>t(!0)),o)}))}))}_refreshToken(t=!1){if(this._refreshTokenPromise)return this._refreshTokenPromise;if(!t&&this._lastToken&&this._lastTokenExpiry>Date.now())return Promise.resolve(this._lastToken);this._refreshTokenPromise=new Promise((t=>{yt.info("Requesting token from provider"),t(this._tokenProvider())})).then(this._parseProvidedToken);const e=()=>{this._refreshTokenPromise=null};return this._refreshTokenPromise.then(e,e),this._refreshTokenPromise.catch((t=>{const e=(null==t?void 0:t.code)?t:new ft(o.TRANSPORT_TOKEN_PROVIDER_ERROR,(null==t?void 0:t.message)||"Token provider error",t);return this.emit(i.TOKEN_PROVIDER_ERROR,{error:e}),yt.error("Token provider error",e),Promise.reject(e)}))}_parseProvidedToken(t){let e,n=3540;if(Array.isArray(t)?(e=t[0],n="string"==typeof t[1]?parseInt(t[1],10):t[1],"number"==typeof n&&isFinite(n)||(n=3540)):e=t,!e)throw this._lastToken=null,this._lastTokenExpiry=0,yt.error("No token was provided"),new ft(o.TRANSPORT_INVALID_TOKEN,`Token provider returned an invalid token, "${e}"`);if(this._lastToken===e){yt.error("TokenProvider returned same token twice.");const t=new ft(o.TRANSPORT_STALE_TOKEN,"Token provider returned the same token twice.");throw this._lastToken=null,this._lastTokenExpiry=0,t}return this._lastToken=e,this._lastTokenExpiry=Date.now()+1e3*n,this.emit(i.ACCESS_TOKEN,{token:e}),yt.info("Access token set"),e}_authenticateWithToken(t){if(!this._endpoints)return Promise.resolve(!0);const e=[],n=t=>{e.push(t)};return yt.info("Waiting for plugins to authenticate"),new Promise(((r,o)=>{this._pluginMediator.emitAndWait(s.TRANSPORT_AUTHENTICATE,{token:t,awaitPromise:n},(()=>{Promise.all(e).then((()=>r(!0)),o)}))}))}_authenticate(t){if(!(this._stateMask&At))return Promise.reject(new ft(o.TRANSPORT_INVALID_STATE,"Cannot authenticate disconnected transport."));if(this._authenticationPromise)return this._authenticationPromise;const e=vt.create();return e.start(),this._authenticationPromise=ut.init((()=>(yt.info("Authenticating"),this._refreshToken(t).then(this._authenticateWithToken))),{curve:"exponential",maxRetries:2,baseTime:500,retryPredicate:t=>(yt.warn("Retrying authentication due to failure",t),!0)}).then((()=>this._onAuthenticated(e))).catch((t=>this._onAuthenticationFailed(t,e))),this._authenticationPromise}_performDisconnect(t){this._stateMask=0;const e=!t;return t&&(this.emit(i.DISCONNECTED,{reason:t}),yt.info("Disconnected")),yt.info("Waiting for plugins to disconnect."),this._pluginMediator.emitSync(s.TRANSPORT_DISCONNECT,{supressed:e}),!0}_createReconnector(){let t=!1;return()=>(this._isReconnecting=!0,this.emit(i.RECONNECTING,null),yt.info("Reconnecting"),this._performDisconnect(),this._connect().then((()=>!!this._authenticateCalled&&this._authenticate(t).then((e=>(t=!1,e)),(e=>(t=!0,Promise.reject(e)))))).then((()=>(this._isReconnecting=!1,this.emit(i.RECONNECTED,null),yt.info("Reconnected"),!0))))}_tryToReconnect(){this._isReconnecting?yt.warn("Reconnection triggered while already reconnecting"):(this._stateMask=0,ut.init(this._createReconnector(),{baseTime:1e3,maxTime:15e3,maxRetries:this._reconnectionRetries,retryPredicate:t=>(yt.warn("Retrying reconnection due to failure",t),!0)}).catch((()=>{this._stateMask=0,this._isReconnecting=!1,this.emit(i.DISCONNECTED,{reason:c.RECONNECTION_FAILED}),yt.info("Disconnected: reconnection failed")})))}_sendRequest(t,e={},n={}){const r=e.signal;return(null==r?void 0:r.aborted)?Promise.reject(C(t,r)):this._processRequestArgs(t,e).then((e=>(null==r?void 0:r.aborted)?Promise.reject(C(t,r)):e.options.forget?this._sendFireAndForgetRequest(e):this._sendRetriedRequest(e,n)))}_processRequestArgs(t,e={}){var n,r;if(null===(n=e.signal)||void 0===n?void 0:n.aborted)return Promise.reject(C(t,e.signal));let o=t,i=!1;const a=Object.assign(Object.assign({},e),{forcePolyfill:!(!e.responseType||!(e.responseType in this._forcePolyfillTypes)),requestMode:null!==(r=null==e?void 0:e.requestMode)&&void 0!==r?r:this._requestMode,connectionObserver:this._connectionObserver,metadata:(null==e?void 0:e.metadata)||null});if((null==e?void 0:e.signal)&&!w()&&("fetch"===e.requestMode?yt.warn("Request with `{requestMode: fetch}` but no native AbortController."):a.requestMode="xhr"),bt.test(o)){i=!0;try{o=this._tryExpandSpecialURL(o)}catch(t){return Promise.reject(t)}"authorize"in a||(a.authorize=!0,a.autoAuthorized=!0)}const s=Object.assign(Object.assign({maxRetries:2,curve:"exponential"},e.retry),{retryPredicate:t=>!(t instanceof g)});return Promise.resolve(mt.create(o,{method:e.method,headers:e.headers,payload:e.payload,options:a,urlExpanded:i,retryOptions:s}))}_tryExpandSpecialURL(t){const e=this._endpoints;return t.replace(bt,((t,n)=>{if(!e.hasOwnProperty(n))throw new TypeError(`Cannot replace endpoint @${n}: endpoint not defined.`);return e[n]}))}_sendFireAndForgetRequest(t){var e;const{url:n,method:r,options:i}=t;if(null===(e=i.signal)||void 0===e?void 0:e.aborted)return Promise.reject(C(n,i.signal));if("GET"!==r&&"POST"!==r)return Promise.reject(new ft(o.TRANSPORT_UNSUPPORTED_OPTION,`Option 'forget' cannot be used for ${r} request.`));if(!i.autoAuthorized&&i.authorize)return Promise.reject(new ft(o.TRANSPORT_UNSUPPORTED_OPTION,"Option 'forget' cannot be used for authorized request."));if(i.requestMode="xhr",i.authorize=!1,i.ignoreResponseBody=!0,"GET"===r)if("function"==typeof fetch){const t={mode:"no-cors"};i.signal&&w()&&(t.signal=i.signal),fetch(n,t).catch((()=>{}))}else"function"==typeof Image?(new Image).src=n:this._sendRetriedRequest(t,{}).catch((()=>{}));else if("POST"===r)if("undefined"!=typeof navigator&&(null===navigator||void 0===navigator?void 0:navigator.sendBeacon)){const e=t.headers.get("content-type");navigator.sendBeacon(t.url,"string"==typeof t.payload&&e?new Blob([t.payload],{type:e}):t.payload)}else if("function"==typeof fetch){const e=t.headers.get("content-type"),r={method:"POST",body:t.payload,headers:e?{"content-type":e}:void 0};i.signal&&w()&&(r.signal=i.signal),fetch(n,r).catch((()=>{}))}else this._sendRetriedRequest(t,{}).catch((()=>{}));return Promise.resolve(new Z(n,0))}_sendRetriedRequest(t,e){const n=t.retryOptions,r=t.options.signal;let o=!1;const a=()=>(null==r?void 0:r.aborted)?Promise.reject(C(t.url,r)):this._setAuthHeader(t,o),c=this._connectionObserver,l=new ut((()=>{let l;return l=c.isOnline()||t.options.allowOffline?a():new Promise(((t,e)=>{c.once(i.CONNECTION_ONLINE,(()=>{a().then(t,e)}))})),l.then((()=>{if(null==r?void 0:r.aborted)return Promise.reject(C(t.url,r));let n;if(this._pluginMediator.emitSync(s.TRANSPORT_BEFORE_SEND_REQUEST,{request:t,context:e}),"fetch"===t.options.requestMode&&this._Fetch&&this._Fetch.isSupported())n=this._Fetch.request(t);else{if(!this._XHR)throw new Error("No available request mechanisms.");n=this._XHR.request(t)}return n})).then((e=>{if(null==r?void 0:r.aborted)return Promise.reject(C(t.url,r));let i=null;if(e.headers&&(i=e.headers.get("Retry-After")),e.status===X.UNAUTHORIZED&&!t.options.ignoreUnauthorized)return o=!0,Promise.reject(e);if("function"==typeof(null==n?void 0:n.condition)&&(n.condition(e,ht)||i)){if(null!==i)if(Et.test(i))e.retryAfter=new Date(i).getTime()-Date.now();else{const t=parseInt(i,10);t>0&&(e.retryAfter=1e3*t)}return Promise.reject(e)}return Promise.resolve(e)}))}),n);return l.start().catch(this._handleRetriedRequestError).then((n=>(null==r?void 0:r.aborted)?Promise.reject(C(t.url,r)):(n.metadata=t.options.metadata,n.retries=n.retries||{count:0},n.retries.count=l.getRetryCount(),this._pluginMediator.emitSync(s.TRANSPORT_BEFORE_RETURN_RESPONSE,{context:e,response:n}),t.options.rejectNotOk&&!n.ok?Promise.reject(n):n)))}_setAuthHeader(t,e){if(!t.options.authorize)return Promise.resolve(t);const n=()=>this._refreshToken(e).then((e=>(t.headers.set("Authorization",`Bearer ${e}`),t)));return this._stateMask&St?n():new Promise(((t,e)=>{yt.info("Auth header setting awaiting authentication."),this.once(i.AUTHENTICATED,(()=>{yt.info("Auth header set after authentication."),n().then(t,e)}))}))}_handleRetriedRequestError(t){return t instanceof Z?Promise.resolve(t):Promise.reject(t)}_onAddListener(t,e){const n=e.data.options;if(n.ignoreCurrentState)return;let r;switch(t){case"connected":if(!this.isConnected())return;r=Promise.resolve(this.createEvent(i.CONNECTED,null));break;case"authenticated":{if(!this.isAuthenticated())return;const t=this._stateAwareOperationMetrics.authenticated;r=Promise.resolve(this.createEvent(i.AUTHENTICATED,{timing:t}));break}case"connection_id":{const t=this.getPluginAPI("dealer");if(!t||!t.hasConnectionInfo())return;r=t.getConnectionInfo().then((t=>this.createEvent(i.CONNECTION_ID,t)));break}case"transport_connect":if(!this.isConnected()||!this._endpoints)return;r=Promise.resolve(this._pluginMediator.createEvent(s.TRANSPORT_CONNECT,{endpoints:Object.assign({},this._endpoints),awaitPromise:t=>{}}));break;case"transport_authenticate":if(!this.isAuthenticated())return;r=this._refreshToken().then((t=>this._pluginMediator.createEvent(s.TRANSPORT_AUTHENTICATE,{token:t,awaitPromise:t=>{}})));break;default:return}const o=e.data.listener;this._stateAwareListeners[t].push(o);const a=this._stateAwareRunners;a[t]||(a[t]=r.then(this._runStateAwareQueues.bind(this,t)),n.once&&e.preventDefault())}_onRemoveListener(t,e){const n=e.data.options;if(n.ignoreCurrentState||n.once)return;const r=e.data.listener,o=this._stateAwareListeners[t].indexOf(r);-1!==o&&this._stateAwareListeners[t].splice(o,1)}_getQuickDisconnectTimeout(){return this._counter.getTime(this._quickDisconnectCount)}_onPluginDisconnected(t){const e=Date.now(),n=e-this._lastDisconnect;if(this._performDisconnect(),t.data.code===O.CLOSE)return yt.info(`Plugin "${t.data.plugin}" explicitly disconnected`),void(this._quickDisconnectCount=0);this._connectionObserver.isOnline()&&(yt.info(`Plugin "${t.data.plugin}" unexpectedly disconnect; trying to reconnect`),n<5e3?(this._reconnectTimeout&&clearTimeout(this._reconnectTimeout),this._quickDisconnectCount++,this.emit(i.SHORT_SESSION_DISCONNECTED,{disconnectCount:this._quickDisconnectCount,sessionLength:n}),this._reconnectTimeout=setTimeout(this._tryToReconnect.bind(this),this._getQuickDisconnectTimeout())):(this._quickDisconnectCount=0,this._lastDisconnect=e,this._tryToReconnect()))}_onOnline(){this.emit(i.CONNECTION_ONLINE,null),yt.info("ConnectionObserver online"),this._connectCalled&&this._tryToReconnect()}_onOffline(){this.emit(i.CONNECTION_OFFLINE,null),yt.info("ConnectioObserver offline"),this._performDisconnect()}_onConnected(){return this._stateMask|=At,this.emit(i.CONNECTED,null),yt.info("Connected"),Promise.resolve(!0)}_onAuthenticated(t){t.end(),clearTimeout(this._reconnectTimeout),this._authenticationPromise=null,this._stateMask|=St,this._initTime=Date.now();const e=t.getMetrics();return this.emit(i.AUTHENTICATED,{timing:e}),this._stateAwareOperationMetrics.authenticated=e,yt.info("Authenticated"),Promise.resolve(!0)}_onAuthenticationFailed(t,e){e.end();const n=t&&t.error?t.error:t;this._authenticationPromise=null,this._stateMask&=~St;const r={error:n,timing:e.getMetrics()};return this.emit(i.AUTHENTICATION_FAILED,r),this._pluginMediator.emit(s.TRANSPORT_AUTHENTICATE_FAILED,r),yt.info("Authentication failed",n),Promise.reject(n)}_onLogout(){const t=()=>{this._lastToken=null,this._lastTokenExpiry=0,this.emit(i.LOGGED_OUT,null)};this._disconnect(c.LOG_OUT).then(t,t)}_disconnect(t){if(!this._connectCalled)return Promise.resolve(!1);this._connectCalled=!1,this._authenticateCalled=!1;const e=this.isConnected()?i.BEFORE_ONLINE_DISCONNECT:i.BEFORE_OFFLINE_DISCONNECT,n=[];return this.emitSync(e,{awaitPromise:t=>{n.push(t.catch((()=>{})))}}),Promise.all(n).then((()=>this._performDisconnect(t)))}isConnected(){return!!(this._stateMask&At)}isAuthenticated(){return!!(this._stateMask&St)}isReconnecting(){return this._isReconnecting}isOnline(){return this._connectionObserver.isOnline()}connect(){return this._connectCalled=!0,this._connect()}authenticate(){return this._authenticateCalled=!0,this._authenticate(!0)}disconnect(){return this._disconnect(c.EXPLICIT)}forceDisconnect(){return this._connectCalled?(this._connectCalled=!1,this._authenticateCalled=!1,this._performDisconnect(c.EXPLICIT),Promise.resolve(!0)):Promise.resolve(!1)}forceTokenRefresh(){return this._refreshToken(!0).then((()=>!0))}getInitTime(){return this._initTime}getEndpoints(){return this._endpoints?Object.assign({},this._endpoints):null}getLastToken(){return this._lastToken}toPublic(t){return new gt(this,t)}hasOwnerRef(t){return this._ownerRef===t}appendTokenQuery(t){return this._refreshToken().then((e=>Ct(t,e)))}appendLastTokenQuery(t){return this._lastToken?Ct(t,this._lastToken):t}matchMessages(t,e,n){if(!t)throw new TypeError('Message "matcher" cannot be null.');if("function"!=typeof e)throw new TypeError("Message callback cannot be null.");const r=r=>{const o=r.data.message;!o.uri||!o.uri.match(t)||n&&n!==r.data.plugin||e(o)};r.__matchMessagesExp=t,r.__matchMessagesPlugin=n,e.__matchMessagesWrapper=r,this._pluginMediator.on(s.PLUGIN_MESSAGE,r)}unmatchMessages(t,e,n){if("function"!=typeof e)throw new TypeError("Message callback cannot be null.");const r=e.__matchMessagesWrapper;return!(!r||r.__matchMessagesExp!==t||r.__matchMessagesPlugin!==n)&&(this._pluginMediator.removeListener(s.PLUGIN_MESSAGE,r),!0)}handlePushRequests(t,e,n){if(!t)throw new TypeError('Push request "matcher" cannot be null.');if("function"!=typeof e)throw new TypeError("Push request callback cannot be null.");const r=r=>{const o=r.data.request;!o.message_ident||!o.message_ident.match(t)||n&&n!==r.data.plugin||Promise.resolve(e(o)).then(r.data.reply)};r.__matchRequestExp=t,r.__matchRequestPlugin=n,e.__matchRequestWrapper=r,this._pluginMediator.on(s.PLUGIN_REQUEST,r)}unhandlePushRequests(t,e,n){if("function"!=typeof e)throw new TypeError("Push request callback cannot be null.");const r=e.__matchRequestWrapper;return!(!r||r.__matchRequestExp!==t||r.__matchRequestPlugin!==n)&&(this._pluginMediator.removeListener(s.PLUGIN_REQUEST,r),!0)}request(t,e){var n;const r={uri:t,options:e,context:{}};this._pluginMediator.emitSync(s.TRANSPORT_BEFORE_PROCESS_REQUEST,r);const o=this._sendRequest.bind(this,r.uri,r.options,r.context);if(!this._endpoints&&bt.test(r.uri))return yt.info("Request queued until endpoints resolved",r.uri),new Promise(((t,e)=>{this.once(i.ENDPOINTS_RESOLVED,(()=>{yt.info("Sending endpoints-queued request",r.uri),o().then(t,e)}))}));return!this._connectionObserver.isOnline()&&!(null===(n=r.options)||void 0===n?void 0:n.allowOffline)?(yt.info("Request queued until online",r.uri),new Promise(((t,e)=>{this.once(i.CONNECTION_ONLINE,(()=>{yt.info("Sending offline-queued request",r.uri),o().then(t,e)}))}))):o()}addPlugin(t,e){const n=t(this,e),r=n.name;if(this._plugins[r])throw new TypeError("Plugin is already added.");return n.attach(this,this._pluginMediator),this._plugins[r]=n,r}removePlugin(t){const e=this._plugins[t];return!!e&&(e.detach(this,this._pluginMediator),this._plugins[t]=void 0,!0)}hasPlugin(t){return!!this._plugins[t]}getPluginAPI(t){const e=this._plugins[t];return e&&e.api?e.api:null}getConnectionId(t="dealer"){const e=this._plugins[t];return e?e.api&&function(t){return"getConnectionInfo"in t.api}(e)?e.api.getConnectionInfo().then((t=>t.id)):Promise.reject(new TypeError(`Plugin ${e} is not a socket plugin.`)):Promise.reject(new TypeError(`Cannot retrieve connection id for plugin ${e}.`))}removeAllListeners(){return this}}class Lt{constructor(t){this._headers={},this._init(t)}_init(t){if(t){const e=t.split("\r\n");for(const t of e){const e=t.indexOf(": ");if(e>0){const n=t.substring(0,e).toLowerCase(),r=t.substring(e+2);this._headers[n]=r}}}}get(t){return this._headers[t.toLowerCase()]||null}has(t){return this._headers.hasOwnProperty(t.toLowerCase())}}const Ot=$("transport.http.xhr"),xt=function(){},kt={json:!0,text:!0,document:!0};function Pt(){this.onabort=xt,this.onerror=xt,this.onload=xt,this.onloadend=xt}function Nt(t,e,n){var r,o;if(null===(r=t.options.signal)||void 0===r?void 0:r.aborted)return;const i=G(),a=this.status,s=new Z(this.responseURL||t.url,a);s.body=null;const c=t.options;if(c.timing&&(s.timing={completed:K(e,i)}),(null===(o=c.connectionObserver)||void 0===o?void 0:o.isOnline)&&(s.offline=!c.connectionObserver.isOnline()),(c.parseResponseHeaders||a>299)&&(s.headers=new Lt(this.getAllResponseHeaders())),!c.ignoreResponseBody&&a!==X.NO_CONTENT){const t=c.responseType||"";if(!c.forcePolyfill&&"response"in this&&t===this.responseType)s.body=this.response;else if("document"===t)s.body=this.responseXML;else if("json"===t)try{s.body=JSON.parse(this.responseText)}catch(t){Ot.warn("Could not parse response as JSON:",t),s.body=null}else"text"!==t&&""!==t||(s.body=this.responseText)}n(s)}function It(t,e,n){4===this.readyState?e(new Z(this.responseURL||t,this.status)):n(new m("Request cannot be completed.",o.HTTP_REQUEST_FAILED,this.status,t))}function Rt(t){const e=t.options.signal;return new Promise(((n,r)=>{if(null==e?void 0:e.aborted)return void r(C(t.url,e));const o=new XMLHttpRequest;let i=t.url;if(!i)return void r(new TypeError("Request URL cannot be blank."));let a=null;const s=t.method||"GET",c=t.payload||"";s in Q&&!0===Q[s]&&c?a=c:c&&(i+=`?${c}`),o.open(s,i,!0),o.onerror=It.bind(o,i,n,r),o.onabort=Pt,o.onloadend=Pt,o.onprogress=xt;const l=t.options;"include"===l.credentials&&(o.withCredentials=!0);const u=l.responseType;if(u)if(l.forcePolyfill){if(!(u in kt))return void r(new TypeError(`Cannot polyfill responseType "${u}"`))}else{if(!("responseType"in o)&&!(u in kt))return void r(new TypeError("Cannot set responseType: not supported in browser."));try{o.responseType=u}catch(t){return void r(new TypeError(`Unknown responseType "${u}".`))}if(o&&u!==o.responseType&&!(u in kt))return void r(new TypeError(`Unknown responseType "${u}".`))}const h=t.headers.count()?t.headers.toJSON():null;if(h)for(const t in h)if(h.hasOwnProperty(t)&&h[t])try{o.setRequestHeader(t,h[t])}catch(t){return void r(t)}e&&e.addEventListener("abort",(function t(){e.removeEventListener("abort",t),o.abort(),r(C(i,e))})),o.onload=Nt.bind(o,t,G(),n);try{o.send(a)}catch(t){return void r(t)}}))}function Mt(t){return Rt(t)}class Ft extends Error{constructor(t,e,n=-1){super(e),this.name="XResolveError",this.message=e,this.code=t,this.status=n}}const Dt="https://apresolve.spotify.com/",Vt={DEALER:"dealer",WEBGATE:"spclient"},Bt="dealer.spotify.com",zt="https://api.spotify.com/",Ut={spclient:"spclient.wg.spotify.com",exp:"exp.wg.spotify.com",partners:"partners.wg.spotify.com"};function jt(t={}){const e=t.dealer||Vt.DEALER,n=t.webgate||Vt.WEBGATE,r=`${Dt}?type=${e}&type=${n}`;return function(t){return t.request(r,{forcePolyfill:!0,responseType:"json",retry:{maxRetries:3,curve:"exponential",condition:function(t,e){return t.getStatusFamily()!==e.SUCCESS}},metadata:{noRequestTransform:!0}}).then((t=>{var r,i,a,s,c;const l=t.body,u={dealer:null!==(i=null===(r=null==l?void 0:l[e])||void 0===r?void 0:r[0])&&void 0!==i?i:Bt,webgate:null!==(c=null!==(s=null===(a=null==l?void 0:l[n])||void 0===a?void 0:a[0])&&void 0!==s?s:Ut[n])&&void 0!==c?c:Ut.spclient,webapi:zt};if(!u.dealer||!u.webgate)throw new Ft(o.XRESOLVE_INCOMPLETE_RESPONSE,"X-Resolve responded with incomplete results.",t.status);return u})).then((t=>(t.dealer=`wss://${t.dealer.replace(/:443$/,"")}`,t.webgate=`https://${t.webgate.replace(/:443$/,"")}`,t)))}}function Ht(){return()=>Promise.resolve({webgate:"https://www.spotify.com/api/",webapi:"https://api.spotify.com"})}function qt(){return()=>Promise.resolve("NOT_A_TOKEN")}function Wt(){return{endpoints:Ht(),token:qt()}}const $t="request-transformer";class Gt{constructor(t){this.name=$t,this._uriTransformer=t.uriTransformer,this._optionsOverrides=t.optionsOverrides,this._include=t.include,this._processRequest=this._processRequest.bind(this)}_processRequest(t){var e,n;const r=t.data;if((null===(n=null===(e=r.options)||void 0===e?void 0:e.metadata)||void 0===n?void 0:n.noRequestTransform)||this._include&&!this._include(r.uri,r.options))return;this._uriTransformer&&(r.uri=this._uriTransformer(r.uri));const o=this._optionsOverrides;if(o)if(r.options){const t=Object.assign(Object.assign(Object.assign({},r.options),o),{metadata:Object.assign(Object.assign({},r.options.metadata),o.metadata),retry:Object.assign(Object.assign({},r.options.retry),o.retry),headers:Object.assign(Object.assign({},r.options.headers),o.headers)});r.options=t}else r.options=o}attach(t,e){e.on(s.TRANSPORT_BEFORE_PROCESS_REQUEST,this._processRequest)}detach(t,e){e.removeListener(s.TRANSPORT_BEFORE_PROCESS_REQUEST,this._processRequest)}}function Kt(t,e){return new Gt(e)}function Qt(t){const e=Object.assign({},t);return e.XHR||(e.XHR=l),e.Fetch=r,Tt.create(e)}function Xt(t){const e=Qt(t);return e.addPlugin(D,{WebSocket}),e}},3190:(t,e,n)=>{"use strict"},1544:(t,e,n)=>{"use strict";n.d(e,{NQ:()=>r,o_:()=>j,cA:()=>U});const r={AD:"ad",ALBUM:"album",GENRE:"genre",QUEUE:"queue",APPLICATION:"application",ARTIST:"artist",ARTIST_TOPLIST:"artist-toplist",ARTIST_CONCERTS:"artist-concerts",AUDIO_FILE:"audiofile",COLLECTION:"collection",COLLECTION_ALBUM:"collection-album",COLLECTION_ARTIST:"collection-artist",COLLECTION_MISSING_ALBUM:"collection-missing-album",COLLECTION_TRACK_LIST:"collectiontracklist",COMMENT:"comment",CONCEPT:"concept",CONCERT:"concert",CONTEXT_GROUP:"context-group",CULTURAL_MOMENT:"cultural-moment",DAILY_MIX:"dailymix",EMPTY:"empty",EPISODE:"episode",FACEBOOK:"facebook",FESTIVAL:"festival",FOLDER:"folder",FOLLOWERS:"followers",FOLLOWING:"following",IMAGE:"image",INBOX:"inbox",INTERRUPTION:"interruption",LIBRARY:"library",LIVE:"live",ROOM:"room",EXPRESSION:"expression",JAM:"jam",LOCAL:"local",LOCAL_TRACK:"local",LOCAL_ALBUM:"local-album",LOCAL_ARTIST:"local-artist",MERCH:"merch",MERCHHUB:"merchhub",MOSAIC:"mosaic",PLAYLIST:"playlist",PLAYLIST_V2:"playlist-v2",PRERELEASE:"prerelease",PROFILE:"profile",PROMOTER:"promoter",PUBLISHED_ROOTLIST:"published-rootlist",RADIO:"radio",ROOTLIST:"rootlist",SEARCH:"search",SHOW:"show",SOCIAL_SESSION:"socialsession",SPECIAL:"special",STARRED:"starred",STATION:"station",TEMP_PLAYLIST:"temp-playlist",TOPLIST:"toplist",TOUR:"tour",TRACK:"track",TRACKSET:"trackset",USER_TOPLIST:"user-toplist",USER_TOP_TRACKS:"user-top-tracks",UNKNOWN:"unknown",VENUE:"venue",VIDEO:"video",MEDIA:"media",QUESTION:"question",POLL:"poll",RESPONSE:"response",COURSE:"course",LESSON:"lesson",CANVAS:"canvas"};var o,i=n(3422);!function(t){t[t.URI=0]="URI",t[t.URL=1]="URL"}(o||(o={}));const a="spotify:",s="http://play.spotify.com/",c="https://play.spotify.com/",l="http://open.spotify.com/",u="https://open.spotify.com/",h="/",p={APP:"app",FACEBOOK:"facebook",GLOBAL:"global",TOP:"top",USER:"user",CONCERTS:"concerts",HUB:"hub"};function f(t,e){return z(r.COLLECTION,{username:t,category:e})}function d(t,e,n){return z(r.JAM,{id:t,contextType:e,hasBase62Id:Boolean(t),play:Boolean(n)})}function m(t,e,n,o){return z(r.LOCAL_TRACK,{artist:t,album:e,track:n,duration:o})}function g(t,e,n){return z(r.TOPLIST,{toplist:t,country:e,global:Boolean(n)})}function v(t,e,n,o){return z(r.TRACK,{id:t,anchor:e,context:n?U(n):null,play:o,hasBase62Id:!0})}function y(t,e){if(!t)return"";let n=encodeURIComponent(t);return e===o.URI&&(n=n.replace(/%20/g,"+")),n=n.replace(/[!'()]/g,escape),n=n.replace(/\*/g,"%2A"),n}function b(t,e,n=[]){for(let r=0,o=t.length;r1&&(e+="&");const r=t[n];void 0!==r&&(e+=`${n}=${encodeURIComponent(r)}`)}return e}const w=/^intl-[A-Za-z]{2,3}(-[A-Za-z]{4})?(-([A-Za-z]{2}|[0-9]{3}))?$/;const A=()=>{const t={};return[(e,n)=>{t[e]||(t[e]=n)},t]},[S,C]=A();S(r.PLAYLIST,((t,e,{username:n})=>function(t,e){return z(r.PLAYLIST,{id:e,username:t,hasBase62Id:!0})}(n,t.getBase62IdComponent()))),S(r.FOLDER,((t,e,{username:n})=>function(t,e){return z(r.FOLDER,{id:e,username:t,hasBase62Id:!0})}(n,t.getIdComponent()))),S(r.COLLECTION_TRACK_LIST,((t,e,{username:n})=>function(t,e){return z(r.COLLECTION_TRACK_LIST,{id:e,username:t,hasBase62Id:!0})}(n,t.getIdComponent()))),S(r.COLLECTION,((t,e,{username:n})=>{const o=t.getNextComponent();if(o===r.ALBUM){const e=t.getIdComponent();return"missing"===t.getNextComponent()?function(t,e){return z(r.COLLECTION_MISSING_ALBUM,{id:e,username:t,hasBase62Id:!0})}(n,e):function(t,e){return z(r.COLLECTION_ALBUM,{id:e,username:t,hasBase62Id:!0})}(n,e)}return o===r.ARTIST?function(t,e){return z(r.COLLECTION_ARTIST,{id:e,username:t,hasBase62Id:!0})}(n,t.getIdComponent()):f(n,o)})),S(r.STARRED,((t,e,{username:n})=>function(t){return z(r.STARRED,{username:t})}(n))),S(r.FOLLOWERS,((t,e,{username:n})=>function(t){return z(r.FOLLOWERS,{username:t})}(n))),S(r.FOLLOWING,((t,e,{username:n})=>function(t){return z(r.FOLLOWING,{username:t})}(n))),S(p.TOP,((t,e,{username:n})=>function(t,e){return z(r.USER_TOPLIST,{username:t,toplist:e})}(n,t.getNextRequiredComponent()))),S(r.INBOX,((t,e,{username:n})=>function(t){return z(r.INBOX,{username:t})}(n))),S(r.ROOTLIST,((t,e,{username:n})=>function(t){return z(r.ROOTLIST,{username:t})}(n))),S(r.PUBLISHED_ROOTLIST,((t,e,{username:n})=>function(t){return z(r.PUBLISHED_ROOTLIST,{username:t})}(n))),S(r.TOPLIST,((t,e,{username:n})=>function(t){return z(r.USER_TOP_TRACKS,{username:t})}(n))),S(r.LIBRARY,((t,e,{username:n})=>function(t,e){return z(r.LIBRARY,{username:t,category:e})}(n,t.getNextComponent())));const[T,L]=A();function O(t){let e,n,r,i,p=t;const[f,d]=p.split("?");if(f&&d){p=f;const[t,e]=d.split("#");t&&(r=function(t){return t.split("&").reduce(((t,e)=>{const[n,r]=e.split("=");return n&&r&&(t[n]=decodeURIComponent(r)),t}),{})}(t),i=e)}const m=p.split("#");if(m.length>1&&(p=m.shift(),i=m.pop()),0===p.indexOf(a))e=p.slice(a.length).split(":"),n=o.URI;else{const[t]=p.split("?");if(0===(null==t?void 0:t.indexOf(s)))e=t.slice(s.length).split("/");else if(0===(null==t?void 0:t.indexOf(c)))e=t.slice(c.length).split("/");else if(0===(null==t?void 0:t.indexOf(l)))e=t.slice(l.length).split("/");else if(0===(null==t?void 0:t.indexOf(u)))e=t.slice(u.length).split("/");else{if(0!==(null==t?void 0:t.indexOf(h)))throw new TypeError("Invalid Spotify URI!");e=t.slice(h.length).split("/")}n=o.URL}return i&&e.push(i),{format:n,components:e,query:r}}function x(t,e,n,i){let a=0;const s=()=>{const e=t[a++];if(e&&/\s/.test(e))throw new TypeError("Invalid Spotify URI!");return e},c=()=>{const t=s();if(!t)throw new TypeError("Invalid Spotify URI!");return t},l={getAllComponents:()=>t,getQueryParams:()=>n,getNextComponent:s,getNextRequiredComponent:c,getIdComponent:()=>{const t=c();if(t.length>22)throw new TypeError("Invalid Spotify URI!");return t},getHexIdComponent:t=>{const e=c();if(e.length!==t)throw new TypeError("Invalid Spotify URI!");if(!/^[a-fA-F0-9]+$/.test(e))throw new Error("Invalid Hex ID");return e},getBase62IdComponent:()=>{const t=c();if(22!==t.length)throw new TypeError("Invalid Spotify URI!");if(!/^[a-zA-Z0-9]+$/.test(t))throw new Error("Invalid ID");return t},getRemainingComponents:()=>t.slice(a),getRemainingString:()=>{const n=e===o.URI?":":"/";return t.slice(a).join(n)}};let u=c(),h=L[u];if(!h){const t=function(t){return w.test(t)}(u);t&&(u=c(),h=L[u])}if(h)return h(l,e,{});if(i)return L[r.UNKNOWN](l,e,{});throw new TypeError("Invalid or unknown Spotify URI!")}T(r.ALBUM,(t=>{const e=t.getBase62IdComponent(),n=t.getNextComponent();return function(t,e){return z(r.ALBUM,{id:t,disc:e,hasBase62Id:!0})}(e,n?parseInt(n,10):void 0)})),T(p.APP,((t,e)=>{const n=t.getNextRequiredComponent();if(y(_(n,e),e)!==n)throw new TypeError("Invalid or unknown Spotify URI!");const o=t.getRemainingComponents();for(let t=0,n=o.length;t{return e=t.getNextRequiredComponent(),z(r.AD,{id:e});var e})),T(r.ARTIST,(t=>{const e=t.getBase62IdComponent(),n=t.getNextComponent();return n===p.TOP?function(t,e){return z(r.ARTIST_TOPLIST,{id:t,toplist:e,hasBase62Id:!0})}(e,t.getNextRequiredComponent()):n===p.CONCERTS?function(t){return z(r.ARTIST_CONCERTS,{id:t,hasBase62Id:!0})}(e):function(t){return z(r.ARTIST,{id:t,hasBase62Id:!0})}(e)})),T(r.AUDIO_FILE,(t=>{return e=t.getNextRequiredComponent(),n=t.getNextRequiredComponent(),z(r.AUDIO_FILE,{id:n,extension:e});var e,n})),T(r.DAILY_MIX,(t=>{return e=t.getIdComponent(),z(r.DAILY_MIX,{id:e,hasBase62Id:!0});var e})),T(r.TEMP_PLAYLIST,(t=>{return e=t.getNextRequiredComponent(),n=t.getRemainingString(),z(r.TEMP_PLAYLIST,{origin:e,data:n});var e,n})),T(r.PLAYLIST,(t=>{return e=t.getBase62IdComponent(),z(r.PLAYLIST_V2,{id:e,hasBase62Id:!0});var e})),T(r.SEARCH,((t,e)=>{return n=_(t.getRemainingString(),e),z(r.SEARCH,{query:n});var n})),T(r.TRACK,(t=>{const e=t.getQueryParams();return v(t.getBase62IdComponent(),t.getNextComponent(),null==e?void 0:e.context,null==e?void 0:e.play)})),T(r.TRACKSET,(t=>{var e;const n=_(t.getNextComponent());let o=t.getNextRequiredComponent();const i=t.getNextComponent();let a=parseInt(null!==(e=t.getNextComponent())&&void 0!==e?e:"",10);("%23"!==i||isNaN(a))&&(a=null);const s=[];if(o){o=_(o).split(",");for(let t=0,e=o.length;t{return e=t.getNextRequiredComponent(),n=t.getNextRequiredComponent(),z(r.CONTEXT_GROUP,{origin:e,name:n,hasBase62Id:!0});var e,n})),T(p.TOP,(t=>{const e=t.getNextRequiredComponent();return t.getNextComponent()===p.GLOBAL?g(e,void 0,!0):g(e,t.getNextComponent(),!1)})),T(r.LOCAL_TRACK,((t,e)=>{const n=_(t.getNextComponent(),e),o=t.getNextComponent(),i=_(o,e),a=t.getNextComponent(),s=_(a,e),c=t.getNextComponent(),l=c?parseInt(c,10):void 0;return void 0!==a?m(n,i,s,l):void 0!==o?(u=n,h=i,z(r.LOCAL_ALBUM,{artist:u,album:h})):function(t){return z(r.LOCAL_ARTIST,{artist:t})}(n);var u,h})),T(r.IMAGE,(t=>{return e=t.getHexIdComponent(40),z(r.IMAGE,{id:e});var e})),T(r.MOSAIC,(t=>{return e=t.getRemainingComponents(),z(r.MOSAIC,{ids:e});var e})),T(r.RADIO,(t=>{return e=t.getRemainingString(),z(r.RADIO,{args:null!=e?e:""});var e})),T(r.SPECIAL,((t,e)=>{const n=t.getRemainingComponents();for(let t=0,r=n.length;t{return e=t.getRemainingComponents(),z(r.STATION,{args:null!=e?e:[]});var e})),T(r.EPISODE,(t=>{const e=t.getQueryParams();return function(t,e,n){return z(r.EPISODE,{id:t,context:e?U(e):null,play:n,hasBase62Id:!0})}(t.getBase62IdComponent(),null==e?void 0:e.context,null==e?void 0:e.play)})),T(r.SHOW,(t=>{return e=t.getBase62IdComponent(),z(r.SHOW,{id:e,hasBase62Id:!0});var e})),T(r.LIVE,(t=>{return e=t.getIdComponent(),z(r.LIVE,{id:e,hasBase62Id:!0});var e})),T(r.ROOM,(t=>{return e=t.getIdComponent(),z(r.ROOM,{id:e,hasBase62Id:!0});var e})),T(r.EXPRESSION,(t=>{return e=t.getIdComponent(),z(r.EXPRESSION,{id:e,hasBase62Id:!0});var e})),T(r.CONCEPT,(t=>{return e=t.getIdComponent(),z(r.CONCEPT,{id:e,hasBase62Id:!0});var e})),T(r.CONCERT,(t=>{return e=t.getIdComponent(),z(r.CONCERT,{id:e,hasBase62Id:!0});var e})),T(r.MERCH,(t=>{return e=t.getIdComponent(),z(r.MERCH,{id:e,hasBase62Id:!0});var e})),T(r.MERCHHUB,(()=>z(r.MERCHHUB,{}))),T(r.PRERELEASE,(t=>{return e=t.getIdComponent(),z(r.PRERELEASE,{id:e,hasBase62Id:!0});var e})),T(r.SOCIAL_SESSION,(t=>{return e=t.getNextRequiredComponent(),z(r.SOCIAL_SESSION,{id:e,hasBase62Id:!0});var e})),T(r.JAM,(t=>{const[e,n,o,i]=t.getAllComponents();return n===r.ALBUM||n===r.ARTIST||n===r.PLAYLIST?d(o,n,!!i):d("")})),T(r.INTERRUPTION,(t=>{return e=t.getNextRequiredComponent(),z(r.INTERRUPTION,{id:e});var e})),T(r.COLLECTION,(t=>f(void 0,t.getNextComponent()))),T(r.GENRE,(t=>{return e=t.getNextRequiredComponent(),z(r.GENRE,{genre:e});var e})),T(r.QUEUE,(()=>z(r.QUEUE,{}))),T(p.USER,((t,e)=>{const n=_(t.getNextRequiredComponent(),e),o=t.getNextComponent();if(n===r.FACEBOOK&&o)return i=o,z(r.FACEBOOK,{uid:i});if(o&&C[o]){const r=C[o];if(!r)throw new TypeError("Invalid Spotify URI!");return r(t,e,{username:n})}var i;const a=t.getRemainingComponents();return function(t,e){return z(r.PROFILE,{username:t,args:null!=e?e:[]})}(n,o?[o].concat(a):void 0)})),T(r.UNKNOWN,(t=>function(t){return z(r.UNKNOWN,{args:null!=t?t:[]})}(t.getAllComponents()))),T(r.MEDIA,(t=>{return e=t.getIdComponent(),z(r.MEDIA,{id:e,hasBase62Id:!0});var e})),T(r.POLL,(t=>{return e=t.getIdComponent(),z(r.POLL,{id:e,hasBase62Id:!0});var e})),T(r.QUESTION,(t=>{return e=t.getIdComponent(),z(r.QUESTION,{id:e,hasBase62Id:!0});var e})),T(r.RESPONSE,(t=>{return e=t.getIdComponent(),z(r.RESPONSE,{id:e,hasBase62Id:!0});var e})),T(r.CULTURAL_MOMENT,(t=>{if(t.getNextComponent()!==p.HUB)throw new TypeError("Invalid or unknown Spotify URI!");return e=t.getIdComponent(),z(r.CULTURAL_MOMENT,{id:e});var e})),T(r.FESTIVAL,(t=>{return e=t.getIdComponent(),z(r.FESTIVAL,{id:e,hasBase62Id:!0});var e})),T(r.TOUR,(t=>{return e=t.getIdComponent(),z(r.TOUR,{id:e,hasBase62Id:!0});var e})),T(r.VENUE,(t=>{return e=t.getIdComponent(),z(r.VENUE,{id:e,hasBase62Id:!0});var e})),T(r.VIDEO,(t=>{return e=t.getIdComponent(),z(r.VIDEO,{id:e,hasBase62Id:!0});var e})),T(r.CANVAS,(t=>{return e=t.getIdComponent(),z(r.CANVAS,{id:e,hasBase62Id:!0});var e})),T(r.COURSE,(t=>{return e=t.getIdComponent(),z(r.COURSE,{id:e,hasBase62Id:!0});var e})),T(r.LESSON,(t=>{return e=t.getIdComponent(),z(r.LESSON,{id:e,hasBase62Id:!0});var e})),T(r.PROMOTER,(t=>{return e=t.getIdComponent(),z(r.PROMOTER,{id:e,hasBase62Id:!0});var e})),T(r.COMMENT,(t=>{return e=t.getIdComponent(),z(r.COMMENT,{id:e,hasBase62Id:!0});var e}));const[k,P]=(()=>{const t={};return[(e,n)=>{t[e]||(t[e]=n)},t]})();function N(t,e){const n=P[t.type];if(!n)throw new TypeError("Invalid Spotify URI!");return n(t,e)}k(r.ALBUM,(t=>{const e=[r.ALBUM,t.id];return t.disc&&e.push(t.disc),e})),k(r.AD,(t=>[r.AD,t.id])),k(r.ARTIST,(t=>[r.ARTIST,t.id])),k(r.QUEUE,(()=>[r.QUEUE])),k(r.GENRE,(t=>[r.GENRE,t.genre])),k(r.ARTIST_TOPLIST,(t=>[r.ARTIST,t.id,p.TOP,t.toplist])),k(r.ARTIST_CONCERTS,(t=>[r.ARTIST,t.id,p.CONCERTS])),k(r.DAILY_MIX,(t=>[r.DAILY_MIX,t.id])),k(r.SEARCH,((t,e)=>[r.SEARCH,y(t.query,e)])),k(r.TRACK,(t=>{let e=t.id;return(t.context||t.play)&&(e+=E({context:t.context,play:t.play})),t.anchor&&(e+=`#${t.anchor}`),[r.TRACK,e]})),k(r.TRACKSET,(t=>{let e=[];if(t.tracks)for(let n=0,r=t.tracks.length;n[p.USER,r.FACEBOOK,t.uid])),k(r.AUDIO_FILE,(t=>[r.AUDIO_FILE,t.extension,t.id])),k(r.FOLDER,((t,e)=>[p.USER,y(t.username,e),r.FOLDER,t.id])),k(r.FOLLOWERS,((t,e)=>[p.USER,y(t.username,e),r.FOLLOWERS])),k(r.FOLLOWING,((t,e)=>[p.USER,y(t.username,e),r.FOLLOWING])),k(r.PLAYLIST,((t,e)=>[p.USER,y(t.username,e),r.PLAYLIST,t.id])),k(r.PLAYLIST_V2,(t=>[r.PLAYLIST,t.id])),k(r.STARRED,((t,e)=>[p.USER,y(t.username,e),r.STARRED])),k(r.TEMP_PLAYLIST,(t=>[r.TEMP_PLAYLIST,t.origin,t.data])),k(r.CONTEXT_GROUP,(t=>[r.CONTEXT_GROUP,t.origin,t.name])),k(r.USER_TOPLIST,((t,e)=>[p.USER,y(t.username,e),p.TOP,t.toplist])),k(r.USER_TOP_TRACKS,((t,e)=>[p.USER,y(t.username,e),r.TOPLIST])),k(r.TOPLIST,(t=>[p.TOP,t.toplist].concat(t.global||!t.country?[p.GLOBAL]:["country",t.country]))),k(r.INBOX,((t,e)=>[p.USER,y(t.username,e),r.INBOX])),k(r.ROOTLIST,((t,e)=>[p.USER,y(t.username,e),r.ROOTLIST])),k(r.PUBLISHED_ROOTLIST,((t,e)=>[p.USER,y(t.username,e),r.PUBLISHED_ROOTLIST])),k(r.COLLECTION_TRACK_LIST,((t,e)=>[p.USER,y(t.username,e),r.COLLECTION_TRACK_LIST,t.id])),k(r.PROFILE,((t,e)=>t.args&&t.args.length>0?[p.USER,y(t.username,e)].concat(t.args):[p.USER,y(t.username,e)])),k(r.LOCAL_ARTIST,((t,e)=>[r.LOCAL_TRACK,y(t.artist,e)])),k(r.LOCAL_ALBUM,((t,e)=>[r.LOCAL_TRACK,y(t.artist,e),y(t.album,e)])),k(r.LOCAL_TRACK,((t,e)=>[r.LOCAL_TRACK,y(t.artist,e),y(t.album,e),y(t.track,e),t.duration])),k(r.LIBRARY,((t,e)=>[p.USER,y(t.username,e),r.LIBRARY].concat(t.category?[t.category]:[]))),k(r.IMAGE,(t=>[r.IMAGE,t.id])),k(r.MOSAIC,(t=>{let e=[];return t.ids&&(e=t.ids.slice(0)),e.unshift(r.MOSAIC),e})),k(r.RADIO,((t,e)=>b(t.args,e,[r.RADIO]))),k(r.SPECIAL,((t,e)=>b(t.args,e,[r.SPECIAL]))),k(r.STATION,((t,e)=>b(t.args,e,[r.STATION]))),k(r.APPLICATION,((t,e)=>b(t.args,e,[p.APP,t.id]))),k(r.COLLECTION_ALBUM,((t,e)=>[p.USER,y(t.username,e),r.COLLECTION,r.ALBUM,t.id])),k(r.COLLECTION_MISSING_ALBUM,((t,e)=>[p.USER,y(t.username,e),r.COLLECTION,r.ALBUM,t.id,"missing"])),k(r.COLLECTION_ARTIST,((t,e)=>[p.USER,y(t.username,e),r.COLLECTION,r.ARTIST,t.id])),k(r.COLLECTION,((t,e)=>{const n=[r.COLLECTION].concat(t.category?[t.category]:[]);return t.username?[p.USER,y(t.username,e)].concat(n):n})),k(r.COMMENT,(t=>[r.COMMENT,t.id])),k(r.EPISODE,(t=>{let e=t.id;return(t.context||t.play)&&(e+=E({context:t.context,play:t.play})),[r.EPISODE,e]})),k(r.SHOW,(t=>[r.SHOW,t.id])),k(r.LIVE,(t=>[r.LIVE,t.id])),k(r.ROOM,(t=>[r.ROOM,t.id])),k(r.EXPRESSION,(t=>[r.EXPRESSION,t.id])),k(r.CONCEPT,(t=>[r.CONCEPT,t.id])),k(r.CONCERT,(t=>[r.CONCERT,t.id])),k(r.SOCIAL_SESSION,(t=>[r.SOCIAL_SESSION,t.id])),k(r.JAM,(t=>{const e=[r.JAM];return t.contextType&&t.id&&e.push(t.contextType,t.id),t.play&&e.push("play"),e})),k(r.INTERRUPTION,(t=>[r.INTERRUPTION,t.id])),k(r.MERCH,(t=>[r.MERCH,t.id])),k(r.MERCHHUB,(()=>[r.MERCHHUB])),k(r.PRERELEASE,(t=>[r.PRERELEASE,t.id])),k(r.UNKNOWN,((t,e)=>b(t.args,e))),k(r.MEDIA,(t=>[r.MEDIA,t.id])),k(r.POLL,(t=>[r.POLL,t.id])),k(r.QUESTION,(t=>[r.QUESTION,t.id])),k(r.RESPONSE,(t=>[r.RESPONSE,t.id])),k(r.FESTIVAL,(t=>[r.FESTIVAL,t.id])),k(r.TOUR,(t=>[r.TOUR,t.id])),k(r.CULTURAL_MOMENT,(t=>[r.CULTURAL_MOMENT,p.HUB,t.id])),k(r.VENUE,(t=>[r.VENUE,t.id])),k(r.VIDEO,(t=>[r.VIDEO,t.id])),k(r.CANVAS,(t=>[r.CANVAS,t.id])),k(r.COURSE,(t=>[r.COURSE,t.id])),k(r.LESSON,(t=>[r.LESSON,t.id])),k(r.PROMOTER,(t=>[r.PROMOTER,t.id]));const I="0123456789abcdef",R="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",M=[];M.length=256;for(let t=0;t<256;t++)M[t]=I[t>>4]+I[15&t];const F=[];F.length=128;for(let t=0;t<62;++t)F[R.charCodeAt(t)]=t;const D=[];for(let t=0;t<16;t++)D[I.charCodeAt(t)]=t;for(let t=0;t<6;t++)D["ABCDEF".charCodeAt(t)]=10+t;const V="function"==typeof Object.assign?(t,e)=>{Object.assign(t,e)}:(t,e)=>{for(const n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};class B{constructor(t,e={}){this.type=t,this.hasBase62Id=!!e.hasBase62Id,V(this,e)}toURI(){return`spotify:${N(this,o.URI).join(":")}`}toString(){return this.toURI()}toURLPath(t=!1){let e=N(this,o.URL);e[0]===p.APP&&e.shift();const n=e[0]===r.TRACKSET,i=e[0]===r.LOCAL_TRACK;if(!n&&!i){const t=[];for(let n=0,r=e.length;n{"use strict";const t={AD:"ad",ALBUM:"album",GENRE:"genre",QUEUE:"queue",APPLICATION:"application",ARTIST:"artist",ARTIST_TOPLIST:"artist-toplist",ARTIST_CONCERTS:"artist-concerts",AUDIO_FILE:"audiofile",COLLECTION:"collection",COLLECTION_ALBUM:"collection-album",COLLECTION_ARTIST:"collection-artist",COLLECTION_MISSING_ALBUM:"collection-missing-album",COLLECTION_TRACK_LIST:"collectiontracklist",COMMENT:"comment",CONCEPT:"concept",CONCERT:"concert",CONTEXT_GROUP:"context-group",CULTURAL_MOMENT:"cultural-moment",DAILY_MIX:"dailymix",EMPTY:"empty",EPISODE:"episode",FACEBOOK:"facebook",FESTIVAL:"festival",FOLDER:"folder",FOLLOWERS:"followers",FOLLOWING:"following",IMAGE:"image",INBOX:"inbox",INTERRUPTION:"interruption",LIBRARY:"library",LIVE:"live",ROOM:"room",EXPRESSION:"expression",JAM:"jam",LOCAL:"local",LOCAL_TRACK:"local",LOCAL_ALBUM:"local-album",LOCAL_ARTIST:"local-artist",MERCH:"merch",MERCHHUB:"merchhub",MOSAIC:"mosaic",PLAYLIST:"playlist",PLAYLIST_V2:"playlist-v2",PRERELEASE:"prerelease",PROFILE:"profile",PROMOTER:"promoter",PUBLISHED_ROOTLIST:"published-rootlist",RADIO:"radio",ROOTLIST:"rootlist",SEARCH:"search",SHOW:"show",SOCIAL_SESSION:"socialsession",SPECIAL:"special",STARRED:"starred",STATION:"station",TEMP_PLAYLIST:"temp-playlist",TOPLIST:"toplist",TOUR:"tour",TRACK:"track",TRACKSET:"trackset",USER_TOPLIST:"user-toplist",USER_TOP_TRACKS:"user-top-tracks",UNKNOWN:"unknown",VENUE:"venue",VIDEO:"video",MEDIA:"media",QUESTION:"question",POLL:"poll",RESPONSE:"response",COURSE:"course",LESSON:"lesson",CANVAS:"canvas"};let e=function(t){return t[t.URI=0]="URI",t[t.URL=1]="URL",t}({});const n="spotify:",r="http://play.spotify.com/",o="https://play.spotify.com/",i="http://open.spotify.com/",a="https://open.spotify.com/",s="/",c={APP:"app",FACEBOOK:"facebook",GLOBAL:"global",TOP:"top",USER:"user",CONCERTS:"concerts",HUB:"hub"};function l(e,n){return F(t.COLLECTION,{username:e,category:n})}function u(e,n,r){return F(t.JAM,{id:e,contextType:n,hasBase62Id:Boolean(e),play:Boolean(r)})}function h(e,n,r,o){return F(t.LOCAL_TRACK,{artist:e,album:n,track:r,duration:o})}function p(e,n,r){return F(t.TOPLIST,{toplist:e,country:n,global:Boolean(r)})}function f(e,n,r,o){return F(t.TRACK,{id:e,anchor:n,context:r?D(r):null,play:o,hasBase62Id:!0})}function d(t,n){if(!t)return"";let r=encodeURIComponent(t);return n===e.URI&&(r=r.replace(/%20/g,"+")),r=r.replace(/[!'()]/g,escape),r=r.replace(/\*/g,"%2A"),r}function m(t,e,n=[]){for(let r=0,o=t.length;r1&&(e+="&");const r=t[n];void 0!==r&&(e+=`${n}=${encodeURIComponent(r)}`)}return e}const y=/^intl-[A-Za-z]{2,3}(-[A-Za-z]{4})?(-([A-Za-z]{2}|[0-9]{3}))?$/;const b=()=>{const t={};return[(e,n)=>{t[e]||(t[e]=n)},t]},[_,E]=b();_(t.PLAYLIST,((e,n,{username:r})=>function(e,n){return F(t.PLAYLIST,{id:n,username:e,hasBase62Id:!0})}(r,e.getBase62IdComponent()))),_(t.FOLDER,((e,n,{username:r})=>function(e,n){return F(t.FOLDER,{id:n,username:e,hasBase62Id:!0})}(r,e.getIdComponent()))),_(t.COLLECTION_TRACK_LIST,((e,n,{username:r})=>function(e,n){return F(t.COLLECTION_TRACK_LIST,{id:n,username:e,hasBase62Id:!0})}(r,e.getIdComponent()))),_(t.COLLECTION,((e,n,{username:r})=>{const o=e.getNextComponent();if(o===t.ALBUM){const n=e.getIdComponent();return"missing"===e.getNextComponent()?function(e,n){return F(t.COLLECTION_MISSING_ALBUM,{id:n,username:e,hasBase62Id:!0})}(r,n):function(e,n){return F(t.COLLECTION_ALBUM,{id:n,username:e,hasBase62Id:!0})}(r,n)}return o===t.ARTIST?function(e,n){return F(t.COLLECTION_ARTIST,{id:n,username:e,hasBase62Id:!0})}(r,e.getIdComponent()):l(r,o)})),_(t.STARRED,((e,n,{username:r})=>function(e){return F(t.STARRED,{username:e})}(r))),_(t.FOLLOWERS,((e,n,{username:r})=>function(e){return F(t.FOLLOWERS,{username:e})}(r))),_(t.FOLLOWING,((e,n,{username:r})=>function(e){return F(t.FOLLOWING,{username:e})}(r))),_(c.TOP,((e,n,{username:r})=>function(e,n){return F(t.USER_TOPLIST,{username:e,toplist:n})}(r,e.getNextRequiredComponent()))),_(t.INBOX,((e,n,{username:r})=>function(e){return F(t.INBOX,{username:e})}(r))),_(t.ROOTLIST,((e,n,{username:r})=>function(e){return F(t.ROOTLIST,{username:e})}(r))),_(t.PUBLISHED_ROOTLIST,((e,n,{username:r})=>function(e){return F(t.PUBLISHED_ROOTLIST,{username:e})}(r))),_(t.TOPLIST,((e,n,{username:r})=>function(e){return F(t.USER_TOP_TRACKS,{username:e})}(r))),_(t.LIBRARY,((e,n,{username:r})=>function(e,n){return F(t.LIBRARY,{username:e,category:n})}(r,e.getNextComponent())));const[w,A]=b();function S(t){let c,l,u,h,p=t;const[f,d]=p.split("?");if(f&&d){p=f;const[t,e]=d.split("#");t&&(u=function(t){return t.split("&").reduce(((t,e)=>{const[n,r]=e.split("=");return n&&r&&(t[n]=decodeURIComponent(r)),t}),{})}(t),h=e)}const m=p.split("#");if(m.length>1&&(p=m.shift(),h=m.pop()),0===p.indexOf(n))c=p.slice(n.length).split(":"),l=e.URI;else{const[t]=p.split("?");if(0===t?.indexOf(r))c=t.slice(r.length).split("/");else if(0===t?.indexOf(o))c=t.slice(o.length).split("/");else if(0===t?.indexOf(i))c=t.slice(i.length).split("/");else if(0===t?.indexOf(a))c=t.slice(a.length).split("/");else{if(0!==t?.indexOf(s))throw new TypeError("Invalid Spotify URI!");c=t.slice(s.length).split("/")}l=e.URL}return h&&c.push(h),{format:l,components:c,query:u}}function C(n,r,o,i){let a=0;const s=()=>{const t=n[a++];if(t&&/\s/.test(t))throw new TypeError("Invalid Spotify URI!");return t},c=()=>{const t=s();if(!t)throw new TypeError("Invalid Spotify URI!");return t},l={getAllComponents:()=>n,getQueryParams:()=>o,getNextComponent:s,getNextRequiredComponent:c,getIdComponent:()=>{const t=c();if(t.length>22)throw new TypeError("Invalid Spotify URI!");return t},getHexIdComponent:t=>{const e=c();if(e.length!==t)throw new TypeError("Invalid Spotify URI!");if(!/^[a-fA-F0-9]+$/.test(e))throw new Error("Invalid Hex ID");return e},getBase62IdComponent:()=>{const t=c();if(22!==t.length)throw new TypeError("Invalid Spotify URI!");if(!/^[a-zA-Z0-9]+$/.test(t))throw new Error("Invalid ID");return t},getRemainingComponents:()=>n.slice(a),getRemainingString:()=>{const t=r===e.URI?":":"/";return n.slice(a).join(t)}};let u=c(),h=A[u];if(!h){const t=function(t){return y.test(t)}(u);t&&(u=c(),h=A[u])}if(h)return h(l,r,{});if(i)return A[t.UNKNOWN](l,r,{});throw new TypeError("Invalid or unknown Spotify URI!")}w(t.ALBUM,(e=>{const n=e.getBase62IdComponent(),r=e.getNextComponent();return function(e,n){return F(t.ALBUM,{id:e,disc:n,hasBase62Id:!0})}(n,r?parseInt(r,10):void 0)})),w(c.APP,((e,n)=>{const r=e.getNextRequiredComponent();if(d(g(r,n),n)!==r)throw new TypeError("Invalid or unknown Spotify URI!");const o=e.getRemainingComponents();for(let t=0,e=o.length;t{return n=e.getNextRequiredComponent(),F(t.AD,{id:n});var n})),w(t.ARTIST,(e=>{const n=e.getBase62IdComponent(),r=e.getNextComponent();return r===c.TOP?function(e,n){return F(t.ARTIST_TOPLIST,{id:e,toplist:n,hasBase62Id:!0})}(n,e.getNextRequiredComponent()):r===c.CONCERTS?function(e){return F(t.ARTIST_CONCERTS,{id:e,hasBase62Id:!0})}(n):function(e){return F(t.ARTIST,{id:e,hasBase62Id:!0})}(n)})),w(t.AUDIO_FILE,(e=>{return n=e.getNextRequiredComponent(),r=e.getNextRequiredComponent(),F(t.AUDIO_FILE,{id:r,extension:n});var n,r})),w(t.DAILY_MIX,(e=>{return n=e.getIdComponent(),F(t.DAILY_MIX,{id:n,hasBase62Id:!0});var n})),w(t.TEMP_PLAYLIST,(e=>{return n=e.getNextRequiredComponent(),r=e.getRemainingString(),F(t.TEMP_PLAYLIST,{origin:n,data:r});var n,r})),w(t.PLAYLIST,(e=>{return n=e.getBase62IdComponent(),F(t.PLAYLIST_V2,{id:n,hasBase62Id:!0});var n})),w(t.SEARCH,((e,n)=>{return r=g(e.getRemainingString(),n),F(t.SEARCH,{query:r});var r})),w(t.TRACK,(t=>{const e=t.getQueryParams();return f(t.getBase62IdComponent(),t.getNextComponent(),e?.context,e?.play)})),w(t.TRACKSET,(e=>{const n=g(e.getNextComponent());let r=e.getNextRequiredComponent();const o=e.getNextComponent();let i=parseInt(e.getNextComponent()??"",10);("%23"!==o||isNaN(i))&&(i=null);const a=[];if(r){r=g(r).split(",");for(let t=0,e=r.length;t{return n=e.getNextRequiredComponent(),r=e.getNextRequiredComponent(),F(t.CONTEXT_GROUP,{origin:n,name:r,hasBase62Id:!0});var n,r})),w(c.TOP,(t=>{const e=t.getNextRequiredComponent();return t.getNextComponent()===c.GLOBAL?p(e,void 0,!0):p(e,t.getNextComponent(),!1)})),w(t.LOCAL_TRACK,((e,n)=>{const r=g(e.getNextComponent(),n),o=e.getNextComponent(),i=g(o,n),a=e.getNextComponent(),s=g(a,n),c=e.getNextComponent(),l=c?parseInt(c,10):void 0;return void 0!==a?h(r,i,s,l):void 0!==o?(u=r,p=i,F(t.LOCAL_ALBUM,{artist:u,album:p})):function(e){return F(t.LOCAL_ARTIST,{artist:e})}(r);var u,p})),w(t.IMAGE,(e=>{return n=e.getHexIdComponent(40),F(t.IMAGE,{id:n});var n})),w(t.MOSAIC,(e=>{return n=e.getRemainingComponents(),F(t.MOSAIC,{ids:n});var n})),w(t.RADIO,(e=>{return n=e.getRemainingString(),F(t.RADIO,{args:n??""});var n})),w(t.SPECIAL,((e,n)=>{const r=e.getRemainingComponents();for(let t=0,e=r.length;t{return n=e.getRemainingComponents(),F(t.STATION,{args:n??[]});var n})),w(t.EPISODE,(e=>{const n=e.getQueryParams();return function(e,n,r){return F(t.EPISODE,{id:e,context:n?D(n):null,play:r,hasBase62Id:!0})}(e.getBase62IdComponent(),n?.context,n?.play)})),w(t.SHOW,(e=>{return n=e.getBase62IdComponent(),F(t.SHOW,{id:n,hasBase62Id:!0});var n})),w(t.LIVE,(e=>{return n=e.getIdComponent(),F(t.LIVE,{id:n,hasBase62Id:!0});var n})),w(t.ROOM,(e=>{return n=e.getIdComponent(),F(t.ROOM,{id:n,hasBase62Id:!0});var n})),w(t.EXPRESSION,(e=>{return n=e.getIdComponent(),F(t.EXPRESSION,{id:n,hasBase62Id:!0});var n})),w(t.CONCEPT,(e=>{return n=e.getIdComponent(),F(t.CONCEPT,{id:n,hasBase62Id:!0});var n})),w(t.CONCERT,(e=>{return n=e.getIdComponent(),F(t.CONCERT,{id:n,hasBase62Id:!0});var n})),w(t.MERCH,(e=>{return n=e.getIdComponent(),F(t.MERCH,{id:n,hasBase62Id:!0});var n})),w(t.MERCHHUB,(()=>F(t.MERCHHUB,{}))),w(t.PRERELEASE,(e=>{return n=e.getIdComponent(),F(t.PRERELEASE,{id:n,hasBase62Id:!0});var n})),w(t.SOCIAL_SESSION,(e=>{return n=e.getNextRequiredComponent(),F(t.SOCIAL_SESSION,{id:n,hasBase62Id:!0});var n})),w(t.JAM,(e=>{const[n,r,o,i]=e.getAllComponents();return r===t.ALBUM||r===t.ARTIST||r===t.PLAYLIST?u(o,r,!!i):u("")})),w(t.INTERRUPTION,(e=>{return n=e.getNextRequiredComponent(),F(t.INTERRUPTION,{id:n});var n})),w(t.COLLECTION,(t=>l(void 0,t.getNextComponent()))),w(t.GENRE,(e=>{return n=e.getNextRequiredComponent(),F(t.GENRE,{genre:n});var n})),w(t.QUEUE,(()=>F(t.QUEUE,{}))),w(c.USER,((e,n)=>{const r=g(e.getNextRequiredComponent(),n),o=e.getNextComponent();if(r===t.FACEBOOK&&o)return i=o,F(t.FACEBOOK,{uid:i});if(o&&E[o]){const t=E[o];if(!t)throw new TypeError("Invalid Spotify URI!");return t(e,n,{username:r})}var i;const a=e.getRemainingComponents();return function(e,n){return F(t.PROFILE,{username:e,args:n??[]})}(r,o?[o].concat(a):void 0)})),w(t.UNKNOWN,(e=>function(e){return F(t.UNKNOWN,{args:e??[]})}(e.getAllComponents()))),w(t.MEDIA,(e=>{return n=e.getIdComponent(),F(t.MEDIA,{id:n,hasBase62Id:!0});var n})),w(t.POLL,(e=>{return n=e.getIdComponent(),F(t.POLL,{id:n,hasBase62Id:!0});var n})),w(t.QUESTION,(e=>{return n=e.getIdComponent(),F(t.QUESTION,{id:n,hasBase62Id:!0});var n})),w(t.RESPONSE,(e=>{return n=e.getIdComponent(),F(t.RESPONSE,{id:n,hasBase62Id:!0});var n})),w(t.CULTURAL_MOMENT,(e=>{if(e.getNextComponent()!==c.HUB)throw new TypeError("Invalid or unknown Spotify URI!");return n=e.getIdComponent(),F(t.CULTURAL_MOMENT,{id:n});var n})),w(t.FESTIVAL,(e=>{return n=e.getIdComponent(),F(t.FESTIVAL,{id:n,hasBase62Id:!0});var n})),w(t.TOUR,(e=>{return n=e.getIdComponent(),F(t.TOUR,{id:n,hasBase62Id:!0});var n})),w(t.VENUE,(e=>{return n=e.getIdComponent(),F(t.VENUE,{id:n,hasBase62Id:!0});var n})),w(t.VIDEO,(e=>{return n=e.getIdComponent(),F(t.VIDEO,{id:n,hasBase62Id:!0});var n})),w(t.CANVAS,(e=>{return n=e.getIdComponent(),F(t.CANVAS,{id:n,hasBase62Id:!0});var n})),w(t.COURSE,(e=>{return n=e.getIdComponent(),F(t.COURSE,{id:n,hasBase62Id:!0});var n})),w(t.LESSON,(e=>{return n=e.getIdComponent(),F(t.LESSON,{id:n,hasBase62Id:!0});var n})),w(t.PROMOTER,(e=>{return n=e.getIdComponent(),F(t.PROMOTER,{id:n,hasBase62Id:!0});var n})),w(t.COMMENT,(e=>{return n=e.getIdComponent(),F(t.COMMENT,{id:n,hasBase62Id:!0});var n}));const[T,L]=(()=>{const t={};return[(e,n)=>{t[e]||(t[e]=n)},t]})();function O(t,e){const n=L[t.type];if(!n)throw new TypeError("Invalid Spotify URI!");return n(t,e)}T(t.ALBUM,(e=>{const n=[t.ALBUM,e.id];return e.disc&&n.push(e.disc),n})),T(t.AD,(e=>[t.AD,e.id])),T(t.ARTIST,(e=>[t.ARTIST,e.id])),T(t.QUEUE,(()=>[t.QUEUE])),T(t.GENRE,(e=>[t.GENRE,e.genre])),T(t.ARTIST_TOPLIST,(e=>[t.ARTIST,e.id,c.TOP,e.toplist])),T(t.ARTIST_CONCERTS,(e=>[t.ARTIST,e.id,c.CONCERTS])),T(t.DAILY_MIX,(e=>[t.DAILY_MIX,e.id])),T(t.SEARCH,((e,n)=>[t.SEARCH,d(e.query,n)])),T(t.TRACK,(e=>{let n=e.id;return(e.context||e.play)&&(n+=v({context:e.context,play:e.play})),e.anchor&&(n+=`#${e.anchor}`),[t.TRACK,n]})),T(t.TRACKSET,(e=>{let n=[];if(e.tracks)for(let t=0,r=e.tracks.length;t[c.USER,t.FACEBOOK,e.uid])),T(t.AUDIO_FILE,(e=>[t.AUDIO_FILE,e.extension,e.id])),T(t.FOLDER,((e,n)=>[c.USER,d(e.username,n),t.FOLDER,e.id])),T(t.FOLLOWERS,((e,n)=>[c.USER,d(e.username,n),t.FOLLOWERS])),T(t.FOLLOWING,((e,n)=>[c.USER,d(e.username,n),t.FOLLOWING])),T(t.PLAYLIST,((e,n)=>[c.USER,d(e.username,n),t.PLAYLIST,e.id])),T(t.PLAYLIST_V2,(e=>[t.PLAYLIST,e.id])),T(t.STARRED,((e,n)=>[c.USER,d(e.username,n),t.STARRED])),T(t.TEMP_PLAYLIST,(e=>[t.TEMP_PLAYLIST,e.origin,e.data])),T(t.CONTEXT_GROUP,(e=>[t.CONTEXT_GROUP,e.origin,e.name])),T(t.USER_TOPLIST,((t,e)=>[c.USER,d(t.username,e),c.TOP,t.toplist])),T(t.USER_TOP_TRACKS,((e,n)=>[c.USER,d(e.username,n),t.TOPLIST])),T(t.TOPLIST,(t=>[c.TOP,t.toplist].concat(t.global||!t.country?[c.GLOBAL]:["country",t.country]))),T(t.INBOX,((e,n)=>[c.USER,d(e.username,n),t.INBOX])),T(t.ROOTLIST,((e,n)=>[c.USER,d(e.username,n),t.ROOTLIST])),T(t.PUBLISHED_ROOTLIST,((e,n)=>[c.USER,d(e.username,n),t.PUBLISHED_ROOTLIST])),T(t.COLLECTION_TRACK_LIST,((e,n)=>[c.USER,d(e.username,n),t.COLLECTION_TRACK_LIST,e.id])),T(t.PROFILE,((t,e)=>t.args&&t.args.length>0?[c.USER,d(t.username,e)].concat(t.args):[c.USER,d(t.username,e)])),T(t.LOCAL_ARTIST,((e,n)=>[t.LOCAL_TRACK,d(e.artist,n)])),T(t.LOCAL_ALBUM,((e,n)=>[t.LOCAL_TRACK,d(e.artist,n),d(e.album,n)])),T(t.LOCAL_TRACK,((e,n)=>[t.LOCAL_TRACK,d(e.artist,n),d(e.album,n),d(e.track,n),e.duration])),T(t.LIBRARY,((e,n)=>[c.USER,d(e.username,n),t.LIBRARY].concat(e.category?[e.category]:[]))),T(t.IMAGE,(e=>[t.IMAGE,e.id])),T(t.MOSAIC,(e=>{let n=[];return e.ids&&(n=e.ids.slice(0)),n.unshift(t.MOSAIC),n})),T(t.RADIO,((e,n)=>m(e.args,n,[t.RADIO]))),T(t.SPECIAL,((e,n)=>m(e.args,n,[t.SPECIAL]))),T(t.STATION,((e,n)=>m(e.args,n,[t.STATION]))),T(t.APPLICATION,((t,e)=>m(t.args,e,[c.APP,t.id]))),T(t.COLLECTION_ALBUM,((e,n)=>[c.USER,d(e.username,n),t.COLLECTION,t.ALBUM,e.id])),T(t.COLLECTION_MISSING_ALBUM,((e,n)=>[c.USER,d(e.username,n),t.COLLECTION,t.ALBUM,e.id,"missing"])),T(t.COLLECTION_ARTIST,((e,n)=>[c.USER,d(e.username,n),t.COLLECTION,t.ARTIST,e.id])),T(t.COLLECTION,((e,n)=>{const r=[t.COLLECTION].concat(e.category?[e.category]:[]);return e.username?[c.USER,d(e.username,n)].concat(r):r})),T(t.COMMENT,(e=>[t.COMMENT,e.id])),T(t.EPISODE,(e=>{let n=e.id;return(e.context||e.play)&&(n+=v({context:e.context,play:e.play})),[t.EPISODE,n]})),T(t.SHOW,(e=>[t.SHOW,e.id])),T(t.LIVE,(e=>[t.LIVE,e.id])),T(t.ROOM,(e=>[t.ROOM,e.id])),T(t.EXPRESSION,(e=>[t.EXPRESSION,e.id])),T(t.CONCEPT,(e=>[t.CONCEPT,e.id])),T(t.CONCERT,(e=>[t.CONCERT,e.id])),T(t.SOCIAL_SESSION,(e=>[t.SOCIAL_SESSION,e.id])),T(t.JAM,(e=>{const n=[t.JAM];return e.contextType&&e.id&&n.push(e.contextType,e.id),e.play&&n.push("play"),n})),T(t.INTERRUPTION,(e=>[t.INTERRUPTION,e.id])),T(t.MERCH,(e=>[t.MERCH,e.id])),T(t.MERCHHUB,(()=>[t.MERCHHUB])),T(t.PRERELEASE,(e=>[t.PRERELEASE,e.id])),T(t.UNKNOWN,((t,e)=>m(t.args,e))),T(t.MEDIA,(e=>[t.MEDIA,e.id])),T(t.POLL,(e=>[t.POLL,e.id])),T(t.QUESTION,(e=>[t.QUESTION,e.id])),T(t.RESPONSE,(e=>[t.RESPONSE,e.id])),T(t.FESTIVAL,(e=>[t.FESTIVAL,e.id])),T(t.TOUR,(e=>[t.TOUR,e.id])),T(t.CULTURAL_MOMENT,(e=>[t.CULTURAL_MOMENT,c.HUB,e.id])),T(t.VENUE,(e=>[t.VENUE,e.id])),T(t.VIDEO,(e=>[t.VIDEO,e.id])),T(t.CANVAS,(e=>[t.CANVAS,e.id])),T(t.COURSE,(e=>[t.COURSE,e.id])),T(t.LESSON,(e=>[t.LESSON,e.id])),T(t.PROMOTER,(e=>[t.PROMOTER,e.id]));const x="0123456789abcdef",k="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",P=[];P.length=256;for(let t=0;t<256;t++)P[t]=x[t>>4]+x[15&t];const N=[];N.length=128;for(let t=0;t<62;++t)N[k.charCodeAt(t)]=t;const I=[];for(let t=0;t<16;t++)I[x.charCodeAt(t)]=t;for(let t=0;t<6;t++)I["ABCDEF".charCodeAt(t)]=10+t;const R="function"==typeof Object.assign?(t,e)=>{Object.assign(t,e)}:(t,e)=>{for(const n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};class M{constructor(t,e={}){this.type=t,this.hasBase62Id=!!e.hasBase62Id,R(this,e)}toURI(){return`spotify:${O(this,e.URI).join(":")}`}toString(){return this.toURI()}toURLPath(n=!1){let r=O(this,e.URL);r[0]===c.APP&&r.shift();const o=r[0]===t.TRACKSET,i=r[0]===t.LOCAL_TRACK;if(!o&&!i){const t=[];for(let e=0,n=r.length;e0&&n[1]||""},t.getSecondMatch=function(t,e){var n=e.match(t);return n&&n.length>1&&n[2]||""},t.matchAndReturnConst=function(t,e,n){if(t.test(e))return n},t.getWindowsVersionName=function(t){switch(t){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},t.getMacOSVersionName=function(t){var e=t.split(".").splice(0,2).map((function(t){return parseInt(t,10)||0}));if(e.push(0),10===e[0])switch(e[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},t.getAndroidVersionName=function(t){var e=t.split(".").splice(0,2).map((function(t){return parseInt(t,10)||0}));if(e.push(0),!(1===e[0]&&e[1]<5))return 1===e[0]&&e[1]<6?"Cupcake":1===e[0]&&e[1]>=6?"Donut":2===e[0]&&e[1]<2?"Eclair":2===e[0]&&2===e[1]?"Froyo":2===e[0]&&e[1]>2?"Gingerbread":3===e[0]?"Honeycomb":4===e[0]&&e[1]<1?"Ice Cream Sandwich":4===e[0]&&e[1]<4?"Jelly Bean":4===e[0]&&e[1]>=4?"KitKat":5===e[0]?"Lollipop":6===e[0]?"Marshmallow":7===e[0]?"Nougat":8===e[0]?"Oreo":9===e[0]?"Pie":void 0},t.getVersionPrecision=function(t){return t.split(".").length},t.compareVersions=function(e,n,r){void 0===r&&(r=!1);var o=t.getVersionPrecision(e),i=t.getVersionPrecision(n),a=Math.max(o,i),s=0,c=t.map([e,n],(function(e){var n=a-t.getVersionPrecision(e),r=e+new Array(n+1).join(".0");return t.map(r.split("."),(function(t){return new Array(20-t.length).join("0")+t})).reverse()}));for(r&&(s=a-Math.min(o,i)),a-=1;a>=s;){if(c[0][a]>c[1][a])return 1;if(c[0][a]===c[1][a]){if(a===s)return 0;a-=1}else if(c[0][a]1?o-1:0),a=1;a0){var a=Object.keys(n),c=s.default.find(a,(function(t){return e.isOS(t)}));if(c){var l=this.satisfies(n[c]);if(void 0!==l)return l}var u=s.default.find(a,(function(t){return e.isPlatform(t)}));if(u){var h=this.satisfies(n[u]);if(void 0!==h)return h}}if(i>0){var p=Object.keys(o),f=s.default.find(p,(function(t){return e.isBrowser(t,!0)}));if(void 0!==f)return this.compareVersion(o[f])}},e.isBrowser=function(t,e){void 0===e&&(e=!1);var n=this.getBrowserName().toLowerCase(),r=t.toLowerCase(),o=s.default.getBrowserTypeByAlias(r);return e&&o&&(r=o.toLowerCase()),r===n},e.compareVersion=function(t){var e=[0],n=t,r=!1,o=this.getBrowserVersion();if("string"==typeof o)return">"===t[0]||"<"===t[0]?(n=t.substr(1),"="===t[1]?(r=!0,n=t.substr(2)):e=[],">"===t[0]?e.push(1):e.push(-1)):"="===t[0]?n=t.substr(1):"~"===t[0]&&(r=!0,n=t.substr(1)),e.indexOf(s.default.compareVersions(o,n,r))>-1},e.isOS=function(t){return this.getOSName(!0)===String(t).toLowerCase()},e.isPlatform=function(t){return this.getPlatformType(!0)===String(t).toLowerCase()},e.isEngine=function(t){return this.getEngineName(!0)===String(t).toLowerCase()},e.is=function(t,e){return void 0===e&&(e=!1),this.isBrowser(t,e)||this.isOS(t)||this.isPlatform(t)},e.some=function(t){var e=this;return void 0===t&&(t=[]),t.some((function(t){return e.is(t)}))},t}();e.default=l,t.exports=e.default},92:function(t,e,n){"use strict";e.__esModule=!0,e.default=void 0;var r,o=(r=n(17))&&r.__esModule?r:{default:r},i=/version\/(\d+(\.?_?\d+)+)/i,a=[{test:[/googlebot/i],describe:function(t){var e={name:"Googlebot"},n=o.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,t)||o.default.getFirstMatch(i,t);return n&&(e.version=n),e}},{test:[/opera/i],describe:function(t){var e={name:"Opera"},n=o.default.getFirstMatch(i,t)||o.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/opr\/|opios/i],describe:function(t){var e={name:"Opera"},n=o.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,t)||o.default.getFirstMatch(i,t);return n&&(e.version=n),e}},{test:[/SamsungBrowser/i],describe:function(t){var e={name:"Samsung Internet for Android"},n=o.default.getFirstMatch(i,t)||o.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/Whale/i],describe:function(t){var e={name:"NAVER Whale Browser"},n=o.default.getFirstMatch(i,t)||o.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/MZBrowser/i],describe:function(t){var e={name:"MZ Browser"},n=o.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,t)||o.default.getFirstMatch(i,t);return n&&(e.version=n),e}},{test:[/focus/i],describe:function(t){var e={name:"Focus"},n=o.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,t)||o.default.getFirstMatch(i,t);return n&&(e.version=n),e}},{test:[/swing/i],describe:function(t){var e={name:"Swing"},n=o.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,t)||o.default.getFirstMatch(i,t);return n&&(e.version=n),e}},{test:[/coast/i],describe:function(t){var e={name:"Opera Coast"},n=o.default.getFirstMatch(i,t)||o.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(t){var e={name:"Opera Touch"},n=o.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,t)||o.default.getFirstMatch(i,t);return n&&(e.version=n),e}},{test:[/yabrowser/i],describe:function(t){var e={name:"Yandex Browser"},n=o.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,t)||o.default.getFirstMatch(i,t);return n&&(e.version=n),e}},{test:[/ucbrowser/i],describe:function(t){var e={name:"UC Browser"},n=o.default.getFirstMatch(i,t)||o.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/Maxthon|mxios/i],describe:function(t){var e={name:"Maxthon"},n=o.default.getFirstMatch(i,t)||o.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/epiphany/i],describe:function(t){var e={name:"Epiphany"},n=o.default.getFirstMatch(i,t)||o.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/puffin/i],describe:function(t){var e={name:"Puffin"},n=o.default.getFirstMatch(i,t)||o.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/sleipnir/i],describe:function(t){var e={name:"Sleipnir"},n=o.default.getFirstMatch(i,t)||o.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/k-meleon/i],describe:function(t){var e={name:"K-Meleon"},n=o.default.getFirstMatch(i,t)||o.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/micromessenger/i],describe:function(t){var e={name:"WeChat"},n=o.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,t)||o.default.getFirstMatch(i,t);return n&&(e.version=n),e}},{test:[/qqbrowser/i],describe:function(t){var e={name:/qqbrowserlite/i.test(t)?"QQ Browser Lite":"QQ Browser"},n=o.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,t)||o.default.getFirstMatch(i,t);return n&&(e.version=n),e}},{test:[/msie|trident/i],describe:function(t){var e={name:"Internet Explorer"},n=o.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/\sedg\//i],describe:function(t){var e={name:"Microsoft Edge"},n=o.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/edg([ea]|ios)/i],describe:function(t){var e={name:"Microsoft Edge"},n=o.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/vivaldi/i],describe:function(t){var e={name:"Vivaldi"},n=o.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/seamonkey/i],describe:function(t){var e={name:"SeaMonkey"},n=o.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/sailfish/i],describe:function(t){var e={name:"Sailfish"},n=o.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,t);return n&&(e.version=n),e}},{test:[/silk/i],describe:function(t){var e={name:"Amazon Silk"},n=o.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/phantom/i],describe:function(t){var e={name:"PhantomJS"},n=o.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/slimerjs/i],describe:function(t){var e={name:"SlimerJS"},n=o.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(t){var e={name:"BlackBerry"},n=o.default.getFirstMatch(i,t)||o.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/(web|hpw)[o0]s/i],describe:function(t){var e={name:"WebOS Browser"},n=o.default.getFirstMatch(i,t)||o.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/bada/i],describe:function(t){var e={name:"Bada"},n=o.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/tizen/i],describe:function(t){var e={name:"Tizen"},n=o.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,t)||o.default.getFirstMatch(i,t);return n&&(e.version=n),e}},{test:[/qupzilla/i],describe:function(t){var e={name:"QupZilla"},n=o.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,t)||o.default.getFirstMatch(i,t);return n&&(e.version=n),e}},{test:[/firefox|iceweasel|fxios/i],describe:function(t){var e={name:"Firefox"},n=o.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/electron/i],describe:function(t){var e={name:"Electron"},n=o.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/MiuiBrowser/i],describe:function(t){var e={name:"Miui"},n=o.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/chromium/i],describe:function(t){var e={name:"Chromium"},n=o.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,t)||o.default.getFirstMatch(i,t);return n&&(e.version=n),e}},{test:[/chrome|crios|crmo/i],describe:function(t){var e={name:"Chrome"},n=o.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/GSA/i],describe:function(t){var e={name:"Google Search"},n=o.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:function(t){var e=!t.test(/like android/i),n=t.test(/android/i);return e&&n},describe:function(t){var e={name:"Android Browser"},n=o.default.getFirstMatch(i,t);return n&&(e.version=n),e}},{test:[/playstation 4/i],describe:function(t){var e={name:"PlayStation 4"},n=o.default.getFirstMatch(i,t);return n&&(e.version=n),e}},{test:[/safari|applewebkit/i],describe:function(t){var e={name:"Safari"},n=o.default.getFirstMatch(i,t);return n&&(e.version=n),e}},{test:[/.*/i],describe:function(t){var e=-1!==t.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:o.default.getFirstMatch(e,t),version:o.default.getSecondMatch(e,t)}}}];e.default=a,t.exports=e.default},93:function(t,e,n){"use strict";e.__esModule=!0,e.default=void 0;var r,o=(r=n(17))&&r.__esModule?r:{default:r},i=n(18),a=[{test:[/Roku\/DVP/],describe:function(t){var e=o.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,t);return{name:i.OS_MAP.Roku,version:e}}},{test:[/windows phone/i],describe:function(t){var e=o.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,t);return{name:i.OS_MAP.WindowsPhone,version:e}}},{test:[/windows /i],describe:function(t){var e=o.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,t),n=o.default.getWindowsVersionName(e);return{name:i.OS_MAP.Windows,version:e,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(t){var e={name:i.OS_MAP.iOS},n=o.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,t);return n&&(e.version=n),e}},{test:[/macintosh/i],describe:function(t){var e=o.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,t).replace(/[_\s]/g,"."),n=o.default.getMacOSVersionName(e),r={name:i.OS_MAP.MacOS,version:e};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe:function(t){var e=o.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,t).replace(/[_\s]/g,".");return{name:i.OS_MAP.iOS,version:e}}},{test:function(t){var e=!t.test(/like android/i),n=t.test(/android/i);return e&&n},describe:function(t){var e=o.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,t),n=o.default.getAndroidVersionName(e),r={name:i.OS_MAP.Android,version:e};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe:function(t){var e=o.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,t),n={name:i.OS_MAP.WebOS};return e&&e.length&&(n.version=e),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(t){var e=o.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,t)||o.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,t)||o.default.getFirstMatch(/\bbb(\d+)/i,t);return{name:i.OS_MAP.BlackBerry,version:e}}},{test:[/bada/i],describe:function(t){var e=o.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,t);return{name:i.OS_MAP.Bada,version:e}}},{test:[/tizen/i],describe:function(t){var e=o.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,t);return{name:i.OS_MAP.Tizen,version:e}}},{test:[/linux/i],describe:function(){return{name:i.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:i.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(t){var e=o.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,t);return{name:i.OS_MAP.PlayStation4,version:e}}}];e.default=a,t.exports=e.default},94:function(t,e,n){"use strict";e.__esModule=!0,e.default=void 0;var r,o=(r=n(17))&&r.__esModule?r:{default:r},i=n(18),a=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(t){var e=o.default.getFirstMatch(/(can-l01)/i,t)&&"Nova",n={type:i.PLATFORMS_MAP.mobile,vendor:"Huawei"};return e&&(n.model=e),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet}}},{test:function(t){var e=t.test(/ipod|iphone/i),n=t.test(/like (ipod|iphone)/i);return e&&!n},describe:function(t){var e=o.default.getFirstMatch(/(ipod|iphone)/i,t);return{type:i.PLATFORMS_MAP.mobile,vendor:"Apple",model:e}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:i.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:i.PLATFORMS_MAP.mobile}}},{test:function(t){return"blackberry"===t.getBrowserName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(t){return"bada"===t.getBrowserName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.mobile}}},{test:function(t){return"windows phone"===t.getBrowserName()},describe:function(){return{type:i.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(t){var e=Number(String(t.getOSVersion()).split(".")[0]);return"android"===t.getOSName(!0)&&e>=3},describe:function(){return{type:i.PLATFORMS_MAP.tablet}}},{test:function(t){return"android"===t.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.mobile}}},{test:function(t){return"macos"===t.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(t){return"windows"===t.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.desktop}}},{test:function(t){return"linux"===t.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.desktop}}},{test:function(t){return"playstation 4"===t.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.tv}}},{test:function(t){return"roku"===t.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.tv}}}];e.default=a,t.exports=e.default},95:function(t,e,n){"use strict";e.__esModule=!0,e.default=void 0;var r,o=(r=n(17))&&r.__esModule?r:{default:r},i=n(18),a=[{test:function(t){return"microsoft edge"===t.getBrowserName(!0)},describe:function(t){if(/\sedg\//i.test(t))return{name:i.ENGINE_MAP.Blink};var e=o.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,t);return{name:i.ENGINE_MAP.EdgeHTML,version:e}}},{test:[/trident/i],describe:function(t){var e={name:i.ENGINE_MAP.Trident},n=o.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:function(t){return t.test(/presto/i)},describe:function(t){var e={name:i.ENGINE_MAP.Presto},n=o.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:function(t){var e=t.test(/gecko/i),n=t.test(/like gecko/i);return e&&!n},describe:function(t){var e={name:i.ENGINE_MAP.Gecko},n=o.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:i.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(t){var e={name:i.ENGINE_MAP.WebKit},n=o.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}}];e.default=a,t.exports=e.default}})},6324:(t,e,n)=>{var r="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==n.g&&n.g,o=function(){function t(){this.fetch=!1,this.DOMException=r.DOMException}return t.prototype=r,new t}();!function(t){!function(e){var n=void 0!==t&&t||"undefined"!=typeof self&&self||void 0!==n&&n,r="URLSearchParams"in n,o="Symbol"in n&&"iterator"in Symbol,i="FileReader"in n&&"Blob"in n&&function(){try{return new Blob,!0}catch(t){return!1}}(),a="FormData"in n,s="ArrayBuffer"in n;if(s)var c=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],l=ArrayBuffer.isView||function(t){return t&&c.indexOf(Object.prototype.toString.call(t))>-1};function u(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(t)||""===t)throw new TypeError('Invalid character in header field name: "'+t+'"');return t.toLowerCase()}function h(t){return"string"!=typeof t&&(t=String(t)),t}function p(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return o&&(e[Symbol.iterator]=function(){return e}),e}function f(t){this.map={},t instanceof f?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function d(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function m(t){return new Promise((function(e,n){t.onload=function(){e(t.result)},t.onerror=function(){n(t.error)}}))}function g(t){var e=new FileReader,n=m(e);return e.readAsArrayBuffer(t),n}function v(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(t){var e;this.bodyUsed=this.bodyUsed,this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:i&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:a&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:r&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():s&&i&&((e=t)&&DataView.prototype.isPrototypeOf(e))?(this._bodyArrayBuffer=v(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(t)||l(t))?this._bodyArrayBuffer=v(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var t=d(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var t=d(this);return t||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}return this.blob().then(g)}),this.text=function(){var t,e,n,r=d(this);if(r)return r;if(this._bodyBlob)return t=this._bodyBlob,e=new FileReader,n=m(e),e.readAsText(t),n;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),n=new Array(e.length),r=0;r-1?r:n),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(o),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==e.cache&&"no-cache"!==e.cache)){var i=/([?&])_=[^&]*/;if(i.test(this.url))this.url=this.url.replace(i,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function E(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var n=t.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(r),decodeURIComponent(o))}})),e}function w(t,e){if(!(this instanceof w))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===e.statusText?"":""+e.statusText,this.headers=new f(e.headers),this.url=e.url||"",this._initBody(t)}_.prototype.clone=function(){return new _(this,{body:this._bodyInit})},y.call(_.prototype),y.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new f(this.headers),url:this.url})},w.error=function(){var t=new w(null,{status:0,statusText:""});return t.type="error",t};var A=[301,302,303,307,308];w.redirect=function(t,e){if(-1===A.indexOf(e))throw new RangeError("Invalid status code");return new w(null,{status:e,headers:{location:t}})},e.DOMException=n.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(t,e){this.message=t,this.name=e;var n=Error(t);this.stack=n.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function S(t,r){return new Promise((function(o,a){var c=new _(t,r);if(c.signal&&c.signal.aborted)return a(new e.DOMException("Aborted","AbortError"));var l=new XMLHttpRequest;function u(){l.abort()}l.onload=function(){var t,e,n={status:l.status,statusText:l.statusText,headers:(t=l.getAllResponseHeaders()||"",e=new f,t.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(t){return 0===t.indexOf("\n")?t.substr(1,t.length):t})).forEach((function(t){var n=t.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();e.append(r,o)}})),e)};n.url="responseURL"in l?l.responseURL:n.headers.get("X-Request-URL");var r="response"in l?l.response:l.responseText;setTimeout((function(){o(new w(r,n))}),0)},l.onerror=function(){setTimeout((function(){a(new TypeError("Network request failed"))}),0)},l.ontimeout=function(){setTimeout((function(){a(new TypeError("Network request failed"))}),0)},l.onabort=function(){setTimeout((function(){a(new e.DOMException("Aborted","AbortError"))}),0)},l.open(c.method,function(t){try{return""===t&&n.location.href?n.location.href:t}catch(e){return t}}(c.url),!0),"include"===c.credentials?l.withCredentials=!0:"omit"===c.credentials&&(l.withCredentials=!1),"responseType"in l&&(i?l.responseType="blob":s&&c.headers.get("Content-Type")&&-1!==c.headers.get("Content-Type").indexOf("application/octet-stream")&&(l.responseType="arraybuffer")),!r||"object"!=typeof r.headers||r.headers instanceof f?c.headers.forEach((function(t,e){l.setRequestHeader(e,t)})):Object.getOwnPropertyNames(r.headers).forEach((function(t){l.setRequestHeader(t,h(r.headers[t]))})),c.signal&&(c.signal.addEventListener("abort",u),l.onreadystatechange=function(){4===l.readyState&&c.signal.removeEventListener("abort",u)}),l.send(void 0===c._bodyInit?null:c._bodyInit)}))}S.polyfill=!0,n.fetch||(n.fetch=S,n.Headers=f,n.Request=_,n.Response=w),e.Headers=f,e.Request=_,e.Response=w,e.fetch=S}({})}(o),o.fetch.ponyfill=!0,delete o.fetch.polyfill;var i=r.fetch?r:o;(e=i.fetch).default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,t.exports=e},2067:(t,e,n)=>{e.UINT32=n(4402),e.UINT64=n(9117)},4402:function(t,e){var n;!function(r){o(Math.pow(36,5)),o(Math.pow(16,7)),o(Math.pow(10,9)),o(Math.pow(2,30)),o(36),o(16),o(10),o(2);function o(t,e){return this instanceof o?(this._low=0,this._high=0,this.remainder=null,void 0===e?a.call(this,t):"string"==typeof t?s.call(this,t,e):void i.call(this,t,e)):new o(t,e)}function i(t,e){return this._low=0|t,this._high=0|e,this}function a(t){return this._low=65535&t,this._high=t>>>16,this}function s(t,e){var n=parseInt(t,e||10);return this._low=65535&n,this._high=n>>>16,this}o.prototype.fromBits=i,o.prototype.fromNumber=a,o.prototype.fromString=s,o.prototype.toNumber=function(){return 65536*this._high+this._low},o.prototype.toString=function(t){return this.toNumber().toString(t||10)},o.prototype.add=function(t){var e=this._low+t._low,n=e>>>16;return n+=this._high+t._high,this._low=65535&e,this._high=65535&n,this},o.prototype.subtract=function(t){return this.add(t.clone().negate())},o.prototype.multiply=function(t){var e,n,r=this._high,o=this._low,i=t._high,a=t._low;return e=(n=o*a)>>>16,e+=r*a,e&=65535,e+=o*i,this._low=65535&n,this._high=65535&e,this},o.prototype.div=function(t){if(0==t._low&&0==t._high)throw Error("division by zero");if(0==t._high&&1==t._low)return this.remainder=new o(0),this;if(t.gt(this))return this.remainder=this.clone(),this._low=0,this._high=0,this;if(this.eq(t))return this.remainder=new o(0),this._low=1,this._high=0,this;for(var e=t.clone(),n=-1;!this.lt(e);)e.shiftLeft(1,!0),n++;for(this.remainder=this.clone(),this._low=0,this._high=0;n>=0;n--)e.shiftRight(1),this.remainder.lt(e)||(this.remainder.subtract(e),n>=16?this._high|=1<>>16)&65535,this},o.prototype.equals=o.prototype.eq=function(t){return this._low==t._low&&this._high==t._high},o.prototype.greaterThan=o.prototype.gt=function(t){return this._high>t._high||!(this._hight._low},o.prototype.lessThan=o.prototype.lt=function(t){return this._hight._high)&&this._low16?(this._low=this._high>>t-16,this._high=0):16==t?(this._low=this._high,this._high=0):(this._low=this._low>>t|this._high<<16-t&65535,this._high>>=t),this},o.prototype.shiftLeft=o.prototype.shiftl=function(t,e){return t>16?(this._high=this._low<>16-t,this._low=this._low<>>32-t,this._low=65535&e,this._high=e>>>16,this},o.prototype.rotateRight=o.prototype.rotr=function(t){var e=this._high<<16|this._low;return e=e>>>t|e<<32-t,this._low=65535&e,this._high=e>>>16,this},o.prototype.clone=function(){return new o(this._low,this._high)},void 0===(n=function(){return o}.apply(e,[]))||(t.exports=n)}()},9117:function(t,e){var n;!function(r){var o={16:a(Math.pow(16,5)),10:a(Math.pow(10,5)),2:a(Math.pow(2,5))},i={16:a(16),10:a(10),2:a(2)};function a(t,e,n,r){return this instanceof a?(this.remainder=null,"string"==typeof t?l.call(this,t,e):void 0===e?c.call(this,t):void s.apply(this,arguments)):new a(t,e,n,r)}function s(t,e,n,r){return void 0===n?(this._a00=65535&t,this._a16=t>>>16,this._a32=65535&e,this._a48=e>>>16,this):(this._a00=0|t,this._a16=0|e,this._a32=0|n,this._a48=0|r,this)}function c(t){return this._a00=65535&t,this._a16=t>>>16,this._a32=0,this._a48=0,this}function l(t,e){e=e||10,this._a00=0,this._a16=0,this._a32=0,this._a48=0;for(var n=o[e]||new a(Math.pow(e,5)),r=0,i=t.length;r=0&&(n.div(e),r[o]=n.remainder.toNumber().toString(t),n.gt(e));o--);return r[o-1]=n.toNumber().toString(t),r.join("")},a.prototype.add=function(t){var e=this._a00+t._a00,n=e>>>16,r=(n+=this._a16+t._a16)>>>16,o=(r+=this._a32+t._a32)>>>16;return o+=this._a48+t._a48,this._a00=65535&e,this._a16=65535&n,this._a32=65535&r,this._a48=65535&o,this},a.prototype.subtract=function(t){return this.add(t.clone().negate())},a.prototype.multiply=function(t){var e=this._a00,n=this._a16,r=this._a32,o=this._a48,i=t._a00,a=t._a16,s=t._a32,c=e*i,l=c>>>16,u=(l+=e*a)>>>16;l&=65535,u+=(l+=n*i)>>>16;var h=(u+=e*s)>>>16;return u&=65535,h+=(u+=n*a)>>>16,u&=65535,h+=(u+=r*i)>>>16,h+=e*t._a48,h&=65535,h+=n*s,h&=65535,h+=r*a,h&=65535,h+=o*i,this._a00=65535&c,this._a16=65535&l,this._a32=65535&u,this._a48=65535&h,this},a.prototype.div=function(t){if(0==t._a16&&0==t._a32&&0==t._a48){if(0==t._a00)throw Error("division by zero");if(1==t._a00)return this.remainder=new a(0),this}if(t.gt(this))return this.remainder=this.clone(),this._a00=0,this._a16=0,this._a32=0,this._a48=0,this;if(this.eq(t))return this.remainder=new a(0),this._a00=1,this._a16=0,this._a32=0,this._a48=0,this;for(var e=t.clone(),n=-1;!this.lt(e);)e.shiftLeft(1,!0),n++;for(this.remainder=this.clone(),this._a00=0,this._a16=0,this._a32=0,this._a48=0;n>=0;n--)e.shiftRight(1),this.remainder.lt(e)||(this.remainder.subtract(e),n>=48?this._a48|=1<=32?this._a32|=1<=16?this._a16|=1<>>16),this._a16=65535&t,t=(65535&~this._a32)+(t>>>16),this._a32=65535&t,this._a48=~this._a48+(t>>>16)&65535,this},a.prototype.equals=a.prototype.eq=function(t){return this._a48==t._a48&&this._a00==t._a00&&this._a32==t._a32&&this._a16==t._a16},a.prototype.greaterThan=a.prototype.gt=function(t){return this._a48>t._a48||!(this._a48t._a32||!(this._a32t._a16||!(this._a16t._a00))},a.prototype.lessThan=a.prototype.lt=function(t){return this._a48t._a48)&&(this._a32t._a32)&&(this._a16t._a16)&&this._a00=48?(this._a00=this._a48>>t-48,this._a16=0,this._a32=0,this._a48=0):t>=32?(t-=32,this._a00=65535&(this._a32>>t|this._a48<<16-t),this._a16=this._a48>>t&65535,this._a32=0,this._a48=0):t>=16?(t-=16,this._a00=65535&(this._a16>>t|this._a32<<16-t),this._a16=65535&(this._a32>>t|this._a48<<16-t),this._a32=this._a48>>t&65535,this._a48=0):(this._a00=65535&(this._a00>>t|this._a16<<16-t),this._a16=65535&(this._a16>>t|this._a32<<16-t),this._a32=65535&(this._a32>>t|this._a48<<16-t),this._a48=this._a48>>t&65535),this},a.prototype.shiftLeft=a.prototype.shiftl=function(t,e){return(t%=64)>=48?(this._a48=this._a00<=32?(t-=32,this._a48=this._a16<>16-t,this._a32=this._a00<=16?(t-=16,this._a48=this._a32<>16-t,this._a32=65535&(this._a16<>16-t),this._a16=this._a00<>16-t,this._a32=65535&(this._a32<>16-t),this._a16=65535&(this._a16<>16-t),this._a00=this._a00<=32){var e=this._a00;if(this._a00=this._a32,this._a32=e,e=this._a48,this._a48=this._a16,this._a16=e,32==t)return this;t-=32}var n=this._a48<<16|this._a32,r=this._a16<<16|this._a00,o=n<>>32-t,i=r<>>32-t;return this._a00=65535&i,this._a16=i>>>16,this._a32=65535&o,this._a48=o>>>16,this},a.prototype.rotateRight=a.prototype.rotr=function(t){if(0==(t%=64))return this;if(t>=32){var e=this._a00;if(this._a00=this._a32,this._a32=e,e=this._a48,this._a48=this._a16,this._a16=e,32==t)return this;t-=32}var n=this._a48<<16|this._a32,r=this._a16<<16|this._a00,o=n>>>t|r<<32-t,i=r>>>t|n<<32-t;return this._a00=65535&i,this._a16=i>>>16,this._a32=65535&o,this._a48=o>>>16,this},a.prototype.clone=function(){return new a(this._a00,this._a16,this._a32,this._a48)},void 0===(n=function(){return a}.apply(e,[]))||(t.exports=n)}()},3092:(t,e,n)=>{var r;!function(){"use strict";var o=!("undefined"==typeof window||!window.document||!window.document.createElement),i={canUseDOM:o,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:o&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:o&&!!window.screen};void 0===(r=function(){return i}.call(e,n,e,t))||(t.exports=r)}()},3212:t=>{"use strict";t.exports=function t(e,n){if(e===n)return!0;if(e&&n&&"object"==typeof e&&"object"==typeof n){if(e.constructor!==n.constructor)return!1;var r,o,i;if(Array.isArray(e)){if((r=e.length)!=n.length)return!1;for(o=r;0!=o--;)if(!t(e[o],n[o]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if((r=(i=Object.keys(e)).length)!==Object.keys(n).length)return!1;for(o=r;0!=o--;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=r;0!=o--;){var a=i[o];if(!t(e[a],n[a]))return!1}return!0}return e!=e&&n!=n}},2817:function(t){t.exports=function(){"use strict";function t(t){return Number.isInteger(t)&&t>=0}function e(t){this.name="ArgumentError",this.message=t}return function(n,r){if(r=r||{},"function"!=typeof n)throw new e("fetch must be a function");if("object"!=typeof r)throw new e("defaults must be an object");if(void 0!==r.retries&&!t(r.retries))throw new e("retries must be a positive integer");if(void 0!==r.retryDelay&&!t(r.retryDelay)&&"function"!=typeof r.retryDelay)throw new e("retryDelay must be a positive integer or a function returning a positive integer");if(void 0!==r.retryOn&&!Array.isArray(r.retryOn)&&"function"!=typeof r.retryOn)throw new e("retryOn property expects an array or function");var o={retries:3,retryDelay:1e3,retryOn:[]};return r=Object.assign(o,r),function(o,i){var a=r.retries,s=r.retryDelay,c=r.retryOn;if(i&&void 0!==i.retries){if(!t(i.retries))throw new e("retries must be a positive integer");a=i.retries}if(i&&void 0!==i.retryDelay){if(!t(i.retryDelay)&&"function"!=typeof i.retryDelay)throw new e("retryDelay must be a positive integer or a function returning a positive integer");s=i.retryDelay}if(i&&i.retryOn){if(!Array.isArray(i.retryOn)&&"function"!=typeof i.retryOn)throw new e("retryOn property expects an array or function");c=i.retryOn}return new Promise((function(t,e){var r=function(r){var s="undefined"!=typeof Request&&o instanceof Request?o.clone():o;n(s,i).then((function(n){if(Array.isArray(c)&&-1===c.indexOf(n.status))t(n);else if("function"==typeof c)try{return Promise.resolve(c(r,null,n)).then((function(e){e?l(r,null,n):t(n)})).catch(e)}catch(t){e(t)}else r{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function o(t,e){for(var n=0;n1?r-1:0),i=1;i element.");return l.cloneElement(e,{ref:function(n){var r=t.props.containerElements;e&&("function"==typeof e.ref?e.ref(n):e.ref&&(e.ref.current=n)),t.focusTrapElements=r||[n]}})}return null}}])&&o(e.prototype,n),r&&o(e,r),Object.defineProperty(e,"prototype",{writable:!1}),u}(l.Component),d="undefined"==typeof Element?Function:Element;f.propTypes={active:u.bool,paused:u.bool,focusTrapOptions:u.shape({document:u.object,onActivate:u.func,onPostActivate:u.func,checkCanFocusTrap:u.func,onDeactivate:u.func,onPostDeactivate:u.func,checkCanReturnFocus:u.func,initialFocus:u.oneOfType([u.instanceOf(d),u.string,u.bool,u.func]),fallbackFocus:u.oneOfType([u.instanceOf(d),u.string,u.func]),escapeDeactivates:u.oneOfType([u.bool,u.func]),clickOutsideDeactivates:u.oneOfType([u.bool,u.func]),returnFocusOnDeactivate:u.bool,setReturnFocus:u.oneOfType([u.instanceOf(d),u.string,u.bool,u.func]),allowOutsideClick:u.oneOfType([u.bool,u.func]),preventScroll:u.bool,tabbableOptions:u.shape({displayCheck:u.oneOf(["full","non-zero-area","none"]),getShadowRoot:u.oneOfType([u.bool,u.func])})}),containerElements:u.arrayOf(u.instanceOf(d)),children:u.oneOfType([u.element,u.instanceOf(d)])},f.defaultProps={active:!0,paused:!1,focusTrapOptions:{},_createFocusTrap:h},t.exports=f},1912:(t,e,n)=>{"use strict";n.r(e),n.d(e,{createFocusTrap:()=>f});var r=n(9069);function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function i(t){for(var e=1;e0){var e=s[s.length-1];e!==t&&e.pause()}var n=s.indexOf(t);-1===n||s.splice(n,1),s.push(t)},deactivateTrap:function(t){var e=s.indexOf(t);-1!==e&&s.splice(e,1),s.length>0&&s[s.length-1].unpause()}}),l=function(t){return setTimeout(t,0)},u=function(t,e){var n=-1;return t.every((function(t,r){return!e(t)||(n=r,!1)})),n},h=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r1?n-1:0),i=1;i=0)t=o.activeElement;else{var e=s.tabbableGroups[0];t=e&&e.firstTabbableNode||m("fallbackFocus")}if(!t)throw new Error("Your focus-trap needs to have at least one focusable element");return t},v=function(){if(s.containerGroups=s.containers.map((function(t){var e=(0,r.tabbable)(t,a.tabbableOptions),n=(0,r.focusable)(t,a.tabbableOptions);return{container:t,tabbableNodes:e,focusableNodes:n,firstTabbableNode:e.length>0?e[0]:null,lastTabbableNode:e.length>0?e[e.length-1]:null,nextTabbableNode:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=n.findIndex((function(e){return e===t}));if(!(o<0))return e?n.slice(o+1).find((function(t){return(0,r.isTabbable)(t,a.tabbableOptions)})):n.slice(0,o).reverse().find((function(t){return(0,r.isTabbable)(t,a.tabbableOptions)}))}}})),s.tabbableGroups=s.containerGroups.filter((function(t){return t.tabbableNodes.length>0})),s.tabbableGroups.length<=0&&!m("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},y=function t(e){!1!==e&&e!==o.activeElement&&(e&&e.focus?(e.focus({preventScroll:!!a.preventScroll}),s.mostRecentlyFocusedNode=e,function(t){return t.tagName&&"input"===t.tagName.toLowerCase()&&"function"==typeof t.select}(e)&&e.select()):t(g()))},b=function(t){var e=m("setReturnFocus",t);return e||!1!==e&&t},_=function(t){var e=p(t);d(e)>=0||(h(a.clickOutsideDeactivates,t)?n.deactivate({returnFocus:a.returnFocusOnDeactivate&&!(0,r.isFocusable)(e,a.tabbableOptions)}):h(a.allowOutsideClick,t)||t.preventDefault())},E=function(t){var e=p(t),n=d(e)>=0;n||e instanceof Document?n&&(s.mostRecentlyFocusedNode=e):(t.stopImmediatePropagation(),y(s.mostRecentlyFocusedNode||g()))},w=function(t){if(function(t){return"Escape"===t.key||"Esc"===t.key||27===t.keyCode}(t)&&!1!==h(a.escapeDeactivates,t))return t.preventDefault(),void n.deactivate();(function(t){return"Tab"===t.key||9===t.keyCode})(t)&&function(t){var e=p(t);v();var n=null;if(s.tabbableGroups.length>0){var o=d(e),i=o>=0?s.containerGroups[o]:void 0;if(o<0)n=t.shiftKey?s.tabbableGroups[s.tabbableGroups.length-1].lastTabbableNode:s.tabbableGroups[0].firstTabbableNode;else if(t.shiftKey){var c=u(s.tabbableGroups,(function(t){var n=t.firstTabbableNode;return e===n}));if(c<0&&(i.container===e||(0,r.isFocusable)(e,a.tabbableOptions)&&!(0,r.isTabbable)(e,a.tabbableOptions)&&!i.nextTabbableNode(e,!1))&&(c=o),c>=0){var l=0===c?s.tabbableGroups.length-1:c-1;n=s.tabbableGroups[l].lastTabbableNode}}else{var h=u(s.tabbableGroups,(function(t){var n=t.lastTabbableNode;return e===n}));if(h<0&&(i.container===e||(0,r.isFocusable)(e,a.tabbableOptions)&&!(0,r.isTabbable)(e,a.tabbableOptions)&&!i.nextTabbableNode(e))&&(h=o),h>=0){var f=h===s.tabbableGroups.length-1?0:h+1;n=s.tabbableGroups[f].firstTabbableNode}}}else n=m("fallbackFocus");n&&(t.preventDefault(),y(n))}(t)},A=function(t){var e=p(t);d(e)>=0||h(a.clickOutsideDeactivates,t)||h(a.allowOutsideClick,t)||(t.preventDefault(),t.stopImmediatePropagation())},S=function(){if(s.active)return c.activateTrap(n),s.delayInitialFocusTimer=a.delayInitialFocus?l((function(){y(g())})):y(g()),o.addEventListener("focusin",E,!0),o.addEventListener("mousedown",_,{capture:!0,passive:!1}),o.addEventListener("touchstart",_,{capture:!0,passive:!1}),o.addEventListener("click",A,{capture:!0,passive:!1}),o.addEventListener("keydown",w,{capture:!0,passive:!1}),n},C=function(){if(s.active)return o.removeEventListener("focusin",E,!0),o.removeEventListener("mousedown",_,!0),o.removeEventListener("touchstart",_,!0),o.removeEventListener("click",A,!0),o.removeEventListener("keydown",w,!0),n};return(n={get active(){return s.active},get paused(){return s.paused},activate:function(t){if(s.active)return this;var e=f(t,"onActivate"),n=f(t,"onPostActivate"),r=f(t,"checkCanFocusTrap");r||v(),s.active=!0,s.paused=!1,s.nodeFocusedBeforeActivation=o.activeElement,e&&e();var i=function(){r&&v(),S(),n&&n()};return r?(r(s.containers.concat()).then(i,i),this):(i(),this)},deactivate:function(t){if(!s.active)return this;var e=i({onDeactivate:a.onDeactivate,onPostDeactivate:a.onPostDeactivate,checkCanReturnFocus:a.checkCanReturnFocus},t);clearTimeout(s.delayInitialFocusTimer),s.delayInitialFocusTimer=void 0,C(),s.active=!1,s.paused=!1,c.deactivateTrap(n);var r=f(e,"onDeactivate"),o=f(e,"onPostDeactivate"),u=f(e,"checkCanReturnFocus"),h=f(e,"returnFocus","returnFocusOnDeactivate");r&&r();var p=function(){l((function(){h&&y(b(s.nodeFocusedBeforeActivation)),o&&o()}))};return h&&u?(u(b(s.nodeFocusedBeforeActivation)).then(p,p),this):(p(),this)},pause:function(){return s.paused||!s.active||(s.paused=!0,C()),this},unpause:function(){return s.paused&&s.active?(s.paused=!1,v(),S(),this):this},updateContainerElements:function(t){var e=[].concat(t).filter(Boolean);return s.containers=e.map((function(t){return"string"==typeof t?o.querySelector(t):t})),s.active&&v(),this}}).updateContainerElements(t),n}},1035:(t,e,n)=>{"use strict";var r=n(5959),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function c(t){return r.isMemo(t)?a:s[t.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var l=Object.defineProperty,u=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,d=Object.prototype;t.exports=function t(e,n,r){if("string"!=typeof n){if(d){var o=f(n);o&&o!==d&&t(e,o,r)}var a=u(n);h&&(a=a.concat(h(n)));for(var s=c(e),m=c(n),g=0;g{t.exports=n;var e=null;try{e=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(t){}function n(t,e,n){this.low=0|t,this.high=0|e,this.unsigned=!!n}function r(t){return!0===(t&&t.__isLong__)}n.prototype.__isLong__,Object.defineProperty(n.prototype,"__isLong__",{value:!0}),n.isLong=r;var o={},i={};function a(t,e){var n,r,a;return e?(a=0<=(t>>>=0)&&t<256)&&(r=i[t])?r:(n=c(t,(0|t)<0?-1:0,!0),a&&(i[t]=n),n):(a=-128<=(t|=0)&&t<128)&&(r=o[t])?r:(n=c(t,t<0?-1:0,!1),a&&(o[t]=n),n)}function s(t,e){if(isNaN(t))return e?v:g;if(e){if(t<0)return v;if(t>=f)return w}else{if(t<=-d)return A;if(t+1>=d)return E}return t<0?s(-t,e).neg():c(t%p|0,t/p|0,e)}function c(t,e,r){return new n(t,e,r)}n.fromInt=a,n.fromNumber=s,n.fromBits=c;var l=Math.pow;function u(t,e,n){if(0===t.length)throw Error("empty string");if("NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return g;if("number"==typeof e?(n=e,e=!1):e=!!e,(n=n||10)<2||360)throw Error("interior hyphen");if(0===r)return u(t.substring(1),e,n).neg();for(var o=s(l(n,8)),i=g,a=0;a>>0:this.low},S.toNumber=function(){return this.unsigned?(this.high>>>0)*p+(this.low>>>0):this.high*p+(this.low>>>0)},S.toString=function(t){if((t=t||10)<2||36>>0).toString(t);if((i=c).isZero())return u+a;for(;u.length<6;)u="0"+u;a=""+u+a}},S.getHighBits=function(){return this.high},S.getHighBitsUnsigned=function(){return this.high>>>0},S.getLowBits=function(){return this.low},S.getLowBitsUnsigned=function(){return this.low>>>0},S.getNumBitsAbs=function(){if(this.isNegative())return this.eq(A)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,e=31;e>0&&0==(t&1<=0},S.isOdd=function(){return 1==(1&this.low)},S.isEven=function(){return 0==(1&this.low)},S.equals=function(t){return r(t)||(t=h(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&(this.high===t.high&&this.low===t.low)},S.eq=S.equals,S.notEquals=function(t){return!this.eq(t)},S.neq=S.notEquals,S.ne=S.notEquals,S.lessThan=function(t){return this.comp(t)<0},S.lt=S.lessThan,S.lessThanOrEqual=function(t){return this.comp(t)<=0},S.lte=S.lessThanOrEqual,S.le=S.lessThanOrEqual,S.greaterThan=function(t){return this.comp(t)>0},S.gt=S.greaterThan,S.greaterThanOrEqual=function(t){return this.comp(t)>=0},S.gte=S.greaterThanOrEqual,S.ge=S.greaterThanOrEqual,S.compare=function(t){if(r(t)||(t=h(t)),this.eq(t))return 0;var e=this.isNegative(),n=t.isNegative();return e&&!n?-1:!e&&n?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},S.comp=S.compare,S.negate=function(){return!this.unsigned&&this.eq(A)?A:this.not().add(y)},S.neg=S.negate,S.add=function(t){r(t)||(t=h(t));var e=this.high>>>16,n=65535&this.high,o=this.low>>>16,i=65535&this.low,a=t.high>>>16,s=65535&t.high,l=t.low>>>16,u=0,p=0,f=0,d=0;return f+=(d+=i+(65535&t.low))>>>16,p+=(f+=o+l)>>>16,u+=(p+=n+s)>>>16,u+=e+a,c((f&=65535)<<16|(d&=65535),(u&=65535)<<16|(p&=65535),this.unsigned)},S.subtract=function(t){return r(t)||(t=h(t)),this.add(t.neg())},S.sub=S.subtract,S.multiply=function(t){if(this.isZero())return g;if(r(t)||(t=h(t)),e)return c(e.mul(this.low,this.high,t.low,t.high),e.get_high(),this.unsigned);if(t.isZero())return g;if(this.eq(A))return t.isOdd()?A:g;if(t.eq(A))return this.isOdd()?A:g;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(m)&&t.lt(m))return s(this.toNumber()*t.toNumber(),this.unsigned);var n=this.high>>>16,o=65535&this.high,i=this.low>>>16,a=65535&this.low,l=t.high>>>16,u=65535&t.high,p=t.low>>>16,f=65535&t.low,d=0,v=0,y=0,b=0;return y+=(b+=a*f)>>>16,v+=(y+=i*f)>>>16,y&=65535,v+=(y+=a*p)>>>16,d+=(v+=o*f)>>>16,v&=65535,d+=(v+=i*p)>>>16,v&=65535,d+=(v+=a*u)>>>16,d+=n*f+o*p+i*u+a*l,c((y&=65535)<<16|(b&=65535),(d&=65535)<<16|(v&=65535),this.unsigned)},S.mul=S.multiply,S.divide=function(t){if(r(t)||(t=h(t)),t.isZero())throw Error("division by zero");var n,o,i;if(e)return this.unsigned||-2147483648!==this.high||-1!==t.low||-1!==t.high?c((this.unsigned?e.div_u:e.div_s)(this.low,this.high,t.low,t.high),e.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?v:g;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return v;if(t.gt(this.shru(1)))return b;i=v}else{if(this.eq(A))return t.eq(y)||t.eq(_)?A:t.eq(A)?y:(n=this.shr(1).div(t).shl(1)).eq(g)?t.isNegative()?y:_:(o=this.sub(t.mul(n)),i=n.add(o.div(t)));if(t.eq(A))return this.unsigned?v:g;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();i=g}for(o=this;o.gte(t);){n=Math.max(1,Math.floor(o.toNumber()/t.toNumber()));for(var a=Math.ceil(Math.log(n)/Math.LN2),u=a<=48?1:l(2,a-48),p=s(n),f=p.mul(t);f.isNegative()||f.gt(o);)f=(p=s(n-=u,this.unsigned)).mul(t);p.isZero()&&(p=y),i=i.add(p),o=o.sub(f)}return i},S.div=S.divide,S.modulo=function(t){return r(t)||(t=h(t)),e?c((this.unsigned?e.rem_u:e.rem_s)(this.low,this.high,t.low,t.high),e.get_high(),this.unsigned):this.sub(this.div(t).mul(t))},S.mod=S.modulo,S.rem=S.modulo,S.not=function(){return c(~this.low,~this.high,this.unsigned)},S.and=function(t){return r(t)||(t=h(t)),c(this.low&t.low,this.high&t.high,this.unsigned)},S.or=function(t){return r(t)||(t=h(t)),c(this.low|t.low,this.high|t.high,this.unsigned)},S.xor=function(t){return r(t)||(t=h(t)),c(this.low^t.low,this.high^t.high,this.unsigned)},S.shiftLeft=function(t){return r(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?c(this.low<>>32-t,this.unsigned):c(0,this.low<>>t|this.high<<32-t,this.high>>t,this.unsigned):c(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},S.shr=S.shiftRight,S.shiftRightUnsigned=function(t){if(r(t)&&(t=t.toInt()),0===(t&=63))return this;var e=this.high;return t<32?c(this.low>>>t|e<<32-t,e>>>t,this.unsigned):c(32===t?e:e>>>t-32,0,this.unsigned)},S.shru=S.shiftRightUnsigned,S.shr_u=S.shiftRightUnsigned,S.toSigned=function(){return this.unsigned?c(this.low,this.high,!1):this},S.toUnsigned=function(){return this.unsigned?this:c(this.low,this.high,!0)},S.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},S.toBytesLE=function(){var t=this.high,e=this.low;return[255&e,e>>>8&255,e>>>16&255,e>>>24,255&t,t>>>8&255,t>>>16&255,t>>>24]},S.toBytesBE=function(){var t=this.high,e=this.low;return[t>>>24,t>>>16&255,t>>>8&255,255&t,e>>>24,e>>>16&255,e>>>8&255,255&e]},n.fromBytes=function(t,e,r){return r?n.fromBytesLE(t,e):n.fromBytesBE(t,e)},n.fromBytesLE=function(t,e){return new n(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,e)},n.fromBytesBE=function(t,e){return new n(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],e)}},3638:function(t,e,n){"undefined"!=typeof navigator&&(t.exports=function(){"use strict";var t="http://www.w3.org/2000/svg",r="",o=!1,i=-999999,a=function(t){o=!!t},s=function(){return o},c=function(t){r=t},l=function(){return r};function u(t){return document.createElement(t)}function h(t,e){var n,r,o=t.length;for(n=0;n1?n[1]=1:n[1]<=0&&(n[1]=0),z(n[0],n[1],n[2])}function H(t,e){var n=U(255*t[0],255*t[1],255*t[2]);return n[2]+=e,n[2]>1?n[2]=1:n[2]<0&&(n[2]=0),z(n[0],n[1],n[2])}function q(t,e){var n=U(255*t[0],255*t[1],255*t[2]);return n[0]+=e/360,n[0]>1?n[0]-=1:n[0]<0&&(n[0]+=1),z(n[0],n[1],n[2])}!function(){var t,e,n=[];for(t=0;t<256;t+=1)e=t.toString(16),n[t]=1===e.length?"0"+e:e}();var W=function(t){v=!!t},$=function(){return v},G=function(t){y=t},K=function(){return y},Q=function(){return b},X=function(t){L=t},Y=function(){return L},Z=function(t){_=t};function J(e){return document.createElementNS(t,e)}function tt(t){return tt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tt(t)}var et=function(){var t,e,n=1,r=[],o={onmessage:function(){},postMessage:function(e){t({data:e})}},i={postMessage:function(t){o.onmessage({data:t})}};function a(e){if(window.Worker&&window.Blob&&s()){var n=new Blob(["var _workerSelf = self; self.onmessage = ",e.toString()],{type:"text/javascript"}),r=URL.createObjectURL(n);return new Worker(r)}return t=e,o}function c(){e||(e=a((function(t){function e(){function t(e,n){var a,s,c,l,u,h,p=e.length;for(s=0;s=0;e-=1)if("sh"===t[e].ty)if(t[e].ks.k.i)i(t[e].ks.k);else for(r=t[e].ks.k.length,n=0;nn[0]||!(n[0]>t[0])&&(t[1]>n[1]||!(n[1]>t[1])&&(t[2]>n[2]||!(n[2]>t[2])&&null))}var s,c=function(){var t=[4,4,14];function e(t){var e=t.t.d;t.t.d={k:[{s:e,t:0}]}}function n(t){var n,r=t.length;for(n=0;n=0;n-=1)if("sh"===t[n].ty)if(t[n].ks.k.i)t[n].ks.k.c=t[n].closed;else for(o=t[n].ks.k.length,r=0;r500)&&(this._imageLoaded(),clearInterval(n)),e+=1}.bind(this),50)}function i(e){var n=r(e,this.assetsPath,this.path),o=J("image");E?this.testImageLoaded(o):o.addEventListener("load",this._imageLoaded,!1),o.addEventListener("error",function(){i.img=t,this._imageLoaded()}.bind(this),!1),o.setAttributeNS("http://www.w3.org/1999/xlink","href",n),this._elementHelper.append?this._elementHelper.append(o):this._elementHelper.appendChild(o);var i={img:o,assetData:e};return i}function a(e){var n=r(e,this.assetsPath,this.path),o=u("img");o.crossOrigin="anonymous",o.addEventListener("load",this._imageLoaded,!1),o.addEventListener("error",function(){i.img=t,this._imageLoaded()}.bind(this),!1),o.src=n;var i={img:o,assetData:e};return i}function s(t){var e={assetData:t},n=r(t,this.assetsPath,this.path);return et.loadData(n,function(t){e.img=t,this._footageLoaded()}.bind(this),function(){e.img={},this._footageLoaded()}.bind(this)),e}function c(t,e){var n;this.imagesLoadedCb=e;var r=t.length;for(n=0;nthis.animationData.op&&(this.animationData.op=t.op,this.totalFrames=Math.floor(t.op-this.animationData.ip));var e,n,r=this.animationData.layers,o=r.length,i=t.layers,a=i.length;for(n=0;nthis.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")},ht.prototype.renderFrame=function(){if(!1!==this.isLoaded&&this.renderer)try{this.expressionsPlugin&&this.expressionsPlugin.resetFrame(),this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(t){this.triggerRenderFrameError(t)}},ht.prototype.play=function(t){t&&this.name!==t||!0===this.isPaused&&(this.isPaused=!1,this.trigger("_play"),this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},ht.prototype.pause=function(t){t&&this.name!==t||!1===this.isPaused&&(this.isPaused=!0,this.trigger("_pause"),this._idle=!0,this.trigger("_idle"),this.audioController.pause())},ht.prototype.togglePause=function(t){t&&this.name!==t||(!0===this.isPaused?this.play():this.pause())},ht.prototype.stop=function(t){t&&this.name!==t||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},ht.prototype.getMarkerData=function(t){for(var e,n=0;n=this.totalFrames-1&&this.frameModifier>0?this.loop&&this.playCount!==this.loop?e>=this.totalFrames?(this.playCount+=1,this.checkSegments(e%this.totalFrames)||(this.setCurrentRawFrameValue(e%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(e):this.checkSegments(e>this.totalFrames?e%this.totalFrames:0)||(n=!0,e=this.totalFrames-1):e<0?this.checkSegments(e%this.totalFrames)||(!this.loop||this.playCount--<=0&&!0!==this.loop?(n=!0,e=0):(this.setCurrentRawFrameValue(this.totalFrames+e%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0)):this.setCurrentRawFrameValue(e),n&&(this.setCurrentRawFrameValue(e),this.pause(),this.trigger("complete"))}},ht.prototype.adjustSegment=function(t,e){this.playCount=0,t[1]0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=t[0]-t[1],this.timeCompleted=this.totalFrames,this.firstFrame=t[1],this.setCurrentRawFrameValue(this.totalFrames-.001-e)):t[1]>t[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=t[1]-t[0],this.timeCompleted=this.totalFrames,this.firstFrame=t[0],this.setCurrentRawFrameValue(.001+e)),this.trigger("segmentStart")},ht.prototype.setSegment=function(t,e){var n=-1;this.isPaused&&(this.currentRawFrame+this.firstFramee&&(n=e-t)),this.firstFrame=t,this.totalFrames=e-t,this.timeCompleted=this.totalFrames,-1!==n&&this.goToAndStop(n,!0)},ht.prototype.playSegments=function(t,e){if(e&&(this.segments.length=0),"object"===ut(t[0])){var n,r=t.length;for(n=0;n=0;n-=1)e[n].animation.destroy(t)}function C(t,e,n){var r,o=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),i=o.length;for(r=0;r0?n=c:e=c}while(Math.abs(s)>i&&++l=o?g(t,u,e,n):0===h?u:m(t,i,i+c,e,n)}},t}(),dt=function(){function t(t){return t.concat(m(t.length))}return{double:t}}(),mt=function(t,e,n){var r=0,o=t,i=m(o);function a(){return r?i[r-=1]:e()}function s(t){r===o&&(i=dt.double(i),o*=2),n&&n(t),i[r]=t,r+=1}return{newElement:a,release:s}},gt=function(){function t(){return{addedLength:0,percents:d("float32",Y()),lengths:d("float32",Y())}}return mt(8,t)}(),vt=function(){function t(){return{lengths:[],totalLength:0}}function e(t){var e,n=t.lengths.length;for(e=0;e-.001&&a<.001}function n(n,r,o,i,a,s,c,l,u){if(0===o&&0===s&&0===u)return e(n,r,i,a,c,l);var h,p=t.sqrt(t.pow(i-n,2)+t.pow(a-r,2)+t.pow(s-o,2)),f=t.sqrt(t.pow(c-n,2)+t.pow(l-r,2)+t.pow(u-o,2)),d=t.sqrt(t.pow(c-i,2)+t.pow(l-a,2)+t.pow(u-s,2));return(h=p>f?p>d?p-f-d:d-f-p:d>f?d-f-p:f-p-d)>-1e-4&&h<1e-4}var r=function(t,e,n,r){var o,i,a,s,c,l,u=Y(),h=0,p=[],f=[],d=gt.newElement();for(a=n.length,o=0;oa?-1:1,l=!0;l;)if(r[i]<=a&&r[i+1]>a?(s=(a-r[i])/(r[i+1]-r[i]),l=!1):i+=c,i<0||i>=o-1){if(i===o-1)return n[i];l=!1}return n[i]+(n[i+1]-n[i])*s}function u(e,n,r,o,i,a){var s=l(i,a),c=1-s;return[t.round(1e3*(c*c*c*e[0]+(s*c*c+c*s*c+c*c*s)*r[0]+(s*s*c+c*s*s+s*c*s)*o[0]+s*s*s*n[0]))/1e3,t.round(1e3*(c*c*c*e[1]+(s*c*c+c*s*c+c*c*s)*r[1]+(s*s*c+c*s*s+s*c*s)*o[1]+s*s*s*n[1]))/1e3]}var h=d("float32",8);function p(e,n,r,o,i,a,s){i<0?i=0:i>1&&(i=1);var c,u=l(i,s),p=l(a=a>1?1:a,s),f=e.length,d=1-u,m=1-p,g=d*d*d,v=u*d*d*3,y=u*u*d*3,b=u*u*u,_=d*d*m,E=u*d*m+d*u*m+d*d*p,w=u*u*m+d*u*p+u*d*p,A=u*u*p,S=d*m*m,C=u*m*m+d*p*m+d*m*p,T=u*p*m+d*p*p+u*m*p,L=u*p*p,O=m*m*m,x=p*m*m+m*p*m+m*m*p,k=p*p*m+m*p*p+p*m*p,P=p*p*p;for(c=0;c=i.t-r){o.h&&(o=i),f=0;break}if(i.t-r>t){f=m;break}m=b||t<_){var w=t>=b?E.points.length-1:0;for(c=E.points[w].point.length,s=0;s=C&&S=b?(n[0]=y[0],n[1]=y[1],n[2]=y[2]):t<=_?(n[0]=o.s[0],n[1]=o.s[1],n[2]=o.s[2]):St(n,At(Ct(o.s),Ct(y),(t-_)/(b-_)));else for(m=0;m=b?l=1:t<_?l=0:(o.o.x.constructor===Array?(a.__fnct||(a.__fnct=[]),a.__fnct[m]?p=a.__fnct[m]:(T=void 0===o.o.x[m]?o.o.x[0]:o.o.x[m],L=void 0===o.o.y[m]?o.o.y[0]:o.o.y[m],O=void 0===o.i.x[m]?o.i.x[0]:o.i.x[m],x=void 0===o.i.y[m]?o.i.y[0]:o.i.y[m],p=ft.getBezierEasing(T,L,O,x).get,a.__fnct[m]=p)):a.__fnct?p=a.__fnct:(T=o.o.x,L=o.o.y,O=o.i.x,x=o.i.y,p=ft.getBezierEasing(T,L,O,x).get,o.keyframeMetadata=p),l=p((t-_)/(b-_)))),y=i.s||o.e,k=1===o.h?o.s[m]:o.s[m]+(y[m]-o.s[m])*l,"multidimensional"===this.propType?n[m]=k:n=k}return e.lastIndex=f,n}function At(t,e,n){var r,o,i,a,s,c=[],l=t[0],u=t[1],h=t[2],p=t[3],f=e[0],d=e[1],m=e[2],g=e[3];return(o=l*f+u*d+h*m+p*g)<0&&(o=-o,f=-f,d=-d,m=-m,g=-g),1-o>1e-6?(r=Math.acos(o),i=Math.sin(r),a=Math.sin((1-n)*r)/i,s=Math.sin(n*r)/i):(a=1-n,s=n),c[0]=a*l+s*f,c[1]=a*u+s*d,c[2]=a*h+s*m,c[3]=a*p+s*g,c}function St(t,e){var n=e[0],r=e[1],o=e[2],i=e[3],a=Math.atan2(2*r*i-2*n*o,1-2*r*r-2*o*o),s=Math.asin(2*n*r+2*o*i),c=Math.atan2(2*n*i-2*r*o,1-2*n*n-2*o*o);t[0]=a/O,t[1]=s/O,t[2]=c/O}function Ct(t){var e=t[0]*O,n=t[1]*O,r=t[2]*O,o=Math.cos(e/2),i=Math.cos(n/2),a=Math.cos(r/2),s=Math.sin(e/2),c=Math.sin(n/2),l=Math.sin(r/2);return[s*c*a+o*i*l,s*i*a+o*c*l,o*c*a-s*i*l,o*i*a-s*c*l]}function Tt(){var t=this.comp.renderedFrame-this.offsetTime,e=this.keyframes[0].t-this.offsetTime,n=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(t===this._caching.lastFrame||this._caching.lastFrame!==_t&&(this._caching.lastFrame>=n&&t>=n||this._caching.lastFrame=t&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var r=this.interpolateValue(t,this._caching);this.pv=r}return this._caching.lastFrame=t,this.pv}function Lt(t){var e;if("unidimensional"===this.propType)e=t*this.mult,Et(this.v-e)>1e-5&&(this.v=e,this._mdf=!0);else for(var n=0,r=this.v.length;n1e-5&&(this.v[n]=e,this._mdf=!0),n+=1}function Ot(){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var t;this.lock=!0,this._mdf=this._isFirstFrame;var e=this.effectsSequence.length,n=this.kf?this.pv:this.data.k;for(t=0;t=this._maxLength&&this.doubleArrayLength(),n){case"v":i=this.v;break;case"i":i=this.i;break;case"o":i=this.o;break;default:i=[]}(!i[r]||i[r]&&!o)&&(i[r]=Ft.newElement()),i[r][0]=t,i[r][1]=e},Dt.prototype.setTripleAt=function(t,e,n,r,o,i,a,s){this.setXYAt(t,e,"v",a,s),this.setXYAt(n,r,"o",a,s),this.setXYAt(o,i,"i",a,s)},Dt.prototype.reverse=function(){var t=new Dt;t.setPathData(this.c,this._length);var e=this.v,n=this.o,r=this.i,o=0;this.c&&(t.setTripleAt(e[0][0],e[0][1],r[0][0],r[0][1],n[0][0],n[0][1],0,!1),o=1);var i,a=this._length-1,s=this._length;for(i=o;i=f[f.length-1].t-this.offsetTime)r=f[f.length-1].s?f[f.length-1].s[0]:f[f.length-2].e[0],i=!0;else{for(var d,m,g,v=p,y=f.length-1,b=!0;b&&(d=f[v],!((m=f[v+1]).t-this.offsetTime>t));)v=m.t-this.offsetTime)u=1;else if(tr&&e>r)||(this._caching.lastIndex=o0||t>-1e-6&&t<0?r(t*e)/e:t}function R(){var t=this.props;return"matrix("+I(t[0])+","+I(t[1])+","+I(t[4])+","+I(t[5])+","+I(t[12])+","+I(t[13])+")"}return function(){this.reset=o,this.rotate=i,this.rotateX=a,this.rotateY=s,this.rotateZ=c,this.skew=u,this.skewFromAxis=h,this.shear=l,this.scale=p,this.setTransform=f,this.translate=m,this.transform=g,this.multiply=v,this.applyToPoint=w,this.applyToX=A,this.applyToY=S,this.applyToZ=C,this.applyToPointArray=k,this.applyToTriplePoints=x,this.applyToPointStringified=P,this.toCSS=N,this.to2dCSS=R,this.clone=_,this.cloneFromProps=E,this.equals=b,this.inversePoints=O,this.inversePoint=L,this.getInverseMatrix=T,this._t=this.transform,this.isIdentity=y,this._identity=!0,this._identityCalculated=!1,this.props=d("float32",16),this.reset()}}();function Ht(t){return Ht="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ht(t)}var qt={},Wt="__[STANDALONE]__",$t="__[ANIMATIONDATA]__",Gt="";function Kt(t){c(t)}function Qt(){!0===Wt?pt.searchAnimations($t,Wt,Gt):pt.searchAnimations()}function Xt(t){W(t)}function Yt(t){Z(t)}function Zt(t){return!0===Wt&&(t.animationData=JSON.parse($t)),pt.loadAnimation(t)}function Jt(t){if("string"==typeof t)switch(t){case"high":X(200);break;default:case"medium":X(50);break;case"low":X(10)}else!isNaN(t)&&t>1&&X(t);Y()>=50?k(!1):k(!0)}function te(){return"undefined"!=typeof navigator}function ee(t,e){"expressions"===t&&G(e)}function ne(t){switch(t){case"propertyFactory":return Rt;case"shapePropertyFactory":return Ut;case"matrix":return jt;default:return null}}function re(){"complete"===document.readyState&&(clearInterval(ce),Qt())}function oe(t){for(var e=ie.split("&"),n=0;n=1?i.push({s:t-1,e:e-1}):(i.push({s:t,e:1}),i.push({s:0,e:e-1}));var a,s,c=[],l=i.length;for(a=0;ar+n||(u=s.s*o<=r?0:(s.s*o-r)/n,h=s.e*o>=r+n?1:(s.e*o-r)/n,c.push([u,h]))}return c.length||c.push([0,0]),c},he.prototype.releasePathsData=function(t){var e,n=t.length;for(e=0;e1?1+i:this.s.v<0?0+i:this.s.v+i)>(n=this.e.v>1?1+i:this.e.v<0?0+i:this.e.v+i)){var a=e;e=n,n=a}e=1e-4*Math.round(1e4*e),n=1e-4*Math.round(1e4*n),this.sValue=e,this.eValue=n}else e=this.sValue,n=this.eValue;var s,c,l,u,h,p=this.shapes.length,f=0;if(n===e)for(o=0;o=0;o-=1)if((d=this.shapes[o]).shape._mdf){for((m=d.localShapeCollection).releaseShapes(),2===this.m&&p>1?(v=this.calculateShapeEdges(e,n,d.totalShapeLength,_,f),_+=d.totalShapeLength):v=[[y,b]],c=v.length,s=0;s=1?g.push({s:d.totalShapeLength*(y-1),e:d.totalShapeLength*(b-1)}):(g.push({s:d.totalShapeLength*y,e:d.totalShapeLength}),g.push({s:0,e:d.totalShapeLength*(b-1)}));var E=this.addShapes(d,g[0]);if(g[0].s!==g[0].e){if(g.length>1)if(d.shape.paths.shapes[d.shape.paths._length-1].c){var w=E.pop();this.addPaths(E,m),E=this.addShapes(d,g[1],w)}else this.addPaths(E,m),E=this.addShapes(d,g[1]);this.addPaths(E,m)}}d.shape.paths=m}}},he.prototype.addPaths=function(t,e){var n,r=t.length;for(n=0;ne.e){n.c=!1;break}e.s<=d&&e.e>=d+a.addedLength?(this.addSegment(p[r].v[o-1],p[r].o[o-1],p[r].i[o],p[r].v[o],n,s,g),g=!1):(l=bt.getNewSegment(p[r].v[o-1],p[r].v[o],p[r].o[o-1],p[r].i[o],(e.s-d)/a.addedLength,(e.e-d)/a.addedLength,c[o-1]),this.addSegmentFromArray(l,n,s,g),g=!1,n.c=!1),d+=a.addedLength,s+=1}if(p[r].c&&c.length){if(a=c[o-1],d<=e.e){var v=c[o-1].addedLength;e.s<=d&&e.e>=d+v?(this.addSegment(p[r].v[o-1],p[r].o[o-1],p[r].i[0],p[r].v[0],n,s,g),g=!1):(l=bt.getNewSegment(p[r].v[o-1],p[r].v[0],p[r].o[o-1],p[r].i[0],(e.s-d)/v,(e.e-d)/v,c[o-1]),this.addSegmentFromArray(l,n,s,g),g=!1,n.c=!1)}else n.c=!1;d+=a.addedLength,s+=1}if(n._length&&(n.setXYAt(n.v[u][0],n.v[u][1],"i",u),n.setXYAt(n.v[n._length-1][0],n.v[n._length-1][1],"o",n._length-1)),d>e.e)break;r=this.p.keyframes[this.p.keyframes.length-1].t?(r=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/n,0),o=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/n,0)):(r=this.p.pv,o=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/n,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){r=[],o=[];var i=this.px,a=this.py;i._caching.lastFrame+i.offsetTime<=i.keyframes[0].t?(r[0]=i.getValueAtTime((i.keyframes[0].t+.01)/n,0),r[1]=a.getValueAtTime((a.keyframes[0].t+.01)/n,0),o[0]=i.getValueAtTime(i.keyframes[0].t/n,0),o[1]=a.getValueAtTime(a.keyframes[0].t/n,0)):i._caching.lastFrame+i.offsetTime>=i.keyframes[i.keyframes.length-1].t?(r[0]=i.getValueAtTime(i.keyframes[i.keyframes.length-1].t/n,0),r[1]=a.getValueAtTime(a.keyframes[a.keyframes.length-1].t/n,0),o[0]=i.getValueAtTime((i.keyframes[i.keyframes.length-1].t-.01)/n,0),o[1]=a.getValueAtTime((a.keyframes[a.keyframes.length-1].t-.01)/n,0)):(r=[i.pv,a.pv],o[0]=i.getValueAtTime((i._caching.lastFrame+i.offsetTime-.01)/n,i.offsetTime),o[1]=a.getValueAtTime((a._caching.lastFrame+a.offsetTime-.01)/n,a.offsetTime))}else r=o=t;this.v.rotate(-Math.atan2(r[1]-o[1],r[0]-o[0]))}this.data.p&&this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}}function r(){if(this.appliedTransformations=0,this.pre.reset(),!this.a.effectsSequence.length&&(this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1,!this.s.effectsSequence.length)){if(this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2,this.sk){if(this.sk.effectsSequence.length||this.sa.effectsSequence.length)return;this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3}this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):this.rz.effectsSequence.length||this.ry.effectsSequence.length||this.rx.effectsSequence.length||this.or.effectsSequence.length||(this.pre.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.appliedTransformations=4)}}function o(){}function i(t){this._addDynamicProperty(t),this.elem.addDynamicProperty(t),this._isDirty=!0}function a(t,e,n){if(this.elem=t,this.frameId=-1,this.propType="transform",this.data=e,this.v=new jt,this.pre=new jt,this.appliedTransformations=0,this.initDynamicPropertyContainer(n||t),e.p&&e.p.s?(this.px=Rt.getProp(t,e.p.x,0,0,this),this.py=Rt.getProp(t,e.p.y,0,0,this),e.p.z&&(this.pz=Rt.getProp(t,e.p.z,0,0,this))):this.p=Rt.getProp(t,e.p||{k:[0,0,0]},1,0,this),e.rx){if(this.rx=Rt.getProp(t,e.rx,0,O,this),this.ry=Rt.getProp(t,e.ry,0,O,this),this.rz=Rt.getProp(t,e.rz,0,O,this),e.or.k[0].ti){var r,o=e.or.k.length;for(r=0;rr){var o=r;r=n,n=o}for(var i=_e(3*t.a[e],2*t.b[e],t.c[e]),a=0;a0&&i[a]<1){var s=t.point(i[a])[e];sr&&(r=s)}return{min:n,max:r}}function Ce(t,e,n){var r=t.boundingBox();return{cx:r.cx,cy:r.cy,width:r.width,height:r.height,bez:t,t:(e+n)/2,t1:e,t2:n}}function Te(t){var e=t.bez.split(.5);return[Ce(e[0],t.t1,t.t),Ce(e[1],t.t,t.t2)]}function Le(t,e){return 2*Math.abs(t.cx-e.cx)=i||t.width<=r&&t.height<=r&&e.width<=r&&e.height<=r)o.push([t.t,e.t]);else{var a=Te(t),s=Te(e);Oe(a[0],s[0],n+1,r,o,i),Oe(a[0],s[1],n+1,r,o,i),Oe(a[1],s[0],n+1,r,o,i),Oe(a[1],s[1],n+1,r,o,i)}}function xe(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function ke(t,e,n,r){var o=[t[0],t[1],1],i=[e[0],e[1],1],a=[n[0],n[1],1],s=[r[0],r[1],1],c=xe(xe(o,i),xe(a,s));return ve(c[2])?null:[c[0]/c[2],c[1]/c[2]]}function Pe(t,e,n){return[t[0]+Math.cos(e)*n,t[1]-Math.sin(e)*n]}function Ne(t,e){return Math.hypot(t[0]-e[0],t[1]-e[1])}function Ie(t,e){return ge(t[0],e[0])&&ge(t[1],e[1])}function Re(){}function Me(t,e,n,r,o,i,a){var s=n-Math.PI/2,c=n+Math.PI/2,l=e[0]+Math.cos(n)*r*o,u=e[1]-Math.sin(n)*r*o;t.setTripleAt(l,u,l+Math.cos(s)*i,u-Math.sin(s)*i,l+Math.cos(c)*a,u-Math.sin(c)*a,t.length())}function Fe(t,e){var n=[e[0]-t[0],e[1]-t[1]],r=.5*-Math.PI;return[Math.cos(r)*n[0]-Math.sin(r)*n[1],Math.sin(r)*n[0]+Math.cos(r)*n[1]]}function De(t,e){var n=0===e?t.length()-1:e-1,r=(e+1)%t.length(),o=Fe(t.v[n],t.v[r]);return Math.atan2(0,1)-Math.atan2(o[1],o[0])}function Ve(t,e,n,r,o,i,a){var s=De(e,n),c=e.v[n%e._length],l=e.v[0===n?e._length-1:n-1],u=e.v[(n+1)%e._length],h=2===i?Math.sqrt(Math.pow(c[0]-l[0],2)+Math.pow(c[1]-l[1],2)):0,p=2===i?Math.sqrt(Math.pow(c[0]-u[0],2)+Math.pow(c[1]-u[1],2)):0;Me(t,e.v[n%e._length],s,a,r,p/(2*(o+1)),h/(2*(o+1)),i)}function Be(t,e,n,r,o,i){for(var a=0;a1&&e.length>1&&(o=He(t[0],e[e.length-1]))?[[t[0].split(o[0])[0]],[e[e.length-1].split(o[1])[1]]]:[n,r]}function We(t){for(var e,n=1;n1&&(e=qe(t[t.length-1],t[0]),t[t.length-1]=e[0],t[0]=e[1]),t}function $e(t,e){var n,r,o,i,a=t.inflectionPoints();if(0===a.length)return[Ue(t,e)];if(1===a.length||ge(a[1],1))return n=(o=t.split(a[0]))[0],r=o[1],[Ue(n,e),Ue(r,e)];n=(o=t.split(a[0]))[0];var s=(a[1]-a[0])/(1-a[0]);return i=(o=o[1].split(s))[0],r=o[1],[Ue(n,e),Ue(i,e),Ue(r,e)]}function Ge(){}function Ke(t){for(var e=t.fStyle?t.fStyle.split(" "):[],n="normal",r="normal",o=e.length,i=0;i0;)n-=1,this._elements.unshift(e[n]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},de.prototype.resetElements=function(t){var e,n=t.length;for(e=0;e0?Math.floor(p):Math.ceil(p),m=this.pMatrix.props,g=this.rMatrix.props,v=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var y,b,_=0;if(p>0){for(;_d;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),_-=1;f&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-f,!0),_-=f)}for(r=1===this.data.m?0:this._currentCopies-1,o=1===this.data.m?1:-1,i=this._currentCopies;i;){if(b=(n=(e=this.elemsData[r].it)[e.length-1].transform.mProps.v.props).length,e[e.length-1].transform.mProps._mdf=!0,e[e.length-1].transform.op._mdf=!0,e[e.length-1].transform.op.v=1===this._currentCopies?this.so.v:this.so.v+(this.eo.v-this.so.v)*(r/(this._currentCopies-1)),0!==_){for((0!==r&&1===o||r!==this._currentCopies-1&&-1===o)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(g[0],g[1],g[2],g[3],g[4],g[5],g[6],g[7],g[8],g[9],g[10],g[11],g[12],g[13],g[14],g[15]),this.matrix.transform(v[0],v[1],v[2],v[3],v[4],v[5],v[6],v[7],v[8],v[9],v[10],v[11],v[12],v[13],v[14],v[15]),this.matrix.transform(m[0],m[1],m[2],m[3],m[4],m[5],m[6],m[7],m[8],m[9],m[10],m[11],m[12],m[13],m[14],m[15]),y=0;y0&&r<1?[e]:[]:[e-r,e+r].filter((function(t){return t>0&&t<1}))},Ae.prototype.split=function(t){if(t<=0)return[we(this.points[0]),this];if(t>=1)return[this,we(this.points[this.points.length-1])];var e=be(this.points[0],this.points[1],t),n=be(this.points[1],this.points[2],t),r=be(this.points[2],this.points[3],t),o=be(e,n,t),i=be(n,r,t),a=be(o,i,t);return[new Ae(this.points[0],e,o,a,!0),new Ae(a,i,r,this.points[3],!0)]},Ae.prototype.bounds=function(){return{x:Se(this,0),y:Se(this,1)}},Ae.prototype.boundingBox=function(){var t=this.bounds();return{left:t.x.min,right:t.x.max,top:t.y.min,bottom:t.y.max,width:t.x.max-t.x.min,height:t.y.max-t.y.min,cx:(t.x.max+t.x.min)/2,cy:(t.y.max+t.y.min)/2}},Ae.prototype.intersections=function(t,e,n){void 0===e&&(e=2),void 0===n&&(n=7);var r=[];return Oe(Ce(this,0,1),Ce(t,0,1),0,e,r,n),r},Ae.shapeSegment=function(t,e){var n=(e+1)%t.length();return new Ae(t.v[e],t.o[e],t.i[n],t.v[n],!0)},Ae.shapeSegmentInverted=function(t,e){var n=(e+1)%t.length();return new Ae(t.v[n],t.i[n],t.o[e],t.v[e],!0)},h([ue],Re),Re.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.amplitude=Rt.getProp(t,e.s,0,null,this),this.frequency=Rt.getProp(t,e.r,0,null,this),this.pointsType=Rt.getProp(t,e.pt,0,null,this),this._isAnimated=0!==this.amplitude.effectsSequence.length||0!==this.frequency.effectsSequence.length||0!==this.pointsType.effectsSequence.length},Re.prototype.processPath=function(t,e,n,r){var o=t._length,i=Vt.newElement();if(i.c=t.c,t.c||(o-=1),0===o)return i;var a=-1,s=Ae.shapeSegment(t,0);Ve(i,t,0,e,n,r,a);for(var c=0;c=0;i-=1)s=Ae.shapeSegmentInverted(t,i),l.push($e(s,e));l=We(l);var u=null,h=null;for(i=0;i0&&(c=!1),c){var l=u("style");l.setAttribute("f-forigin",r[n].fOrigin),l.setAttribute("f-origin",r[n].origin),l.setAttribute("f-family",r[n].fFamily),l.type="text/css",l.innerText="@font-face {font-family: "+r[n].fFamily+"; font-style: normal; src: url('"+r[n].fPath+"');}",e.appendChild(l)}}else if("g"===r[n].fOrigin||1===r[n].origin){for(a=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),s=0;s=55296&&n<=56319){var r=t.charCodeAt(1);r>=56320&&r<=57343&&(e=1024*(n-55296)+r-56320+65536)}return e}function A(t,e){var n=t.toString(16)+e.toString(16);return-1!==p.indexOf(n)}function S(t){return t===c}function C(t){return t===s}function T(t){var e=w(t);return e>=l&&e<=h}function L(t){return T(t.substr(0,2))&&T(t.substr(2,2))}function O(t){return-1!==n.indexOf(t)}function x(t,e){var n=w(t.substr(e,2));if(n!==r)return!1;var s=0;for(e+=2;s<5;){if((n=w(t.substr(e,2)))a)return!1;s+=1,e+=2}return w(t.substr(e,2))===o}function k(){this.isLoaded=!0}var P=function(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.isLoaded=!1,this._warned=!1,this.initTime=Date.now(),this.setIsLoadedBinded=this.setIsLoaded.bind(this),this.checkLoadedFontsBinded=this.checkLoadedFonts.bind(this)};P.isModifier=A,P.isZeroWidthJoiner=S,P.isFlagEmoji=L,P.isRegionalCode=T,P.isCombinedCharacter=O,P.isRegionalFlag=x,P.isVariationSelector=C,P.BLACK_FLAG_CODE_POINT=r;var N={addChars:y,addFonts:v,getCharData:b,getFontByName:E,measureText:_,checkLoadedFonts:m,setIsLoaded:k};return P.prototype=N,P}();function Xe(t){this.animationData=t}function Ye(t){return new Xe(t)}function Ze(){}Xe.prototype.getProp=function(t){return this.animationData.slots&&this.animationData.slots[t.sid]?Object.assign(t,this.animationData.slots[t.sid].p):t},Ze.prototype={initRenderable:function(){this.isInRange=!1,this.hidden=!1,this.isTransparent=!1,this.renderableComponents=[]},addRenderableComponent:function(t){-1===this.renderableComponents.indexOf(t)&&this.renderableComponents.push(t)},removeRenderableComponent:function(t){-1!==this.renderableComponents.indexOf(t)&&this.renderableComponents.splice(this.renderableComponents.indexOf(t),1)},prepareRenderableFrame:function(t){this.checkLayerLimits(t)},checkTransparency:function(){this.finalTransform.mProp.o.v<=0?!this.isTransparent&&this.globalData.renderConfig.hideOnTransparent&&(this.isTransparent=!0,this.hide()):this.isTransparent&&(this.isTransparent=!1,this.show())},checkLayerLimits:function(t){this.data.ip-this.data.st<=t&&this.data.op-this.data.st>t?!0!==this.isInRange&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):!1!==this.isInRange&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var t,e=this.renderableComponents.length;for(t=0;t.1)&&this.audio.seek(this._currentTime/this.globalData.frameRate):(this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0))},mn.prototype.show=function(){},mn.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},mn.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},mn.prototype.resume=function(){this._canPlay=!0},mn.prototype.setRate=function(t){this.audio.rate(t)},mn.prototype.volume=function(t){this._volumeMultiplier=t,this._previousVolume=t*this._volume,this.audio.volume(this._previousVolume)},mn.prototype.getBaseElement=function(){return null},mn.prototype.destroy=function(){},mn.prototype.sourceRectAtTime=function(){},mn.prototype.initExpressions=function(){},gn.prototype.checkLayers=function(t){var e,n,r=this.layers.length;for(this.completeLayers=!0,e=r-1;e>=0;e-=1)this.elements[e]||(n=this.layers[e]).ip-n.st<=t-this.layers[e].st&&n.op-n.st>t-this.layers[e].st&&this.buildItem(e),this.completeLayers=!!this.elements[e]&&this.completeLayers;this.checkPendingElements()},gn.prototype.createItem=function(t){switch(t.ty){case 2:return this.createImage(t);case 0:return this.createComp(t);case 1:return this.createSolid(t);case 3:default:return this.createNull(t);case 4:return this.createShape(t);case 5:return this.createText(t);case 6:return this.createAudio(t);case 13:return this.createCamera(t);case 15:return this.createFootage(t)}},gn.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},gn.prototype.createAudio=function(t){return new mn(t,this.globalData,this)},gn.prototype.createFootage=function(t){return new dn(t,this.globalData,this)},gn.prototype.buildAllItems=function(){var t,e=this.layers.length;for(t=0;t0&&(this.maskElement.setAttribute("id",y),this.element.maskedElement.setAttribute(_,"url("+l()+"#"+y+")"),i.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}yn.prototype={initTransform:function(){var t=new jt;this.finalTransform={mProp:this.data.ks?fe.getTransformProperty(this,this.data.ks,this):{o:0},_matMdf:!1,_localMatMdf:!1,_opMdf:!1,mat:t,localMat:t,localOpacity:1},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0),this.data.ty},renderTransform:function(){if(this.finalTransform._opMdf=this.finalTransform.mProp.o._mdf||this._isFirstFrame,this.finalTransform._matMdf=this.finalTransform.mProp._mdf||this._isFirstFrame,this.hierarchy){var t,e=this.finalTransform.mat,n=0,r=this.hierarchy.length;if(!this.finalTransform._matMdf)for(;n1&&(i+=" C"+e.o[r-1][0]+","+e.o[r-1][1]+" "+e.i[0][0]+","+e.i[0][1]+" "+e.v[0][0]+","+e.v[0][1]),n.lastPath!==i){var a="";n.elem&&(e.c&&(a=t.inv?this.solidPath+i:i),n.elem.setAttribute("d",a)),n.lastPath=i}},bn.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null};var _n,En=function(){var t={};function e(t,e){var n=J("filter");return n.setAttribute("id",t),!0!==e&&(n.setAttribute("filterUnits","objectBoundingBox"),n.setAttribute("x","0%"),n.setAttribute("y","0%"),n.setAttribute("width","100%"),n.setAttribute("height","100%")),n}function n(){var t=J("feColorMatrix");return t.setAttribute("type","matrix"),t.setAttribute("color-interpolation-filters","sRGB"),t.setAttribute("values","0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1"),t}return t.createFilter=e,t.createAlphaToLuminanceFilter=n,t}(),wn=(_n={maskType:!0,svgLumaHidden:!0,offscreenCanvas:"undefined"!=typeof OffscreenCanvas},(/MSIE 10/i.test(navigator.userAgent)||/MSIE 9/i.test(navigator.userAgent)||/rv:11.0/i.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent))&&(_n.maskType=!1),/firefox/i.test(navigator.userAgent)&&(_n.svgLumaHidden=!1),_n),An={},Sn="filter_result_";function Cn(t){var e,n,r="SourceGraphic",o=t.data.ef?t.data.ef.length:0,i=B(),a=En.createFilter(i,!0),s=0;for(this.filters=[],e=0;e=0&&!this.shapeModifiers[t].processShapes(this._isFirstFrame);t-=1);}},searchProcessedElement:function(t){for(var e=this.processedElements,n=0,r=e.length;n.01)return!1;n+=1}return!0},zn.prototype.checkCollapsable=function(){if(this.o.length/2!=this.c.length/4)return!1;if(this.data.k.k[0].s)for(var t=0,e=this.data.k.k.length;t0;)c=r.transformers[d].mProps._mdf||c,f-=1,d-=1;if(c)for(f=g-r.styles[u].lvl,d=r.transformers.length-1;f>0;)p.multiply(r.transformers[d].mProps.v),f-=1,d-=1}else p=t;if(a=(h=r.sh.paths)._length,c){for(s="",i=0;i=1?y=.99:y<=-1&&(y=-.99);var b=s*y,_=Math.cos(v+e.a.v)*b+u[0],E=Math.sin(v+e.a.v)*b+u[1];c.setAttribute("fx",_),c.setAttribute("fy",E),l&&!e.g._collapsable&&(e.of.setAttribute("fx",_),e.of.setAttribute("fy",E))}}function l(t,e,n){var r=e.style,o=e.d;o&&(o._mdf||n)&&o.dashStr&&(r.pElem.setAttribute("stroke-dasharray",o.dashStr),r.pElem.setAttribute("stroke-dashoffset",o.dashoffset[0])),e.c&&(e.c._mdf||n)&&r.pElem.setAttribute("stroke","rgb("+S(e.c.v[0])+","+S(e.c.v[1])+","+S(e.c.v[2])+")"),(e.o._mdf||n)&&r.pElem.setAttribute("stroke-opacity",e.o.v),(e.w._mdf||n)&&(r.pElem.setAttribute("stroke-width",e.w.v),r.msElem&&r.msElem.setAttribute("stroke-width",e.w.v))}return{createRenderFunction:n}}();function Gn(t,e,n){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(t,e,n),this.prevViewData=[]}function Kn(t,e,n,r,o,i){this.o=t,this.sw=e,this.sc=n,this.fc=r,this.m=o,this.p=i,this._mdf={o:!0,sw:!!e,sc:!!n,fc:!!r,m:!0,p:!0}}function Qn(t,e){this._frameId=i,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,e.d&&e.d.sid&&(e.d=t.globalData.slotManager.getProp(e.d)),this.data=e,this.elem=t,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={ascent:0,boxWidth:this.defaultBoxWidth,f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:null,fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,finalSize:0,finalText:[],finalLineHeight:0,__complete:!1},this.copyData(this.currentData,this.data.d.k[0].s),this.searchProperty()||this.completeTextData(this.currentData)}h([pn,yn,Tn,Pn,Ln,fn,On],Gn),Gn.prototype.initSecondaryElement=function(){},Gn.prototype.identityMatrix=new jt,Gn.prototype.buildExpressionInterface=function(){},Gn.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},Gn.prototype.filterUniqueShapes=function(){var t,e,n,r,o=this.shapes.length,i=this.stylesList.length,a=[],s=!1;for(n=0;n1&&s&&this.setShapesAsAnimated(a)}},Gn.prototype.setShapesAsAnimated=function(t){var e,n=t.length;for(e=0;e=0;s-=1){if((p=this.searchProcessedElement(t[s]))?e[s]=n[p-1]:t[s]._render=a,"fl"===t[s].ty||"st"===t[s].ty||"gf"===t[s].ty||"gs"===t[s].ty||"no"===t[s].ty)p?e[s].style.closed=!1:e[s]=this.createStyleElement(t[s],o),t[s]._render&&e[s].style.pElem.parentNode!==r&&r.appendChild(e[s].style.pElem),m.push(e[s].style);else if("gr"===t[s].ty){if(p)for(l=e[s].it.length,c=0;c1,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},Qn.prototype.addEffect=function(t){this.effectsSequence.push(t),this.elem.addDynamicProperty(this)},Qn.prototype.getValue=function(t){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length||t){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var e=this.currentData,n=this.keysIndex;if(this.lock)this.setCurrentData(this.currentData);else{var r;this.lock=!0,this._mdf=!1;var o=this.effectsSequence.length,i=t||this.data.d.k[this.keysIndex].s;for(r=0;re);)n+=1;return this.keysIndex!==n&&(this.keysIndex=n),this.data.d.k[this.keysIndex].s},Qn.prototype.buildFinalText=function(t){for(var e,n,r=[],o=0,i=t.length,a=!1,s=!1,c="";o=55296&&e<=56319?Qe.isRegionalFlag(t,o)?c=t.substr(o,14):(n=t.charCodeAt(o+1))>=56320&&n<=57343&&(Qe.isModifier(e,n)?(c=t.substr(o,2),a=!0):c=Qe.isFlagEmoji(t.substr(o,4))?t.substr(o,4):t.substr(o,2)):e>56319?(n=t.charCodeAt(o+1),Qe.isVariationSelector(e)&&(a=!0)):Qe.isZeroWidthJoiner(e)&&(a=!0,s=!0),a?(r[r.length-1]+=c,a=!1):r.push(c),o+=c.length;return r},Qn.prototype.completeTextData=function(t){t.__complete=!0;var e,n,r,o,i,a,s,c=this.elem.globalData.fontManager,l=this.data,u=[],h=0,p=l.m.g,f=0,d=0,m=0,g=[],v=0,y=0,b=c.getFontByName(t.f),_=0,E=Ke(b);t.fWeight=E.weight,t.fStyle=E.style,t.finalSize=t.s,t.finalText=this.buildFinalText(t.t),n=t.finalText.length,t.finalLineHeight=t.lh;var w,A=t.tr/1e3*t.finalSize;if(t.sz)for(var S,C,T=!0,L=t.sz[0],O=t.sz[1];T;){S=0,v=0,n=(C=this.buildFinalText(t.t)).length,A=t.tr/1e3*t.finalSize;var x=-1;for(e=0;eL&&" "!==C[e]?(-1===x?n+=1:e=x,S+=t.finalLineHeight||1.2*t.finalSize,C.splice(e,x===e?1:0,"\r"),x=-1,v=0):(v+=_,v+=A);S+=b.ascent*t.finalSize/100,this.canResize&&t.finalSize>this.minimumFontSize&&Oy?v:y,v=-2*A,o="",r=!0,m+=1):o=k,c.chars?(s=c.getCharData(k,b.fStyle,c.getFontByName(t.f).fFamily),_=r?0:s.w*t.finalSize/100):_=c.measureText(o,t.f,t.finalSize)," "===k?P+=_+A:(v+=_+A+P,P=0),u.push({l:_,an:_,add:f,n:r,anIndexes:[],val:o,line:m,animatorJustifyOffset:0}),2==p){if(f+=_,""===o||" "===o||e===n-1){for(""!==o&&" "!==o||(f-=_);d<=e;)u[d].an=f,u[d].ind=h,u[d].extra=_,d+=1;h+=1,f=0}}else if(3==p){if(f+=_,""===o||e===n-1){for(""===o&&(f-=_);d<=e;)u[d].an=f,u[d].ind=h,u[d].extra=_,d+=1;f=0,h+=1}}else u[h].ind=h,u[h].extra=0,h+=1;if(t.l=u,y=v>y?v:y,g.push(v),t.sz)t.boxWidth=t.sz[0],t.justifyOffset=0;else switch(t.boxWidth=y,t.j){case 1:t.justifyOffset=-t.boxWidth;break;case 2:t.justifyOffset=-t.boxWidth/2;break;default:t.justifyOffset=0}t.lineWidths=g;var N,I,R,M,F=l.a;a=F.length;var D=[];for(i=0;i0?o=this.ne.v/100:i=-this.ne.v/100,this.xe.v>0?a=1-this.xe.v/100:s=1+this.xe.v/100;var c=ft.getBezierEasing(o,i,a,s).get,l=0,u=this.finalS,h=this.finalE,p=this.data.sh;if(2===p)l=c(l=h===u?r>=h?1:0:t(0,e(.5/(h-u)+(r-u)/(h-u),1)));else if(3===p)l=c(l=h===u?r>=h?0:1:1-t(0,e(.5/(h-u)+(r-u)/(h-u),1)));else if(4===p)h===u?l=0:(l=t(0,e(.5/(h-u)+(r-u)/(h-u),1)))<.5?l*=2:l=1-2*(l-.5),l=c(l);else if(5===p){if(h===u)l=0;else{var f=h-u,d=-f/2+(r=e(t(0,r+.5-u),h-u)),m=f/2;l=Math.sqrt(1-d*d/(m*m))}l=c(l)}else 6===p?(h===u?l=0:(r=e(t(0,r+.5-u),h-u),l=(1+Math.cos(Math.PI+2*Math.PI*r/(h-u)))/2),l=c(l)):(r>=n(u)&&(l=t(0,e(r-u<0?e(h,1)-(u-r):h-r,1))),l=c(l));if(100!==this.sm.v){var g=.01*this.sm.v;0===g&&(g=1e-8);var v=.5-.5*g;l1&&(l=1)}return l*this.a.v},getValue:function(t){this.iterateDynamicProperties(),this._mdf=t||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,t&&2===this.data.r&&(this.e.v=this._currentTextLength);var e=2===this.data.r?1:100/this.data.totalChars,n=this.o.v/e,r=this.s.v/e+n,o=this.e.v/e+n;if(r>o){var i=r;r=o,o=i}this.finalS=r,this.finalE=o}},h([Mt],r),{getTextSelectorProp:o}}();function Yn(t,e,n){var r={propType:!1},o=Rt.getProp,i=e.a;this.a={r:i.r?o(t,i.r,0,O,n):r,rx:i.rx?o(t,i.rx,0,O,n):r,ry:i.ry?o(t,i.ry,0,O,n):r,sk:i.sk?o(t,i.sk,0,O,n):r,sa:i.sa?o(t,i.sa,0,O,n):r,s:i.s?o(t,i.s,1,.01,n):r,a:i.a?o(t,i.a,1,0,n):r,o:i.o?o(t,i.o,0,.01,n):r,p:i.p?o(t,i.p,1,0,n):r,sw:i.sw?o(t,i.sw,0,0,n):r,sc:i.sc?o(t,i.sc,1,0,n):r,fc:i.fc?o(t,i.fc,1,0,n):r,fh:i.fh?o(t,i.fh,0,0,n):r,fs:i.fs?o(t,i.fs,0,.01,n):r,fb:i.fb?o(t,i.fb,0,.01,n):r,t:i.t?o(t,i.t,0,0,n):r},this.s=Xn.getTextSelectorProp(t,e.s,n),this.s.t=e.s.t}function Zn(t,e,n){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=t,this._renderType=e,this._elem=n,this._animatorsData=m(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(n)}function Jn(){}Zn.prototype.searchProperties=function(){var t,e,n=this._textData.a.length,r=Rt.getProp;for(t=0;t=s+ut||!d?(y=(s+ut-l)/c.partialLength,V=f.point[0]+(c.point[0]-f.point[0])*y,B=f.point[1]+(c.point[1]-f.point[1])*y,S.translate(-E[0]*L[o].an*.005,-E[1]*M*.01),u=!1):d&&(l+=c.partialLength,(h+=1)>=d.length&&(h=0,m[p+=1]?d=m[p].points:_.v.c?(h=0,d=m[p=0].points):(l-=c.partialLength,d=null)),d&&(f=c,g=(c=d[h]).partialLength));D=L[o].an/2-L[o].add,S.translate(-D,0,0)}else D=L[o].an/2-L[o].add,S.translate(-D,0,0),S.translate(-E[0]*L[o].an*.005,-E[1]*M*.01,0);for(P=0;Pt?this.textSpans[t].span:J(c?"g":"text"),y<=t){if(a.setAttribute("stroke-linecap","butt"),a.setAttribute("stroke-linejoin","round"),a.setAttribute("stroke-miterlimit","4"),this.textSpans[t].span=a,c){var b=J("g");a.appendChild(b),this.textSpans[t].childSpan=b}this.textSpans[t].span=a,this.layerElement.appendChild(a)}a.style.display="inherit"}if(l.reset(),h&&(s[t].n&&(p=-g,f+=n.yOffset,f+=d?1:0,d=!1),this.applyTextPropertiesToMatrix(n,l,s[t].line,p,f),p+=s[t].l||0,p+=g),c){var _;if(1===(v=this.globalData.fontManager.getCharData(n.finalText[t],r.fStyle,this.globalData.fontManager.getFontByName(n.f).fFamily)).t)_=new ar(v.data,this.globalData,this);else{var E=tr;v.data&&v.data.shapes&&(E=this.buildShapeData(v.data,n.finalSize)),_=new Gn(E,this.globalData,this)}if(this.textSpans[t].glyph){var w=this.textSpans[t].glyph;this.textSpans[t].childSpan.removeChild(w.layerElement),w.destroy()}this.textSpans[t].glyph=_,_._debug=!0,_.prepareFrame(0),_.renderFrame(),this.textSpans[t].childSpan.appendChild(_.layerElement),1===v.t&&this.textSpans[t].childSpan.setAttribute("transform","scale("+n.finalSize/100+","+n.finalSize/100+")")}else h&&a.setAttribute("transform","translate("+l.props[12]+","+l.props[13]+")"),a.textContent=s[t].val,a.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve")}h&&a&&a.setAttribute("d",u)}else{var A=this.textContainer,S="start";switch(n.j){case 1:S="end";break;case 2:S="middle";break;default:S="start"}A.setAttribute("text-anchor",S),A.setAttribute("letter-spacing",g);var C=this.buildTextContents(n.finalText);for(e=C.length,f=n.ps?n.ps[1]+n.ascent:0,t=0;t=0;e-=1)(this.completeLayers||this.elements[e])&&this.elements[e].prepareFrame(t-this.layers[e].st);if(this.globalData._mdf)for(e=0;e=0;n-=1)(this.completeLayers||this.elements[n])&&(this.elements[n].prepareFrame(this.renderedFrame-this.layers[n].st),this.elements[n]._mdf&&(this._mdf=!0))}},ir.prototype.renderInnerContent=function(){var t,e=this.layers.length;for(t=0;t{"use strict";var r=n(758);n(8143);function o(t){var e,n,r="";if("string"==typeof t||"number"==typeof t)r+=t;else if("object"==typeof t)if(Array.isArray(t))for(e=0;e"object"==typeof window?((t?t.querySelector("#_goober"):window._goober)||Object.assign((t||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:t||a,c=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,l=/\/\*[^]*?\*\/| +/g,u=/\n+/g,h=(t,e)=>{let n="",r="",o="";for(let i in t){let a=t[i];"@"==i[0]?"i"==i[1]?n=i+" "+a+";":r+="f"==i[1]?h(a,i):i+"{"+h(a,"k"==i[1]?"":e)+"}":"object"==typeof a?r+=h(a,e?e.replace(/([^,])+/g,(t=>i.replace(/(^:.*)|([^,])+/g,(e=>/&/.test(e)?e.replace(/&/g,t):t?t+" "+e:e)))):i):null!=a&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=h.p?h.p(i,a):i+":"+a+";")}return n+(e&&o?e+"{"+o+"}":o)+r},p={},f=t=>{if("object"==typeof t){let e="";for(let n in t)e+=n+f(t[n]);return e}return t},d=(t,e,n,r,o)=>{let i=f(t),a=p[i]||(p[i]=(t=>{let e=0,n=11;for(;e>>0;return"go"+n})(i));if(!p[a]){let e=i!==t?t:(t=>{let e,n,r=[{}];for(;e=c.exec(t.replace(l,""));)e[4]?r.shift():e[3]?(n=e[3].replace(u," ").trim(),r.unshift(r[0][n]=r[0][n]||{})):r[0][e[1]]=e[2].replace(u," ").trim();return r[0]})(t);p[a]=h(o?{["@keyframes "+a]:e}:e,n?"":"."+a)}let s=n&&p.g?p.g:null;return n&&(p.g=p[a]),((t,e,n,r)=>{r?e.data=e.data.replace(r,t):-1===e.data.indexOf(t)&&(e.data=n?t+e.data:e.data+t)})(p[a],e,r,s),a},m=(t,e,n)=>t.reduce(((t,r,o)=>{let i=e[o];if(i&&i.call){let t=i(n),e=t&&t.props&&t.props.className||/^go/.test(t)&&t;i=e?"."+e:t&&"object"==typeof t?t.props?"":h(t,""):!1===t?"":t}return t+r+(null==i?"":i)}),"");function g(t){let e=this||{},n=t.call?t(e.p):t;return d(n.unshift?n.raw?m(n,[].slice.call(arguments,1),e.p):n.reduce(((t,n)=>Object.assign(t,n&&n.call?n(e.p):n)),{}):n,s(e.target),e.g,e.o,e.k)}g.bind({g:1}),g.bind({k:1});function v(t,e){for(var n=0;n=0||(o[n]=t[n]);return o}var w="@media (max-width:599.95px)",A="@media (min-width:600px)",S="unmounted",C="exited",T="entering",L="entered",O="exiting",x=function(t){function e(e){var n;n=t.call(this,e)||this;var r,o=e.appear;return n.appearStatus=null,e.in?o?(r=C,n.appearStatus=T):r=L:r=e.unmountOnExit||e.mountOnEnter?S:C,n.state={status:r},n.nextCallback=null,n}_(e,t),e.getDerivedStateFromProps=function(t,e){return t.in&&e.status===S?{status:C}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(t){var e=null;if(t!==this.props){var n=this.state.status;this.props.in?n!==T&&n!==L&&(e=T):n!==T&&n!==L||(e=O)}this.updateStatus(!1,e)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var t=this.props.timeout,e=t,n=t;return null!=t&&"number"!=typeof t&&"string"!=typeof t&&(n=t.exit,e=t.enter),{exit:n,enter:e}},n.updateStatus=function(t,e){void 0===t&&(t=!1),null!==e?(this.cancelNextCallback(),e===T?this.performEnter(t):this.performExit()):this.props.unmountOnExit&&this.state.status===C&&this.setState({status:S})},n.performEnter=function(t){var e=this,n=this.props.enter,r=t,o=this.getTimeouts();t||n?(this.props.onEnter&&this.props.onEnter(this.node,r),this.safeSetState({status:T},(function(){e.props.onEntering&&e.props.onEntering(e.node,r),e.onTransitionEnd(o.enter,(function(){e.safeSetState({status:L},(function(){e.props.onEntered&&e.props.onEntered(e.node,r)}))}))}))):this.safeSetState({status:L},(function(){e.props.onEntered&&e.props.onEntered(e.node,r)}))},n.performExit=function(){var t=this,e=this.props.exit,n=this.getTimeouts();e?(this.props.onExit&&this.props.onExit(this.node),this.safeSetState({status:O},(function(){t.props.onExiting&&t.props.onExiting(t.node),t.onTransitionEnd(n.exit,(function(){t.safeSetState({status:C},(function(){t.props.onExited&&t.props.onExited(t.node)}))}))}))):this.safeSetState({status:C},(function(){t.props.onExited&&t.props.onExited(t.node)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&this.nextCallback.cancel&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(t,e){e=this.setNextCallback(e),this.setState(t,e)},n.setNextCallback=function(t){var e=this,n=!0;return this.nextCallback=function(){n&&(n=!1,e.nextCallback=null,t())},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(t,e){this.setNextCallback(e);var n=null==t&&!this.props.addEndListener;this.node&&!n?(this.props.addEndListener&&this.props.addEndListener(this.node,this.nextCallback),null!=t&&setTimeout(this.nextCallback,t)):setTimeout(this.nextCallback,0)},n.render=function(){var t=this.state.status;if(t===S)return null;var e=this.props;return(0,e.children)(t,E(e,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]))},y(e,[{key:"node",get:function(){var t,e=null===(t=this.props.nodeRef)||void 0===t?void 0:t.current;if(!e)throw new Error("notistack - Custom snackbar is not refForwarding");return e}}]),e}(r.Component);function k(){}function P(t,e){"function"==typeof t?t(e):t&&(t.current=e)}function N(t,e){return(0,r.useMemo)((function(){return null==t&&null==e?null:function(n){P(t,n),P(e,n)}}),[t,e])}function I(t){var e=t.timeout,n=t.style,r=void 0===n?{}:n,o=t.mode;return{duration:"object"==typeof e?e[o]||0:e,easing:r.transitionTimingFunction,delay:r.transitionDelay}}x.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:k,onEntering:k,onEntered:k,onExit:k,onExiting:k,onExited:k};var R="cubic-bezier(0.4, 0, 0.2, 1)",M="cubic-bezier(0.0, 0, 0.2, 1)",F="cubic-bezier(0.4, 0, 0.6, 1)",D=function(t){t.scrollTop=t.scrollTop},V=function(t){return Math.round(t)+"ms"};function B(t,e){void 0===t&&(t=["all"]);var n=e||{},r=n.duration,o=void 0===r?300:r,i=n.easing,a=void 0===i?R:i,s=n.delay,c=void 0===s?0:s;return(Array.isArray(t)?t:[t]).map((function(t){var e="string"==typeof o?o:V(o),n="string"==typeof c?c:V(c);return t+" "+e+" "+a+" "+n})).join(",")}function z(t){var e=function(t){return t&&t.ownerDocument||document}(t);return e.defaultView||window}function U(t,e){if(e){var n=function(t,e){var n,r=e.getBoundingClientRect(),o=z(e);if(e.fakeTransform)n=e.fakeTransform;else{var i=o.getComputedStyle(e);n=i.getPropertyValue("-webkit-transform")||i.getPropertyValue("transform")}var a=0,s=0;if(n&&"none"!==n&&"string"==typeof n){var c=n.split("(")[1].split(")")[0].split(",");a=parseInt(c[4],10),s=parseInt(c[5],10)}switch(t){case"left":return"translateX("+(o.innerWidth+a-r.left)+"px)";case"right":return"translateX(-"+(r.left+r.width-a)+"px)";case"up":return"translateY("+(o.innerHeight+s-r.top)+"px)";default:return"translateY(-"+(r.top+r.height-s)+"px)"}}(t,e);n&&(e.style.webkitTransform=n,e.style.transform=n)}}var j=(0,r.forwardRef)((function(t,e){var n=t.children,o=t.direction,i=void 0===o?"down":o,a=t.in,s=t.style,c=t.timeout,l=void 0===c?0:c,u=t.onEnter,h=t.onEntered,p=t.onExit,f=t.onExited,d=E(t,["children","direction","in","style","timeout","onEnter","onEntered","onExit","onExited"]),m=(0,r.useRef)(null),g=N(n.ref,m),v=N(g,e),y=(0,r.useCallback)((function(){m.current&&U(i,m.current)}),[i]);return(0,r.useEffect)((function(){if(!a&&"down"!==i&&"right"!==i){var t=function(t,e){var n;function r(){for(var r=this,o=arguments.length,i=new Array(o),a=0;a{"use strict";var r=n(2985);function o(){}function i(){}i.resetWarningCache=o,t.exports=function(){function t(t,e,n,o,i,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function e(){return t}t.isRequired=t;var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},2736:(t,e,n)=>{t.exports=n(6186)()},2985:t=>{"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},4848:(t,e,n)=>{"use strict";t.exports=n(5948)},5948:(t,e,n)=>{"use strict";var r=e;function o(){r.util._configure(),r.Writer._configure(r.BufferWriter),r.Reader._configure(r.BufferReader)}r.build="minimal",r.Writer=n(2387),r.BufferWriter=n(7292),r.Reader=n(3619),r.BufferReader=n(108),r.util=n(6736),r.rpc=n(7481),r.roots=n(3603),r.configure=o,o()},3619:(t,e,n)=>{"use strict";t.exports=c;var r,o=n(6736),i=o.LongBits,a=o.utf8;function s(t,e){return RangeError("index out of range: "+t.pos+" + "+(e||1)+" > "+t.len)}function c(t){this.buf=t,this.pos=0,this.len=t.length}var l,u="undefined"!=typeof Uint8Array?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new c(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new c(t);throw Error("illegal buffer")},h=function(){return o.Buffer?function(t){return(c.create=function(t){return o.Buffer.isBuffer(t)?new r(t):u(t)})(t)}:u};function p(){var t=new i(0,0),e=0;if(!(this.len-this.pos>4)){for(;e<3;++e){if(this.pos>=this.len)throw s(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*e)>>>0,this.buf[this.pos++]<128)return t}return t.lo=(t.lo|(127&this.buf[this.pos++])<<7*e)>>>0,t}for(;e<4;++e)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*e)>>>0,this.buf[this.pos++]<128)return t;if(t.lo=(t.lo|(127&this.buf[this.pos])<<28)>>>0,t.hi=(t.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return t;if(e=0,this.len-this.pos>4){for(;e<5;++e)if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*e+3)>>>0,this.buf[this.pos++]<128)return t}else for(;e<5;++e){if(this.pos>=this.len)throw s(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*e+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}function f(t,e){return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0}function d(){if(this.pos+8>this.len)throw s(this,8);return new i(f(this.buf,this.pos+=4),f(this.buf,this.pos+=4))}c.create=h(),c.prototype._slice=o.Array.prototype.subarray||o.Array.prototype.slice,c.prototype.uint32=(l=4294967295,function(){if(l=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return l;if(l=(l|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return l;if(l=(l|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return l;if(l=(l|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return l;if(l=(l|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return l;if((this.pos+=5)>this.len)throw this.pos=this.len,s(this,10);return l}),c.prototype.int32=function(){return 0|this.uint32()},c.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)|0},c.prototype.bool=function(){return 0!==this.uint32()},c.prototype.fixed32=function(){if(this.pos+4>this.len)throw s(this,4);return f(this.buf,this.pos+=4)},c.prototype.sfixed32=function(){if(this.pos+4>this.len)throw s(this,4);return 0|f(this.buf,this.pos+=4)},c.prototype.float=function(){if(this.pos+4>this.len)throw s(this,4);var t=o.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t},c.prototype.double=function(){if(this.pos+8>this.len)throw s(this,4);var t=o.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t},c.prototype.bytes=function(){var t=this.uint32(),e=this.pos,n=this.pos+t;if(n>this.len)throw s(this,t);if(this.pos+=t,Array.isArray(this.buf))return this.buf.slice(e,n);if(e===n){var r=o.Buffer;return r?r.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,e,n)},c.prototype.string=function(){var t=this.bytes();return a.read(t,0,t.length)},c.prototype.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw s(this,t);this.pos+=t}else do{if(this.pos>=this.len)throw s(this)}while(128&this.buf[this.pos++]);return this},c.prototype.skipType=function(t){switch(t){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(t=7&this.uint32());)this.skipType(t);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this},c._configure=function(t){r=t,c.create=h(),r._configure();var e=o.Long?"toLong":"toNumber";o.merge(c.prototype,{int64:function(){return p.call(this)[e](!1)},uint64:function(){return p.call(this)[e](!0)},sint64:function(){return p.call(this).zzDecode()[e](!1)},fixed64:function(){return d.call(this)[e](!0)},sfixed64:function(){return d.call(this)[e](!1)}})}},108:(t,e,n)=>{"use strict";t.exports=i;var r=n(3619);(i.prototype=Object.create(r.prototype)).constructor=i;var o=n(6736);function i(t){r.call(this,t)}i._configure=function(){o.Buffer&&(i.prototype._slice=o.Buffer.prototype.slice)},i.prototype.string=function(){var t=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+t,this.len))},i._configure()},3603:t=>{"use strict";t.exports={}},7481:(t,e,n)=>{"use strict";e.Service=n(9889)},9889:(t,e,n)=>{"use strict";t.exports=o;var r=n(6736);function o(t,e,n){if("function"!=typeof t)throw TypeError("rpcImpl must be a function");r.EventEmitter.call(this),this.rpcImpl=t,this.requestDelimited=Boolean(e),this.responseDelimited=Boolean(n)}(o.prototype=Object.create(r.EventEmitter.prototype)).constructor=o,o.prototype.rpcCall=function t(e,n,o,i,a){if(!i)throw TypeError("request must be specified");var s=this;if(!a)return r.asPromise(t,s,e,n,o,i);if(s.rpcImpl)try{return s.rpcImpl(e,n[s.requestDelimited?"encodeDelimited":"encode"](i).finish(),(function(t,n){if(t)return s.emit("error",t,e),a(t);if(null!==n){if(!(n instanceof o))try{n=o[s.responseDelimited?"decodeDelimited":"decode"](n)}catch(t){return s.emit("error",t,e),a(t)}return s.emit("data",n,e),a(null,n)}s.end(!0)}))}catch(t){return s.emit("error",t,e),void setTimeout((function(){a(t)}),0)}else setTimeout((function(){a(Error("already ended"))}),0)},o.prototype.end=function(t){return this.rpcImpl&&(t||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},9433:(t,e,n)=>{"use strict";t.exports=o;var r=n(6736);function o(t,e){this.lo=t>>>0,this.hi=e>>>0}var i=o.zero=new o(0,0);i.toNumber=function(){return 0},i.zzEncode=i.zzDecode=function(){return this},i.length=function(){return 1};var a=o.zeroHash="\0\0\0\0\0\0\0\0";o.fromNumber=function(t){if(0===t)return i;var e=t<0;e&&(t=-t);var n=t>>>0,r=(t-n)/4294967296>>>0;return e&&(r=~r>>>0,n=~n>>>0,++n>4294967295&&(n=0,++r>4294967295&&(r=0))),new o(n,r)},o.from=function(t){if("number"==typeof t)return o.fromNumber(t);if(r.isString(t)){if(!r.Long)return o.fromNumber(parseInt(t,10));t=r.Long.fromString(t)}return t.low||t.high?new o(t.low>>>0,t.high>>>0):i},o.prototype.toNumber=function(t){if(!t&&this.hi>>>31){var e=1+~this.lo>>>0,n=~this.hi>>>0;return e||(n=n+1>>>0),-(e+4294967296*n)}return this.lo+4294967296*this.hi},o.prototype.toLong=function(t){return r.Long?new r.Long(0|this.lo,0|this.hi,Boolean(t)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(t)}};var s=String.prototype.charCodeAt;o.fromHash=function(t){return t===a?i:new o((s.call(t,0)|s.call(t,1)<<8|s.call(t,2)<<16|s.call(t,3)<<24)>>>0,(s.call(t,4)|s.call(t,5)<<8|s.call(t,6)<<16|s.call(t,7)<<24)>>>0)},o.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},o.prototype.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this},o.prototype.zzDecode=function(){var t=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this},o.prototype.length=function(){var t=this.lo,e=(this.lo>>>28|this.hi<<4)>>>0,n=this.hi>>>24;return 0===n?0===e?t<16384?t<128?1:2:t<2097152?3:4:e<16384?e<128?5:6:e<2097152?7:8:n<128?9:10}},6736:function(t,e,n){"use strict";var r=e;function o(t,e,n){for(var r=Object.keys(e),o=0;o0)},r.Buffer=function(){try{var t=r.inquire("buffer").Buffer;return t.prototype.utf8Write?t:null}catch(t){return null}}(),r._Buffer_from=null,r._Buffer_allocUnsafe=null,r.newBuffer=function(t){return"number"==typeof t?r.Buffer?r._Buffer_allocUnsafe(t):new r.Array(t):r.Buffer?r._Buffer_from(t):"undefined"==typeof Uint8Array?t:new Uint8Array(t)},r.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,r.Long=r.global.dcodeIO&&r.global.dcodeIO.Long||r.global.Long||r.inquire("long"),r.key2Re=/^true|false|0|1$/,r.key32Re=/^-?(?:0|[1-9][0-9]*)$/,r.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,r.longToHash=function(t){return t?r.LongBits.from(t).toHash():r.LongBits.zeroHash},r.longFromHash=function(t,e){var n=r.LongBits.fromHash(t);return r.Long?r.Long.fromBits(n.lo,n.hi,e):n.toNumber(Boolean(e))},r.merge=o,r.lcFirst=function(t){return t.charAt(0).toLowerCase()+t.substring(1)},r.newError=i,r.ProtocolError=i("ProtocolError"),r.oneOfGetter=function(t){for(var e={},n=0;n-1;--n)if(1===e[t[n]]&&void 0!==this[t[n]]&&null!==this[t[n]])return t[n]}},r.oneOfSetter=function(t){return function(e){for(var n=0;n{"use strict";t.exports=h;var r,o=n(6736),i=o.LongBits,a=o.base64,s=o.utf8;function c(t,e,n){this.fn=t,this.len=e,this.next=void 0,this.val=n}function l(){}function u(t){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=t.states}function h(){this.len=0,this.head=new c(l,0,0),this.tail=this.head,this.states=null}var p=function(){return o.Buffer?function(){return(h.create=function(){return new r})()}:function(){return new h}};function f(t,e,n){e[n]=255&t}function d(t,e){this.len=t,this.next=void 0,this.val=e}function m(t,e,n){for(;t.hi;)e[n++]=127&t.lo|128,t.lo=(t.lo>>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;t.lo>127;)e[n++]=127&t.lo|128,t.lo=t.lo>>>7;e[n++]=t.lo}function g(t,e,n){e[n]=255&t,e[n+1]=t>>>8&255,e[n+2]=t>>>16&255,e[n+3]=t>>>24}h.create=p(),h.alloc=function(t){return new o.Array(t)},o.Array!==Array&&(h.alloc=o.pool(h.alloc,o.Array.prototype.subarray)),h.prototype._push=function(t,e,n){return this.tail=this.tail.next=new c(t,e,n),this.len+=e,this},d.prototype=Object.create(c.prototype),d.prototype.fn=function(t,e,n){for(;t>127;)e[n++]=127&t|128,t>>>=7;e[n]=t},h.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new d((t>>>=0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this},h.prototype.int32=function(t){return t<0?this._push(m,10,i.fromNumber(t)):this.uint32(t)},h.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},h.prototype.uint64=function(t){var e=i.from(t);return this._push(m,e.length(),e)},h.prototype.int64=h.prototype.uint64,h.prototype.sint64=function(t){var e=i.from(t).zzEncode();return this._push(m,e.length(),e)},h.prototype.bool=function(t){return this._push(f,1,t?1:0)},h.prototype.fixed32=function(t){return this._push(g,4,t>>>0)},h.prototype.sfixed32=h.prototype.fixed32,h.prototype.fixed64=function(t){var e=i.from(t);return this._push(g,4,e.lo)._push(g,4,e.hi)},h.prototype.sfixed64=h.prototype.fixed64,h.prototype.float=function(t){return this._push(o.float.writeFloatLE,4,t)},h.prototype.double=function(t){return this._push(o.float.writeDoubleLE,8,t)};var v=o.Array.prototype.set?function(t,e,n){e.set(t,n)}:function(t,e,n){for(var r=0;r>>0;if(!e)return this._push(f,1,0);if(o.isString(t)){var n=h.alloc(e=a.length(t));a.decode(t,n,0),t=n}return this.uint32(e)._push(v,e,t)},h.prototype.string=function(t){var e=s.length(t);return e?this.uint32(e)._push(s.write,e,t):this._push(f,1,0)},h.prototype.fork=function(){return this.states=new u(this),this.head=this.tail=new c(l,0,0),this.len=0,this},h.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new c(l,0,0),this.len=0),this},h.prototype.ldelim=function(){var t=this.head,e=this.tail,n=this.len;return this.reset().uint32(n),n&&(this.tail.next=t.next,this.tail=e,this.len+=n),this},h.prototype.finish=function(){for(var t=this.head.next,e=this.constructor.alloc(this.len),n=0;t;)t.fn(t.val,e,n),n+=t.len,t=t.next;return e},h._configure=function(t){r=t,h.create=p(),r._configure()}},7292:(t,e,n)=>{"use strict";t.exports=i;var r=n(2387);(i.prototype=Object.create(r.prototype)).constructor=i;var o=n(6736);function i(){r.call(this)}function a(t,e,n){t.length<40?o.utf8.write(t,e,n):e.utf8Write?e.utf8Write(t,n):e.write(t,n)}i._configure=function(){i.alloc=o._Buffer_allocUnsafe,i.writeBytesBuffer=o.Buffer&&o.Buffer.prototype instanceof Uint8Array&&"set"===o.Buffer.prototype.set.name?function(t,e,n){e.set(t,n)}:function(t,e,n){if(t.copy)t.copy(e,n,0,t.length);else for(var r=0;r>>0;return this.uint32(e),e&&this._push(i.writeBytesBuffer,e,t),this},i.prototype.string=function(t){var e=o.Buffer.byteLength(t);return this.uint32(e),e&&this._push(a,e,t),this},i._configure()},7495:(t,e,n)=>{"use strict";var r=n(758);function o(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n