@snapcall/stream-ui 1.13.0 → 1.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -354,7 +354,7 @@ to {
354
354
  /*! iNoBounce - v0.2.0
355
355
  * https://github.com/lazd/iNoBounce/
356
356
  * Copyright (c) 2013 Larry Davis <lazdnet@gmail.com>; Licensed BSD */
357
- !function(e){var t=0,r=!1,n=!1;try{var i=Object.defineProperty({},"passive",{get:function(){n=!0}});window.addEventListener("test",null,i)}catch(e){}var o=function(e){var r=e.target,n=window.innerWidth/window.document.documentElement.clientWidth;if(!(e.touches.length>1||1!==n)){for(;r!==document.body&&r!==document;){var i=window.getComputedStyle(r);if(!i)break;if("INPUT"===r.nodeName&&"range"===r.getAttribute("type"))return;var o=i.getPropertyValue("-webkit-overflow-scrolling"),a=i.getPropertyValue("overflow-y"),s=parseInt(i.getPropertyValue("height"),10),c="touch"===o&&("auto"===a||"scroll"===a),l=r.scrollHeight>r.offsetHeight;if(c&&l){var d=e.touches?e.touches[0].screenY:e.screenY,u=t<=d&&0===r.scrollTop,p=t>=d&&r.scrollHeight-r.scrollTop===s;return void((u||p)&&e.preventDefault())}r=r.parentNode}e.preventDefault()}},a=function(e){t=e.touches?e.touches[0].screenY:e.screenY},s=function(){window.addEventListener("touchstart",a,!!n&&{passive:!1}),window.addEventListener("touchmove",o,!!n&&{passive:!1}),r=!0},c=document.createElement("div");document.documentElement.appendChild(c),c.style.WebkitOverflowScrolling="touch";var l="getComputedStyle"in window&&"touch"===window.getComputedStyle(c)["-webkit-overflow-scrolling"];document.documentElement.removeChild(c),l&&s();var d={enable:s,disable:function(){window.removeEventListener("touchstart",a,!1),window.removeEventListener("touchmove",o,!1),r=!1},isEnabled:function(){return r},isScrollSupported:l};Nr&&(Nr=d),"function"==typeof e.define?function(e){e("iNoBounce",[],(function(){return d}))}(e.define):e.iNoBounce=d}(Nr);var rn={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},nn=new(function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};zr(this,e),this.init(t,r)}return Ur(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||rn,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,r,n){return n&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(r).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,tn(tn({},{prefix:"".concat(this.prefix,":").concat(t,":")}),this.options))}}]),e}()),on=function(){function e(){zr(this,e),this.observers={}}return Ur(e,[{key:"on",value:function(e,t){var r=this;return e.split(" ").forEach((function(e){r.observers[e]=r.observers[e]||[],r.observers[e].push(t)})),this}},{key:"off",value:function(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter((function(e){return e!==t})):delete this.observers[e])}},{key:"emit",value:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];if(this.observers[e]){var i=[].concat(this.observers[e]);i.forEach((function(e){e.apply(void 0,r)}))}if(this.observers["*"]){var o=[].concat(this.observers["*"]);o.forEach((function(t){t.apply(t,[e].concat(r))}))}}}]),e}();function an(){var e,t,r=new Promise((function(r,n){e=r,t=n}));return r.resolve=e,r.reject=t,r}function sn(e){return null==e?"":""+e}function cn(e,t,r){e.forEach((function(e){t[e]&&(r[e]=t[e])}))}function ln(e,t,r){function n(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function i(){return!e||"string"==typeof e}for(var o="string"!=typeof t?[].concat(t):t.split(".");o.length>1;){if(i())return{};var a=n(o.shift());!e[a]&&r&&(e[a]=new r),e=Object.prototype.hasOwnProperty.call(e,a)?e[a]:{}}return i()?{}:{obj:e,k:n(o.shift())}}function dn(e,t,r){var n=ln(e,t,Object);n.obj[n.k]=r}function un(e,t){var r=ln(e,t),n=r.obj,i=r.k;if(n)return n[i]}function pn(e,t,r){var n=un(e,r);return void 0!==n?n:un(t,r)}function hn(e,t,r){for(var n in t)"__proto__"!==n&&"constructor"!==n&&(n in e?"string"==typeof e[n]||e[n]instanceof String||"string"==typeof t[n]||t[n]instanceof String?r&&(e[n]=t[n]):hn(e[n],t[n],r):e[n]=t[n]);return e}function fn(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var mn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function gn(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return mn[e]})):e}var vn="undefined"!=typeof window&&window.navigator&&void 0===window.navigator.userAgentData&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,yn=[" ",",","?","!",";"];function bn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function wn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?bn(Object(r),!0).forEach((function(t){Kr(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bn(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function xn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=$r(e);if(t){var i=$r(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Wr(this,r)}}function Sn(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(e){if(e[t])return e[t];for(var n=t.split(r),i=e,o=0;o<n.length;++o){if(!i)return;if("string"==typeof i[n[o]]&&o+1<n.length)return;if(void 0===i[n[o]]){for(var a=2,s=n.slice(o,o+a).join(r),c=i[s];void 0===c&&n.length>o+a;)a++,c=i[s=n.slice(o,o+a).join(r)];if(void 0===c)return;if(null===c)return null;if(t.endsWith(s)){if("string"==typeof c)return c;if(s&&"string"==typeof c[s])return c[s]}var l=n.slice(o+a).join(r);return l?Sn(c,l,r):void 0}i=i[n[o]]}return i}}var _n=function(e){qr(r,e);var t=xn(r);function r(e){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return zr(this,r),n=t.call(this),vn&&on.call(Vr(n)),n.data=e||{},n.options=i,void 0===n.options.keySeparator&&(n.options.keySeparator="."),void 0===n.options.ignoreJSONStructure&&(n.options.ignoreJSONStructure=!0),n}return Ur(r,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,o=void 0!==n.ignoreJSONStructure?n.ignoreJSONStructure:this.options.ignoreJSONStructure,a=[e,t];r&&"string"!=typeof r&&(a=a.concat(r)),r&&"string"==typeof r&&(a=a.concat(i?r.split(i):r)),e.indexOf(".")>-1&&(a=e.split("."));var s=un(this.data,a);return s||!o||"string"!=typeof r?s:Sn(this.data&&this.data[e]&&this.data[e][t],r,i)}},{key:"addResource",value:function(e,t,r,n){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},o=this.options.keySeparator;void 0===o&&(o=".");var a=[e,t];r&&(a=a.concat(o?r.split(o):r)),e.indexOf(".")>-1&&(n=t,t=(a=e.split("."))[1]),this.addNamespaces(t),dn(this.data,a,n),i.silent||this.emit("added",e,t,r,n)}},{key:"addResources",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var i in r)"string"!=typeof r[i]&&"[object Array]"!==Object.prototype.toString.apply(r[i])||this.addResource(e,t,i,r[i],{silent:!0});n.silent||this.emit("added",e,t,r)}},{key:"addResourceBundle",value:function(e,t,r,n,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(n=r,r=t,t=(a=e.split("."))[1]),this.addNamespaces(t);var s=un(this.data,a)||{};n?hn(s,r,i):s=wn(wn({},s),r),dn(this.data,a,s),o.silent||this.emit("added",e,t,r)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?wn(wn({},{}),this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"hasLanguageSomeTranslations",value:function(e){var t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find((function(e){return t[e]&&Object.keys(t[e]).length>0}))}},{key:"toJSON",value:function(){return this.data}}]),r}(on),kn={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,r,n,i){var o=this;return e.forEach((function(e){o.processors[e]&&(t=o.processors[e].process(t,r,n,i))})),t}};function Cn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function En(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Cn(Object(r),!0).forEach((function(t){Kr(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Cn(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Pn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=$r(e);if(t){var i=$r(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Wr(this,r)}}var Rn={},Tn=function(e){qr(r,e);var t=Pn(r);function r(e){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return zr(this,r),n=t.call(this),vn&&on.call(Vr(n)),cn(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,Vr(n)),n.options=i,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n.logger=nn.create("translator"),n}return Ur(r,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;var r=this.resolve(e,t);return r&&void 0!==r.res}},{key:"extractFromKey",value:function(e,t){var r=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===r&&(r=":");var n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,i=t.ns||this.options.defaultNS||[],o=r&&e.indexOf(r)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||function(e,t,r){t=t||"",r=r||"";var n=yn.filter((function(e){return t.indexOf(e)<0&&r.indexOf(e)<0}));if(0===n.length)return!0;var i=new RegExp("(".concat(n.map((function(e){return"?"===e?"\\?":e})).join("|"),")")),o=!i.test(e);if(!o){var a=e.indexOf(r);a>0&&!i.test(e.substring(0,a))&&(o=!0)}return o}(e,r,n));if(o&&!a){var s=e.match(this.interpolator.nestingRegexp);if(s&&s.length>0)return{key:e,namespaces:i};var c=e.split(r);(r!==n||r===n&&this.options.ns.indexOf(c[0])>-1)&&(i=c.shift()),e=c.join(n)}return"string"==typeof i&&(i=[i]),{key:e,namespaces:i}}},{key:"translate",value:function(e,t,n){var i=this;if("object"!==Fr(t)&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var o=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,a=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,s=this.extractFromKey(e[e.length-1],t),c=s.key,l=s.namespaces,d=l[l.length-1],u=t.lng||this.language,p=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&"cimode"===u.toLowerCase()){if(p){var h=t.nsSeparator||this.options.nsSeparator;return o?(f.res="".concat(d).concat(h).concat(c),f):"".concat(d).concat(h).concat(c)}return o?(f.res=c,f):c}var f=this.resolve(e,t),m=f&&f.res,g=f&&f.usedKey||c,v=f&&f.exactUsedKey||c,y=Object.prototype.toString.apply(m),b=["[object Number]","[object Function]","[object RegExp]"],w=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject,S="string"!=typeof m&&"boolean"!=typeof m&&"number"!=typeof m;if(x&&m&&S&&b.indexOf(y)<0&&("string"!=typeof w||"[object Array]"!==y)){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var _=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,m,En(En({},t),{},{ns:l})):"key '".concat(c," (").concat(this.language,")' returned an object instead of string.");return o?(f.res=_,f):_}if(a){var k="[object Array]"===y,C=k?[]:{},E=k?v:g;for(var P in m)if(Object.prototype.hasOwnProperty.call(m,P)){var R="".concat(E).concat(a).concat(P);C[P]=this.translate(R,En(En({},t),{joinArrays:!1,ns:l})),C[P]===R&&(C[P]=m[P])}m=C}}else if(x&&"string"==typeof w&&"[object Array]"===y)(m=m.join(w))&&(m=this.extendTranslation(m,e,t,n));else{var T=!1,j=!1,O=void 0!==t.count&&"string"!=typeof t.count,M=r.hasDefaultValue(t),L=O?this.pluralResolver.getSuffix(u,t.count,t):"",D=t["defaultValue".concat(L)]||t.defaultValue;!this.isValidLookup(m)&&M&&(T=!0,m=D),this.isValidLookup(m)||(j=!0,m=c);var I=t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,A=I&&j?void 0:m,N=M&&D!==m&&this.options.updateMissing;if(j||T||N){if(this.logger.log(N?"updateKey":"missingKey",u,d,c,N?D:m),a){var F=this.resolve(c,En(En({},t),{},{keySeparator:!1}));F&&F.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var z=[],B=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&B&&B[0])for(var U=0;U<B.length;U++)z.push(B[U]);else"all"===this.options.saveMissingTo?z=this.languageUtils.toResolveHierarchy(t.lng||this.language):z.push(t.lng||this.language);var V=function(e,r,n){var o=M&&n!==m?n:A;i.options.missingKeyHandler?i.options.missingKeyHandler(e,d,r,o,N,t):i.backendConnector&&i.backendConnector.saveMissing&&i.backendConnector.saveMissing(e,d,r,o,N,t),i.emit("missingKey",e,d,r,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&O?z.forEach((function(e){i.pluralResolver.getSuffixes(e,t).forEach((function(r){V([e],c+r,t["defaultValue".concat(r)]||D)}))})):V(z,c,D))}m=this.extendTranslation(m,e,t,f,n),j&&m===c&&this.options.appendNamespaceToMissingKey&&(m="".concat(d,":").concat(c)),(j||T)&&this.options.parseMissingKeyHandler&&(m="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(d,":").concat(c):c,T?m:void 0):this.options.parseMissingKeyHandler(m))}return o?(f.res=m,f):m}},{key:"extendTranslation",value:function(e,t,r,n,i){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,En(En({},this.options.interpolation.defaultVariables),r),n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init(En(En({},r),{interpolation:En(En({},this.options.interpolation),r.interpolation)}));var a,s="string"==typeof e&&(r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(s){var c=e.match(this.interpolator.nestingRegexp);a=c&&c.length}var l=r.replace&&"string"!=typeof r.replace?r.replace:r;if(this.options.interpolation.defaultVariables&&(l=En(En({},this.options.interpolation.defaultVariables),l)),e=this.interpolator.interpolate(e,l,r.lng||this.language,r),s){var d=e.match(this.interpolator.nestingRegexp);a<(d&&d.length)&&(r.nest=!1)}!1!==r.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,n=new Array(e),a=0;a<e;a++)n[a]=arguments[a];return i&&i[0]===n[0]&&!r.context?(o.logger.warn("It seems you are nesting recursively key: ".concat(n[0]," in key: ").concat(t[0])),null):o.translate.apply(o,n.concat([t]))}),r)),r.interpolation&&this.interpolator.reset()}var u=r.postProcess||this.options.postProcess,p="string"==typeof u?[u]:u;return null!=e&&p&&p.length&&!1!==r.applyPostProcessor&&(e=kn.handle(p,e,t,this.options&&this.options.postProcessPassResolved?En({i18nResolved:n},r):r,this)),e}},{key:"resolve",value:function(e){var t,r,n,i,o,a=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!a.isValidLookup(t)){var c=a.extractFromKey(e,s),l=c.key;r=l;var d=c.namespaces;a.options.fallbackNS&&(d=d.concat(a.options.fallbackNS));var u=void 0!==s.count&&"string"!=typeof s.count,p=u&&!s.ordinal&&0===s.count&&a.pluralResolver.shouldUseIntlApi(),h=void 0!==s.context&&("string"==typeof s.context||"number"==typeof s.context)&&""!==s.context,f=s.lngs?s.lngs:a.languageUtils.toResolveHierarchy(s.lng||a.language,s.fallbackLng);d.forEach((function(e){a.isValidLookup(t)||(o=e,!Rn["".concat(f[0],"-").concat(e)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(o)&&(Rn["".concat(f[0],"-").concat(e)]=!0,a.logger.warn('key "'.concat(r,'" for languages "').concat(f.join(", "),'" won\'t get resolved as namespace "').concat(o,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),f.forEach((function(r){if(!a.isValidLookup(t)){i=r;var o,c=[l];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(c,l,r,e,s);else{var d;u&&(d=a.pluralResolver.getSuffix(r,s.count,s));var f="".concat(a.options.pluralSeparator,"zero");if(u&&(c.push(l+d),p&&c.push(l+f)),h){var m="".concat(l).concat(a.options.contextSeparator).concat(s.context);c.push(m),u&&(c.push(m+d),p&&c.push(m+f))}}for(;o=c.pop();)a.isValidLookup(t)||(n=o,t=a.getResource(r,e,o,s))}})))}))}})),{res:t,usedKey:r,exactUsedKey:n,usedLng:i,usedNS:o}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,r,n):this.resourceStore.getResource(e,t,r,n)}}],[{key:"hasDefaultValue",value:function(e){var t="defaultValue";for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t===r.substring(0,t.length)&&void 0!==e[r])return!0;return!1}}]),r}(on);function jn(e){return e.charAt(0).toUpperCase()+e.slice(1)}var On=function(){function e(t){zr(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=nn.create("languageUtils")}return Ur(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],r=e.split("-");return this.options.lowerCaseLng?r=r.map((function(e){return e.toLowerCase()})):2===r.length?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=jn(r[1].toLowerCase()))):3===r.length&&(r[0]=r[0].toLowerCase(),2===r[1].length&&(r[1]=r[1].toUpperCase()),"sgn"!==r[0]&&2===r[2].length&&(r[2]=r[2].toUpperCase()),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=jn(r[1].toLowerCase())),t.indexOf(r[2].toLowerCase())>-1&&(r[2]=jn(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,r=this;return e?(e.forEach((function(e){if(!t){var n=r.formatLanguageCode(e);r.options.supportedLngs&&!r.isSupportedCode(n)||(t=n)}})),!t&&this.options.supportedLngs&&e.forEach((function(e){if(!t){var n=r.getLanguagePartFromCode(e);if(r.isSupportedCode(n))return t=n;t=r.options.supportedLngs.find((function(e){if(0===e.indexOf(n))return e}))}})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var r=e[t];return r||(r=e[this.getScriptPartFromCode(t)]),r||(r=e[this.formatLanguageCode(t)]),r||(r=e[this.getLanguagePartFromCode(t)]),r||(r=e.default),r||[]}},{key:"toResolveHierarchy",value:function(e,t){var r=this,n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),i=[],o=function(e){e&&(r.isSupportedCode(e)?i.push(e):r.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):"string"==typeof e&&o(this.formatLanguageCode(e)),n.forEach((function(e){i.indexOf(e)<0&&o(r.formatLanguageCode(e))})),i}}]),e}(),Mn=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],Ln={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}},Dn=["v1","v2","v3"],In={zero:0,one:1,two:2,few:3,many:4,other:5};function An(){var e={};return Mn.forEach((function(t){t.lngs.forEach((function(r){e[r]={numbers:t.nr,plurals:Ln[t.fc]}}))})),e}var Nn=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};zr(this,e),this.languageUtils=t,this.options=r,this.logger=nn.create("pluralResolver"),this.options.compatibilityJSON&&"v4"!==this.options.compatibilityJSON||"undefined"!=typeof Intl&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=An()}return Ur(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(e,{type:t.ordinal?"ordinal":"cardinal"})}catch(e){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.getRule(e,t);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,r).map((function(e){return"".concat(t).concat(e)}))}},{key:"getSuffixes",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,r);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort((function(e,t){return In[e]-In[t]})).map((function(e){return"".concat(t.options.prepend).concat(e)})):n.numbers.map((function(n){return t.getSuffix(e,n,r)})):[]}},{key:"getSuffix",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=this.getRule(e,r);return n?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(n.select(t)):this.getSuffixRetroCompatible(n,t):(this.logger.warn("no plural rule found for: ".concat(e)),"")}},{key:"getSuffixRetroCompatible",value:function(e,t){var r=this,n=e.noAbs?e.plurals(t):e.plurals(Math.abs(t)),i=e.numbers[n];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===i?i="plural":1===i&&(i=""));var o=function(){return r.options.prepend&&i.toString()?r.options.prepend+i.toString():i.toString()};return"v1"===this.options.compatibilityJSON?1===i?"":"number"==typeof i?"_plural_".concat(i.toString()):o():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?o():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}},{key:"shouldUseIntlApi",value:function(){return!Dn.includes(this.options.compatibilityJSON)}}]),e}();function Fn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function zn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Fn(Object(r),!0).forEach((function(t){Kr(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fn(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Bn=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};zr(this,e),this.logger=nn.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return Ur(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:gn,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?fn(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?fn(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?fn(t.nestingPrefix):t.nestingPrefixEscaped||fn("$t("),this.nestingSuffix=t.nestingSuffix?fn(t.nestingSuffix):t.nestingSuffixEscaped||fn(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var r="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(r,"g")}},{key:"interpolate",value:function(e,t,r,n){var i,o,a,s=this,c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function l(e){return e.replace(/\$/g,"$$$$")}var d=function(e){if(e.indexOf(s.formatSeparator)<0){var i=pn(t,c,e);return s.alwaysFormat?s.format(i,void 0,r,zn(zn(zn({},n),t),{},{interpolationkey:e})):i}var o=e.split(s.formatSeparator),a=o.shift().trim(),l=o.join(s.formatSeparator).trim();return s.format(pn(t,c,a),l,r,zn(zn(zn({},n),t),{},{interpolationkey:a}))};this.resetRegExp();var u=n&&n.missingInterpolationHandler||this.options.missingInterpolationHandler,p=n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return l(e)}},{regex:this.regexp,safeValue:function(e){return s.escapeValue?l(s.escape(e)):l(e)}}].forEach((function(t){for(a=0;i=t.regex.exec(e);){var r=i[1].trim();if(void 0===(o=d(r)))if("function"==typeof u){var c=u(e,i,n);o="string"==typeof c?c:""}else if(n&&n.hasOwnProperty(r))o="";else{if(p){o=i[0];continue}s.logger.warn("missed to pass in variable ".concat(r," for interpolating ").concat(e)),o=""}else"string"==typeof o||s.useRawValueToEscape||(o=sn(o));var l=t.safeValue(o);if(e=e.replace(i[0],l),p?(t.regex.lastIndex+=o.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,++a>=s.maxReplaces)break}})),e}},{key:"nest",value:function(e,t){var r,n,i=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=zn({},o);function s(e,t){var r=this.nestingOptionsSeparator;if(e.indexOf(r)<0)return e;var n=e.split(new RegExp("".concat(r,"[ ]*{"))),i="{".concat(n[1]);e=n[0],i=(i=this.interpolate(i,a)).replace(/'/g,'"');try{a=JSON.parse(i),t&&(a=zn(zn({},t),a))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(r).concat(i)}return delete a.defaultValue,e}for(a.applyPostProcessor=!1,delete a.defaultValue;r=this.nestingRegexp.exec(e);){var c=[],l=!1;if(-1!==r[0].indexOf(this.formatSeparator)&&!/{.*}/.test(r[1])){var d=r[1].split(this.formatSeparator).map((function(e){return e.trim()}));r[1]=d.shift(),c=d,l=!0}if((n=t(s.call(this,r[1].trim(),a),a))&&r[0]===e&&"string"!=typeof n)return n;"string"!=typeof n&&(n=sn(n)),n||(this.logger.warn("missed to resolve ".concat(r[1]," for nesting ").concat(e)),n=""),l&&(n=c.reduce((function(e,t){return i.format(e,t,o.lng,zn(zn({},o),{},{interpolationkey:r[1].trim()}))}),n.trim())),e=e.replace(r[0],n),this.regexp.lastIndex=0}return e}}]),e}();function Un(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Vn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Un(Object(r),!0).forEach((function(t){Kr(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Un(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Hn=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};zr(this,e),this.logger=nn.create("formatter"),this.options=t,this.formats={number:function(e,t,r){return new Intl.NumberFormat(t,r).format(e)},currency:function(e,t,r){return new Intl.NumberFormat(t,Vn(Vn({},r),{},{style:"currency"})).format(e)},datetime:function(e,t,r){return new Intl.DateTimeFormat(t,Vn({},r)).format(e)},relativetime:function(e,t,r){return new Intl.RelativeTimeFormat(t,Vn({},r)).format(e,r.range||"day")},list:function(e,t,r){return new Intl.ListFormat(t,Vn({},r)).format(e)}},this.init(t)}return Ur(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},r=t.interpolation;this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||","}},{key:"add",value:function(e,t){this.formats[e.toLowerCase().trim()]=t}},{key:"format",value:function(e,t,r,n){var i=this;return t.split(this.formatSeparator).reduce((function(e,t){var o=function(e){var t=e.toLowerCase().trim(),r={};if(e.indexOf("(")>-1){var n=e.split("(");t=n[0].toLowerCase().trim();var i=n[1].substring(0,n[1].length-1);"currency"===t&&i.indexOf(":")<0?r.currency||(r.currency=i.trim()):"relativetime"===t&&i.indexOf(":")<0?r.range||(r.range=i.trim()):i.split(";").forEach((function(e){if(e){var t=Xr(e.split(":")),n=t[0],i=t.slice(1).join(":").trim().replace(/^'+|'+$/g,"");r[n.trim()]||(r[n.trim()]=i),"false"===i&&(r[n.trim()]=!1),"true"===i&&(r[n.trim()]=!0),isNaN(i)||(r[n.trim()]=parseInt(i,10))}}))}return{formatName:t,formatOptions:r}}(t),a=o.formatName,s=o.formatOptions;if(i.formats[a]){var c=e;try{var l=n&&n.formatParams&&n.formatParams[n.interpolationkey]||{},d=l.locale||l.lng||n.locale||n.lng||r;c=i.formats[a](e,d,Vn(Vn(Vn({},s),n),l))}catch(e){i.logger.warn(e)}return c}return i.logger.warn("there was no format function for ".concat(a)),e}),e)}}]),e}();function qn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Wn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?qn(Object(r),!0).forEach((function(t){Kr(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qn(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function $n(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=$r(e);if(t){var i=$r(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Wr(this,r)}}var Kn=function(e){qr(r,e);var t=$n(r);function r(e,n,i){var o,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return zr(this,r),o=t.call(this),vn&&on.call(Vr(o)),o.backend=e,o.store=n,o.services=i,o.languageUtils=i.languageUtils,o.options=a,o.logger=nn.create("backendConnector"),o.waitingReads=[],o.maxParallelReads=a.maxParallelReads||10,o.readingCalls=0,o.maxRetries=a.maxRetries>=0?a.maxRetries:5,o.retryTimeout=a.retryTimeout>=1?a.retryTimeout:350,o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(i,a.backend,a),o}return Ur(r,[{key:"queueLoad",value:function(e,t,r,n){var i=this,o={},a={},s={},c={};return e.forEach((function(e){var n=!0;t.forEach((function(t){var s="".concat(e,"|").concat(t);!r.reload&&i.store.hasResourceBundle(e,t)?i.state[s]=2:i.state[s]<0||(1===i.state[s]?void 0===a[s]&&(a[s]=!0):(i.state[s]=1,n=!1,void 0===a[s]&&(a[s]=!0),void 0===o[s]&&(o[s]=!0),void 0===c[t]&&(c[t]=!0)))})),n||(s[e]=!0)})),(Object.keys(o).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:n}),{toLoad:Object.keys(o),pending:Object.keys(a),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(c)}}},{key:"loaded",value:function(e,t,r){var n=e.split("|"),i=n[0],o=n[1];t&&this.emit("failedLoading",i,o,t),r&&this.store.addResourceBundle(i,o,r),this.state[e]=t?-1:2;var a={};this.queue.forEach((function(r){var n,s,c,l,d,u;n=r.loaded,s=o,l=ln(n,[i],Object),d=l.obj,u=l.k,d[u]=d[u]||[],c&&(d[u]=d[u].concat(s)),c||d[u].push(s),function(e,t){void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)}(r,e),t&&r.errors.push(t),0!==r.pendingCount||r.done||(Object.keys(r.loaded).forEach((function(e){a[e]||(a[e]={});var t=r.loaded[e];t.length&&t.forEach((function(t){void 0===a[e][t]&&(a[e][t]=!0)}))})),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,r){var n=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;return e.length?this.readingCalls>=this.maxParallelReads?void this.waitingReads.push({lng:e,ns:t,fcName:r,tried:i,wait:o,callback:a}):(this.readingCalls++,this.backend[r](e,t,(function(s,c){if(n.readingCalls--,n.waitingReads.length>0){var l=n.waitingReads.shift();n.read(l.lng,l.ns,l.fcName,l.tried,l.wait,l.callback)}s&&c&&i<n.maxRetries?setTimeout((function(){n.read.call(n,e,t,r,i+1,2*o,a)}),o):a(s,c)}))):a(null,{})}},{key:"prepareLoading",value:function(e,t){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var o=this.queueLoad(e,t,n,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach((function(e){r.loadOne(e)}))}},{key:"load",value:function(e,t,r){this.prepareLoading(e,t,{},r)}},{key:"reload",value:function(e,t,r){this.prepareLoading(e,t,{reload:!0},r)}},{key:"loadOne",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e.split("|"),i=n[0],o=n[1];this.read(i,o,"read",void 0,void 0,(function(n,a){n&&t.logger.warn("".concat(r,"loading namespace ").concat(o," for language ").concat(i," failed"),n),!n&&a&&t.logger.log("".concat(r,"loaded namespace ").concat(o," for language ").concat(i),a),t.loaded(e,n,a)}))}},{key:"saveMissing",value:function(e,t,r,n,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)?this.logger.warn('did not save key "'.concat(r,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):null!=r&&""!==r&&(this.backend&&this.backend.create&&this.backend.create(e,t,r,n,null,Wn(Wn({},o),{},{isUpdate:i})),e&&e[0]&&this.store.addResource(e[0],t,r,n))}}]),r}(on);function Gn(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===Fr(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===Fr(e[2])||"object"===Fr(e[3])){var r=e[3]||e[2];Object.keys(r).forEach((function(e){t[e]=r[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,r,n){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function Zn(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function Qn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Yn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Qn(Object(r),!0).forEach((function(t){Kr(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qn(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Jn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=$r(e);if(t){var i=$r(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Wr(this,r)}}function Xn(){}function ei(e){Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((function(t){"function"==typeof e[t]&&(e[t]=e[t].bind(e))}))}var ti=function(e){qr(r,e);var t=Jn(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;if(zr(this,r),e=t.call(this),vn&&on.call(Vr(e)),e.options=Zn(n),e.services={},e.logger=nn,e.modules={external:[]},ei(Vr(e)),i&&!e.isInitialized&&!n.isClone){if(!e.options.initImmediate)return e.init(n,i),Wr(e,Vr(e));setTimeout((function(){e.init(n,i)}),0)}return e}return Ur(r,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;"function"==typeof t&&(r=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&("string"==typeof t.ns?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));var n=Gn();function i(e){return e?"function"==typeof e?new e:e:null}if(this.options=Yn(Yn(Yn({},n),this.options),Zn(t)),"v1"!==this.options.compatibilityAPI&&(this.options.interpolation=Yn(Yn({},n.interpolation),this.options.interpolation)),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),!this.options.isClone){var o;this.modules.logger?nn.init(i(this.modules.logger),this.options):nn.init(null,this.options),this.modules.formatter?o=this.modules.formatter:"undefined"!=typeof Intl&&(o=Hn);var a=new On(this.options);this.store=new _n(this.options.resources,this.options);var s=this.services;s.logger=nn,s.resourceStore=this.store,s.languageUtils=a,s.pluralResolver=new Nn(a,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!o||this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format||(s.formatter=i(o),s.formatter.init(s,this.options),this.options.interpolation.format=s.formatter.format.bind(s.formatter)),s.interpolator=new Bn(this.options),s.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},s.backendConnector=new Kn(i(this.modules.backend),s.resourceStore,s,this.options),s.backendConnector.on("*",(function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];e.emit.apply(e,[t].concat(n))})),this.modules.languageDetector&&(s.languageDetector=i(this.modules.languageDetector),s.languageDetector.init(s,this.options.detection,this.options)),this.modules.i18nFormat&&(s.i18nFormat=i(this.modules.i18nFormat),s.i18nFormat.init&&s.i18nFormat.init(this)),this.translator=new Tn(this.services,this.options),this.translator.on("*",(function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];e.emit.apply(e,[t].concat(n))})),this.modules.external.forEach((function(t){t.init&&t.init(e)}))}if(this.format=this.options.interpolation.format,r||(r=Xn),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&"dev"!==c[0]&&(this.options.lng=c[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");var l=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];l.forEach((function(t){e[t]=function(){var r;return(r=e.store)[t].apply(r,arguments)}}));var d=["addResource","addResources","addResourceBundle","removeResourceBundle"];d.forEach((function(t){e[t]=function(){var r;return(r=e.store)[t].apply(r,arguments),e}}));var u=an(),p=function(){var t=function(t,n){e.isInitialized&&!e.initializedStoreOnce&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),u.resolve(n),r(t,n)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initImmediate?p():setTimeout(p,0),u}},{key:"loadResources",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Xn,n=r,i="string"==typeof e?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(i&&"cimode"===i.toLowerCase())return n();var o=[],a=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach((function(e){o.indexOf(e)<0&&o.push(e)}))};if(i)a(i);else{var s=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);s.forEach((function(e){return a(e)}))}this.options.preload&&this.options.preload.forEach((function(e){return a(e)})),this.services.backendConnector.load(o,this.options.ns,(function(e){e||t.resolvedLanguage||!t.language||t.setResolvedLanguage(t.language),n(e)}))}else n(null)}},{key:"reloadResources",value:function(e,t,r){var n=an();return e||(e=this.languages),t||(t=this.options.ns),r||(r=Xn),this.services.backendConnector.reload(e,t,(function(e){n.resolve(),r(e)})),n}},{key:"use",value:function(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&kn.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"setResolvedLanguage",value:function(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(var t=0;t<this.languages.length;t++){var r=this.languages[t];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}},{key:"changeLanguage",value:function(e,t){var r=this;this.isLanguageChangingTo=e;var n=an();this.emit("languageChanging",e);var i=function(e){r.language=e,r.languages=r.services.languageUtils.toResolveHierarchy(e),r.resolvedLanguage=void 0,r.setResolvedLanguage(e)},o=function(o){e||o||!r.services.languageDetector||(o=[]);var a="string"==typeof o?o:r.services.languageUtils.getBestMatchFromCodes(o);a&&(r.language||i(a),r.translator.language||r.translator.changeLanguage(a),r.services.languageDetector&&r.services.languageDetector.cacheUserLanguage(a)),r.loadResources(a,(function(e){!function(e,o){o?(i(o),r.translator.changeLanguage(o),r.isLanguageChangingTo=void 0,r.emit("languageChanged",o),r.logger.log("languageChanged",o)):r.isLanguageChangingTo=void 0,n.resolve((function(){return r.t.apply(r,arguments)})),t&&t(e,(function(){return r.t.apply(r,arguments)}))}(e,a)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(o):o(e):o(this.services.languageDetector.detect()),n}},{key:"getFixedT",value:function(e,t,r){var n=this,i=function e(t,i){var o;if("object"!==Fr(i)){for(var a=arguments.length,s=new Array(a>2?a-2:0),c=2;c<a;c++)s[c-2]=arguments[c];o=n.options.overloadTranslationOptionHandler([t,i].concat(s))}else o=Yn({},i);o.lng=o.lng||e.lng,o.lngs=o.lngs||e.lngs,o.ns=o.ns||e.ns,o.keyPrefix=o.keyPrefix||r||e.keyPrefix;var l=n.options.keySeparator||".",d=o.keyPrefix?"".concat(o.keyPrefix).concat(l).concat(t):t;return n.t(d,o)};return"string"==typeof e?i.lng=e:i.lngs=e,i.ns=t,i.keyPrefix=r,i}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var n=this.resolvedLanguage||this.languages[0],i=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;var a=function(e,r){var n=t.services.backendConnector.state["".concat(e,"|").concat(r)];return-1===n||2===n};if(r.precheck){var s=r.precheck(this,a);if(void 0!==s)return s}return!!this.hasResourceBundle(n,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!a(n,e)||i&&!a(o,e)))}},{key:"loadNamespaces",value:function(e,t){var r=this,n=an();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){r.options.ns.indexOf(e)<0&&r.options.ns.push(e)})),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var r=an();"string"==typeof e&&(e=[e]);var n=this.options.preload||[],i=e.filter((function(e){return n.indexOf(e)<0}));return i.length?(this.options.preload=n.concat(i),this.loadResources((function(e){r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Xn,i=Yn(Yn(Yn({},this.options),t),{isClone:!0}),o=new r(i),a=["store","services","language"];return a.forEach((function(t){o[t]=e[t]})),o.services=Yn({},this.services),o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o.translator=new Tn(o.services,o.options),o.translator.on("*",(function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];o.emit.apply(o,[e].concat(r))})),o.init(i,n),o.translator.options=o.options,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),r}(on);Kr(ti,"createInstance",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new ti(e,t)}));var ri=ti.createInstance();ri.createInstance=ti.createInstance;ri.createInstance,ri.init,ri.loadResources,ri.reloadResources,ri.use,ri.changeLanguage,ri.getFixedT,ri.t,ri.exists,ri.setDefaultNamespace,ri.hasLoadedNamespace,ri.loadNamespaces,ri.loadLanguages;var ni=ri,ii={};(ii=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}).__esModule=!0,ii.default=ii;var oi={};function ai(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(oi=function(e,t,r){return t&&ai(e.prototype,t),r&&ai(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}).__esModule=!0,oi.default=oi;var si={};(si=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}).__esModule=!0,si.default=si;je=o("85Hg2");var ci=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,li={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},di=function(e){return li[e]};function ui(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function pi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ui(Object(n),!0).forEach((function(t){r(si)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ui(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var hi,fi={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:function(e){return e.replace(ci,di)}},mi=(0,je.createContext)();function gi(){return fi}var vi=function(){function e(){r(ii)(this,e),this.usedNamespaces={}}return r(oi)(e,[{key:"addUsedNamespaces",value:function(e){var t=this;e.forEach((function(e){t.usedNamespaces[e]||(t.usedNamespaces[e]=!0)}))}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}]),e}();function yi(){return hi}var bi={type:"3rdParty",init:function(e){!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};fi=pi(pi({},fi),e)}(e.options.react),function(e){hi=e}(e)}};const wi=()=>{try{const e=localStorage.getItem("stream_ui_language");return e||"en"}catch(e){return console.warn(e),"en"}},xi={en:{name:"English",translation:{header:{free:"Free version"},loader:{connection:"Connecting..."},notifications:{screensharingError:"An error occured when trying to toggle screensharing",microphoneError:"An error occured when trying to toggle the microphone",cameraError:"An error occured when trying to toggle the camera",cameraRotateError:"An error occured when trying to rotate the camera",noCamera:"No camera available",blockedMicrophonePopupTitle:"Camera and microphone are blocked",blockedMicrophonePopup:"SnapCall requires access to your camera and microphone. Click the camera blocked icon in your browser's address bar.",reload:"Reload",criticalError:"A critical error has occurred (error {{code}}).",agentJoinError:"An error occured while trying to join the room as an agent",close:"Close",connectedTo:"Connected to {{name}}"},endView:{goBack:"Go back to call",tooLate:"You arrived too late",callIsOver:"The call is over or deleted",callEnded:"The call is now ended",callLeft:"You left the call",full:"You can't join this call",fullDescription:"The room is full. Please try to join the call later."},menu:{title:"Menu",new:"NEW",openNewTab:"Open new tab",quickConnect:"Quick Connect",pictureInPicture:"Picture-in-Picture",screenSharing:"Screen sharing"},blockedFeature:{titleConnected:"Upgrade to Pro",titleGuest:"Feature not available",descriptionConnected:"On a free plan, you can't use this feature. Upgrade your plan to enjoy all in-call features.",descriptionGuest:"You are participating in a call created with a free version of SnapCall. This feature is only available with a Pro version.",dismissGuest:"Okay",dismissConnected:"Upgrade to Pro"},copyLink:{title:"Copy link",description:"Copy link into clipboard",error:"An error occured when trying to copy to clipboard",copied:"Link copied to clipboard"},quickConnect:{title:"Quick Connect",scanTitle:"Scan QR Code",scan:"Scan this QR code with your phone camera to open the call."},settings:{title:"Settings",preferences:"Preferences",language:"Language",devices:"Devices",help:"Help",helpCenter:"Go to help center"},audioMenu:{title:"Audio",blockedMicrophone:"Microphone is blocked.",microphonePermissions:"Please accept microphone sharing before accessing these options."},videoMenu:{title:"Video",lowDef:"Low definition (240p)",standardDef:"Standard definition (480p)",highDef:"High definition (720p)",blockedCamera:"Camera is blocked.",cameraPermissions:"Please accept camera sharing before accessing these options.",sendResolution:"Send Resolution (maximum)"},shareLink:{title:"Share link",title2:"Share a link",invalid:"Invalid link",sentToUsers:"Link sent to users",sentToUser:"Link sent to {{user}}",failed:"Failed to send link",poweredBy:"Powered by",invoice:"{{user}} sent you an invoice.",pay:"Pay"},youtube:{title:"Watch Together",url:"YOUTUBE URL",invalid:"Invalid YouTube URL",share:"Watch now"},sharedHistory:{shared:"Shared with you"},snapshot:{title:"Snapshot",shared:"Snapshot shared.",sentToUsers:"Snapshot sent to users.",sentToUser:"Snapshot sent to {{user}}",save:"Save photo",error:"An error occured when trying to send the snapshot"},gdpr:{recordedWarning:"To improve the quality of our service, this call will be recorded."},requestDevice:{requestInput:"Request input devices",request:"{{user}} would like you to share your {{device}}",timedOut:"Your request has timed out.",declined:"Your request has been declined.",userDeclined:"{{user}} has declined your request."},leave:{title:"Leave",leaveCall:"Leave call",endCall:"End call for all"},virtualBackground:{title:"Virtual Background",setBackground:"Set Background"},misc:{someone:"Someone",camera:"Camera",microphone:"Microphone",photo:"Photo",video:"Video",screen:"Screen",speaker:"Speaker",user:"User",open:"Open",from:"From",accept:"Accept",decline:"Decline",you:"You",cancel:"Cancel",confirm:"Confirm",remove:"Remove"},greeting:{mainTitle:"Welcome to SnapCall",sideTitle:"Are you ready to join?",sideDescription:"Before joining the room, enter your name. It will displayed to participants.",namePlaceholder:"Your name",nameSubmit:"Join Conversation",footerTitle:"Powered by SnapCall",footerDescription:"Meet SnapCall, the easiest way to add real-time video to platform, product or service."},recorder:{limit:"Video recording limited to 5 min.",submissionTitle:"Thank you for your submission!",submissionDescription:"Your photo/video has been successfully submitted. We will review it and get back to you shortly.",confirmRemovalTitle:"Confirm deletion",confirmRemovalDescription:"Are you sure you want to delete this photo/video? This action cannot be undone.",elementBeingProcessed:"Please wait while your {{ type }} is being processed...",waitVideo:"A video may take up to 15 seconds to be ready.",elementCaptureSuccess:"{{ type }} captured successfully",takeNewElement:"Capture a new {{ type }}",sendElement:"Send {{ type }}",sendElements:"Send {{ count }} elements",allowAccess:"Allow access",okay:"Okay",allowCamMicAccess:"Allow access to camera and microphone",allowScreenShareAccess:"Allow access to screen sharing",permissionDeniedTitle:"Something went wrong!",permissionDeniedDescription:"Without access to the camera and microphone, you won't be able to capture photos or videos to share with the support team. Please grant access in your browser settings.",photoInstructionsTitle:"Ready to snap a photo?",videoInstructionsTitle:"Ready to record a video?",screenShareInstructionsTitle:"Ready to share your screen?",instructions:{allowAccessOnPrompt:"When prompted, <1>allow access</1> to the camera and microphone.",tapPhotoButton:"Tap the <1 /><2>Camera button</2> to take a photo.",multiplePhotos:"Feel free to take multiple photos for more details.",reviewAndSendPhotos:"Review your photo and <1>send it when you're satisfied.</1>",reviewAndSendScreenShare:"Review your video and <1>send it when you're satisfied.</1>",tapVideoButton:"Tap the <1 /><2>Record button</2> to start recording.",videoSpeech:"You can <1>talk during</1> the recording to provide additional information.",tapStopVideoButton:"When you're done, tap the <1 /><2>Stop button</2>.",reviewAndSendVideos:"Review your video and <1>send it when you're satisfied</1>.",tapScreenShareButton:"Tap <1>Record my screen</1> to begin recording.",tapStopScreenShareButton:"When you're done, tap <1>Stop recording</1>.",screenShareInstruction:"Select the screen or window you wish to record."},switchToMobileTitle:"Switch to your mobile device",switchToMobileDescription:"Experience greater convenience by using your phone to take photos and record videos.",useDesktopVersion:"Use the desktop version",scanQRCode:"Scan this QR code with a compatible device.",startScreenShareButton:"Record my screen",stopScreenShareButton:"Stop recording",screenTitle:"Ready to capture your screen?"}}},fr:{name:"Français",translation:{header:{free:"Version gratuite"},loader:{connection:"Connexion..."},notifications:{screensharingError:"Une erreur est survenue pendant l'activation du partage d'écran",microphoneError:"Une erreur est survenue pendant l'activation du micro",cameraError:"Une erreur est survenue pendant l'activation de la caméra",cameraRotateError:"Une erreur est survenue pendant la rotation de la caméra",noCamera:"Aucune caméra disponible",blockedMicrophonePopupTitle:"Votre caméra et micro sont bloqués",blockedMicrophonePopup:"SnapCall a besoin d'accéder à votre caméra et micro. Cliquez sur l'icône de caméra bloquée dans la barre d'adresse du navigateur.",reload:"Recharger",criticalError:"Une erreur critique est survenue (erreur {{code}}).",agentJoinError:"Une erreur est survenue en essayant de rejoindre la salle en tant qu'agent",close:"Fermer",connectedTo:"Connecté à {{name}}"},endView:{goBack:"Retourner dans l'appel",tooLate:"Vous êtes arrivez trop tard",callIsOver:"Cet appel est terminé ou supprimé",callEnded:"Cet appel est terminé",callLeft:"Vous avez quitté l'appel",full:"Impossible de rejoindre l'appel",fullDescription:"Limite d'utilisateurs atteinte. Merci de rejoindre l'appel ultérieurement."},menu:{title:"Menu",new:"NOUVEAU",openNewTab:"Ouvrir un nouvel onglet",quickConnect:"Quick Connect",pictureInPicture:"Picture-in-Picture",screenSharing:"Partage d'écran"},blockedFeature:{titleConnected:"Souscrire au plan Pro",titleGuest:"Fonctionnalité non disponible",descriptionConnected:"Vous n'avez pas accès à cette fonctionnalité. Souscrivez au plan Pro pour débloquer toutes les fonctionnalités de SnapCall.",descriptionGuest:"Vous participez à un appel créé avec la version gratuite de SnapCall. Cette fonctionnalité n'est disponible qu'avec une version Pro.",dismissGuest:"D'accord",dismissConnected:"Souscrire à Pro"},copyLink:{title:"Copier le lien",description:"Copier le lien dans le presse-papiers",error:"Une erreur est survenue pendant la copie du lien dans le presse-papier",copied:"Lien copié dans le presse-papier"},quickConnect:{title:"Quick Connect",scanTitle:"Scannez le QR Code",scan:"Scannez ce QR code avec votre téléphone pour ouvrir l'appel."},settings:{title:"Paramètres",preferences:"Préférences",language:"Langage",devices:"Appareils",help:"Aide",helpCenter:"Accéder au centre d'aide"},audioMenu:{title:"Audio",blockedMicrophone:"Votre micro est bloqué.",microphonePermissions:"Please accept microphone sharing before accessing these options."},videoMenu:{title:"Video",lowDef:"Basse définition (240p)",standardDef:"Définition standard (480p)",highDef:"Haute définition (720p)",blockedCamera:"Votre caméra est bloqué.",cameraPermissions:"Please accept camera sharing before accessing these options.",sendResolution:"Résolution envoyée (max)"},shareLink:{title:"Partager un lien",title2:"Partager un lien",invalid:"Lien invalide",sentToUsers:"Lien envoyé aux participants",sentToUser:"Lien envoyé à {{user}}",failed:"Une erreur est survenue pendant l'envoi du lien",poweredBy:"Proposé par",invoice:"{{user}} vous a envoyé une facture.",pay:"Payer"},youtube:{title:"Regardons Ensemble",url:"URL YOUTUBE",invalid:"URL YouTube invalide",share:"Regarder maintenant"},sharedHistory:{shared:"Partagé avec vous"},snapshot:{title:"Snapshot",shared:"Snapshot envoyé.",sentToUsers:"Snapshot envoyé aux participants.",sentToUser:"Snapshot envoyé à {{user}}",save:"Sauvegarder l'image",error:"Une erreur est survenue pendant l'envoi du snapshot"},gdpr:{recordedWarning:"Pour améliorer la qualité de notre service, cet appel va être enregistré."},requestDevice:{requestInput:"Demander l'activation",request:"{{user}} voudrait que vous partagiez votre {{device}}",timedOut:"Votre requête n'a pas eu de réponse",declined:"Votre requête a été refusé.",userDeclined:"{{user}} a décliné votre requête."},leave:{title:"Quitter",leaveCall:"Quitter l'appel",endCall:"Terminer l'appel"},virtualBackground:{title:"Arrière plan virtuel",setBackground:"Mettre l'arrière plan"},misc:{someone:"Quelqu'un",camera:"Caméra",microphone:"Micro",photo:"Photo",video:"Vidéo",screen:"Écran",speaker:"Haut-parleur",user:"Utilisateur",open:"Ouvrir",from:"Depuis",accept:"Accepter",decline:"Décliner",you:"Vous",cancel:"Annuler",confirm:"Confirmer",remove:"Enlever"},greeting:{mainTitle:"Bienvenue sur SnapCall",sideTitle:"Prêt à rejoindre ?",sideDescription:"Avant de rejoindre la salle, veuillez entrer votre nom.",namePlaceholder:"Nom",nameSubmit:"Rejoindre la conversation",footerTitle:"Propulsé par SnapCall",footerDescription:"Découvrez SnapCall, ajoutez de la vidéo en temps réel à n'importe quelle plateforme, produit ou service."},recorder:{limit:"Enregistrement vidéo limité à 5 min.",submissionTitle:"Merci pour votre soumission !",submissionDescription:"Votre photo/vidéo a été envoyée avec succès. Nous l'examinerons et reviendrons vers vous bientôt.",confirmRemovalTitle:"Confirmer la suppression",confirmRemovalDescription:"Voulez-vous vraiment supprimer cette photo/vidéo ? Cette action ne peut pas être annulée.",elementBeingProcessed:"Veuillez patienter un moment pendant que votre {{ type }} est en cours de traitement...",waitVideo:"Cela peut prendre jusqu'à 15 secondes pour qu'une vidéo soit prête.",elementCaptureSuccess:"{{ type }} capturé(e) avec succès",takeNewElement:"Prendre une nouvelle {{ type }}",sendElement:"Envoyer la {{ type }}",sendElements:"Envoyer {{ count }} éléments",allowAccess:"Autoriser l'accès",okay:"D'accord",allowCamMicAccess:"Autoriser l'accès à la caméra et au micro",allowScreenShareAccess:"Autoriser l'accès au partage d'écran",permissionDeniedTitle:"Quelque chose s'est mal passé !",permissionDeniedDescription:"Sans accès à la caméra et au microphone, vous ne pouvez pas prendre de photos ou de vidéos à partager avec l'équipe d'assistance. Veuillez accorder l'accès dans les paramètres de votre navigateur.",photoInstructionsTitle:"Prêt(e) à prendre une photo ?",videoInstructionsTitle:"Prêt(e) à enregistrer une vidéo ?",screenShareInstructionsTitle:"Prêt(e) à partager votre écran ?",instructions:{allowAccessOnPrompt:"Lorsque vous y êtes invité(e), <1>autorisez l'accès</1> à la caméra et au microphone.",tapPhotoButton:"Appuyez sur le <1 /><2>bouton Appareil photo</2> pour prendre une photo.",multiplePhotos:"N'hésitez pas à prendre plusieurs photos pour plus de détails.",reviewAndSendPhotos:"Vous pouvez revoir votre photo, puis <1>l'envoyer lorsque vous avez terminé.</1>",tapVideoButton:"Appuyez sur le <1 /><2>bouton d'enregistrement</2> pour démarrer un enregistrement.",videoSpeech:"Vous pouvez <1>parler pendant</1> l'enregistrement pour ajouter des détails.",tapStopVideoButton:"Lorsque vous avez terminé, appuyez sur le <1 /><2>bouton Arrêter</2>.",reviewAndSendVideos:"Vous pouvez revoir votre vidéo, puis <1>l'envoyer lorsque vous avez terminé</2>.",tapScreenShareButton:"Appuyez sur <1>Enregistrer écran</1> pour démarrer un enregistrement.",tapStopScreenShareButton:"Lorsque vous avez terminé, appuyez sur <1>Stop enregistrement</1>.",reviewAndSendScreenShare:"Vous pouvez revoir votre vidéo, puis <1>l'envoyer lorsque vous avez terminé.</1>",screenShareInstruction:"Sélectionnez l'écran ou la fenêtre que vous souhaitez enregistrer."},switchToMobileTitle:"Passez sur votre mobile",switchToMobileDescription:"Profitez d'une expérience encore plus pratique en utilisant votre téléphone pour prendre des photos et enregistrer des vidéos.",useDesktopVersion:"Continuer",scanQRCode:"Scannez ce code QR avec un appareil compatible.",startScreenShareButton:"Enregistrer écran",stopScreenShareButton:"Stop enregistrement",screenTitle:"Prêt à capturer votre écran ?"}}},it:{name:"Italiano",translation:{header:{free:"Versione gratuita"},loader:{connection:"Connessione..."},notifications:{screensharingError:"Si è verificato un errore durante l'attivazione della condivisione dello schermo",microphoneError:"Si è verificato un errore durante l'attivazione del microfono",cameraError:"Si è verificato un errore durante l'attivazione della fotocamera",cameraRotateError:"Si è verificato un errore durante la rotazione della fotocamera",noCamera:"Nessuna fotocamera disponibile",blockedMicrophonePopupTitle:"La tua fotocamera e il tuo microfono sono bloccati",blockedMicrophonePopup:"SnapCall ha bisogno di accedere alla fotocamera e al microfono. Fare clic sull'icona della fotocamera bloccata nella barra degli indirizzi del browser.",reload:"Ricaricare",criticalError:"Si è verificato un errore critico (errore {{code}}).",agentJoinError:"Si è verificato un errore cercando di entrare nella conversazione come agente",close:"Chiudere",connectedTo:"Connesso a {{name}}"},endView:{goBack:"Torna alla chiamata",tooLate:"Sei arrivato troppo tardi",callIsOver:"Questa chiamata è finita o è stata eliminata",callEnded:"Questa chiamata è finita",callLeft:"Hai lasciato la chiamata",full:"Impossibile partecipare alla chiamata",fullDescription:"Limite d'uso attenente."},menu:{title:"Menù",new:"NUOVO",openNewTab:"Apri una nuova scheda",quickConnect:"Connessione Rapida",pictureInPicture:"Immagine nell'immagine",screenSharing:"Condivisione dello schermo"},blockedFeature:{titleConnected:"L'aggiornamento a Pro",titleGuest:"Funzione non disponibile",descriptionConnected:"Su un piano gratuito, non puoi utilizzare questa funzione. Aggiorna il tuo piano per usufruire di tutte le funzionalità in chiamata.",descriptionGuest:"Stai partecipando a una chiamata creata con una versione gratuita di SnapCall. Questa funzione è disponibile solo con una versione Pro.",dismissGuest:"Okay",dismissConnected:"L'aggiornamento a Pro"},copyLink:{title:"Copia il link",description:"Copia il link negli appunti",error:"Si è verificato un errore durante la copia negli Appunti",copied:"Link copiato negli Appunti"},quickConnect:{title:"Connessione Rapida",scanTitle:"Scansiona il codice QR",scan:"Scansiona questo codice QR con il telefono per aprire la chiamata."},settings:{title:"Impostazioni",preferences:"Preferenze",language:"Linguaggio",devices:"Dispositivi",help:"Aiuto",helpCenter:"Accedi all'Assistenza"},audioMenu:{title:"Audio",blockedMicrophone:"Il tuo microfono è bloccato.",microphonePermissions:"Si prega di accettare la condivisione del microfono prima di accedere a queste opzioni."},videoMenu:{title:"Video",lowDef:"Definizione bassa (240p)",standardDef:"Definizione standard (480p)",highDef:"Alta definizione (720p)",blockedCamera:"La fotocamera è bloccata.",cameraPermissions:"Si prega di accettare la condivisione della fotocamera prima di accedere a queste opzioni.",sendResolution:"Risoluzione inviata (max)"},shareLink:{title:"Condividi un link",title2:"Condividi un link",invalid:"Collegamento non valido",sentToUsers:"Link inviato ai partecipanti",sentToUser:"Link inviato a {{user}}",failed:"Si è verificato un errore durante l'invio del link",poweredBy:"Proposto da",invoice:"{{User}} ti ha inviato una fattura.",pay:"Paga"},youtube:{title:"Vedere Assieme",url:"URL YOUTUBE",invalid:"URL YouTube non valido",share:"Guarda ora"},sharedHistory:{shared:"Condiviso con te"},snapshot:{title:"Schermata",shared:"Schermata inviata",sentToUsers:"Schermanta inviata ai partecipanti",sentToUser:"Schermata inviata a {{user}}",save:"Salva l'immagine",error:"Si è verificato un errore durante l'invio della schermata"},gdpr:{recordedWarning:"Per migliorare la qualità del nostro servizio, questa chiamata verrà registrata."},requestDevice:{requestInput:"Richiesta di attivazione",request:"{{user}} vorrebbe condividere il tuo {{device}}",timedOut:"La tua richiesta non ha ricevuto risposta",declined:"La tua richiesta è stata rifiutata.",userDeclined:"{{user}} ha rifiutato la tua richiesta"},leave:{title:"Lasciare",leaveCall:"Lascia la chiamata",endCall:"Termina la chiamata per tutti"},virtualBackground:{title:"Sfondo virtuale",setBackground:"Imposta sfondo"},virtualbackground:{title:"Virtual Background",setBackground:"Set Background"},misc:{someone:"Qualcuno",camera:"Telecamera",microphone:"Microfono",photo:"Foto",video:"Video",screen:"Schermo",speaker:"Altoparlante",user:"Utente",open:"Aprire",from:"Da",accept:"Accettare",decline:"Declinare",you:"Voi",cancel:"Annulla",confirm:"Confermare",remove:"Rimuovere"},greeting:{mainTitle:"Benvenuto a SnapCall",sideTitle:"Sei pronto per unirti?",sideDescription:"Prima di entrare nella stanza, inserisci il tuo nome. Verrà visualizzato ai partecipanti.",namePlaceholder:"Il tuo nome",nameSubmit:"Partecipa alla conversazione",footerTitle:"Offerto da SnapCall",footerDescription:"Incontrare SnapCall, il modo più semplice per aggiungere video in tempo reale a piattaforma, prodotto o servizio."},recorder:{limit:"Registrazione video limitata a 5 min.",submissionTitle:"Grazie per il tuo invio!",submissionDescription:"La tua foto/video è stata inviata con successo. La esamineremo e ti risponderemo al più presto.",confirmRemovalTitle:"Conferma rimozione",confirmRemovalDescription:"Sei sicuro di voler rimuovere questa foto/video? Questa azione non può essere annullata.",elementBeingProcessed:"Attendi un momento mentre il tuo {{ type }} viene elaborato...",waitVideo:"Potrebbero essere necessari fino a 15 secondi affinché un video sia pronto.",elementCaptureSuccess:"{{ type }} catturato con successo",takeNewElement:"Cattura un nuovo {{ type }}",sendElement:"Invia {{ type }}",sendElements:"Invia {{ count }} elementi",allowAccess:"Consenti accesso",okay:"Okay",allowCamMicAccess:"Consenti accesso a fotocamera e microfono",allowScreenShareAccess:"Consenti accesso alla condivisione dello schermo",permissionDeniedTitle:"Qualcosa è andato storto!",permissionDeniedDescription:"Senza l'accesso alla fotocamera e al microfono, non è possibile scattare foto o registrare video da condividere con il team di supporto. Si prega di concedere l'accesso nelle impostazioni del browser.",photoInstructionsTitle:"Pronto a scattare una foto?",videoInstructionsTitle:"Pronto a registrare un video?",screenShareInstructionsTitle:"Pronto a condividere il tuo schermo?",instructions:{allowAccessOnPrompt:"Quando richiesto, <1>consenti l'accesso</1> a fotocamera e microfono.",tapPhotoButton:"Tocca il pulsante <1 /><2>Fotocamera</2> per scattare una foto.",multiplePhotos:"Non esitare a scattare più foto per maggiori dettagli.",reviewAndSendPhotos:"Puoi rivedere la tua foto e poi <1>inviarla quando hai finito.</1>",tapVideoButton:"Tocca il pulsante <1 /><2>Registra</2> per avviare una registrazione.",videoSpeech:"Puoi <1>parlare durante</1> la registrazione per aggiungere dettagli.",tapStopVideoButton:"Quando hai finito, tocca il pulsante <1 /><2>Ferma</2>.",reviewAndSendVideos:"Puoi rivedere il tuo video e poi <1>inviarlo quando hai finito</1>.",tapScreenShareButton:"Tocca <1>Registra il mio schermo</1> per avviare una registrazione.",tapStopScreenShareButton:"Quando hai finito, tocca <1>Ferma registrazione</1>.",reviewAndSendScreenShare:"Puoi rivedere il tuo video e poi <1>inviarlo quando hai finito.</1>",screenShareInstruction:"Seleziona lo schermo o la finestra che desideri registrare."},switchToMobileTitle:"Passa al tuo dispositivo mobile",switchToMobileDescription:"Goditi un'esperienza ancora più pratica utilizzando il tuo telefono per scattare foto e registrare video.",useDesktopVersion:"Usa la versione desktop",scanQRCode:"Scansiona questo codice QR con un dispositivo compatibile.",startScreenShareButton:"Registra il mio schermo",stopScreenShareButton:"Ferma registrazione",screenTitle:"Pronto a catturare il tuo schermo?"}}}};ni.use(bi).init({lng:wi(),fallbackLng:"en",resources:xi,interpolation:{escapeValue:!1}});var Si=ni,_i=(je=o("85Hg2"),{}),ki={};(ki=function(e){if(Array.isArray(e))return e}).__esModule=!0,ki.default=ki;var Ci={};(Ci=function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==r.return||r.return()}finally{if(s)throw i}}return o}}).__esModule=!0,Ci.default=Ci;var Ei={},Pi={};(Pi=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}).__esModule=!0,Pi.default=Pi,(Ei=function(e,t){if(e){if("string"==typeof e)return Pi(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Pi(e,t):void 0}}).__esModule=!0,Ei.default=Ei;var Ri={};(Ri=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}).__esModule=!0,Ri.default=Ri,(_i=function(e,t){return ki(e)||Ci(e,t)||Ei(e,t)||Ri()}).__esModule=!0,_i.default=_i;je=o("85Hg2");function Ti(){if(console&&console.warn){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];"string"==typeof r[0]&&(r[0]="react-i18next:: ".concat(r[0])),(e=console).warn.apply(e,r)}}var ji={};function Oi(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];"string"==typeof t[0]&&ji[t[0]]||("string"==typeof t[0]&&(ji[t[0]]=new Date),Ti.apply(void 0,t))}function Mi(e,t,r){e.loadNamespaces(t,(function(){if(e.isInitialized)r();else{e.on("initialized",(function t(){setTimeout((function(){e.off("initialized",t)}),0),r()}))}}))}function Li(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=t.languages[0],i=!!t.options&&t.options.fallbackLng,o=t.languages[t.languages.length-1];if("cimode"===n.toLowerCase())return!0;var a=function(e,r){var n=t.services.backendConnector.state["".concat(e,"|").concat(r)];return-1===n||2===n};return!(r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!a(t.isLanguageChangingTo,e))&&(!!t.hasResourceBundle(n,e)||(!(t.services.backendConnector.backend&&(!t.options.resources||t.options.partialBundledLanguages))||!(!a(n,e)||i&&!a(o,e))))}function Di(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!t.languages||!t.languages.length)return Oi("i18n.languages were undefined or empty",t.languages),!0;var n=void 0!==t.options.ignoreJSONStructure;return n?t.hasLoadedNamespace(e,{precheck:function(t,n){if(r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!n(t.isLanguageChangingTo,e))return!1}}):Li(e,t,r)}function Ii(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ai(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ii(Object(n),!0).forEach((function(t){r(si)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ii(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ni=function(e,t){var r=(0,je.useRef)();return(0,je.useEffect)((function(){r.current=t?r.current:e}),[e,t]),r.current};function Fi(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.i18n,i=(0,je.useContext)(mi)||{},o=i.i18n,a=i.defaultNS,s=n||o||yi();if(s&&!s.reportNamespaces&&(s.reportNamespaces=new vi),!s){Oi("You will need to pass in an i18next instance by using initReactI18next");var c=function(e){return Array.isArray(e)?e[e.length-1]:e},l=[c,{},!1];return l.t=c,l.i18n={},l.ready=!1,l}s.options.react&&void 0!==s.options.react.wait&&Oi("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var d=Ai(Ai(Ai({},gi()),s.options.react),t),u=d.useSuspense,p=d.keyPrefix,h=e||a||s.options&&s.options.defaultNS;h="string"==typeof h?[h]:h||["translation"],s.reportNamespaces.addUsedNamespaces&&s.reportNamespaces.addUsedNamespaces(h);var f=(s.isInitialized||s.initializedStoreOnce)&&h.every((function(e){return Di(e,s,d)}));function m(){return s.getFixedT(null,"fallback"===d.nsMode?h:h[0],p)}var g=(0,je.useState)(m),v=r(_i)(g,2),y=v[0],b=v[1],w=h.join(),x=Ni(w),S=(0,je.useRef)(!0);(0,je.useEffect)((function(){var e=d.bindI18n,t=d.bindI18nStore;function r(){S.current&&b(m)}return S.current=!0,f||u||Mi(s,h,(function(){S.current&&b(m)})),f&&x&&x!==w&&S.current&&b(m),e&&s&&s.on(e,r),t&&s&&s.store.on(t,r),function(){S.current=!1,e&&s&&e.split(" ").forEach((function(e){return s.off(e,r)})),t&&s&&t.split(" ").forEach((function(e){return s.store.off(e,r)}))}}),[s,w]);var _=(0,je.useRef)(!0);(0,je.useEffect)((function(){S.current&&!_.current&&b(m),_.current=!1}),[s,p]);var k=[y,s,f];if(k.t=y,k.i18n=s,k.ready=f,f)return k;if(!f&&!u)return k;throw new Promise((function(e){Mi(s,h,(function(){e()}))}))}var zi=o("4Fy4N");var Bi={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Ui;const Vi=new Uint8Array(16);function Hi(){if(!Ui&&(Ui="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ui))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ui(Vi)}const qi=[];for(let e=0;e<256;++e)qi.push((e+256).toString(16).slice(1));function Wi(e,t=0){return(qi[e[t+0]]+qi[e[t+1]]+qi[e[t+2]]+qi[e[t+3]]+"-"+qi[e[t+4]]+qi[e[t+5]]+"-"+qi[e[t+6]]+qi[e[t+7]]+"-"+qi[e[t+8]]+qi[e[t+9]]+"-"+qi[e[t+10]]+qi[e[t+11]]+qi[e[t+12]]+qi[e[t+13]]+qi[e[t+14]]+qi[e[t+15]]).toLowerCase()}var $i,Ki,Gi,Zi=function(e,t,r){if(Bi.randomUUID&&!t&&!e)return Bi.randomUUID();const n=(e=e||{}).random||(e.rng||Hi)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=n[e];return t}return Wi(n)},Qi=JSON.parse('{"name":"protoo-client","version":"4.0.6","description":"protoo JavaScript client module","author":"Iñaki Baz Castillo <ibc@aliax.net>","homepage":"https://protoo.versatica.com","license":"MIT","repository":{"type":"git","url":"https://github.com/ibc/protoo.git"},"main":"lib/index.js","keywords":["nodejs","browser","websocket"],"engines":{"node":">=8.0.0"},"scripts":{"lint":"eslint -c .eslintrc.js lib"},"dependencies":{"debug":"^4.3.1","events":"^3.2.0","retry":"^0.12.0"},"devDependencies":{"eslint":"^5.16.0"},"optionalDependencies":{"websocket":"^1.0.33"}}').version,Yi={},Ji=o("hZG0u");const Xi="protoo-client";Yi=class{constructor(e){e?(this._debug=Ji(`${Xi}:${e}`),this._warn=Ji(`${Xi}:WARN:${e}`),this._error=Ji(`${Xi}:ERROR:${e}`)):(this._debug=Ji(Xi),this._warn=Ji(`${Xi}:WARN`),this._error=Ji(`${Xi}:ERROR`)),this._debug.log=console.info.bind(console),this._warn.log=console.warn.bind(console),this._error.log=console.error.bind(console)}get debug(){return this._debug}get warn(){return this._warn}get error(){return this._error}};var eo,to=o("3oV8N").EventEmitter;eo=class extends to{constructor(e){super(),this.setMaxListeners(1/0),this._logger=e||new Yi("EnhancedEventEmitter")}safeEmit(e,...t){try{this.emit(e,...t)}catch(t){this._logger.error("safeEmit() | event listener threw an error [event:%s]:%o",e,t)}}async safeEmitAsPromise(e,...t){return new Promise(((r,n)=>{this.safeEmit(e,...t,r,n)}))}};var ro={},no=function(){return Math.round(1e7*Math.random())};const io=new Yi("Message");ro=class{static parse(e){let t;const r={};try{t=JSON.parse(e)}catch(e){return void io.error("parse() | invalid JSON: %s",e)}if("object"==typeof t&&!Array.isArray(t)){if(t.request){if(r.request=!0,"string"!=typeof t.method)return void io.error("parse() | missing/invalid method field");if("number"!=typeof t.id)return void io.error("parse() | missing/invalid id field");r.id=t.id,r.method=t.method,r.data=t.data||{}}else if(t.response){if(r.response=!0,"number"!=typeof t.id)return void io.error("parse() | missing/invalid id field");r.id=t.id,t.ok?(r.ok=!0,r.data=t.data||{}):(r.ok=!1,r.errorCode=t.errorCode,r.errorReason=t.errorReason)}else{if(!t.notification)return void io.error("parse() | missing request/response field");if(r.notification=!0,"string"!=typeof t.method)return void io.error("parse() | missing/invalid method field");r.method=t.method,r.data=t.data||{}}return r}io.error("parse() | not an object")}static createRequest(e,t){return{request:!0,id:no(),method:e,data:t||{}}}static createSuccessResponse(e,t){return{response:!0,id:e.id,ok:!0,data:t||{}}}static createErrorResponse(e,t,r){return{response:!0,id:e.id,ok:!1,errorCode:t,errorReason:r}}static createNotification(e,t){return{notification:!0,method:e,data:t||{}}}};const oo=new Yi("Peer");Gi=class extends eo{constructor(e){super(oo),oo.debug("constructor()"),this._closed=!1,this._transport=e,this._connected=!1,this._data={},this._sents=new Map,this._handleTransport()}get closed(){return this._closed}get connected(){return this._connected}get data(){return this._data}set data(e){throw new Error("cannot override data object")}close(){if(!this._closed){oo.debug("close()"),this._closed=!0,this._connected=!1,this._transport.close();for(const e of this._sents.values())e.close();this.safeEmit("close")}}async request(e,t){const r=ro.createRequest(e,t);return this._logger.debug("request() [method:%s, id:%s]",e,r.id),await this._transport.send(r),new Promise(((e,t)=>{const n=1500*(15+.1*this._sents.size),i={id:r.id,method:r.method,resolve:t=>{this._sents.delete(r.id)&&(clearTimeout(i.timer),e(t))},reject:e=>{this._sents.delete(r.id)&&(clearTimeout(i.timer),t(e))},timer:setTimeout((()=>{this._sents.delete(r.id)&&t(new Error("request timeout"))}),n),close:()=>{clearTimeout(i.timer),t(new Error("peer closed"))}};this._sents.set(r.id,i)}))}async notify(e,t){const r=ro.createNotification(e,t);this._logger.debug("notify() [method:%s]",e),await this._transport.send(r)}_handleTransport(){if(this._transport.closed)return this._closed=!0,void setTimeout((()=>{this._closed||(this._connected=!1,this.safeEmit("close"))}));this._transport.on("open",(()=>{this._closed||(oo.debug('emit "open"'),this._connected=!0,this.safeEmit("open"))})),this._transport.on("disconnected",(()=>{this._closed||(oo.debug('emit "disconnected"'),this._connected=!1,this.safeEmit("disconnected"))})),this._transport.on("failed",(e=>{this._closed||(oo.debug('emit "failed" [currentAttempt:%s]',e),this._connected=!1,this.safeEmit("failed",e))})),this._transport.on("close",(()=>{this._closed||(this._closed=!0,oo.debug('emit "close"'),this._connected=!1,this.safeEmit("close"))})),this._transport.on("message",(e=>{e.request?this._handleRequest(e):e.response?this._handleResponse(e):e.notification&&this._handleNotification(e)}))}_handleRequest(e){try{this.emit("request",e,(t=>{const r=ro.createSuccessResponse(e,t);this._transport.send(r).catch((()=>{}))}),((t,r)=>{t instanceof Error?(r=t.message,t=500):"number"==typeof t&&r instanceof Error&&(r=r.message);const n=ro.createErrorResponse(e,t,r);this._transport.send(n).catch((()=>{}))}))}catch(t){const r=ro.createErrorResponse(e,500,String(t));this._transport.send(r).catch((()=>{}))}}_handleResponse(e){const t=this._sents.get(e.id);if(t)if(e.ok)t.resolve(e.data);else{const r=new Error(e.errorReason);r.code=e.errorCode,t.reject(r)}else oo.error("received response does not match any sent request [id:%s]",e.id)}_handleNotification(e){this.safeEmit("notification",e)}};var ao;if("object"==typeof globalThis)ao=globalThis;else try{ao=o("jCEG4")}catch(e){}finally{if(ao||"undefined"==typeof window||(ao=window),!ao)throw new Error("Could not determine global this")}var so,co=ao.WebSocket||ao.MozWebSocket;function lo(e,t){return t?new co(e,t):new co(e)}so=o("kUMHr").version,co&&["CONNECTING","OPEN","CLOSING","CLOSED"].forEach((function(e){Object.defineProperty(lo,e,{get:function(){return co[e]}})}));var uo={w3cwebsocket:co?lo:null,version:so}.w3cwebsocket,po={};po=o("jxXWz");const ho={retries:10,factor:2,minTimeout:1e3,maxTimeout:8e3},fo=new Yi("WebSocketTransport");$i=Gi,Ki=class extends eo{constructor(e,t){super(fo),fo.debug("constructor() [url:%s, options:%o]",e,t),this._closed=!1,this._url=e,this._options=t||{},this._ws=null,this._runWebSocket()}get closed(){return this._closed}close(){if(!this._closed){fo.debug("close()"),this._closed=!0,this.safeEmit("close");try{this._ws.onopen=null,this._ws.onclose=null,this._ws.onerror=null,this._ws.onmessage=null,this._ws.close()}catch(e){fo.error("close() | error closing the WebSocket: %o",e)}}}async send(e){if(this._closed)throw new Error("transport closed");try{this._ws.send(JSON.stringify(e))}catch(e){throw fo.warn("send() failed:%o",e),e}}_runWebSocket(){const e=po.operation(this._options.retry||ho);let t=!1;e.attempt((r=>{this._closed?e.stop():(fo.debug("_runWebSocket() [currentAttempt:%s]",r),this._ws=new uo(this._url,"protoo",this._options.origin,this._options.headers,this._options.requestOptions,this._options.clientConfig),this._ws.onopen=()=>{this._closed||(t=!0,this.safeEmit("open"))},this._ws.onclose=n=>{if(!this._closed){if(fo.warn('WebSocket "close" event [wasClean:%s, code:%s, reason:"%s"]',n.wasClean,n.code,n.reason),4e3!==n.code){if(t){if(e.stop(),this.safeEmit("disconnected"),this._closed)return;return void this._runWebSocket()}if(this.safeEmit("failed",r),this._closed)return;if(e.retry(!0))return}this._closed=!0,this.safeEmit("close")}},this._ws.onerror=()=>{this._closed||fo.error('WebSocket "error" event')},this._ws.onmessage=e=>{if(this._closed)return;const t=ro.parse(e.data);t&&(0!==this.listenerCount("message")?this.safeEmit("message",t):fo.error('no listeners for WebSocket "message" event, ignoring received message'))})}))}};var mo=(0,(xo=o("bWPEY")).getGlobalObject)(),go=["debug","info","warn","error","log","assert","trace"];function vo(e){var t=(0,xo.getGlobalObject)();if(!("console"in t))return e();var r=t.console,n={};go.forEach((e=>{var i=r[e]&&r[e].__sentry_original__;e in t.console&&i&&(n[e]=r[e],r[e]=i)}));try{return e()}finally{Object.keys(n).forEach((e=>{r[e]=n[e]}))}}function yo(){let e=!1;var t={enable:()=>{e=!0},disable:()=>{e=!1}};return"undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?go.forEach((r=>{t[r]=(...t)=>{e&&vo((()=>{mo.console[r](`Sentry Logger [${r}]:`,...t)}))}})):go.forEach((e=>{t[e]=()=>{}})),t}let bo;bo="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?(0,xo.getGlobalSingleton)("logger",yo):yo();var wo=o("gTODe"),xo=o("bWPEY"),So=o("hLvaX"),_o=(xo=o("bWPEY"),xo=o("bWPEY"),Object.prototype.toString);function ko(e,t){return _o.call(e)===`[object ${t}]`}function Co(e){return ko(e,"Object")}function Eo(e){return Boolean(e&&e.then&&"function"==typeof e.then)}function Po(e){return Ro(e,new Map)}function Ro(e,t){if(Co(e)){if(void 0!==(i=t.get(e)))return i;var r={};for(var n of(t.set(e,r),Object.keys(e)))void 0!==e[n]&&(r[n]=Ro(e[n],t));return r}if(Array.isArray(e)){var i;if(void 0!==(i=t.get(e)))return i;r=[];return t.set(e,r),e.forEach((e=>{r.push(Ro(e,t))})),r}return e}function To(){var e=(0,xo.getGlobalObject)(),t=e.crypto||e.msCrypto;if(void 0!==t&&t.getRandomValues){var r=new Uint16Array(8);t.getRandomValues(r),r[3]=4095&r[3]|16384,r[4]=16383&r[4]|32768;var n=e=>{let t=e.toString(16);for(;t.length<4;)t=`0${t}`;return t};return n(r[0])+n(r[1])+n(r[2])+n(r[3])+n(r[4])+n(r[5])+n(r[6])+n(r[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,(e=>{var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}var jo;o("gTODe"),xo=o("bWPEY");!function(e){e[e.PENDING=0]="PENDING";e[e.RESOLVED=1]="RESOLVED";e[e.REJECTED=2]="REJECTED"}(jo||(jo={}));class Oo{__init(){this._state=jo.PENDING}__init2(){this._handlers=[]}constructor(e){Oo.prototype.__init.call(this),Oo.prototype.__init2.call(this),Oo.prototype.__init3.call(this),Oo.prototype.__init4.call(this),Oo.prototype.__init5.call(this),Oo.prototype.__init6.call(this);try{e(this._resolve,this._reject)}catch(e){this._reject(e)}}then(e,t){return new Oo(((r,n)=>{this._handlers.push([!1,t=>{if(e)try{r(e(t))}catch(e){n(e)}else r(t)},e=>{if(t)try{r(t(e))}catch(e){n(e)}else n(e)}]),this._executeHandlers()}))}catch(e){return this.then((e=>e),e)}finally(e){return new Oo(((t,r)=>{let n,i;return this.then((t=>{i=!1,n=t,e&&e()}),(t=>{i=!0,n=t,e&&e()})).then((()=>{i?r(n):t(n)}))}))}__init3(){this._resolve=e=>{this._setResult(jo.RESOLVED,e)}}__init4(){this._reject=e=>{this._setResult(jo.REJECTED,e)}}__init5(){this._setResult=(e,t)=>{this._state===jo.PENDING&&(Eo(t)?t.then(this._resolve,this._reject):(this._state=e,this._value=t,this._executeHandlers()))}}__init6(){this._executeHandlers=()=>{if(this._state!==jo.PENDING){var e=this._handlers.slice();this._handlers=[],e.forEach((e=>{e[0]||(this._state===jo.RESOLVED&&e[1](this._value),this._state===jo.REJECTED&&e[2](this._value),e[0]=!0)}))}}}}wo=o("gTODe");function Mo(e){var t=(0,wo.timestampInSeconds)(),r={sid:To(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(e){return Po({sid:`${e.sid}`,init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"==typeof e.did||"string"==typeof e.did?`${e.did}`:void 0,duration:e.duration,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}(r)};return e&&Lo(r,e),r}function Lo(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),e.did||t.did||(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||(0,wo.timestampInSeconds)(),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:To()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{var r=e.timestamp-e.started;e.duration=r>=0?r:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}function Do(e,t){let r={};t?r={status:t}:"ok"===e.status&&(r={status:"exited"}),Lo(e,r)}class Io{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={}}static clone(e){var t=new Io;return e&&(t._breadcrumbs=[...e._breadcrumbs],t._tags={...e._tags},t._extra={...e._extra},t._contexts={...e._contexts},t._user=e._user,t._level=e._level,t._span=e._span,t._session=e._session,t._transactionName=e._transactionName,t._fingerprint=e._fingerprint,t._eventProcessors=[...e._eventProcessors],t._requestSession=e._requestSession,t._attachments=[...e._attachments]),t}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{},this._session&&Lo(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts={...this._contexts,[e]:t},this._notifyScopeListeners(),this}setSpan(e){return this._span=e,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){var e=this.getSpan();return e&&e.transaction}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;if("function"==typeof e){var t=e(this);return t instanceof Io?t:this}return e instanceof Io?(this._tags={...this._tags,...e._tags},this._extra={...this._extra,...e._extra},this._contexts={...this._contexts,...e._contexts},e._user&&Object.keys(e._user).length&&(this._user=e._user),e._level&&(this._level=e._level),e._fingerprint&&(this._fingerprint=e._fingerprint),e._requestSession&&(this._requestSession=e._requestSession)):Co(e)&&(this._tags={...this._tags,...e.tags},this._extra={...this._extra,...e.extra},this._contexts={...this._contexts,...e.contexts},e.user&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint&&(this._fingerprint=e.fingerprint),e.requestSession&&(this._requestSession=e.requestSession)),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this}addBreadcrumb(e,t){var r="number"==typeof t?Math.min(t,100):100;if(r<=0)return this;var n={timestamp:(0,wo.dateTimestampInSeconds)(),...e};return this._breadcrumbs=[...this._breadcrumbs,n].slice(-r),this._notifyScopeListeners(),this}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(e,t={}){if(this._extra&&Object.keys(this._extra).length&&(e.extra={...this._extra,...e.extra}),this._tags&&Object.keys(this._tags).length&&(e.tags={...this._tags,...e.tags}),this._user&&Object.keys(this._user).length&&(e.user={...this._user,...e.user}),this._contexts&&Object.keys(this._contexts).length&&(e.contexts={...this._contexts,...e.contexts}),this._level&&(e.level=this._level),this._transactionName&&(e.transaction=this._transactionName),this._span){e.contexts={trace:this._span.getTraceContext(),...e.contexts};var r=this._span.transaction&&this._span.transaction.name;r&&(e.tags={transaction:r,...e.tags})}return this._applyFingerprint(e),e.breadcrumbs=[...e.breadcrumbs||[],...this._breadcrumbs],e.breadcrumbs=e.breadcrumbs.length>0?e.breadcrumbs:void 0,e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...this._sdkProcessingMetadata},this._notifyEventProcessors([...Ao(),...this._eventProcessors],e,t)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}_notifyEventProcessors(e,t,r,n=0){return new Oo(((i,o)=>{var a=e[n];if(null===t||"function"!=typeof a)i(t);else{var s=a({...t},r);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.id&&null===s&&bo.log(`Event processor "${a.id}" dropped event`),Eo(s)?s.then((t=>this._notifyEventProcessors(e,t,r,n+1).then(i))).then(null,o):this._notifyEventProcessors(e,s,r,n+1).then(i).then(null,o)}}))}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((e=>{e(this)})),this._notifyingListeners=!1)}_applyFingerprint(e){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],this._fingerprint&&(e.fingerprint=e.fingerprint.concat(this._fingerprint)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}}function Ao(){return(0,xo.getGlobalSingleton)("globalEventProcessors",(()=>[]))}var No=100;class Fo{__init(){this._stack=[{}]}constructor(e,t=new Io,r=4){this._version=r,Fo.prototype.__init.call(this),this.getStackTop().scope=t,e&&this.bindClient(e)}isOlderThan(e){return this._version<e}bindClient(e){this.getStackTop().client=e,e&&e.setupIntegrations&&e.setupIntegrations()}pushScope(){var e=Io.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:e}),e}popScope(){return!(this.getStack().length<=1)&&!!this.getStack().pop()}withScope(e){var t=this.pushScope();try{e(t)}finally{this.popScope()}}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(e,t){var r=this._lastEventId=t&&t.event_id?t.event_id:To(),n=new Error("Sentry syntheticException");return this._withClient(((i,o)=>{i.captureException(e,{originalException:e,syntheticException:n,...t,event_id:r},o)})),r}captureMessage(e,t,r){var n=this._lastEventId=r&&r.event_id?r.event_id:To(),i=new Error(e);return this._withClient(((o,a)=>{o.captureMessage(e,t,{originalException:e,syntheticException:i,...r,event_id:n},a)})),n}captureEvent(e,t){var r=t&&t.event_id?t.event_id:To();return"transaction"!==e.type&&(this._lastEventId=r),this._withClient(((n,i)=>{n.captureEvent(e,{...t,event_id:r},i)})),r}lastEventId(){return this._lastEventId}addBreadcrumb(e,t){const{scope:r,client:n}=this.getStackTop();if(!r||!n)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:o=No}=n.getOptions&&n.getOptions()||{};if(!(o<=0)){var a={timestamp:(0,wo.dateTimestampInSeconds)(),...e},s=i?vo((()=>i(a,t))):a;null!==s&&r.addBreadcrumb(s,o)}}setUser(e){var t=this.getScope();t&&t.setUser(e)}setTags(e){var t=this.getScope();t&&t.setTags(e)}setExtras(e){var t=this.getScope();t&&t.setExtras(e)}setTag(e,t){var r=this.getScope();r&&r.setTag(e,t)}setExtra(e,t){var r=this.getScope();r&&r.setExtra(e,t)}setContext(e,t){var r=this.getScope();r&&r.setContext(e,t)}configureScope(e){const{scope:t,client:r}=this.getStackTop();t&&r&&e(t)}run(e){var t=Bo(this);try{e(this)}finally{Bo(t)}}getIntegration(e){var t=this.getClient();if(!t)return null;try{return t.getIntegration(e)}catch(t){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&bo.warn(`Cannot retrieve integration ${e.id} from the current Hub`),null}}startTransaction(e,t){return this._callExtensionMethod("startTransaction",e,t)}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(e=!1){if(e)return this.endSession();this._sendSessionUpdate()}endSession(){var e=this.getStackTop(),t=e&&e.scope,r=t&&t.getSession();r&&Do(r),this._sendSessionUpdate(),t&&t.setSession()}startSession(e){const{scope:t,client:r}=this.getStackTop(),{release:n,environment:i}=r&&r.getOptions()||{};var o=(0,xo.getGlobalObject)();const{userAgent:a}=o.navigator||{};var s=Mo({release:n,environment:i,...t&&{user:t.getUser()},...a&&{userAgent:a},...e});if(t){var c=t.getSession&&t.getSession();c&&"ok"===c.status&&Lo(c,{status:"exited"}),this.endSession(),t.setSession(s)}return s}shouldSendDefaultPii(){var e=this.getClient(),t=e&&e.getOptions();return Boolean(t&&t.sendDefaultPii)}_sendSessionUpdate(){const{scope:e,client:t}=this.getStackTop();if(e){var r=e.getSession();r&&t&&t.captureSession&&t.captureSession(r)}}_withClient(e){const{scope:t,client:r}=this.getStackTop();r&&e(r,t)}_callExtensionMethod(e,...t){var r=zo().__SENTRY__;if(r&&r.extensions&&"function"==typeof r.extensions[e])return r.extensions[e].apply(this,t);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&bo.warn(`Extension method ${e} couldn't be found, doing nothing.`)}}function zo(){var e=(0,xo.getGlobalObject)();return e.__SENTRY__=e.__SENTRY__||{extensions:{},hub:void 0},e}function Bo(e){var t=zo(),r=Ho(t);return qo(t,e),r}function Uo(){var e=zo();return Vo(e)&&!Ho(e).isOlderThan(4)||qo(e,new Fo),(0,So.isNodeEnv)()?function(e){try{var t=zo().__SENTRY__,r=t&&t.extensions&&t.extensions.domain&&t.extensions.domain.active;if(!r)return Ho(e);if(!Vo(r)||Ho(r).isOlderThan(4)){var n=Ho(e).getStackTop();qo(r,new Fo(n.client,Io.clone(n.scope)))}return Ho(r)}catch(t){return Ho(e)}}(e):Ho(e)}function Vo(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function Ho(e){return(0,xo.getGlobalSingleton)("hub",(()=>new Fo),e)}function qo(e,t){return!!e&&((e.__SENTRY__=e.__SENTRY__||{}).hub=t,!0)}function Wo(e,t){return Uo().captureException(e,{captureContext:t})}function $o(e){Uo().addBreadcrumb(e)}const Ko=1,Go=2,Zo=3,Qo=4,Yo=5,Jo={1:"error",2:"warn",3:"info",4:"verbose",5:"debug"};let Xo=Number(2);const ea=new Intl.DateTimeFormat("en-GB",{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",timeZone:"GMT"});class ta{constructor(e,t){this.filename=e,this.customLogLevel=t}print(e,t,r,...n){const i=`[ ${ea.format(new Date)} ][ ${Jo[e]} ][ ${this.filename} - ${r} ]`;e<=(this.customLogLevel||Xo)?t(i,...n):$o({type:"debug",level:Jo[e],category:"console",data:{head:i,arguments:n}})}debug(e,...t){this.print(Yo,console.debug,e,...t)}error(e,...t){this.print(Ko,console.error,e,...t)}info(e,...t){this.print(Zo,console.info,e,...t)}log(e,...t){this.print(Qo,console.log,e,...t)}warn(e,...t){this.print(Go,console.warn,e,...t)}deprecated(...e){console.warn("[ DEPRECATED ]",...e)}static setLogLevel(e){Xo=e}setLogLevel(e){this.customLogLevel=e}}const ra=new ta("AudioLevels.ts"),na=window.AudioContext||window.webkitAudioContext;class ia{speakStartEventTime=0;speakStopEventTime=0;speaking=!1;audioMedianInterval=-1;audioLevelInterval=-1;audioLevels=[];constructor(e,t){this.id=e.id,this.listener=t,this.stream=e,this.audioContext=new na,this.analyser=this.audioContext.createAnalyser(),this.audioStreamSource=this.audioContext.createMediaStreamSource(this.stream),this.analyser.fftSize=32,this.analyser.minDecibels=-90,this.analyser.maxDecibels=-10,this.audioStreamSource.connect(this.analyser)}getAudioLevelMedian(){const{length:e}=this.audioLevels;return this.audioLevels.reduce(((e,t)=>e+t),0)/e}getCurrentAudioLevel(){const{length:e}=this.audioLevels;return e?this.audioLevels[e-1]:0}audioMuteDetection(){0===this.getAudioLevelMedian()&&this.audioLevels.length>0&&this.listener?.onMuteDetection?.(this.id)}detectSpeakingChange(e){e<20&&!this.speakStopEventTime&&(this.speakStartEventTime=0,this.speakStopEventTime=Date.now()),e>=20&&!this.speakStartEventTime&&(this.speakStartEventTime=Date.now(),this.speakStopEventTime=0);const t=this.speakStartEventTime||this.speakStopEventTime,r=Boolean(this.speakStartEventTime);(Date.now()-t>500&&r||Date.now()-t>300&&!r)&&this.speaking!==r&&(this.speaking=r,r?this.listener?.onStartSpeak():this.listener?.onStopSpeak())}computeRMS(e){let t=0;for(let r=0;r<e.length;r++)t+=e[r]*e[r];return t/=e.length,Math.sqrt(t)}getInstantAudioLevel(){const e=new Uint8Array(this.analyser.frequencyBinCount);this.analyser.getByteFrequencyData(e);const t=this.computeRMS(e);return t>0?100*t/255:0}loopCalcul(){const e=this.getInstantAudioLevel();this.audioLevels=this.audioLevels.splice(-59),this.detectSpeakingChange(e),this.audioLevels.push(e),this.listener?.onAudioLevel?.(e,this.id)}analyse(){this.audioLevelInterval=window.setInterval((()=>this.loopCalcul()),1e3/60),this.audioMedianInterval=window.setInterval((()=>this.audioMuteDetection()),2e3)}release(){this.listener=void 0,clearInterval(this.audioLevelInterval),clearInterval(this.audioMedianInterval),this.stream.getTracks().forEach((e=>{this.stream.removeTrack(e)}));try{this.audioStreamSource.disconnect(this.analyser)}catch(e){ra.error("release","audioStreamSource failed to disconnect",e)}this.audioContext.close().catch((e=>{ra.error("release","audioContext failed to close",e)})),this.audioLevels=[]}static isAPIAvailable(){return!!na}}const oa=new ta("AudioRenderer.ts");var aa=class{constructor({consumerId:e}){this.consumerId=e,this.audio=new Audio,this.audio.id=e,this.audio.autoplay=!0,document.body.appendChild(this.audio)}destroy(){this.audio.pause(),this.audio.srcObject=null,document.body.removeChild(this.audio)}setSource(e){this.audio.srcObject=e}async setSink(e){await(this.audio.setSinkId?.(e))}getSink(){return this.audio.sinkId}async play(){await this.audio.play().catch((e=>{oa.warn("play","failed to play"),setTimeout((()=>{this.play()}),1e3)}))}};const sa=(e,t=1)=>new Promise((r=>{const n=e.getContext("2d"),i=new Blob(['<svg width="103" height="36" fill="none" xmlns="http://www.w3.org/2000/svg"><g opacity=".8" fill="#fff"><path d="M10.994 33.06c.903 0 1.658-.734 1.392-1.581a5.249 5.249 0 0 0-1.279-2.124 5.171 5.171 0 0 0-3.673-1.535 5.171 5.171 0 0 0-3.673 1.535c-.595.6-1.03 1.33-1.28 2.124-.265.847.49 1.582 1.393 1.582h7.12ZM10.65 16.2c-.902 0-1.658.735-1.392 1.582.25.794.685 1.524 1.28 2.124a5.171 5.171 0 0 0 3.672 1.535 5.172 5.172 0 0 0 3.674-1.535 5.25 5.25 0 0 0 1.279-2.124c.266-.847-.49-1.582-1.393-1.582h-7.12ZM14.21 31.455c0 .887.75 1.63 1.606 1.35a5.187 5.187 0 0 0 2.067-1.279 5.264 5.264 0 0 0 1.521-3.706c0-1.39-.547-2.723-1.52-3.705a5.187 5.187 0 0 0-2.068-1.278c-.856-.281-1.606.462-1.606 1.349v7.27ZM7.434 17.806c0-.887-.75-1.63-1.607-1.35a5.186 5.186 0 0 0-2.066 1.279 5.264 5.264 0 0 0-1.522 3.706c0 1.39.548 2.723 1.522 3.705a5.186 5.186 0 0 0 2.066 1.278c.857.281 1.607-.462 1.607-1.349v-7.27Z"/><path d="M32.965 31.098c-1.442 0-2.601-.227-3.478-.68-.865-.465-1.517-1.043-1.955-1.734a.416.416 0 0 1-.052-.187c0-.125.057-.227.173-.306l.986-.731a.286.286 0 0 1 .208-.085c.103 0 .201.062.294.187.773 1.224 2.07 1.836 3.893 1.836.796 0 1.471-.142 2.025-.425.565-.284.848-.737.848-1.36 0-.465-.161-.827-.485-1.088-.311-.26-.796-.493-1.453-.697-.6-.181-.975-.289-1.125-.323-.992-.283-1.707-.504-2.146-.663-1.107-.408-1.84-.878-2.198-1.41-.357-.534-.536-1.089-.536-1.667 0-.476.15-.986.45-1.53.311-.555.796-1.025 1.453-1.41.67-.397 1.506-.595 2.51-.595 1.05 0 1.932.13 2.647.39.716.25 1.396.67 2.042 1.258.081.08.121.159.121.238 0 .114-.057.204-.173.272l-1.107.731a.469.469 0 0 1-.225.085c-.104 0-.202-.05-.294-.153-.692-.725-1.644-1.088-2.856-1.088-.692 0-1.228.102-1.609.306-.37.204-.617.431-.744.68-.115.25-.173.47-.173.663 0 .408.162.737.485.986.323.25.801.476 1.436.68.058.023.502.153 1.332.391.52.136 1.056.29 1.61.46 1.21.396 2.019.9 2.422 1.512.416.612.623 1.201.623 1.768 0 .612-.15 1.196-.45 1.75-.288.556-.801 1.02-1.54 1.395-.727.362-1.713.544-2.959.544ZM44.114 21.766c.865 0 1.667.249 2.405.748.739.487 1.108 1.388 1.108 2.702v5.321a.364.364 0 0 1-.104.272c-.058.057-.144.085-.26.085H46.14a.423.423 0 0 1-.277-.085.407.407 0 0 1-.087-.272v-5.032c-.035-.646-.22-1.155-.554-1.53-.323-.373-.744-.56-1.263-.56-.37 0-.738.102-1.107.306-.358.192-.664.492-.918.9-.253.397-.403.896-.45 1.496v4.42a.365.365 0 0 1-.103.272c-.058.057-.145.085-.26.085h-1.125a.423.423 0 0 1-.276-.085.407.407 0 0 1-.087-.272v-8.193c0-.114.029-.199.087-.255a.378.378 0 0 1 .276-.102h1.125c.116 0 .202.034.26.102.069.056.103.141.103.255v.204c0 .079.012.141.035.187a.168.168 0 0 0 .121.05c.092 0 .214-.062.364-.186a4.02 4.02 0 0 1 1.038-.612c.38-.148.738-.221 1.073-.221ZM57.436 28.207c.023.34.081.607.173.8.093.18.289.322.589.424.184.068.277.165.277.29a.396.396 0 0 1-.052.17l-.485.951c-.092.204-.242.278-.45.221-.669-.147-1.13-.47-1.384-.969-.058-.124-.115-.187-.173-.187-.058 0-.121.046-.19.136-.6.714-1.575 1.071-2.925 1.071-.819 0-1.482-.141-1.99-.425-.496-.283-.848-.623-1.056-1.02-.207-.408-.311-.799-.311-1.173 0-.612.19-1.161.571-1.648.392-.488.975-.828 1.748-1.02.53-.125 1.269-.221 2.215-.29.646-.045 1.113-.09 1.401-.135.231-.034.335-.17.312-.408-.058-.51-.23-.918-.52-1.224-.276-.318-.743-.476-1.4-.476-.428 0-.837.09-1.23.272-.38.17-.674.47-.882.9-.104.216-.254.29-.45.222l-1.055-.29c-.185-.056-.277-.152-.277-.288 0-.034.011-.085.034-.153a3.292 3.292 0 0 1 1.367-1.564c.635-.397 1.46-.595 2.475-.595.992 0 1.834.255 2.526.765.693.498 1.062 1.224 1.108 2.176.011.453.017 1.06.017 1.819.012.759.017 1.308.017 1.648Zm-4.326 1.445c.312 0 .652-.073 1.021-.22.38-.148.715-.403 1.004-.766.3-.374.484-.872.554-1.495v-.034c0-.114-.035-.199-.104-.256-.07-.067-.162-.09-.277-.067l-.675.067c-.75.069-1.361.148-1.834.238-.462.08-.86.227-1.194.442a.984.984 0 0 0-.485.884c0 .465.208.782.623.952.416.17.871.255 1.367.255ZM64.486 21.766c1.107 0 1.967.26 2.578.782.611.51 1.027 1.116 1.246 1.819a6.83 6.83 0 0 1 .329 2.073c0 .692-.11 1.389-.329 2.091-.22.692-.635 1.298-1.246 1.82-.611.509-1.47.764-2.578.764-.9 0-1.65-.238-2.25-.714-.08-.08-.161-.119-.242-.119-.116 0-.173.096-.173.29v3.569c0 .113-.035.198-.104.255-.058.068-.144.102-.26.102H60.42a.378.378 0 0 1-.277-.102c-.058-.057-.086-.142-.086-.255V22.344c0-.114.028-.199.086-.255a.378.378 0 0 1 .277-.102h1.038c.116 0 .202.034.26.102.069.056.104.141.104.255 0 .09.011.164.034.22.035.046.075.069.122.069.057 0 .109-.023.155-.068.612-.533 1.396-.8 2.354-.8Zm-.173 7.785c.888 0 1.54-.3 1.955-.9.427-.601.64-1.338.64-2.21 0-.873-.213-1.61-.64-2.21-.415-.601-1.067-.902-1.955-.902-.877 0-1.518.3-1.921.901-.393.59-.589 1.326-.589 2.21 0 .884.197 1.627.589 2.227.403.59 1.044.884 1.92.884ZM76.268 31.097c-1.316 0-2.452-.277-3.41-.833a5.531 5.531 0 0 1-2.163-2.277c-.484-.975-.726-2.08-.726-3.315 0-1.236.242-2.335.727-3.298a5.507 5.507 0 0 1 2.163-2.295c.957-.555 2.094-.833 3.409-.833 1.246 0 2.324.25 3.236.748a5.437 5.437 0 0 1 2.163 2.09c.034.069.052.131.052.188 0 .125-.087.215-.26.272l-1.298.323a.39.39 0 0 1-.12.017c-.151 0-.266-.074-.347-.221-.715-1.156-1.857-1.734-3.426-1.734-.97 0-1.771.221-2.406.663a3.907 3.907 0 0 0-1.401 1.75c-.3.715-.45 1.491-.45 2.33 0 .838.15 1.615.45 2.329.3.713.767 1.291 1.401 1.733.635.442 1.437.663 2.406.663.911 0 1.701-.21 2.37-.628.681-.42 1.165-1.06 1.454-1.921.08-.216.225-.306.433-.272l1.315.17c.196.034.294.124.294.272 0 .022-.012.079-.035.17-.507 1.303-1.246 2.283-2.215 2.94-.957.646-2.163.97-3.616.97ZM91.216 28.207c.023.34.08.607.173.8.092.18.288.322.588.424.185.068.277.165.277.29a.396.396 0 0 1-.052.17l-.484.951c-.093.204-.243.278-.45.221-.67-.147-1.13-.47-1.385-.969-.057-.124-.115-.187-.173-.187-.057 0-.12.046-.19.136-.6.714-1.575 1.071-2.925 1.071-.819 0-1.482-.141-1.99-.425-.496-.283-.848-.623-1.055-1.02-.208-.408-.312-.799-.312-1.173 0-.612.19-1.161.571-1.648.393-.488.975-.828 1.748-1.02.53-.125 1.27-.221 2.215-.29.646-.045 1.113-.09 1.402-.135.23-.034.334-.17.311-.408-.057-.51-.23-.918-.519-1.224-.277-.318-.744-.476-1.401-.476-.427 0-.837.09-1.23.272-.38.17-.674.47-.882.9-.103.216-.254.29-.45.222l-1.055-.29c-.185-.056-.277-.152-.277-.288a.53.53 0 0 1 .034-.153 3.293 3.293 0 0 1 1.368-1.564c.634-.397 1.459-.595 2.474-.595.992 0 1.834.255 2.527.765.692.498 1.06 1.224 1.107 2.176.012.453.017 1.06.017 1.819.012.759.018 1.308.018 1.648Zm-4.326 1.445c.311 0 .651-.073 1.02-.22.381-.148.716-.403 1.004-.766.3-.374.485-.872.554-1.495v-.034c0-.114-.035-.199-.104-.256-.07-.067-.161-.09-.277-.067l-.675.067c-.75.069-1.36.148-1.834.238-.461.08-.86.227-1.194.442a.984.984 0 0 0-.484.884c0 .465.207.782.622.952.416.17.871.255 1.368.255ZM95.687 30.536a.364.364 0 0 1-.104.272c-.058.057-.144.085-.26.085h-1.125a.424.424 0 0 1-.277-.085.407.407 0 0 1-.086-.272V18.79c0-.114.029-.199.086-.255a.378.378 0 0 1 .277-.102h1.125c.116 0 .202.034.26.102.069.056.104.141.104.255v11.746ZM100.033 30.536a.364.364 0 0 1-.104.272c-.057.057-.144.085-.26.085h-1.124a.423.423 0 0 1-.277-.085.407.407 0 0 1-.086-.272V18.79c0-.114.028-.199.086-.255a.378.378 0 0 1 .277-.102h1.125c.115 0 .202.034.26.102.069.056.103.141.103.255v11.746Z" stroke="#fff" stroke-width=".5"/><path d="M43.151 8.686c.296 0 .554-.036.774-.108.22-.076.402-.182.546-.318.148-.14.258-.308.33-.504.072-.2.108-.422.108-.666a1.75 1.75 0 0 0-.108-.63 1.245 1.245 0 0 0-.324-.48 1.41 1.41 0 0 0-.546-.3 2.516 2.516 0 0 0-.78-.108h-1.206v3.114h1.206Zm0-4.362c.58 0 1.082.068 1.506.204.424.136.774.326 1.05.57.276.244.48.536.612.876.136.34.204.712.204 1.116 0 .42-.07.806-.21 1.158-.14.348-.35.648-.63.9s-.632.448-1.056.588c-.42.14-.912.21-1.476.21h-1.206V13h-1.614V4.324h2.82Zm6.819 2.424c.456 0 .87.074 1.242.222a2.692 2.692 0 0 1 1.578 1.626c.144.392.216.83.216 1.314 0 .488-.072.928-.216 1.32-.144.392-.35.726-.618 1.002a2.653 2.653 0 0 1-.96.636 3.333 3.333 0 0 1-1.242.222c-.46 0-.878-.074-1.254-.222a2.712 2.712 0 0 1-.966-.636 2.922 2.922 0 0 1-.618-1.002 3.807 3.807 0 0 1-.216-1.32c0-.484.072-.922.216-1.314.148-.392.354-.724.618-.996.268-.272.59-.482.966-.63a3.397 3.397 0 0 1 1.254-.222Zm0 5.202c.512 0 .89-.172 1.134-.516.248-.344.372-.848.372-1.512s-.124-1.17-.372-1.518c-.244-.348-.622-.522-1.134-.522-.52 0-.906.176-1.158.528-.248.348-.372.852-.372 1.512s.124 1.164.372 1.512c.252.344.638.516 1.158.516Zm12.85-5.106L60.866 13h-1.188c-.136 0-.23-.088-.282-.264L58.29 9.178c-.036-.12-.07-.238-.102-.354a5.729 5.729 0 0 1-.072-.36 6.81 6.81 0 0 1-.084.366c-.028.12-.06.24-.096.36l-1.122 3.546c-.048.176-.154.264-.318.264h-1.14l-1.95-6.156h1.182c.108 0 .2.026.276.078a.363.363 0 0 1 .15.198l.882 3.288c.044.18.082.356.114.528.036.172.066.344.09.516.044-.172.09-.344.138-.516l.162-.528 1.02-3.3a.382.382 0 0 1 .138-.198.429.429 0 0 1 .258-.078h.654c.104 0 .192.026.264.078a.363.363 0 0 1 .15.198l.99 3.3c.052.18.1.358.144.534.048.172.094.344.138.516.052-.34.126-.69.222-1.05l.906-3.288a.405.405 0 0 1 .15-.198.429.429 0 0 1 .258-.078h1.128Zm4.704 2.37c0-.192-.028-.372-.084-.54a1.25 1.25 0 0 0-.24-.45 1.096 1.096 0 0 0-.414-.3 1.358 1.358 0 0 0-.576-.114c-.428 0-.766.122-1.014.366-.244.244-.4.59-.468 1.038h2.796Zm-2.826.894c.024.316.08.59.168.822.088.228.204.418.348.57.144.148.314.26.51.336.2.072.42.108.66.108.24 0 .446-.028.618-.084a2.76 2.76 0 0 0 .456-.186 7.55 7.55 0 0 0 .342-.186.59.59 0 0 1 .288-.084c.124 0 .216.046.276.138l.426.54a2.536 2.536 0 0 1-.552.486 3.281 3.281 0 0 1-1.32.474 4.79 4.79 0 0 1-.666.048 3.33 3.33 0 0 1-1.194-.21 2.726 2.726 0 0 1-.96-.63 2.993 2.993 0 0 1-.642-1.032c-.156-.412-.234-.888-.234-1.428 0-.42.068-.814.204-1.182.136-.372.33-.694.582-.966.256-.276.566-.494.93-.654.368-.16.782-.24 1.242-.24.388 0 .746.062 1.074.186.328.124.61.306.846.546.236.236.42.528.552.876.136.344.204.738.204 1.182 0 .224-.024.376-.072.456-.048.076-.14.114-.276.114h-3.81Zm6.668-2.196c.192-.368.42-.656.684-.864a1.45 1.45 0 0 1 .936-.318c.284 0 .512.062.684.186l-.096 1.11a.294.294 0 0 1-.09.156.239.239 0 0 1-.15.042c-.06 0-.15-.01-.27-.03a2.01 2.01 0 0 0-.342-.03 1.11 1.11 0 0 0-.786.282c-.1.088-.19.196-.27.324a3.44 3.44 0 0 0-.216.438V13h-1.482V6.844h.87c.152 0 .258.028.318.084.06.052.1.148.12.288l.09.696Zm6.87 1.302c0-.192-.029-.372-.085-.54a1.25 1.25 0 0 0-.24-.45 1.096 1.096 0 0 0-.414-.3 1.358 1.358 0 0 0-.576-.114c-.428 0-.766.122-1.014.366-.244.244-.4.59-.468 1.038h2.796Zm-2.827.894c.024.316.08.59.168.822.088.228.204.418.348.57.144.148.314.26.51.336.2.072.42.108.66.108.24 0 .446-.028.618-.084a2.76 2.76 0 0 0 .456-.186 7.55 7.55 0 0 0 .342-.186.59.59 0 0 1 .288-.084c.124 0 .216.046.276.138l.426.54a2.536 2.536 0 0 1-.552.486 3.281 3.281 0 0 1-1.32.474 4.79 4.79 0 0 1-.666.048 3.33 3.33 0 0 1-1.194-.21 2.726 2.726 0 0 1-.96-.63 2.993 2.993 0 0 1-.642-1.032c-.156-.412-.234-.888-.234-1.428 0-.42.068-.814.204-1.182.136-.372.33-.694.582-.966.256-.276.566-.494.93-.654.368-.16.782-.24 1.242-.24.388 0 .746.062 1.074.186.328.124.61.306.846.546.236.236.42.528.552.876.136.344.204.738.204 1.182 0 .224-.024.376-.072.456-.048.076-.14.114-.276.114h-3.81Zm9.134-1.692a1.451 1.451 0 0 0-.552-.432 1.597 1.597 0 0 0-.636-.126c-.224 0-.426.042-.606.126a1.21 1.21 0 0 0-.462.384 1.8 1.8 0 0 0-.294.648c-.068.26-.102.568-.102.924 0 .36.028.666.084.918.06.248.144.452.252.612.108.156.24.27.396.342.156.068.33.102.522.102.308 0 .57-.064.786-.192.216-.128.42-.31.612-.546v-2.76Zm1.482-4.332V13h-.906c-.196 0-.32-.09-.372-.27l-.126-.594a3.09 3.09 0 0 1-.858.69c-.32.176-.694.264-1.122.264-.336 0-.644-.07-.924-.21a2.098 2.098 0 0 1-.726-.606 3.033 3.033 0 0 1-.468-.99 5.072 5.072 0 0 1-.162-1.344c0-.456.062-.88.186-1.272s.302-.732.534-1.02c.232-.288.51-.512.834-.672a2.384 2.384 0 0 1 1.092-.246c.344 0 .638.054.882.162.244.108.462.254.654.438V4.084h1.482Zm5.863 7.32c.168.204.35.348.546.432.2.084.41.126.63.126.228 0 .432-.04.612-.12.184-.084.34-.212.468-.384a1.93 1.93 0 0 0 .294-.666 4.05 4.05 0 0 0 .102-.972c0-.676-.112-1.164-.336-1.464-.224-.304-.546-.456-.966-.456-.284 0-.532.066-.744.198a2.38 2.38 0 0 0-.606.546v2.76Zm0-3.804a3.02 3.02 0 0 1 .822-.618c.304-.156.65-.234 1.038-.234.356 0 .676.07.96.21.288.14.532.342.732.606.204.26.36.576.468.948.108.372.162.79.162 1.254 0 .5-.062.954-.186 1.362a3.132 3.132 0 0 1-.534 1.05 2.4 2.4 0 0 1-.828.672c-.324.16-.684.24-1.08.24a2.103 2.103 0 0 1-.954-.216 1.891 1.891 0 0 1-.366-.246c-.108-.1-.212-.21-.312-.33l-.066.414c-.024.104-.066.178-.126.222a.37.37 0 0 1-.234.066h-.978V4.084h1.482V7.6Zm10.743-.756-3.354 7.848a.538.538 0 0 1-.174.234c-.068.056-.174.084-.318.084H97.68l1.152-2.472-2.49-5.694h1.302c.116 0 .206.028.27.084.068.056.118.12.15.192l1.308 3.192c.044.108.08.216.108.324.032.108.062.218.09.33a32.3 32.3 0 0 1 .108-.33c.036-.112.076-.222.12-.33l1.236-3.186a.437.437 0 0 1 .408-.276h1.188Z"/></g></svg>'],{type:"image/svg+xml;charset=utf-8"}),o=URL.createObjectURL(i),a=new Image;a.onload=()=>{const i=e.width/t-a.width-16,o=e.height/t-a.height-16;n?.drawImage(a,i,o),r(e)},a.src=o})),ca=(e,t=1)=>new Promise((r=>{const n=e.getContext("2d"),i=new Blob(['<svg xmlns="http://www.w3.org/2000/svg" width="100" height="103"><path d="M92.527 39.465 22.312 1.87A15.549 15.549 0 0 0 14.777 0c-2.64.02-5.226.703-7.5 1.98a14.086 14.086 0 0 0-5.332 5.032A13.185 13.185 0 0 0 0 13.906v75.188c-.004 2.422.668 4.8 1.945 6.894 1.278 2.094 3.117 3.832 5.332 5.035a15.598 15.598 0 0 0 7.5 1.977 15.6 15.6 0 0 0 7.536-1.867l70.214-37.598c2.262-1.187 4.153-2.933 5.465-5.05A13.198 13.198 0 0 0 100 51.5c0-2.457-.691-4.867-2.008-6.984-1.312-2.118-3.203-3.86-5.465-5.051Zm0 0" style="stroke:none;fill-rule:nonzero;fill:#fff;fill-opacity:1"/></svg>'],{type:"image/svg+xml;charset=utf-8"}),o=URL.createObjectURL(i),a=new Image;a.onload=()=>{const i=e.width/t/2-a.width/2,o=e.height/t/2-a.height/2;n?.drawImage(a,i,o),r(e)},a.src=o,n&&(n.fillStyle="#00000064",n.fillRect(0,0,e.width,e.height),n.restore())})),la=async(e,t={addPlayWatermark:!1})=>{const{videoWidth:r,videoHeight:n}=e,i=r>n?"landscape":"portrait",o="portrait"===i?r:n,a="landscape"===i?n:r,s="landscape"===i?(r-o)/2:0,c="portrait"===i?(n-a)/2:0;let l=document.createElement("canvas");const d=l.getContext("2d"),u=window.devicePixelRatio||1;l.width=o*u,l.height=a*u,d?.scale(u,u),d?.drawImage(e,s,c,o,a,0,0,l.width/u,l.height/u),t.addPlayWatermark&&(l=await ca(l,window.devicePixelRatio));return(await sa(l,window.devicePixelRatio)).toDataURL("image/jpeg")},da=async(e,t={addPlayWatermark:!1})=>{const r=document.createElement("video"),n=new MediaStream;n.addTrack(e),r.srcObject=n,r.setAttribute("muted","true");const i=e.getSettings();r.width=i.width||0,r.height=i.height||0,await r.play();let o=document.createElement("canvas");const a=o.getContext("2d");o.height=r.height,o.width=r.width,a?.drawImage(r,0,0),t.addPlayWatermark&&(o=await ca(o));return(await sa(o)).toDataURL("image/jpeg")};var ua=o("eEB2e"),pa=(zi=o("4Fy4N"),{}),ha=pa&&pa.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),fa=pa&&pa.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),ma=pa&&pa.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&ha(t,e,r);return fa(t,e),t},ga=pa&&pa.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(pa,"__esModule",{value:!0}),pa.debug=pa.parseScalabilityMode=pa.detectDevice=pa.Device=pa.version=pa.types=void 0;const va=ga(o("hZG0u"));pa.debug=va.default;var ya=o("1ZHQC");Object.defineProperty(pa,"Device",{enumerable:!0,get:function(){return ya.Device}}),Object.defineProperty(pa,"detectDevice",{enumerable:!0,get:function(){return ya.detectDevice}});const ba=ma(o("cQumC"));pa.types=ba,pa.version="3.6.53";var wa=o("fT1lN");Object.defineProperty(pa,"parseScalabilityMode",{enumerable:!0,get:function(){return wa.parse}});const xa=new ta("StreamerMediasoup");function Sa(){try{const r=navigator.userAgent,n=zi.getParser(r);e="DeviceDetectionForced",t=!0,Uo().setTag(e,t),$o({type:"debug",category:"browser",data:n.getResult()});const i=n.getOS();if("Safari"===n.getBrowserName()&&"iOS"===i.name&&Number(i.version)>=14.3)return new(0,pa.Device)({handlerName:"Safari12"});throw Error("failed to autoDetect browser, falling back to chrome 74")}catch(e){xa.error("deviceAutoDetection",e),Wo(e)}var e,t;return new(0,pa.Device)({handlerName:"Chrome74"})}class _a{constructor(e,t){this.mediasoupDevice=e,this.config=t}static async create(e,t){const r=await e.request("getRouterRtpCapabilities");r.headerExtensions=r.headerExtensions?.filter((e=>"urn:3gpp:video-orientation"!==e.uri));const n=function(){try{return new(0,pa.Device)}catch(e){return xa.error("failed to detects device from mediasoup, fallback on auto detection",e),Sa()}}();return n.load({routerRtpCapabilities:r}),new _a(n,t)}getRtpCapabilities(){return this.mediasoupDevice.rtpCapabilities}async createTransportConfig(e){const t=await e.request("createWebRtcTransport");return{id:t.id,iceParameters:t.iceParameters,iceCandidates:t.iceCandidates,dtlsParameters:{...t.dtlsParameters,role:"auto"},sctpParameters:t.sctpParameters,iceServers:this.config.iceServers,proprietaryConstraints:{optional:[{googDscp:!0}]},additionalSettings:{encodedInsertableStreams:!1}}}async createSendTransport(e){const t=this.mediasoupDevice.createSendTransport(await this.createTransportConfig(e));return t.on("connect",(({dtlsParameters:r},n,i)=>{xa.log("dtlsParameters",t.id,r),e.request("connectWebRtcTransport",{transportId:t.id,dtlsParameters:r}).then(n).catch(i)})),t.on("produce",(async({kind:r,rtpParameters:n,appData:i},o,a)=>{try{const{id:a}=await e.request("produce",{transportId:t.id,kind:r,rtpParameters:n,appData:i});o({id:a}),xa.log("producerTransport: ",t)}catch(e){a(e)}})),t}async createRecvTransport(e){const t=this.mediasoupDevice.createRecvTransport(await this.createTransportConfig(e));return t.on("connect",(({dtlsParameters:r},n,i)=>{xa.log("dtls",t.id,r),e.request("connectWebRtcTransport",{transportId:t.id,dtlsParameters:r}).then(n).catch(i)})),t}async createTransport(e,t){return"send"===t?await this.createSendTransport(e):await this.createRecvTransport(e)}async produceAudio(e,t,r){return await e.produce({track:t,codecOptions:{opusStereo:!0,opusDtx:!0},appData:r})}async produceVideo(e,t,r){return await e.produce({track:t,encodings:undefined,codecOptions:{videoGoogleStartBitrate:1e3},appData:r})}}var ka={};(function(){"use strict";var e;function r(e){var t=0;return function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}}var n="function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,r){return e==Array.prototype||e==Object.prototype||(e[t]=r.value),e};var i=function(e){e=["object"==typeof globalThis&&globalThis,e,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof t&&t];for(var r=0;r<e.length;++r){var n=e[r];if(n&&n.Math==Math)return n}throw Error("Cannot find global object")}(this);function o(e,t){if(t)e:{var r=i;e=e.split(".");for(var o=0;o<e.length-1;o++){var a=e[o];if(!(a in r))break e;r=r[a]}(t=t(o=r[e=e[e.length-1]]))!=o&&null!=t&&n(r,e,{configurable:!0,writable:!0,value:t})}}function a(e){return(e={next:e})[Symbol.iterator]=function(){return this},e}function s(e){var t="undefined"!=typeof Symbol&&Symbol.iterator&&e[Symbol.iterator];return t?t.call(e):{next:r(e)}}function c(e){if(!(e instanceof Array)){e=s(e);for(var t,r=[];!(t=e.next()).done;)r.push(t.value);e=r}return e}o("Symbol",(function(e){function t(e,t){this.g=e,n(this,"description",{configurable:!0,writable:!0,value:t})}if(e)return e;t.prototype.toString=function(){return this.g};var r="jscomp_symbol_"+(1e9*Math.random()>>>0)+"_",i=0;return function e(n){if(this instanceof e)throw new TypeError("Symbol is not a constructor");return new t(r+(n||"")+"_"+i++,n)}})),o("Symbol.iterator",(function(e){if(e)return e;e=Symbol("Symbol.iterator");for(var t="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),o=0;o<t.length;o++){var s=i[t[o]];"function"==typeof s&&"function"!=typeof s.prototype[e]&&n(s.prototype,e,{configurable:!0,writable:!0,value:function(){return a(r(this))}})}return e}));var l,d="function"==typeof Object.create?Object.create:function(e){function t(){}return t.prototype=e,new t};if("function"==typeof Object.setPrototypeOf)l=Object.setPrototypeOf;else{var u;e:{var p={};try{p.__proto__={a:!0},u=p.a;break e}catch(e){}u=!1}l=u?function(e,t){if(e.__proto__=t,e.__proto__!==t)throw new TypeError(e+" is not extensible");return e}:null}var h=l;function f(e,t){if(e.prototype=d(t.prototype),e.prototype.constructor=e,h)h(e,t);else for(var r in t)if("prototype"!=r)if(Object.defineProperties){var n=Object.getOwnPropertyDescriptor(t,r);n&&Object.defineProperty(e,r,n)}else e[r]=t[r];e.ea=t.prototype}function m(){this.l=!1,this.i=null,this.h=void 0,this.g=1,this.s=this.m=0,this.j=null}function g(e){if(e.l)throw new TypeError("Generator is already running");e.l=!0}function v(e,t){e.j={U:t,V:!0},e.g=e.m||e.s}function y(e,t,r){return e.g=r,{value:t}}function b(e){this.g=new m,this.h=e}function w(e,t,r,n){try{var i=t.call(e.g.i,r);if(!(i instanceof Object))throw new TypeError("Iterator result "+i+" is not an object");if(!i.done)return e.g.l=!1,i;var o=i.value}catch(t){return e.g.i=null,v(e.g,t),x(e)}return e.g.i=null,n.call(e.g,o),x(e)}function x(e){for(;e.g.g;)try{var t=e.h(e.g);if(t)return e.g.l=!1,{value:t.value,done:!1}}catch(t){e.g.h=void 0,v(e.g,t)}if(e.g.l=!1,e.g.j){if(t=e.g.j,e.g.j=null,t.V)throw t.U;return{value:t.return,done:!0}}return{value:void 0,done:!0}}function S(e){this.next=function(t){return g(e.g),e.g.i?t=w(e,e.g.i.next,t,e.g.o):(e.g.o(t),t=x(e)),t},this.throw=function(t){return g(e.g),e.g.i?t=w(e,e.g.i.throw,t,e.g.o):(v(e.g,t),t=x(e)),t},this.return=function(t){return function(e,t){g(e.g);var r=e.g.i;return r?w(e,"return"in r?r.return:function(e){return{value:e,done:!0}},t,e.g.return):(e.g.return(t),x(e))}(e,t)},this[Symbol.iterator]=function(){return this}}function _(e,t){return t=new S(new b(t)),h&&e.prototype&&h(t,e.prototype),t}m.prototype.o=function(e){this.h=e},m.prototype.return=function(e){this.j={return:e},this.g=this.s};var k="function"==typeof Object.assign?Object.assign:function(e,t){for(var r=1;r<arguments.length;r++){var n=arguments[r];if(n)for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e};o("Object.assign",(function(e){return e||k})),o("Promise",(function(e){function t(e){this.h=0,this.i=void 0,this.g=[],this.o=!1;var t=this.j();try{e(t.resolve,t.reject)}catch(e){t.reject(e)}}function r(){this.g=null}function n(e){return e instanceof t?e:new t((function(t){t(e)}))}if(e)return e;r.prototype.h=function(e){if(null==this.g){this.g=[];var t=this;this.i((function(){t.l()}))}this.g.push(e)};var o=i.setTimeout;r.prototype.i=function(e){o(e,0)},r.prototype.l=function(){for(;this.g&&this.g.length;){var e=this.g;this.g=[];for(var t=0;t<e.length;++t){var r=e[t];e[t]=null;try{r()}catch(e){this.j(e)}}}this.g=null},r.prototype.j=function(e){this.i((function(){throw e}))},t.prototype.j=function(){function e(e){return function(n){r||(r=!0,e.call(t,n))}}var t=this,r=!1;return{resolve:e(this.C),reject:e(this.l)}},t.prototype.C=function(e){if(e===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(e instanceof t)this.F(e);else{e:switch(typeof e){case"object":var r=null!=e;break e;case"function":r=!0;break e;default:r=!1}r?this.u(e):this.m(e)}},t.prototype.u=function(e){var t=void 0;try{t=e.then}catch(e){return void this.l(e)}"function"==typeof t?this.G(t,e):this.m(e)},t.prototype.l=function(e){this.s(2,e)},t.prototype.m=function(e){this.s(1,e)},t.prototype.s=function(e,t){if(0!=this.h)throw Error("Cannot settle("+e+", "+t+"): Promise already settled in state"+this.h);this.h=e,this.i=t,2===this.h&&this.D(),this.A()},t.prototype.D=function(){var e=this;o((function(){if(e.B()){var t=i.console;void 0!==t&&t.error(e.i)}}),1)},t.prototype.B=function(){if(this.o)return!1;var e=i.CustomEvent,t=i.Event,r=i.dispatchEvent;return void 0===r||("function"==typeof e?e=new e("unhandledrejection",{cancelable:!0}):"function"==typeof t?e=new t("unhandledrejection",{cancelable:!0}):(e=i.document.createEvent("CustomEvent")).initCustomEvent("unhandledrejection",!1,!0,e),e.promise=this,e.reason=this.i,r(e))},t.prototype.A=function(){if(null!=this.g){for(var e=0;e<this.g.length;++e)a.h(this.g[e]);this.g=null}};var a=new r;return t.prototype.F=function(e){var t=this.j();e.J(t.resolve,t.reject)},t.prototype.G=function(e,t){var r=this.j();try{e.call(t,r.resolve,r.reject)}catch(e){r.reject(e)}},t.prototype.then=function(e,r){function n(e,t){return"function"==typeof e?function(t){try{i(e(t))}catch(e){o(e)}}:t}var i,o,a=new t((function(e,t){i=e,o=t}));return this.J(n(e,i),n(r,o)),a},t.prototype.catch=function(e){return this.then(void 0,e)},t.prototype.J=function(e,t){function r(){switch(n.h){case 1:e(n.i);break;case 2:t(n.i);break;default:throw Error("Unexpected state: "+n.h)}}var n=this;null==this.g?a.h(r):this.g.push(r),this.o=!0},t.resolve=n,t.reject=function(e){return new t((function(t,r){r(e)}))},t.race=function(e){return new t((function(t,r){for(var i=s(e),o=i.next();!o.done;o=i.next())n(o.value).J(t,r)}))},t.all=function(e){var r=s(e),i=r.next();return i.done?n([]):new t((function(e,t){function o(t){return function(r){a[t]=r,0==--s&&e(a)}}var a=[],s=0;do{a.push(void 0),s++,n(i.value).J(o(a.length-1),t),i=r.next()}while(!i.done)}))},t})),o("Object.is",(function(e){return e||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}})),o("Array.prototype.includes",(function(e){return e||function(e,t){var r=this;r instanceof String&&(r=String(r));var n=r.length;for(0>(t=t||0)&&(t=Math.max(t+n,0));t<n;t++){var i=r[t];if(i===e||Object.is(i,e))return!0}return!1}})),o("String.prototype.includes",(function(e){return e||function(e,t){if(null==this)throw new TypeError("The 'this' value for String.prototype.includes must not be null or undefined");if(e instanceof RegExp)throw new TypeError("First argument to String.prototype.includes must not be a regular expression");return-1!==this.indexOf(e,t||0)}})),o("Array.prototype.keys",(function(e){return e||function(){return function(e,t){e instanceof String&&(e+="");var r=0,n=!1,i={next:function(){if(!n&&r<e.length){var i=r++;return{value:t(i,e[i]),done:!1}}return n=!0,{done:!0,value:void 0}}};return i[Symbol.iterator]=function(){return i},i}(this,(function(e){return e}))}}));var C=this||self;function E(e,t){e=e.split(".");var r,n=C;e[0]in n||void 0===n.execScript||n.execScript("var "+e[0]);for(;e.length&&(r=e.shift());)e.length||void 0===t?n=n[r]&&n[r]!==Object.prototype[r]?n[r]:n[r]={}:n[r]=t}function P(e,t){return t=String.fromCharCode.apply(null,t),null==e?t:e+t}var R,T,j="undefined"!=typeof TextDecoder,O="undefined"!=typeof TextEncoder;function M(e){if(O)e=(T||(T=new TextEncoder)).encode(e);else{var t=void 0;t=void 0!==t&&t;for(var r=0,n=new Uint8Array(3*e.length),i=0;i<e.length;i++){var o=e.charCodeAt(i);if(128>o)n[r++]=o;else{if(2048>o)n[r++]=o>>6|192;else{if(55296<=o&&57343>=o){if(56319>=o&&i<e.length){var a=e.charCodeAt(++i);if(56320<=a&&57343>=a){o=1024*(o-55296)+a-56320+65536,n[r++]=o>>18|240,n[r++]=o>>12&63|128,n[r++]=o>>6&63|128,n[r++]=63&o|128;continue}i--}if(t)throw Error("Found an unpaired surrogate");o=65533}n[r++]=o>>12|224,n[r++]=o>>6&63|128}n[r++]=63&o|128}}e=n.subarray(0,r)}return e}var L={},D=null;function I(e,t){void 0===t&&(t=0),N(),t=L[t];for(var r=Array(Math.floor(e.length/3)),n=t[64]||"",i=0,o=0;i<e.length-2;i+=3){var a=e[i],s=e[i+1],c=e[i+2],l=t[a>>2];a=t[(3&a)<<4|s>>4],s=t[(15&s)<<2|c>>6],c=t[63&c],r[o++]=l+a+s+c}switch(l=0,c=n,e.length-i){case 2:c=t[(15&(l=e[i+1]))<<2]||n;case 1:e=e[i],r[o]=t[e>>2]+t[(3&e)<<4|l>>4]+c+n}return r.join("")}function A(e){var t=e.length,r=3*t/4;r%3?r=Math.floor(r):-1!="=.".indexOf(e[t-1])&&(r=-1!="=.".indexOf(e[t-2])?r-2:r-1);var n=new Uint8Array(r),i=0;return function(e,t){function r(t){for(;n<e.length;){var r=e.charAt(n++),i=D[r];if(null!=i)return i;if(!/^[\s\xa0]*$/.test(r))throw Error("Unknown base64 encoding at char: "+r)}return t}N();for(var n=0;;){var i=r(-1),o=r(0),a=r(64),s=r(64);if(64===s&&-1===i)break;t(i<<2|o>>4),64!=a&&(t(o<<4&240|a>>2),64!=s&&t(a<<6&192|s))}}(e,(function(e){n[i++]=e})),n.subarray(0,i)}function N(){if(!D){D={};for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),t=["+/=","+/","-_=","-_.","-_"],r=0;5>r;r++){var n=e.concat(t[r].split(""));L[r]=n;for(var i=0;i<n.length;i++){var o=n[i];void 0===D[o]&&(D[o]=i)}}}}var F,z="function"==typeof Uint8Array.prototype.slice;function B(e,t,r){return t===r?F||(F=new Uint8Array(0)):z?e.slice(t,r):new Uint8Array(e.subarray(t,r))}var U=0;function V(e,t){t=void 0!==(t=void 0===t?{}:t).v&&t.v,this.h=null,this.g=this.i=this.j=0,this.l=!1,this.v=t,e&&H(this,e)}function H(e,t){t=t.constructor===Uint8Array?t:t.constructor===ArrayBuffer||t.constructor===Array?new Uint8Array(t):t.constructor===String?A(t):t instanceof Uint8Array?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):new Uint8Array(0),e.h=t,e.j=0,e.i=e.h.length,e.g=e.j}function q(e){var t=e.h,r=t[e.g],n=127&r;return 128>r?(e.g+=1,n):(n|=(127&(r=t[e.g+1]))<<7,128>r?(e.g+=2,n):(n|=(127&(r=t[e.g+2]))<<14,128>r?(e.g+=3,n):(n|=(127&(r=t[e.g+3]))<<21,128>r?(e.g+=4,n):(n|=(15&(r=t[e.g+4]))<<28,128>r?(e.g+=5,n>>>0):(e.g+=5,128<=t[e.g++]&&128<=t[e.g++]&&128<=t[e.g++]&&128<=t[e.g++]&&e.g++,n)))))}function W(e){var t=e.h[e.g],r=e.h[e.g+1],n=e.h[e.g+2],i=e.h[e.g+3];return e.g+=4,e=2*((r=(t<<0|r<<8|n<<16|i<<24)>>>0)>>31)+1,t=r>>>23&255,r&=8388607,255==t?r?NaN:1/0*e:0==t?e*Math.pow(2,-149)*r:e*Math.pow(2,t-150)*(r+Math.pow(2,23))}V.prototype.reset=function(){this.g=this.j};var $=[];function K(){this.g=new Uint8Array(64),this.h=0}function G(e,t){for(;127<t;)e.push(127&t|128),t>>>=7;e.push(t)}function Z(e){var t={},r=void 0!==t.N&&t.N;this.o={v:void 0!==t.v&&t.v},this.N=r,t=this.o,$.length?(r=$.pop(),t&&(r.v=t.v),e&&H(r,e),e=r):e=new V(e,t),this.g=e,this.m=this.g.g,this.h=this.i=this.l=-1,this.j=!1}function Q(e){var t=e.g;if((t=t.g==t.i)||(t=e.j)||(t=(t=e.g).l||0>t.g||t.g>t.i),t)return!1;e.m=e.g.g;var r=7&(t=q(e.g));return 0!=r&&5!=r&&1!=r&&2!=r&&3!=r&&4!=r?(e.j=!0,!1):(e.i=t,e.l=t>>>3,e.h=r,!0)}function Y(e){switch(e.h){case 0:if(0!=e.h)Y(e);else{for(e=e.g;128&e.h[e.g];)e.g++;e.g++}break;case 1:1!=e.h?Y(e):(e=e.g).g+=8;break;case 2:if(2!=e.h)Y(e);else{var t=q(e.g);(e=e.g).g+=t}break;case 5:5!=e.h?Y(e):(e=e.g).g+=4;break;case 3:for(t=e.l;;){if(!Q(e)){e.j=!0;break}if(4==e.h){e.l!=t&&(e.j=!0);break}Y(e)}break;default:e.j=!0}}function J(e,t,r){var n=e.g.i,i=q(e.g);return i=e.g.g+i,e.g.i=i,r(t,e),e.g.g=i,e.g.i=n,t}function X(e){var t,r=q(e.g),n=(e=e.g).g;if(e.g+=r,e=e.h,j)(t=R)||(t=R=new TextDecoder("utf-8",{fatal:!1})),t=t.decode(e.subarray(n,n+r));else{r=n+r;for(var i,o,a,s=[],c=null;n<r;)128>(i=e[n++])?s.push(i):224>i?n>=r?s.push(65533):(o=e[n++],194>i||128!=(192&o)?(n--,s.push(65533)):s.push((31&i)<<6|63&o)):240>i?n>=r-1?s.push(65533):128!=(192&(o=e[n++]))||224===i&&160>o||237===i&&160<=o||128!=(192&(t=e[n++]))?(n--,s.push(65533)):s.push((15&i)<<12|(63&o)<<6|63&t):244>=i?n>=r-2?s.push(65533):128!=(192&(o=e[n++]))||0!=o-144+(i<<28)>>30||128!=(192&(t=e[n++]))||128!=(192&(a=e[n++]))?(n--,s.push(65533)):(i=(7&i)<<18|(63&o)<<12|(63&t)<<6|63&a,i-=65536,s.push(55296+(i>>10&1023),56320+(1023&i))):s.push(65533),8192<=s.length&&(c=P(c,s),s.length=0);t=P(c,s)}return t}function ee(){this.h=[],this.i=0,this.g=new K}function te(e,t){0!==t.length&&(e.h.push(t),e.i+=t.length)}function re(e){var t=e.i+e.g.length();if(0===t)return new Uint8Array(0);t=new Uint8Array(t);for(var r=e.h,n=r.length,i=0,o=0;o<n;o++){var a=r[o];0!==a.length&&(t.set(a,i),i+=a.length)}return 0!==(n=(r=e.g).h)&&(t.set(r.g.subarray(0,n),i),r.h=0),e.h=[t],t}function ne(e,t,r){if(null!=r){G(e.g,8*t+5),e=e.g;var n=r;0===(n=(r=0>n?1:0)?-n:n)?0<1/n?U=0:(0,U=2147483648):isNaN(n)?(0,U=2147483647):34028234663852886e22<n?(0,U=(r<<31|2139095040)>>>0):11754943508222875e-54>n?(n=Math.round(n/Math.pow(2,-149)),0,U=(r<<31|n)>>>0):(t=Math.floor(Math.log(n)/Math.LN2),n*=Math.pow(2,-t),n=8388607&Math.round(8388608*n),0,U=(r<<31|t+127<<23|n)>>>0),r=U,e.push(r>>>0&255),e.push(r>>>8&255),e.push(r>>>16&255),e.push(r>>>24&255)}}K.prototype.push=function(e){if(!(this.h+1<this.g.length)){var t=this.g;this.g=new Uint8Array(Math.ceil(1+2*this.g.length)),this.g.set(t)}this.g[this.h++]=e},K.prototype.length=function(){return this.h},K.prototype.end=function(){var e=this.g,t=this.h;return this.h=0,B(e,0,t)},Z.prototype.reset=function(){this.g.reset(),this.h=this.l=-1};var ie="function"==typeof Uint8Array;function oe(e,t,r){if(null!=e)return"object"==typeof e?ie&&e instanceof Uint8Array?r(e):ae(e,t,r):t(e)}function ae(e,t,r){if(Array.isArray(e)){for(var n=Array(e.length),i=0;i<e.length;i++)n[i]=oe(e[i],t,r);return Array.isArray(e)&&e.W&&de(n),n}for(i in n={},e)n[i]=oe(e[i],t,r);return n}function se(e){return"number"==typeof e?isFinite(e)?e:String(e):e}var ce,le={W:{value:!0,configurable:!0}};function de(e){return Array.isArray(e)&&!Object.isFrozen(e)&&Object.defineProperties(e,le),e}function ue(e,t,r){var n=ce;if(ce=null,e||(e=n),n=this.constructor.ca,e||(e=n?[n]:[]),this.j=n?0:-1,this.i=null,this.g=e,e=(n=this.g.length)-1,n&&null!==(n=this.g[e])&&"object"==typeof n&&n.constructor===Object?(this.l=e-this.j,this.h=n):void 0!==t&&-1<t?(this.l=Math.max(t,e+1-this.j),this.h=null):this.l=Number.MAX_VALUE,r)for(t=0;t<r.length;t++)(e=r[t])<this.l?(e+=this.j,(n=this.g[e])?de(n):this.g[e]=pe):(he(this),(n=this.h[e])?de(n):this.h[e]=pe)}var pe=Object.freeze(de([]));function he(e){var t=e.l+e.j;e.g[t]||(e.h=e.g[t]={})}function fe(e,t,r){return-1===t?null:void 0!==r&&r||t>=e.l?e.h?e.h[t]:void 0:e.g[t+e.j]}function me(e){var t=void 0!==t&&t,r=fe(e,1,t);return null==r&&(r=pe),r===pe&&ve(e,1,r=de([]),t),r}function ge(e,t,r){return null==(e=null==(e=fe(e,t))?e:+e)?void 0===r?0:r:e}function ve(e,t,r,n){void 0!==n&&n||t>=e.l?(he(e),e.h[t]=r):e.g[t+e.j]=r}function ye(e,t){e.i||(e.i={});var r=e.i[1];if(!r){var n=me(e);r=[];for(var i=0;i<n.length;i++)r[i]=new t(n[i]);e.i[1]=r}return r}function be(e,t,r,n){var i=ye(e,r);t=t||new r,e=me(e),null!=n?(i.splice(n,0,t),e.splice(n,0,we(t,!1))):(i.push(t),e.push(we(t,!1)))}function we(e,t){if(e.i)for(var r in e.i){var n=e.i[r];if(Array.isArray(n))for(var i=0;i<n.length;i++)n[i]&&we(n[i],t);else n&&we(n,t)}return e.g}function xe(e,t){return null==(e=fe(e,t))?0:e}function Se(e,t){return null==(e=fe(e,t))?"":e}function _e(e,t){if(e=e.m){te(t,t.g.end());for(var r=0;r<e.length;r++)te(t,e[r])}}function ke(e,t){if(4==t.h)return!1;var r=t.m;return Y(t),t.N||(t=B(t.g.h,r,t.g.g),(r=e.m)?r.push(t):e.m=[t]),!0}function Ce(e,t){var r=void 0;return new(r||(r=Promise))((function(n,i){function o(e){try{s(t.next(e))}catch(e){i(e)}}function a(e){try{s(t.throw(e))}catch(e){i(e)}}function s(e){e.done?n(e.value):new r((function(t){t(e.value)})).then(o,a)}s((t=t.apply(e,void 0)).next())}))}function Ee(e){ue.call(this,e)}function Pe(e,t){for(;Q(t);)switch(t.i){case 8:var r=q(t.g);ve(e,1,r);break;case 21:ve(e,2,r=W(t.g));break;case 26:ve(e,3,r=X(t));break;case 34:ve(e,4,r=X(t));break;default:if(!ke(e,t))return e}return e}function Re(e){ue.call(this,e,-1,Te)}ue.prototype.toJSON=function(){return ae(we(this,!1),se,I)},ue.prototype.toString=function(){return we(this,!1).toString()},f(Ee,ue),f(Re,ue),Re.prototype.addClassification=function(e,t){be(this,e,Ee,t)};var Te=[1];function je(e){ue.call(this,e)}function Oe(e,t){for(;Q(t);)switch(t.i){case 13:var r=W(t.g);ve(e,1,r);break;case 21:ve(e,2,r=W(t.g));break;case 29:ve(e,3,r=W(t.g));break;case 37:ve(e,4,r=W(t.g));break;case 45:ve(e,5,r=W(t.g));break;default:if(!ke(e,t))return e}return e}function Me(e){ue.call(this,e,-1,Le)}f(je,ue),f(Me,ue);var Le=[1];function De(e){ue.call(this,e)}function Ie(e,t,r){if(r=e.createShader(0===r?e.VERTEX_SHADER:e.FRAGMENT_SHADER),e.shaderSource(r,t),e.compileShader(r),!e.getShaderParameter(r,e.COMPILE_STATUS))throw Error("Could not compile WebGL shader.\n\n"+e.getShaderInfoLog(r));return r}function Ae(e){return ye(e,Ee).map((function(e){return{index:xe(e,1),Y:ge(e,2),label:null!=fe(e,3)?Se(e,3):void 0,displayName:null!=fe(e,4)?Se(e,4):void 0}}))}function Ne(e){return{x:ge(e,1),y:ge(e,2),z:ge(e,3),visibility:null!=fe(e,4)?ge(e,4):void 0}}function Fe(e,t){this.h=e,this.g=t,this.l=0}function ze(e,t,r){return function(e,t){var r=e.g;if(void 0===e.m){var n=Ie(r,"\n attribute vec2 aVertex;\n attribute vec2 aTex;\n varying vec2 vTex;\n void main(void) {\n gl_Position = vec4(aVertex, 0.0, 1.0);\n vTex = aTex;\n }",0),i=Ie(r,"\n precision mediump float;\n varying vec2 vTex;\n uniform sampler2D sampler0;\n void main(){\n gl_FragColor = texture2D(sampler0, vTex);\n }",1),o=r.createProgram();if(r.attachShader(o,n),r.attachShader(o,i),r.linkProgram(o),!r.getProgramParameter(o,r.LINK_STATUS))throw Error("Could not compile WebGL program.\n\n"+r.getProgramInfoLog(o));n=e.m=o,r.useProgram(n),i=r.getUniformLocation(n,"sampler0"),e.j={I:r.getAttribLocation(n,"aVertex"),H:r.getAttribLocation(n,"aTex"),da:i},e.s=r.createBuffer(),r.bindBuffer(r.ARRAY_BUFFER,e.s),r.enableVertexAttribArray(e.j.I),r.vertexAttribPointer(e.j.I,2,r.FLOAT,!1,0,0),r.bufferData(r.ARRAY_BUFFER,new Float32Array([-1,-1,-1,1,1,1,1,-1]),r.STATIC_DRAW),r.bindBuffer(r.ARRAY_BUFFER,null),e.o=r.createBuffer(),r.bindBuffer(r.ARRAY_BUFFER,e.o),r.enableVertexAttribArray(e.j.H),r.vertexAttribPointer(e.j.H,2,r.FLOAT,!1,0,0),r.bufferData(r.ARRAY_BUFFER,new Float32Array([0,1,0,0,1,0,1,1]),r.STATIC_DRAW),r.bindBuffer(r.ARRAY_BUFFER,null),r.uniform1i(i,0)}n=e.j,r.useProgram(e.m),r.canvas.width=t.width,r.canvas.height=t.height,r.viewport(0,0,t.width,t.height),r.activeTexture(r.TEXTURE0),e.h.bindTexture2d(t.glName),r.enableVertexAttribArray(n.I),r.bindBuffer(r.ARRAY_BUFFER,e.s),r.vertexAttribPointer(n.I,2,r.FLOAT,!1,0,0),r.enableVertexAttribArray(n.H),r.bindBuffer(r.ARRAY_BUFFER,e.o),r.vertexAttribPointer(n.H,2,r.FLOAT,!1,0,0),r.bindFramebuffer(r.DRAW_FRAMEBUFFER?r.DRAW_FRAMEBUFFER:r.FRAMEBUFFER,null),r.clearColor(0,0,0,0),r.clear(r.COLOR_BUFFER_BIT),r.colorMask(!0,!0,!0,!0),r.drawArrays(r.TRIANGLE_FAN,0,4),r.disableVertexAttribArray(n.I),r.disableVertexAttribArray(n.H),r.bindBuffer(r.ARRAY_BUFFER,null),e.h.bindTexture2d(0)}(e,t),"function"==typeof e.g.canvas.transferToImageBitmap?Promise.resolve(e.g.canvas.transferToImageBitmap()):r?Promise.resolve(e.g.canvas):"function"==typeof createImageBitmap?createImageBitmap(e.g.canvas):(void 0===e.i&&(e.i=document.createElement("canvas")),new Promise((function(t){e.i.height=e.g.canvas.height,e.i.width=e.g.canvas.width,e.i.getContext("2d",{}).drawImage(e.g.canvas,0,0,e.g.canvas.width,e.g.canvas.height),t(e.i)})))}function Be(e){this.g=e}f(De,ue);var Ue=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,9,1,7,0,65,0,253,15,26,11]);function Ve(e,t){return t+e}function He(e,t){window[e]=t}function qe(e){if(this.g=e,this.listeners={},this.j={},this.F={},this.m={},this.s={},this.G=this.o=this.R=!0,this.C=Promise.resolve(),this.P="",this.B={},this.locateFile=e&&e.locateFile||Ve,"object"==typeof window)var t=window.location.pathname.toString().substring(0,window.location.pathname.toString().lastIndexOf("/"))+"/";else{if("undefined"==typeof location)throw Error("solutions can only be loaded on a web page or in a web worker");t=location.pathname.toString().substring(0,location.pathname.toString().lastIndexOf("/"))+"/"}if(this.S=t,e.options)for(var r=(t=s(Object.keys(e.options))).next();!r.done;r=t.next()){r=r.value;var n=e.options[r].default;void 0!==n&&(this.j[r]="function"==typeof n?n():n)}}function We(e){return Ce(e,(function e(){var t,r,n,i,o,a,s,l,d,u,p,h=this;return _(e,(function(e){switch(e.g){case 1:return t=h,h.R?(r=function(e,t){return void 0===e.g.files?[]:"function"==typeof e.g.files?e.g.files(t):e.g.files}(h,h.j),y(e,function(){return Ce(this,(function e(){return _(e,(function(e){switch(e.g){case 1:return e.m=2,y(e,WebAssembly.instantiate(Ue),4);case 4:e.g=3,e.m=0;break;case 2:return e.m=0,e.j=null,e.return(!1);case 3:return e.return(!0)}}))}))}(),2)):e.return();case 2:if(n=e.h,"object"==typeof window)return He("createMediapipeSolutionsWasm",{locateFile:h.locateFile}),He("createMediapipeSolutionsPackedAssets",{locateFile:h.locateFile}),a=r.filter((function(e){return void 0!==e.data})),s=r.filter((function(e){return void 0===e.data})),l=Promise.all(a.map((function(e){var r=$e(t,e.url);if(void 0!==e.path){var n=e.path;r=r.then((function(e){return t.overrideFile(n,e),Promise.resolve(e)}))}return r}))),d=Promise.all(s.map((function(e){return void 0===e.simd||e.simd&&n||!e.simd&&!n?function(e){var t=document.createElement("script");return t.setAttribute("src",e),t.setAttribute("crossorigin","anonymous"),new Promise((function(e){t.addEventListener("load",(function(){e()}),!1),t.addEventListener("error",(function(){e()}),!1),document.body.appendChild(t)}))}(t.locateFile(e.url,t.S)):Promise.resolve()}))).then((function(){return Ce(t,(function e(){var t,r,n=this;return _(e,(function(e){if(1==e.g)return t=window.createMediapipeSolutionsWasm,r=window.createMediapipeSolutionsPackedAssets,y(e,t(r),2);n.h=e.h,e.g=0}))}))})),u=Ce(t,(function e(){var t=this;return _(e,(function(e){return t.g.graph&&t.g.graph.url?e=y(e,$e(t,t.g.graph.url),0):(e.g=0,e=void 0),e}))})),y(e,Promise.all([d,l,u]),7);if("function"!=typeof importScripts)throw Error("solutions can only be loaded on a web page or in a web worker");return i=r.filter((function(e){return void 0===e.simd||e.simd&&n||!e.simd&&!n})).map((function(e){return t.locateFile(e.url,t.S)})),importScripts.apply(null,c(i)),y(e,createMediapipeSolutionsWasm(Module),6);case 6:h.h=e.h,h.l=new OffscreenCanvas(1,1),h.h.canvas=h.l,o=h.h.GL.createContext(h.l,{antialias:!1,alpha:!1,ba:"undefined"!=typeof WebGL2RenderingContext?2:1}),h.h.GL.makeContextCurrent(o),e.g=4;break;case 7:if(h.l=document.createElement("canvas"),!(p=h.l.getContext("webgl2",{}))&&!(p=h.l.getContext("webgl",{})))return alert("Failed to create WebGL canvas context when passing video frame."),e.return();h.D=p,h.h.canvas=h.l,h.h.createContext(h.l,!0,!0,{});case 4:h.i=new h.h.SolutionWasm,h.R=!1,e.g=0}}))}))}function $e(e,t){return Ce(e,(function e(){var r,n,i=this;return _(e,(function(e){return t in i.F?e.return(i.F[t]):(r=i.locateFile(t,""),n=fetch(r).then((function(e){return e.arrayBuffer()})),i.F[t]=n,e.return(n))}))}))}function Ke(e,t,r){return Ce(e,(function e(){var n,i,o,a,c,l,d,u,p,h,f,m,g,v,b=this;return _(e,(function(e){switch(e.g){case 1:if(!r)return e.return(t);for(n={},i=0,o=s(Object.keys(r)),a=o.next();!a.done;a=o.next())c=a.value,"string"!=typeof(l=r[c])&&"texture"===l.type&&void 0!==t[l.stream]&&++i;1<i&&(b.G=!1),d=s(Object.keys(r)),a=d.next();case 2:if(a.done){e.g=4;break}if(u=a.value,"string"==typeof(p=r[u]))return g=n,v=u,y(e,function(e,t,r){return Ce(e,(function e(){var n,i=this;return _(e,(function(e){return"number"==typeof r||r instanceof Uint8Array||r instanceof i.h.Uint8BlobList?e.return(r):r instanceof i.h.Texture2dDataOut?((n=i.s[t])||(n=new Fe(i.h,i.D),i.s[t]=n),e.return(ze(n,r,i.G))):e.return(void 0)}))}))}(b,u,t[p]),14);if(h=t[p.stream],"detection_list"===p.type){if(h){for(var w=h.getRectList(),x=h.getLandmarksList(),S=h.getClassificationsList(),k=[],C=0;C<w.size();++C){var E=w.get(C);e:{var P=new De;for(E=new Z(E);Q(E);)switch(E.i){case 13:var R=W(E.g);ve(P,1,R);break;case 21:ve(P,2,R=W(E.g));break;case 29:ve(P,3,R=W(E.g));break;case 37:ve(P,4,R=W(E.g));break;case 45:ve(P,5,R=W(E.g));break;case 48:for(var T=E.g,j=128,O=0,M=R=0;4>M&&128<=j;M++)O|=(127&(j=T.h[T.g++]))<<7*M;if(128<=j&&(O|=(127&(j=T.h[T.g++]))<<28,R|=(127&j)>>4),128<=j)for(M=0;5>M&&128<=j;M++)R|=(127&(j=T.h[T.g++]))<<7*M+3;128>j?(T=O>>>0,(R=2147483648&(j=R>>>0))&&(j=~j>>>0,0==(T=1+~T>>>0)&&(j=j+1>>>0)),T=4294967296*j+(T>>>0),R=R?-T:T):(T.l=!0,R=void 0),ve(P,6,R);break;default:if(!ke(P,E))break e}}P={Z:ge(P,1),$:ge(P,2),height:ge(P,3),width:ge(P,4),rotation:ge(P,5,0),X:xe(P,6)},R=x.get(C);e:for(E=new Me,R=new Z(R);Q(R);)if(10===R.i)be(E,T=J(R,new je,Oe),je,void 0);else if(!ke(E,R))break e;E=ye(E,je).map(Ne),T=S.get(C);e:for(R=new Re,T=new Z(T);Q(T);)if(10===T.i)R.addClassification(J(T,new Ee,Pe));else if(!ke(R,T))break e;P={T:P,O:E,M:Ae(R)},k.push(P)}w=k}else w=[];n[u]=w,e.g=7;break}if("proto_list"===p.type){if(h){for(w=Array(h.size()),x=0;x<h.size();x++)w[x]=h.get(x);h.delete()}else w=[];n[u]=w,e.g=7;break}if(void 0===h){e.g=3;break}if("float_list"===p.type){n[u]=h,e.g=7;break}if("proto"===p.type){n[u]=h,e.g=7;break}if("texture"!==p.type)throw Error("Unknown output config type: '"+p.type+"'");return(f=b.s[u])||(f=new Fe(b.h,b.D),b.s[u]=f),y(e,ze(f,h,b.G),13);case 13:m=e.h,n[u]=m;case 7:p.transform&&n[u]&&(n[u]=p.transform(n[u])),e.g=3;break;case 14:g[v]=e.h;case 3:a=d.next(),e.g=2;break;case 4:return e.return(n)}}))}))}function Ge(e,t){for(var r=t.name||"$",n=[].concat(c(t.wants)),i=new e.h.StringList,o=s(t.wants),a=o.next();!a.done;a=o.next())i.push_back(a.value);o=e.h.PacketListener.implement({onResults:function(i){for(var o={},a=0;a<t.wants.length;++a)o[n[a]]=i.get(a);var s=e.listeners[r];s&&(e.C=Ke(e,o,t.outs).then((function(r){r=s(r);for(var i=0;i<t.wants.length;++i){var a=o[n[i]];"object"==typeof a&&a.hasOwnProperty&&a.hasOwnProperty("delete")&&a.delete()}r&&(e.C=r)})))}}),e.i.attachMultiListener(i,o),i.delete()}function Ze(e){return void 0===e&&(e=0),1===e?"selfie_segmentation_landscape.tflite":"selfie_segmentation.tflite"}function Qe(e){var t=this;e=e||{},this.g=new qe({locateFile:e.locateFile,files:function(e){return[{simd:!0,url:"selfie_segmentation_solution_simd_wasm_bin.js"},{simd:!1,url:"selfie_segmentation_solution_wasm_bin.js"},{data:!0,url:Ze(e.modelSelection)}]},graph:{url:"selfie_segmentation.binarypb"},listeners:[{wants:["segmentation_mask","image_transformed"],outs:{image:{type:"texture",stream:"image_transformed"},segmentationMask:{type:"texture",stream:"segmentation_mask"}}}],inputs:{image:{type:"video",stream:"input_frames_gpu"}},options:{useCpuInference:{type:0,graphOptionXref:{calculatorType:"InferenceCalculator",fieldName:"use_cpu_inference"},default:"iPad Simulator;iPhone Simulator;iPod Simulator;iPad;iPhone;iPod".split(";").includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document},selfieMode:{type:0,graphOptionXref:{calculatorType:"GlScalerCalculator",calculatorIndex:1,fieldName:"flip_horizontal"}},modelSelection:{type:1,graphOptionXref:{calculatorType:"ConstantSidePacketCalculator",calculatorName:"ConstantSidePacketCalculatorModelSelection",fieldName:"int_value"},onChange:function(e){return Ce(t,(function t(){var r,n,i,o=this;return _(t,(function(t){return 1==t.g?(r=Ze(e),n="third_party/mediapipe/modules/selfie_segmentation/"+r,y(t,$e(o.g,r),2)):(i=t.h,o.g.overrideFile(n,i),t.return(!0))}))}))}}}})}(e=qe.prototype).close=function(){return this.i&&this.i.delete(),Promise.resolve()},e.reset=function(){return Ce(this,(function e(){var t=this;return _(e,(function(e){t.i&&(t.i.reset(),t.m={},t.s={}),e.g=0}))}))},e.setOptions=function(e,t){var r=this;if(t=t||this.g.options){for(var n=[],i=[],o={},a=s(Object.keys(e)),c=a.next();!c.done;o={K:o.K,L:o.L},c=a.next()){var l=c.value;l in this.j&&this.j[l]===e[l]||(this.j[l]=e[l],void 0!==(c=t[l])&&(c.onChange&&(o.K=c.onChange,o.L=e[l],n.push(function(e){return function(){return Ce(r,(function t(){var r=this;return _(t,(function(t){if(1==t.g)return y(t,e.K(e.L),2);!0===t.h&&(r.o=!0),t.g=0}))}))}}(o))),c.graphOptionXref&&(l={valueNumber:1===c.type?e[l]:0,valueBoolean:0===c.type&&e[l],valueString:2===c.type?e[l]:""},c=Object.assign(Object.assign(Object.assign({},{calculatorName:"",calculatorIndex:0}),c.graphOptionXref),l),i.push(c))))}0===n.length&&0===i.length||(this.o=!0,this.A=(void 0===this.A?[]:this.A).concat(i),this.u=(void 0===this.u?[]:this.u).concat(n))}},e.initialize=function(){return Ce(this,(function e(){var t=this;return _(e,(function(e){return 1==e.g?y(e,We(t),2):3!=e.g?y(e,Ce(t,(function e(){var t,r,n,i,o,a,c,l,d=this;return _(e,(function(e){if(1==e.g)return d.g.graph&&d.g.graph.url&&d.P===d.g.graph.url?e.return():(d.o=!0,d.g.graph&&d.g.graph.url?(d.P=d.g.graph.url,y(e,$e(d,d.g.graph.url),3)):void(e.g=2));for(2!=e.g&&(t=e.h,d.i.loadGraph(t)),r=s(Object.keys(d.B)),n=r.next();!n.done;n=r.next())i=n.value,d.i.overrideFile(i,d.B[i]);if(d.B={},d.g.listeners)for(o=s(d.g.listeners),a=o.next();!a.done;a=o.next())c=a.value,Ge(d,c);l=d.j,d.j={},d.setOptions(l),e.g=0}))})),3):y(e,function(e){return Ce(e,(function e(){var t,r,n,i,o,a,c=this;return _(e,(function(e){switch(e.g){case 1:if(!c.o)return e.return();if(!c.u){e.g=2;break}t=s(c.u),r=t.next();case 3:if(r.done){e.g=5;break}return y(e,(0,r.value)(),4);case 4:r=t.next(),e.g=3;break;case 5:c.u=void 0;case 2:if(c.A){for(n=new c.h.GraphOptionChangeRequestList,i=s(c.A),o=i.next();!o.done;o=i.next())a=o.value,n.push_back(a);c.i.changeOptions(n),n.delete(),c.A=void 0}c.o=!1,e.g=0}}))}))}(t),0)}))}))},e.overrideFile=function(e,t){this.i?this.i.overrideFile(e,t):this.B[e]=t},e.clearOverriddenFiles=function(){this.B={},this.i&&this.i.clearOverriddenFiles()},e.send=function(e,t){return Ce(this,(function r(){var n,i,o,a,c,l,d,u,p,h=this;return _(r,(function(r){switch(r.g){case 1:return h.g.inputs?(n=1e3*(null==t?performance.now():t),y(r,h.C,2)):r.return();case 2:return y(r,h.initialize(),3);case 3:for(i=new h.h.PacketDataList,o=s(Object.keys(e)),a=o.next();!a.done;a=o.next())if(c=a.value,l=h.g.inputs[c]){e:{var f=h,m=e[c];switch(l.type){case"video":var g=f.m[l.stream];if(g||(g=new Fe(f.h,f.D),f.m[l.stream]=g),0===(f=g).l&&(f.l=f.h.createTexture()),"undefined"!=typeof HTMLVideoElement&&m instanceof HTMLVideoElement){var v=m.videoWidth;g=m.videoHeight}else"undefined"!=typeof HTMLImageElement&&m instanceof HTMLImageElement?(v=m.naturalWidth,g=m.naturalHeight):(v=m.width,g=m.height);g={glName:f.l,width:v,height:g},(v=f.g).canvas.width=g.width,v.canvas.height=g.height,v.activeTexture(v.TEXTURE0),f.h.bindTexture2d(f.l),v.texImage2D(v.TEXTURE_2D,0,v.RGBA,v.RGBA,v.UNSIGNED_BYTE,m),f.h.bindTexture2d(0),f=g;break e;case"detections":for((g=f.m[l.stream])||(g=new Be(f.h),f.m[l.stream]=g),(f=g).data||(f.data=new f.g.DetectionListData),f.data.reset(m.length),g=0;g<m.length;++g){v=m[g];var b=f.data,w=b.setBoundingBox,x=g,S=v.T,_=new De;ve(_,1,S.Z),ve(_,2,S.$),ve(_,3,S.height),ve(_,4,S.width),ve(_,5,S.rotation),ve(_,6,S.X);var k=S=new ee;ne(k,1,fe(_,1)),ne(k,2,fe(_,2)),ne(k,3,fe(_,3)),ne(k,4,fe(_,4)),ne(k,5,fe(_,5));var C=fe(_,6);if(null!=C&&null!=C){G(k.g,48);var E=k.g,P=C;C=0>P;var R=(P=Math.abs(P))>>>0;for(P=Math.floor((P-R)/4294967296),P>>>=0,C&&(P=~P>>>0,4294967295<(R=1+(~R>>>0))&&(R=0,4294967295<++P&&(P=0))),C=U=R,R=P;0<R||127<C;)E.push(127&C|128),C=(C>>>7|R<<25)>>>0,R>>>=7;E.push(C)}if(_e(_,k),S=re(S),w.call(b,x,S),v.O)for(b=0;b<v.O.length;++b)k=!!(_=v.O[b]).visibility,x=(w=f.data).addNormalizedLandmark,S=g,_=Object.assign(Object.assign({},_),{visibility:k?_.visibility:0}),ve(k=new je,1,_.x),ve(k,2,_.y),ve(k,3,_.z),_.visibility&&ve(k,4,_.visibility),ne(E=_=new ee,1,fe(k,1)),ne(E,2,fe(k,2)),ne(E,3,fe(k,3)),ne(E,4,fe(k,4)),ne(E,5,fe(k,5)),_e(k,E),_=re(_),x.call(w,S,_);if(v.M)for(b=0;b<v.M.length;++b){if(x=(w=f.data).addClassification,S=g,_=v.M[b],ve(k=new Ee,2,_.Y),_.index&&ve(k,1,_.index),_.label&&ve(k,3,_.label),_.displayName&&ve(k,4,_.displayName),E=_=new ee,null!=(R=fe(k,1))&&null!=R)if(G(E.g,8),C=E.g,0<=R)G(C,R);else{for(P=0;9>P;P++)C.push(127&R|128),R>>=7;C.push(1)}ne(E,2,fe(k,2)),null!=(C=fe(k,3))&&(C=M(C),G(E.g,26),G(E.g,C.length),te(E,E.g.end()),te(E,C)),null!=(C=fe(k,4))&&(C=M(C),G(E.g,34),G(E.g,C.length),te(E,E.g.end()),te(E,C)),_e(k,E),_=re(_),x.call(w,S,_)}}f=f.data;break e;default:f={}}}switch(d=f,u=l.stream,l.type){case"video":i.pushTexture2d(Object.assign(Object.assign({},d),{stream:u,timestamp:n}));break;case"detections":(p=d).stream=u,p.timestamp=n,i.pushDetectionList(p);break;default:throw Error("Unknown input config type: '"+l.type+"'")}}return h.i.send(i),y(r,h.C,4);case 4:i.delete(),r.g=0}}))}))},e.onResults=function(e,t){this.listeners[t||"$"]=e},E("Solution",qe),E("OptionType",{BOOL:0,NUMBER:1,aa:2,0:"BOOL",1:"NUMBER",2:"STRING"}),(e=Qe.prototype).close=function(){return this.g.close(),Promise.resolve()},e.onResults=function(e){this.g.onResults(e)},e.initialize=function(){return Ce(this,(function e(){var t=this;return _(e,(function(e){return y(e,t.g.initialize(),0)}))}))},e.reset=function(){this.g.reset()},e.send=function(e){return Ce(this,(function t(){var r=this;return _(t,(function(t){return y(t,r.g.send(e),0)}))}))},e.setOptions=function(e){this.g.setOptions(e)},E("SelfieSegmentation",Qe),E("VERSION","0.1.1632777926")}).call(ka);const Ca=new ta("MediaPipe"),Ea="https://stream-assets.snapcall.io";let Pa=!1;const Ra=new ka.SelfieSegmentation({locateFile:(e,t)=>{if(Ca.debug("selfieSegmentation",e,t),Ea)return`${Ea}/mediapipe/${e}`;return`${window.location.href.split("/").slice(0,-1).join("/")}/mediapipe/${e}`}});var Ta,ja,Oa,Ma;ja=function(e,t,r){if(t===self.location.origin)return e;var n=r?"import "+JSON.stringify(e)+";":"importScripts("+JSON.stringify(e)+");";return URL.createObjectURL(new Blob([n],{type:"application/javascript"}))};var La={};function Da(e){return(""+e).replace(/^((?:https?|file|ftp|(chrome|moz|safari-web)-extension):\/\/.+)\/[^/]+$/,"$1")+"/"}Oa=function(e){var t=La[e];return t||(t=function(){try{throw new Error}catch(t){var e=(""+t.stack).match(/(https?|file|ftp|(chrome|moz|safari-web)-extension):\/\/[^)\n]+/g);if(e)return Da(e[2])}return"/"}(),La[e]=t),t},Ma=function(e){var t=(""+e).match(/(https?|file|ftp|(chrome|moz|safari-web)-extension):\/\/[^/]+/);if(!t)throw new Error("Origin not found");return t[0]};let Ia=Oa("adfgW")+o("juxiN").resolve("5WDBY");Ta=ja(Ia,Ma(Ia),!1);class Aa{fillColor="#000000";type="blur";live=!1;fps=24;blurLevel=10;timerWorker=new Worker(Ta,{name:"VirtualBackgroundTimerWorker"});constructor(e,t){this.stream=e,this.image=document.createElement("video"),this.image.style.display="none",this.image.setAttribute("autoplay",""),this.image.setAttribute("playsinline",""),this.image.setAttribute("muted",""),this.canvas=document.createElement("canvas"),this.canvas.style.display="none",t&&this.setOptions(t)}setOptions(e){this.setType(e.type),this.setFillColor(e.fillColor||this.fillColor),this.setVideoBackground(e.background),this.setBlurLevel(e.blurLevel||this.blurLevel)}setType(e){this.type=e}setBlurLevel(e){this.blurLevel=e}setVideoBackground(e){this.background=e}setFillColor(e){this.fillColor=e}drawWithBlur(e,t){e.save(),e.drawImage(t.image,0,0,this.canvas.width,this.canvas.height),e.globalCompositeOperation="destination-atop",e.drawImage(t.segmentationMask,0,0,this.canvas.width,this.canvas.height),e.filter=`blur(${this.blurLevel}px)`,e.globalCompositeOperation="destination-over",e.drawImage(t.image,0,0,this.canvas.width,this.canvas.height),e.restore()}drawWithBackground(e,t){e.clearRect(0,0,this.canvas.width,this.canvas.height),e.drawImage(t.segmentationMask,0,0,this.canvas.width,this.canvas.height),e.globalCompositeOperation="source-out",e.fillStyle=this.fillColor,this.background?e.drawImage(this.background,0,0,this.canvas.width,this.canvas.height):e.fillRect(0,0,this.canvas.width,this.canvas.height),e.globalCompositeOperation="destination-atop",e.drawImage(t.image,0,0,this.canvas.width,this.canvas.height),e.restore()}onFrame(e){this.canvas.width=e.image.width,this.canvas.height=e.image.height;const t=this.canvas.getContext("2d");if(t)switch(this.type){case"blur":default:this.drawWithBlur(t,e);break;case"background":this.drawWithBackground(t,e)}}runWithFrameCallback(){this.live&&this.image.requestVideoFrameCallback((()=>{Ra.send({image:this.image}),this.runWithFrameCallback()}))}async createStream(){try{const e={selfieMode:!1,modelSelection:0};Ra.setOptions(e),Ca.log("selfie segmentation initialized"),Pa||(await Ra.initialize(),Pa=!0),this.image.srcObject=this.stream,this.image.onplay=async()=>{this.live=!0;try{Ra.onResults((e=>{this.onFrame(e)})),this.timerWorker.onmessage=()=>{Ra.send({image:this.image})},this.timerWorker.postMessage({action:"start",params:this.fps})}catch(e){Ca.error("createStream:play",e)}}}catch(e){console.error("createStream",e)}return this.canvas.captureStream()}clean(){return new Promise((e=>{this.live=!1,clearInterval(this.runInterval),this.image.srcObject=null,this.stream.getTracks().forEach((e=>{e.stop(),this.stream.removeTrack(e)})),this.timerWorker.terminate(),e()}))}}const Na=window.AudioContext||window.webkitAudioContext;class Fa{audioSources={};tracks={};constructor(){this.audioContext=new Na,this.audioDestination=this.audioContext.createMediaStreamDestination()}getSetting(e){return this.tracks[e]?.getSettings()}removeTrack(e){const t=this.tracks[e];t&&(this.audioSources[e]?.disconnect(),delete this.tracks[e],delete this.audioSources[e],t.stop())}addTrack(e,t){if("audio"===t.kind){this.removeTrack(e);const r=new MediaStream([t]),n=this.audioContext.createMediaStreamSource(r);this.audioSources[e]=n,this.tracks[e]=t,this.audioDestination&&n.connect(this.audioDestination)}}getFinalTrack(){return this.audioDestination.stream.getTracks()[0]}removeAll(){Object.keys(this.tracks).forEach((e=>{this.removeTrack(e)}))}}const za=new ta("StreamerClient"),Ba="WRTC1",Ua="WRTC2",Va="TRANS1",Ha="CONS1",qa="SOCK1",Wa="USERLIMIT",$a={qvga:{width:{ideal:320},height:{ideal:240},qualityIndex:3},vga:{width:{ideal:640},height:{ideal:480},qualityIndex:2},hd:{width:{ideal:1280},height:{ideal:720},qualityIndex:1}};class Ka extends CustomEvent{constructor(e,t){super(e,t)}}const Ga=EventTarget,Za={background:void 0,fillColor:"#ffffff",type:"blur",blurLevel:10};const Qa=new class extends Ga{mediasoupTransport={};mediaPipeOption=Za;useVideoBackground=!1;pendingDeviceRequest={};joinOptions={};devicesList=[];plan=void 0;permissions=[];constructor(){super(),navigator.mediaDevices.addEventListener("devicechange",(()=>this.onDeviceChange())),this.config={streamApiURL:String("https://apistream.snapcall.io"),apiUrl:String("https://api.snapcall.io/v2"),streamerServer:String("wss://g.snapcall.io/stream"),streamerApi:String("https://g.snapcall.io/stream"),iceServers:[{urls:"turns:t.snapcall.io:443?transport=tcp,turns:t2.snapcall.io:443?transport=tcp,turn:t.snapcall.io:80?transport=tcp,turn:t2.snapcall.io:80?transport=tcp,turn:t.snapcall.io:80?transport=udp,turn:t2.snapcall.io:80?transport=udp"?.split(",")||[],username:"test",credential:"test",credentialType:"password"}]},this.peers=new Map,this.consumers=new Map,this.webcams=new Map,this.webcam={device:null,resolution:"hd"},this.webcamTrack=null,this.webcamZoom={available:!1,min:0,max:0},this.muted=!1,this.roomId="",this.peerId="",this.webcamProducer=null,this.customMessages=new Map,this.audioRenderers={},this.profile={}}getState(){const e=[];return this.peers.forEach(((t,r)=>{const n={microphone:{enabled:!1,muted:!1},camera:{enabled:!1},screenshare:{enabled:!1}};t.producersData.forEach((e=>{"microphone"===e.deviceType?n.microphone.enabled=!0:"screen"===e.deviceType?n.screenshare.enabled=!0:"webcam"===e.deviceType&&(n.camera.enabled=!0)})),e.push({peerId:r,profile:t.profile,deviceState:n})})),{roomId:this.roomId,peerId:this.peerId,profile:this.profile,callId:void 0,deviceState:this.getDevicesState(),peers:e}}onStartSpeak(){if(this.micProducer&&!this.micProducer.paused){const e=new Ka("localStartSpeak",{cancelable:!0,bubbles:!0,detail:{}});this.dispatchEvent(e),this.protoo.notify("startSpeak")}}onStopSpeak(){if(this.micProducer&&!this.micProducer.paused){const e=new Ka("localStopSpeak",{detail:{}});this.dispatchEvent(e),this.protoo.notify("stopSpeak")}}onCriticalError(e){const t=new Ka("criticalError",{detail:{code:e}});this.dispatchEvent(t)}async generateToken(e){const t=this.config.streamerApi,{token:r}=await fetch(`${t}/stream`,{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify({bid:e})}).then((e=>e.json()));return r}async init(e=this.roomId,t=this.joinOptions){if(this.roomId=e,this.joinOptions=t,!this.roomId)throw new Error("Missing room ID");let r;this.peerId||(this.peerId=Zi());try{const{streamer_instance:t,plan:{permissions:n,name:i}}=await fetch(`${this.config.apiUrl}/streams/${e}/info`,{method:"get",headers:{"Content-Type":"application/json"}}).then((e=>{if(e.ok)return e.json();throw new Error("Invalid room ID")}));this.permissions=n,this.plan=i,r=`${this.config.streamerServer}/${t}${this.joinOptions.recorder?"/recorder":""}?roomId=${e}&peerId=${this.peerId}`}catch(e){const t=new Ka("invalidRoom",{detail:{}});this.dispatchEvent(t)}if(!r)throw new Error("Invalid socket URL");this.protooTransport=new Ki(r,{retry:{retries:0}}),this.protoo=new $i(this.protooTransport),this.protoo.on("open",(()=>{this.joinOptions.recorder?this.joinRecorder():this.joinRoom()})),this.protoo.on("failed",(()=>{za.error("protoo.on","failed"),this.onCriticalError(qa)})),this.protoo.on("disconnected",(()=>{za.error("protoo.on","disconnected"),this.onCriticalError(qa)})),this.protoo.on("close",(()=>za.log("protoo.on","close :("))),this.protoo.on("notification",(async e=>{if(za.log("notification",e),"error"===e.method)"reached user limit"===e.data?.reason&&this.onCriticalError(Wa);else if("newPeer"===e.method){const{id:t,profile:r,muted:n}=e.data;this.peers.set(t,{id:t,peerId:t,profile:r,muted:n,producersData:[]});const i=new Ka("newPeer",{detail:{peerId:t,displayName:r.name,profile:r,muted:n}});this.dispatchEvent(i)}else if("newProducer"===e.method){const{peerId:t,producerId:r,deviceType:n,paused:i}=e.data;await this.consumeProducer({peerId:t,producerId:r,deviceType:n,paused:i})}else if("peerClosed"===e.method){const{peerId:t,relatedConsumers:r}=e.data;this.peers.delete(t),r.forEach((e=>{this.onConsumerClose({consumerId:e.id})}));const n=new Ka("peerClosed",{detail:{peerId:t}});this.dispatchEvent(n)}else if("consumerClosed"===e.method){const{consumerId:t}=e.data;this.onConsumerClose({consumerId:t})}else if("recordStopped"===e.method)this.dispatchEvent(new Ka("recordStopped",{detail:e.data}));else if("displayName"===e.method){const{peerId:t,displayName:r}=e.data,n=new Ka("displayName",{detail:{peerId:t,displayName:r,profile:{}}});this.dispatchEvent(n)}else if("profile"===e.method){const{peerId:t,profile:r}=e.data,n=new CustomEvent("profileUpdate",{detail:{peerId:t,profile:r}});this.dispatchEvent(n)}else if("requestDevice"===e.method){this.pendingDeviceRequest[e.data.requestId]=e.data;const t=new Ka("requestDevice",{detail:e.data});this.dispatchEvent(t)}else if("startSpeak"===e.method);else if("stopSpeak"===e.method);else if("producerPaused"===e.method||"producerResumed"===e.method){const{peerId:t,producerId:r,deviceType:n}=e.data;if("microphone"===e.data?.deviceType){const n=this.peers.get(t)?.producersData.find((e=>r===e.producerId));n&&(n.paused="producerPaused"===e.method)}let i=r;for(let[,e]of Array.from(this.consumers.entries()))if(e.mediaSoupConsumer.producerId===r){i=e.mediaSoupConsumer.id;break}const o="producerPaused"===e.method?"mediaPause":"mediaResume",a=new Ka(o,{detail:{mediaId:i,peerId:t,deviceType:n,paused:"producerPaused"===e.method}});this.dispatchEvent(a)}else if("mute"===e.method){const{peerId:t,device:r}=e.data,n=new Ka("mediaPause",{detail:{peerId:t,deviceType:r,paused:!0}});this.dispatchEvent(n)}else if("unmute"===e.method){const{peerId:t,device:r}=e.data,n=new Ka("mediaResume",{detail:{peerId:t,deviceType:r,paused:!1}});this.dispatchEvent(n)}else if("requestDeviceResult"===e.method){const t=new Ka(e.method,{detail:e.data});this.dispatchEvent(t)}else if("terminateRoom"===e.method){this.release();const t=new Ka(e.method,{detail:e.data});this.dispatchEvent(t)}else if("customMessage"===e.method){const{messageId:t,chunk:r,chunkIndex:n,totalChunks:i}=e.data.event,o=this.customMessages.get(t);o?o.chunks.push({index:n,data:r}):this.customMessages.set(t,{chunks:[{index:n,data:r}],totalChunks:i});const a=this.customMessages.get(t);if(a&&a.totalChunks===a.chunks.length){const r=a.chunks.sort(((e,t)=>e.index-t.index)).reduce(((e,t)=>e+t.data),""),n=JSON.parse(r),i=new Ka("customMessage",{detail:{...e.data,event:n}});this.dispatchEvent(i),this.customMessages.delete(t)}}}))}closeWebrtcTransport(e){const t=this.mediasoupTransport[e];t&&(t?.transport?.close(),clearTimeout(t?.disconnectTimeout),delete this.mediasoupTransport[e])}async getTransport(e,t){if(!this.streamerMediasoup)throw new Error("streamerMediasoup not initialized");let r=this.mediasoupTransport[`${e}-${t}`];if(r)return r&&r.transport?r.transport:r.createPromise;try{const n=this.streamerMediasoup.createTransport(this.protoo,t);r={disconnectTimeout:void 0,kind:e,createPromise:n},this.mediasoupTransport[`${e}-${t}`]=r,r.transport=await n,r.transport&&this.listenWebRTCTransportStates(r)}catch(e){throw this.onCriticalError(Va),e}return r.transport}listenWebRTCTransportStates(e){if(!e.transport)throw new Error("can not listen states of undefined transport");e.transport.on("connectionstatechange",(t=>{if(e.transport&&!e.transport.closed)if(za.log("recv connectionstatechange: ",t),"disconnected"===t)e.disconnectTimeout=setTimeout((()=>{za.log("listenWebRTCTransportStats",`trying to restart transport for ${e.kind}`),e.transport&&this.restartIce(e.transport)}),5e3);else if("connected"===t)clearTimeout(e.disconnectTimeout);else if("failed"===t){const t=new Error(`webRTC transport state failed for ${e.kind}`);Wo(t,{extra:{direction:e.transport?.direction,id:e.transport?.id,kind:e.kind}}),za.error("listenWebRTCTransportStats","webrtc stat failed",t),this.onCriticalError(Ba)}}))}async joinRoom(){this.streamerMediasoup=await _a.create(this.protoo,this.config);const{apiKey:e,email:t}=this.joinOptions;if(e)try{let r=null;e&&t?r=await this.fetchAgentInfo({apiKey:e,email:t}):e&&(r=await this.fetchUserInfo({apiKey:e})),r&&this.dispatchEvent(new Ka("agentIdentity",{detail:{success:!0,email:this.joinOptions.email}}))}catch(e){za.warn("joinRoom",e),this.dispatchEvent(new Ka("agentIdentity",{detail:{success:!1}}))}const{peers:r}=await this.protoo.request("getRoomPeers",{apiKey:e,email:t});this.peers=new Map(r.map((e=>[e.id||e.peerId,{...e,peerId:e.id||e.peerId}])));const n=await this.getCallId();this.dispatchEvent(new Ka("enterRoom",{detail:{peerId:this.peerId,peers:r.map((e=>({...e,peerId:e.id||e.peerId}))),callId:n,plan:this.plan,permissions:this.permissions}})),za.log("joinRoom","peers",r),this.joinOptions.displayName&&await this.setDisplayName(this.joinOptions.displayName),this.joinOptions.profile&&await this.setProfile(this.joinOptions.profile),r.forEach((e=>{this.consumePeer({peerId:e.id||e.peerId,producersData:e.producersData})}))}async joinRecorder(){this.streamerMediasoup=await _a.create(this.protoo,this.config);const e=await this.getCallId();this.dispatchEvent(new Ka("enterRoom",{detail:{peerId:this.peerId,peers:[],callId:e,plan:this.plan,permissions:this.permissions}}))}async switchMicrophone(e){try{za.log("switchMicrophone","switching Microphone"),this.audioLevel?.release(),this.audioLevel=void 0,this.micProducer&&this.micProducer.track&&(this.audioMedia?.removeTrack("mic"),this.micProducer?.track?.stop(),za.log("switchMicrophone","stopping previous track"));const t=await this.handleGetUserMediaError("microphone",navigator.mediaDevices.getUserMedia({audio:{deviceId:e,noiseSuppression:!0,echoCancellation:!0}}));this.audioLevel=new ia(t,this),this.audioMedia=this.audioMedia||new Fa;const r=t.getAudioTracks()[0];this.audioMedia.addTrack("mic",r),await(this.micProducer?.replaceTrack({track:r})),za.log("switchMicrophone","switched Microphone")}catch(e){za.error("switchMicrophone error",e),await this.closeMicrophoneProducer()}}async closeMicrophoneProducer(){const e=this.micProducer?.id;this.micProducer?.close(),this.micProducer=void 0;const t=new Ka("microphoneMute",{detail:{}});this.dispatchEvent(t),this.protoo.connected&&await this.protoo.request("closeProducer",{producerId:e})}async onDeviceChange(){za.log("onDeviceChange","detecting device change");const e=new Ka("devicesListChange",{detail:{}});if(this.dispatchEvent(e),!this.protoo.closed&&this.micProducer){const e=await navigator.mediaDevices.enumerateDevices(),t=e.filter((e=>"audioinput"===e.kind));if(0===t.length)return za.warn("onDeviceChange","no audio input device"),void await this.closeMicrophoneProducer();const r=t.find((e=>"default"===e.deviceId));if(r){const t=e.filter((e=>!Boolean(this.devicesList.find((t=>t.deviceId===e.deviceId&&t.label===e.label)))));za.log("onDeviceChange",t),this.devicesList=e;const n=Boolean(t.find((e=>"audioinput"===e.kind)));if(0!==t.length&&!1===n)return void za.warn("onDeviceChange","no audio input change");if(za.log("onDeviceChange","detecting audio input change"),!this.audioInputDefaultDevice||this.audioInputDefaultDevice.label!==r.label){const e=new Ka("defaultAudioDeviceChange",{detail:r});this.audioInputDefaultDevice=r,this.dispatchEvent(e),za.log("onDeviceChange","new default audio input trying to switch new :",r.deviceId,r.label)}this.switchMicrophone("default")}else this.switchMicrophone()}}async enableMicrophone(){if(!this.micProducer||this.micProducer?.closed){const e=await this.handleGetUserMediaError("microphone",navigator.mediaDevices.getUserMedia({audio:{noiseSuppression:!0,echoCancellation:!0}}));this.devicesList=await navigator.mediaDevices.enumerateDevices();const t=await this.getTransport("audio","send");this.audioLevel=new ia(e,this),this.audioMedia=this.audioMedia||new Fa;const r=e.getAudioTracks()[0];this.audioMedia.addTrack("mic",r);const n="microphone",i=await t.produce({track:this.audioMedia.getFinalTrack(),codecOptions:{opusStereo:!0,opusDtx:!0},appData:{deviceType:n}});i.on("transportclose",(()=>{za.log("enableMicrophone","micproducer transportclose")})),r.addEventListener("ended",(()=>{za.log("enableMicrophone","track ended!")})),i.on("trackended",(async()=>{za.log("enableMicrophone","microphone disconnected!"),void 0===navigator.mediaDevices.ondevicechange&&this.closeMicrophoneProducer()})),this.micProducer=i,this.muted=!1;const o=new Ka("microphoneEnabled",{detail:{}});this.dispatchEvent(o)}}muteMicrophone(){if(this.micProducer){this.onStopSpeak(),this.micProducer.pause(),this.muted=!0;const e="microphone";this.protoo.notify("mute",{device:e});const t=new Ka("microphoneMute",{detail:{}});this.dispatchEvent(t)}}unMuteMicrophone(){if(this.micProducer){this.micProducer.resume(),this.resolvePendingDeviceRequest("microphone",!0),this.muted=!1;const e="microphone";this.protoo.notify("unmute",{device:e});const t=new Ka("microphoneUnmute",{detail:{}});this.dispatchEvent(t)}}async toggleMute(){return this.muted?(await this.unMuteMicrophone(),{muted:!1}):(await this.muteMicrophone(),{muted:!0})}release(){za.log("release");for(let e in this.mediasoupTransport)this.closeWebrtcTransport(e);this.mediaPipe&&(this.mediaPipe.clean(),this.mediaPipe=void 0),this.audioMedia?.removeAll(),this.audioMedia=void 0,this.webcamTrack?.stop(),this.webcamTrack=null,this.protooTransport.close(),this.protoo.close(),this.micProducer?.close(),this.screenshareVideoProducer?.close(),this.webcamProducer?.close(),this.consumers.forEach((e=>{e.mediaSoupConsumer.close()})),this.consumers.clear(),this.audioLevel?.release()}endCall(){this.release();const e=new Ka("leaveRoom",{detail:{}});this.dispatchEvent(e);const t=new CustomEvent("snapcallEvent_callEnd");window.dispatchEvent(t)}terminateRoom(){this.protoo.request("terminateRoom")}async updateWebcams(){this.webcams=new Map;const e=await navigator.mediaDevices.enumerateDevices();for(const t of e)"videoinput"===t.kind&&this.webcams.set(t.deviceId,t);0===this.webcams.size?this.webcam.device=null:this.webcam.device||(this.webcam.device=this.webcams.values().next().value);const t=new Ka("webcamsUpdate",{detail:{numberOfAvailableWebcams:this.webcams.size}});this.dispatchEvent(t)}isVideoZoomAvailable(){return this.webcamZoom.available}resolvePendingDeviceRequest(e,t,r){Object.keys(this.pendingDeviceRequest).forEach((n=>{const i=this.pendingDeviceRequest[n];e===i.deviceType&&(delete this.pendingDeviceRequest[n],this.protoo.notify("requestDeviceResult",{result:Boolean(t),failure:r,...i}))}))}async handleGetUserMediaError(e,t){let r,n;try{r=await t}catch(e){n=e}finally{if(this.resolvePendingDeviceRequest(e,Boolean(r),n?.name),n)throw n;return r}}async restartIce(e){if(za.log("restartIce",e.connectionState,e.closed),"disconnected"===e.connectionState&&!e.closed)try{const t=await this.protoo.request("restartIce",{transportId:e.id});za.log("restartIce",t),await e.restartIce({iceParameters:t})}catch(t){this.onCriticalError(Ua),za.log("restartIce","restartIceFailed",t),Wo(t,{extra:{direction:e.direction,id:e.id}})}}scaleVideoMediasConstraintsParameter(e){let t=$a.hd;2===e?t=$a.vga:e>2&&(t=$a.qvga),(!this.webcam.resolution||$a[this.webcam.resolution].qualityIndex>=t.qualityIndex)&&(za.log("scaleVideoMediasConstraintsParameter",`scaling video by ${e}`,t),this.webcamProducer?.track?.applyConstraints(t))}scaleVideoEncodingsParameter(){if(!this.useVideoBackground)try{let e=0;this.consumers.forEach((t=>{"video"===t.mediaSoupConsumer.kind&&e++})),this.screenshareVideoProducer&&!this.screenshareVideoProducer.closed&&e++;let t={scaleResolutionDownBy:1};if(e>=3&&(t={scaleResolutionDownBy:2}),e>=9&&(t={scaleResolutionDownBy:4}),!ua.Producer.prototype.setRtpEncodingParameters)return this.scaleVideoMediasConstraintsParameter(t.scaleResolutionDownBy);this.webcamProducer&&!this.webcamProducer.closed&&(za.log("scaleVideoEncodingsParameter",`scaling video by ${t.scaleResolutionDownBy}`),this.webcamProducer?.setRtpEncodingParameters?.(t).catch((e=>{za.error("scaleVideoEncodingsParameter","scaleResolutionDownBy not supported",e),this.scaleVideoMediasConstraintsParameter(t.scaleResolutionDownBy)})))}catch(e){za.error("scaleVideoEncodingsParameter","scaleVideo error",e)}}setVideoBackground(e){this.mediaPipe?.setOptions(e),this.mediaPipeOption=e}async initVideoBackground(){if(!this.permissions.find((e=>"virtual_background"===e)))throw new Error("feature not allowed");!0!==this.useVideoBackground&&(this.useVideoBackground=!0,this.webcamProducer&&!this.webcamProducer.closed&&await this.switchWebcam({}))}async stopVideoBackground(){!1!==this.useVideoBackground&&(this.useVideoBackground=!1,await(this.mediaPipe?.clean()),this.mediaPipe=void 0,this.webcamProducer&&!this.webcamProducer.closed&&await this.switchWebcam({}))}async switchWebcam({device:e,resolution:t,rotate:r,frameRate:n,facingMode:i}){if(!this.webcam.device)throw new Error("no webcam devices");const o={};if(r)if(this.webcam.facingMode)console.log("switch by facing mod"),this.webcam.facingMode="user"===this.webcam.facingMode?"environment":"user",o.facingMode=this.webcam.facingMode;else{const e=Array.from(this.webcams.keys()),t=this.webcam?.device?.deviceId||"unknown";let r=e.indexOf(t);r<e.length-1?r++:r=0;const n=this.webcams.get(e[r]);if(!n)throw new Error("no webcam device");this.webcam.device=n,o.deviceId={ideal:this.webcam.device?.deviceId}}else i?(this.webcam.facingMode=i,o.facingMode=this.webcam.facingMode):e&&(this.webcam.device=e,this.webcam.facingMode=void 0,o.deviceId={ideal:this.webcam.device.deviceId});this.webcam.resolution=t||this.webcam.resolution||"hd",this.webcam.framerate=n||this.webcam.framerate;let a=$a[t||this.webcam.resolution];this.useVideoBackground&&(a={width:{ideal:560},height:{ideal:400},qualityIndex:2}),await(this.webcamProducer?.replaceTrack?.({track:null}).catch((e=>{za.error("switchCamera","clean track failed",e)})));const s=await this.handleGetUserMediaError("webcam",navigator.mediaDevices.getUserMedia({video:{...o,...a}}));this.useVideoBackground&&(this.mediaPipe&&await this.mediaPipe.clean(),this.mediaPipe=new Aa(s,this.mediaPipeOption));const c=await(this.mediaPipe?.createStream())||s;if(!await this.getTransport("video","send"))throw new Error("video transport not found, can not switch");const l=c.getVideoTracks()[0];await(this.webcamProducer?.replaceTrack?.({track:l}));const d=await(l.getCapabilities?.())||navigator.mediaDevices.getSupportedConstraints?.();this.webcamZoom={available:Boolean(d?.zoom),min:d?.zoom?.min||0,max:d?.zoom?.max||0};const u=new Ka("localVideoChange",{detail:{camera:this.getCurrentWebcam()}});this.dispatchEvent(u)}async enableVideo(e){await this.updateWebcams();const t={};if(e?.facingMode?(t.facingMode=e.facingMode,this.webcam.facingMode=e.facingMode):(e?.device&&(this.webcam.device=e.device),t.deviceId={ideal:this.webcam.device?.deviceId}),!this.webcam.device)throw new Error("no webcam devices");this.webcam.resolution=e?.resolution||this.webcam.resolution||"hd",this.webcam.framerate=e?.frameRate||this.webcam.framerate;let r=$a[e?.resolution||this.webcam.resolution];this.useVideoBackground&&(r={width:{ideal:560},height:{ideal:400},qualityIndex:2});const n=await this.handleGetUserMediaError("webcam",navigator.mediaDevices.getUserMedia({video:{frameRate:e?.frameRate,...t,...r}}));if(e?.facingMode)try{const e=n.getVideoTracks()[0].getCapabilities();if(!e?.facingMode||0===e.facingMode.length)throw new Error("no facing mod")}catch{this.webcam.device=this.webcams.values().next().value,this.webcam.facingMode=void 0}this.useVideoBackground&&(this.mediaPipe&&await this.mediaPipe.clean(),this.mediaPipe=new Aa(n,this.mediaPipeOption));const i=await(this.mediaPipe?.createStream())||n;await this.updateWebcams();const o=await this.getTransport("video","send"),a=i.getVideoTracks()[0];this.webcamTrack=a;const s=await(a.getCapabilities?.())||navigator.mediaDevices.getSupportedConstraints?.();this.webcamZoom={available:Boolean(s?.zoom),min:s?.zoom?.min||0,max:s?.zoom?.max||0};this.webcamProducer=await o.produce({track:a,encodings:undefined,codecOptions:{videoGoogleStartBitrate:1e3},appData:{deviceType:"webcam"}}),this.scaleVideoEncodingsParameter(),this.webcamProducer.on("transportclose",(()=>{this.webcamProducer=null})),this.webcamProducer.on("trackended",(()=>{this.disableVideo().catch((()=>{}))}));const c=new Ka("localVideoAvailable",{detail:{camera:this.getCurrentWebcam()}});this.dispatchEvent(c)}async rotateVideo(){await this.switchWebcam({rotate:!0})}async zoomVideo(){if(!this.webcamZoom.available)throw new Error("Webcam zoom is not available");if(!this.webcamTrack)throw new Error("No webcam track available");this.webcamTrack.applyConstraints({advanced:[{zoom:2*this.webcamZoom.min}]})}async unzoomVideo(){if(!this.webcamZoom.available)throw new Error("Webcam zoom is not available");if(!this.webcamTrack)throw new Error("No webcam track available");this.webcamTrack.applyConstraints({advanced:[{zoom:this.webcamZoom.min}]})}async disableVideo(){if(!this.webcamProducer)return;this.webcamProducer.close(),this.protoo.connected&&await this.protoo.request("closeProducer",{producerId:this.webcamProducer.id}),this.webcamProducer=null;const e=new Ka("localVideoUnavailable",{detail:{}});this.dispatchEvent(e)}async enableScreenshare(e={audioTransportOption:"classic"}){if(!this.permissions.find((e=>"screen_sharing"===e)))throw new Error("feature not allowed");if("mix"===e.audioTransportOption&&!this.micProducer)throw new Error("microphone not activated and audio mix transport requested");const t=await this.handleGetUserMediaError("screen",navigator.mediaDevices.getDisplayMedia({audio:"none"!==e.audioTransportOption,video:{displaySurface:"monitor",logicalSurface:!0,width:{max:1920},height:{max:1080},frameRate:{max:30}}}));if(!t)return;const r="screen",n=await this.getTransport("audio","send"),i=t.getAudioTracks()[0];if(i)if("classic"===e.audioTransportOption)this.screenshareAudioProducer=await(this.streamerMediasoup?.produceAudio(n,i,{deviceType:r,share:!0})),this.screenshareVideoProducer?.on("transportclose",(()=>{this.screenshareVideoProducer=void 0}));else if("mix"===e.audioTransportOption){this.audioMedia=this.audioMedia||new Fa,this.audioMedia.addTrack("screen",i);const e=this.audioMedia.getFinalTrack();e&&this.micProducer&&this.micProducer.replaceTrack({track:e})}const o=t.getVideoTracks()[0],a=await this.getTransport("video","send");this.screenshareVideoProducer=await(this.streamerMediasoup?.produceVideo(a,o,{deviceType:r,share:!0})),this.screenshareVideoProducer?.on("transportclose",(()=>{this.screenshareVideoProducer=void 0})),this.screenshareVideoProducer?.on("trackended",(()=>{this.disableScreenshare().catch((()=>{}))}));const s=new Ka("screenshareEnabled",{detail:{}});this.dispatchEvent(s)}async disableScreenshare(){this.screenshareVideoProducer&&(this.screenshareVideoProducer.close(),this.protoo.connected&&await this.protoo.request("closeProducer",{producerId:this.screenshareVideoProducer.id}),this.screenshareVideoProducer=void 0),this.audioMedia?.removeTrack("screen"),this.screenshareAudioProducer&&(this.screenshareAudioProducer.close(),this.protoo.connected&&await this.protoo.request("closeProducer",{producerId:this.screenshareAudioProducer.id}),this.screenshareAudioProducer=void 0);const e=new Ka("screenshareDisabled",{detail:{}});this.dispatchEvent(e)}onConsumerClose({consumerId:e}){const t=this.consumers.get(e);if(t){const r=t.mediaSoupConsumer.producerId;this.peers.forEach((e=>{const t=e.producersData.findIndex((e=>e.producerId===r));-1!==t&&e.producersData.splice(t,1)})),t.mediaSoupConsumer.close(),this.consumers.delete(e),this.scaleVideoEncodingsParameter();const n=new Ka("mediaStop",{detail:{mediaId:e,peerId:String(t.mediaSoupConsumer.appData.peerId),deviceType:t.deviceType,paused:!1}});"microphone"===t.deviceType&&this.deleteAudioRenderer(e),this.dispatchEvent(n)}}requestVideo({mediaId:e,element:t}){za.info("requestVideo");const r=this.consumers.get(e);if(r){const e=new MediaStream;e.onremovetrack=()=>za.log("requestVideo","Remove Track"),r.mediaSoupConsumer.track.onended=()=>za.log("requestVideo","Track Ended"),e.addTrack(r.mediaSoupConsumer.track),t.srcObject=e}else za.error("requestVideo",`Video consumer ${r} not found`)}async saveCapture(e){const{objectUrl:t}=await fetch(`${this.config.streamApiURL}/uploadSnapshot`,{method:"POST",body:JSON.stringify({file:e})}).then((e=>e.json()));return{url:t,assetId:(await this.protoo.request("addCapture",{url:t})).assetId}}async saveThumbnail(e){const{objectUrl:t}=await fetch(`${this.config.streamApiURL}/uploadSnapshot`,{method:"POST",body:JSON.stringify({file:e})}).then((e=>e.json()));return{url:t,assetId:(await this.protoo.request("addThumbnail",{url:t})).assetId}}async deleteCapture(e){return await this.protoo.request("deleteCapture",{assetId:e})}async captureVideo(e,t){if(this.permissions.find((e=>"instant_picture"===e))){let r;if(e)r=await la(e,t);else{if(!this.webcamProducer||!this.webcamProducer.track)throw new Error("no video to capture");r=await da(this.webcamProducer.track,t)}return r}throw new Error("feature not allowed")}requestLocalVideo(e){if(za.info("requestLocalVideo"),this.webcamProducer){const t=new MediaStream;t.addTrack(this.webcamProducer.track),e.srcObject=t;const r=this.webcamProducer.track?.getSettings();return{facingMode:r?.facingMode||"user"}}throw new Error("webcam producer not available yet")}requestLocalScreenshare(e){if(this.screenshareVideoProducer){const t=new MediaStream;t.addTrack(this.screenshareVideoProducer.track),e.srcObject=t}else za.log("requestLocalScreenshare","screenshare producer not available yet")}consumePeer({peerId:e,producersData:t}){t.forEach((t=>{this.consumeProducer({peerId:e,producerId:t.producerId,deviceType:t.deviceType,paused:t.paused})}))}async consumeProducer({peerId:e,producerId:t,deviceType:r,paused:n}){const i="microphone"===r?"audio":"video",o=await this.getTransport(i,"recv"),a=await this.protoo.request("consume",{peerId:e,producerId:t,transportId:o.id,rtpCapabilities:this.streamerMediasoup.getRtpCapabilities()}),s=this.peers.get(e);s&&s.producersData.push({producerId:t,deviceType:r,paused:n});const{producerId:c,id:l,kind:d,rtpParameters:u,appData:p}=a;za.log("consumeProducer","Data: ",a);try{const t=await o.consume({id:l,producerId:c,kind:d,rtpParameters:u,appData:{...p,peerId:e}});za.log("transport",o),za.log("consumer",t),this.consumers.set(t.id,{mediaSoupConsumer:t,deviceType:r}),this.scaleVideoEncodingsParameter();const n=!!s&&s.muted,i=new Ka("mediaStart",{detail:{peerId:e,mediaId:t.id,deviceType:r,paused:n}});if(this.dispatchEvent(i),"audio"===t.kind){const e=this.createAudioRenderer(t.id),r=new MediaStream;r.addTrack(t.track),e.setSource(r),e.play()}"video"===t.kind&&await this.protoo.request("resumeConsumer",{consumerId:t.id})}catch(e){throw this.onCriticalError(Ha),za.error("consumeProducer","newConsumer request failed",e),e}}async setDisplayName(e){await this.setProfile({name:e});const t=new Ka("selfDisplayName",{detail:{peerId:this.peerId,displayName:this.profile?.name,profile:this.profile}});this.dispatchEvent(t)}async setProfile(e){const t=await this.protoo.request("setProfile",e);this.profile={...t};const r=new Ka("selfProfileUpdate",{detail:{peerId:this.peerId,profile:this.profile}});this.dispatchEvent(r)}async requestPeerDevice(e,t){if(!this.permissions.find((e=>"request_input"===e)))throw new Error("feature not allowed");return this.protoo.request("requestPeerDevice",{remotePeerId:e,deviceType:t})}denyDeviceRequest(e){this.resolvePendingDeviceRequest(e,!1,"user denied permission")}async getCallId(){try{const{callId:e}=await this.protoo.request("getCallId");return e}catch(e){throw za.error("getCallId","Failed to get callId"),e}}getConsumers(){return this.consumers}getDevicesState(){const e=!!this.micProducer&&!this.micProducer.closed,t=!!this.webcamProducer&&!this.webcamProducer.closed,r=!!this.screenshareVideoProducer&&!this.screenshareVideoProducer.closed;return{microphone:{enabled:e,muted:this.muted},camera:{enabled:t},screenshare:{enabled:r}}}getCustomMessageEventChunks(e){const t=JSON.stringify(e),r=[];for(let e=0;e<t.length;e+=9e4)r.push(t.substring(e,e+9e4));return r}async sendCustomMessageToAll(e){const t=Zi(),r=this.getCustomMessageEventChunks(e),n=r.map(((e,n)=>this.protoo.notify("customMessageToAllPeers",{messageId:t,chunkIndex:n,chunk:e,totalChunks:r.length})));await Promise.all(n)}async sendCustomMessage(e,t){const r=Zi(),n=this.getCustomMessageEventChunks(t),i=n.map(((t,i)=>this.protoo.notify("customMessageToPeer",{peerId:e,event:{messageId:r,chunkIndex:i,chunk:t,totalChunks:n.length}})));await Promise.all(i)}async listAudioDevices(){return(await navigator.mediaDevices.enumerateDevices()).filter((e=>"audioinput"===e.kind||"audiooutput"===e.kind))}async listVideoDevices(){return(await navigator.mediaDevices.enumerateDevices()).filter((e=>"videoinput"===e.kind))}isListDevicesSupported(){return Boolean(navigator.mediaDevices?.enumerateDevices)}getCurrentWebcam(){return this.webcam}getCurrentMicrophoneId(){return this.audioMedia?.getSetting("mic")||this.micProducer?.track?.getSettings().deviceId}getCurrentSpeakerId(){const e=Object.keys(this.audioRenderers),t=this.audioRenderers[e[0]];if(t){const e=t.getSink();if(e)return e}return"default"}async setWebcamResolution(e){if(this.webcam.device)await this.switchWebcam({resolution:e});else{this.webcam.resolution=e;const t=new Ka("localVideoChange",{detail:{camera:this.getCurrentWebcam()}});this.dispatchEvent(t)}}createAudioRenderer(e){const t=new aa({consumerId:e});return this.audioRenderers[e]=t,t}deleteAudioRenderer(e){this.audioRenderers[e]?.destroy(),delete this.audioRenderers[e]}async playAudioRenderer(e){await(this.audioRenderers[e]?.play())}async setAudioSink(e){const t=Object.keys(this.audioRenderers).map((t=>this.audioRenderers[t].setSink(e).catch((e=>za.warn("setAudioSink","Failed to setSinkId on renderer (consumerId: %s): ",t,e)))));await Promise.allSettled(t)}dispatchEvent(e){const t=super.dispatchEvent(e);return window.dispatchEvent(e),t}async fetchAgentInfo({apiKey:e,email:t}){const r=this.config.apiUrl;return await fetch(`${r}/agents/${t}`,{method:"get",headers:{Authorization:`Bearer ${e}`}}).then((e=>{if(e.ok)return e.json();throw new Error("Invalid agent info")}))}async fetchUserInfo({apiKey:e}){const t=this.config.apiUrl;return await fetch(`${t}/users/me`,{method:"get",headers:{Authorization:`Bearer ${e}`}}).then((e=>{if(e.ok)return e.json();throw new Error("Invalid user info")}))}setConfig(e){this.config={...this.config,...e}}getPermissions(){return this.permissions}async startRecord(){await this.protoo.request("startRecord")}async stopRecord(){await this.protoo.request("stopRecord")}};var Ya=(0,(je=o("85Hg2")).createContext)({});je=o("85Hg2");let Ja;var Xa;(Xa=Ja||(Ja={}))[Xa.SET_STREAMS=0]="SET_STREAMS",Xa[Xa.ADD_STREAM=1]="ADD_STREAM",Xa[Xa.REMOVE_STREAM=2]="REMOVE_STREAM",Xa[Xa.DEVICE_UPDATE=3]="DEVICE_UPDATE",Xa[Xa.MUTE=4]="MUTE",Xa[Xa.UNMUTE=5]="UNMUTE",Xa[Xa.SET_HIGHLIGHTED_TILE=6]="SET_HIGHLIGHTED_TILE",Xa[Xa.UNSET_HIGHLIGHTED_TILE=7]="UNSET_HIGHLIGHTED_TILE",Xa[Xa.SET_STREAM_PROFILE=8]="SET_STREAM_PROFILE",Xa[Xa.SET_STREAM_SPEAKING=9]="SET_STREAM_SPEAKING";const es={streams:[],highlightedTile:null},ts=(e,t)=>{switch(t.type){case Ja.SET_STREAMS:return{...e,streams:t.payload};case Ja.ADD_STREAM:return e.streams.find((e=>e.id===t.payload.id))?e:{...e,streams:[...e.streams,t.payload]};case Ja.REMOVE_STREAM:return{...e,streams:[...e.streams.filter((e=>e.id!==t.payload.id))]};case Ja.DEVICE_UPDATE:{const{streamId:r,mediaId:n,device:i,available:o,paused:a}=t.payload;return{...e,streams:e.streams.map((e=>{if(e.id===r){let t=e.muted;return"microphone"===i&&(t=a),{...e,[i]:o?n:null,muted:t}}return e}))}}case Ja.MUTE:return{...e,streams:e.streams.map((e=>e.id===t.payload.streamId?{...e,muted:!0}:e))};case Ja.UNMUTE:return{...e,streams:e.streams.map((e=>e.id===t.payload.streamId?{...e,muted:!1}:e))};case Ja.SET_HIGHLIGHTED_TILE:return{...e,highlightedTile:t.payload};case Ja.UNSET_HIGHLIGHTED_TILE:return{...e,highlightedTile:null};case Ja.SET_STREAM_PROFILE:return{...e,streams:e.streams.map((e=>e.id===t.payload.streamId?{...e,profile:t.payload.profile}:e))};case Ja.SET_STREAM_SPEAKING:return{...e,streams:e.streams.map((e=>e.id===t.payload.streamId?{...e,isSpeaking:t.payload.isSpeaking}:e))};default:return e}},rs=(0,je.createContext)(void 0),ns=({children:e})=>{const[t,r]=(0,je.useReducer)(ts,es),n={state:t,dispatch:r};return(0,a.jsx)(rs.Provider,{value:n,children:e})},is=()=>{const e=(0,je.useContext)(rs);if(void 0===e)throw new Error("useStreams must be used within a StreamsProvider");return{streams:e.state.streams,highlightedTile:e.state.highlightedTile,dispatch:e.dispatch}};var os=e=>navigator.clipboard?navigator.clipboard.writeText(e):new Promise(((t,r)=>{((e,t,r)=>{const n=document.createRange(),i=document.createElement("textarea");if(i.value=e,document.body.appendChild(i),navigator.userAgent.match(/ipad|ipod|iphone/i)){i.readOnly=!1,i.contentEditable="true",n.selectNodeContents(i);const e=window.getSelection();e&&(e.removeAllRanges(),e.addRange(n)),i.setSelectionRange(0,999999)}else i.focus(),i.select();try{document.execCommand("copy")?t():r(new Error("Copy to clipboard fallback failed"))}catch(e){e instanceof Error?r(e):console.error(e)}document.body.removeChild(i)})(e,t,r)}));const as=yr.path`
357
+ !function(e){var t=0,r=!1,n=!1;try{var i=Object.defineProperty({},"passive",{get:function(){n=!0}});window.addEventListener("test",null,i)}catch(e){}var o=function(e){var r=e.target,n=window.innerWidth/window.document.documentElement.clientWidth;if(!(e.touches.length>1||1!==n)){for(;r!==document.body&&r!==document;){var i=window.getComputedStyle(r);if(!i)break;if("INPUT"===r.nodeName&&"range"===r.getAttribute("type"))return;var o=i.getPropertyValue("-webkit-overflow-scrolling"),a=i.getPropertyValue("overflow-y"),s=parseInt(i.getPropertyValue("height"),10),c="touch"===o&&("auto"===a||"scroll"===a),l=r.scrollHeight>r.offsetHeight;if(c&&l){var d=e.touches?e.touches[0].screenY:e.screenY,u=t<=d&&0===r.scrollTop,p=t>=d&&r.scrollHeight-r.scrollTop===s;return void((u||p)&&e.preventDefault())}r=r.parentNode}e.preventDefault()}},a=function(e){t=e.touches?e.touches[0].screenY:e.screenY},s=function(){window.addEventListener("touchstart",a,!!n&&{passive:!1}),window.addEventListener("touchmove",o,!!n&&{passive:!1}),r=!0},c=document.createElement("div");document.documentElement.appendChild(c),c.style.WebkitOverflowScrolling="touch";var l="getComputedStyle"in window&&"touch"===window.getComputedStyle(c)["-webkit-overflow-scrolling"];document.documentElement.removeChild(c),l&&s();var d={enable:s,disable:function(){window.removeEventListener("touchstart",a,!1),window.removeEventListener("touchmove",o,!1),r=!1},isEnabled:function(){return r},isScrollSupported:l};Nr&&(Nr=d),"function"==typeof e.define?function(e){e("iNoBounce",[],(function(){return d}))}(e.define):e.iNoBounce=d}(Nr);var rn={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},nn=new(function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};zr(this,e),this.init(t,r)}return Ur(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||rn,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,r,n){return n&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(r).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,tn(tn({},{prefix:"".concat(this.prefix,":").concat(t,":")}),this.options))}}]),e}()),on=function(){function e(){zr(this,e),this.observers={}}return Ur(e,[{key:"on",value:function(e,t){var r=this;return e.split(" ").forEach((function(e){r.observers[e]=r.observers[e]||[],r.observers[e].push(t)})),this}},{key:"off",value:function(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter((function(e){return e!==t})):delete this.observers[e])}},{key:"emit",value:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];if(this.observers[e]){var i=[].concat(this.observers[e]);i.forEach((function(e){e.apply(void 0,r)}))}if(this.observers["*"]){var o=[].concat(this.observers["*"]);o.forEach((function(t){t.apply(t,[e].concat(r))}))}}}]),e}();function an(){var e,t,r=new Promise((function(r,n){e=r,t=n}));return r.resolve=e,r.reject=t,r}function sn(e){return null==e?"":""+e}function cn(e,t,r){e.forEach((function(e){t[e]&&(r[e]=t[e])}))}function ln(e,t,r){function n(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function i(){return!e||"string"==typeof e}for(var o="string"!=typeof t?[].concat(t):t.split(".");o.length>1;){if(i())return{};var a=n(o.shift());!e[a]&&r&&(e[a]=new r),e=Object.prototype.hasOwnProperty.call(e,a)?e[a]:{}}return i()?{}:{obj:e,k:n(o.shift())}}function dn(e,t,r){var n=ln(e,t,Object);n.obj[n.k]=r}function un(e,t){var r=ln(e,t),n=r.obj,i=r.k;if(n)return n[i]}function pn(e,t,r){var n=un(e,r);return void 0!==n?n:un(t,r)}function hn(e,t,r){for(var n in t)"__proto__"!==n&&"constructor"!==n&&(n in e?"string"==typeof e[n]||e[n]instanceof String||"string"==typeof t[n]||t[n]instanceof String?r&&(e[n]=t[n]):hn(e[n],t[n],r):e[n]=t[n]);return e}function fn(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var mn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function gn(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return mn[e]})):e}var vn="undefined"!=typeof window&&window.navigator&&void 0===window.navigator.userAgentData&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,yn=[" ",",","?","!",";"];function bn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function wn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?bn(Object(r),!0).forEach((function(t){Kr(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bn(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function xn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=$r(e);if(t){var i=$r(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Wr(this,r)}}function Sn(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(e){if(e[t])return e[t];for(var n=t.split(r),i=e,o=0;o<n.length;++o){if(!i)return;if("string"==typeof i[n[o]]&&o+1<n.length)return;if(void 0===i[n[o]]){for(var a=2,s=n.slice(o,o+a).join(r),c=i[s];void 0===c&&n.length>o+a;)a++,c=i[s=n.slice(o,o+a).join(r)];if(void 0===c)return;if(null===c)return null;if(t.endsWith(s)){if("string"==typeof c)return c;if(s&&"string"==typeof c[s])return c[s]}var l=n.slice(o+a).join(r);return l?Sn(c,l,r):void 0}i=i[n[o]]}return i}}var _n=function(e){qr(r,e);var t=xn(r);function r(e){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return zr(this,r),n=t.call(this),vn&&on.call(Vr(n)),n.data=e||{},n.options=i,void 0===n.options.keySeparator&&(n.options.keySeparator="."),void 0===n.options.ignoreJSONStructure&&(n.options.ignoreJSONStructure=!0),n}return Ur(r,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,o=void 0!==n.ignoreJSONStructure?n.ignoreJSONStructure:this.options.ignoreJSONStructure,a=[e,t];r&&"string"!=typeof r&&(a=a.concat(r)),r&&"string"==typeof r&&(a=a.concat(i?r.split(i):r)),e.indexOf(".")>-1&&(a=e.split("."));var s=un(this.data,a);return s||!o||"string"!=typeof r?s:Sn(this.data&&this.data[e]&&this.data[e][t],r,i)}},{key:"addResource",value:function(e,t,r,n){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},o=this.options.keySeparator;void 0===o&&(o=".");var a=[e,t];r&&(a=a.concat(o?r.split(o):r)),e.indexOf(".")>-1&&(n=t,t=(a=e.split("."))[1]),this.addNamespaces(t),dn(this.data,a,n),i.silent||this.emit("added",e,t,r,n)}},{key:"addResources",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var i in r)"string"!=typeof r[i]&&"[object Array]"!==Object.prototype.toString.apply(r[i])||this.addResource(e,t,i,r[i],{silent:!0});n.silent||this.emit("added",e,t,r)}},{key:"addResourceBundle",value:function(e,t,r,n,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(n=r,r=t,t=(a=e.split("."))[1]),this.addNamespaces(t);var s=un(this.data,a)||{};n?hn(s,r,i):s=wn(wn({},s),r),dn(this.data,a,s),o.silent||this.emit("added",e,t,r)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?wn(wn({},{}),this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"hasLanguageSomeTranslations",value:function(e){var t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find((function(e){return t[e]&&Object.keys(t[e]).length>0}))}},{key:"toJSON",value:function(){return this.data}}]),r}(on),kn={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,r,n,i){var o=this;return e.forEach((function(e){o.processors[e]&&(t=o.processors[e].process(t,r,n,i))})),t}};function Cn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function En(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Cn(Object(r),!0).forEach((function(t){Kr(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Cn(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Pn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=$r(e);if(t){var i=$r(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Wr(this,r)}}var Rn={},Tn=function(e){qr(r,e);var t=Pn(r);function r(e){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return zr(this,r),n=t.call(this),vn&&on.call(Vr(n)),cn(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,Vr(n)),n.options=i,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n.logger=nn.create("translator"),n}return Ur(r,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;var r=this.resolve(e,t);return r&&void 0!==r.res}},{key:"extractFromKey",value:function(e,t){var r=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===r&&(r=":");var n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,i=t.ns||this.options.defaultNS||[],o=r&&e.indexOf(r)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||function(e,t,r){t=t||"",r=r||"";var n=yn.filter((function(e){return t.indexOf(e)<0&&r.indexOf(e)<0}));if(0===n.length)return!0;var i=new RegExp("(".concat(n.map((function(e){return"?"===e?"\\?":e})).join("|"),")")),o=!i.test(e);if(!o){var a=e.indexOf(r);a>0&&!i.test(e.substring(0,a))&&(o=!0)}return o}(e,r,n));if(o&&!a){var s=e.match(this.interpolator.nestingRegexp);if(s&&s.length>0)return{key:e,namespaces:i};var c=e.split(r);(r!==n||r===n&&this.options.ns.indexOf(c[0])>-1)&&(i=c.shift()),e=c.join(n)}return"string"==typeof i&&(i=[i]),{key:e,namespaces:i}}},{key:"translate",value:function(e,t,n){var i=this;if("object"!==Fr(t)&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var o=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,a=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,s=this.extractFromKey(e[e.length-1],t),c=s.key,l=s.namespaces,d=l[l.length-1],u=t.lng||this.language,p=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&"cimode"===u.toLowerCase()){if(p){var h=t.nsSeparator||this.options.nsSeparator;return o?(f.res="".concat(d).concat(h).concat(c),f):"".concat(d).concat(h).concat(c)}return o?(f.res=c,f):c}var f=this.resolve(e,t),m=f&&f.res,g=f&&f.usedKey||c,v=f&&f.exactUsedKey||c,y=Object.prototype.toString.apply(m),b=["[object Number]","[object Function]","[object RegExp]"],w=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject,S="string"!=typeof m&&"boolean"!=typeof m&&"number"!=typeof m;if(x&&m&&S&&b.indexOf(y)<0&&("string"!=typeof w||"[object Array]"!==y)){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var _=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,m,En(En({},t),{},{ns:l})):"key '".concat(c," (").concat(this.language,")' returned an object instead of string.");return o?(f.res=_,f):_}if(a){var k="[object Array]"===y,C=k?[]:{},E=k?v:g;for(var P in m)if(Object.prototype.hasOwnProperty.call(m,P)){var R="".concat(E).concat(a).concat(P);C[P]=this.translate(R,En(En({},t),{joinArrays:!1,ns:l})),C[P]===R&&(C[P]=m[P])}m=C}}else if(x&&"string"==typeof w&&"[object Array]"===y)(m=m.join(w))&&(m=this.extendTranslation(m,e,t,n));else{var T=!1,j=!1,O=void 0!==t.count&&"string"!=typeof t.count,M=r.hasDefaultValue(t),L=O?this.pluralResolver.getSuffix(u,t.count,t):"",D=t["defaultValue".concat(L)]||t.defaultValue;!this.isValidLookup(m)&&M&&(T=!0,m=D),this.isValidLookup(m)||(j=!0,m=c);var I=t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,A=I&&j?void 0:m,N=M&&D!==m&&this.options.updateMissing;if(j||T||N){if(this.logger.log(N?"updateKey":"missingKey",u,d,c,N?D:m),a){var F=this.resolve(c,En(En({},t),{},{keySeparator:!1}));F&&F.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var z=[],B=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&B&&B[0])for(var U=0;U<B.length;U++)z.push(B[U]);else"all"===this.options.saveMissingTo?z=this.languageUtils.toResolveHierarchy(t.lng||this.language):z.push(t.lng||this.language);var V=function(e,r,n){var o=M&&n!==m?n:A;i.options.missingKeyHandler?i.options.missingKeyHandler(e,d,r,o,N,t):i.backendConnector&&i.backendConnector.saveMissing&&i.backendConnector.saveMissing(e,d,r,o,N,t),i.emit("missingKey",e,d,r,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&O?z.forEach((function(e){i.pluralResolver.getSuffixes(e,t).forEach((function(r){V([e],c+r,t["defaultValue".concat(r)]||D)}))})):V(z,c,D))}m=this.extendTranslation(m,e,t,f,n),j&&m===c&&this.options.appendNamespaceToMissingKey&&(m="".concat(d,":").concat(c)),(j||T)&&this.options.parseMissingKeyHandler&&(m="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(d,":").concat(c):c,T?m:void 0):this.options.parseMissingKeyHandler(m))}return o?(f.res=m,f):m}},{key:"extendTranslation",value:function(e,t,r,n,i){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,En(En({},this.options.interpolation.defaultVariables),r),n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init(En(En({},r),{interpolation:En(En({},this.options.interpolation),r.interpolation)}));var a,s="string"==typeof e&&(r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(s){var c=e.match(this.interpolator.nestingRegexp);a=c&&c.length}var l=r.replace&&"string"!=typeof r.replace?r.replace:r;if(this.options.interpolation.defaultVariables&&(l=En(En({},this.options.interpolation.defaultVariables),l)),e=this.interpolator.interpolate(e,l,r.lng||this.language,r),s){var d=e.match(this.interpolator.nestingRegexp);a<(d&&d.length)&&(r.nest=!1)}!1!==r.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,n=new Array(e),a=0;a<e;a++)n[a]=arguments[a];return i&&i[0]===n[0]&&!r.context?(o.logger.warn("It seems you are nesting recursively key: ".concat(n[0]," in key: ").concat(t[0])),null):o.translate.apply(o,n.concat([t]))}),r)),r.interpolation&&this.interpolator.reset()}var u=r.postProcess||this.options.postProcess,p="string"==typeof u?[u]:u;return null!=e&&p&&p.length&&!1!==r.applyPostProcessor&&(e=kn.handle(p,e,t,this.options&&this.options.postProcessPassResolved?En({i18nResolved:n},r):r,this)),e}},{key:"resolve",value:function(e){var t,r,n,i,o,a=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!a.isValidLookup(t)){var c=a.extractFromKey(e,s),l=c.key;r=l;var d=c.namespaces;a.options.fallbackNS&&(d=d.concat(a.options.fallbackNS));var u=void 0!==s.count&&"string"!=typeof s.count,p=u&&!s.ordinal&&0===s.count&&a.pluralResolver.shouldUseIntlApi(),h=void 0!==s.context&&("string"==typeof s.context||"number"==typeof s.context)&&""!==s.context,f=s.lngs?s.lngs:a.languageUtils.toResolveHierarchy(s.lng||a.language,s.fallbackLng);d.forEach((function(e){a.isValidLookup(t)||(o=e,!Rn["".concat(f[0],"-").concat(e)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(o)&&(Rn["".concat(f[0],"-").concat(e)]=!0,a.logger.warn('key "'.concat(r,'" for languages "').concat(f.join(", "),'" won\'t get resolved as namespace "').concat(o,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),f.forEach((function(r){if(!a.isValidLookup(t)){i=r;var o,c=[l];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(c,l,r,e,s);else{var d;u&&(d=a.pluralResolver.getSuffix(r,s.count,s));var f="".concat(a.options.pluralSeparator,"zero");if(u&&(c.push(l+d),p&&c.push(l+f)),h){var m="".concat(l).concat(a.options.contextSeparator).concat(s.context);c.push(m),u&&(c.push(m+d),p&&c.push(m+f))}}for(;o=c.pop();)a.isValidLookup(t)||(n=o,t=a.getResource(r,e,o,s))}})))}))}})),{res:t,usedKey:r,exactUsedKey:n,usedLng:i,usedNS:o}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,r,n):this.resourceStore.getResource(e,t,r,n)}}],[{key:"hasDefaultValue",value:function(e){var t="defaultValue";for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t===r.substring(0,t.length)&&void 0!==e[r])return!0;return!1}}]),r}(on);function jn(e){return e.charAt(0).toUpperCase()+e.slice(1)}var On=function(){function e(t){zr(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=nn.create("languageUtils")}return Ur(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],r=e.split("-");return this.options.lowerCaseLng?r=r.map((function(e){return e.toLowerCase()})):2===r.length?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=jn(r[1].toLowerCase()))):3===r.length&&(r[0]=r[0].toLowerCase(),2===r[1].length&&(r[1]=r[1].toUpperCase()),"sgn"!==r[0]&&2===r[2].length&&(r[2]=r[2].toUpperCase()),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=jn(r[1].toLowerCase())),t.indexOf(r[2].toLowerCase())>-1&&(r[2]=jn(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,r=this;return e?(e.forEach((function(e){if(!t){var n=r.formatLanguageCode(e);r.options.supportedLngs&&!r.isSupportedCode(n)||(t=n)}})),!t&&this.options.supportedLngs&&e.forEach((function(e){if(!t){var n=r.getLanguagePartFromCode(e);if(r.isSupportedCode(n))return t=n;t=r.options.supportedLngs.find((function(e){if(0===e.indexOf(n))return e}))}})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var r=e[t];return r||(r=e[this.getScriptPartFromCode(t)]),r||(r=e[this.formatLanguageCode(t)]),r||(r=e[this.getLanguagePartFromCode(t)]),r||(r=e.default),r||[]}},{key:"toResolveHierarchy",value:function(e,t){var r=this,n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),i=[],o=function(e){e&&(r.isSupportedCode(e)?i.push(e):r.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):"string"==typeof e&&o(this.formatLanguageCode(e)),n.forEach((function(e){i.indexOf(e)<0&&o(r.formatLanguageCode(e))})),i}}]),e}(),Mn=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],Ln={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}},Dn=["v1","v2","v3"],In={zero:0,one:1,two:2,few:3,many:4,other:5};function An(){var e={};return Mn.forEach((function(t){t.lngs.forEach((function(r){e[r]={numbers:t.nr,plurals:Ln[t.fc]}}))})),e}var Nn=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};zr(this,e),this.languageUtils=t,this.options=r,this.logger=nn.create("pluralResolver"),this.options.compatibilityJSON&&"v4"!==this.options.compatibilityJSON||"undefined"!=typeof Intl&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=An()}return Ur(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(e,{type:t.ordinal?"ordinal":"cardinal"})}catch(e){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.getRule(e,t);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,r).map((function(e){return"".concat(t).concat(e)}))}},{key:"getSuffixes",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,r);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort((function(e,t){return In[e]-In[t]})).map((function(e){return"".concat(t.options.prepend).concat(e)})):n.numbers.map((function(n){return t.getSuffix(e,n,r)})):[]}},{key:"getSuffix",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=this.getRule(e,r);return n?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(n.select(t)):this.getSuffixRetroCompatible(n,t):(this.logger.warn("no plural rule found for: ".concat(e)),"")}},{key:"getSuffixRetroCompatible",value:function(e,t){var r=this,n=e.noAbs?e.plurals(t):e.plurals(Math.abs(t)),i=e.numbers[n];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===i?i="plural":1===i&&(i=""));var o=function(){return r.options.prepend&&i.toString()?r.options.prepend+i.toString():i.toString()};return"v1"===this.options.compatibilityJSON?1===i?"":"number"==typeof i?"_plural_".concat(i.toString()):o():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?o():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}},{key:"shouldUseIntlApi",value:function(){return!Dn.includes(this.options.compatibilityJSON)}}]),e}();function Fn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function zn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Fn(Object(r),!0).forEach((function(t){Kr(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fn(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Bn=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};zr(this,e),this.logger=nn.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return Ur(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:gn,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?fn(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?fn(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?fn(t.nestingPrefix):t.nestingPrefixEscaped||fn("$t("),this.nestingSuffix=t.nestingSuffix?fn(t.nestingSuffix):t.nestingSuffixEscaped||fn(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var r="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(r,"g")}},{key:"interpolate",value:function(e,t,r,n){var i,o,a,s=this,c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function l(e){return e.replace(/\$/g,"$$$$")}var d=function(e){if(e.indexOf(s.formatSeparator)<0){var i=pn(t,c,e);return s.alwaysFormat?s.format(i,void 0,r,zn(zn(zn({},n),t),{},{interpolationkey:e})):i}var o=e.split(s.formatSeparator),a=o.shift().trim(),l=o.join(s.formatSeparator).trim();return s.format(pn(t,c,a),l,r,zn(zn(zn({},n),t),{},{interpolationkey:a}))};this.resetRegExp();var u=n&&n.missingInterpolationHandler||this.options.missingInterpolationHandler,p=n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return l(e)}},{regex:this.regexp,safeValue:function(e){return s.escapeValue?l(s.escape(e)):l(e)}}].forEach((function(t){for(a=0;i=t.regex.exec(e);){var r=i[1].trim();if(void 0===(o=d(r)))if("function"==typeof u){var c=u(e,i,n);o="string"==typeof c?c:""}else if(n&&n.hasOwnProperty(r))o="";else{if(p){o=i[0];continue}s.logger.warn("missed to pass in variable ".concat(r," for interpolating ").concat(e)),o=""}else"string"==typeof o||s.useRawValueToEscape||(o=sn(o));var l=t.safeValue(o);if(e=e.replace(i[0],l),p?(t.regex.lastIndex+=o.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,++a>=s.maxReplaces)break}})),e}},{key:"nest",value:function(e,t){var r,n,i=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=zn({},o);function s(e,t){var r=this.nestingOptionsSeparator;if(e.indexOf(r)<0)return e;var n=e.split(new RegExp("".concat(r,"[ ]*{"))),i="{".concat(n[1]);e=n[0],i=(i=this.interpolate(i,a)).replace(/'/g,'"');try{a=JSON.parse(i),t&&(a=zn(zn({},t),a))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(r).concat(i)}return delete a.defaultValue,e}for(a.applyPostProcessor=!1,delete a.defaultValue;r=this.nestingRegexp.exec(e);){var c=[],l=!1;if(-1!==r[0].indexOf(this.formatSeparator)&&!/{.*}/.test(r[1])){var d=r[1].split(this.formatSeparator).map((function(e){return e.trim()}));r[1]=d.shift(),c=d,l=!0}if((n=t(s.call(this,r[1].trim(),a),a))&&r[0]===e&&"string"!=typeof n)return n;"string"!=typeof n&&(n=sn(n)),n||(this.logger.warn("missed to resolve ".concat(r[1]," for nesting ").concat(e)),n=""),l&&(n=c.reduce((function(e,t){return i.format(e,t,o.lng,zn(zn({},o),{},{interpolationkey:r[1].trim()}))}),n.trim())),e=e.replace(r[0],n),this.regexp.lastIndex=0}return e}}]),e}();function Un(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Vn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Un(Object(r),!0).forEach((function(t){Kr(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Un(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Hn=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};zr(this,e),this.logger=nn.create("formatter"),this.options=t,this.formats={number:function(e,t,r){return new Intl.NumberFormat(t,r).format(e)},currency:function(e,t,r){return new Intl.NumberFormat(t,Vn(Vn({},r),{},{style:"currency"})).format(e)},datetime:function(e,t,r){return new Intl.DateTimeFormat(t,Vn({},r)).format(e)},relativetime:function(e,t,r){return new Intl.RelativeTimeFormat(t,Vn({},r)).format(e,r.range||"day")},list:function(e,t,r){return new Intl.ListFormat(t,Vn({},r)).format(e)}},this.init(t)}return Ur(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},r=t.interpolation;this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||","}},{key:"add",value:function(e,t){this.formats[e.toLowerCase().trim()]=t}},{key:"format",value:function(e,t,r,n){var i=this;return t.split(this.formatSeparator).reduce((function(e,t){var o=function(e){var t=e.toLowerCase().trim(),r={};if(e.indexOf("(")>-1){var n=e.split("(");t=n[0].toLowerCase().trim();var i=n[1].substring(0,n[1].length-1);"currency"===t&&i.indexOf(":")<0?r.currency||(r.currency=i.trim()):"relativetime"===t&&i.indexOf(":")<0?r.range||(r.range=i.trim()):i.split(";").forEach((function(e){if(e){var t=Xr(e.split(":")),n=t[0],i=t.slice(1).join(":").trim().replace(/^'+|'+$/g,"");r[n.trim()]||(r[n.trim()]=i),"false"===i&&(r[n.trim()]=!1),"true"===i&&(r[n.trim()]=!0),isNaN(i)||(r[n.trim()]=parseInt(i,10))}}))}return{formatName:t,formatOptions:r}}(t),a=o.formatName,s=o.formatOptions;if(i.formats[a]){var c=e;try{var l=n&&n.formatParams&&n.formatParams[n.interpolationkey]||{},d=l.locale||l.lng||n.locale||n.lng||r;c=i.formats[a](e,d,Vn(Vn(Vn({},s),n),l))}catch(e){i.logger.warn(e)}return c}return i.logger.warn("there was no format function for ".concat(a)),e}),e)}}]),e}();function qn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Wn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?qn(Object(r),!0).forEach((function(t){Kr(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qn(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function $n(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=$r(e);if(t){var i=$r(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Wr(this,r)}}var Kn=function(e){qr(r,e);var t=$n(r);function r(e,n,i){var o,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return zr(this,r),o=t.call(this),vn&&on.call(Vr(o)),o.backend=e,o.store=n,o.services=i,o.languageUtils=i.languageUtils,o.options=a,o.logger=nn.create("backendConnector"),o.waitingReads=[],o.maxParallelReads=a.maxParallelReads||10,o.readingCalls=0,o.maxRetries=a.maxRetries>=0?a.maxRetries:5,o.retryTimeout=a.retryTimeout>=1?a.retryTimeout:350,o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(i,a.backend,a),o}return Ur(r,[{key:"queueLoad",value:function(e,t,r,n){var i=this,o={},a={},s={},c={};return e.forEach((function(e){var n=!0;t.forEach((function(t){var s="".concat(e,"|").concat(t);!r.reload&&i.store.hasResourceBundle(e,t)?i.state[s]=2:i.state[s]<0||(1===i.state[s]?void 0===a[s]&&(a[s]=!0):(i.state[s]=1,n=!1,void 0===a[s]&&(a[s]=!0),void 0===o[s]&&(o[s]=!0),void 0===c[t]&&(c[t]=!0)))})),n||(s[e]=!0)})),(Object.keys(o).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:n}),{toLoad:Object.keys(o),pending:Object.keys(a),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(c)}}},{key:"loaded",value:function(e,t,r){var n=e.split("|"),i=n[0],o=n[1];t&&this.emit("failedLoading",i,o,t),r&&this.store.addResourceBundle(i,o,r),this.state[e]=t?-1:2;var a={};this.queue.forEach((function(r){var n,s,c,l,d,u;n=r.loaded,s=o,l=ln(n,[i],Object),d=l.obj,u=l.k,d[u]=d[u]||[],c&&(d[u]=d[u].concat(s)),c||d[u].push(s),function(e,t){void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)}(r,e),t&&r.errors.push(t),0!==r.pendingCount||r.done||(Object.keys(r.loaded).forEach((function(e){a[e]||(a[e]={});var t=r.loaded[e];t.length&&t.forEach((function(t){void 0===a[e][t]&&(a[e][t]=!0)}))})),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,r){var n=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;return e.length?this.readingCalls>=this.maxParallelReads?void this.waitingReads.push({lng:e,ns:t,fcName:r,tried:i,wait:o,callback:a}):(this.readingCalls++,this.backend[r](e,t,(function(s,c){if(n.readingCalls--,n.waitingReads.length>0){var l=n.waitingReads.shift();n.read(l.lng,l.ns,l.fcName,l.tried,l.wait,l.callback)}s&&c&&i<n.maxRetries?setTimeout((function(){n.read.call(n,e,t,r,i+1,2*o,a)}),o):a(s,c)}))):a(null,{})}},{key:"prepareLoading",value:function(e,t){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var o=this.queueLoad(e,t,n,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach((function(e){r.loadOne(e)}))}},{key:"load",value:function(e,t,r){this.prepareLoading(e,t,{},r)}},{key:"reload",value:function(e,t,r){this.prepareLoading(e,t,{reload:!0},r)}},{key:"loadOne",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e.split("|"),i=n[0],o=n[1];this.read(i,o,"read",void 0,void 0,(function(n,a){n&&t.logger.warn("".concat(r,"loading namespace ").concat(o," for language ").concat(i," failed"),n),!n&&a&&t.logger.log("".concat(r,"loaded namespace ").concat(o," for language ").concat(i),a),t.loaded(e,n,a)}))}},{key:"saveMissing",value:function(e,t,r,n,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)?this.logger.warn('did not save key "'.concat(r,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):null!=r&&""!==r&&(this.backend&&this.backend.create&&this.backend.create(e,t,r,n,null,Wn(Wn({},o),{},{isUpdate:i})),e&&e[0]&&this.store.addResource(e[0],t,r,n))}}]),r}(on);function Gn(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===Fr(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===Fr(e[2])||"object"===Fr(e[3])){var r=e[3]||e[2];Object.keys(r).forEach((function(e){t[e]=r[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,r,n){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function Zn(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function Qn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Yn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Qn(Object(r),!0).forEach((function(t){Kr(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qn(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Jn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=$r(e);if(t){var i=$r(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Wr(this,r)}}function Xn(){}function ei(e){Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((function(t){"function"==typeof e[t]&&(e[t]=e[t].bind(e))}))}var ti=function(e){qr(r,e);var t=Jn(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;if(zr(this,r),e=t.call(this),vn&&on.call(Vr(e)),e.options=Zn(n),e.services={},e.logger=nn,e.modules={external:[]},ei(Vr(e)),i&&!e.isInitialized&&!n.isClone){if(!e.options.initImmediate)return e.init(n,i),Wr(e,Vr(e));setTimeout((function(){e.init(n,i)}),0)}return e}return Ur(r,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;"function"==typeof t&&(r=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&("string"==typeof t.ns?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));var n=Gn();function i(e){return e?"function"==typeof e?new e:e:null}if(this.options=Yn(Yn(Yn({},n),this.options),Zn(t)),"v1"!==this.options.compatibilityAPI&&(this.options.interpolation=Yn(Yn({},n.interpolation),this.options.interpolation)),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),!this.options.isClone){var o;this.modules.logger?nn.init(i(this.modules.logger),this.options):nn.init(null,this.options),this.modules.formatter?o=this.modules.formatter:"undefined"!=typeof Intl&&(o=Hn);var a=new On(this.options);this.store=new _n(this.options.resources,this.options);var s=this.services;s.logger=nn,s.resourceStore=this.store,s.languageUtils=a,s.pluralResolver=new Nn(a,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!o||this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format||(s.formatter=i(o),s.formatter.init(s,this.options),this.options.interpolation.format=s.formatter.format.bind(s.formatter)),s.interpolator=new Bn(this.options),s.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},s.backendConnector=new Kn(i(this.modules.backend),s.resourceStore,s,this.options),s.backendConnector.on("*",(function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];e.emit.apply(e,[t].concat(n))})),this.modules.languageDetector&&(s.languageDetector=i(this.modules.languageDetector),s.languageDetector.init(s,this.options.detection,this.options)),this.modules.i18nFormat&&(s.i18nFormat=i(this.modules.i18nFormat),s.i18nFormat.init&&s.i18nFormat.init(this)),this.translator=new Tn(this.services,this.options),this.translator.on("*",(function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];e.emit.apply(e,[t].concat(n))})),this.modules.external.forEach((function(t){t.init&&t.init(e)}))}if(this.format=this.options.interpolation.format,r||(r=Xn),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&"dev"!==c[0]&&(this.options.lng=c[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");var l=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];l.forEach((function(t){e[t]=function(){var r;return(r=e.store)[t].apply(r,arguments)}}));var d=["addResource","addResources","addResourceBundle","removeResourceBundle"];d.forEach((function(t){e[t]=function(){var r;return(r=e.store)[t].apply(r,arguments),e}}));var u=an(),p=function(){var t=function(t,n){e.isInitialized&&!e.initializedStoreOnce&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),u.resolve(n),r(t,n)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initImmediate?p():setTimeout(p,0),u}},{key:"loadResources",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Xn,n=r,i="string"==typeof e?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(i&&"cimode"===i.toLowerCase())return n();var o=[],a=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach((function(e){o.indexOf(e)<0&&o.push(e)}))};if(i)a(i);else{var s=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);s.forEach((function(e){return a(e)}))}this.options.preload&&this.options.preload.forEach((function(e){return a(e)})),this.services.backendConnector.load(o,this.options.ns,(function(e){e||t.resolvedLanguage||!t.language||t.setResolvedLanguage(t.language),n(e)}))}else n(null)}},{key:"reloadResources",value:function(e,t,r){var n=an();return e||(e=this.languages),t||(t=this.options.ns),r||(r=Xn),this.services.backendConnector.reload(e,t,(function(e){n.resolve(),r(e)})),n}},{key:"use",value:function(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&kn.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"setResolvedLanguage",value:function(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(var t=0;t<this.languages.length;t++){var r=this.languages[t];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}},{key:"changeLanguage",value:function(e,t){var r=this;this.isLanguageChangingTo=e;var n=an();this.emit("languageChanging",e);var i=function(e){r.language=e,r.languages=r.services.languageUtils.toResolveHierarchy(e),r.resolvedLanguage=void 0,r.setResolvedLanguage(e)},o=function(o){e||o||!r.services.languageDetector||(o=[]);var a="string"==typeof o?o:r.services.languageUtils.getBestMatchFromCodes(o);a&&(r.language||i(a),r.translator.language||r.translator.changeLanguage(a),r.services.languageDetector&&r.services.languageDetector.cacheUserLanguage(a)),r.loadResources(a,(function(e){!function(e,o){o?(i(o),r.translator.changeLanguage(o),r.isLanguageChangingTo=void 0,r.emit("languageChanged",o),r.logger.log("languageChanged",o)):r.isLanguageChangingTo=void 0,n.resolve((function(){return r.t.apply(r,arguments)})),t&&t(e,(function(){return r.t.apply(r,arguments)}))}(e,a)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(o):o(e):o(this.services.languageDetector.detect()),n}},{key:"getFixedT",value:function(e,t,r){var n=this,i=function e(t,i){var o;if("object"!==Fr(i)){for(var a=arguments.length,s=new Array(a>2?a-2:0),c=2;c<a;c++)s[c-2]=arguments[c];o=n.options.overloadTranslationOptionHandler([t,i].concat(s))}else o=Yn({},i);o.lng=o.lng||e.lng,o.lngs=o.lngs||e.lngs,o.ns=o.ns||e.ns,o.keyPrefix=o.keyPrefix||r||e.keyPrefix;var l=n.options.keySeparator||".",d=o.keyPrefix?"".concat(o.keyPrefix).concat(l).concat(t):t;return n.t(d,o)};return"string"==typeof e?i.lng=e:i.lngs=e,i.ns=t,i.keyPrefix=r,i}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var n=this.resolvedLanguage||this.languages[0],i=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;var a=function(e,r){var n=t.services.backendConnector.state["".concat(e,"|").concat(r)];return-1===n||2===n};if(r.precheck){var s=r.precheck(this,a);if(void 0!==s)return s}return!!this.hasResourceBundle(n,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!a(n,e)||i&&!a(o,e)))}},{key:"loadNamespaces",value:function(e,t){var r=this,n=an();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){r.options.ns.indexOf(e)<0&&r.options.ns.push(e)})),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var r=an();"string"==typeof e&&(e=[e]);var n=this.options.preload||[],i=e.filter((function(e){return n.indexOf(e)<0}));return i.length?(this.options.preload=n.concat(i),this.loadResources((function(e){r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Xn,i=Yn(Yn(Yn({},this.options),t),{isClone:!0}),o=new r(i),a=["store","services","language"];return a.forEach((function(t){o[t]=e[t]})),o.services=Yn({},this.services),o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o.translator=new Tn(o.services,o.options),o.translator.on("*",(function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];o.emit.apply(o,[e].concat(r))})),o.init(i,n),o.translator.options=o.options,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),r}(on);Kr(ti,"createInstance",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new ti(e,t)}));var ri=ti.createInstance();ri.createInstance=ti.createInstance;ri.createInstance,ri.init,ri.loadResources,ri.reloadResources,ri.use,ri.changeLanguage,ri.getFixedT,ri.t,ri.exists,ri.setDefaultNamespace,ri.hasLoadedNamespace,ri.loadNamespaces,ri.loadLanguages;var ni=ri,ii={};(ii=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}).__esModule=!0,ii.default=ii;var oi={};function ai(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(oi=function(e,t,r){return t&&ai(e.prototype,t),r&&ai(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}).__esModule=!0,oi.default=oi;var si={};(si=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}).__esModule=!0,si.default=si;je=o("85Hg2");var ci=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,li={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},di=function(e){return li[e]};function ui(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function pi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ui(Object(n),!0).forEach((function(t){r(si)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ui(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var hi,fi={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:function(e){return e.replace(ci,di)}},mi=(0,je.createContext)();function gi(){return fi}var vi=function(){function e(){r(ii)(this,e),this.usedNamespaces={}}return r(oi)(e,[{key:"addUsedNamespaces",value:function(e){var t=this;e.forEach((function(e){t.usedNamespaces[e]||(t.usedNamespaces[e]=!0)}))}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}]),e}();function yi(){return hi}var bi={type:"3rdParty",init:function(e){!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};fi=pi(pi({},fi),e)}(e.options.react),function(e){hi=e}(e)}};const wi=()=>{try{const e=localStorage.getItem("stream_ui_language");return e||"en"}catch(e){return console.warn(e),"en"}},xi={en:{name:"English",translation:{header:{free:"Free version"},loader:{connection:"Connecting..."},notifications:{screensharingError:"An error occured when trying to toggle screensharing",microphoneError:"An error occured when trying to toggle the microphone",cameraError:"An error occured when trying to toggle the camera",cameraRotateError:"An error occured when trying to rotate the camera",noCamera:"No camera available",blockedMicrophonePopupTitle:"Camera and microphone are blocked",blockedMicrophonePopup:"SnapCall requires access to your camera and microphone. Click the camera blocked icon in your browser's address bar.",reload:"Reload",criticalError:"A critical error has occurred (error {{code}}).",agentJoinError:"An error occured while trying to join the room as an agent",close:"Close",connectedTo:"Connected to {{name}}",recording:"Recording in progress"},recordingPopup:{recordingStartTitle:"Recording about to start.",recordingStartText:"This call will be recorded shortly. If you’d rather not be recorded, you’re welcome to leave the call at this time.",dismiss:"Dismiss"},endView:{goBack:"Go back to call",tooLate:"You arrived too late",callIsOver:"The call is over or deleted",callEnded:"The call is now ended",callLeft:"You left the call",full:"You can't join this call",fullDescription:"The room is full. Please try to join the call later."},menu:{title:"Menu",new:"NEW",openNewTab:"Open new tab",quickConnect:"Quick Connect",pictureInPicture:"Picture-in-Picture",screenSharing:"Screen sharing",stopRecord:"Stop record",startRecord:"Record call"},blockedFeature:{titleConnected:"Upgrade to Pro",titleGuest:"Feature not available",descriptionConnected:"On a free plan, you can't use this feature. Upgrade your plan to enjoy all in-call features.",descriptionGuest:"You are participating in a call created with a free version of SnapCall. This feature is only available with a Pro version.",dismissGuest:"Okay",dismissConnected:"Upgrade to Pro"},copyLink:{title:"Copy link",description:"Copy link into clipboard",error:"An error occured when trying to copy to clipboard",copied:"Link copied to clipboard"},quickConnect:{title:"Quick Connect",scanTitle:"Scan QR Code",scan:"Scan this QR code with your phone camera to open the call."},settings:{title:"Settings",preferences:"Preferences",language:"Language",devices:"Devices",help:"Help",helpCenter:"Go to help center"},audioMenu:{title:"Audio",blockedMicrophone:"Microphone is blocked.",microphonePermissions:"Please accept microphone sharing before accessing these options."},videoMenu:{title:"Video",lowDef:"Low definition (240p)",standardDef:"Standard definition (480p)",highDef:"High definition (720p)",blockedCamera:"Camera is blocked.",cameraPermissions:"Please accept camera sharing before accessing these options.",sendResolution:"Send Resolution (maximum)"},shareLink:{title:"Share link",title2:"Share a link",invalid:"Invalid link",sentToUsers:"Link sent to users",sentToUser:"Link sent to {{user}}",failed:"Failed to send link",poweredBy:"Powered by",invoice:"{{user}} sent you an invoice.",pay:"Pay"},youtube:{title:"Watch Together",url:"YOUTUBE URL",invalid:"Invalid YouTube URL",share:"Watch now"},sharedHistory:{shared:"Shared with you"},snapshot:{title:"Snapshot",shared:"Snapshot shared.",sentToUsers:"Snapshot sent to users.",sentToUser:"Snapshot sent to {{user}}",save:"Save photo",error:"An error occured when trying to send the snapshot"},gdpr:{recordedWarning:"To improve the quality of our service, this call will be recorded."},requestDevice:{requestInput:"Request input devices",request:"{{user}} would like you to share your {{device}}",timedOut:"Your request has timed out.",declined:"Your request has been declined.",userDeclined:"{{user}} has declined your request."},leave:{title:"Leave",leaveCall:"Leave call",endCall:"End call for all"},virtualBackground:{title:"Virtual Background",setBackground:"Set Background"},misc:{someone:"Someone",camera:"Camera",microphone:"Microphone",photo:"Photo",video:"Video",screen:"Screen",speaker:"Speaker",user:"User",open:"Open",from:"From",accept:"Accept",decline:"Decline",you:"You",cancel:"Cancel",confirm:"Confirm",remove:"Remove"},greeting:{mainTitle:"Welcome to SnapCall",sideTitle:"Are you ready to join?",sideDescription:"Before joining the room, enter your name. It will displayed to participants.",namePlaceholder:"Your name",nameSubmit:"Join Conversation",footerTitle:"Powered by SnapCall",footerDescription:"Meet SnapCall, the easiest way to add real-time video to platform, product or service."},recorder:{limit:"Video recording limited to 5 min.",submissionTitle:"Thank you for your submission!",submissionDescription:"Your photo/video has been successfully submitted. We will review it and get back to you shortly.",confirmRemovalTitle:"Confirm deletion",confirmRemovalDescription:"Are you sure you want to delete this photo/video? This action cannot be undone.",elementBeingProcessed:"Please wait while your {{ type }} is being processed...",waitVideo:"A video may take up to 15 seconds to be ready.",elementCaptureSuccess:"{{ type }} captured successfully",takeNewElement:"Capture a new {{ type }}",sendElement:"Send {{ type }}",sendElements:"Send {{ count }} elements",allowAccess:"Allow access",okay:"Okay",allowCamMicAccess:"Allow access to camera and microphone",allowScreenShareAccess:"Allow access to screen sharing",permissionDeniedTitle:"Something went wrong!",permissionDeniedDescription:"Without access to the camera and microphone, you won't be able to capture photos or videos to share with the support team. Please grant access in your browser settings.",photoInstructionsTitle:"Ready to snap a photo?",videoInstructionsTitle:"Ready to record a video?",screenShareInstructionsTitle:"Ready to share your screen?",instructions:{allowAccessOnPrompt:"When prompted, <1>allow access</1> to the camera and microphone.",tapPhotoButton:"Tap the <1 /><2>Camera button</2> to take a photo.",multiplePhotos:"Feel free to take multiple photos for more details.",reviewAndSendPhotos:"Review your photo and <1>send it when you're satisfied.</1>",reviewAndSendScreenShare:"Review your video and <1>send it when you're satisfied.</1>",tapVideoButton:"Tap the <1 /><2>Record button</2> to start recording.",videoSpeech:"You can <1>talk during</1> the recording to provide additional information.",tapStopVideoButton:"When you're done, tap the <1 /><2>Stop button</2>.",reviewAndSendVideos:"Review your video and <1>send it when you're satisfied</1>.",tapScreenShareButton:"Tap <1>Record my screen</1> to begin recording.",tapStopScreenShareButton:"When you're done, tap <1>Stop recording</1>.",screenShareInstruction:"Select the screen or window you wish to record.",privacyPolicy:"By proceeding, you agree to our <1>Privacy Policy</1>."},switchToMobileTitle:"Switch to your mobile device",switchToMobileDescription:"Experience greater convenience by using your phone to take photos and record videos.",useDesktopVersion:"Use the desktop version",scanQRCode:"Scan this QR code with a compatible device.",startScreenShareButton:"Record my screen",stopScreenShareButton:"Stop recording",screenTitle:"Ready to capture your screen?"}}},fr:{name:"Français",translation:{header:{free:"Version gratuite"},loader:{connection:"Connexion..."},notifications:{screensharingError:"Une erreur est survenue pendant l'activation du partage d'écran",microphoneError:"Une erreur est survenue pendant l'activation du micro",cameraError:"Une erreur est survenue pendant l'activation de la caméra",cameraRotateError:"Une erreur est survenue pendant la rotation de la caméra",noCamera:"Aucune caméra disponible",blockedMicrophonePopupTitle:"Votre caméra et micro sont bloqués",blockedMicrophonePopup:"SnapCall a besoin d'accéder à votre caméra et micro. Cliquez sur l'icône de caméra bloquée dans la barre d'adresse du navigateur.",reload:"Recharger",criticalError:"Une erreur critique est survenue (erreur {{code}}).",agentJoinError:"Une erreur est survenue en essayant de rejoindre la salle en tant qu'agent",close:"Fermer",connectedTo:"Connecté à {{name}}",recording:"Enregistrement en cours"},recordingPopup:{recordingStartTitle:"L'enregistrement va commencer.",recordingStartText:"Cet appel sera enregistré sous peu. Si vous préférez ne pas être enregistré, vous êtes libre de quitter l'appel à tout moment.",dismiss:"Fermer"},endView:{goBack:"Retourner dans l'appel",tooLate:"Vous êtes arrivez trop tard",callIsOver:"Cet appel est terminé ou supprimé",callEnded:"Cet appel est terminé",callLeft:"Vous avez quitté l'appel",full:"Impossible de rejoindre l'appel",fullDescription:"Limite d'utilisateurs atteinte. Merci de rejoindre l'appel ultérieurement."},menu:{title:"Menu",new:"NOUVEAU",openNewTab:"Ouvrir un nouvel onglet",quickConnect:"Quick Connect",pictureInPicture:"Picture-in-Picture",screenSharing:"Partage d'écran",stopRecord:"Arrêter l'enregistrement",startRecord:"Enregistrer l'appel"},blockedFeature:{titleConnected:"Souscrire au plan Pro",titleGuest:"Fonctionnalité non disponible",descriptionConnected:"Vous n'avez pas accès à cette fonctionnalité. Souscrivez au plan Pro pour débloquer toutes les fonctionnalités de SnapCall.",descriptionGuest:"Vous participez à un appel créé avec la version gratuite de SnapCall. Cette fonctionnalité n'est disponible qu'avec une version Pro.",dismissGuest:"D'accord",dismissConnected:"Souscrire à Pro"},copyLink:{title:"Copier le lien",description:"Copier le lien dans le presse-papiers",error:"Une erreur est survenue pendant la copie du lien dans le presse-papier",copied:"Lien copié dans le presse-papier"},quickConnect:{title:"Quick Connect",scanTitle:"Scannez le QR Code",scan:"Scannez ce QR code avec votre téléphone pour ouvrir l'appel."},settings:{title:"Paramètres",preferences:"Préférences",language:"Langage",devices:"Appareils",help:"Aide",helpCenter:"Accéder au centre d'aide"},audioMenu:{title:"Audio",blockedMicrophone:"Votre micro est bloqué.",microphonePermissions:"Please accept microphone sharing before accessing these options."},videoMenu:{title:"Video",lowDef:"Basse définition (240p)",standardDef:"Définition standard (480p)",highDef:"Haute définition (720p)",blockedCamera:"Votre caméra est bloqué.",cameraPermissions:"Please accept camera sharing before accessing these options.",sendResolution:"Résolution envoyée (max)"},shareLink:{title:"Partager un lien",title2:"Partager un lien",invalid:"Lien invalide",sentToUsers:"Lien envoyé aux participants",sentToUser:"Lien envoyé à {{user}}",failed:"Une erreur est survenue pendant l'envoi du lien",poweredBy:"Proposé par",invoice:"{{user}} vous a envoyé une facture.",pay:"Payer"},youtube:{title:"Regardons Ensemble",url:"URL YOUTUBE",invalid:"URL YouTube invalide",share:"Regarder maintenant"},sharedHistory:{shared:"Partagé avec vous"},snapshot:{title:"Snapshot",shared:"Snapshot envoyé.",sentToUsers:"Snapshot envoyé aux participants.",sentToUser:"Snapshot envoyé à {{user}}",save:"Sauvegarder l'image",error:"Une erreur est survenue pendant l'envoi du snapshot"},gdpr:{recordedWarning:"Pour améliorer la qualité de notre service, cet appel va être enregistré."},requestDevice:{requestInput:"Demander l'activation",request:"{{user}} voudrait que vous partagiez votre {{device}}",timedOut:"Votre requête n'a pas eu de réponse",declined:"Votre requête a été refusé.",userDeclined:"{{user}} a décliné votre requête."},leave:{title:"Quitter",leaveCall:"Quitter l'appel",endCall:"Terminer l'appel"},virtualBackground:{title:"Arrière plan virtuel",setBackground:"Mettre l'arrière plan"},misc:{someone:"Quelqu'un",camera:"Caméra",microphone:"Micro",photo:"Photo",video:"Vidéo",screen:"Écran",speaker:"Haut-parleur",user:"Utilisateur",open:"Ouvrir",from:"Depuis",accept:"Accepter",decline:"Décliner",you:"Vous",cancel:"Annuler",confirm:"Confirmer",remove:"Enlever"},greeting:{mainTitle:"Bienvenue sur SnapCall",sideTitle:"Prêt à rejoindre ?",sideDescription:"Avant de rejoindre la salle, veuillez entrer votre nom.",namePlaceholder:"Nom",nameSubmit:"Rejoindre la conversation",footerTitle:"Propulsé par SnapCall",footerDescription:"Découvrez SnapCall, ajoutez de la vidéo en temps réel à n'importe quelle plateforme, produit ou service."},recorder:{limit:"Enregistrement vidéo limité à 5 min.",submissionTitle:"Merci pour votre soumission !",submissionDescription:"Votre photo/vidéo a été envoyée avec succès. Nous l'examinerons et reviendrons vers vous bientôt.",confirmRemovalTitle:"Confirmer la suppression",confirmRemovalDescription:"Voulez-vous vraiment supprimer cette photo/vidéo ? Cette action ne peut pas être annulée.",elementBeingProcessed:"Veuillez patienter un moment pendant que votre {{ type }} est en cours de traitement...",waitVideo:"Cela peut prendre jusqu'à 15 secondes pour qu'une vidéo soit prête.",elementCaptureSuccess:"{{ type }} capturé(e) avec succès",takeNewElement:"Prendre une nouvelle {{ type }}",sendElement:"Envoyer la {{ type }}",sendElements:"Envoyer {{ count }} éléments",allowAccess:"Autoriser l'accès",okay:"D'accord",allowCamMicAccess:"Autoriser l'accès à la caméra et au micro",allowScreenShareAccess:"Autoriser l'accès au partage d'écran",permissionDeniedTitle:"Quelque chose s'est mal passé !",permissionDeniedDescription:"Sans accès à la caméra et au microphone, vous ne pouvez pas prendre de photos ou de vidéos à partager avec l'équipe d'assistance. Veuillez accorder l'accès dans les paramètres de votre navigateur.",photoInstructionsTitle:"Prêt(e) à prendre une photo ?",videoInstructionsTitle:"Prêt(e) à enregistrer une vidéo ?",screenShareInstructionsTitle:"Prêt(e) à partager votre écran ?",instructions:{allowAccessOnPrompt:"Lorsque vous y êtes invité(e), <1>autorisez l'accès</1> à la caméra et au microphone.",tapPhotoButton:"Appuyez sur le <1 /><2>bouton Appareil photo</2> pour prendre une photo.",multiplePhotos:"N'hésitez pas à prendre plusieurs photos pour plus de détails.",reviewAndSendPhotos:"Vous pouvez revoir votre photo, puis <1>l'envoyer lorsque vous avez terminé.</1>",tapVideoButton:"Appuyez sur le <1 /><2>bouton d'enregistrement</2> pour démarrer un enregistrement.",videoSpeech:"Vous pouvez <1>parler pendant</1> l'enregistrement pour ajouter des détails.",tapStopVideoButton:"Lorsque vous avez terminé, appuyez sur le <1 /><2>bouton Arrêter</2>.",reviewAndSendVideos:"Vous pouvez revoir votre vidéo, puis <1>l'envoyer lorsque vous avez terminé</2>.",tapScreenShareButton:"Appuyez sur <1>Enregistrer écran</1> pour démarrer un enregistrement.",tapStopScreenShareButton:"Lorsque vous avez terminé, appuyez sur <1>Stop enregistrement</1>.",reviewAndSendScreenShare:"Vous pouvez revoir votre vidéo, puis <1>l'envoyer lorsque vous avez terminé.</1>",screenShareInstruction:"Sélectionnez l'écran ou la fenêtre que vous souhaitez enregistrer.",privacyPolicy:"En poursuivant, vous acceptez notre <1>Politique de confidentialité</1>."},switchToMobileTitle:"Passez sur votre mobile",switchToMobileDescription:"Profitez d'une expérience encore plus pratique en utilisant votre téléphone pour prendre des photos et enregistrer des vidéos.",useDesktopVersion:"Continuer",scanQRCode:"Scannez ce code QR avec un appareil compatible.",startScreenShareButton:"Enregistrer écran",stopScreenShareButton:"Stop enregistrement",screenTitle:"Prêt à capturer votre écran ?"}}},it:{name:"Italiano",translation:{header:{free:"Versione gratuita"},loader:{connection:"Connessione..."},notifications:{screensharingError:"Si è verificato un errore durante l'attivazione della condivisione dello schermo",microphoneError:"Si è verificato un errore durante l'attivazione del microfono",cameraError:"Si è verificato un errore durante l'attivazione della fotocamera",cameraRotateError:"Si è verificato un errore durante la rotazione della fotocamera",noCamera:"Nessuna fotocamera disponibile",blockedMicrophonePopupTitle:"La tua fotocamera e il tuo microfono sono bloccati",blockedMicrophonePopup:"SnapCall ha bisogno di accedere alla fotocamera e al microfono. Fare clic sull'icona della fotocamera bloccata nella barra degli indirizzi del browser.",reload:"Ricaricare",criticalError:"Si è verificato un errore critico (errore {{code}}).",agentJoinError:"Si è verificato un errore cercando di entrare nella conversazione come agente",close:"Chiudere",connectedTo:"Connesso a {{name}}",recording:"Registrazione in corso"},recordingPopup:{recordingStartTitle:"Registrazione in procinto di iniziare.",recordingStartText:"Questa chiamata verrà registrata a breve. Se preferisci non essere registrato, sei libero di lasciare la chiamata in questo momento.",dismiss:"Chiudi"},endView:{goBack:"Torna alla chiamata",tooLate:"Sei arrivato troppo tardi",callIsOver:"Questa chiamata è finita o è stata eliminata",callEnded:"Questa chiamata è finita",callLeft:"Hai lasciato la chiamata",full:"Impossibile partecipare alla chiamata",fullDescription:"Limite d'uso attenente."},menu:{title:"Menù",new:"NUOVO",openNewTab:"Apri una nuova scheda",quickConnect:"Connessione Rapida",pictureInPicture:"Immagine nell'immagine",screenSharing:"Condivisione dello schermo",stopRecord:"Interrompere la registrazione",startRecord:"Registra chiamata"},blockedFeature:{titleConnected:"L'aggiornamento a Pro",titleGuest:"Funzione non disponibile",descriptionConnected:"Su un piano gratuito, non puoi utilizzare questa funzione. Aggiorna il tuo piano per usufruire di tutte le funzionalità in chiamata.",descriptionGuest:"Stai partecipando a una chiamata creata con una versione gratuita di SnapCall. Questa funzione è disponibile solo con una versione Pro.",dismissGuest:"Okay",dismissConnected:"L'aggiornamento a Pro"},copyLink:{title:"Copia il link",description:"Copia il link negli appunti",error:"Si è verificato un errore durante la copia negli Appunti",copied:"Link copiato negli Appunti"},quickConnect:{title:"Connessione Rapida",scanTitle:"Scansiona il codice QR",scan:"Scansiona questo codice QR con il telefono per aprire la chiamata."},settings:{title:"Impostazioni",preferences:"Preferenze",language:"Linguaggio",devices:"Dispositivi",help:"Aiuto",helpCenter:"Accedi all'Assistenza"},audioMenu:{title:"Audio",blockedMicrophone:"Il tuo microfono è bloccato.",microphonePermissions:"Si prega di accettare la condivisione del microfono prima di accedere a queste opzioni."},videoMenu:{title:"Video",lowDef:"Definizione bassa (240p)",standardDef:"Definizione standard (480p)",highDef:"Alta definizione (720p)",blockedCamera:"La fotocamera è bloccata.",cameraPermissions:"Si prega di accettare la condivisione della fotocamera prima di accedere a queste opzioni.",sendResolution:"Risoluzione inviata (max)"},shareLink:{title:"Condividi un link",title2:"Condividi un link",invalid:"Collegamento non valido",sentToUsers:"Link inviato ai partecipanti",sentToUser:"Link inviato a {{user}}",failed:"Si è verificato un errore durante l'invio del link",poweredBy:"Proposto da",invoice:"{{User}} ti ha inviato una fattura.",pay:"Paga"},youtube:{title:"Vedere Assieme",url:"URL YOUTUBE",invalid:"URL YouTube non valido",share:"Guarda ora"},sharedHistory:{shared:"Condiviso con te"},snapshot:{title:"Schermata",shared:"Schermata inviata",sentToUsers:"Schermanta inviata ai partecipanti",sentToUser:"Schermata inviata a {{user}}",save:"Salva l'immagine",error:"Si è verificato un errore durante l'invio della schermata"},gdpr:{recordedWarning:"Per migliorare la qualità del nostro servizio, questa chiamata verrà registrata."},requestDevice:{requestInput:"Richiesta di attivazione",request:"{{user}} vorrebbe condividere il tuo {{device}}",timedOut:"La tua richiesta non ha ricevuto risposta",declined:"La tua richiesta è stata rifiutata.",userDeclined:"{{user}} ha rifiutato la tua richiesta"},leave:{title:"Lasciare",leaveCall:"Lascia la chiamata",endCall:"Termina la chiamata per tutti"},virtualBackground:{title:"Sfondo virtuale",setBackground:"Imposta sfondo"},virtualbackground:{title:"Virtual Background",setBackground:"Set Background"},misc:{someone:"Qualcuno",camera:"Telecamera",microphone:"Microfono",photo:"Foto",video:"Video",screen:"Schermo",speaker:"Altoparlante",user:"Utente",open:"Aprire",from:"Da",accept:"Accettare",decline:"Declinare",you:"Voi",cancel:"Annulla",confirm:"Confermare",remove:"Rimuovere"},greeting:{mainTitle:"Benvenuto a SnapCall",sideTitle:"Sei pronto per unirti?",sideDescription:"Prima di entrare nella stanza, inserisci il tuo nome. Verrà visualizzato ai partecipanti.",namePlaceholder:"Il tuo nome",nameSubmit:"Partecipa alla conversazione",footerTitle:"Offerto da SnapCall",footerDescription:"Incontrare SnapCall, il modo più semplice per aggiungere video in tempo reale a piattaforma, prodotto o servizio."},recorder:{limit:"Registrazione video limitata a 5 min.",submissionTitle:"Grazie per il tuo invio!",submissionDescription:"La tua foto/video è stata inviata con successo. La esamineremo e ti risponderemo al più presto.",confirmRemovalTitle:"Conferma rimozione",confirmRemovalDescription:"Sei sicuro di voler rimuovere questa foto/video? Questa azione non può essere annullata.",elementBeingProcessed:"Attendi un momento mentre il tuo {{ type }} viene elaborato...",waitVideo:"Potrebbero essere necessari fino a 15 secondi affinché un video sia pronto.",elementCaptureSuccess:"{{ type }} catturato con successo",takeNewElement:"Cattura un nuovo {{ type }}",sendElement:"Invia {{ type }}",sendElements:"Invia {{ count }} elementi",allowAccess:"Consenti accesso",okay:"Okay",allowCamMicAccess:"Consenti accesso a fotocamera e microfono",allowScreenShareAccess:"Consenti accesso alla condivisione dello schermo",permissionDeniedTitle:"Qualcosa è andato storto!",permissionDeniedDescription:"Senza l'accesso alla fotocamera e al microfono, non è possibile scattare foto o registrare video da condividere con il team di supporto. Si prega di concedere l'accesso nelle impostazioni del browser.",photoInstructionsTitle:"Pronto a scattare una foto?",videoInstructionsTitle:"Pronto a registrare un video?",screenShareInstructionsTitle:"Pronto a condividere il tuo schermo?",instructions:{allowAccessOnPrompt:"Quando richiesto, <1>consenti l'accesso</1> a fotocamera e microfono.",tapPhotoButton:"Tocca il pulsante <1 /><2>Fotocamera</2> per scattare una foto.",multiplePhotos:"Non esitare a scattare più foto per maggiori dettagli.",reviewAndSendPhotos:"Puoi rivedere la tua foto e poi <1>inviarla quando hai finito.</1>",tapVideoButton:"Tocca il pulsante <1 /><2>Registra</2> per avviare una registrazione.",videoSpeech:"Puoi <1>parlare durante</1> la registrazione per aggiungere dettagli.",tapStopVideoButton:"Quando hai finito, tocca il pulsante <1 /><2>Ferma</2>.",reviewAndSendVideos:"Puoi rivedere il tuo video e poi <1>inviarlo quando hai finito</1>.",tapScreenShareButton:"Tocca <1>Registra il mio schermo</1> per avviare una registrazione.",tapStopScreenShareButton:"Quando hai finito, tocca <1>Ferma registrazione</1>.",reviewAndSendScreenShare:"Puoi rivedere il tuo video e poi <1>inviarlo quando hai finito.</1>",screenShareInstruction:"Seleziona lo schermo o la finestra che desideri registrare.",privacyPolicy:"Procedendo, l'utente accetta la nostra <1>Privacy Policy</1>."},switchToMobileTitle:"Passa al tuo dispositivo mobile",switchToMobileDescription:"Goditi un'esperienza ancora più pratica utilizzando il tuo telefono per scattare foto e registrare video.",useDesktopVersion:"Usa la versione desktop",scanQRCode:"Scansiona questo codice QR con un dispositivo compatibile.",startScreenShareButton:"Registra il mio schermo",stopScreenShareButton:"Ferma registrazione",screenTitle:"Pronto a catturare il tuo schermo?"}}}};ni.use(bi).init({lng:wi(),fallbackLng:"en",resources:xi,interpolation:{escapeValue:!1}});var Si=ni,_i=(je=o("85Hg2"),{}),ki={};(ki=function(e){if(Array.isArray(e))return e}).__esModule=!0,ki.default=ki;var Ci={};(Ci=function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==r.return||r.return()}finally{if(s)throw i}}return o}}).__esModule=!0,Ci.default=Ci;var Ei={},Pi={};(Pi=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}).__esModule=!0,Pi.default=Pi,(Ei=function(e,t){if(e){if("string"==typeof e)return Pi(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Pi(e,t):void 0}}).__esModule=!0,Ei.default=Ei;var Ri={};(Ri=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}).__esModule=!0,Ri.default=Ri,(_i=function(e,t){return ki(e)||Ci(e,t)||Ei(e,t)||Ri()}).__esModule=!0,_i.default=_i;je=o("85Hg2");function Ti(){if(console&&console.warn){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];"string"==typeof r[0]&&(r[0]="react-i18next:: ".concat(r[0])),(e=console).warn.apply(e,r)}}var ji={};function Oi(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];"string"==typeof t[0]&&ji[t[0]]||("string"==typeof t[0]&&(ji[t[0]]=new Date),Ti.apply(void 0,t))}function Mi(e,t,r){e.loadNamespaces(t,(function(){if(e.isInitialized)r();else{e.on("initialized",(function t(){setTimeout((function(){e.off("initialized",t)}),0),r()}))}}))}function Li(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=t.languages[0],i=!!t.options&&t.options.fallbackLng,o=t.languages[t.languages.length-1];if("cimode"===n.toLowerCase())return!0;var a=function(e,r){var n=t.services.backendConnector.state["".concat(e,"|").concat(r)];return-1===n||2===n};return!(r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!a(t.isLanguageChangingTo,e))&&(!!t.hasResourceBundle(n,e)||(!(t.services.backendConnector.backend&&(!t.options.resources||t.options.partialBundledLanguages))||!(!a(n,e)||i&&!a(o,e))))}function Di(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!t.languages||!t.languages.length)return Oi("i18n.languages were undefined or empty",t.languages),!0;var n=void 0!==t.options.ignoreJSONStructure;return n?t.hasLoadedNamespace(e,{precheck:function(t,n){if(r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!n(t.isLanguageChangingTo,e))return!1}}):Li(e,t,r)}function Ii(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ai(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ii(Object(n),!0).forEach((function(t){r(si)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ii(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ni=function(e,t){var r=(0,je.useRef)();return(0,je.useEffect)((function(){r.current=t?r.current:e}),[e,t]),r.current};function Fi(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.i18n,i=(0,je.useContext)(mi)||{},o=i.i18n,a=i.defaultNS,s=n||o||yi();if(s&&!s.reportNamespaces&&(s.reportNamespaces=new vi),!s){Oi("You will need to pass in an i18next instance by using initReactI18next");var c=function(e){return Array.isArray(e)?e[e.length-1]:e},l=[c,{},!1];return l.t=c,l.i18n={},l.ready=!1,l}s.options.react&&void 0!==s.options.react.wait&&Oi("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var d=Ai(Ai(Ai({},gi()),s.options.react),t),u=d.useSuspense,p=d.keyPrefix,h=e||a||s.options&&s.options.defaultNS;h="string"==typeof h?[h]:h||["translation"],s.reportNamespaces.addUsedNamespaces&&s.reportNamespaces.addUsedNamespaces(h);var f=(s.isInitialized||s.initializedStoreOnce)&&h.every((function(e){return Di(e,s,d)}));function m(){return s.getFixedT(null,"fallback"===d.nsMode?h:h[0],p)}var g=(0,je.useState)(m),v=r(_i)(g,2),y=v[0],b=v[1],w=h.join(),x=Ni(w),S=(0,je.useRef)(!0);(0,je.useEffect)((function(){var e=d.bindI18n,t=d.bindI18nStore;function r(){S.current&&b(m)}return S.current=!0,f||u||Mi(s,h,(function(){S.current&&b(m)})),f&&x&&x!==w&&S.current&&b(m),e&&s&&s.on(e,r),t&&s&&s.store.on(t,r),function(){S.current=!1,e&&s&&e.split(" ").forEach((function(e){return s.off(e,r)})),t&&s&&t.split(" ").forEach((function(e){return s.store.off(e,r)}))}}),[s,w]);var _=(0,je.useRef)(!0);(0,je.useEffect)((function(){S.current&&!_.current&&b(m),_.current=!1}),[s,p]);var k=[y,s,f];if(k.t=y,k.i18n=s,k.ready=f,f)return k;if(!f&&!u)return k;throw new Promise((function(e){Mi(s,h,(function(){e()}))}))}var zi=o("4Fy4N");var Bi={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Ui;const Vi=new Uint8Array(16);function Hi(){if(!Ui&&(Ui="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ui))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ui(Vi)}const qi=[];for(let e=0;e<256;++e)qi.push((e+256).toString(16).slice(1));function Wi(e,t=0){return(qi[e[t+0]]+qi[e[t+1]]+qi[e[t+2]]+qi[e[t+3]]+"-"+qi[e[t+4]]+qi[e[t+5]]+"-"+qi[e[t+6]]+qi[e[t+7]]+"-"+qi[e[t+8]]+qi[e[t+9]]+"-"+qi[e[t+10]]+qi[e[t+11]]+qi[e[t+12]]+qi[e[t+13]]+qi[e[t+14]]+qi[e[t+15]]).toLowerCase()}var $i,Ki,Gi,Zi=function(e,t,r){if(Bi.randomUUID&&!t&&!e)return Bi.randomUUID();const n=(e=e||{}).random||(e.rng||Hi)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=n[e];return t}return Wi(n)},Qi=JSON.parse('{"name":"protoo-client","version":"4.0.6","description":"protoo JavaScript client module","author":"Iñaki Baz Castillo <ibc@aliax.net>","homepage":"https://protoo.versatica.com","license":"MIT","repository":{"type":"git","url":"https://github.com/ibc/protoo.git"},"main":"lib/index.js","keywords":["nodejs","browser","websocket"],"engines":{"node":">=8.0.0"},"scripts":{"lint":"eslint -c .eslintrc.js lib"},"dependencies":{"debug":"^4.3.1","events":"^3.2.0","retry":"^0.12.0"},"devDependencies":{"eslint":"^5.16.0"},"optionalDependencies":{"websocket":"^1.0.33"}}').version,Yi={},Ji=o("hZG0u");const Xi="protoo-client";Yi=class{constructor(e){e?(this._debug=Ji(`${Xi}:${e}`),this._warn=Ji(`${Xi}:WARN:${e}`),this._error=Ji(`${Xi}:ERROR:${e}`)):(this._debug=Ji(Xi),this._warn=Ji(`${Xi}:WARN`),this._error=Ji(`${Xi}:ERROR`)),this._debug.log=console.info.bind(console),this._warn.log=console.warn.bind(console),this._error.log=console.error.bind(console)}get debug(){return this._debug}get warn(){return this._warn}get error(){return this._error}};var eo,to=o("3oV8N").EventEmitter;eo=class extends to{constructor(e){super(),this.setMaxListeners(1/0),this._logger=e||new Yi("EnhancedEventEmitter")}safeEmit(e,...t){try{this.emit(e,...t)}catch(t){this._logger.error("safeEmit() | event listener threw an error [event:%s]:%o",e,t)}}async safeEmitAsPromise(e,...t){return new Promise(((r,n)=>{this.safeEmit(e,...t,r,n)}))}};var ro={},no=function(){return Math.round(1e7*Math.random())};const io=new Yi("Message");ro=class{static parse(e){let t;const r={};try{t=JSON.parse(e)}catch(e){return void io.error("parse() | invalid JSON: %s",e)}if("object"==typeof t&&!Array.isArray(t)){if(t.request){if(r.request=!0,"string"!=typeof t.method)return void io.error("parse() | missing/invalid method field");if("number"!=typeof t.id)return void io.error("parse() | missing/invalid id field");r.id=t.id,r.method=t.method,r.data=t.data||{}}else if(t.response){if(r.response=!0,"number"!=typeof t.id)return void io.error("parse() | missing/invalid id field");r.id=t.id,t.ok?(r.ok=!0,r.data=t.data||{}):(r.ok=!1,r.errorCode=t.errorCode,r.errorReason=t.errorReason)}else{if(!t.notification)return void io.error("parse() | missing request/response field");if(r.notification=!0,"string"!=typeof t.method)return void io.error("parse() | missing/invalid method field");r.method=t.method,r.data=t.data||{}}return r}io.error("parse() | not an object")}static createRequest(e,t){return{request:!0,id:no(),method:e,data:t||{}}}static createSuccessResponse(e,t){return{response:!0,id:e.id,ok:!0,data:t||{}}}static createErrorResponse(e,t,r){return{response:!0,id:e.id,ok:!1,errorCode:t,errorReason:r}}static createNotification(e,t){return{notification:!0,method:e,data:t||{}}}};const oo=new Yi("Peer");Gi=class extends eo{constructor(e){super(oo),oo.debug("constructor()"),this._closed=!1,this._transport=e,this._connected=!1,this._data={},this._sents=new Map,this._handleTransport()}get closed(){return this._closed}get connected(){return this._connected}get data(){return this._data}set data(e){throw new Error("cannot override data object")}close(){if(!this._closed){oo.debug("close()"),this._closed=!0,this._connected=!1,this._transport.close();for(const e of this._sents.values())e.close();this.safeEmit("close")}}async request(e,t){const r=ro.createRequest(e,t);return this._logger.debug("request() [method:%s, id:%s]",e,r.id),await this._transport.send(r),new Promise(((e,t)=>{const n=1500*(15+.1*this._sents.size),i={id:r.id,method:r.method,resolve:t=>{this._sents.delete(r.id)&&(clearTimeout(i.timer),e(t))},reject:e=>{this._sents.delete(r.id)&&(clearTimeout(i.timer),t(e))},timer:setTimeout((()=>{this._sents.delete(r.id)&&t(new Error("request timeout"))}),n),close:()=>{clearTimeout(i.timer),t(new Error("peer closed"))}};this._sents.set(r.id,i)}))}async notify(e,t){const r=ro.createNotification(e,t);this._logger.debug("notify() [method:%s]",e),await this._transport.send(r)}_handleTransport(){if(this._transport.closed)return this._closed=!0,void setTimeout((()=>{this._closed||(this._connected=!1,this.safeEmit("close"))}));this._transport.on("open",(()=>{this._closed||(oo.debug('emit "open"'),this._connected=!0,this.safeEmit("open"))})),this._transport.on("disconnected",(()=>{this._closed||(oo.debug('emit "disconnected"'),this._connected=!1,this.safeEmit("disconnected"))})),this._transport.on("failed",(e=>{this._closed||(oo.debug('emit "failed" [currentAttempt:%s]',e),this._connected=!1,this.safeEmit("failed",e))})),this._transport.on("close",(()=>{this._closed||(this._closed=!0,oo.debug('emit "close"'),this._connected=!1,this.safeEmit("close"))})),this._transport.on("message",(e=>{e.request?this._handleRequest(e):e.response?this._handleResponse(e):e.notification&&this._handleNotification(e)}))}_handleRequest(e){try{this.emit("request",e,(t=>{const r=ro.createSuccessResponse(e,t);this._transport.send(r).catch((()=>{}))}),((t,r)=>{t instanceof Error?(r=t.message,t=500):"number"==typeof t&&r instanceof Error&&(r=r.message);const n=ro.createErrorResponse(e,t,r);this._transport.send(n).catch((()=>{}))}))}catch(t){const r=ro.createErrorResponse(e,500,String(t));this._transport.send(r).catch((()=>{}))}}_handleResponse(e){const t=this._sents.get(e.id);if(t)if(e.ok)t.resolve(e.data);else{const r=new Error(e.errorReason);r.code=e.errorCode,t.reject(r)}else oo.error("received response does not match any sent request [id:%s]",e.id)}_handleNotification(e){this.safeEmit("notification",e)}};var ao;if("object"==typeof globalThis)ao=globalThis;else try{ao=o("jCEG4")}catch(e){}finally{if(ao||"undefined"==typeof window||(ao=window),!ao)throw new Error("Could not determine global this")}var so,co=ao.WebSocket||ao.MozWebSocket;function lo(e,t){return t?new co(e,t):new co(e)}so=o("kUMHr").version,co&&["CONNECTING","OPEN","CLOSING","CLOSED"].forEach((function(e){Object.defineProperty(lo,e,{get:function(){return co[e]}})}));var uo={w3cwebsocket:co?lo:null,version:so}.w3cwebsocket,po={};po=o("jxXWz");const ho={retries:10,factor:2,minTimeout:1e3,maxTimeout:8e3},fo=new Yi("WebSocketTransport");$i=Gi,Ki=class extends eo{constructor(e,t){super(fo),fo.debug("constructor() [url:%s, options:%o]",e,t),this._closed=!1,this._url=e,this._options=t||{},this._ws=null,this._runWebSocket()}get closed(){return this._closed}close(){if(!this._closed){fo.debug("close()"),this._closed=!0,this.safeEmit("close");try{this._ws.onopen=null,this._ws.onclose=null,this._ws.onerror=null,this._ws.onmessage=null,this._ws.close()}catch(e){fo.error("close() | error closing the WebSocket: %o",e)}}}async send(e){if(this._closed)throw new Error("transport closed");try{this._ws.send(JSON.stringify(e))}catch(e){throw fo.warn("send() failed:%o",e),e}}_runWebSocket(){const e=po.operation(this._options.retry||ho);let t=!1;e.attempt((r=>{this._closed?e.stop():(fo.debug("_runWebSocket() [currentAttempt:%s]",r),this._ws=new uo(this._url,"protoo",this._options.origin,this._options.headers,this._options.requestOptions,this._options.clientConfig),this._ws.onopen=()=>{this._closed||(t=!0,this.safeEmit("open"))},this._ws.onclose=n=>{if(!this._closed){if(fo.warn('WebSocket "close" event [wasClean:%s, code:%s, reason:"%s"]',n.wasClean,n.code,n.reason),4e3!==n.code){if(t){if(e.stop(),this.safeEmit("disconnected"),this._closed)return;return void this._runWebSocket()}if(this.safeEmit("failed",r),this._closed)return;if(e.retry(!0))return}this._closed=!0,this.safeEmit("close")}},this._ws.onerror=()=>{this._closed||fo.error('WebSocket "error" event')},this._ws.onmessage=e=>{if(this._closed)return;const t=ro.parse(e.data);t&&(0!==this.listenerCount("message")?this.safeEmit("message",t):fo.error('no listeners for WebSocket "message" event, ignoring received message'))})}))}};var mo=(0,(xo=o("bWPEY")).getGlobalObject)(),go=["debug","info","warn","error","log","assert","trace"];function vo(e){var t=(0,xo.getGlobalObject)();if(!("console"in t))return e();var r=t.console,n={};go.forEach((e=>{var i=r[e]&&r[e].__sentry_original__;e in t.console&&i&&(n[e]=r[e],r[e]=i)}));try{return e()}finally{Object.keys(n).forEach((e=>{r[e]=n[e]}))}}function yo(){let e=!1;var t={enable:()=>{e=!0},disable:()=>{e=!1}};return"undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?go.forEach((r=>{t[r]=(...t)=>{e&&vo((()=>{mo.console[r](`Sentry Logger [${r}]:`,...t)}))}})):go.forEach((e=>{t[e]=()=>{}})),t}let bo;bo="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?(0,xo.getGlobalSingleton)("logger",yo):yo();var wo=o("gTODe"),xo=o("bWPEY"),So=o("hLvaX"),_o=(xo=o("bWPEY"),xo=o("bWPEY"),Object.prototype.toString);function ko(e,t){return _o.call(e)===`[object ${t}]`}function Co(e){return ko(e,"Object")}function Eo(e){return Boolean(e&&e.then&&"function"==typeof e.then)}function Po(e){return Ro(e,new Map)}function Ro(e,t){if(Co(e)){if(void 0!==(i=t.get(e)))return i;var r={};for(var n of(t.set(e,r),Object.keys(e)))void 0!==e[n]&&(r[n]=Ro(e[n],t));return r}if(Array.isArray(e)){var i;if(void 0!==(i=t.get(e)))return i;r=[];return t.set(e,r),e.forEach((e=>{r.push(Ro(e,t))})),r}return e}function To(){var e=(0,xo.getGlobalObject)(),t=e.crypto||e.msCrypto;if(void 0!==t&&t.getRandomValues){var r=new Uint16Array(8);t.getRandomValues(r),r[3]=4095&r[3]|16384,r[4]=16383&r[4]|32768;var n=e=>{let t=e.toString(16);for(;t.length<4;)t=`0${t}`;return t};return n(r[0])+n(r[1])+n(r[2])+n(r[3])+n(r[4])+n(r[5])+n(r[6])+n(r[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,(e=>{var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}var jo;o("gTODe"),xo=o("bWPEY");!function(e){e[e.PENDING=0]="PENDING";e[e.RESOLVED=1]="RESOLVED";e[e.REJECTED=2]="REJECTED"}(jo||(jo={}));class Oo{__init(){this._state=jo.PENDING}__init2(){this._handlers=[]}constructor(e){Oo.prototype.__init.call(this),Oo.prototype.__init2.call(this),Oo.prototype.__init3.call(this),Oo.prototype.__init4.call(this),Oo.prototype.__init5.call(this),Oo.prototype.__init6.call(this);try{e(this._resolve,this._reject)}catch(e){this._reject(e)}}then(e,t){return new Oo(((r,n)=>{this._handlers.push([!1,t=>{if(e)try{r(e(t))}catch(e){n(e)}else r(t)},e=>{if(t)try{r(t(e))}catch(e){n(e)}else n(e)}]),this._executeHandlers()}))}catch(e){return this.then((e=>e),e)}finally(e){return new Oo(((t,r)=>{let n,i;return this.then((t=>{i=!1,n=t,e&&e()}),(t=>{i=!0,n=t,e&&e()})).then((()=>{i?r(n):t(n)}))}))}__init3(){this._resolve=e=>{this._setResult(jo.RESOLVED,e)}}__init4(){this._reject=e=>{this._setResult(jo.REJECTED,e)}}__init5(){this._setResult=(e,t)=>{this._state===jo.PENDING&&(Eo(t)?t.then(this._resolve,this._reject):(this._state=e,this._value=t,this._executeHandlers()))}}__init6(){this._executeHandlers=()=>{if(this._state!==jo.PENDING){var e=this._handlers.slice();this._handlers=[],e.forEach((e=>{e[0]||(this._state===jo.RESOLVED&&e[1](this._value),this._state===jo.REJECTED&&e[2](this._value),e[0]=!0)}))}}}}wo=o("gTODe");function Mo(e){var t=(0,wo.timestampInSeconds)(),r={sid:To(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(e){return Po({sid:`${e.sid}`,init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"==typeof e.did||"string"==typeof e.did?`${e.did}`:void 0,duration:e.duration,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}(r)};return e&&Lo(r,e),r}function Lo(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),e.did||t.did||(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||(0,wo.timestampInSeconds)(),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:To()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{var r=e.timestamp-e.started;e.duration=r>=0?r:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}function Do(e,t){let r={};t?r={status:t}:"ok"===e.status&&(r={status:"exited"}),Lo(e,r)}class Io{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={}}static clone(e){var t=new Io;return e&&(t._breadcrumbs=[...e._breadcrumbs],t._tags={...e._tags},t._extra={...e._extra},t._contexts={...e._contexts},t._user=e._user,t._level=e._level,t._span=e._span,t._session=e._session,t._transactionName=e._transactionName,t._fingerprint=e._fingerprint,t._eventProcessors=[...e._eventProcessors],t._requestSession=e._requestSession,t._attachments=[...e._attachments]),t}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{},this._session&&Lo(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts={...this._contexts,[e]:t},this._notifyScopeListeners(),this}setSpan(e){return this._span=e,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){var e=this.getSpan();return e&&e.transaction}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;if("function"==typeof e){var t=e(this);return t instanceof Io?t:this}return e instanceof Io?(this._tags={...this._tags,...e._tags},this._extra={...this._extra,...e._extra},this._contexts={...this._contexts,...e._contexts},e._user&&Object.keys(e._user).length&&(this._user=e._user),e._level&&(this._level=e._level),e._fingerprint&&(this._fingerprint=e._fingerprint),e._requestSession&&(this._requestSession=e._requestSession)):Co(e)&&(this._tags={...this._tags,...e.tags},this._extra={...this._extra,...e.extra},this._contexts={...this._contexts,...e.contexts},e.user&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint&&(this._fingerprint=e.fingerprint),e.requestSession&&(this._requestSession=e.requestSession)),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this}addBreadcrumb(e,t){var r="number"==typeof t?Math.min(t,100):100;if(r<=0)return this;var n={timestamp:(0,wo.dateTimestampInSeconds)(),...e};return this._breadcrumbs=[...this._breadcrumbs,n].slice(-r),this._notifyScopeListeners(),this}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(e,t={}){if(this._extra&&Object.keys(this._extra).length&&(e.extra={...this._extra,...e.extra}),this._tags&&Object.keys(this._tags).length&&(e.tags={...this._tags,...e.tags}),this._user&&Object.keys(this._user).length&&(e.user={...this._user,...e.user}),this._contexts&&Object.keys(this._contexts).length&&(e.contexts={...this._contexts,...e.contexts}),this._level&&(e.level=this._level),this._transactionName&&(e.transaction=this._transactionName),this._span){e.contexts={trace:this._span.getTraceContext(),...e.contexts};var r=this._span.transaction&&this._span.transaction.name;r&&(e.tags={transaction:r,...e.tags})}return this._applyFingerprint(e),e.breadcrumbs=[...e.breadcrumbs||[],...this._breadcrumbs],e.breadcrumbs=e.breadcrumbs.length>0?e.breadcrumbs:void 0,e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...this._sdkProcessingMetadata},this._notifyEventProcessors([...Ao(),...this._eventProcessors],e,t)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}_notifyEventProcessors(e,t,r,n=0){return new Oo(((i,o)=>{var a=e[n];if(null===t||"function"!=typeof a)i(t);else{var s=a({...t},r);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.id&&null===s&&bo.log(`Event processor "${a.id}" dropped event`),Eo(s)?s.then((t=>this._notifyEventProcessors(e,t,r,n+1).then(i))).then(null,o):this._notifyEventProcessors(e,s,r,n+1).then(i).then(null,o)}}))}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((e=>{e(this)})),this._notifyingListeners=!1)}_applyFingerprint(e){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],this._fingerprint&&(e.fingerprint=e.fingerprint.concat(this._fingerprint)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}}function Ao(){return(0,xo.getGlobalSingleton)("globalEventProcessors",(()=>[]))}var No=100;class Fo{__init(){this._stack=[{}]}constructor(e,t=new Io,r=4){this._version=r,Fo.prototype.__init.call(this),this.getStackTop().scope=t,e&&this.bindClient(e)}isOlderThan(e){return this._version<e}bindClient(e){this.getStackTop().client=e,e&&e.setupIntegrations&&e.setupIntegrations()}pushScope(){var e=Io.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:e}),e}popScope(){return!(this.getStack().length<=1)&&!!this.getStack().pop()}withScope(e){var t=this.pushScope();try{e(t)}finally{this.popScope()}}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(e,t){var r=this._lastEventId=t&&t.event_id?t.event_id:To(),n=new Error("Sentry syntheticException");return this._withClient(((i,o)=>{i.captureException(e,{originalException:e,syntheticException:n,...t,event_id:r},o)})),r}captureMessage(e,t,r){var n=this._lastEventId=r&&r.event_id?r.event_id:To(),i=new Error(e);return this._withClient(((o,a)=>{o.captureMessage(e,t,{originalException:e,syntheticException:i,...r,event_id:n},a)})),n}captureEvent(e,t){var r=t&&t.event_id?t.event_id:To();return"transaction"!==e.type&&(this._lastEventId=r),this._withClient(((n,i)=>{n.captureEvent(e,{...t,event_id:r},i)})),r}lastEventId(){return this._lastEventId}addBreadcrumb(e,t){const{scope:r,client:n}=this.getStackTop();if(!r||!n)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:o=No}=n.getOptions&&n.getOptions()||{};if(!(o<=0)){var a={timestamp:(0,wo.dateTimestampInSeconds)(),...e},s=i?vo((()=>i(a,t))):a;null!==s&&r.addBreadcrumb(s,o)}}setUser(e){var t=this.getScope();t&&t.setUser(e)}setTags(e){var t=this.getScope();t&&t.setTags(e)}setExtras(e){var t=this.getScope();t&&t.setExtras(e)}setTag(e,t){var r=this.getScope();r&&r.setTag(e,t)}setExtra(e,t){var r=this.getScope();r&&r.setExtra(e,t)}setContext(e,t){var r=this.getScope();r&&r.setContext(e,t)}configureScope(e){const{scope:t,client:r}=this.getStackTop();t&&r&&e(t)}run(e){var t=Bo(this);try{e(this)}finally{Bo(t)}}getIntegration(e){var t=this.getClient();if(!t)return null;try{return t.getIntegration(e)}catch(t){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&bo.warn(`Cannot retrieve integration ${e.id} from the current Hub`),null}}startTransaction(e,t){return this._callExtensionMethod("startTransaction",e,t)}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(e=!1){if(e)return this.endSession();this._sendSessionUpdate()}endSession(){var e=this.getStackTop(),t=e&&e.scope,r=t&&t.getSession();r&&Do(r),this._sendSessionUpdate(),t&&t.setSession()}startSession(e){const{scope:t,client:r}=this.getStackTop(),{release:n,environment:i}=r&&r.getOptions()||{};var o=(0,xo.getGlobalObject)();const{userAgent:a}=o.navigator||{};var s=Mo({release:n,environment:i,...t&&{user:t.getUser()},...a&&{userAgent:a},...e});if(t){var c=t.getSession&&t.getSession();c&&"ok"===c.status&&Lo(c,{status:"exited"}),this.endSession(),t.setSession(s)}return s}shouldSendDefaultPii(){var e=this.getClient(),t=e&&e.getOptions();return Boolean(t&&t.sendDefaultPii)}_sendSessionUpdate(){const{scope:e,client:t}=this.getStackTop();if(e){var r=e.getSession();r&&t&&t.captureSession&&t.captureSession(r)}}_withClient(e){const{scope:t,client:r}=this.getStackTop();r&&e(r,t)}_callExtensionMethod(e,...t){var r=zo().__SENTRY__;if(r&&r.extensions&&"function"==typeof r.extensions[e])return r.extensions[e].apply(this,t);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&bo.warn(`Extension method ${e} couldn't be found, doing nothing.`)}}function zo(){var e=(0,xo.getGlobalObject)();return e.__SENTRY__=e.__SENTRY__||{extensions:{},hub:void 0},e}function Bo(e){var t=zo(),r=Ho(t);return qo(t,e),r}function Uo(){var e=zo();return Vo(e)&&!Ho(e).isOlderThan(4)||qo(e,new Fo),(0,So.isNodeEnv)()?function(e){try{var t=zo().__SENTRY__,r=t&&t.extensions&&t.extensions.domain&&t.extensions.domain.active;if(!r)return Ho(e);if(!Vo(r)||Ho(r).isOlderThan(4)){var n=Ho(e).getStackTop();qo(r,new Fo(n.client,Io.clone(n.scope)))}return Ho(r)}catch(t){return Ho(e)}}(e):Ho(e)}function Vo(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function Ho(e){return(0,xo.getGlobalSingleton)("hub",(()=>new Fo),e)}function qo(e,t){return!!e&&((e.__SENTRY__=e.__SENTRY__||{}).hub=t,!0)}function Wo(e,t){return Uo().captureException(e,{captureContext:t})}function $o(e){Uo().addBreadcrumb(e)}const Ko=1,Go=2,Zo=3,Qo=4,Yo=5,Jo={1:"error",2:"warn",3:"info",4:"verbose",5:"debug"};let Xo=Number(2);const ea=new Intl.DateTimeFormat("en-GB",{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",timeZone:"GMT"});class ta{constructor(e,t){this.filename=e,this.customLogLevel=t}print(e,t,r,...n){const i=`[ ${ea.format(new Date)} ][ ${Jo[e]} ][ ${this.filename} - ${r} ]`;e<=(this.customLogLevel||Xo)?t(i,...n):$o({type:"debug",level:Jo[e],category:"console",data:{head:i,arguments:n}})}debug(e,...t){this.print(Yo,console.debug,e,...t)}error(e,...t){this.print(Ko,console.error,e,...t)}info(e,...t){this.print(Zo,console.info,e,...t)}log(e,...t){this.print(Qo,console.log,e,...t)}warn(e,...t){this.print(Go,console.warn,e,...t)}deprecated(...e){console.warn("[ DEPRECATED ]",...e)}static setLogLevel(e){Xo=e}setLogLevel(e){this.customLogLevel=e}}const ra=new ta("AudioLevels.ts"),na=window.AudioContext||window.webkitAudioContext;class ia{speakStartEventTime=0;speakStopEventTime=0;speaking=!1;audioMedianInterval=-1;audioLevelInterval=-1;audioLevels=[];constructor(e,t){this.id=e.id,this.listener=t,this.stream=e,this.audioContext=new na,this.analyser=this.audioContext.createAnalyser(),this.audioStreamSource=this.audioContext.createMediaStreamSource(this.stream),this.analyser.fftSize=32,this.analyser.minDecibels=-90,this.analyser.maxDecibels=-10,this.audioStreamSource.connect(this.analyser)}getAudioLevelMedian(){const{length:e}=this.audioLevels;return this.audioLevels.reduce(((e,t)=>e+t),0)/e}getCurrentAudioLevel(){const{length:e}=this.audioLevels;return e?this.audioLevels[e-1]:0}audioMuteDetection(){0===this.getAudioLevelMedian()&&this.audioLevels.length>0&&this.listener?.onMuteDetection?.(this.id)}detectSpeakingChange(e){e<20&&!this.speakStopEventTime&&(this.speakStartEventTime=0,this.speakStopEventTime=Date.now()),e>=20&&!this.speakStartEventTime&&(this.speakStartEventTime=Date.now(),this.speakStopEventTime=0);const t=this.speakStartEventTime||this.speakStopEventTime,r=Boolean(this.speakStartEventTime);(Date.now()-t>500&&r||Date.now()-t>300&&!r)&&this.speaking!==r&&(this.speaking=r,r?this.listener?.onStartSpeak():this.listener?.onStopSpeak())}computeRMS(e){let t=0;for(let r=0;r<e.length;r++)t+=e[r]*e[r];return t/=e.length,Math.sqrt(t)}getInstantAudioLevel(){const e=new Uint8Array(this.analyser.frequencyBinCount);this.analyser.getByteFrequencyData(e);const t=this.computeRMS(e);return t>0?100*t/255:0}loopCalcul(){const e=this.getInstantAudioLevel();this.audioLevels=this.audioLevels.splice(-59),this.detectSpeakingChange(e),this.audioLevels.push(e),this.listener?.onAudioLevel?.(e,this.id)}analyse(){this.audioLevelInterval=window.setInterval((()=>this.loopCalcul()),1e3/60),this.audioMedianInterval=window.setInterval((()=>this.audioMuteDetection()),2e3)}release(){this.listener=void 0,clearInterval(this.audioLevelInterval),clearInterval(this.audioMedianInterval),this.stream.getTracks().forEach((e=>{this.stream.removeTrack(e)}));try{this.audioStreamSource.disconnect(this.analyser)}catch(e){ra.error("release","audioStreamSource failed to disconnect",e)}this.audioContext.close().catch((e=>{ra.error("release","audioContext failed to close",e)})),this.audioLevels=[]}static isAPIAvailable(){return!!na}}const oa=new ta("AudioRenderer.ts");var aa=class{constructor({consumerId:e}){this.consumerId=e,this.audio=new Audio,this.audio.id=e,this.audio.autoplay=!0,document.body.appendChild(this.audio)}destroy(){this.audio.pause(),this.audio.srcObject=null,document.body.removeChild(this.audio)}setSource(e){this.audio.srcObject=e}async setSink(e){await(this.audio.setSinkId?.(e))}getSink(){return this.audio.sinkId}async play(){await this.audio.play().catch((e=>{oa.warn("play","failed to play"),setTimeout((()=>{this.play()}),1e3)}))}};const sa=(e,t=1)=>new Promise((r=>{const n=e.getContext("2d"),i=new Blob(['<svg width="103" height="36" fill="none" xmlns="http://www.w3.org/2000/svg"><g opacity=".8" fill="#fff"><path d="M10.994 33.06c.903 0 1.658-.734 1.392-1.581a5.249 5.249 0 0 0-1.279-2.124 5.171 5.171 0 0 0-3.673-1.535 5.171 5.171 0 0 0-3.673 1.535c-.595.6-1.03 1.33-1.28 2.124-.265.847.49 1.582 1.393 1.582h7.12ZM10.65 16.2c-.902 0-1.658.735-1.392 1.582.25.794.685 1.524 1.28 2.124a5.171 5.171 0 0 0 3.672 1.535 5.172 5.172 0 0 0 3.674-1.535 5.25 5.25 0 0 0 1.279-2.124c.266-.847-.49-1.582-1.393-1.582h-7.12ZM14.21 31.455c0 .887.75 1.63 1.606 1.35a5.187 5.187 0 0 0 2.067-1.279 5.264 5.264 0 0 0 1.521-3.706c0-1.39-.547-2.723-1.52-3.705a5.187 5.187 0 0 0-2.068-1.278c-.856-.281-1.606.462-1.606 1.349v7.27ZM7.434 17.806c0-.887-.75-1.63-1.607-1.35a5.186 5.186 0 0 0-2.066 1.279 5.264 5.264 0 0 0-1.522 3.706c0 1.39.548 2.723 1.522 3.705a5.186 5.186 0 0 0 2.066 1.278c.857.281 1.607-.462 1.607-1.349v-7.27Z"/><path d="M32.965 31.098c-1.442 0-2.601-.227-3.478-.68-.865-.465-1.517-1.043-1.955-1.734a.416.416 0 0 1-.052-.187c0-.125.057-.227.173-.306l.986-.731a.286.286 0 0 1 .208-.085c.103 0 .201.062.294.187.773 1.224 2.07 1.836 3.893 1.836.796 0 1.471-.142 2.025-.425.565-.284.848-.737.848-1.36 0-.465-.161-.827-.485-1.088-.311-.26-.796-.493-1.453-.697-.6-.181-.975-.289-1.125-.323-.992-.283-1.707-.504-2.146-.663-1.107-.408-1.84-.878-2.198-1.41-.357-.534-.536-1.089-.536-1.667 0-.476.15-.986.45-1.53.311-.555.796-1.025 1.453-1.41.67-.397 1.506-.595 2.51-.595 1.05 0 1.932.13 2.647.39.716.25 1.396.67 2.042 1.258.081.08.121.159.121.238 0 .114-.057.204-.173.272l-1.107.731a.469.469 0 0 1-.225.085c-.104 0-.202-.05-.294-.153-.692-.725-1.644-1.088-2.856-1.088-.692 0-1.228.102-1.609.306-.37.204-.617.431-.744.68-.115.25-.173.47-.173.663 0 .408.162.737.485.986.323.25.801.476 1.436.68.058.023.502.153 1.332.391.52.136 1.056.29 1.61.46 1.21.396 2.019.9 2.422 1.512.416.612.623 1.201.623 1.768 0 .612-.15 1.196-.45 1.75-.288.556-.801 1.02-1.54 1.395-.727.362-1.713.544-2.959.544ZM44.114 21.766c.865 0 1.667.249 2.405.748.739.487 1.108 1.388 1.108 2.702v5.321a.364.364 0 0 1-.104.272c-.058.057-.144.085-.26.085H46.14a.423.423 0 0 1-.277-.085.407.407 0 0 1-.087-.272v-5.032c-.035-.646-.22-1.155-.554-1.53-.323-.373-.744-.56-1.263-.56-.37 0-.738.102-1.107.306-.358.192-.664.492-.918.9-.253.397-.403.896-.45 1.496v4.42a.365.365 0 0 1-.103.272c-.058.057-.145.085-.26.085h-1.125a.423.423 0 0 1-.276-.085.407.407 0 0 1-.087-.272v-8.193c0-.114.029-.199.087-.255a.378.378 0 0 1 .276-.102h1.125c.116 0 .202.034.26.102.069.056.103.141.103.255v.204c0 .079.012.141.035.187a.168.168 0 0 0 .121.05c.092 0 .214-.062.364-.186a4.02 4.02 0 0 1 1.038-.612c.38-.148.738-.221 1.073-.221ZM57.436 28.207c.023.34.081.607.173.8.093.18.289.322.589.424.184.068.277.165.277.29a.396.396 0 0 1-.052.17l-.485.951c-.092.204-.242.278-.45.221-.669-.147-1.13-.47-1.384-.969-.058-.124-.115-.187-.173-.187-.058 0-.121.046-.19.136-.6.714-1.575 1.071-2.925 1.071-.819 0-1.482-.141-1.99-.425-.496-.283-.848-.623-1.056-1.02-.207-.408-.311-.799-.311-1.173 0-.612.19-1.161.571-1.648.392-.488.975-.828 1.748-1.02.53-.125 1.269-.221 2.215-.29.646-.045 1.113-.09 1.401-.135.231-.034.335-.17.312-.408-.058-.51-.23-.918-.52-1.224-.276-.318-.743-.476-1.4-.476-.428 0-.837.09-1.23.272-.38.17-.674.47-.882.9-.104.216-.254.29-.45.222l-1.055-.29c-.185-.056-.277-.152-.277-.288 0-.034.011-.085.034-.153a3.292 3.292 0 0 1 1.367-1.564c.635-.397 1.46-.595 2.475-.595.992 0 1.834.255 2.526.765.693.498 1.062 1.224 1.108 2.176.011.453.017 1.06.017 1.819.012.759.017 1.308.017 1.648Zm-4.326 1.445c.312 0 .652-.073 1.021-.22.38-.148.715-.403 1.004-.766.3-.374.484-.872.554-1.495v-.034c0-.114-.035-.199-.104-.256-.07-.067-.162-.09-.277-.067l-.675.067c-.75.069-1.361.148-1.834.238-.462.08-.86.227-1.194.442a.984.984 0 0 0-.485.884c0 .465.208.782.623.952.416.17.871.255 1.367.255ZM64.486 21.766c1.107 0 1.967.26 2.578.782.611.51 1.027 1.116 1.246 1.819a6.83 6.83 0 0 1 .329 2.073c0 .692-.11 1.389-.329 2.091-.22.692-.635 1.298-1.246 1.82-.611.509-1.47.764-2.578.764-.9 0-1.65-.238-2.25-.714-.08-.08-.161-.119-.242-.119-.116 0-.173.096-.173.29v3.569c0 .113-.035.198-.104.255-.058.068-.144.102-.26.102H60.42a.378.378 0 0 1-.277-.102c-.058-.057-.086-.142-.086-.255V22.344c0-.114.028-.199.086-.255a.378.378 0 0 1 .277-.102h1.038c.116 0 .202.034.26.102.069.056.104.141.104.255 0 .09.011.164.034.22.035.046.075.069.122.069.057 0 .109-.023.155-.068.612-.533 1.396-.8 2.354-.8Zm-.173 7.785c.888 0 1.54-.3 1.955-.9.427-.601.64-1.338.64-2.21 0-.873-.213-1.61-.64-2.21-.415-.601-1.067-.902-1.955-.902-.877 0-1.518.3-1.921.901-.393.59-.589 1.326-.589 2.21 0 .884.197 1.627.589 2.227.403.59 1.044.884 1.92.884ZM76.268 31.097c-1.316 0-2.452-.277-3.41-.833a5.531 5.531 0 0 1-2.163-2.277c-.484-.975-.726-2.08-.726-3.315 0-1.236.242-2.335.727-3.298a5.507 5.507 0 0 1 2.163-2.295c.957-.555 2.094-.833 3.409-.833 1.246 0 2.324.25 3.236.748a5.437 5.437 0 0 1 2.163 2.09c.034.069.052.131.052.188 0 .125-.087.215-.26.272l-1.298.323a.39.39 0 0 1-.12.017c-.151 0-.266-.074-.347-.221-.715-1.156-1.857-1.734-3.426-1.734-.97 0-1.771.221-2.406.663a3.907 3.907 0 0 0-1.401 1.75c-.3.715-.45 1.491-.45 2.33 0 .838.15 1.615.45 2.329.3.713.767 1.291 1.401 1.733.635.442 1.437.663 2.406.663.911 0 1.701-.21 2.37-.628.681-.42 1.165-1.06 1.454-1.921.08-.216.225-.306.433-.272l1.315.17c.196.034.294.124.294.272 0 .022-.012.079-.035.17-.507 1.303-1.246 2.283-2.215 2.94-.957.646-2.163.97-3.616.97ZM91.216 28.207c.023.34.08.607.173.8.092.18.288.322.588.424.185.068.277.165.277.29a.396.396 0 0 1-.052.17l-.484.951c-.093.204-.243.278-.45.221-.67-.147-1.13-.47-1.385-.969-.057-.124-.115-.187-.173-.187-.057 0-.12.046-.19.136-.6.714-1.575 1.071-2.925 1.071-.819 0-1.482-.141-1.99-.425-.496-.283-.848-.623-1.055-1.02-.208-.408-.312-.799-.312-1.173 0-.612.19-1.161.571-1.648.393-.488.975-.828 1.748-1.02.53-.125 1.27-.221 2.215-.29.646-.045 1.113-.09 1.402-.135.23-.034.334-.17.311-.408-.057-.51-.23-.918-.519-1.224-.277-.318-.744-.476-1.401-.476-.427 0-.837.09-1.23.272-.38.17-.674.47-.882.9-.103.216-.254.29-.45.222l-1.055-.29c-.185-.056-.277-.152-.277-.288a.53.53 0 0 1 .034-.153 3.293 3.293 0 0 1 1.368-1.564c.634-.397 1.459-.595 2.474-.595.992 0 1.834.255 2.527.765.692.498 1.06 1.224 1.107 2.176.012.453.017 1.06.017 1.819.012.759.018 1.308.018 1.648Zm-4.326 1.445c.311 0 .651-.073 1.02-.22.381-.148.716-.403 1.004-.766.3-.374.485-.872.554-1.495v-.034c0-.114-.035-.199-.104-.256-.07-.067-.161-.09-.277-.067l-.675.067c-.75.069-1.36.148-1.834.238-.461.08-.86.227-1.194.442a.984.984 0 0 0-.484.884c0 .465.207.782.622.952.416.17.871.255 1.368.255ZM95.687 30.536a.364.364 0 0 1-.104.272c-.058.057-.144.085-.26.085h-1.125a.424.424 0 0 1-.277-.085.407.407 0 0 1-.086-.272V18.79c0-.114.029-.199.086-.255a.378.378 0 0 1 .277-.102h1.125c.116 0 .202.034.26.102.069.056.104.141.104.255v11.746ZM100.033 30.536a.364.364 0 0 1-.104.272c-.057.057-.144.085-.26.085h-1.124a.423.423 0 0 1-.277-.085.407.407 0 0 1-.086-.272V18.79c0-.114.028-.199.086-.255a.378.378 0 0 1 .277-.102h1.125c.115 0 .202.034.26.102.069.056.103.141.103.255v11.746Z" stroke="#fff" stroke-width=".5"/><path d="M43.151 8.686c.296 0 .554-.036.774-.108.22-.076.402-.182.546-.318.148-.14.258-.308.33-.504.072-.2.108-.422.108-.666a1.75 1.75 0 0 0-.108-.63 1.245 1.245 0 0 0-.324-.48 1.41 1.41 0 0 0-.546-.3 2.516 2.516 0 0 0-.78-.108h-1.206v3.114h1.206Zm0-4.362c.58 0 1.082.068 1.506.204.424.136.774.326 1.05.57.276.244.48.536.612.876.136.34.204.712.204 1.116 0 .42-.07.806-.21 1.158-.14.348-.35.648-.63.9s-.632.448-1.056.588c-.42.14-.912.21-1.476.21h-1.206V13h-1.614V4.324h2.82Zm6.819 2.424c.456 0 .87.074 1.242.222a2.692 2.692 0 0 1 1.578 1.626c.144.392.216.83.216 1.314 0 .488-.072.928-.216 1.32-.144.392-.35.726-.618 1.002a2.653 2.653 0 0 1-.96.636 3.333 3.333 0 0 1-1.242.222c-.46 0-.878-.074-1.254-.222a2.712 2.712 0 0 1-.966-.636 2.922 2.922 0 0 1-.618-1.002 3.807 3.807 0 0 1-.216-1.32c0-.484.072-.922.216-1.314.148-.392.354-.724.618-.996.268-.272.59-.482.966-.63a3.397 3.397 0 0 1 1.254-.222Zm0 5.202c.512 0 .89-.172 1.134-.516.248-.344.372-.848.372-1.512s-.124-1.17-.372-1.518c-.244-.348-.622-.522-1.134-.522-.52 0-.906.176-1.158.528-.248.348-.372.852-.372 1.512s.124 1.164.372 1.512c.252.344.638.516 1.158.516Zm12.85-5.106L60.866 13h-1.188c-.136 0-.23-.088-.282-.264L58.29 9.178c-.036-.12-.07-.238-.102-.354a5.729 5.729 0 0 1-.072-.36 6.81 6.81 0 0 1-.084.366c-.028.12-.06.24-.096.36l-1.122 3.546c-.048.176-.154.264-.318.264h-1.14l-1.95-6.156h1.182c.108 0 .2.026.276.078a.363.363 0 0 1 .15.198l.882 3.288c.044.18.082.356.114.528.036.172.066.344.09.516.044-.172.09-.344.138-.516l.162-.528 1.02-3.3a.382.382 0 0 1 .138-.198.429.429 0 0 1 .258-.078h.654c.104 0 .192.026.264.078a.363.363 0 0 1 .15.198l.99 3.3c.052.18.1.358.144.534.048.172.094.344.138.516.052-.34.126-.69.222-1.05l.906-3.288a.405.405 0 0 1 .15-.198.429.429 0 0 1 .258-.078h1.128Zm4.704 2.37c0-.192-.028-.372-.084-.54a1.25 1.25 0 0 0-.24-.45 1.096 1.096 0 0 0-.414-.3 1.358 1.358 0 0 0-.576-.114c-.428 0-.766.122-1.014.366-.244.244-.4.59-.468 1.038h2.796Zm-2.826.894c.024.316.08.59.168.822.088.228.204.418.348.57.144.148.314.26.51.336.2.072.42.108.66.108.24 0 .446-.028.618-.084a2.76 2.76 0 0 0 .456-.186 7.55 7.55 0 0 0 .342-.186.59.59 0 0 1 .288-.084c.124 0 .216.046.276.138l.426.54a2.536 2.536 0 0 1-.552.486 3.281 3.281 0 0 1-1.32.474 4.79 4.79 0 0 1-.666.048 3.33 3.33 0 0 1-1.194-.21 2.726 2.726 0 0 1-.96-.63 2.993 2.993 0 0 1-.642-1.032c-.156-.412-.234-.888-.234-1.428 0-.42.068-.814.204-1.182.136-.372.33-.694.582-.966.256-.276.566-.494.93-.654.368-.16.782-.24 1.242-.24.388 0 .746.062 1.074.186.328.124.61.306.846.546.236.236.42.528.552.876.136.344.204.738.204 1.182 0 .224-.024.376-.072.456-.048.076-.14.114-.276.114h-3.81Zm6.668-2.196c.192-.368.42-.656.684-.864a1.45 1.45 0 0 1 .936-.318c.284 0 .512.062.684.186l-.096 1.11a.294.294 0 0 1-.09.156.239.239 0 0 1-.15.042c-.06 0-.15-.01-.27-.03a2.01 2.01 0 0 0-.342-.03 1.11 1.11 0 0 0-.786.282c-.1.088-.19.196-.27.324a3.44 3.44 0 0 0-.216.438V13h-1.482V6.844h.87c.152 0 .258.028.318.084.06.052.1.148.12.288l.09.696Zm6.87 1.302c0-.192-.029-.372-.085-.54a1.25 1.25 0 0 0-.24-.45 1.096 1.096 0 0 0-.414-.3 1.358 1.358 0 0 0-.576-.114c-.428 0-.766.122-1.014.366-.244.244-.4.59-.468 1.038h2.796Zm-2.827.894c.024.316.08.59.168.822.088.228.204.418.348.57.144.148.314.26.51.336.2.072.42.108.66.108.24 0 .446-.028.618-.084a2.76 2.76 0 0 0 .456-.186 7.55 7.55 0 0 0 .342-.186.59.59 0 0 1 .288-.084c.124 0 .216.046.276.138l.426.54a2.536 2.536 0 0 1-.552.486 3.281 3.281 0 0 1-1.32.474 4.79 4.79 0 0 1-.666.048 3.33 3.33 0 0 1-1.194-.21 2.726 2.726 0 0 1-.96-.63 2.993 2.993 0 0 1-.642-1.032c-.156-.412-.234-.888-.234-1.428 0-.42.068-.814.204-1.182.136-.372.33-.694.582-.966.256-.276.566-.494.93-.654.368-.16.782-.24 1.242-.24.388 0 .746.062 1.074.186.328.124.61.306.846.546.236.236.42.528.552.876.136.344.204.738.204 1.182 0 .224-.024.376-.072.456-.048.076-.14.114-.276.114h-3.81Zm9.134-1.692a1.451 1.451 0 0 0-.552-.432 1.597 1.597 0 0 0-.636-.126c-.224 0-.426.042-.606.126a1.21 1.21 0 0 0-.462.384 1.8 1.8 0 0 0-.294.648c-.068.26-.102.568-.102.924 0 .36.028.666.084.918.06.248.144.452.252.612.108.156.24.27.396.342.156.068.33.102.522.102.308 0 .57-.064.786-.192.216-.128.42-.31.612-.546v-2.76Zm1.482-4.332V13h-.906c-.196 0-.32-.09-.372-.27l-.126-.594a3.09 3.09 0 0 1-.858.69c-.32.176-.694.264-1.122.264-.336 0-.644-.07-.924-.21a2.098 2.098 0 0 1-.726-.606 3.033 3.033 0 0 1-.468-.99 5.072 5.072 0 0 1-.162-1.344c0-.456.062-.88.186-1.272s.302-.732.534-1.02c.232-.288.51-.512.834-.672a2.384 2.384 0 0 1 1.092-.246c.344 0 .638.054.882.162.244.108.462.254.654.438V4.084h1.482Zm5.863 7.32c.168.204.35.348.546.432.2.084.41.126.63.126.228 0 .432-.04.612-.12.184-.084.34-.212.468-.384a1.93 1.93 0 0 0 .294-.666 4.05 4.05 0 0 0 .102-.972c0-.676-.112-1.164-.336-1.464-.224-.304-.546-.456-.966-.456-.284 0-.532.066-.744.198a2.38 2.38 0 0 0-.606.546v2.76Zm0-3.804a3.02 3.02 0 0 1 .822-.618c.304-.156.65-.234 1.038-.234.356 0 .676.07.96.21.288.14.532.342.732.606.204.26.36.576.468.948.108.372.162.79.162 1.254 0 .5-.062.954-.186 1.362a3.132 3.132 0 0 1-.534 1.05 2.4 2.4 0 0 1-.828.672c-.324.16-.684.24-1.08.24a2.103 2.103 0 0 1-.954-.216 1.891 1.891 0 0 1-.366-.246c-.108-.1-.212-.21-.312-.33l-.066.414c-.024.104-.066.178-.126.222a.37.37 0 0 1-.234.066h-.978V4.084h1.482V7.6Zm10.743-.756-3.354 7.848a.538.538 0 0 1-.174.234c-.068.056-.174.084-.318.084H97.68l1.152-2.472-2.49-5.694h1.302c.116 0 .206.028.27.084.068.056.118.12.15.192l1.308 3.192c.044.108.08.216.108.324.032.108.062.218.09.33a32.3 32.3 0 0 1 .108-.33c.036-.112.076-.222.12-.33l1.236-3.186a.437.437 0 0 1 .408-.276h1.188Z"/></g></svg>'],{type:"image/svg+xml;charset=utf-8"}),o=URL.createObjectURL(i),a=new Image;a.onload=()=>{const i=e.width/t-a.width-16,o=e.height/t-a.height-16;n?.drawImage(a,i,o),r(e)},a.src=o})),ca=(e,t=1)=>new Promise((r=>{const n=e.getContext("2d"),i=new Blob(['<svg xmlns="http://www.w3.org/2000/svg" width="100" height="103"><path d="M92.527 39.465 22.312 1.87A15.549 15.549 0 0 0 14.777 0c-2.64.02-5.226.703-7.5 1.98a14.086 14.086 0 0 0-5.332 5.032A13.185 13.185 0 0 0 0 13.906v75.188c-.004 2.422.668 4.8 1.945 6.894 1.278 2.094 3.117 3.832 5.332 5.035a15.598 15.598 0 0 0 7.5 1.977 15.6 15.6 0 0 0 7.536-1.867l70.214-37.598c2.262-1.187 4.153-2.933 5.465-5.05A13.198 13.198 0 0 0 100 51.5c0-2.457-.691-4.867-2.008-6.984-1.312-2.118-3.203-3.86-5.465-5.051Zm0 0" style="stroke:none;fill-rule:nonzero;fill:#fff;fill-opacity:1"/></svg>'],{type:"image/svg+xml;charset=utf-8"}),o=URL.createObjectURL(i),a=new Image;a.onload=()=>{const i=e.width/t/2-a.width/2,o=e.height/t/2-a.height/2;n?.drawImage(a,i,o),r(e)},a.src=o,n&&(n.fillStyle="#00000064",n.fillRect(0,0,e.width,e.height),n.restore())})),la=async(e,t={addPlayWatermark:!1})=>{const{videoWidth:r,videoHeight:n}=e,i=r>n?"landscape":"portrait",o="portrait"===i?r:n,a="landscape"===i?n:r,s="landscape"===i?(r-o)/2:0,c="portrait"===i?(n-a)/2:0;let l=document.createElement("canvas");const d=l.getContext("2d"),u=window.devicePixelRatio||1;l.width=o*u,l.height=a*u,d?.scale(u,u),d?.drawImage(e,s,c,o,a,0,0,l.width/u,l.height/u),t.addPlayWatermark&&(l=await ca(l,window.devicePixelRatio));return(await sa(l,window.devicePixelRatio)).toDataURL("image/jpeg")},da=async(e,t={addPlayWatermark:!1})=>{const r=document.createElement("video"),n=new MediaStream;n.addTrack(e),r.srcObject=n,r.setAttribute("muted","true");const i=e.getSettings();r.width=i.width||0,r.height=i.height||0,await r.play();let o=document.createElement("canvas");const a=o.getContext("2d");o.height=r.height,o.width=r.width,a?.drawImage(r,0,0),t.addPlayWatermark&&(o=await ca(o));return(await sa(o)).toDataURL("image/jpeg")};var ua=o("eEB2e"),pa=(zi=o("4Fy4N"),{}),ha=pa&&pa.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),fa=pa&&pa.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),ma=pa&&pa.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&ha(t,e,r);return fa(t,e),t},ga=pa&&pa.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(pa,"__esModule",{value:!0}),pa.debug=pa.parseScalabilityMode=pa.detectDevice=pa.Device=pa.version=pa.types=void 0;const va=ga(o("hZG0u"));pa.debug=va.default;var ya=o("1ZHQC");Object.defineProperty(pa,"Device",{enumerable:!0,get:function(){return ya.Device}}),Object.defineProperty(pa,"detectDevice",{enumerable:!0,get:function(){return ya.detectDevice}});const ba=ma(o("cQumC"));pa.types=ba,pa.version="3.6.53";var wa=o("fT1lN");Object.defineProperty(pa,"parseScalabilityMode",{enumerable:!0,get:function(){return wa.parse}});const xa=new ta("StreamerMediasoup");function Sa(){try{const r=navigator.userAgent,n=zi.getParser(r);e="DeviceDetectionForced",t=!0,Uo().setTag(e,t),$o({type:"debug",category:"browser",data:n.getResult()});const i=n.getOS();if("Safari"===n.getBrowserName()&&"iOS"===i.name&&Number(i.version)>=14.3)return new(0,pa.Device)({handlerName:"Safari12"});throw Error("failed to autoDetect browser, falling back to chrome 74")}catch(e){xa.error("deviceAutoDetection",e),Wo(e)}var e,t;return new(0,pa.Device)({handlerName:"Chrome74"})}class _a{constructor(e,t){this.mediasoupDevice=e,this.config=t}static async create(e,t){const r=await e.request("getRouterRtpCapabilities");r.headerExtensions=r.headerExtensions?.filter((e=>"urn:3gpp:video-orientation"!==e.uri));const n=function(){try{return new(0,pa.Device)}catch(e){return xa.error("failed to detects device from mediasoup, fallback on auto detection",e),Sa()}}();return n.load({routerRtpCapabilities:r}),new _a(n,t)}getRtpCapabilities(){return this.mediasoupDevice.rtpCapabilities}async createTransportConfig(e){const t=await e.request("createWebRtcTransport");return{id:t.id,iceParameters:t.iceParameters,iceCandidates:t.iceCandidates,dtlsParameters:{...t.dtlsParameters,role:"auto"},sctpParameters:t.sctpParameters,iceServers:this.config.iceServers,proprietaryConstraints:{optional:[{googDscp:!0}]},additionalSettings:{encodedInsertableStreams:!1}}}async createSendTransport(e){const t=this.mediasoupDevice.createSendTransport(await this.createTransportConfig(e));return t.on("connect",(({dtlsParameters:r},n,i)=>{xa.log("dtlsParameters",t.id,r),e.request("connectWebRtcTransport",{transportId:t.id,dtlsParameters:r}).then(n).catch(i)})),t.on("produce",(async({kind:r,rtpParameters:n,appData:i},o,a)=>{try{const{id:a}=await e.request("produce",{transportId:t.id,kind:r,rtpParameters:n,appData:i});o({id:a}),xa.log("producerTransport: ",t)}catch(e){a(e)}})),t}async createRecvTransport(e){const t=this.mediasoupDevice.createRecvTransport(await this.createTransportConfig(e));return t.on("connect",(({dtlsParameters:r},n,i)=>{xa.log("dtls",t.id,r),e.request("connectWebRtcTransport",{transportId:t.id,dtlsParameters:r}).then(n).catch(i)})),t}async createTransport(e,t){return"send"===t?await this.createSendTransport(e):await this.createRecvTransport(e)}async produceAudio(e,t,r){return await e.produce({track:t,codecOptions:{opusStereo:!0,opusDtx:!0},appData:r})}async produceVideo(e,t,r){return await e.produce({track:t,encodings:undefined,codecOptions:{videoGoogleStartBitrate:1e3},appData:r})}}var ka={};(function(){"use strict";var e;function r(e){var t=0;return function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}}var n="function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,r){return e==Array.prototype||e==Object.prototype||(e[t]=r.value),e};var i=function(e){e=["object"==typeof globalThis&&globalThis,e,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof t&&t];for(var r=0;r<e.length;++r){var n=e[r];if(n&&n.Math==Math)return n}throw Error("Cannot find global object")}(this);function o(e,t){if(t)e:{var r=i;e=e.split(".");for(var o=0;o<e.length-1;o++){var a=e[o];if(!(a in r))break e;r=r[a]}(t=t(o=r[e=e[e.length-1]]))!=o&&null!=t&&n(r,e,{configurable:!0,writable:!0,value:t})}}function a(e){return(e={next:e})[Symbol.iterator]=function(){return this},e}function s(e){var t="undefined"!=typeof Symbol&&Symbol.iterator&&e[Symbol.iterator];return t?t.call(e):{next:r(e)}}function c(e){if(!(e instanceof Array)){e=s(e);for(var t,r=[];!(t=e.next()).done;)r.push(t.value);e=r}return e}o("Symbol",(function(e){function t(e,t){this.g=e,n(this,"description",{configurable:!0,writable:!0,value:t})}if(e)return e;t.prototype.toString=function(){return this.g};var r="jscomp_symbol_"+(1e9*Math.random()>>>0)+"_",i=0;return function e(n){if(this instanceof e)throw new TypeError("Symbol is not a constructor");return new t(r+(n||"")+"_"+i++,n)}})),o("Symbol.iterator",(function(e){if(e)return e;e=Symbol("Symbol.iterator");for(var t="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),o=0;o<t.length;o++){var s=i[t[o]];"function"==typeof s&&"function"!=typeof s.prototype[e]&&n(s.prototype,e,{configurable:!0,writable:!0,value:function(){return a(r(this))}})}return e}));var l,d="function"==typeof Object.create?Object.create:function(e){function t(){}return t.prototype=e,new t};if("function"==typeof Object.setPrototypeOf)l=Object.setPrototypeOf;else{var u;e:{var p={};try{p.__proto__={a:!0},u=p.a;break e}catch(e){}u=!1}l=u?function(e,t){if(e.__proto__=t,e.__proto__!==t)throw new TypeError(e+" is not extensible");return e}:null}var h=l;function f(e,t){if(e.prototype=d(t.prototype),e.prototype.constructor=e,h)h(e,t);else for(var r in t)if("prototype"!=r)if(Object.defineProperties){var n=Object.getOwnPropertyDescriptor(t,r);n&&Object.defineProperty(e,r,n)}else e[r]=t[r];e.ea=t.prototype}function m(){this.l=!1,this.i=null,this.h=void 0,this.g=1,this.s=this.m=0,this.j=null}function g(e){if(e.l)throw new TypeError("Generator is already running");e.l=!0}function v(e,t){e.j={U:t,V:!0},e.g=e.m||e.s}function y(e,t,r){return e.g=r,{value:t}}function b(e){this.g=new m,this.h=e}function w(e,t,r,n){try{var i=t.call(e.g.i,r);if(!(i instanceof Object))throw new TypeError("Iterator result "+i+" is not an object");if(!i.done)return e.g.l=!1,i;var o=i.value}catch(t){return e.g.i=null,v(e.g,t),x(e)}return e.g.i=null,n.call(e.g,o),x(e)}function x(e){for(;e.g.g;)try{var t=e.h(e.g);if(t)return e.g.l=!1,{value:t.value,done:!1}}catch(t){e.g.h=void 0,v(e.g,t)}if(e.g.l=!1,e.g.j){if(t=e.g.j,e.g.j=null,t.V)throw t.U;return{value:t.return,done:!0}}return{value:void 0,done:!0}}function S(e){this.next=function(t){return g(e.g),e.g.i?t=w(e,e.g.i.next,t,e.g.o):(e.g.o(t),t=x(e)),t},this.throw=function(t){return g(e.g),e.g.i?t=w(e,e.g.i.throw,t,e.g.o):(v(e.g,t),t=x(e)),t},this.return=function(t){return function(e,t){g(e.g);var r=e.g.i;return r?w(e,"return"in r?r.return:function(e){return{value:e,done:!0}},t,e.g.return):(e.g.return(t),x(e))}(e,t)},this[Symbol.iterator]=function(){return this}}function _(e,t){return t=new S(new b(t)),h&&e.prototype&&h(t,e.prototype),t}m.prototype.o=function(e){this.h=e},m.prototype.return=function(e){this.j={return:e},this.g=this.s};var k="function"==typeof Object.assign?Object.assign:function(e,t){for(var r=1;r<arguments.length;r++){var n=arguments[r];if(n)for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e};o("Object.assign",(function(e){return e||k})),o("Promise",(function(e){function t(e){this.h=0,this.i=void 0,this.g=[],this.o=!1;var t=this.j();try{e(t.resolve,t.reject)}catch(e){t.reject(e)}}function r(){this.g=null}function n(e){return e instanceof t?e:new t((function(t){t(e)}))}if(e)return e;r.prototype.h=function(e){if(null==this.g){this.g=[];var t=this;this.i((function(){t.l()}))}this.g.push(e)};var o=i.setTimeout;r.prototype.i=function(e){o(e,0)},r.prototype.l=function(){for(;this.g&&this.g.length;){var e=this.g;this.g=[];for(var t=0;t<e.length;++t){var r=e[t];e[t]=null;try{r()}catch(e){this.j(e)}}}this.g=null},r.prototype.j=function(e){this.i((function(){throw e}))},t.prototype.j=function(){function e(e){return function(n){r||(r=!0,e.call(t,n))}}var t=this,r=!1;return{resolve:e(this.C),reject:e(this.l)}},t.prototype.C=function(e){if(e===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(e instanceof t)this.F(e);else{e:switch(typeof e){case"object":var r=null!=e;break e;case"function":r=!0;break e;default:r=!1}r?this.u(e):this.m(e)}},t.prototype.u=function(e){var t=void 0;try{t=e.then}catch(e){return void this.l(e)}"function"==typeof t?this.G(t,e):this.m(e)},t.prototype.l=function(e){this.s(2,e)},t.prototype.m=function(e){this.s(1,e)},t.prototype.s=function(e,t){if(0!=this.h)throw Error("Cannot settle("+e+", "+t+"): Promise already settled in state"+this.h);this.h=e,this.i=t,2===this.h&&this.D(),this.A()},t.prototype.D=function(){var e=this;o((function(){if(e.B()){var t=i.console;void 0!==t&&t.error(e.i)}}),1)},t.prototype.B=function(){if(this.o)return!1;var e=i.CustomEvent,t=i.Event,r=i.dispatchEvent;return void 0===r||("function"==typeof e?e=new e("unhandledrejection",{cancelable:!0}):"function"==typeof t?e=new t("unhandledrejection",{cancelable:!0}):(e=i.document.createEvent("CustomEvent")).initCustomEvent("unhandledrejection",!1,!0,e),e.promise=this,e.reason=this.i,r(e))},t.prototype.A=function(){if(null!=this.g){for(var e=0;e<this.g.length;++e)a.h(this.g[e]);this.g=null}};var a=new r;return t.prototype.F=function(e){var t=this.j();e.J(t.resolve,t.reject)},t.prototype.G=function(e,t){var r=this.j();try{e.call(t,r.resolve,r.reject)}catch(e){r.reject(e)}},t.prototype.then=function(e,r){function n(e,t){return"function"==typeof e?function(t){try{i(e(t))}catch(e){o(e)}}:t}var i,o,a=new t((function(e,t){i=e,o=t}));return this.J(n(e,i),n(r,o)),a},t.prototype.catch=function(e){return this.then(void 0,e)},t.prototype.J=function(e,t){function r(){switch(n.h){case 1:e(n.i);break;case 2:t(n.i);break;default:throw Error("Unexpected state: "+n.h)}}var n=this;null==this.g?a.h(r):this.g.push(r),this.o=!0},t.resolve=n,t.reject=function(e){return new t((function(t,r){r(e)}))},t.race=function(e){return new t((function(t,r){for(var i=s(e),o=i.next();!o.done;o=i.next())n(o.value).J(t,r)}))},t.all=function(e){var r=s(e),i=r.next();return i.done?n([]):new t((function(e,t){function o(t){return function(r){a[t]=r,0==--s&&e(a)}}var a=[],s=0;do{a.push(void 0),s++,n(i.value).J(o(a.length-1),t),i=r.next()}while(!i.done)}))},t})),o("Object.is",(function(e){return e||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}})),o("Array.prototype.includes",(function(e){return e||function(e,t){var r=this;r instanceof String&&(r=String(r));var n=r.length;for(0>(t=t||0)&&(t=Math.max(t+n,0));t<n;t++){var i=r[t];if(i===e||Object.is(i,e))return!0}return!1}})),o("String.prototype.includes",(function(e){return e||function(e,t){if(null==this)throw new TypeError("The 'this' value for String.prototype.includes must not be null or undefined");if(e instanceof RegExp)throw new TypeError("First argument to String.prototype.includes must not be a regular expression");return-1!==this.indexOf(e,t||0)}})),o("Array.prototype.keys",(function(e){return e||function(){return function(e,t){e instanceof String&&(e+="");var r=0,n=!1,i={next:function(){if(!n&&r<e.length){var i=r++;return{value:t(i,e[i]),done:!1}}return n=!0,{done:!0,value:void 0}}};return i[Symbol.iterator]=function(){return i},i}(this,(function(e){return e}))}}));var C=this||self;function E(e,t){e=e.split(".");var r,n=C;e[0]in n||void 0===n.execScript||n.execScript("var "+e[0]);for(;e.length&&(r=e.shift());)e.length||void 0===t?n=n[r]&&n[r]!==Object.prototype[r]?n[r]:n[r]={}:n[r]=t}function P(e,t){return t=String.fromCharCode.apply(null,t),null==e?t:e+t}var R,T,j="undefined"!=typeof TextDecoder,O="undefined"!=typeof TextEncoder;function M(e){if(O)e=(T||(T=new TextEncoder)).encode(e);else{var t=void 0;t=void 0!==t&&t;for(var r=0,n=new Uint8Array(3*e.length),i=0;i<e.length;i++){var o=e.charCodeAt(i);if(128>o)n[r++]=o;else{if(2048>o)n[r++]=o>>6|192;else{if(55296<=o&&57343>=o){if(56319>=o&&i<e.length){var a=e.charCodeAt(++i);if(56320<=a&&57343>=a){o=1024*(o-55296)+a-56320+65536,n[r++]=o>>18|240,n[r++]=o>>12&63|128,n[r++]=o>>6&63|128,n[r++]=63&o|128;continue}i--}if(t)throw Error("Found an unpaired surrogate");o=65533}n[r++]=o>>12|224,n[r++]=o>>6&63|128}n[r++]=63&o|128}}e=n.subarray(0,r)}return e}var L={},D=null;function I(e,t){void 0===t&&(t=0),N(),t=L[t];for(var r=Array(Math.floor(e.length/3)),n=t[64]||"",i=0,o=0;i<e.length-2;i+=3){var a=e[i],s=e[i+1],c=e[i+2],l=t[a>>2];a=t[(3&a)<<4|s>>4],s=t[(15&s)<<2|c>>6],c=t[63&c],r[o++]=l+a+s+c}switch(l=0,c=n,e.length-i){case 2:c=t[(15&(l=e[i+1]))<<2]||n;case 1:e=e[i],r[o]=t[e>>2]+t[(3&e)<<4|l>>4]+c+n}return r.join("")}function A(e){var t=e.length,r=3*t/4;r%3?r=Math.floor(r):-1!="=.".indexOf(e[t-1])&&(r=-1!="=.".indexOf(e[t-2])?r-2:r-1);var n=new Uint8Array(r),i=0;return function(e,t){function r(t){for(;n<e.length;){var r=e.charAt(n++),i=D[r];if(null!=i)return i;if(!/^[\s\xa0]*$/.test(r))throw Error("Unknown base64 encoding at char: "+r)}return t}N();for(var n=0;;){var i=r(-1),o=r(0),a=r(64),s=r(64);if(64===s&&-1===i)break;t(i<<2|o>>4),64!=a&&(t(o<<4&240|a>>2),64!=s&&t(a<<6&192|s))}}(e,(function(e){n[i++]=e})),n.subarray(0,i)}function N(){if(!D){D={};for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),t=["+/=","+/","-_=","-_.","-_"],r=0;5>r;r++){var n=e.concat(t[r].split(""));L[r]=n;for(var i=0;i<n.length;i++){var o=n[i];void 0===D[o]&&(D[o]=i)}}}}var F,z="function"==typeof Uint8Array.prototype.slice;function B(e,t,r){return t===r?F||(F=new Uint8Array(0)):z?e.slice(t,r):new Uint8Array(e.subarray(t,r))}var U=0;function V(e,t){t=void 0!==(t=void 0===t?{}:t).v&&t.v,this.h=null,this.g=this.i=this.j=0,this.l=!1,this.v=t,e&&H(this,e)}function H(e,t){t=t.constructor===Uint8Array?t:t.constructor===ArrayBuffer||t.constructor===Array?new Uint8Array(t):t.constructor===String?A(t):t instanceof Uint8Array?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):new Uint8Array(0),e.h=t,e.j=0,e.i=e.h.length,e.g=e.j}function q(e){var t=e.h,r=t[e.g],n=127&r;return 128>r?(e.g+=1,n):(n|=(127&(r=t[e.g+1]))<<7,128>r?(e.g+=2,n):(n|=(127&(r=t[e.g+2]))<<14,128>r?(e.g+=3,n):(n|=(127&(r=t[e.g+3]))<<21,128>r?(e.g+=4,n):(n|=(15&(r=t[e.g+4]))<<28,128>r?(e.g+=5,n>>>0):(e.g+=5,128<=t[e.g++]&&128<=t[e.g++]&&128<=t[e.g++]&&128<=t[e.g++]&&e.g++,n)))))}function W(e){var t=e.h[e.g],r=e.h[e.g+1],n=e.h[e.g+2],i=e.h[e.g+3];return e.g+=4,e=2*((r=(t<<0|r<<8|n<<16|i<<24)>>>0)>>31)+1,t=r>>>23&255,r&=8388607,255==t?r?NaN:1/0*e:0==t?e*Math.pow(2,-149)*r:e*Math.pow(2,t-150)*(r+Math.pow(2,23))}V.prototype.reset=function(){this.g=this.j};var $=[];function K(){this.g=new Uint8Array(64),this.h=0}function G(e,t){for(;127<t;)e.push(127&t|128),t>>>=7;e.push(t)}function Z(e){var t={},r=void 0!==t.N&&t.N;this.o={v:void 0!==t.v&&t.v},this.N=r,t=this.o,$.length?(r=$.pop(),t&&(r.v=t.v),e&&H(r,e),e=r):e=new V(e,t),this.g=e,this.m=this.g.g,this.h=this.i=this.l=-1,this.j=!1}function Q(e){var t=e.g;if((t=t.g==t.i)||(t=e.j)||(t=(t=e.g).l||0>t.g||t.g>t.i),t)return!1;e.m=e.g.g;var r=7&(t=q(e.g));return 0!=r&&5!=r&&1!=r&&2!=r&&3!=r&&4!=r?(e.j=!0,!1):(e.i=t,e.l=t>>>3,e.h=r,!0)}function Y(e){switch(e.h){case 0:if(0!=e.h)Y(e);else{for(e=e.g;128&e.h[e.g];)e.g++;e.g++}break;case 1:1!=e.h?Y(e):(e=e.g).g+=8;break;case 2:if(2!=e.h)Y(e);else{var t=q(e.g);(e=e.g).g+=t}break;case 5:5!=e.h?Y(e):(e=e.g).g+=4;break;case 3:for(t=e.l;;){if(!Q(e)){e.j=!0;break}if(4==e.h){e.l!=t&&(e.j=!0);break}Y(e)}break;default:e.j=!0}}function J(e,t,r){var n=e.g.i,i=q(e.g);return i=e.g.g+i,e.g.i=i,r(t,e),e.g.g=i,e.g.i=n,t}function X(e){var t,r=q(e.g),n=(e=e.g).g;if(e.g+=r,e=e.h,j)(t=R)||(t=R=new TextDecoder("utf-8",{fatal:!1})),t=t.decode(e.subarray(n,n+r));else{r=n+r;for(var i,o,a,s=[],c=null;n<r;)128>(i=e[n++])?s.push(i):224>i?n>=r?s.push(65533):(o=e[n++],194>i||128!=(192&o)?(n--,s.push(65533)):s.push((31&i)<<6|63&o)):240>i?n>=r-1?s.push(65533):128!=(192&(o=e[n++]))||224===i&&160>o||237===i&&160<=o||128!=(192&(t=e[n++]))?(n--,s.push(65533)):s.push((15&i)<<12|(63&o)<<6|63&t):244>=i?n>=r-2?s.push(65533):128!=(192&(o=e[n++]))||0!=o-144+(i<<28)>>30||128!=(192&(t=e[n++]))||128!=(192&(a=e[n++]))?(n--,s.push(65533)):(i=(7&i)<<18|(63&o)<<12|(63&t)<<6|63&a,i-=65536,s.push(55296+(i>>10&1023),56320+(1023&i))):s.push(65533),8192<=s.length&&(c=P(c,s),s.length=0);t=P(c,s)}return t}function ee(){this.h=[],this.i=0,this.g=new K}function te(e,t){0!==t.length&&(e.h.push(t),e.i+=t.length)}function re(e){var t=e.i+e.g.length();if(0===t)return new Uint8Array(0);t=new Uint8Array(t);for(var r=e.h,n=r.length,i=0,o=0;o<n;o++){var a=r[o];0!==a.length&&(t.set(a,i),i+=a.length)}return 0!==(n=(r=e.g).h)&&(t.set(r.g.subarray(0,n),i),r.h=0),e.h=[t],t}function ne(e,t,r){if(null!=r){G(e.g,8*t+5),e=e.g;var n=r;0===(n=(r=0>n?1:0)?-n:n)?0<1/n?U=0:(0,U=2147483648):isNaN(n)?(0,U=2147483647):34028234663852886e22<n?(0,U=(r<<31|2139095040)>>>0):11754943508222875e-54>n?(n=Math.round(n/Math.pow(2,-149)),0,U=(r<<31|n)>>>0):(t=Math.floor(Math.log(n)/Math.LN2),n*=Math.pow(2,-t),n=8388607&Math.round(8388608*n),0,U=(r<<31|t+127<<23|n)>>>0),r=U,e.push(r>>>0&255),e.push(r>>>8&255),e.push(r>>>16&255),e.push(r>>>24&255)}}K.prototype.push=function(e){if(!(this.h+1<this.g.length)){var t=this.g;this.g=new Uint8Array(Math.ceil(1+2*this.g.length)),this.g.set(t)}this.g[this.h++]=e},K.prototype.length=function(){return this.h},K.prototype.end=function(){var e=this.g,t=this.h;return this.h=0,B(e,0,t)},Z.prototype.reset=function(){this.g.reset(),this.h=this.l=-1};var ie="function"==typeof Uint8Array;function oe(e,t,r){if(null!=e)return"object"==typeof e?ie&&e instanceof Uint8Array?r(e):ae(e,t,r):t(e)}function ae(e,t,r){if(Array.isArray(e)){for(var n=Array(e.length),i=0;i<e.length;i++)n[i]=oe(e[i],t,r);return Array.isArray(e)&&e.W&&de(n),n}for(i in n={},e)n[i]=oe(e[i],t,r);return n}function se(e){return"number"==typeof e?isFinite(e)?e:String(e):e}var ce,le={W:{value:!0,configurable:!0}};function de(e){return Array.isArray(e)&&!Object.isFrozen(e)&&Object.defineProperties(e,le),e}function ue(e,t,r){var n=ce;if(ce=null,e||(e=n),n=this.constructor.ca,e||(e=n?[n]:[]),this.j=n?0:-1,this.i=null,this.g=e,e=(n=this.g.length)-1,n&&null!==(n=this.g[e])&&"object"==typeof n&&n.constructor===Object?(this.l=e-this.j,this.h=n):void 0!==t&&-1<t?(this.l=Math.max(t,e+1-this.j),this.h=null):this.l=Number.MAX_VALUE,r)for(t=0;t<r.length;t++)(e=r[t])<this.l?(e+=this.j,(n=this.g[e])?de(n):this.g[e]=pe):(he(this),(n=this.h[e])?de(n):this.h[e]=pe)}var pe=Object.freeze(de([]));function he(e){var t=e.l+e.j;e.g[t]||(e.h=e.g[t]={})}function fe(e,t,r){return-1===t?null:void 0!==r&&r||t>=e.l?e.h?e.h[t]:void 0:e.g[t+e.j]}function me(e){var t=void 0!==t&&t,r=fe(e,1,t);return null==r&&(r=pe),r===pe&&ve(e,1,r=de([]),t),r}function ge(e,t,r){return null==(e=null==(e=fe(e,t))?e:+e)?void 0===r?0:r:e}function ve(e,t,r,n){void 0!==n&&n||t>=e.l?(he(e),e.h[t]=r):e.g[t+e.j]=r}function ye(e,t){e.i||(e.i={});var r=e.i[1];if(!r){var n=me(e);r=[];for(var i=0;i<n.length;i++)r[i]=new t(n[i]);e.i[1]=r}return r}function be(e,t,r,n){var i=ye(e,r);t=t||new r,e=me(e),null!=n?(i.splice(n,0,t),e.splice(n,0,we(t,!1))):(i.push(t),e.push(we(t,!1)))}function we(e,t){if(e.i)for(var r in e.i){var n=e.i[r];if(Array.isArray(n))for(var i=0;i<n.length;i++)n[i]&&we(n[i],t);else n&&we(n,t)}return e.g}function xe(e,t){return null==(e=fe(e,t))?0:e}function Se(e,t){return null==(e=fe(e,t))?"":e}function _e(e,t){if(e=e.m){te(t,t.g.end());for(var r=0;r<e.length;r++)te(t,e[r])}}function ke(e,t){if(4==t.h)return!1;var r=t.m;return Y(t),t.N||(t=B(t.g.h,r,t.g.g),(r=e.m)?r.push(t):e.m=[t]),!0}function Ce(e,t){var r=void 0;return new(r||(r=Promise))((function(n,i){function o(e){try{s(t.next(e))}catch(e){i(e)}}function a(e){try{s(t.throw(e))}catch(e){i(e)}}function s(e){e.done?n(e.value):new r((function(t){t(e.value)})).then(o,a)}s((t=t.apply(e,void 0)).next())}))}function Ee(e){ue.call(this,e)}function Pe(e,t){for(;Q(t);)switch(t.i){case 8:var r=q(t.g);ve(e,1,r);break;case 21:ve(e,2,r=W(t.g));break;case 26:ve(e,3,r=X(t));break;case 34:ve(e,4,r=X(t));break;default:if(!ke(e,t))return e}return e}function Re(e){ue.call(this,e,-1,Te)}ue.prototype.toJSON=function(){return ae(we(this,!1),se,I)},ue.prototype.toString=function(){return we(this,!1).toString()},f(Ee,ue),f(Re,ue),Re.prototype.addClassification=function(e,t){be(this,e,Ee,t)};var Te=[1];function je(e){ue.call(this,e)}function Oe(e,t){for(;Q(t);)switch(t.i){case 13:var r=W(t.g);ve(e,1,r);break;case 21:ve(e,2,r=W(t.g));break;case 29:ve(e,3,r=W(t.g));break;case 37:ve(e,4,r=W(t.g));break;case 45:ve(e,5,r=W(t.g));break;default:if(!ke(e,t))return e}return e}function Me(e){ue.call(this,e,-1,Le)}f(je,ue),f(Me,ue);var Le=[1];function De(e){ue.call(this,e)}function Ie(e,t,r){if(r=e.createShader(0===r?e.VERTEX_SHADER:e.FRAGMENT_SHADER),e.shaderSource(r,t),e.compileShader(r),!e.getShaderParameter(r,e.COMPILE_STATUS))throw Error("Could not compile WebGL shader.\n\n"+e.getShaderInfoLog(r));return r}function Ae(e){return ye(e,Ee).map((function(e){return{index:xe(e,1),Y:ge(e,2),label:null!=fe(e,3)?Se(e,3):void 0,displayName:null!=fe(e,4)?Se(e,4):void 0}}))}function Ne(e){return{x:ge(e,1),y:ge(e,2),z:ge(e,3),visibility:null!=fe(e,4)?ge(e,4):void 0}}function Fe(e,t){this.h=e,this.g=t,this.l=0}function ze(e,t,r){return function(e,t){var r=e.g;if(void 0===e.m){var n=Ie(r,"\n attribute vec2 aVertex;\n attribute vec2 aTex;\n varying vec2 vTex;\n void main(void) {\n gl_Position = vec4(aVertex, 0.0, 1.0);\n vTex = aTex;\n }",0),i=Ie(r,"\n precision mediump float;\n varying vec2 vTex;\n uniform sampler2D sampler0;\n void main(){\n gl_FragColor = texture2D(sampler0, vTex);\n }",1),o=r.createProgram();if(r.attachShader(o,n),r.attachShader(o,i),r.linkProgram(o),!r.getProgramParameter(o,r.LINK_STATUS))throw Error("Could not compile WebGL program.\n\n"+r.getProgramInfoLog(o));n=e.m=o,r.useProgram(n),i=r.getUniformLocation(n,"sampler0"),e.j={I:r.getAttribLocation(n,"aVertex"),H:r.getAttribLocation(n,"aTex"),da:i},e.s=r.createBuffer(),r.bindBuffer(r.ARRAY_BUFFER,e.s),r.enableVertexAttribArray(e.j.I),r.vertexAttribPointer(e.j.I,2,r.FLOAT,!1,0,0),r.bufferData(r.ARRAY_BUFFER,new Float32Array([-1,-1,-1,1,1,1,1,-1]),r.STATIC_DRAW),r.bindBuffer(r.ARRAY_BUFFER,null),e.o=r.createBuffer(),r.bindBuffer(r.ARRAY_BUFFER,e.o),r.enableVertexAttribArray(e.j.H),r.vertexAttribPointer(e.j.H,2,r.FLOAT,!1,0,0),r.bufferData(r.ARRAY_BUFFER,new Float32Array([0,1,0,0,1,0,1,1]),r.STATIC_DRAW),r.bindBuffer(r.ARRAY_BUFFER,null),r.uniform1i(i,0)}n=e.j,r.useProgram(e.m),r.canvas.width=t.width,r.canvas.height=t.height,r.viewport(0,0,t.width,t.height),r.activeTexture(r.TEXTURE0),e.h.bindTexture2d(t.glName),r.enableVertexAttribArray(n.I),r.bindBuffer(r.ARRAY_BUFFER,e.s),r.vertexAttribPointer(n.I,2,r.FLOAT,!1,0,0),r.enableVertexAttribArray(n.H),r.bindBuffer(r.ARRAY_BUFFER,e.o),r.vertexAttribPointer(n.H,2,r.FLOAT,!1,0,0),r.bindFramebuffer(r.DRAW_FRAMEBUFFER?r.DRAW_FRAMEBUFFER:r.FRAMEBUFFER,null),r.clearColor(0,0,0,0),r.clear(r.COLOR_BUFFER_BIT),r.colorMask(!0,!0,!0,!0),r.drawArrays(r.TRIANGLE_FAN,0,4),r.disableVertexAttribArray(n.I),r.disableVertexAttribArray(n.H),r.bindBuffer(r.ARRAY_BUFFER,null),e.h.bindTexture2d(0)}(e,t),"function"==typeof e.g.canvas.transferToImageBitmap?Promise.resolve(e.g.canvas.transferToImageBitmap()):r?Promise.resolve(e.g.canvas):"function"==typeof createImageBitmap?createImageBitmap(e.g.canvas):(void 0===e.i&&(e.i=document.createElement("canvas")),new Promise((function(t){e.i.height=e.g.canvas.height,e.i.width=e.g.canvas.width,e.i.getContext("2d",{}).drawImage(e.g.canvas,0,0,e.g.canvas.width,e.g.canvas.height),t(e.i)})))}function Be(e){this.g=e}f(De,ue);var Ue=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,9,1,7,0,65,0,253,15,26,11]);function Ve(e,t){return t+e}function He(e,t){window[e]=t}function qe(e){if(this.g=e,this.listeners={},this.j={},this.F={},this.m={},this.s={},this.G=this.o=this.R=!0,this.C=Promise.resolve(),this.P="",this.B={},this.locateFile=e&&e.locateFile||Ve,"object"==typeof window)var t=window.location.pathname.toString().substring(0,window.location.pathname.toString().lastIndexOf("/"))+"/";else{if("undefined"==typeof location)throw Error("solutions can only be loaded on a web page or in a web worker");t=location.pathname.toString().substring(0,location.pathname.toString().lastIndexOf("/"))+"/"}if(this.S=t,e.options)for(var r=(t=s(Object.keys(e.options))).next();!r.done;r=t.next()){r=r.value;var n=e.options[r].default;void 0!==n&&(this.j[r]="function"==typeof n?n():n)}}function We(e){return Ce(e,(function e(){var t,r,n,i,o,a,s,l,d,u,p,h=this;return _(e,(function(e){switch(e.g){case 1:return t=h,h.R?(r=function(e,t){return void 0===e.g.files?[]:"function"==typeof e.g.files?e.g.files(t):e.g.files}(h,h.j),y(e,function(){return Ce(this,(function e(){return _(e,(function(e){switch(e.g){case 1:return e.m=2,y(e,WebAssembly.instantiate(Ue),4);case 4:e.g=3,e.m=0;break;case 2:return e.m=0,e.j=null,e.return(!1);case 3:return e.return(!0)}}))}))}(),2)):e.return();case 2:if(n=e.h,"object"==typeof window)return He("createMediapipeSolutionsWasm",{locateFile:h.locateFile}),He("createMediapipeSolutionsPackedAssets",{locateFile:h.locateFile}),a=r.filter((function(e){return void 0!==e.data})),s=r.filter((function(e){return void 0===e.data})),l=Promise.all(a.map((function(e){var r=$e(t,e.url);if(void 0!==e.path){var n=e.path;r=r.then((function(e){return t.overrideFile(n,e),Promise.resolve(e)}))}return r}))),d=Promise.all(s.map((function(e){return void 0===e.simd||e.simd&&n||!e.simd&&!n?function(e){var t=document.createElement("script");return t.setAttribute("src",e),t.setAttribute("crossorigin","anonymous"),new Promise((function(e){t.addEventListener("load",(function(){e()}),!1),t.addEventListener("error",(function(){e()}),!1),document.body.appendChild(t)}))}(t.locateFile(e.url,t.S)):Promise.resolve()}))).then((function(){return Ce(t,(function e(){var t,r,n=this;return _(e,(function(e){if(1==e.g)return t=window.createMediapipeSolutionsWasm,r=window.createMediapipeSolutionsPackedAssets,y(e,t(r),2);n.h=e.h,e.g=0}))}))})),u=Ce(t,(function e(){var t=this;return _(e,(function(e){return t.g.graph&&t.g.graph.url?e=y(e,$e(t,t.g.graph.url),0):(e.g=0,e=void 0),e}))})),y(e,Promise.all([d,l,u]),7);if("function"!=typeof importScripts)throw Error("solutions can only be loaded on a web page or in a web worker");return i=r.filter((function(e){return void 0===e.simd||e.simd&&n||!e.simd&&!n})).map((function(e){return t.locateFile(e.url,t.S)})),importScripts.apply(null,c(i)),y(e,createMediapipeSolutionsWasm(Module),6);case 6:h.h=e.h,h.l=new OffscreenCanvas(1,1),h.h.canvas=h.l,o=h.h.GL.createContext(h.l,{antialias:!1,alpha:!1,ba:"undefined"!=typeof WebGL2RenderingContext?2:1}),h.h.GL.makeContextCurrent(o),e.g=4;break;case 7:if(h.l=document.createElement("canvas"),!(p=h.l.getContext("webgl2",{}))&&!(p=h.l.getContext("webgl",{})))return alert("Failed to create WebGL canvas context when passing video frame."),e.return();h.D=p,h.h.canvas=h.l,h.h.createContext(h.l,!0,!0,{});case 4:h.i=new h.h.SolutionWasm,h.R=!1,e.g=0}}))}))}function $e(e,t){return Ce(e,(function e(){var r,n,i=this;return _(e,(function(e){return t in i.F?e.return(i.F[t]):(r=i.locateFile(t,""),n=fetch(r).then((function(e){return e.arrayBuffer()})),i.F[t]=n,e.return(n))}))}))}function Ke(e,t,r){return Ce(e,(function e(){var n,i,o,a,c,l,d,u,p,h,f,m,g,v,b=this;return _(e,(function(e){switch(e.g){case 1:if(!r)return e.return(t);for(n={},i=0,o=s(Object.keys(r)),a=o.next();!a.done;a=o.next())c=a.value,"string"!=typeof(l=r[c])&&"texture"===l.type&&void 0!==t[l.stream]&&++i;1<i&&(b.G=!1),d=s(Object.keys(r)),a=d.next();case 2:if(a.done){e.g=4;break}if(u=a.value,"string"==typeof(p=r[u]))return g=n,v=u,y(e,function(e,t,r){return Ce(e,(function e(){var n,i=this;return _(e,(function(e){return"number"==typeof r||r instanceof Uint8Array||r instanceof i.h.Uint8BlobList?e.return(r):r instanceof i.h.Texture2dDataOut?((n=i.s[t])||(n=new Fe(i.h,i.D),i.s[t]=n),e.return(ze(n,r,i.G))):e.return(void 0)}))}))}(b,u,t[p]),14);if(h=t[p.stream],"detection_list"===p.type){if(h){for(var w=h.getRectList(),x=h.getLandmarksList(),S=h.getClassificationsList(),k=[],C=0;C<w.size();++C){var E=w.get(C);e:{var P=new De;for(E=new Z(E);Q(E);)switch(E.i){case 13:var R=W(E.g);ve(P,1,R);break;case 21:ve(P,2,R=W(E.g));break;case 29:ve(P,3,R=W(E.g));break;case 37:ve(P,4,R=W(E.g));break;case 45:ve(P,5,R=W(E.g));break;case 48:for(var T=E.g,j=128,O=0,M=R=0;4>M&&128<=j;M++)O|=(127&(j=T.h[T.g++]))<<7*M;if(128<=j&&(O|=(127&(j=T.h[T.g++]))<<28,R|=(127&j)>>4),128<=j)for(M=0;5>M&&128<=j;M++)R|=(127&(j=T.h[T.g++]))<<7*M+3;128>j?(T=O>>>0,(R=2147483648&(j=R>>>0))&&(j=~j>>>0,0==(T=1+~T>>>0)&&(j=j+1>>>0)),T=4294967296*j+(T>>>0),R=R?-T:T):(T.l=!0,R=void 0),ve(P,6,R);break;default:if(!ke(P,E))break e}}P={Z:ge(P,1),$:ge(P,2),height:ge(P,3),width:ge(P,4),rotation:ge(P,5,0),X:xe(P,6)},R=x.get(C);e:for(E=new Me,R=new Z(R);Q(R);)if(10===R.i)be(E,T=J(R,new je,Oe),je,void 0);else if(!ke(E,R))break e;E=ye(E,je).map(Ne),T=S.get(C);e:for(R=new Re,T=new Z(T);Q(T);)if(10===T.i)R.addClassification(J(T,new Ee,Pe));else if(!ke(R,T))break e;P={T:P,O:E,M:Ae(R)},k.push(P)}w=k}else w=[];n[u]=w,e.g=7;break}if("proto_list"===p.type){if(h){for(w=Array(h.size()),x=0;x<h.size();x++)w[x]=h.get(x);h.delete()}else w=[];n[u]=w,e.g=7;break}if(void 0===h){e.g=3;break}if("float_list"===p.type){n[u]=h,e.g=7;break}if("proto"===p.type){n[u]=h,e.g=7;break}if("texture"!==p.type)throw Error("Unknown output config type: '"+p.type+"'");return(f=b.s[u])||(f=new Fe(b.h,b.D),b.s[u]=f),y(e,ze(f,h,b.G),13);case 13:m=e.h,n[u]=m;case 7:p.transform&&n[u]&&(n[u]=p.transform(n[u])),e.g=3;break;case 14:g[v]=e.h;case 3:a=d.next(),e.g=2;break;case 4:return e.return(n)}}))}))}function Ge(e,t){for(var r=t.name||"$",n=[].concat(c(t.wants)),i=new e.h.StringList,o=s(t.wants),a=o.next();!a.done;a=o.next())i.push_back(a.value);o=e.h.PacketListener.implement({onResults:function(i){for(var o={},a=0;a<t.wants.length;++a)o[n[a]]=i.get(a);var s=e.listeners[r];s&&(e.C=Ke(e,o,t.outs).then((function(r){r=s(r);for(var i=0;i<t.wants.length;++i){var a=o[n[i]];"object"==typeof a&&a.hasOwnProperty&&a.hasOwnProperty("delete")&&a.delete()}r&&(e.C=r)})))}}),e.i.attachMultiListener(i,o),i.delete()}function Ze(e){return void 0===e&&(e=0),1===e?"selfie_segmentation_landscape.tflite":"selfie_segmentation.tflite"}function Qe(e){var t=this;e=e||{},this.g=new qe({locateFile:e.locateFile,files:function(e){return[{simd:!0,url:"selfie_segmentation_solution_simd_wasm_bin.js"},{simd:!1,url:"selfie_segmentation_solution_wasm_bin.js"},{data:!0,url:Ze(e.modelSelection)}]},graph:{url:"selfie_segmentation.binarypb"},listeners:[{wants:["segmentation_mask","image_transformed"],outs:{image:{type:"texture",stream:"image_transformed"},segmentationMask:{type:"texture",stream:"segmentation_mask"}}}],inputs:{image:{type:"video",stream:"input_frames_gpu"}},options:{useCpuInference:{type:0,graphOptionXref:{calculatorType:"InferenceCalculator",fieldName:"use_cpu_inference"},default:"iPad Simulator;iPhone Simulator;iPod Simulator;iPad;iPhone;iPod".split(";").includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document},selfieMode:{type:0,graphOptionXref:{calculatorType:"GlScalerCalculator",calculatorIndex:1,fieldName:"flip_horizontal"}},modelSelection:{type:1,graphOptionXref:{calculatorType:"ConstantSidePacketCalculator",calculatorName:"ConstantSidePacketCalculatorModelSelection",fieldName:"int_value"},onChange:function(e){return Ce(t,(function t(){var r,n,i,o=this;return _(t,(function(t){return 1==t.g?(r=Ze(e),n="third_party/mediapipe/modules/selfie_segmentation/"+r,y(t,$e(o.g,r),2)):(i=t.h,o.g.overrideFile(n,i),t.return(!0))}))}))}}}})}(e=qe.prototype).close=function(){return this.i&&this.i.delete(),Promise.resolve()},e.reset=function(){return Ce(this,(function e(){var t=this;return _(e,(function(e){t.i&&(t.i.reset(),t.m={},t.s={}),e.g=0}))}))},e.setOptions=function(e,t){var r=this;if(t=t||this.g.options){for(var n=[],i=[],o={},a=s(Object.keys(e)),c=a.next();!c.done;o={K:o.K,L:o.L},c=a.next()){var l=c.value;l in this.j&&this.j[l]===e[l]||(this.j[l]=e[l],void 0!==(c=t[l])&&(c.onChange&&(o.K=c.onChange,o.L=e[l],n.push(function(e){return function(){return Ce(r,(function t(){var r=this;return _(t,(function(t){if(1==t.g)return y(t,e.K(e.L),2);!0===t.h&&(r.o=!0),t.g=0}))}))}}(o))),c.graphOptionXref&&(l={valueNumber:1===c.type?e[l]:0,valueBoolean:0===c.type&&e[l],valueString:2===c.type?e[l]:""},c=Object.assign(Object.assign(Object.assign({},{calculatorName:"",calculatorIndex:0}),c.graphOptionXref),l),i.push(c))))}0===n.length&&0===i.length||(this.o=!0,this.A=(void 0===this.A?[]:this.A).concat(i),this.u=(void 0===this.u?[]:this.u).concat(n))}},e.initialize=function(){return Ce(this,(function e(){var t=this;return _(e,(function(e){return 1==e.g?y(e,We(t),2):3!=e.g?y(e,Ce(t,(function e(){var t,r,n,i,o,a,c,l,d=this;return _(e,(function(e){if(1==e.g)return d.g.graph&&d.g.graph.url&&d.P===d.g.graph.url?e.return():(d.o=!0,d.g.graph&&d.g.graph.url?(d.P=d.g.graph.url,y(e,$e(d,d.g.graph.url),3)):void(e.g=2));for(2!=e.g&&(t=e.h,d.i.loadGraph(t)),r=s(Object.keys(d.B)),n=r.next();!n.done;n=r.next())i=n.value,d.i.overrideFile(i,d.B[i]);if(d.B={},d.g.listeners)for(o=s(d.g.listeners),a=o.next();!a.done;a=o.next())c=a.value,Ge(d,c);l=d.j,d.j={},d.setOptions(l),e.g=0}))})),3):y(e,function(e){return Ce(e,(function e(){var t,r,n,i,o,a,c=this;return _(e,(function(e){switch(e.g){case 1:if(!c.o)return e.return();if(!c.u){e.g=2;break}t=s(c.u),r=t.next();case 3:if(r.done){e.g=5;break}return y(e,(0,r.value)(),4);case 4:r=t.next(),e.g=3;break;case 5:c.u=void 0;case 2:if(c.A){for(n=new c.h.GraphOptionChangeRequestList,i=s(c.A),o=i.next();!o.done;o=i.next())a=o.value,n.push_back(a);c.i.changeOptions(n),n.delete(),c.A=void 0}c.o=!1,e.g=0}}))}))}(t),0)}))}))},e.overrideFile=function(e,t){this.i?this.i.overrideFile(e,t):this.B[e]=t},e.clearOverriddenFiles=function(){this.B={},this.i&&this.i.clearOverriddenFiles()},e.send=function(e,t){return Ce(this,(function r(){var n,i,o,a,c,l,d,u,p,h=this;return _(r,(function(r){switch(r.g){case 1:return h.g.inputs?(n=1e3*(null==t?performance.now():t),y(r,h.C,2)):r.return();case 2:return y(r,h.initialize(),3);case 3:for(i=new h.h.PacketDataList,o=s(Object.keys(e)),a=o.next();!a.done;a=o.next())if(c=a.value,l=h.g.inputs[c]){e:{var f=h,m=e[c];switch(l.type){case"video":var g=f.m[l.stream];if(g||(g=new Fe(f.h,f.D),f.m[l.stream]=g),0===(f=g).l&&(f.l=f.h.createTexture()),"undefined"!=typeof HTMLVideoElement&&m instanceof HTMLVideoElement){var v=m.videoWidth;g=m.videoHeight}else"undefined"!=typeof HTMLImageElement&&m instanceof HTMLImageElement?(v=m.naturalWidth,g=m.naturalHeight):(v=m.width,g=m.height);g={glName:f.l,width:v,height:g},(v=f.g).canvas.width=g.width,v.canvas.height=g.height,v.activeTexture(v.TEXTURE0),f.h.bindTexture2d(f.l),v.texImage2D(v.TEXTURE_2D,0,v.RGBA,v.RGBA,v.UNSIGNED_BYTE,m),f.h.bindTexture2d(0),f=g;break e;case"detections":for((g=f.m[l.stream])||(g=new Be(f.h),f.m[l.stream]=g),(f=g).data||(f.data=new f.g.DetectionListData),f.data.reset(m.length),g=0;g<m.length;++g){v=m[g];var b=f.data,w=b.setBoundingBox,x=g,S=v.T,_=new De;ve(_,1,S.Z),ve(_,2,S.$),ve(_,3,S.height),ve(_,4,S.width),ve(_,5,S.rotation),ve(_,6,S.X);var k=S=new ee;ne(k,1,fe(_,1)),ne(k,2,fe(_,2)),ne(k,3,fe(_,3)),ne(k,4,fe(_,4)),ne(k,5,fe(_,5));var C=fe(_,6);if(null!=C&&null!=C){G(k.g,48);var E=k.g,P=C;C=0>P;var R=(P=Math.abs(P))>>>0;for(P=Math.floor((P-R)/4294967296),P>>>=0,C&&(P=~P>>>0,4294967295<(R=1+(~R>>>0))&&(R=0,4294967295<++P&&(P=0))),C=U=R,R=P;0<R||127<C;)E.push(127&C|128),C=(C>>>7|R<<25)>>>0,R>>>=7;E.push(C)}if(_e(_,k),S=re(S),w.call(b,x,S),v.O)for(b=0;b<v.O.length;++b)k=!!(_=v.O[b]).visibility,x=(w=f.data).addNormalizedLandmark,S=g,_=Object.assign(Object.assign({},_),{visibility:k?_.visibility:0}),ve(k=new je,1,_.x),ve(k,2,_.y),ve(k,3,_.z),_.visibility&&ve(k,4,_.visibility),ne(E=_=new ee,1,fe(k,1)),ne(E,2,fe(k,2)),ne(E,3,fe(k,3)),ne(E,4,fe(k,4)),ne(E,5,fe(k,5)),_e(k,E),_=re(_),x.call(w,S,_);if(v.M)for(b=0;b<v.M.length;++b){if(x=(w=f.data).addClassification,S=g,_=v.M[b],ve(k=new Ee,2,_.Y),_.index&&ve(k,1,_.index),_.label&&ve(k,3,_.label),_.displayName&&ve(k,4,_.displayName),E=_=new ee,null!=(R=fe(k,1))&&null!=R)if(G(E.g,8),C=E.g,0<=R)G(C,R);else{for(P=0;9>P;P++)C.push(127&R|128),R>>=7;C.push(1)}ne(E,2,fe(k,2)),null!=(C=fe(k,3))&&(C=M(C),G(E.g,26),G(E.g,C.length),te(E,E.g.end()),te(E,C)),null!=(C=fe(k,4))&&(C=M(C),G(E.g,34),G(E.g,C.length),te(E,E.g.end()),te(E,C)),_e(k,E),_=re(_),x.call(w,S,_)}}f=f.data;break e;default:f={}}}switch(d=f,u=l.stream,l.type){case"video":i.pushTexture2d(Object.assign(Object.assign({},d),{stream:u,timestamp:n}));break;case"detections":(p=d).stream=u,p.timestamp=n,i.pushDetectionList(p);break;default:throw Error("Unknown input config type: '"+l.type+"'")}}return h.i.send(i),y(r,h.C,4);case 4:i.delete(),r.g=0}}))}))},e.onResults=function(e,t){this.listeners[t||"$"]=e},E("Solution",qe),E("OptionType",{BOOL:0,NUMBER:1,aa:2,0:"BOOL",1:"NUMBER",2:"STRING"}),(e=Qe.prototype).close=function(){return this.g.close(),Promise.resolve()},e.onResults=function(e){this.g.onResults(e)},e.initialize=function(){return Ce(this,(function e(){var t=this;return _(e,(function(e){return y(e,t.g.initialize(),0)}))}))},e.reset=function(){this.g.reset()},e.send=function(e){return Ce(this,(function t(){var r=this;return _(t,(function(t){return y(t,r.g.send(e),0)}))}))},e.setOptions=function(e){this.g.setOptions(e)},E("SelfieSegmentation",Qe),E("VERSION","0.1.1632777926")}).call(ka);const Ca=new ta("MediaPipe"),Ea="https://stream-assets.snapcall.io";let Pa=!1;const Ra=new ka.SelfieSegmentation({locateFile:(e,t)=>{if(Ca.debug("selfieSegmentation",e,t),Ea)return`${Ea}/mediapipe/${e}`;return`${window.location.href.split("/").slice(0,-1).join("/")}/mediapipe/${e}`}});var Ta,ja,Oa,Ma;ja=function(e,t,r){if(t===self.location.origin)return e;var n=r?"import "+JSON.stringify(e)+";":"importScripts("+JSON.stringify(e)+");";return URL.createObjectURL(new Blob([n],{type:"application/javascript"}))};var La={};function Da(e){return(""+e).replace(/^((?:https?|file|ftp|(chrome|moz|safari-web)-extension):\/\/.+)\/[^/]+$/,"$1")+"/"}Oa=function(e){var t=La[e];return t||(t=function(){try{throw new Error}catch(t){var e=(""+t.stack).match(/(https?|file|ftp|(chrome|moz|safari-web)-extension):\/\/[^)\n]+/g);if(e)return Da(e[2])}return"/"}(),La[e]=t),t},Ma=function(e){var t=(""+e).match(/(https?|file|ftp|(chrome|moz|safari-web)-extension):\/\/[^/]+/);if(!t)throw new Error("Origin not found");return t[0]};let Ia=Oa("adfgW")+o("juxiN").resolve("5WDBY");Ta=ja(Ia,Ma(Ia),!1);class Aa{fillColor="#000000";type="blur";live=!1;fps=24;blurLevel=10;timerWorker=new Worker(Ta,{name:"VirtualBackgroundTimerWorker"});constructor(e,t){this.stream=e,this.image=document.createElement("video"),this.image.style.display="none",this.image.setAttribute("autoplay",""),this.image.setAttribute("playsinline",""),this.image.setAttribute("muted",""),this.canvas=document.createElement("canvas"),this.canvas.style.display="none",t&&this.setOptions(t)}setOptions(e){this.setType(e.type),this.setFillColor(e.fillColor||this.fillColor),this.setVideoBackground(e.background),this.setBlurLevel(e.blurLevel||this.blurLevel)}setType(e){this.type=e}setBlurLevel(e){this.blurLevel=e}setVideoBackground(e){this.background=e}setFillColor(e){this.fillColor=e}drawWithBlur(e,t){e.save(),e.drawImage(t.image,0,0,this.canvas.width,this.canvas.height),e.globalCompositeOperation="destination-atop",e.drawImage(t.segmentationMask,0,0,this.canvas.width,this.canvas.height),e.filter=`blur(${this.blurLevel}px)`,e.globalCompositeOperation="destination-over",e.drawImage(t.image,0,0,this.canvas.width,this.canvas.height),e.restore()}drawWithBackground(e,t){e.clearRect(0,0,this.canvas.width,this.canvas.height),e.drawImage(t.segmentationMask,0,0,this.canvas.width,this.canvas.height),e.globalCompositeOperation="source-out",e.fillStyle=this.fillColor,this.background?e.drawImage(this.background,0,0,this.canvas.width,this.canvas.height):e.fillRect(0,0,this.canvas.width,this.canvas.height),e.globalCompositeOperation="destination-atop",e.drawImage(t.image,0,0,this.canvas.width,this.canvas.height),e.restore()}onFrame(e){this.canvas.width=e.image.width,this.canvas.height=e.image.height;const t=this.canvas.getContext("2d");if(t)switch(this.type){case"blur":default:this.drawWithBlur(t,e);break;case"background":this.drawWithBackground(t,e)}}runWithFrameCallback(){this.live&&this.image.requestVideoFrameCallback((()=>{Ra.send({image:this.image}),this.runWithFrameCallback()}))}async createStream(){try{const e={selfieMode:!1,modelSelection:0};Ra.setOptions(e),Ca.log("selfie segmentation initialized"),Pa||(await Ra.initialize(),Pa=!0),this.image.srcObject=this.stream,this.image.onplay=async()=>{this.live=!0;try{Ra.onResults((e=>{this.onFrame(e)})),this.timerWorker.onmessage=()=>{Ra.send({image:this.image})},this.timerWorker.postMessage({action:"start",params:this.fps})}catch(e){Ca.error("createStream:play",e)}}}catch(e){console.error("createStream",e)}return this.canvas.captureStream()}clean(){return new Promise((e=>{this.live=!1,clearInterval(this.runInterval),this.image.srcObject=null,this.stream.getTracks().forEach((e=>{e.stop(),this.stream.removeTrack(e)})),this.timerWorker.terminate(),e()}))}}const Na=window.AudioContext||window.webkitAudioContext;class Fa{audioSources={};tracks={};constructor(){this.audioContext=new Na,this.audioDestination=this.audioContext.createMediaStreamDestination()}getSetting(e){return this.tracks[e]?.getSettings()}removeTrack(e){const t=this.tracks[e];t&&(this.audioSources[e]?.disconnect(),delete this.tracks[e],delete this.audioSources[e],t.stop())}addTrack(e,t){if("audio"===t.kind){this.removeTrack(e);const r=new MediaStream([t]),n=this.audioContext.createMediaStreamSource(r);this.audioSources[e]=n,this.tracks[e]=t,this.audioDestination&&n.connect(this.audioDestination)}}getFinalTrack(){return this.audioDestination.stream.getTracks()[0]}removeAll(){Object.keys(this.tracks).forEach((e=>{this.removeTrack(e)}))}}const za=new ta("StreamerClient"),Ba="WRTC1",Ua="WRTC2",Va="TRANS1",Ha="CONS1",qa="SOCK1",Wa="USERLIMIT",$a={qvga:{width:{ideal:320},height:{ideal:240},qualityIndex:3},vga:{width:{ideal:640},height:{ideal:480},qualityIndex:2},hd:{width:{ideal:1280},height:{ideal:720},qualityIndex:1}};class Ka extends CustomEvent{constructor(e,t){super(e,t)}}const Ga=EventTarget,Za={background:void 0,fillColor:"#ffffff",type:"blur",blurLevel:10};const Qa=new class extends Ga{mediasoupTransport={};mediaPipeOption=Za;useVideoBackground=!1;pendingDeviceRequest={};joinOptions={};devicesList=[];plan=void 0;permissions=[];constructor(){super(),navigator.mediaDevices.addEventListener("devicechange",(()=>this.onDeviceChange())),this.config={streamApiURL:String("https://apistream.snapcall.io"),apiUrl:String("https://api.snapcall.io/v2"),streamerServer:String("wss://g.snapcall.io/stream"),streamerApi:String("https://g.snapcall.io/stream"),iceServers:[{urls:"turns:t.snapcall.io:443?transport=tcp,turns:t2.snapcall.io:443?transport=tcp,turn:t.snapcall.io:80?transport=tcp,turn:t2.snapcall.io:80?transport=tcp,turn:t.snapcall.io:80?transport=udp,turn:t2.snapcall.io:80?transport=udp"?.split(",")||[],username:"test",credential:"test"}]},this.peers=new Map,this.consumers=new Map,this.webcams=new Map,this.webcam={device:null,resolution:"hd"},this.webcamTrack=null,this.webcamZoom={available:!1,min:0,max:0},this.muted=!1,this.roomId="",this.peerId="",this.webcamProducer=null,this.customMessages=new Map,this.audioRenderers={},this.profile={}}getState(){const e=[];return this.peers.forEach(((t,r)=>{const n={microphone:{enabled:!1,muted:!1},camera:{enabled:!1},screenshare:{enabled:!1}};t.producersData.forEach((e=>{"microphone"===e.deviceType?n.microphone.enabled=!0:"screen"===e.deviceType?n.screenshare.enabled=!0:"webcam"===e.deviceType&&(n.camera.enabled=!0)})),e.push({peerId:r,profile:t.profile,deviceState:n})})),{roomId:this.roomId,peerId:this.peerId,profile:this.profile,callId:void 0,deviceState:this.getDevicesState(),peers:e}}onStartSpeak(){if(this.micProducer&&!this.micProducer.paused){const e=new Ka("localStartSpeak",{cancelable:!0,bubbles:!0,detail:{}});this.dispatchEvent(e),this.protoo.notify("startSpeak")}}onStopSpeak(){if(this.micProducer&&!this.micProducer.paused){const e=new Ka("localStopSpeak",{detail:{}});this.dispatchEvent(e),this.protoo.notify("stopSpeak")}}onCriticalError(e){const t=new Ka("criticalError",{detail:{code:e}});this.dispatchEvent(t)}async generateToken(e){const t=this.config.streamerApi,{token:r}=await fetch(`${t}/stream`,{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify({bid:e})}).then((e=>e.json()));return r}async init(e=this.roomId,t=this.joinOptions){if(this.roomId=e,this.joinOptions=t,!this.roomId)throw new Error("Missing room ID");let r;this.peerId||(this.peerId=Zi());try{const{streamer_instance:n,plan:{permissions:i,name:o},recordings:a}=await fetch(`${this.config.apiUrl}/streams/${e}/info`,{method:"get",headers:{"Content-Type":"application/json"}}).then((e=>{if(e.ok)return e.json();throw new Error("Invalid room ID")}));this.permissions=i,!0===a?.headless&&i.push("record_video_on_demand"),this.plan=o;const s=new URLSearchParams({peerId:this.peerId,roomId:e});t.authKey&&s.append("authKey",t.authKey);const c=this.joinOptions.recorder?"/recorder":"";r=`${this.config.streamerServer}/${n}${c}?${s}`}catch(e){console.error("init",e);const t=new Ka("invalidRoom",{detail:{}});this.dispatchEvent(t)}if(!r)throw new Error("Invalid socket URL");this.protooTransport=new Ki(r,{retry:{retries:0}}),this.protoo=new $i(this.protooTransport),this.protoo.on("open",(()=>{this.joinOptions.recorder?this.joinRecorder():this.joinRoom()})),this.protoo.on("failed",(()=>{za.error("protoo.on","failed"),this.onCriticalError(qa)})),this.protoo.on("disconnected",(()=>{za.error("protoo.on","disconnected"),this.onCriticalError(qa)})),this.protoo.on("close",(()=>za.log("protoo.on","close :("))),this.protoo.on("notification",(async e=>{if(za.log("notification",e),"error"===e.method)"reached user limit"===e.data?.reason&&this.onCriticalError(Wa);else if("newPeer"===e.method){const{id:t,profile:r,muted:n}=e.data;this.peers.set(t,{id:t,peerId:t,profile:r,muted:n,producersData:[]});const i=new Ka("newPeer",{detail:{peerId:t,displayName:r.name,profile:r,muted:n}});this.dispatchEvent(i)}else if("newProducer"===e.method){const{peerId:t,producerId:r,deviceType:n,paused:i}=e.data;await this.consumeProducer({peerId:t,producerId:r,deviceType:n,paused:i})}else if("peerClosed"===e.method){const{peerId:t,relatedConsumers:r}=e.data;this.peers.delete(t),r.forEach((e=>{this.onConsumerClose({consumerId:e.id})}));const n=new Ka("peerClosed",{detail:{peerId:t}});this.dispatchEvent(n)}else if("consumerClosed"===e.method){const{consumerId:t}=e.data;this.onConsumerClose({consumerId:t})}else if("recordStopped"===e.method)this.dispatchEvent(new Ka("recordStopped",{detail:e.data}));else if("displayName"===e.method){const{peerId:t,displayName:r}=e.data,n=new Ka("displayName",{detail:{peerId:t,displayName:r,profile:{}}});this.dispatchEvent(n)}else if("profile"===e.method){const{peerId:t,profile:r}=e.data,n=new CustomEvent("profileUpdate",{detail:{peerId:t,profile:r}});this.dispatchEvent(n)}else if("requestDevice"===e.method){this.pendingDeviceRequest[e.data.requestId]=e.data;const t=new Ka("requestDevice",{detail:e.data});this.dispatchEvent(t)}else if("startSpeak"===e.method);else if("stopSpeak"===e.method);else if("producerPaused"===e.method||"producerResumed"===e.method){const{peerId:t,producerId:r,deviceType:n}=e.data;if("microphone"===e.data?.deviceType){const n=this.peers.get(t)?.producersData.find((e=>r===e.producerId));n&&(n.paused="producerPaused"===e.method)}let i=r;for(let[,e]of Array.from(this.consumers.entries()))if(e.mediaSoupConsumer.producerId===r){i=e.mediaSoupConsumer.id;break}const o="producerPaused"===e.method?"mediaPause":"mediaResume",a=new Ka(o,{detail:{mediaId:i,peerId:t,deviceType:n,paused:"producerPaused"===e.method}});this.dispatchEvent(a)}else if("mute"===e.method){const{peerId:t,device:r}=e.data,n=new Ka("mediaPause",{detail:{peerId:t,deviceType:r,paused:!0}});this.dispatchEvent(n)}else if("unmute"===e.method){const{peerId:t,device:r}=e.data,n=new Ka("mediaResume",{detail:{peerId:t,deviceType:r,paused:!1}});this.dispatchEvent(n)}else if("requestDeviceResult"===e.method){const t=new Ka(e.method,{detail:e.data});this.dispatchEvent(t)}else if("terminateRoom"===e.method){this.release();const t=new Ka(e.method,{detail:e.data});this.dispatchEvent(t)}else if("videoRecordingStarted"===e.method||"videoRecordingStopped"===e.method||"videoRecordingRequested"===e.method){const t=new Ka(e.method,{detail:{}});this.dispatchEvent(t)}else if("customMessage"===e.method){const{messageId:t,chunk:r,chunkIndex:n,totalChunks:i}=e.data.event,o=this.customMessages.get(t);o?o.chunks.push({index:n,data:r}):this.customMessages.set(t,{chunks:[{index:n,data:r}],totalChunks:i});const a=this.customMessages.get(t);if(a&&a.totalChunks===a.chunks.length){const r=a.chunks.sort(((e,t)=>e.index-t.index)).reduce(((e,t)=>e+t.data),""),n=JSON.parse(r),i=new Ka("customMessage",{detail:{...e.data,event:n}});this.dispatchEvent(i),this.customMessages.delete(t)}}}))}closeWebrtcTransport(e){const t=this.mediasoupTransport[e];t&&(t?.transport?.close(),clearTimeout(t?.disconnectTimeout),delete this.mediasoupTransport[e])}async getTransport(e,t){if(!this.streamerMediasoup)throw new Error("streamerMediasoup not initialized");let r=this.mediasoupTransport[`${e}-${t}`];if(r)return r&&r.transport?r.transport:r.createPromise;try{const n=this.streamerMediasoup.createTransport(this.protoo,t);r={disconnectTimeout:void 0,kind:e,createPromise:n},this.mediasoupTransport[`${e}-${t}`]=r,r.transport=await n,r.transport&&this.listenWebRTCTransportStates(r)}catch(e){throw this.onCriticalError(Va),e}return r.transport}listenWebRTCTransportStates(e){if(!e.transport)throw new Error("can not listen states of undefined transport");e.transport.on("connectionstatechange",(t=>{if(e.transport&&!e.transport.closed)if(za.log("recv connectionstatechange: ",t),"disconnected"===t)e.disconnectTimeout=setTimeout((()=>{za.log("listenWebRTCTransportStats",`trying to restart transport for ${e.kind}`),e.transport&&this.restartIce(e.transport)}),5e3);else if("connected"===t)clearTimeout(e.disconnectTimeout);else if("failed"===t){const t=new Error(`webRTC transport state failed for ${e.kind}`);Wo(t,{extra:{direction:e.transport?.direction,id:e.transport?.id,kind:e.kind}}),za.error("listenWebRTCTransportStats","webrtc stat failed",t),this.onCriticalError(Ba)}}))}async joinRoom(){this.streamerMediasoup=await _a.create(this.protoo,this.config);const{apiKey:e,email:t}=this.joinOptions;if(e)try{let r=null;e&&t?r=await this.fetchAgentInfo({apiKey:e,email:t}):e&&(r=await this.fetchUserInfo({apiKey:e})),r&&this.dispatchEvent(new Ka("agentIdentity",{detail:{success:!0,email:this.joinOptions.email}}))}catch(e){za.warn("joinRoom",e),this.dispatchEvent(new Ka("agentIdentity",{detail:{success:!1}}))}const{peers:r,videoRecordStarted:n,videoRecording:i}=await this.protoo.request("getRoomPeers",{apiKey:e,email:t});this.peers=new Map(r.map((e=>[e.id||e.peerId,{...e,peerId:e.id||e.peerId}])));const o=await this.getCallId();this.dispatchEvent(new Ka("enterRoom",{detail:{videoRecording:i,videoRecordStarted:n,peerId:this.peerId,peers:r.map((e=>({...e,peerId:e.id||e.peerId}))),callId:o,plan:this.plan,permissions:this.permissions}})),za.log("joinRoom","peers",r),this.joinOptions.displayName&&await this.setDisplayName(this.joinOptions.displayName),this.joinOptions.profile&&await this.setProfile(this.joinOptions.profile),r.forEach((e=>{this.consumePeer({peerId:e.id||e.peerId,producersData:e.producersData})}))}async joinRecorder(){this.streamerMediasoup=await _a.create(this.protoo,this.config);const e=await this.getCallId();this.dispatchEvent(new Ka("enterRoom",{detail:{videoRecording:{started:!1,requested:!1},videoRecordStarted:!1,peerId:this.peerId,peers:[],callId:e,plan:this.plan,permissions:this.permissions}}))}async switchMicrophone(e){try{za.log("switchMicrophone","switching Microphone"),this.audioLevel?.release(),this.audioLevel=void 0,this.micProducer&&this.micProducer.track&&(this.audioMedia?.removeTrack("mic"),this.micProducer?.track?.stop(),za.log("switchMicrophone","stopping previous track"));const t=await this.handleGetUserMediaError("microphone",navigator.mediaDevices.getUserMedia({audio:{deviceId:e,noiseSuppression:!0,echoCancellation:!0}}));this.audioLevel=new ia(t,this),this.audioMedia=this.audioMedia||new Fa;const r=t.getAudioTracks()[0];this.audioMedia.addTrack("mic",r),await(this.micProducer?.replaceTrack({track:r})),za.log("switchMicrophone","switched Microphone")}catch(e){za.error("switchMicrophone error",e),await this.closeMicrophoneProducer()}}async closeMicrophoneProducer(){const e=this.micProducer?.id;this.micProducer?.close(),this.micProducer=void 0;const t=new Ka("microphoneMute",{detail:{}});this.dispatchEvent(t),this.protoo.connected&&await this.protoo.request("closeProducer",{producerId:e})}async onDeviceChange(){za.log("onDeviceChange","detecting device change");const e=new Ka("devicesListChange",{detail:{}});if(this.dispatchEvent(e),this.protoo&&!this.protoo.closed&&this.micProducer){const e=await navigator.mediaDevices.enumerateDevices(),t=e.filter((e=>"audioinput"===e.kind));if(0===t.length)return za.warn("onDeviceChange","no audio input device"),void await this.closeMicrophoneProducer();const r=t.find((e=>"default"===e.deviceId));if(r){const t=e.filter((e=>!Boolean(this.devicesList.find((t=>t.deviceId===e.deviceId&&t.label===e.label)))));za.log("onDeviceChange",t),this.devicesList=e;const n=Boolean(t.find((e=>"audioinput"===e.kind)));if(0!==t.length&&!1===n)return void za.warn("onDeviceChange","no audio input change");if(za.log("onDeviceChange","detecting audio input change"),!this.audioInputDefaultDevice||this.audioInputDefaultDevice.label!==r.label){const e=new Ka("defaultAudioDeviceChange",{detail:r});this.audioInputDefaultDevice=r,this.dispatchEvent(e),za.log("onDeviceChange","new default audio input trying to switch new :",r.deviceId,r.label)}this.switchMicrophone("default")}else this.switchMicrophone()}}async enableMicrophone(){if(!this.micProducer||this.micProducer?.closed){const e=await this.handleGetUserMediaError("microphone",navigator.mediaDevices.getUserMedia({audio:{noiseSuppression:!0,echoCancellation:!0}}));this.devicesList=await navigator.mediaDevices.enumerateDevices();const t=await this.getTransport("audio","send");this.audioLevel=new ia(e,this),this.audioMedia=this.audioMedia||new Fa;const r=e.getAudioTracks()[0];this.audioMedia.addTrack("mic",r);const n="microphone",i=await t.produce({track:this.audioMedia.getFinalTrack(),codecOptions:{opusStereo:!0,opusDtx:!0},appData:{deviceType:n}});i.on("transportclose",(()=>{za.log("enableMicrophone","micproducer transportclose")})),r.addEventListener("ended",(()=>{za.log("enableMicrophone","track ended!")})),i.on("trackended",(async()=>{za.log("enableMicrophone","microphone disconnected!"),void 0===navigator.mediaDevices.ondevicechange&&this.closeMicrophoneProducer()})),this.micProducer=i,this.muted=!1;const o=new Ka("microphoneEnabled",{detail:{}});this.dispatchEvent(o)}}muteMicrophone(){if(this.micProducer){this.onStopSpeak(),this.micProducer.pause(),this.muted=!0;const e="microphone";this.protoo.notify("mute",{device:e});const t=new Ka("microphoneMute",{detail:{}});this.dispatchEvent(t)}}unMuteMicrophone(){if(this.micProducer){this.micProducer.resume(),this.resolvePendingDeviceRequest("microphone",!0),this.muted=!1;const e="microphone";this.protoo.notify("unmute",{device:e});const t=new Ka("microphoneUnmute",{detail:{}});this.dispatchEvent(t)}}async toggleMute(){return this.muted?(await this.unMuteMicrophone(),{muted:!1}):(await this.muteMicrophone(),{muted:!0})}release(){za.log("release");for(let e in this.mediasoupTransport)this.closeWebrtcTransport(e);this.mediaPipe&&(this.mediaPipe.clean(),this.mediaPipe=void 0),this.audioMedia?.removeAll(),this.audioMedia=void 0,this.webcamTrack?.stop(),this.webcamTrack=null,this.protooTransport.close(),this.protoo.close(),this.micProducer?.close(),this.screenshareVideoProducer?.close(),this.webcamProducer?.close(),this.consumers.forEach((e=>{e.mediaSoupConsumer.close()})),this.consumers.clear(),this.audioLevel?.release()}endCall(){this.release();const e=new Ka("leaveRoom",{detail:{}});this.dispatchEvent(e);const t=new CustomEvent("snapcallEvent_callEnd");window.dispatchEvent(t)}terminateRoom(){this.protoo.request("terminateRoom")}async updateWebcams(){this.webcams=new Map;const e=await navigator.mediaDevices.enumerateDevices();for(const t of e)"videoinput"===t.kind&&this.webcams.set(t.deviceId,t);0===this.webcams.size?this.webcam.device=null:this.webcam.device||(this.webcam.device=this.webcams.values().next().value);const t=new Ka("webcamsUpdate",{detail:{numberOfAvailableWebcams:this.webcams.size}});this.dispatchEvent(t)}isVideoZoomAvailable(){return this.webcamZoom.available}resolvePendingDeviceRequest(e,t,r){Object.keys(this.pendingDeviceRequest).forEach((n=>{const i=this.pendingDeviceRequest[n];e===i.deviceType&&(delete this.pendingDeviceRequest[n],this.protoo.notify("requestDeviceResult",{result:Boolean(t),failure:r,...i}))}))}async handleGetUserMediaError(e,t){let r,n;try{r=await t}catch(e){n=e}finally{if(this.resolvePendingDeviceRequest(e,Boolean(r),n?.name),n)throw n;return r}}async restartIce(e){if(za.log("restartIce",e.connectionState,e.closed),"disconnected"===e.connectionState&&!e.closed)try{const t=await this.protoo.request("restartIce",{transportId:e.id});za.log("restartIce",t),await e.restartIce({iceParameters:t})}catch(t){this.onCriticalError(Ua),za.log("restartIce","restartIceFailed",t),Wo(t,{extra:{direction:e.direction,id:e.id}})}}scaleVideoMediasConstraintsParameter(e){let t=$a.hd;2===e?t=$a.vga:e>2&&(t=$a.qvga),(!this.webcam.resolution||$a[this.webcam.resolution].qualityIndex>=t.qualityIndex)&&(za.log("scaleVideoMediasConstraintsParameter",`scaling video by ${e}`,t),this.webcamProducer?.track?.applyConstraints(t))}scaleVideoEncodingsParameter(){if(!this.useVideoBackground)try{let e=0;this.consumers.forEach((t=>{"video"===t.mediaSoupConsumer.kind&&e++})),this.screenshareVideoProducer&&!this.screenshareVideoProducer.closed&&e++;let t={scaleResolutionDownBy:1};if(e>=3&&(t={scaleResolutionDownBy:2}),e>=9&&(t={scaleResolutionDownBy:4}),!ua.Producer.prototype.setRtpEncodingParameters)return this.scaleVideoMediasConstraintsParameter(t.scaleResolutionDownBy);this.webcamProducer&&!this.webcamProducer.closed&&(za.log("scaleVideoEncodingsParameter",`scaling video by ${t.scaleResolutionDownBy}`),this.webcamProducer?.setRtpEncodingParameters?.(t).catch((e=>{za.error("scaleVideoEncodingsParameter","scaleResolutionDownBy not supported",e),this.scaleVideoMediasConstraintsParameter(t.scaleResolutionDownBy)})))}catch(e){za.error("scaleVideoEncodingsParameter","scaleVideo error",e)}}setVideoBackground(e){this.mediaPipe?.setOptions(e),this.mediaPipeOption=e}async initVideoBackground(){if(!this.permissions.find((e=>"virtual_background"===e)))throw new Error("feature not allowed");!0!==this.useVideoBackground&&(this.useVideoBackground=!0,this.webcamProducer&&!this.webcamProducer.closed&&await this.switchWebcam({}))}async stopVideoBackground(){!1!==this.useVideoBackground&&(this.useVideoBackground=!1,await(this.mediaPipe?.clean()),this.mediaPipe=void 0,this.webcamProducer&&!this.webcamProducer.closed&&await this.switchWebcam({}))}async switchWebcam({device:e,resolution:t,rotate:r,frameRate:n,facingMode:i}){if(!this.webcam.device)throw new Error("no webcam devices");const o={};if(r)if(this.webcam.facingMode)console.log("switch by facing mod"),this.webcam.facingMode="user"===this.webcam.facingMode?"environment":"user",o.facingMode=this.webcam.facingMode;else{const e=Array.from(this.webcams.keys()),t=this.webcam?.device?.deviceId||"unknown";let r=e.indexOf(t);r<e.length-1?r++:r=0;const n=this.webcams.get(e[r]);if(!n)throw new Error("no webcam device");this.webcam.device=n,o.deviceId={ideal:this.webcam.device?.deviceId}}else i?(this.webcam.facingMode=i,o.facingMode=this.webcam.facingMode):e&&(this.webcam.device=e,this.webcam.facingMode=void 0,o.deviceId={ideal:this.webcam.device.deviceId});this.webcam.resolution=t||this.webcam.resolution||"hd",this.webcam.framerate=n||this.webcam.framerate;let a=$a[t||this.webcam.resolution];this.useVideoBackground&&(a={width:{ideal:560},height:{ideal:400},qualityIndex:2}),await(this.webcamProducer?.replaceTrack?.({track:null}).catch((e=>{za.error("switchCamera","clean track failed",e)})));const s=await this.handleGetUserMediaError("webcam",navigator.mediaDevices.getUserMedia({video:{...o,...a}}));this.useVideoBackground&&(this.mediaPipe&&await this.mediaPipe.clean(),this.mediaPipe=new Aa(s,this.mediaPipeOption));const c=await(this.mediaPipe?.createStream())||s;if(!await this.getTransport("video","send"))throw new Error("video transport not found, can not switch");const l=c.getVideoTracks()[0];await(this.webcamProducer?.replaceTrack?.({track:l}));const d=await(l.getCapabilities?.())||navigator.mediaDevices.getSupportedConstraints?.();this.webcamZoom={available:Boolean(d?.zoom),min:d?.zoom?.min||0,max:d?.zoom?.max||0};const u=new Ka("localVideoChange",{detail:{camera:this.getCurrentWebcam()}});this.dispatchEvent(u)}async enableVideo(e){await this.updateWebcams();const t={};if(e?.facingMode?(t.facingMode=e.facingMode,this.webcam.facingMode=e.facingMode):(e?.device&&(this.webcam.device=e.device),t.deviceId={ideal:this.webcam.device?.deviceId}),!this.webcam.device)throw new Error("no webcam devices");this.webcam.resolution=e?.resolution||this.webcam.resolution||"hd",this.webcam.framerate=e?.frameRate||this.webcam.framerate;let r=$a[e?.resolution||this.webcam.resolution];this.useVideoBackground&&(r={width:{ideal:560},height:{ideal:400},qualityIndex:2});const n=await this.handleGetUserMediaError("webcam",navigator.mediaDevices.getUserMedia({video:{frameRate:e?.frameRate,...t,...r}}));if(e?.facingMode)try{const e=n.getVideoTracks()[0].getCapabilities();if(!e?.facingMode||0===e.facingMode.length)throw new Error("no facing mod")}catch{this.webcam.device=this.webcams.values().next().value,this.webcam.facingMode=void 0}this.useVideoBackground&&(this.mediaPipe&&await this.mediaPipe.clean(),this.mediaPipe=new Aa(n,this.mediaPipeOption));const i=await(this.mediaPipe?.createStream())||n;await this.updateWebcams();const o=await this.getTransport("video","send"),a=i.getVideoTracks()[0];this.webcamTrack=a;const s=await(a.getCapabilities?.())||navigator.mediaDevices.getSupportedConstraints?.();this.webcamZoom={available:Boolean(s?.zoom),min:s?.zoom?.min||0,max:s?.zoom?.max||0};this.webcamProducer=await o.produce({track:a,encodings:undefined,codecOptions:{videoGoogleStartBitrate:1e3},appData:{deviceType:"webcam"}}),this.scaleVideoEncodingsParameter(),this.webcamProducer.on("transportclose",(()=>{this.webcamProducer=null})),this.webcamProducer.on("trackended",(()=>{this.disableVideo().catch((()=>{}))}));const c=new Ka("localVideoAvailable",{detail:{camera:this.getCurrentWebcam()}});this.dispatchEvent(c)}async rotateVideo(){await this.switchWebcam({rotate:!0})}async zoomVideo(){if(!this.webcamZoom.available)throw new Error("Webcam zoom is not available");if(!this.webcamTrack)throw new Error("No webcam track available");this.webcamTrack.applyConstraints({advanced:[{zoom:2*this.webcamZoom.min}]})}async unzoomVideo(){if(!this.webcamZoom.available)throw new Error("Webcam zoom is not available");if(!this.webcamTrack)throw new Error("No webcam track available");this.webcamTrack.applyConstraints({advanced:[{zoom:this.webcamZoom.min}]})}async disableVideo(){if(!this.webcamProducer)return;this.webcamProducer.close(),this.protoo.connected&&await this.protoo.request("closeProducer",{producerId:this.webcamProducer.id}),this.webcamProducer=null;const e=new Ka("localVideoUnavailable",{detail:{}});this.dispatchEvent(e)}async enableScreenshare(e={audioTransportOption:"classic"}){if(!this.permissions.find((e=>"screen_sharing"===e)))throw new Error("feature not allowed");if("mix"===e.audioTransportOption&&!this.micProducer)throw new Error("microphone not activated and audio mix transport requested");const t=await this.handleGetUserMediaError("screen",navigator.mediaDevices.getDisplayMedia({audio:"none"!==e.audioTransportOption,video:{displaySurface:"monitor",logicalSurface:!0,width:{max:1920},height:{max:1080},frameRate:{max:30}}}));if(!t)return;const r="screen",n=await this.getTransport("audio","send"),i=t.getAudioTracks()[0];if(i)if("classic"===e.audioTransportOption)this.screenshareAudioProducer=await(this.streamerMediasoup?.produceAudio(n,i,{deviceType:r,share:!0})),this.screenshareVideoProducer?.on("transportclose",(()=>{this.screenshareVideoProducer=void 0}));else if("mix"===e.audioTransportOption){this.audioMedia=this.audioMedia||new Fa,this.audioMedia.addTrack("screen",i);const e=this.audioMedia.getFinalTrack();e&&this.micProducer&&this.micProducer.replaceTrack({track:e})}const o=t.getVideoTracks()[0],a=await this.getTransport("video","send");this.screenshareVideoProducer=await(this.streamerMediasoup?.produceVideo(a,o,{deviceType:r,share:!0})),this.screenshareVideoProducer?.on("transportclose",(()=>{this.screenshareVideoProducer=void 0})),this.screenshareVideoProducer?.on("trackended",(()=>{this.disableScreenshare().catch((()=>{}))}));const s=new Ka("screenshareEnabled",{detail:{}});this.dispatchEvent(s)}async disableScreenshare(){this.screenshareVideoProducer&&(this.screenshareVideoProducer.close(),this.protoo.connected&&await this.protoo.request("closeProducer",{producerId:this.screenshareVideoProducer.id}),this.screenshareVideoProducer=void 0),this.audioMedia?.removeTrack("screen"),this.screenshareAudioProducer&&(this.screenshareAudioProducer.close(),this.protoo.connected&&await this.protoo.request("closeProducer",{producerId:this.screenshareAudioProducer.id}),this.screenshareAudioProducer=void 0);const e=new Ka("screenshareDisabled",{detail:{}});this.dispatchEvent(e)}onConsumerClose({consumerId:e}){const t=this.consumers.get(e);if(t){const r=t.mediaSoupConsumer.producerId;this.peers.forEach((e=>{const t=e.producersData.findIndex((e=>e.producerId===r));-1!==t&&e.producersData.splice(t,1)})),t.mediaSoupConsumer.close(),this.consumers.delete(e),this.scaleVideoEncodingsParameter();const n=new Ka("mediaStop",{detail:{mediaId:e,peerId:String(t.mediaSoupConsumer.appData.peerId),deviceType:t.deviceType,paused:!1}});"microphone"===t.deviceType&&this.deleteAudioRenderer(e),this.dispatchEvent(n)}}requestVideo({mediaId:e,element:t}){za.info("requestVideo");const r=this.consumers.get(e);if(r){const e=new MediaStream;e.onremovetrack=()=>za.log("requestVideo","Remove Track"),r.mediaSoupConsumer.track.onended=()=>za.log("requestVideo","Track Ended"),e.addTrack(r.mediaSoupConsumer.track),t.srcObject=e}else za.error("requestVideo",`Video consumer ${r} not found`)}async saveCapture(e){const{objectUrl:t}=await fetch(`${this.config.streamApiURL}/uploadSnapshot`,{method:"POST",body:JSON.stringify({file:e})}).then((e=>e.json()));return{url:t,assetId:(await this.protoo.request("addCapture",{url:t})).assetId}}async saveThumbnail(e){const{objectUrl:t}=await fetch(`${this.config.streamApiURL}/uploadSnapshot`,{method:"POST",body:JSON.stringify({file:e})}).then((e=>e.json()));return{url:t,assetId:(await this.protoo.request("addThumbnail",{url:t})).assetId}}async deleteCapture(e){return await this.protoo.request("deleteCapture",{assetId:e})}async captureVideo(e,t){if(this.permissions.find((e=>"instant_picture"===e))){let r;if(e)r=await la(e,t);else{if(!this.webcamProducer||!this.webcamProducer.track)throw new Error("no video to capture");r=await da(this.webcamProducer.track,t)}return r}throw new Error("feature not allowed")}requestLocalVideo(e){if(za.info("requestLocalVideo"),this.webcamProducer){const t=new MediaStream;t.addTrack(this.webcamProducer.track),e.srcObject=t;const r=this.webcamProducer.track?.getSettings();return{facingMode:r?.facingMode||"user"}}throw new Error("webcam producer not available yet")}requestLocalScreenshare(e){if(this.screenshareVideoProducer){const t=new MediaStream;t.addTrack(this.screenshareVideoProducer.track),e.srcObject=t}else za.log("requestLocalScreenshare","screenshare producer not available yet")}consumePeer({peerId:e,producersData:t}){t.forEach((t=>{this.consumeProducer({peerId:e,producerId:t.producerId,deviceType:t.deviceType,paused:t.paused})}))}async consumeProducer({peerId:e,producerId:t,deviceType:r,paused:n}){const i="microphone"===r?"audio":"video",o=await this.getTransport(i,"recv"),a=await this.protoo.request("consume",{peerId:e,producerId:t,transportId:o.id,rtpCapabilities:this.streamerMediasoup.getRtpCapabilities()}),s=this.peers.get(e);s&&s.producersData.push({producerId:t,deviceType:r,paused:n});const{producerId:c,id:l,kind:d,rtpParameters:u,appData:p}=a;za.log("consumeProducer","Data: ",a);try{const t=await o.consume({id:l,producerId:c,kind:d,rtpParameters:u,appData:{...p,peerId:e}});za.log("transport",o),za.log("consumer",t),this.consumers.set(t.id,{mediaSoupConsumer:t,deviceType:r}),this.scaleVideoEncodingsParameter();const n=!!s&&s.muted,i=new Ka("mediaStart",{detail:{peerId:e,mediaId:t.id,deviceType:r,paused:n}});if(this.dispatchEvent(i),"audio"===t.kind){const e=this.createAudioRenderer(t.id),r=new MediaStream;r.addTrack(t.track),e.setSource(r),e.play()}"video"===t.kind&&await this.protoo.request("resumeConsumer",{consumerId:t.id})}catch(e){throw this.onCriticalError(Ha),za.error("consumeProducer","newConsumer request failed",e),e}}async setDisplayName(e){await this.setProfile({name:e});const t=new Ka("selfDisplayName",{detail:{peerId:this.peerId,displayName:this.profile?.name,profile:this.profile}});this.dispatchEvent(t)}async setProfile(e){const t=await this.protoo.request("setProfile",e);this.profile={...t};const r=new Ka("selfProfileUpdate",{detail:{peerId:this.peerId,profile:this.profile}});this.dispatchEvent(r)}async requestPeerDevice(e,t){if(!this.permissions.find((e=>"request_input"===e)))throw new Error("feature not allowed");return this.protoo.request("requestPeerDevice",{remotePeerId:e,deviceType:t})}denyDeviceRequest(e){this.resolvePendingDeviceRequest(e,!1,"user denied permission")}async getCallId(){try{const{callId:e}=await this.protoo.request("getCallId");return e}catch(e){throw za.error("getCallId","Failed to get callId"),e}}getConsumers(){return this.consumers}getDevicesState(){const e=!!this.micProducer&&!this.micProducer.closed,t=!!this.webcamProducer&&!this.webcamProducer.closed,r=!!this.screenshareVideoProducer&&!this.screenshareVideoProducer.closed;return{microphone:{enabled:e,muted:this.muted},camera:{enabled:t},screenshare:{enabled:r}}}getCustomMessageEventChunks(e){const t=JSON.stringify(e),r=[];for(let e=0;e<t.length;e+=9e4)r.push(t.substring(e,e+9e4));return r}async sendCustomMessageToAll(e){const t=Zi(),r=this.getCustomMessageEventChunks(e),n=r.map(((e,n)=>this.protoo.notify("customMessageToAllPeers",{messageId:t,chunkIndex:n,chunk:e,totalChunks:r.length})));await Promise.all(n)}async sendCustomMessage(e,t){const r=Zi(),n=this.getCustomMessageEventChunks(t),i=n.map(((t,i)=>this.protoo.notify("customMessageToPeer",{peerId:e,event:{messageId:r,chunkIndex:i,chunk:t,totalChunks:n.length}})));await Promise.all(i)}async listAudioDevices(){return(await navigator.mediaDevices.enumerateDevices()).filter((e=>"audioinput"===e.kind||"audiooutput"===e.kind))}async listVideoDevices(){return(await navigator.mediaDevices.enumerateDevices()).filter((e=>"videoinput"===e.kind))}isListDevicesSupported(){return Boolean(navigator.mediaDevices?.enumerateDevices)}getCurrentWebcam(){return this.webcam}getCurrentMicrophoneId(){return this.audioMedia?.getSetting("mic")||this.micProducer?.track?.getSettings().deviceId}getCurrentSpeakerId(){const e=Object.keys(this.audioRenderers),t=this.audioRenderers[e[0]];if(t){const e=t.getSink();if(e)return e}return"default"}async setWebcamResolution(e){if(this.webcam.device)await this.switchWebcam({resolution:e});else{this.webcam.resolution=e;const t=new Ka("localVideoChange",{detail:{camera:this.getCurrentWebcam()}});this.dispatchEvent(t)}}createAudioRenderer(e){const t=new aa({consumerId:e});return this.audioRenderers[e]=t,t}deleteAudioRenderer(e){this.audioRenderers[e]?.destroy(),delete this.audioRenderers[e]}async playAudioRenderer(e){await(this.audioRenderers[e]?.play())}async setAudioSink(e){const t=Object.keys(this.audioRenderers).map((t=>this.audioRenderers[t].setSink(e).catch((e=>za.warn("setAudioSink","Failed to setSinkId on renderer (consumerId: %s): ",t,e)))));await Promise.allSettled(t)}dispatchEvent(e){const t=super.dispatchEvent(e);return window.dispatchEvent(e),t}async fetchAgentInfo({apiKey:e,email:t}){const r=this.config.apiUrl;return await fetch(`${r}/agents/${t}`,{method:"get",headers:{Authorization:`Bearer ${e}`}}).then((e=>{if(e.ok)return e.json();throw new Error("Invalid agent info")}))}async fetchUserInfo({apiKey:e}){const t=this.config.apiUrl;return await fetch(`${t}/users/me`,{method:"get",headers:{Authorization:`Bearer ${e}`}}).then((e=>{if(e.ok)return e.json();throw new Error("Invalid user info")}))}setConfig(e){this.config={...this.config,...e}}getPermissions(){return this.permissions}async startRecord(){await this.protoo.request("startRecord")}async stopRecord(){await this.protoo.request("stopRecord")}};var Ya=(0,(je=o("85Hg2")).createContext)({});je=o("85Hg2");let Ja;var Xa;(Xa=Ja||(Ja={}))[Xa.SET_STREAMS=0]="SET_STREAMS",Xa[Xa.ADD_STREAM=1]="ADD_STREAM",Xa[Xa.REMOVE_STREAM=2]="REMOVE_STREAM",Xa[Xa.DEVICE_UPDATE=3]="DEVICE_UPDATE",Xa[Xa.MUTE=4]="MUTE",Xa[Xa.UNMUTE=5]="UNMUTE",Xa[Xa.SET_HIGHLIGHTED_TILE=6]="SET_HIGHLIGHTED_TILE",Xa[Xa.UNSET_HIGHLIGHTED_TILE=7]="UNSET_HIGHLIGHTED_TILE",Xa[Xa.SET_STREAM_PROFILE=8]="SET_STREAM_PROFILE",Xa[Xa.SET_STREAM_SPEAKING=9]="SET_STREAM_SPEAKING";const es={streams:[],highlightedTile:null},ts=(e,t)=>{switch(t.type){case Ja.SET_STREAMS:return{...e,streams:t.payload};case Ja.ADD_STREAM:return e.streams.find((e=>e.id===t.payload.id))?e:{...e,streams:[...e.streams,t.payload]};case Ja.REMOVE_STREAM:return{...e,streams:[...e.streams.filter((e=>e.id!==t.payload.id))]};case Ja.DEVICE_UPDATE:{const{streamId:r,mediaId:n,device:i,available:o,paused:a}=t.payload;return{...e,streams:e.streams.map((e=>{if(e.id===r){let t=e.muted;return"microphone"===i&&(t=a),{...e,[i]:o?n:null,muted:t}}return e}))}}case Ja.MUTE:return{...e,streams:e.streams.map((e=>e.id===t.payload.streamId?{...e,muted:!0}:e))};case Ja.UNMUTE:return{...e,streams:e.streams.map((e=>e.id===t.payload.streamId?{...e,muted:!1}:e))};case Ja.SET_HIGHLIGHTED_TILE:return{...e,highlightedTile:t.payload};case Ja.UNSET_HIGHLIGHTED_TILE:return{...e,highlightedTile:null};case Ja.SET_STREAM_PROFILE:return{...e,streams:e.streams.map((e=>e.id===t.payload.streamId?{...e,profile:t.payload.profile}:e))};case Ja.SET_STREAM_SPEAKING:return{...e,streams:e.streams.map((e=>e.id===t.payload.streamId?{...e,isSpeaking:t.payload.isSpeaking}:e))};default:return e}},rs=(0,je.createContext)(void 0),ns=({children:e})=>{const[t,r]=(0,je.useReducer)(ts,es),n={state:t,dispatch:r};return(0,a.jsx)(rs.Provider,{value:n,children:e})},is=()=>{const e=(0,je.useContext)(rs);if(void 0===e)throw new Error("useStreams must be used within a StreamsProvider");return{streams:e.state.streams,highlightedTile:e.state.highlightedTile,dispatch:e.dispatch}};var os=e=>navigator.clipboard?navigator.clipboard.writeText(e):new Promise(((t,r)=>{((e,t,r)=>{const n=document.createRange(),i=document.createElement("textarea");if(i.value=e,document.body.appendChild(i),navigator.userAgent.match(/ipad|ipod|iphone/i)){i.readOnly=!1,i.contentEditable="true",n.selectNodeContents(i);const e=window.getSelection();e&&(e.removeAllRanges(),e.addRange(n)),i.setSelectionRange(0,999999)}else i.focus(),i.select();try{document.execCommand("copy")?t():r(new Error("Copy to clipboard fallback failed"))}catch(e){e instanceof Error?r(e):console.error(e)}document.body.removeChild(i)})(e,t,r)}));const as=yr.path`
358
358
  fill: ${e=>e.theme.logoColor};
359
359
  stroke: ${e=>e.stroke?e.theme.logoColor:"unset"};
360
360
  `,ss=()=>(0,a.jsx)("svg",{width:"17",height:"17",viewBox:"0 0 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(as,{d:"M7.82 15.328c.806 0 1.48-.668 1.243-1.438a4.788 4.788 0 0 0-1.143-1.93 4.579 4.579 0 0 0-3.28-1.396c-1.231 0-2.411.502-3.281 1.395a4.788 4.788 0 0 0-1.143 1.93c-.237.771.438 1.44 1.244 1.44h6.36ZM7.513 0C6.706 0 6.03.668 6.269 1.438a4.788 4.788 0 0 0 1.142 1.93 4.58 4.58 0 0 0 3.281 1.396c1.23 0 2.411-.502 3.281-1.395.531-.545.92-1.209 1.143-1.93C15.353.667 14.678 0 13.872 0h-6.36ZM10.692 13.868c0 .807.67 1.482 1.435 1.227a4.622 4.622 0 0 0 1.846-1.162 4.83 4.83 0 0 0 1.36-3.369 4.83 4.83 0 0 0-1.36-3.369 4.62 4.62 0 0 0-1.846-1.162c-.764-.255-1.435.42-1.435 1.227v6.608ZM4.64 1.46c0-.806-.67-1.482-1.435-1.226a4.62 4.62 0 0 0-1.846 1.161A4.83 4.83 0 0 0 0 4.765a4.83 4.83 0 0 0 1.359 3.368 4.62 4.62 0 0 0 1.846 1.162c.765.255 1.435-.42 1.435-1.226v-6.61Z"})}),cs=()=>(0,a.jsx)("svg",{width:"71",height:"17",viewBox:"17 0 71 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(as,{d:"M27.445 13.543c-1.288 0-2.324-.206-3.107-.618-.773-.422-1.355-.948-1.747-1.576a.327.327 0 0 1 .108-.448l.882-.665a.253.253 0 0 1 .185-.077c.093 0 .18.056.263.17.69 1.112 1.85 1.669 3.477 1.669.712 0 1.314-.129 1.809-.387.505-.257.757-.67.757-1.236 0-.422-.144-.752-.432-.989-.279-.237-.712-.448-1.299-.634-.536-.164-.87-.262-1.005-.293a32.224 32.224 0 0 1-1.916-.603c-.99-.37-1.644-.798-1.963-1.282-.32-.485-.48-.99-.48-1.515 0-.433.135-.896.402-1.39.279-.506.712-.933 1.299-1.283.598-.361 1.345-.541 2.241-.541.938 0 1.726.118 2.365.355.639.227 1.247.608 1.824 1.144.072.072.108.144.108.216 0 .103-.051.186-.155.247l-.989.665a.414.414 0 0 1-.2.077c-.093 0-.181-.046-.263-.139-.619-.66-1.469-.989-2.55-.989-.619 0-1.098.093-1.438.278-.33.186-.551.392-.665.618a1.486 1.486 0 0 0-.154.603c0 .37.144.67.432.896.289.227.716.433 1.283.618.052.021.448.14 1.19.356.464.123.943.263 1.438.417 1.082.36 1.803.82 2.164 1.375.37.557.556 1.093.556 1.608 0 .556-.134 1.087-.402 1.591-.257.505-.716.928-1.375 1.268-.65.33-1.53.494-2.643.494ZM37.403 5.06c.773 0 1.489.226 2.148.679.66.443.99 1.262.99 2.457v4.837c0 .103-.031.186-.093.247-.052.052-.13.078-.232.078H39.21a.374.374 0 0 1-.247-.078.374.374 0 0 1-.077-.247V8.46c-.031-.587-.196-1.051-.495-1.39-.289-.34-.665-.51-1.128-.51-.33 0-.66.092-.99.277-.32.175-.592.448-.819.82-.227.36-.36.813-.402 1.36v4.017c0 .103-.03.186-.092.247-.052.052-.13.078-.232.078h-1.005a.373.373 0 0 1-.247-.078.374.374 0 0 1-.078-.247V5.585c0-.104.026-.18.078-.232a.334.334 0 0 1 .247-.093h1.005c.103 0 .18.03.232.093.061.051.092.128.092.232v.185c0 .072.01.129.031.17.031.03.067.046.108.046.083 0 .191-.056.325-.17a3.58 3.58 0 0 1 .927-.556c.34-.134.66-.2.959-.2ZM49.302 10.916c.02.309.072.551.155.726.082.165.257.294.525.386.165.062.248.15.248.263a.364.364 0 0 1-.047.155l-.432.865c-.083.186-.217.252-.402.201-.598-.134-1.01-.428-1.237-.88-.052-.114-.103-.17-.155-.17-.051 0-.108.04-.17.123-.535.649-1.406.973-2.612.973-.731 0-1.324-.128-1.777-.386-.443-.258-.758-.567-.943-.927-.185-.371-.278-.726-.278-1.066 0-.557.17-1.056.51-1.5.35-.442.87-.752 1.561-.927.474-.113 1.134-.2 1.978-.262.577-.042.995-.083 1.252-.124.206-.03.3-.155.279-.37-.052-.464-.206-.835-.464-1.114-.247-.288-.665-.432-1.252-.432-.381 0-.747.082-1.098.247-.34.155-.602.428-.788.819-.093.196-.227.263-.402.2l-.943-.262c-.164-.051-.247-.139-.247-.262 0-.031.01-.078.031-.14a2.977 2.977 0 0 1 1.221-1.421c.567-.36 1.304-.541 2.21-.541.886 0 1.639.232 2.257.695.618.454.948 1.113.99 1.978.01.412.015.964.015 1.654.01.69.015 1.19.015 1.499Zm-3.864 1.313c.278 0 .582-.067.912-.2.34-.134.639-.366.896-.696.268-.34.433-.793.495-1.36v-.03c0-.104-.03-.181-.093-.233-.061-.061-.144-.082-.247-.061l-.603.061a17.05 17.05 0 0 0-1.638.217 2.807 2.807 0 0 0-1.067.402.898.898 0 0 0-.433.803c0 .423.186.711.557.866.371.154.778.231 1.221.231ZM55.598 5.06c.99 0 1.757.236 2.303.71.547.464.918 1.015 1.113 1.653.196.629.294 1.257.294 1.886 0 .628-.098 1.262-.294 1.9-.195.63-.566 1.18-1.113 1.654-.546.464-1.313.696-2.303.696-.803 0-1.473-.217-2.009-.65-.072-.072-.144-.108-.216-.108-.103 0-.155.088-.155.263v3.245c0 .103-.03.18-.093.232-.051.062-.128.093-.231.093h-.928a.335.335 0 0 1-.247-.093c-.052-.051-.077-.129-.077-.232V5.584c0-.103.025-.18.077-.231a.334.334 0 0 1 .247-.093h.928c.103 0 .18.03.231.093.062.051.093.128.093.232 0 .082.01.149.031.2.031.042.067.062.108.062.052 0 .098-.02.14-.062.545-.484 1.246-.726 2.101-.726Zm-.154 7.077c.793 0 1.375-.273 1.746-.82.382-.545.572-1.215.572-2.008 0-.793-.19-1.463-.572-2.01-.37-.545-.953-.818-1.746-.818-.783 0-1.355.273-1.716.819-.35.536-.525 1.205-.525 2.009 0 .803.175 1.478.525 2.024.36.536.933.804 1.716.804ZM66.122 13.543c-1.174 0-2.19-.253-3.045-.757a4.991 4.991 0 0 1-1.932-2.071c-.433-.886-.649-1.89-.649-3.014 0-1.123.216-2.122.65-2.998a4.97 4.97 0 0 1 1.931-2.086c.856-.505 1.87-.757 3.045-.757 1.113 0 2.077.227 2.89.68a4.896 4.896 0 0 1 1.933 1.9c.03.062.046.12.046.17 0 .114-.077.196-.232.248L69.6 5.15a.342.342 0 0 1-.108.016c-.134 0-.237-.067-.31-.201-.638-1.05-1.658-1.576-3.06-1.576-.865 0-1.582.2-2.148.602a3.541 3.541 0 0 0-1.252 1.592 5.497 5.497 0 0 0-.402 2.117c0 .763.134 1.468.402 2.117a3.555 3.555 0 0 0 1.252 1.577c.566.402 1.283.602 2.148.602.814 0 1.52-.19 2.118-.571.608-.382 1.04-.964 1.298-1.747.072-.195.201-.278.387-.247l1.174.155c.175.03.263.113.263.247a.93.93 0 0 1-.03.154c-.454 1.185-1.114 2.076-1.98 2.674-.855.587-1.931.88-3.23.88ZM79.474 10.916c.02.309.072.551.155.726.082.165.257.294.525.386.165.062.248.15.248.263a.364.364 0 0 1-.047.155l-.433.865c-.082.186-.216.252-.401.201-.598-.134-1.01-.428-1.237-.88-.052-.114-.103-.17-.155-.17-.051 0-.108.04-.17.123-.535.649-1.406.973-2.612.973-.731 0-1.324-.128-1.777-.386-.443-.258-.758-.567-.943-.927-.186-.371-.278-.726-.278-1.066a2.4 2.4 0 0 1 .51-1.5c.35-.442.87-.752 1.56-.927.475-.113 1.134-.2 1.98-.262.576-.042.994-.083 1.251-.124.206-.03.3-.155.278-.37-.051-.464-.206-.835-.463-1.114-.248-.288-.665-.432-1.252-.432-.381 0-.747.082-1.098.247-.34.155-.602.428-.788.819-.093.196-.227.263-.402.2l-.943-.262c-.165-.051-.247-.139-.247-.262 0-.031.01-.078.03-.14a2.979 2.979 0 0 1 1.222-1.421c.567-.36 1.303-.541 2.21-.541.887 0 1.639.232 2.257.695.618.454.948 1.113.99 1.978.01.412.015.964.015 1.654.01.69.015 1.19.015 1.499Zm-3.864 1.313c.278 0 .582-.067.912-.2.34-.134.639-.366.896-.696.268-.34.433-.793.495-1.36v-.03c0-.104-.03-.181-.093-.233-.062-.061-.144-.082-.247-.061l-.603.061c-.67.062-1.216.134-1.638.217a2.808 2.808 0 0 0-1.067.402.898.898 0 0 0-.432.803c0 .423.185.711.556.866.37.154.778.231 1.221.231ZM83.467 13.033c0 .103-.03.185-.092.247-.052.052-.13.077-.232.077h-1.005a.374.374 0 0 1-.247-.077.374.374 0 0 1-.078-.247V2.354c0-.103.026-.18.078-.232a.335.335 0 0 1 .247-.092h1.005c.103 0 .18.03.232.093.061.051.092.128.092.231v10.679ZM87.35 13.033c0 .103-.03.185-.093.247-.051.052-.129.077-.232.077h-1.004a.374.374 0 0 1-.248-.077.374.374 0 0 1-.077-.247V2.354c0-.103.026-.18.078-.232a.334.334 0 0 1 .247-.092h1.004c.103 0 .18.03.232.093.062.051.093.128.093.231v10.679Z",stroke:"#fff",strokeWidth:".5"})}),ls=()=>(0,a.jsxs)("svg",{width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsxs)("g",{clipPath:"url(#clip0_243_300)",children:[(0,a.jsx)("path",{d:"M0 24C0 4.236 4.236 0 24 0C43.764 0 48 4.236 48 24C48 43.764 43.764 48 24 48C4.236 48 0 43.764 0 24Z",fill:"black"}),(0,a.jsx)("path",{d:"M24.15 38.2856C25.7279 38.2856 27.0502 36.9758 26.5626 35.4753C26.1419 34.1801 25.4321 32.9898 24.4746 32.0064C22.853 30.341 20.6537 29.4053 18.3605 29.4053C16.0673 29.4053 13.8679 30.341 12.2464 32.0064C11.2888 32.9898 10.5791 34.1801 10.1583 35.4753C9.67078 36.9758 10.9931 38.2856 12.571 38.2856H24.15Z",fill:"white"}),(0,a.jsx)("path",{d:"M23.8494 9.71436C22.2714 9.71436 20.9491 11.0242 21.4367 12.5249C21.8574 13.8199 22.5672 15.0102 23.5248 15.9937C25.1463 17.6591 27.3456 18.5947 29.6389 18.5947C31.932 18.5947 34.1314 17.6591 35.7529 15.9937C36.7106 15.0102 37.4203 13.8199 37.8409 12.5249C38.3286 11.0242 37.0063 9.71436 35.4283 9.71436H23.8494Z",fill:"white"}),(0,a.jsx)("path",{d:"M29.6387 35.4287C29.6387 37.0067 30.953 38.3301 32.4415 37.8064C33.6767 37.3715 34.8118 36.6509 35.7527 35.6847C37.3744 34.0195 38.2852 31.7606 38.2852 29.4055C38.2852 27.0502 37.3744 24.7915 35.7527 23.1261C34.8118 22.1599 33.6767 21.4393 32.4415 21.0046C30.953 20.4807 29.6387 21.8043 29.6387 23.3823V35.4287Z",fill:"white"}),(0,a.jsx)("path",{d:"M18.3605 12.5712C18.3605 10.9933 17.0461 9.66972 15.5576 10.1936C14.3224 10.6283 13.1872 11.3489 12.2464 12.3151C10.6248 13.9804 9.71387 16.2392 9.71387 18.5944C9.71387 20.9496 10.6248 23.2083 12.2464 24.8737C13.1872 25.8399 14.3224 26.5605 15.5576 26.9952C17.0461 27.5191 18.3605 26.1955 18.3605 24.6176V12.5712Z",fill:"white"})]}),(0,a.jsx)("defs",{children:(0,a.jsx)("clipPath",{id:"clip0_243_300",children:(0,a.jsx)("rect",{width:"48",height:"48",fill:"white"})})})]});var ds=({size:e="large"})=>"small"===e?(0,a.jsx)(ss,{}):"medium"===e?(0,a.jsx)(cs,{}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(ss,{}),(0,a.jsx)(cs,{})]});const us=()=>(0,a.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M19 2H9a3 3 0 0 0-3 3v1H5a3 3 0 0 0-3 3v10a3 3 0 0 0 3 3h10a3 3 0 0 0 3-3v-1h1a3 3 0 0 0 3-3V5a3 3 0 0 0-3-3Zm-3 17a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-7h12v7Zm0-9H4V9a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v1Zm4 5a1 1 0 0 1-1 1h-1V9a3 3 0 0 0-.18-1H20v7Zm0-9H8V5a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v1Z",fill:"#fff"})}),ps=({color:e})=>(0,a.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M21 8.94a1.307 1.307 0 0 0-.06-.27v-.09a1.07 1.07 0 0 0-.19-.28l-6-6a1.071 1.071 0 0 0-.28-.19.32.32 0 0 0-.09 0 .88.88 0 0 0-.33-.11H10a3 3 0 0 0-3 3v1H6a3 3 0 0 0-3 3v10a3 3 0 0 0 3 3h8a3 3 0 0 0 3-3v-1h1a3 3 0 0 0 3-3V8.94Zm-6-3.53L17.59 8H16a1 1 0 0 1-1-1V5.41ZM15 19a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1h1v7a3 3 0 0 0 3 3h5v1Zm4-4a1 1 0 0 1-1 1h-8a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h3v3a3 3 0 0 0 3 3h3v5Z",fill:e||"#fff"})}),hs=({color:e})=>(0,a.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M8 21H4a1 1 0 0 1-1-1v-4a1 1 0 1 0-2 0v4a3 3 0 0 0 3 3h4a1 1 0 0 0 0-2Zm14-6a1 1 0 0 0-1 1v4a1 1 0 0 1-1 1h-4a1 1 0 0 0 0 2h4a3 3 0 0 0 3-3v-4a1 1 0 0 0-1-1ZM20 1h-4a1 1 0 1 0 0 2h4a1 1 0 0 1 1 1v4a1 1 0 0 0 2 0V4a3 3 0 0 0-3-3ZM2 9a1 1 0 0 0 1-1V4a1 1 0 0 1 1-1h4a1 1 0 0 0 0-2H4a3 3 0 0 0-3 3v4a1 1 0 0 0 1 1Zm8-4H6a1 1 0 0 0-1 1v4a1 1 0 0 0 1 1h4a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1ZM9 9H7V7h2v2Zm5 2h4a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v4a1 1 0 0 0 1 1Zm1-4h2v2h-2V7Zm-5 6H6a1 1 0 0 0-1 1v4a1 1 0 0 0 1 1h4a1 1 0 0 0 1-1v-4a1 1 0 0 0-1-1Zm-1 4H7v-2h2v2Zm5-1a1 1 0 0 0 1-1 1 1 0 0 0 0-2h-1a1 1 0 0 0-1 1v1a1 1 0 0 0 1 1Zm4-3a1 1 0 0 0-1 1v3a1 1 0 0 0 0 2h1a1 1 0 0 0 1-1v-4a1 1 0 0 0-1-1Zm-4 4a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z",fill:e||"#fff"})}),fs=()=>(0,a.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"m21.32 9.55-1.89-.63.89-1.78A1 1 0 0 0 20.13 6L18 3.87a1 1 0 0 0-1.15-.19l-1.78.89-.63-1.89A1 1 0 0 0 13.5 2h-3a1 1 0 0 0-.95.68l-.63 1.89-1.78-.89A1 1 0 0 0 6 3.87L3.87 6a1 1 0 0 0-.19 1.15l.89 1.78-1.89.63a1 1 0 0 0-.68.94v3a1 1 0 0 0 .68.95l1.89.63-.89 1.78A1 1 0 0 0 3.87 18L6 20.13a1 1 0 0 0 1.15.19l1.78-.89.63 1.89a1 1 0 0 0 .95.68h3a1 1 0 0 0 .95-.68l.63-1.89 1.78.89a1 1 0 0 0 1.13-.19L20.13 18a1 1 0 0 0 .19-1.15l-.89-1.78 1.89-.63a1 1 0 0 0 .68-.94v-3a1 1 0 0 0-.68-.95ZM20 12.78l-1.2.4A2 2 0 0 0 17.64 16l.57 1.14-1.1 1.1-1.11-.6a2 2 0 0 0-2.79 1.16l-.4 1.2h-1.59l-.4-1.2A2 2 0 0 0 8 17.64l-1.14.57-1.1-1.1.6-1.11a2 2 0 0 0-1.16-2.82l-1.2-.4v-1.56l1.2-.4A2 2 0 0 0 6.36 8l-.57-1.11 1.1-1.1L8 6.36a2 2 0 0 0 2.82-1.16l.4-1.2h1.56l.4 1.2A2 2 0 0 0 16 6.36l1.14-.57 1.1 1.1-.6 1.11a2 2 0 0 0 1.16 2.79l1.2.4v1.59ZM12 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8Zm0 6a2 2 0 1 1 0-4 2 2 0 0 1 0 4Z",fill:"#fff"})}),ms=()=>(0,a.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M4 12a1 1 0 0 0 1 1h7.59l-2.3 2.29a1.002 1.002 0 0 0 .325 1.639 1 1 0 0 0 1.095-.219l4-4a1 1 0 0 0 .21-.33 1 1 0 0 0 0-.76 1 1 0 0 0-.21-.33l-4-4a1.003 1.003 0 1 0-1.42 1.42l2.3 2.29H5a1 1 0 0 0-1 1ZM17 2H7a3 3 0 0 0-3 3v3a1 1 0 0 0 2 0V5a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1v-3a1 1 0 1 0-2 0v3a3 3 0 0 0 3 3h10a3 3 0 0 0 3-3V5a3 3 0 0 0-3-3Z",fill:"#fff"})}),gs=()=>(0,a.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M4.91 13.1a1 1 0 0 0 .85.47A1 1 0 0 0 6.61 12a17 17 0 0 1-2.47-6.85 1 1 0 0 1 .578-1.06A1 1 0 0 1 5.13 4h3a1 1 0 0 1 1 .8c0 .23.08.44.13.67v.13c.116.525.273 1.04.47 1.54l-1.39.66a1 1 0 0 0-.52.57 1 1 0 0 0 0 .77c.1.21.2.42.32.64a1 1 0 0 0 1.755-.028 1 1 0 0 0 .115-.542l.57-.21a2 2 0 0 0 1.05-2.48 9.317 9.317 0 0 1-.39-1.3v-.1c0-.2-.08-.4-.11-.58A3 3 0 0 0 8.16 2h-3a3 3 0 0 0-2.28 1 3 3 0 0 0-.72 2.39 19.05 19.05 0 0 0 2.75 7.71Zm14.61-.21-.6-.11h-.08a9.325 9.325 0 0 1-1.33-.39 2 2 0 0 0-2.47 1l-.21.46a12.392 12.392 0 0 1-1.92-1.37l8.8-8.79a1.004 1.004 0 1 0-1.42-1.42l-18 18a.999.999 0 0 0 0 1.42 1 1 0 0 0 1.42 0l4.59-4.6a19.09 19.09 0 0 0 10.29 4.73c.133.01.267.01.4 0a3 3 0 0 0 2-.75 3 3 0 0 0 1-2.25v-3a3 3 0 0 0-2.47-2.93Zm.48 6a.999.999 0 0 1-.718.96 1 1 0 0 1-.432.03 17.07 17.07 0 0 1-9.14-4.18l1.77-1.77a14.695 14.695 0 0 0 3.38 2.21 1.002 1.002 0 0 0 .77 0 1 1 0 0 0 .57-.52l.62-1.41c.522.194 1.056.35 1.6.47h.11l.69.13a1 1 0 0 1 .78 1v3.08Z",fill:"#D84949"})}),vs=()=>(0,a.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsxs)("g",{clipPath:"url(#pip)",fill:"#fff",children:[(0,a.jsx)("path",{d:"M0 5v10a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3V5a3 3 0 0 0-3-3H3a3 3 0 0 0-3 3Zm17-1a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h14Z"}),(0,a.jsx)("path",{d:"M10 14v4.879a3 3 0 0 0 3 3h8a3 3 0 0 0 3-3V14a3 3 0 0 0-3-3h-8a3 3 0 0 0-3 3ZM10 11.149c0 .113-.02.226-.06.332a.85.85 0 0 1-.8.519H5.736a.851.851 0 0 1 0-1.702h1.353l-2.792-2.8a.851.851 0 1 1 1.2-1.2l2.8 2.8V7.744a.851.851 0 0 1 1.703 0v3.405Z"})]})}),ys=({color:e})=>(0,a.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M19 4H5a3 3 0 0 0-3 3v10a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3V7a3 3 0 0 0-3-3ZM5 18a1 1 0 0 1-1-1v-2.42l3.3-3.29a1 1 0 0 1 1.4 0L15.41 18H5Zm15-1a1 1 0 0 1-1 1h-.77l-3.81-3.83.88-.88a1 1 0 0 1 1.4 0l3.3 3.29V17Zm0-3.24-1.88-1.87a3.06 3.06 0 0 0-4.24 0l-.88.88-2.88-2.88a3.06 3.06 0 0 0-4.24 0L4 11.76V7a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v6.76Z",fill:e||"#fff"})});je=o("85Hg2"),je=o("85Hg2");const bs=(e,t)=>((0,je.useEffect)((()=>{const r=performance.now(),n=n=>{!e?.current?.contains(n.target)&&n.timeStamp>r&&t()};if(e?.current)return window.addEventListener("click",n),()=>window.removeEventListener("click",n)}),[e,t]),null),ws=yr.div`
@@ -403,7 +403,7 @@ to {
403
403
 
404
404
  svg,
405
405
  img {
406
- max-height: 22px;
406
+ max-height: 24px;
407
407
  }
408
408
  `,Cs=yr.span`
409
409
  font-size: 9px;
@@ -487,16 +487,207 @@ to {
487
487
  right: 0;
488
488
  top: 38.5px;
489
489
  z-index: 30;
490
- `;var Is=({baseCategories:e,extraCategories:t})=>{const{t:r}=Fi(),n=(0,je.useRef)(null),[i,o]=(0,je.useState)(!1),[s,c]=(0,je.useState)(e),{options:l}=(0,je.useContext)(Ya);bs(n,(()=>o(!1)));const d=(0,je.useMemo)((()=>{const r=l.settingsShortcuts;if(r){const n=e.reduce(((e,t)=>[...e,...t.items]),[]),i=t?.reduce(((e,t)=>[...e,...t.items]),[])||[];return r.reduce(((e,t)=>{const r=n.find((e=>e.id===t.id));if(r)e.push({...r,displayType:t.displayType});else{const r=i?.find((e=>e.id===t.id));r&&e.push({...r,displayType:t.displayType})}return e}),[])}return[]}),[l.settingsShortcuts,e,t]);(0,je.useEffect)((()=>{const r=[...e.map((e=>({...e,items:[...e.items]})))];t?.forEach((e=>{const t=r.find((t=>t.id===e.id));if(t)e.items.forEach((e=>{const r=Number(e.position),n=isNaN(r)?t.items.length:r;t.items.splice(n,0,e)}));else{const t=Number(e.position),n=isNaN(t)?r.length:t;r.splice(n,0,e)}}));const n=r.map((e=>{const t=e.items.map((e=>({...e,action:()=>{e.action(),o(!1)}})));return{...e,items:t}}));c(n)}),[e,t]);return(0,a.jsxs)(js,{children:[d.map((e=>"full"===e.displayType?(0,a.jsxs)(Ls,{onClick:e.action,children:[e.jsxIcon&&e.jsxIcon,e.srcIcon&&(0,a.jsx)("img",{alt:e.title,src:e.srcIcon}),e.title]},e.id):(0,a.jsxs)(Os,{onClick:e.action,children:[e.jsxIcon&&e.jsxIcon,e.srcIcon&&(0,a.jsx)("img",{alt:e.title,src:e.srcIcon})]},e.id))),l.showMenuButton&&(0,a.jsxs)(Ms,{children:[(0,a.jsx)(Ls,{onClick:()=>o((e=>!e)),children:r("menu.title")}),i&&(0,a.jsx)(Ds,{ref:n,children:(0,a.jsx)(Es,{categories:s})})]})]})};const As=({width:e,cellAspectRatio:t,tileCount:r})=>{const n=Math.round(e/t),i=Math.round(e);return r<=1?{width:i,height:n,tileRects:[{origin:{x:0,y:0},bounds:{width:i,height:n}}],tileCount:r}:(({width:e,height:t,tileCount:r})=>{const n=Math.min(r,12);let i=0,o=0;n<=2?(i=2,o=1):n<=4?(i=2,o=2):n<=6?(i=3,o=2):n<=9?(i=3,o=3):(i=4,o=3);const a={width:Math.round(e/i),height:Math.round(t/o)},s=[...Array(n)].map(((e,t)=>({origin:{x:Math.floor(t%i)*a.width,y:Math.floor(t/i)*a.height},bounds:a})));return{width:a.width*i,height:a.height*o,tileRects:s,tileCount:n}})({width:i,height:n,tileCount:r})};const Ns=new class{constructor(){this.started=!1,this.fps=18,this.devicePixelRatio=window.devicePixelRatio||1,this.layout=null,this.canvas=document.createElement("canvas"),this.ctx=this.canvas.getContext("2d"),this.ctx&&(this.ctx.fillStyle="#000",this.ctx.fillRect(0,0,this.canvas.width,this.canvas.height)),this.video=document.createElement("video"),this.video.muted=!0,this.video.autoplay=!0,this.video.playsInline=!0,this.video.addEventListener("enterpictureinpicture",this.onEnterPictureInPicture.bind(this)),this.video.addEventListener("leavepictureinpicture",this.onLeavePictureInPicture.bind(this)),this.tiles=[]}async start(){this.tiles.length?(this.video.srcObject=this.canvas.captureStream(this.fps),document.pictureInPictureElement&&document.exitPictureInPicture(),this.canvas.width=this.layout?.width||50,this.canvas.height=this.layout?.height||33,await this.video.play(),await this.video.requestPictureInPicture(),this.draw()):(0,v.toast)(Si.t("notifications.noCamera"),{className:"error"})}setTiles(e){this.tiles=e,this.layout=As({width:300*this.devicePixelRatio,cellAspectRatio:1.5,tileCount:e.length}),this.started&&this.draw()}onEnterPictureInPicture(){this.started=!0}onLeavePictureInPicture(){this.started=!1,this.video.srcObject=null}draw(){this.ctx&&this.started&&(this.ctx.fillStyle="#1f1f1f",this.ctx.fillRect(0,0,this.canvas.width,this.canvas.height),this.tiles.length?(this.tiles.forEach(((e,t)=>{const r=document.body.querySelectorAll(`[data-peer-id='${e.id}'] video`)[0];if(!r)return console.warn(`MultiPiP: No video found for peer ${e.id}`);const n=this.layout?.tileRects[t];if(!n)return;this.ctx?.save();const{videoWidth:i,videoHeight:o}=r,{width:a,height:s}=n.bounds,c=Math.max(a/i,s/o),l=i/(i*c/a),d=o/(o*c/s),u=.5*(i-l),p=.5*(o-d),h=n.origin.x+5,f=n.origin.y+5,m=a-10,g=s-10;this.makeRoundedRect({ctx:this.ctx,x:h,y:f,width:m,height:g,radius:10}),this.ctx?.clip(),this.ctx?.drawImage(r,u,p,l,d,h,f,m,g),this.ctx?.restore()})),requestAnimationFrame(this.draw.bind(this))):document.exitPictureInPicture())}makeRoundedRect({ctx:e,x:t,y:r,width:n,height:i,radius:o}){e&&(e.beginPath(),e.moveTo(t+o,r),e.lineTo(t+n-o,r),e.quadraticCurveTo(t+n,r,t+n,r+o),e.lineTo(t+n,r+i-o),e.quadraticCurveTo(t+n,r+i,t+n-o,r+i),e.lineTo(t+o,r+i),e.quadraticCurveTo(t,r+i,t,r+i-o),e.lineTo(t,r+o),e.quadraticCurveTo(t,r,t+o,r),e.closePath())}},Fs=zi.parse(window.navigator.userAgent);var zs=()=>{const{t:e}=Fi(),{setIsQuickConnectPopupVisible:t,setIsSettingsMenuVisible:n,setIsVirtualBackgroundPopupVisible:i,options:o,muted:s,streaming:c,permissions:l,plan:d,setBlockedFeaturePopupOpen:u}=(0,je.useContext)(Ya),{streams:p}=is(),[f,m]=(0,je.useState)(o.extraSettingsOptions||[]),g=e=>{const{extraOptions:t}=e.detail;m(t)},y=()=>{Ns.start()};(0,je.useEffect)((()=>{const e=p.filter((e=>e.webcam)).map((e=>({id:e.id})));Ns.setTiles(e)}),[p]),(0,je.useEffect)((()=>(window.addEventListener("streamUISetExtraSettingsOptions",g),()=>{window.removeEventListener("streamUISetExtraSettingsOptions",g)})),[]);const b=(0,je.useMemo)((()=>{const d=[{id:"1",items:[{id:"openNewTab",title:e("menu.openNewTab"),jsxIcon:(0,a.jsx)(us,{}),action:()=>{const e=new URL(o.sharedURL||window.location.href),t=s?"0":"1";e.searchParams.set("microphone-enabled",t);const r=c?"1":"0";e.searchParams.set("camera-enabled",r),window.open(e.href,"_blank"),Qa.endCall()}}]},{id:"2",items:[{id:"copyLink",title:e("copyLink.title"),jsxIcon:(0,a.jsx)(ps,{}),action:async()=>{try{await os(o.sharedURL||window.location.href),r(v)(e("copyLink.copied"),{duration:2e3})}catch(t){console.warn(t),r(v)(e("copyLink.error"),{className:"error"})}}},{id:"quickConnect",title:e("quickConnect.title"),jsxIcon:(0,a.jsx)(hs,{}),action:()=>{l.find((e=>"quick_connect"===e))?(t(!0),h.event("quickConnectClick")):u(!0)}}]},{id:"3",items:[{id:"settings",title:e("settings.title"),jsxIcon:(0,a.jsx)(fs,{}),action:()=>{n(!0)}}]}];return"desktop"===Fs.platform.type&&"Blink"===Fs.engine.name&&d[2].items.unshift({id:"virtualBackground",title:e("virtualBackground.title"),jsxIcon:(0,a.jsx)(ys,{}),action:()=>{l.find((e=>"virtual_background"===e))?i(!0):u(!0)}}),document.pictureInPictureEnabled&&"desktop"===Fs.platform.type&&d[0].items.push({id:"pip",title:e("menu.pictureInPicture"),jsxIcon:(0,a.jsx)(vs,{}),action:y}),d}),[e,o.sharedURL,s,c,l,t,u,n,i]);return(0,a.jsxs)(Ps,{children:[(0,a.jsxs)(Rs,{children:[(0,a.jsx)(ds,{size:o.logo?.size}),o.logo?.text&&(0,a.jsx)(Ts,{children:o.logo?.text}),"individual"===d&&(0,a.jsx)(Ts,{children:`${o.logo?.text?" · ":""}${e("header.free")}`})]}),(0,a.jsx)(Is,{baseCategories:b,extraCategories:f})]})};je=o("85Hg2"),je=o("85Hg2");const Bs=e=>{const[t,r]=(0,je.useState)([0,0]);return(0,je.useLayoutEffect)((()=>{if(e){const t=new ResizeObserver((()=>r([e?.offsetWidth||0,e?.offsetHeight||0])));return t.observe(e),()=>t.unobserve(e)}}),[e]),t},Us={bottom:0,height:0,left:0,right:0,top:0,width:0,x:0,y:0};function Vs(){const[e,t]=(0,je.useState)(null),[r,n]=(0,je.useState)(Us);return(0,je.useLayoutEffect)((()=>{if(!e)return;const t=new ResizeObserver((e=>n(e[0].contentRect)));return t.observe(e),()=>{t.disconnect()}}),[e]),[t,r]}je=o("85Hg2");var Hs=({slash:e,redSlash:t,status:r,deviceRequest:n})=>e?(0,a.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("path",{d:"M12 15a4 4 0 0 0 4-4V5a4 4 0 1 0-8 0v6a4 4 0 0 0 4 4ZM10 5a2 2 0 1 1 4 0v6a2 2 0 0 1-4 0V5Zm10 6a1 1 0 0 0-2 0 6 6 0 1 1-12 0 1 1 0 1 0-2 0 8 8 0 0 0 7 7.93V21H9a1 1 0 0 0 0 2h6a1 1 0 0 0 0-2h-2v-2.07A8 8 0 0 0 20 11Z",fill:"#fff"}),(0,a.jsx)("path",{d:"M4.005 1.53A1.75 1.75 0 1 0 1.53 4.005l19.446 19.446a1.75 1.75 0 1 0 2.475-2.475L4.005 1.53Z",fill:"#fff",stroke:"#d84949",strokeLinecap:"round"})]}):t?(0,a.jsxs)("svg",{width:"25",height:"25",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("path",{d:"M12 15a4 4 0 0 0 4-4V5a4 4 0 1 0-8 0v6a4 4 0 0 0 4 4ZM10 5a2 2 0 1 1 4 0v6a2 2 0 0 1-4 0V5Zm10 6a1 1 0 0 0-2 0 6 6 0 1 1-12 0 1 1 0 1 0-2 0 8 8 0 0 0 7 7.93V21H9a1 1 0 0 0 0 2h6a1 1 0 0 0 0-2h-2v-2.07A8 8 0 0 0 20 11Z",fill:"#d84949"}),(0,a.jsx)("path",{d:"M4.005 1.53A1.75 1.75 0 1 0 1.53 4.005l19.446 19.446a1.75 1.75 0 1 0 2.475-2.475L4.005 1.53Z",fill:"#d84949",stroke:"#242324",strokeLinecap:"round"})]}):r?(0,a.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M6.125 2.176a1.167 1.167 0 0 1 1.72-.082c.211.222.326.517.321.823v1.99a.583.583 0 1 0 1.167 0v-1.99A2.333 2.333 0 0 0 5.25 1.44a.583.583 0 1 0 .875.735Zm4.795 5.565h.117a.583.583 0 0 0 .583-.472c.042-.282.057-.567.046-.852a.584.584 0 0 0-1.166 0c0 .215-.022.43-.064.642a.583.583 0 0 0 .484.682Zm1.75 3.535L2.17.776a.583.583 0 1 0-.829.823l3.325 3.348v1.47a2.333 2.333 0 0 0 3.5 2.018l.852.852A3.5 3.5 0 0 1 3.5 6.417a.583.583 0 0 0-1.167 0 4.667 4.667 0 0 0 4.083 4.626v1.207H5.25a.583.583 0 0 0 0 1.167h3.5a.583.583 0 0 0 0-1.167H7.583v-1.207a4.59 4.59 0 0 0 2.246-.928l1.983 1.984a.584.584 0 0 0 .829-.823h.029ZM7 7.584a1.167 1.167 0 0 1-1.167-1.167v-.303l1.43 1.435A1.015 1.015 0 0 1 7 7.584Z",fill:"#fff"})}):n?(0,a.jsxs)("svg",{width:"30",height:"30",viewBox:"0 0 30 30",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("path",{d:"M25 13.75a1.25 1.25 0 0 0-2.5 0 7.5 7.5 0 1 1-15 0 1.25 1.25 0 0 0-2.5 0 10 10 0 0 0 8.75 9.913v2.587h-2.5a1.25 1.25 0 0 0 0 2.5h7.5a1.25 1.25 0 0 0 0-2.5h-2.5v-2.587A10 10 0 0 0 25 13.75Z",fill:"url(#microphoneBottom)"}),(0,a.jsx)("path",{d:"M15 18.75a5 5 0 0 0 5-5v-7.5a5 5 0 0 0-10 0v7.5a5 5 0 0 0 5 5Z",fill:"url(#microphoneTop)"})]}):(0,a.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M12 15a4 4 0 0 0 4-4V5a4 4 0 1 0-8 0v6a4 4 0 0 0 4 4ZM10 5a2 2 0 1 1 4 0v6a2 2 0 0 1-4 0V5Zm10 6a1 1 0 0 0-2 0 6 6 0 1 1-12 0 1 1 0 1 0-2 0 8 8 0 0 0 7 7.93V21H9a1 1 0 0 0 0 2h6a1 1 0 0 0 0-2h-2v-2.07A8 8 0 0 0 20 11Z",fill:"#fff"})});var qs=({slash:e,status:t,deviceRequest:r})=>e?(0,a.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("path",{d:"M21.53 7.15a1 1 0 0 0-1 0L17 8.89A3 3 0 0 0 14 6H5a3 3 0 0 0-3 3v6a3 3 0 0 0 3 3h9a3 3 0 0 0 3-2.89l3.56 1.78A1 1 0 0 0 21 17a1 1 0 0 0 .875-.514A1 1 0 0 0 22 16V8a1 1 0 0 0-.47-.85ZM15 15a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1h9a1 1 0 0 1 1 1v6Zm5-.62-3-1.5v-1.76l3-1.5v4.76Z",fill:"#fff"}),(0,a.jsx)("path",{d:"M4.005 1.53A1.75 1.75 0 1 0 1.53 4.005l19.446 19.446a1.75 1.75 0 1 0 2.475-2.475L4.005 1.53Z",fill:"#fff",stroke:"#d84949",strokeLinecap:"round"})]}):t?(0,a.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M4.497 3.669 2.164 1.336a.586.586 0 1 0-.828.828L2.695 3.5a1.75 1.75 0 0 0-1.529 1.75v3.5a1.75 1.75 0 0 0 1.75 1.75h5.25a1.75 1.75 0 0 0 1.109-.403l2.56 2.567a.583.583 0 0 0 .957-.19.582.582 0 0 0-.128-.638L4.497 3.669Zm3.67 5.664h-5.25a.583.583 0 0 1-.584-.583v-3.5a.583.583 0 0 1 .583-.584h.928l4.59 4.597a.583.583 0 0 1-.268.07Zm4.392-5.162a.583.583 0 0 0-.583 0l-2.06 1.015A1.75 1.75 0 0 0 8.166 3.5h-.781a.583.583 0 0 0 0 1.166h.781a.583.583 0 0 1 .584.584v.875a.944.944 0 0 0 0 .11.38.38 0 0 0 .029.117s.03.035.04.059a.584.584 0 0 0 .088.122s.059.035.088.058l.099.065c.044.006.09.006.134 0a.41.41 0 0 0 .082 0 .949.949 0 0 0 .11 0 .38.38 0 0 0 .117-.03l2.13-1.015v3.337a.583.583 0 0 0 1.166 0V4.666a.584.584 0 0 0-.274-.495Z",fill:"#fff"})}):r?(0,a.jsxs)("svg",{width:"30",height:"30",viewBox:"0 0 30 30",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("path",{d:"M26.54 8.438c.23 0 .456.06.656.176a1.315 1.315 0 0 1 .617 1.117v10.517a1.318 1.318 0 0 1-.617 1.117 1.31 1.31 0 0 1-.696.198 1.31 1.31 0 0 1-.578-.145l-4.672-2.34v-8.177l4.633-2.287c.2-.116.426-.177.656-.177Z",fill:"url(#cameraRight)"}),(0,a.jsx)("path",{d:"M20.104 8.55a3.75 3.75 0 0 1 1.146 2.563v7.775A3.75 3.75 0 0 1 17.5 22.5H6.25a3.75 3.75 0 0 1-3.75-3.75v-7.5A3.75 3.75 0 0 1 6.25 7.5H17.5a3.75 3.75 0 0 1 2.604 1.05Z",fill:"url(#cameraLeft)"})]}):(0,a.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M21.53 7.15a1 1 0 0 0-1 0L17 8.89A3 3 0 0 0 14 6H5a3 3 0 0 0-3 3v6a3 3 0 0 0 3 3h9a3 3 0 0 0 3-2.89l3.56 1.78A1 1 0 0 0 21 17a1 1 0 0 0 .875-.514A1 1 0 0 0 22 16V8a1 1 0 0 0-.47-.85ZM15 15a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1h9a1 1 0 0 1 1 1v6Zm5-.62-3-1.5v-1.76l3-1.5v4.76Z",fill:"#fff"})});const Ws=yr.path`
490
+ `;var Is=({baseCategories:e,extraCategories:t})=>{const{t:r}=Fi(),n=(0,je.useRef)(null),[i,o]=(0,je.useState)(!1),[s,c]=(0,je.useState)(e),{options:l,headless:d}=(0,je.useContext)(Ya);bs(n,(()=>o(!1)));const u=(0,je.useMemo)((()=>{const r=l.settingsShortcuts;if(r){const n=e.reduce(((e,t)=>[...e,...t.items]),[]),i=t?.reduce(((e,t)=>[...e,...t.items]),[])||[];return r.reduce(((e,t)=>{const r=n.find((e=>e.id===t.id));if(r)e.push({...r,displayType:t.displayType});else{const r=i?.find((e=>e.id===t.id));r&&e.push({...r,displayType:t.displayType})}return e}),[])}return[]}),[l.settingsShortcuts,e,t]);(0,je.useEffect)((()=>{const r=[...e.map((e=>({...e,items:[...e.items]})))];t?.forEach((e=>{const t=r.find((t=>t.id===e.id));if(t)e.items.forEach((e=>{const r=Number(e.position),n=isNaN(r)?t.items.length:r;t.items.splice(n,0,e)}));else{const t=Number(e.position),n=isNaN(t)?r.length:t;r.splice(n,0,e)}}));const n=r.map((e=>{const t=e.items.map((e=>({...e,action:()=>{e.action(),o(!1)}})));return{...e,items:t}}));c(n)}),[e,t]);return d?null:(0,a.jsxs)(js,{children:[u.map((e=>"full"===e.displayType?(0,a.jsxs)(Ls,{onClick:e.action,children:[e.jsxIcon&&e.jsxIcon,e.srcIcon&&(0,a.jsx)("img",{alt:e.title,src:e.srcIcon}),e.title]},e.id):(0,a.jsxs)(Os,{onClick:e.action,children:[e.jsxIcon&&e.jsxIcon,e.srcIcon&&(0,a.jsx)("img",{alt:e.title,src:e.srcIcon})]},e.id))),l.showMenuButton&&(0,a.jsxs)(Ms,{children:[(0,a.jsx)(Ls,{onClick:()=>o((e=>!e)),children:r("menu.title")}),i&&(0,a.jsx)(Ds,{ref:n,children:(0,a.jsx)(Es,{categories:s})})]})]})};const As=({width:e,cellAspectRatio:t,tileCount:r})=>{const n=Math.round(e/t),i=Math.round(e);return r<=1?{width:i,height:n,tileRects:[{origin:{x:0,y:0},bounds:{width:i,height:n}}],tileCount:r}:(({width:e,height:t,tileCount:r})=>{const n=Math.min(r,12);let i=0,o=0;n<=2?(i=2,o=1):n<=4?(i=2,o=2):n<=6?(i=3,o=2):n<=9?(i=3,o=3):(i=4,o=3);const a={width:Math.round(e/i),height:Math.round(t/o)},s=[...Array(n)].map(((e,t)=>({origin:{x:Math.floor(t%i)*a.width,y:Math.floor(t/i)*a.height},bounds:a})));return{width:a.width*i,height:a.height*o,tileRects:s,tileCount:n}})({width:i,height:n,tileCount:r})};const Ns=()=>(0,a.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",children:[(0,a.jsx)("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z"}),(0,a.jsx)("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M8 9.6c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C8.76 8 9.04 8 9.6 8h4.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C16 8.76 16 9.04 16 9.6v4.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437C15.24 16 14.96 16 14.4 16H9.6c-.56 0-.84 0-1.054-.109a1 1 0 0 1-.437-.437C8 15.24 8 14.96 8 14.4V9.6Z"})]}),Fs=()=>(0,a.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",children:[(0,a.jsx)("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Z"}),(0,a.jsx)("circle",{cx:"12",cy:"12",r:"6",fill:"#fff"})]}),zs=()=>(0,a.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none",children:[(0,a.jsx)("circle",{cx:"8",cy:"8",r:"8",fill:"#FE463A",opacity:".5"}),(0,a.jsx)("circle",{cx:"8",cy:"8",r:"5",fill:"#FE463A"})]});je=o("85Hg2"),je=o("85Hg2");var Bs=({color:e})=>(0,a.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1.004 1.004 0 0 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1.004 1.004 0 1 0-1.42-1.42Zm8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1.004 1.004 0 0 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.471 2.471 0 0 1 0 3.5l-3.88 3.88a1.002 1.002 0 0 0 .325 1.639.999.999 0 0 0 1.095-.219l3.88-3.89a4.49 4.49 0 0 0 0-6.33ZM8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1.004 1.004 0 0 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42Z",fill:e||"#fff"})});var Us=({color:e="#fff"})=>(0,a.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"m13.41 12 6.3-6.29a1.004 1.004 0 0 0-1.42-1.42L12 10.59l-6.29-6.3a1.004 1.004 0 1 0-1.42 1.42l6.3 6.29-6.3 6.29a.999.999 0 0 0 0 1.42 1 1 0 0 0 1.42 0l6.29-6.3 6.29 6.3a1.001 1.001 0 0 0 1.639-.325 1 1 0 0 0-.22-1.095L13.41 12Z",fill:e})});var Vs=()=>(0,a.jsx)("svg",{width:"21",height:"20",viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M11.091 6.908a.833.833 0 0 0-.275-.175.833.833 0 0 0-.633 0 .833.833 0 0 0-.275.175l-2.5 2.5a.837.837 0 1 0 1.183 1.184l1.075-1.084V12.5a.833.833 0 1 0 1.667 0V9.508l1.075 1.084a.833.833 0 0 0 1.183 0 .833.833 0 0 0 0-1.184l-2.5-2.5Zm-.592-5.242a8.333 8.333 0 1 0 0 16.667 8.333 8.333 0 0 0 0-16.666Zm0 15a6.667 6.667 0 1 1 0-13.334 6.667 6.667 0 0 1 0 13.334Z",fill:"#fff"})});je=o("85Hg2");var Hs=()=>(0,a.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M15.71 12.71a6 6 0 1 0-7.42 0 10 10 0 0 0-6.22 8.18 1.006 1.006 0 1 0 2 .22 8 8 0 0 1 15.9 0 1 1 0 0 0 1 .89h.11a1 1 0 0 0 .88-1.1 10 10 0 0 0-6.25-8.19ZM12 12a4 4 0 1 1 0-8 4 4 0 0 1 0 8Z",fill:"#fff"})});const qs=yr.div`
491
+ max-width: 100%;
492
+ margin-top: 60px;
493
+ margin-bottom: 20px;
494
+ padding: 0 25px;
495
+ box-sizing: border-box;
496
+ `,Ws=yr.div`
497
+ font-size: 20px;
498
+ font-weight: 700;
499
+ margin-bottom: 30px;
500
+ `,$s=yr.div`
501
+ display: flex;
502
+ flex-direction: column;
503
+ gap: 17px;
504
+ `,Ks=yr.img`
505
+ border-radius: 8px;
506
+ width: 36px;
507
+ height: 36px;
508
+ `,Gs=yr.div`
509
+ display: flex;
510
+ justify-content: center;
511
+ align-items: center;
512
+ background-color: #2d2d2d;
513
+ width: 100%;
514
+ border-radius: 50px;
515
+ color: #fff;
516
+ font-size: 7px;
517
+ font-weight: 700;
518
+
519
+ svg {
520
+ width: 8px;
521
+ height: 8px;
522
+ }
523
+ `,Zs=e=>{const{roomId:t}=Qa.getState();if(t){const r=`stream_share_history_${t}`;try{const t=localStorage.getItem(r);if(t){const n=JSON.parse(t);n.push({...e,id:n.length});const i=JSON.stringify(n);localStorage.setItem(r,i)}else{const t=JSON.stringify([{...e,id:0}]);localStorage.setItem(r,t)}}catch(e){console.warn(e)}}else console.warn("Undefined room ID")},Qs=()=>{const{t:e}=Fi(),[t,r]=(0,je.useState)([]);return(0,je.useEffect)((()=>{try{const{roomId:e}=Qa.getState(),t=localStorage.getItem(`stream_share_history_${e}`);if(t){const e=JSON.parse(t);r(e)}}catch(e){console.warn(e)}}),[]),t.length<1?null:(0,a.jsxs)(qs,{children:[(0,a.jsx)(Ws,{children:e("sharedHistory.shared")}),(0,a.jsx)($s,{children:t.map((e=>{let t;return e.statusText&&(t={text:"From",boldText:e.statusText},e.statusIconUrl&&(t.icon=e.statusIconUrl),e.statusIconLetter&&(t.icon=(0,a.jsx)(Gs,{children:e.statusIconLetter.slice(0,1).toUpperCase()})),e.statusIconUser&&(t.icon=(0,a.jsx)(Gs,{children:(0,a.jsx)(Hs,{})}))),(0,a.jsx)(Or,{options:{width:"325px",backgroundColor:"#2d2d2d",ellipsis:!0,icon:e.iconUrl?(0,a.jsx)(Ks,{style:{...e.iconStyle},src:e.iconUrl,onError:Tr}):void 0,button:{text:"Open",action:()=>window.open(e.url,"_blank"),style:{backgroundColor:"#515151",border:"2px solid #515151"}},status:t},children:e.title},e.id)}))})]})},Ys=()=>(0,a.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M20.437 7.104a3.825 3.825 0 0 0-.573-.523 4.727 4.727 0 0 0-1.158-3.74C17.622 1.619 15.775 1 13.214 1H7a1.892 1.892 0 0 0-1.863 1.592l-2.59 16.406a1.533 1.533 0 0 0 1.516 1.785h2.664l-.082.52A1.467 1.467 0 0 0 8.093 23h3.235a1.762 1.762 0 0 0 1.75-1.47l.641-4.031.01-.055h.3c4.032 0 6.55-1.993 7.285-5.762a5.15 5.15 0 0 0-.877-4.578Zm-12.595 6.6-.714 4.535-.087.544H4.606L7.097 3h6.117c1.936 0 3.318.404 3.992 1.164a2.966 2.966 0 0 1 .608 2.733l-.018.113c-.012.076-.023.15-.044.246a5.847 5.847 0 0 1-2.005 3.67 6.678 6.678 0 0 1-4.217 1.183H9.706a1.88 1.88 0 0 0-1.864 1.595ZM19.351 11.3c-.55 2.828-2.242 4.145-5.322 4.145h-.484a1.762 1.762 0 0 0-1.75 1.473l-.65 4.074L8.717 21l.478-3.034.611-3.853h1.72c.156 0 .295-.023.448-.029.359-.012.716-.026 1.053-.067.205-.026.393-.073.59-.11.272-.05.545-.1.8-.17.191-.053.369-.122.55-.186a7.68 7.68 0 0 0 .698-.279c.168-.079.328-.167.486-.257a6.745 6.745 0 0 0 1.027-.713 6.56 6.56 0 0 0 .537-.519c.113-.12.23-.237.334-.367.173-.221.334-.452.48-.693.076-.122.161-.235.231-.363.203-.371.377-.757.521-1.154.009-.024.021-.044.03-.068.004-.01.01-.02.014-.032.198.717.207 1.472.026 2.193Z",fill:"#fff"})}),Js=()=>(0,a.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:[(0,a.jsx)("rect",{width:"14",height:"14",rx:"7",fill:"#fff"}),(0,a.jsx)("rect",{width:"14",height:"14",rx:"7",fill:"url(#paypalPattern)"}),(0,a.jsxs)("defs",{children:[(0,a.jsx)("pattern",{id:"paypalPattern",patternContentUnits:"objectBoundingBox",width:"1",height:"1",children:(0,a.jsx)("use",{xlinkHref:"#paypalImage",transform:"matrix(.00308 0 0 .00308 .154 .154)"})}),(0,a.jsx)("image",{id:"paypalImage",width:"225",height:"225",xlinkHref:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOEAAADhCAIAAACx0UUtAAAMbWlDQ1BJQ0MgUHJvZmlsZQAASImVVwdYU8kWnltSSWgBBKSE3gSRGkBKCC2A9CLYCEkgocSYEFTsZVHBtYsI2NBVEcW2AmLHriyKvS8WVJR1URcbKm9CArruK9+b75s7/z1z5j/lztx7DwBaH3hSaR6qDUC+pECWEB7MHJ2WziQ9BRggAACcAJnHl0vZcXHR8A4MjH9v724ARDledVZy/XP+vzZdgVDOBwAZC3GmQM7Ph/g4AHgVXyorAIColFtNLpAq8WyI9WTQQYhXKXG2Cm9X4kwVPtyvk5TAgfgyAGQajyfLBkDzHpQzC/nZkEfzM8SuEoFYAoDWMIgD+CKeAGKl78Py8ycqcTnE9lBfCjH0B7Ayv+PM/ht/5iA/j5c9iFVx9TdyiFguzeNN/T9T879bfp5iwIYt7DSRLCJBGT/M4a3ciVFKTIO4S5IZE6vMNcQfxAJV3gFAqSJFRLJKHzXhyzkwf8AAYlcBLyQKYhOIwyR5MdFqeWaWOIwLMdwt6BRxATcJYkOIFwrloYlqnY2yiQlqW2h9lozDVsvP8WT9dpW2Hihyk9lq/jciIVfNj2kWiZJSIaZCbF0oTomBWBNiF3luYpRaZ2SRiBMzoCNTJCj9t4Y4QSgJD1bxY4VZsrAEtX5JvnwgXmyjSMyNUeN9BaKkCFV+sFN8Xr//MBbsslDCTh7gEcpHRw/EIhCGhKpix54LJcmJap4P0oLgBNVanCrNi1Pr45bCvHCl3BJiD3lhonotnlIAN6eKH8+SFsQlqfzEi3J4kXEqf/BlIBpwQAhgAgXsmWAiyAHi1q6GLninmgkDPCAD2UAInNWSgRWp/TMSeE0EReAPiIRAPrguuH9WCAqh/MugVHV1Bln9s4X9K3LBU4jzQRTIg/eK/lWSQWsp4AmUiP9hnQc7H/qbB7ty/t/LB6TfJGwoiVZLFAMWmVoDmsRQYggxghhGdMCN8QDcD4+G1yDY3XAW7jMQxzd9wlNCG+ER4TqhnXB7gniu7AcvR4F2yB+mzkXm97nAbSGnJx6M+0N2yIwb4MbAGfeAdth4ILTsCaUctd/KrDB/4P5bBN89DbUexZWCUoZQgij2P67UdNT0HGRR5vr7/Kh8zRzMN2dw5kf7nO+yL4Bj1I+a2EJsP3YWO4Gdxw5jDYCJHcMasRbsiBIP7q4n/btrwFpCvz+5kEf8D3s8tU1lJuWuta6drp9VcwXCKQXKg8eZKJ0qE2eLCphs+HUQMrkSvsswppurmxsAym+N6vX1Nr7/G4IYtHyTzfsdAP9jfX19h77JIo8BsNcbHv+D32T2LAB0NAA4d5CvkBWqZLjyQoBvCS140oyAGbAC9jAeN+AF/EAQCAWRIBYkgTQwHmZZBPe5DEwG08EcUAxKwTKwGlSADWAz2A52gX2gARwGJ8AZcBFcBtfBXbh7OsBL0A3egV4EQUgIHWEgRog5YoM4IW4ICwlAQpFoJAFJQzKQbESCKJDpyDykFFmBVCCbkBpkL3IQOYGcR9qQ28hDpBN5g3xCMZSG6qGmqC06HGWhbDQKTULHodnoJLQInY8uQcvRanQnWo+eQC+i19F29CXagwFMAzPALDBnjIVxsFgsHcvCZNhMrAQrw6qxOqwJPuerWDvWhX3EiTgDZ+LOcAdH4Mk4H5+Ez8QX4xX4drweP4VfxR/i3fhXAp1gQnAi+BK4hNGEbMJkQjGhjLCVcIBwGp6lDsI7IpFoQLQjesOzmEbMIU4jLiauI+4mHie2ER8Te0gkkhHJieRPiiXxSAWkYtJa0k7SMdIVUgfpA1mDbE52I4eR08kS8lxyGXkH+Sj5CvkZuZeiTbGh+FJiKQLKVMpSyhZKE+USpYPSS9Wh2lH9qUnUHOocajm1jnqaeo/6VkNDw1LDRyNeQ6wxW6NcY4/GOY2HGh9pujRHGoc2lqagLaFtox2n3aa9pdPptvQgejq9gL6EXkM/SX9A/6DJ0HTR5GoKNGdpVmrWa17RfKVF0bLRYmuN1yrSKtPar3VJq0ubom2rzdHmac/UrtQ+qH1Tu0eHoTNCJ1YnX2exzg6d8zrPdUm6trqhugLd+bqbdU/qPmZgDCsGh8FnzGNsYZxmdOgR9ez0uHo5eqV6u/Ra9br1dfU99FP0p+hX6h/RbzfADGwNuAZ5BksN9hncMPg0xHQIe4hwyKIhdUOuDHlvONQwyFBoWGK42/C64ScjplGoUa7RcqMGo/vGuLGjcbzxZOP1xqeNu4bqDfUbyh9aMnTf0DsmqImjSYLJNJPNJi0mPaZmpuGmUtO1pidNu8wMzILMcsxWmR016zRnmAeYi81XmR8zf8HUZ7KZecxy5ilmt4WJRYSFwmKTRatFr6WdZbLlXMvdlvetqFYsqyyrVVbNVt3W5tajrKdb11rfsaHYsGxENmtsztq8t7WzTbVdYNtg+9zO0I5rV2RXa3fPnm4faD/Jvtr+mgPRgeWQ67DO4bIj6ujpKHKsdLzkhDp5OYmd1jm1DSMM8xkmGVY97KYzzZntXOhc6/zQxcAl2mWuS4PLq+HWw9OHLx9+dvhXV0/XPNctrndH6I6IHDF3RNOIN26Obny3Srdr7nT3MPdZ7o3urz2cPIQe6z1ueTI8R3ku8Gz2/OLl7SXzqvPq9Lb2zvCu8r7J0mPFsRazzvkQfIJ9Zvkc9vno6+Vb4LvP908/Z79cvx1+z0fajRSO3DLysb+lP89/k397ADMgI2BjQHugRSAvsDrwUZBVkCBoa9AztgM7h72T/SrYNVgWfCD4PceXM4NzPAQLCQ8pCWkN1Q1NDq0IfRBmGZYdVhvWHe4ZPi38eAQhIipiecRNrimXz63hdkd6R86IPBVFi0qMqoh6FO0YLYtuGoWOihy1ctS9GJsYSUxDLIjlxq6MvR9nFzcp7lA8MT4uvjL+acKIhOkJZxMZiRMSdyS+SwpOWpp0N9k+WZHcnKKVMjalJuV9akjqitT20cNHzxh9Mc04TZzWmE5KT0nfmt4zJnTM6jEdYz3HFo+9Mc5u3JRx58cbj88bf2SC1gTehP0ZhIzUjB0Zn3mxvGpeTyY3syqzm8/hr+G/FAQJVgk6hf7CFcJnWf5ZK7KeZ/tnr8zuFAWKykRdYo64Qvw6JyJnQ8773Njcbbl9eal5u/PJ+Rn5ByW6klzJqYlmE6dMbJM6SYul7ZN8J62e1C2Lkm2VI/Jx8sYCPfhT36KwV/ykeFgYUFhZ+GFyyuT9U3SmSKa0THWcumjqs6Kwol+m4dP405qnW0yfM/3hDPaMTTORmZkzm2dZzZo/q2N2+Oztc6hzcuf8Ntd17oq5f81Lndc033T+7PmPfwr/qbZYs1hWfHOB34INC/GF4oWti9wXrV30tURQcqHUtbSs9PNi/uILP4/4ufznviVZS1qXei1dv4y4TLLsxvLA5dtX6KwoWvF45aiV9auYq0pW/bV6wurzZR5lG9ZQ1yjWtJdHlzeutV67bO3nClHF9crgyt1VJlWLqt6vE6y7sj5ofd0G0w2lGz5tFG+8tSl8U321bXXZZuLmws1Pt6RsOfsL65earcZbS7d+2SbZ1r49YfupGu+amh0mO5bWorWK2s6dY3de3hWyq7HOuW7TboPdpXvAHsWeF3sz9t7YF7WveT9rf92vNr9WHWAcKKlH6qfWdzeIGtob0xrbDkYebG7yazpwyOXQtsMWhyuP6B9ZepR6dP7RvmNFx3qOS493ncg+8bh5QvPdk6NPXjsVf6r1dNTpc2fCzpw8yz577Jz/ucPnfc8fvMC60HDR62J9i2fLgd88fzvQ6tVaf8n7UuNln8tNbSPbjl4JvHLiasjVM9e41y5ej7nediP5xq2bY2+23xLcen477/brO4V3eu/Ovke4V3Jf+37ZA5MH1b87/L673av9yMOQhy2PEh/dfcx//PKJ/MnnjvlP6U/Lnpk/q3nu9vxwZ1jn5RdjXnS8lL7s7Sr+Q+ePqlf2r379M+jPlu7R3R2vZa/73ix+a/R2218efzX3xPU8eJf/rvd9yQejD9s/sj6e/ZT66Vnv5M+kz+VfHL40fY36eq8vv69PypPx+n8FMNjRrCwA3mwDgJ4GAAPWbdQxqlqwvyGq+rUfgf+EVfVif/MCoA7+v8d3wb+bmwDs2QLLL8ivBWvVODoAST4AdXcf7Oomz3J3U3HRYJ1CeNDX9xbWbKSVAHxZ1tfXW93X92UzdBbWjsclqhpU2YiwZtjI/ZKZnwn+TVPVp9/F+OMIlB54gB/HfwF8vpCkG+BeJwAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAA4aADAAQAAAABAAAA4QAAAAA7V+T9AAAZtUlEQVR4Ae1daWxc13V+nOEs5HC4itRIpEiKkihqsTZLil27sCylChRbqVLbdeCidpymTmsbTdI2sV0YdZu2RpMaNeqiAdo0AequSX+kgFsUduHaTqTKWixZCzeJpCiSomlKFCmS4j7DfqMnPb7Z33rPe+R5IMC33PXcb+6959zvnps3Pz8vOeBqbe/rvXKNvCBjYxOCyxAOF8o5+nz54VAA96FQQUlxYWlpEe4LC/yCy+PA7PIdUqY3//WDn7x1JuDz0JbH48kTWYBYLKGDmIvGH6O3Xk7NRMvC/pVV4fKy0Irl4frayoqKcPXKZZGq0qrKkorysMhy0uaV55B+9LGnXr90edDn424jGQ/TM1H51cxsFJieno1VlRfUrCytWVGysWnV9i31q+sjixuyjsDo0PWxX/z8n5WE4yMdX1okMDs7E5v3yqgNBvIjVeHPPbjxvnuadu5YpyW6u8I4AqMnT1184mt/X1EadJfsnFNaQHZqRpqZjaFID+1b/4WHdn9mZ+Oimcs6Yj768bluP/VM1DmAM1ASzJF8vtvxPjja9V/vtuMHf3D/XV/8wj0b1tcYSNBRURzRj37zxR9BsgG/11GicXthMJGdmp67f/fqZ76819VzAEdgdMcDLzNAbfpJAKnjE7M7Nq985cVHXNqnEtt60DD9n1y/MT5jUwtxsvjxY9y/0HX1s4++/tIf/TPUU9fJhB6j51t7yM2irms2vQUGUmsjRW+9c/7hx197538/1hudNjw9RlvbegVbzmklTph7OBQ3P//2t/7lxVf+ibAYerOmx+jhYx1BttzrbTcT4bEE8J//07z/0KuYZZlIRlxUYoxOTM50dg/x8pK4Br+VEzrUa8MT+x/5C1imBWdtIDtijF7uGYR9xEC5OYpJCWCGCqQ++ewP3/v5eZNJ2R2dGKMtbT1215DTzyIBrD9/9RtvOlyLIsboydOXsNycRYj8yW4JYHoKLcrJvSkxRjsuDXrybvN67G4MTj+TBADTr/3uP4LCmykA7XtKjMKezAoTbfMruReHPF95/gfOtPBTYvRS9wCW6RQx8Q2hBGBawarpc7/3I8IyZMqaEqOnzzLdKVO7ELyHpn+29ZO/+v5bBHlnzZISoy1tvX4fc52yto/Yj1Dz3/jhz502MSXDKKz3zW0D+O2KbQXOLYcEysLer7/wZo5AYj+TYXRkZLyzd0RsZTm33BLAxLRvYNRRIz4ZRpnulBsvRCEw4v/Dj485ZzWfDKNMdyJCoNZs//pv/1trUJvDkWH07fdamO5kc+MaTx56AtwdOER5IsPomTbeTW8cQwJilhT54ZhDQEY5s6DBKH6gQdboczYOaQC5K3XCrJSGzwG6E+H+EOxGn5tbuutbHk/c3ufx3O6espB3CwLef//pka8/e5D0xyLRYPTEqS5CutPkxM3JSdG+x2ibWWPuXq/X7497i/H5/fn5PigMUPCXKEbPtlzRKDU7gs3MTNuR7CJIMxqNyr9e5TccvTn13E8vbNvaWFMgrSmSIkGp+I6zCWH1JehHMcUZGBwjXGFCSwiTr9szms/Laz52enJN48RQvCpBj1QTlHaWShuLpUZRrvtIMDoEuhMVRqenp9yOG5Hlzy8MDH10qv6xx4FO+eqbkjr64RYhjtfNYWlfpbS9zN4SEWCUlu40PTVpr0QXXeqjnVemPh0ILo8oNVPwevKGhD9c+yqkz0Wk2tvufpWA1tzc+XVYk5qmVGjpTjwZ1dRIiYGunjntSTcNBVjlv3eHpG83S69dkD4eToxpxZPofhR0p/bOq1QDPSTGk1HdsMn3TnR1ZY8l96xyt7q2UHqy1srZquh+FHSnjm4y1wOwjGaXNX9NlYA34Bs90x7TYFCW+9SOCekP2+J96qiGKKnZpb4RjVHQnfK9Qn3Oq+u8lE33ajnovR++9EneTa3OzGSkok/9nbPSaSuGftEYpaU7zc5wP6oXn/HwvnDgWnNr2ilppuTk0f+7HfEO1eQlGqNHT3QR7g9hhckYXGAlnbv2qYG4QCo61G+ckXpMrOuJxuip8/2sMBlobNooeV7PSE+PZGiOBpiOzMW1/gtaJwvJdRWKUdCd5MOHkksh5JkVJsNihtr06YenDUdHRCAVipSx6alQjNLSnVhhMgOyqb5hKeHAM92JAaaYnhqAqVCM0np3YoVJN6zUEfI98yNGR+s76cgw1WvnF4rR949cIJyMssJ0ByoG/0+O3zQYUxUNMP3zDn0qlDiMwpfQjTEyUhwmo7zCpIKK7luYn+aGR3SZnzLlEZ+btuqw8IvDKLw7ZSq0gPexWPwMOL7MSGB6dNRMdHXcqZj0Pc12U3EYxWF2hGczMN1JDRHye3SlWDL9D21Md3EYPf4RW+/JseGgAgCm/9avyWgqCKOgO3X3DBEqTDwZdRA87xQFMP1+DkJVPKggjILu1D9o1nJxp2q6/7P1XrfIREUYmMk94gvCKOhO8snVouqekA9b7xPE4aQHecTPzuIThFHQnYoK0zG5hciLrfdCxGw8kx/3ZosrCKPNbdimRXax9d4S0QeKiy1JJykRdKXYapKFGCUCo1CYTp7pZYUpqW3c9Thr8/rLT/oyykMERnGYHeHp36wwZWx8nR/yy0q17BjRmWo8OLpS0EwzzUpFYJTpTgaazYFRItUL25ftKF6mWakIjLZf6Cf07sQKkzV4mouN2gkWdKVHMmx+sjPbO7J5651zhJNRVpjutIOp/77KIlPxNUTGIn5adqntGIXC1DMwrqGEtgRhupMlYo1Oz67a1mRJUtkTefdqmu+2Y7Sl9XIoKNrThFJRpjspojBzMx+N5Tc0mOTh5ywAhvvzY2k0J9sx2nbxit9ney6Z6s90p0yS0fU+b37eW2KLcTSpGBjuu1IGXdvR87Mj7bxZOakl3PhYVrtaTLFPpGhOtmP0XCtvVhbTuDbmAgN+eFW1TcZRdbkx3F9O8WtoL0bhDnfsJplrELbeq5vfzH3Z6hXzIUEuccF9TjLm24vR9o7+WMzcjlcTomW6kwnhLUSFUl+8db0lO5kWEs16N5DoxthejB79sI2t91mbww0f56KltbUiC9qZqDbZi9Hu3lte1EXWT5UXW+9VwjB+i8loyd27BExGlSL2JU5JbcQoNiuzwqTI3b03mIwWFIWElT9VbbIRo4NXbwxeT/xFCKuoJPHZDJYIG5PRsvoVeWWCFCa5zFCb1JeNGKWlO8VifMCNuqGN3s9FA9u32b3ClL1wNmKU6U7ZRe+Wr5Vbt4ucjMpiUZufbMTo4eOdnjyyzkw5qc0tUHBmOYuWlReuspc2mrbiavOTXRiNnx/SNZTlvNS0JbPqJVvvLZEkDmKsPfhLJAP9zbmFGtiFUdCdvB5Dfn8Xymb8julOxmWniine6qTKfOHWLowy3WlBxq69q9jWUFhDMNAnCcwujDLdKUnQrnvEQF+1dw9Vsa+qlkPtwuj7R7sI94ewdyfz2MJZIrX33S9eo08tuS0YBd2Jz2ZIlbWL3sB0X733nrxSoab7TPKxBaOgOwXouPdMd8rU2Drez0Wr9+zTEd7OoLZglOlOdjaZ7WnHyXhrqovvaiIc6CuDC9W0BaNnW7Q56F0ohpV3THcyK825aP2vPGI2EeviW49R0J0u911nhcm6NhKdErSlNb+wm7ATRYVDqq3E1mMUdCfa80NEN+niyg8mp3VffWKUbPnltjSD3gWxWo9R0J0Wkhd+xwqTSZF7Q8FV+w/QdqKoQqnKWa31GOXD7EyihDA6OtH1v/rLIrcuZapssa0Y7bg0yHSnTKJ3+HuwnCIP7CHvREHFV1+JT+ovhu6hMLVeHKSiOxkqMke6LQF0opEvHnCC3b5GZXhC4SzGKA6zIzybgfeHmPnBwSbqhJko3OnUFSTUw2KM4jA79u6UIGCXPEwN3Fj/5aedMBOFwCoDCVKzGKPNrb3s3SlBwG54wMJSw4M7irdQLiyp5VRXqH6yeqz/gOlOCeJ1zcO655+PkTk9SpbSmkR3vFb2o6A78dkMyfJ2/DNUpS3ffM4JqpIsqohfUhue8NJKjOIwO6Y7OR6TCQXEKL9q56bK+4hXPpUyQWGqSVSYLMYoDrNj706KuN1yEx/lZx1U2LUpLlGs7Efffq+F0HrPdCe9QIMuv+uVl5wzysvl35jiL9oyjMbPZrgyQmi95/0hujCKaWjjbzzqHF1eLjxWmCKJBny8twyjOMyO0NUob6jXBdC5iWlMQ+sfe9w5urxcfqwwJSlMVmIUdCcP3YZ6pjtpxyj0pPIVy9e+8JL2KGJCQmG6rzxNVpb1o6A7EVrv+TC7NG2b7hUA6i8Mbn/1lXQf6d9tKklTBsswSkt3YoUpTdumvAJAvQHf3a/+sdP0JLmkmIzWJq4wye+twSis953dZN6dUBNWmFIAmfxCBuju7/4pXI84ytgkFxQD/aEMLlGswugQ4QoT052S8ZjyLA/xD/zN684EqFzeHWUp5b71whqMgu5UEFDtQEmfl11v+TC77JIFQMuqKu9/4zUM8Q7sQeXCYwk07UCPr9ZglOlO2VFC+BV20OK6CJQkJwMUA/2eZRmFpNoimjFMjg+w3je3DfBm5RxiovgMgK7cd+/633oOZ2TNO2nBM1UYe6tS391+YwFGR0bGO3tHqspTuAAZM7XyA1vvM0kTAN349OMrDh10mqE+qcDoRHeWpDHdK8EswCjTnRRpOuRG1pB2/MnL8aVOx7BCswjns5VZPkoWYBR0J8IVJrbeJzUvmCIg1YPNFJ+AugGg0Ja2ZdDo5apZgNHDxzqC/iRBiXtk670ia6zC5xcG7v7Otyrv3w10OnwCKhcbA/3nM89E5TAWYPT/TvXVRhLZ/YrY7L9h6z1kjMF9dnii7tCepl9/Eud9uaL7VKCxf4Vym/7GLEZb2/uCfjLLKCtMaFUM7st3N6154tdkb4zzbhjfZTCiE/3SyvS4VL81i1Haw+yWMt0Jfac0Fy1bGdn07DPY7IFGdax9Xg049T0W6LOYnJSQZjF64lQX7w9RpCnmBvPOvPn58g2rax4+iKknzk9yHTohKLkTTWWLpsrQLEZPnekhtN4vKYVJ7jilfG/Dwb2R/QfkU2ncNfVU409jJ4oopjAKutO14QlCjC4FhUmG5uzwZN2je5ft2LVs0wZZK3Jj36lgVHsnah6jQ+MTs1QYXcR0J+ByPhrDgO4vDi1/YDugWbF7twcGvlvDuou0IgWUSTfoRA9VJ73L+GiqHz19lr07ZZSs3g8yLudGp3xlhau2NeU3NCy7a2tRU5MCTfcO60miQCf6wtqkd9keTWG0pY3Su9P4yA0ottkq55JvOJbTFw5gE5yMy/CqaoUnjwF90UBTbg0AdG2htD3rwlJSuxnHaPxk5c6rVAM9qrH26S8lVcaNj2W1qwHK+VBY8VkHXLpiiciwtJ9ZrS+qcYyC7tTRfb2iNGU7tL4CGAk9PRNt+syG4MMHSI6tNlLirHFk7cfVOlDW+i18RCf6VE1GLvNCuMQ74xgF3SnfS3b8hD+y3KV2wUT5L6EneZQ/kGvlM1Uixnn4hHQnz8RkaHXtUuh4UhvM1W++3Wik+MYx2tzWT7ih3tdgqLpGRMRxLJCArMtrWVVKzcwgRqEwHT5+iUphWr2xZmQutS78xqESAED3VejT5dU1MYhReHeano2pExJ2D4Upv65O0YKF5csZGZOAPA39zQZjseOxDGKUlu5UVKOB0WVcJhzTSglgScnYNFQphEG9nvAwOyhMc02bFrcFUWmeRXDzxpZs++m0VNBgP/r+kQtUk9Hy6gotFeMwTpDAdzaYBShqYQSjOMxu8PokiQhAvB+rLFGWCknKwJlqlMAfNOo216dN2chYj8PsvESuRmPz3voV+q3AaavOL22TAPSk722yBqAooxGMEh5mNzMbLd++maYPt61FF1PCQCeUpL/bZsEQr4jFyFh//KMuKut9OOQfChTzCpPSfo66AUCxWd68kpRUKd39KKz33T1DVApTOBSIVEfYgJ/Uik54BEDhEuf3bVj+041R0J36B8fQn4mXCxSmZY2No0a6fvGFXVo5AqDYhaydWq9LOroxCroT1enfUJhCa9dE4QOOL8dIQJ6Avrg2hz8cM+XVjVHQnYoKfWayNBwX1vvhUGmRs30UGq6dGyPK4zs4y8bIIhqrrBujoDtpTNqOYDWbm3gyaodg9aYJdOL6So2U0xOO3pRTw+vDKBSmk2d6qRQmrDDxZDS1CcW/EdN9KvXSh1HQnXA2A4k7XNCd6u9tWhybQxTpu+4G6IR16ala40Q7A1XWh1FautP4itRzow1UmaMYkQAJOuWC6sNo+4V+Ku9OUJjgooOt90bwZSIOoIkLfSe8hAqYeqYtqT6MEtKdfKVF2OCbtg780nIJyNDEqib48w9USo2kgteBUShMzZ1DJO5wYb1v3L0Z3HvuRy2HozpBGZp4gxWjfZXSmiJ7jUrqrLPc68BoS+vlUFBH+Cy56v0E6/1wuJj5TnrlpjG8GppbwtI9yxwBTaXwOjDXdvGK30ezEInJaMPm9TfZeq+0m+kbBZeYa24KS7vKbFwoMllYHRj92ZF2KrpTrLAAdCcCjyh3pKu06J0XLv6PWWZNUKorkHaWOWU0zy5NHRg919pPZb2PVIUJ6U4AKDzATNNsg83efDq+BjxSJChVBKRSn7OG8px10IpRuMMduzlDRXcaLq0iXGGCnzcDHmByip4DaJSA1vlle0d/LEbDOILCtHnX3VQrTOhEd5ZqFCYHs0UCWjF69MM2Kus96g26ky2115ZoXaG2cBzKHgloxWh375A9BcidKibBoDsRWkZhJuSLUAKaMIrNyoQKE/aHEE5GYZqxlRxJ2PZuyVoTRgev3hgamSKpEuhOFVvI6E6YjDKNhaTd1ZlqwijoToTucEF3UpdY8D3s23zRSkATRpcy3Ykno7QARe6aMHr4eKcnj+wEj5ISsq4MSzKwe/NFK4HcGIXC1N415PPRbFZufHDHKJnT/fiaIStMtABF7rkxSuvdCXQnKhlBYcKiNl/kEsiNUUK6E7w7ge5EKCPGKKHwlaxzr9cT0p2CszMTFSsI3eE2lSiC4hsyCeTuR98/2kVFd6qqryLcHwKFqZZXQcmQuZBxDoyC7hQlopJgf8hEdVX8RFeiCwoTX06QQA6Mgu4UIOLeg+60buMGpjs5ASW0ZciB0bPnLlHRnbA/xF9ZTkglYboTLTSV3HNg9PCxDiWo4BtsVobCJDhTdXa8wqSWBuF9Noxis3Jf/wiVwlRWWphXRrnCxNZ7Qlyqs86G0bh3p7FpdWhh96A7lWxYRzgZ3Uz26xAmY9dklA2joDsR1oP2MDumOxE2fVLW2TBKeJgdSjlWU0+oMPFkNAkohI/ZMNpxaZCK7gSlvnBVhEouTHeiknzafDNiFHSn1ouDJHQnFBSnf6ctrpiXTHcSI2eNuWTEKOhOVGczQGEKbb2LUGFiKolG9IgJlhGjhIfZoebjyyn7UcaoGPBpzCUjRptbe6m8O2EyGl5VTagwMd1JI3rEBMuI0Q8/ukxlvcfZDLR0J3hE4ss5EkiPUdCdCE//XtZYB3e4VBcrTFSSz5RveoziMDtCupM/sjxTce1+z96d7JawgfTTYxSH2XmITqjHZDS0upZwMlrPvGYDOLIzSnqMvv1eS5CIXExOd2pg7052As5A2ukx2t07TGW9r1lZSruhnulOBmBka5Q0GG1t75sjOtwY+0N8y8nc4WIyynQnW9FmLPE0GCX07jQ1I+H0b6oVJkiQ6U7GYGRrrDQYJaQ7YdWA6U62trcbE0+DUUK6E1YNcDYDoRxpD3QjrLiTs07GKKz3nd003p0gJuwPIXSHi7MZ+HKgBFIxOjQ+QXNWF+hOVfdSns3AVBIHAhRFSsbo6bPdVIfZoTRMd3ImSmhLlYzRljZKuhPt2QxMd6LFYqbcEzAaP1m5bYCK7iSF/ISTUZzNwHSnTCihfZ+A0ZGR8c7eEZICyad/U1lGYb0vymd3uCQtnzvTBIwuWboT5MSH2eUGC1GIBIwy3YmoFTjbbBJIwOjRE11U+0Nw+jetd6fyQDYx8TdCCSRg9MTZK1QKU2NDJeH+EChM7A6XEIXZs17wNQ6609XRmYKAN3sEO75ik3RgU3GDX4rN2JF8jjShMPFhdjlkRPp5AaMoxl++/FAwSLOT6ErV2lYKgMrCZ7oTKQhzZL6A0Q3ra/CXI7htn3/QJU0NSXBiQ3KxdycSsWvMlAgUKaVrHiMDKMrCdKeUBnHQC0dgdHRWGqAb6KEw8eVkCTgCo53jZCKCwsSTUTLpa8vYERi9PKGtsPaEYkqePXK1LFVHYLTjpmX1MZAQ050MCE1kFEdg9OQNMoWJD7MTiTZjedFjtIduoOfNysZAIzgWPUaHaE4uuS3ntSHBAufsdEuAHqMnh3UX2sIIfJidhcK0KSl6jNJa73mFySZgWZgsMUbJrffs3clCMNmUFDFGB6ZsqlfuZJnulFtGzghBjFHCFSbIn1eYnAHCHKUgxigmo4QXT0YJha89a2KM9k2SWe8ho0hQu6A4JJkEKDEKhWlkjqzmoDuxwkQmfT0ZU2K0a1yC4kJyMd2JROzGMqXEaDfdKiiExXQnY4gRH4sSo0x3Et/ebsyREqPnSfeH8GZlt+CVDKOgOxFORtkdrlsAinKSYZSW7sTenRijuSXAdKfcMuIQtyRA1o8y3YkRqFECZBil3azM1nuN+HBCsAU/JSJLc+HWMj2VzsTenUS2tfm8aDAa9EpP1UgE3s9uCayeT601DxyBKfw/cnpqOmcCItgAAAAASUVORK5CYII="})]})]});var Xs=({colored:e})=>e?(0,a.jsx)(Js,{}):(0,a.jsx)(Ys,{});const ec=vr`
524
+ 0% {
525
+ transform: rotate(0deg);
526
+ }
527
+ 100% {
528
+ transform: rotate(360deg);
529
+ }
530
+ `,tc=yr.div`
531
+ display: inline-block;
532
+ position: relative;
533
+ width: ${({size:e})=>e};
534
+ height: ${({size:e})=>e};
535
+
536
+ div {
537
+ box-sizing: border-box;
538
+ display: block;
539
+ position: absolute;
540
+ width: ${({size:e})=>e};
541
+ height: ${({size:e})=>e};
542
+ top: 0px;
543
+ left: 0px;
544
+ border: 2px solid #fff;
545
+ border-radius: 50%;
546
+ animation: ${ec} 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
547
+ border-color: #fff transparent transparent transparent;
548
+ }
549
+
550
+ div:nth-child(1) {
551
+ animation-delay: -0.45s;
552
+ }
553
+
554
+ div:nth-child(2) {
555
+ animation-delay: -0.3s;
556
+ }
557
+
558
+ div:nth-child(3) {
559
+ animation-delay: -0.15s;
560
+ }
561
+ `;var rc=({size:e})=>(0,a.jsxs)(tc,{size:e||"24px",children:[(0,a.jsx)("div",{}),(0,a.jsx)("div",{}),(0,a.jsx)("div",{}),(0,a.jsx)("div",{})]});const nc=e=>e?"215px":"227px",ic=yr.div`
562
+ position: absolute;
563
+ width: 100%;
564
+ bottom: ${e=>e.open?0:`-${nc(e.desktop)}`};
565
+ transition: all 0.4s;
566
+
567
+ ${e=>{if(e.desktop)return Xt`
568
+ bottom: ${e.open?0:`calc(-${nc(e.desktop)} - (100vh / 2))`};
569
+ height: 100%;
570
+ display: flex;
571
+ justify-content: center;
572
+ align-items: center;
573
+ `}}
574
+ `,oc=yr.div`
575
+ display: flex;
576
+ flex-direction: column;
577
+ width: ${e=>e.desktop?"375px":"100%"};
578
+ height: ${({desktop:e})=>nc(e)};
579
+ max-height: 100vh;
580
+ background-color: ${e=>e.theme.popupBackgroundPrimaryColor};
581
+ color: ${e=>e.theme.popupTitleColor};
582
+ border-radius: ${e=>e.desktop?"20px":"20px 20px 0 0"};
583
+ padding: ${({desktop:e})=>e?"16px 14px":"16px 14px 28px"};
584
+ box-sizing: border-box;
585
+ `,ac=yr.div`
586
+ display: flex;
587
+ justify-content: space-between;
588
+ align-items: center;
589
+ margin-bottom: 30px;
590
+ `,sc=yr.div`
591
+ display: flex;
592
+ align-items: center;
593
+
594
+ h4 {
595
+ margin: 0 0 0 8px;
596
+ font-weight: 600;
597
+ line-height: 19px;
598
+ }
599
+
600
+ svg {
601
+ width: 20px;
602
+ height: 20px;
603
+ }
604
+ `,cc=yr.button`
605
+ display: flex;
606
+ justify-content: center;
607
+ align-items: center;
608
+ border: none;
609
+ background-color: ${e=>e.theme.popupBackgroundSecondaryColor};
610
+ border-radius: 50%;
611
+ height: 30px;
612
+ width: 30px;
613
+ padding: 0;
614
+
615
+ svg {
616
+ width: 15px;
617
+ height: 15px;
618
+
619
+ path {
620
+ fill: #000;
621
+ }
622
+ }
623
+ `,lc=yr.form`
624
+ display: flex;
625
+ flex-direction: column;
626
+ `,dc=yr.div`
627
+ display: flex;
628
+ flex-direction: column;
629
+ position: relative;
630
+
631
+ input {
632
+ padding: 16px 10px 16px 20px;
633
+ border-radius: 15px;
634
+ background-color: ${({theme:e})=>e.popupBackgroundSecondaryColor};
635
+ border: 1px solid ${e=>e.errored?"#d84949":e.theme.popupBorderColor};
636
+ color: #878787;
637
+
638
+ &:focus {
639
+ outline: none;
640
+ border: 1px solid ${({theme:e})=>e.primaryColor};
641
+ }
642
+ }
643
+ `,uc=yr.span`
644
+ position: absolute;
645
+ left: 0;
646
+ bottom: -20px;
647
+ color: #d84949;
648
+ font-size: 10px;
649
+ font-weight: 700;
650
+ line-height: 10px;
651
+ margin-top: 10px;
652
+ `,pc=yr.button`
653
+ background-color: ${({theme:e})=>e.primaryColor};
654
+ padding: ${({status:e})=>"waiting"!==e?"auto":"8px 18px"};
655
+ width: ${({status:e})=>"waiting"!==e?"46px":"100%"};
656
+ height: 46px;
657
+ border-radius: ${({status:e})=>"waiting"!==e?"50%":"15px"};
658
+ margin: 30px auto 0;
659
+ border: none;
660
+ color: #fff;
661
+ font-size: 16px;
662
+ font-weight: 700;
663
+ line-height: 18px;
664
+ transition: border-radius 0.3s ease-in, width 0.3s;
665
+
666
+ span {
667
+ display: flex;
668
+ flex-direction: row;
669
+ gap: 5px;
670
+ align-items: center;
671
+ justify-content: center;
672
+ }
673
+ `,hc=yr.img`
674
+ width: 36px;
675
+ height: 36px;
676
+ border-radius: 8px;
677
+ `,fc=yr.div`
678
+ display: flex;
679
+ align-items: center;
680
+ justify-content: center;
681
+ `;je=o("85Hg2");function mc(e){(0,je.useEffect)((()=>{const t=document.title;return e&&(document.title=e),()=>{document.title=t}}),[e])}const gc="linkshare_sent",vc=(e,t)=>{let r=new URL(e.url).hostname;r.startsWith("www.")&&(r=r.slice(4));const n=e.ogImage?(0,a.jsx)(hc,{src:e.ogImage}):void 0;Ir(e.title,{width:"350px",icon:n,status:{icon:e.favicon,text:t("misc.from"),boldText:r},button:{text:t("misc.open"),action:({close:t})=>{window.open(e.url,"_blank"),t()}},ellipsis:!0,duration:15e3}),Zs({title:e.title,url:e.url,iconUrl:e.ogImage,statusIconUrl:e.favicon,statusText:r})};var yc=()=>{const{t:e}=Fi(),t=(0,je.useContext)(dr),n=(0,je.useRef)(null),i=(0,je.useRef)(null),[o,s]=(0,je.useState)([]),[c,l]=(0,je.useState)(),[d,u]=(0,je.useState)(""),[p,f]=(0,je.useState)(null),[m,g]=(0,je.useState)("waiting"),{isLinksharePopupVisible:y,setIsLinksharePopupVisible:b,orientation:w,options:x}=(0,je.useContext)(Ya),{streams:S}=is();mc(c);const _="landscape"===w,k=(0,je.useCallback)((()=>{document.hidden||(o.forEach((t=>{vc(t,e)})),s([]),l(void 0))}),[o,e]),C=(0,je.useCallback)((t=>{const{type:r,data:n}=t.detail.event,i=S.find((e=>e.id===t.detail?.peerId));if(r===gc)if(document.hidden){const e="user"!==i?.profile.name?.toLowerCase()?i?.profile.name:void 0;s([...o,n]),l(`${e||"Someone"} shared a link`)}else vc(n,e);else"paypal_invoice"===r&&((e,t,r)=>{const n=e||r("misc.user"),i=r("shareLink.invoice",{user:n});Ir(i,{button:{icon:(0,a.jsx)(Xs,{}),text:r("shareLink.pay"),action:()=>window.open(t,"_blank")},status:{icon:(0,a.jsx)(Xs,{colored:!0}),text:r("shareLink.poweredBy"),boldText:"PayPal"},duration:1e4}),Zs({title:i,url:t,statusIconUrl:"https://stream-assets.snapcall.io/icons/paypal.png",statusText:"PayPal"})})(i?.profile?.name,n.url,e)}),[S,e,o]);(0,je.useEffect)((()=>(window.addEventListener("visibilitychange",k),Qa.addEventListener("customMessage",C),()=>{window.removeEventListener("visibilitychange",k),Qa.removeEventListener("customMessage",C)})),[C,k]);return(0,a.jsx)(ic,{open:y,desktop:_,onTransitionEnd:()=>{y&&i.current?.focus(),"done"===m&&g("waiting")},children:(0,a.jsxs)(oc,{ref:n,desktop:_,children:[(0,a.jsxs)(ac,{children:[(0,a.jsxs)(sc,{children:[(0,a.jsx)(Bs,{color:t.popupTitleColor}),(0,a.jsx)("h4",{children:e("shareLink.title2")})]}),(0,a.jsx)(cc,{onClick:()=>b(!1),children:(0,a.jsx)(Us,{})})]}),(0,a.jsxs)(lc,{onSubmit:async t=>{if(t.preventDefault(),!d)return;let n;f(null),g("loading"),h.event("linkshareShare");try{n=new URL(d),"http"===n.protocol&&(n.protocol="https")}catch(t){f(e("shareLink.invalid")),console.error(t)}if(n){try{if(-1!==n.href.indexOf("paypal.com/invoice"))Qa.sendCustomMessageToAll({type:"paypal_invoice",data:{url:n}});else{const{linkData:e}=await fetch(`${x.streamApiURL}/shareLink`,{method:"POST",body:JSON.stringify({url:n.href})}).then((e=>e.json()));Qa.sendCustomMessageToAll({type:gc,data:e})}if(S.length<2){const t=S[0]?.profile?.name||e("misc.user");r(v)(e("shareLink.sentToUser",{user:t}))}else r(v)(e("shareLink.sentToUsers"));b(!1)}catch(t){console.error(t),r(v)(e("shareLink.failed"),{className:"error"})}u("")}g("done")},children:[(0,a.jsxs)(dc,{errored:Boolean(p),children:[(0,a.jsx)("input",{id:"linkshare-popup-input",ref:i,placeholder:"https://www.example.com",value:d,onChange:e=>u(e.target.value),"data-lpignore":!0,autoComplete:"off","data-form-type":"other"}),p&&(0,a.jsx)(uc,{children:p})]}),(0,a.jsx)(pc,{type:"submit",disabled:"waiting"!==m,status:m,children:"waiting"!==m?(0,a.jsx)(fc,{children:(0,a.jsx)(rc,{size:"18px"})}):(0,a.jsxs)("span",{children:[(0,a.jsx)(Vs,{}),e("shareLink.title")]})})]})]})})};const bc=new Audio("https://cdn.snapcall.io/stream/connected.mp3"),wc=new Audio("https://cdn.snapcall.io/stream/disconnected.mp3"),xc=new Audio("https://cdn.snapcall.io/stream/user-connected.mp3"),Sc=new Audio("https://cdn.snapcall.io/stream/user-disconnected.mp3"),_c=new Audio("https://cdn.snapcall.io/stream/link-received.mp3"),kc=new Audio("https://cdn.snapcall.io/stream/recording-start.mp3");var Cc=()=>{const{userInteractionTriggered:e}=(0,je.useContext)(Ya),{videoRecording:t}=(0,je.useContext)(Ya),r=async()=>{try{xc.currentTime=0,await xc.play()}catch(e){console.warn("Couldn't play user connected sound")}},n=async()=>{try{Sc.currentTime=0,await Sc.play()}catch(e){console.warn("Couldn't play user disconnected sound")}},i=async()=>{try{await wc.play()}catch(e){console.warn("Couldn't play disconnected sound")}},o=async e=>{const{type:t}=e.detail.event;if(t===gc)try{await _c.play()}catch(e){console.warn("Couldn't play link-received sound")}},a=async()=>{try{await kc.play()}catch(e){console.warn("Couldn't play recording start sound")}};return(0,je.useEffect)((()=>(Qa.addEventListener("newPeer",r),Qa.addEventListener("peerClosed",n),Qa.addEventListener("leaveRoom",i),Qa.addEventListener("customMessage",o),Qa.addEventListener("videoRecordingRequested",a),()=>{Qa.removeEventListener("newPeer",r),Qa.removeEventListener("peerClosed",n),Qa.removeEventListener("leaveRoom",i),Qa.removeEventListener("customMessage",o),Qa.removeEventListener("videoRecordingRequested",a)})),[]),(0,je.useEffect)((()=>{e&&(async()=>{try{await bc.play(),t.requested&&setTimeout((()=>{kc.play()}),500)}catch(e){console.warn("Couldn't play connected sound")}})()}),[e]),null};const Ec=new class{constructor(){this.started=!1,this.fps=18,this.devicePixelRatio=window.devicePixelRatio||1,this.layout=null,this.canvas=document.createElement("canvas"),this.ctx=this.canvas.getContext("2d"),this.ctx&&(this.ctx.fillStyle="#000",this.ctx.fillRect(0,0,this.canvas.width,this.canvas.height)),this.video=document.createElement("video"),this.video.muted=!0,this.video.autoplay=!0,this.video.playsInline=!0,this.video.addEventListener("enterpictureinpicture",this.onEnterPictureInPicture.bind(this)),this.video.addEventListener("leavepictureinpicture",this.onLeavePictureInPicture.bind(this)),this.tiles=[]}async start(){this.tiles.length?(this.video.srcObject=this.canvas.captureStream(this.fps),document.pictureInPictureElement&&document.exitPictureInPicture(),this.canvas.width=this.layout?.width||50,this.canvas.height=this.layout?.height||33,await this.video.play(),await this.video.requestPictureInPicture(),this.draw()):(0,v.toast)(Si.t("notifications.noCamera"),{className:"error"})}setTiles(e){this.tiles=e,this.layout=As({width:300*this.devicePixelRatio,cellAspectRatio:1.5,tileCount:e.length}),this.started&&this.draw()}onEnterPictureInPicture(){this.started=!0}onLeavePictureInPicture(){this.started=!1,this.video.srcObject=null}draw(){this.ctx&&this.started&&(this.ctx.fillStyle="#1f1f1f",this.ctx.fillRect(0,0,this.canvas.width,this.canvas.height),this.tiles.length?(this.tiles.forEach(((e,t)=>{const r=document.body.querySelectorAll(`[data-peer-id='${e.id}'] video`)[0];if(!r)return console.warn(`MultiPiP: No video found for peer ${e.id}`);const n=this.layout?.tileRects[t];if(!n)return;this.ctx?.save();const{videoWidth:i,videoHeight:o}=r,{width:a,height:s}=n.bounds,c=Math.max(a/i,s/o),l=i/(i*c/a),d=o/(o*c/s),u=.5*(i-l),p=.5*(o-d),h=n.origin.x+5,f=n.origin.y+5,m=a-10,g=s-10;this.makeRoundedRect({ctx:this.ctx,x:h,y:f,width:m,height:g,radius:10}),this.ctx?.clip(),this.ctx?.drawImage(r,u,p,l,d,h,f,m,g),this.ctx?.restore()})),requestAnimationFrame(this.draw.bind(this))):document.exitPictureInPicture())}makeRoundedRect({ctx:e,x:t,y:r,width:n,height:i,radius:o}){e&&(e.beginPath(),e.moveTo(t+o,r),e.lineTo(t+n-o,r),e.quadraticCurveTo(t+n,r,t+n,r+o),e.lineTo(t+n,r+i-o),e.quadraticCurveTo(t+n,r+i,t+n-o,r+i),e.lineTo(t+o,r+i),e.quadraticCurveTo(t,r+i,t,r+i-o),e.lineTo(t,r+o),e.quadraticCurveTo(t,r,t+o,r),e.closePath())}},Pc=zi.parse(window.navigator.userAgent);var Rc=()=>{const{t:e}=Fi(),{setIsQuickConnectPopupVisible:t,setIsSettingsMenuVisible:n,setIsVirtualBackgroundPopupVisible:i,options:o,muted:s,streaming:c,permissions:l,plan:d,setBlockedFeaturePopupOpen:u,isAgent:p,videoRecording:f,setVideoRecording:m}=(0,je.useContext)(Ya),{streams:g}=is(),[y,b]=(0,je.useState)(o.extraSettingsOptions||[]),w=e=>{const{extraOptions:t}=e.detail;b(t)},x=()=>{Ec.start()};(0,je.useEffect)((()=>{const e=g.filter((e=>e.webcam)).map((e=>({id:e.id})));Ec.setTiles(e)}),[g]),(0,je.useEffect)((()=>(window.addEventListener("streamUISetExtraSettingsOptions",w),()=>{window.removeEventListener("streamUISetExtraSettingsOptions",w)})),[]);const S=(0,je.useMemo)((()=>{const d=[{id:"1",items:[{id:"openNewTab",title:e("menu.openNewTab"),jsxIcon:(0,a.jsx)(us,{}),action:()=>{const e=new URL(o.sharedURL||window.location.href),t=s?"0":"1";e.searchParams.set("microphone-enabled",t);const r=c?"1":"0";e.searchParams.set("camera-enabled",r),window.open(e.href,"_blank"),Qa.endCall()}}]},{id:"2",items:[{id:"copyLink",title:e("copyLink.title"),jsxIcon:(0,a.jsx)(ps,{}),action:async()=>{try{await os(o.sharedURL||window.location.href),r(v)(e("copyLink.copied"),{duration:2e3})}catch(t){console.warn(t),r(v)(e("copyLink.error"),{className:"error"})}}},{id:"quickConnect",title:e("quickConnect.title"),jsxIcon:(0,a.jsx)(hs,{}),action:()=>{l.find((e=>"quick_connect"===e))?(t(!0),h.event("quickConnectClick")):u(!0)}}]},{id:"3",items:[{id:"settings",title:e("settings.title"),jsxIcon:(0,a.jsx)(fs,{}),action:()=>{n(!0)}}]}];return"desktop"===Pc.platform.type&&"Blink"===Pc.engine.name&&d[2].items.unshift({id:"virtualBackground",title:e("virtualBackground.title"),jsxIcon:(0,a.jsx)(ys,{}),action:()=>{l.find((e=>"virtual_background"===e))?i(!0):u(!0)}}),p&&l.find((e=>"record_video_on_demand"===e))&&!f.requested?d[2].items.unshift({id:"toggleVideoRecord",title:e("menu.startRecord"),jsxIcon:(0,a.jsx)(Fs,{}),action:async()=>{await Qa.startRecord(),m({requested:!0,started:!1}),Ir(e("notifications.recording"),{duration:1e4,icon:(0,a.jsx)(zs,{}),messageStyle:{fontWeight:600}}),kc.play()}}):p&&l.find((e=>"record_video_on_demand"===e))&&d[2].items.unshift({id:"toggleVideoRecord",title:e("menu.stopRecord"),jsxIcon:(0,a.jsx)(Ns,{}),action:async()=>{await Qa.stopRecord()}}),document.pictureInPictureEnabled&&"desktop"===Pc.platform.type&&d[0].items.push({id:"pip",title:e("menu.pictureInPicture"),jsxIcon:(0,a.jsx)(vs,{}),action:x}),d}),[e,l,p,f,o.sharedURL,s,c,t,u,n,i,m]);return(0,a.jsxs)(Ps,{children:[(0,a.jsxs)(Rs,{children:[(0,a.jsx)(ds,{size:o.logo?.size}),o.logo?.text&&(0,a.jsx)(Ts,{children:o.logo?.text}),"individual"===d&&(0,a.jsx)(Ts,{children:`${o.logo?.text?" · ":""}${e("header.free")}`})]}),(0,a.jsx)(Is,{baseCategories:S,extraCategories:y})]})};je=o("85Hg2"),je=o("85Hg2");const Tc=e=>{const[t,r]=(0,je.useState)([0,0]);return(0,je.useLayoutEffect)((()=>{if(e){const t=new ResizeObserver((()=>r([e?.offsetWidth||0,e?.offsetHeight||0])));return t.observe(e),()=>t.unobserve(e)}}),[e]),t},jc={bottom:0,height:0,left:0,right:0,top:0,width:0,x:0,y:0};function Oc(){const[e,t]=(0,je.useState)(null),[r,n]=(0,je.useState)(jc);return(0,je.useLayoutEffect)((()=>{if(!e)return;const t=new ResizeObserver((e=>n(e[0].contentRect)));return t.observe(e),()=>{t.disconnect()}}),[e]),[t,r]}je=o("85Hg2");var Mc=({slash:e,redSlash:t,status:r,deviceRequest:n})=>e?(0,a.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("path",{d:"M12 15a4 4 0 0 0 4-4V5a4 4 0 1 0-8 0v6a4 4 0 0 0 4 4ZM10 5a2 2 0 1 1 4 0v6a2 2 0 0 1-4 0V5Zm10 6a1 1 0 0 0-2 0 6 6 0 1 1-12 0 1 1 0 1 0-2 0 8 8 0 0 0 7 7.93V21H9a1 1 0 0 0 0 2h6a1 1 0 0 0 0-2h-2v-2.07A8 8 0 0 0 20 11Z",fill:"#fff"}),(0,a.jsx)("path",{d:"M4.005 1.53A1.75 1.75 0 1 0 1.53 4.005l19.446 19.446a1.75 1.75 0 1 0 2.475-2.475L4.005 1.53Z",fill:"#fff",stroke:"#d84949",strokeLinecap:"round"})]}):t?(0,a.jsxs)("svg",{width:"25",height:"25",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("path",{d:"M12 15a4 4 0 0 0 4-4V5a4 4 0 1 0-8 0v6a4 4 0 0 0 4 4ZM10 5a2 2 0 1 1 4 0v6a2 2 0 0 1-4 0V5Zm10 6a1 1 0 0 0-2 0 6 6 0 1 1-12 0 1 1 0 1 0-2 0 8 8 0 0 0 7 7.93V21H9a1 1 0 0 0 0 2h6a1 1 0 0 0 0-2h-2v-2.07A8 8 0 0 0 20 11Z",fill:"#d84949"}),(0,a.jsx)("path",{d:"M4.005 1.53A1.75 1.75 0 1 0 1.53 4.005l19.446 19.446a1.75 1.75 0 1 0 2.475-2.475L4.005 1.53Z",fill:"#d84949",stroke:"#242324",strokeLinecap:"round"})]}):r?(0,a.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M6.125 2.176a1.167 1.167 0 0 1 1.72-.082c.211.222.326.517.321.823v1.99a.583.583 0 1 0 1.167 0v-1.99A2.333 2.333 0 0 0 5.25 1.44a.583.583 0 1 0 .875.735Zm4.795 5.565h.117a.583.583 0 0 0 .583-.472c.042-.282.057-.567.046-.852a.584.584 0 0 0-1.166 0c0 .215-.022.43-.064.642a.583.583 0 0 0 .484.682Zm1.75 3.535L2.17.776a.583.583 0 1 0-.829.823l3.325 3.348v1.47a2.333 2.333 0 0 0 3.5 2.018l.852.852A3.5 3.5 0 0 1 3.5 6.417a.583.583 0 0 0-1.167 0 4.667 4.667 0 0 0 4.083 4.626v1.207H5.25a.583.583 0 0 0 0 1.167h3.5a.583.583 0 0 0 0-1.167H7.583v-1.207a4.59 4.59 0 0 0 2.246-.928l1.983 1.984a.584.584 0 0 0 .829-.823h.029ZM7 7.584a1.167 1.167 0 0 1-1.167-1.167v-.303l1.43 1.435A1.015 1.015 0 0 1 7 7.584Z",fill:"#fff"})}):n?(0,a.jsxs)("svg",{width:"30",height:"30",viewBox:"0 0 30 30",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("path",{d:"M25 13.75a1.25 1.25 0 0 0-2.5 0 7.5 7.5 0 1 1-15 0 1.25 1.25 0 0 0-2.5 0 10 10 0 0 0 8.75 9.913v2.587h-2.5a1.25 1.25 0 0 0 0 2.5h7.5a1.25 1.25 0 0 0 0-2.5h-2.5v-2.587A10 10 0 0 0 25 13.75Z",fill:"url(#microphoneBottom)"}),(0,a.jsx)("path",{d:"M15 18.75a5 5 0 0 0 5-5v-7.5a5 5 0 0 0-10 0v7.5a5 5 0 0 0 5 5Z",fill:"url(#microphoneTop)"})]}):(0,a.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M12 15a4 4 0 0 0 4-4V5a4 4 0 1 0-8 0v6a4 4 0 0 0 4 4ZM10 5a2 2 0 1 1 4 0v6a2 2 0 0 1-4 0V5Zm10 6a1 1 0 0 0-2 0 6 6 0 1 1-12 0 1 1 0 1 0-2 0 8 8 0 0 0 7 7.93V21H9a1 1 0 0 0 0 2h6a1 1 0 0 0 0-2h-2v-2.07A8 8 0 0 0 20 11Z",fill:"#fff"})});var Lc=({slash:e,status:t,deviceRequest:r})=>e?(0,a.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("path",{d:"M21.53 7.15a1 1 0 0 0-1 0L17 8.89A3 3 0 0 0 14 6H5a3 3 0 0 0-3 3v6a3 3 0 0 0 3 3h9a3 3 0 0 0 3-2.89l3.56 1.78A1 1 0 0 0 21 17a1 1 0 0 0 .875-.514A1 1 0 0 0 22 16V8a1 1 0 0 0-.47-.85ZM15 15a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1h9a1 1 0 0 1 1 1v6Zm5-.62-3-1.5v-1.76l3-1.5v4.76Z",fill:"#fff"}),(0,a.jsx)("path",{d:"M4.005 1.53A1.75 1.75 0 1 0 1.53 4.005l19.446 19.446a1.75 1.75 0 1 0 2.475-2.475L4.005 1.53Z",fill:"#fff",stroke:"#d84949",strokeLinecap:"round"})]}):t?(0,a.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M4.497 3.669 2.164 1.336a.586.586 0 1 0-.828.828L2.695 3.5a1.75 1.75 0 0 0-1.529 1.75v3.5a1.75 1.75 0 0 0 1.75 1.75h5.25a1.75 1.75 0 0 0 1.109-.403l2.56 2.567a.583.583 0 0 0 .957-.19.582.582 0 0 0-.128-.638L4.497 3.669Zm3.67 5.664h-5.25a.583.583 0 0 1-.584-.583v-3.5a.583.583 0 0 1 .583-.584h.928l4.59 4.597a.583.583 0 0 1-.268.07Zm4.392-5.162a.583.583 0 0 0-.583 0l-2.06 1.015A1.75 1.75 0 0 0 8.166 3.5h-.781a.583.583 0 0 0 0 1.166h.781a.583.583 0 0 1 .584.584v.875a.944.944 0 0 0 0 .11.38.38 0 0 0 .029.117s.03.035.04.059a.584.584 0 0 0 .088.122s.059.035.088.058l.099.065c.044.006.09.006.134 0a.41.41 0 0 0 .082 0 .949.949 0 0 0 .11 0 .38.38 0 0 0 .117-.03l2.13-1.015v3.337a.583.583 0 0 0 1.166 0V4.666a.584.584 0 0 0-.274-.495Z",fill:"#fff"})}):r?(0,a.jsxs)("svg",{width:"30",height:"30",viewBox:"0 0 30 30",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("path",{d:"M26.54 8.438c.23 0 .456.06.656.176a1.315 1.315 0 0 1 .617 1.117v10.517a1.318 1.318 0 0 1-.617 1.117 1.31 1.31 0 0 1-.696.198 1.31 1.31 0 0 1-.578-.145l-4.672-2.34v-8.177l4.633-2.287c.2-.116.426-.177.656-.177Z",fill:"url(#cameraRight)"}),(0,a.jsx)("path",{d:"M20.104 8.55a3.75 3.75 0 0 1 1.146 2.563v7.775A3.75 3.75 0 0 1 17.5 22.5H6.25a3.75 3.75 0 0 1-3.75-3.75v-7.5A3.75 3.75 0 0 1 6.25 7.5H17.5a3.75 3.75 0 0 1 2.604 1.05Z",fill:"url(#cameraLeft)"})]}):(0,a.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M21.53 7.15a1 1 0 0 0-1 0L17 8.89A3 3 0 0 0 14 6H5a3 3 0 0 0-3 3v6a3 3 0 0 0 3 3h9a3 3 0 0 0 3-2.89l3.56 1.78A1 1 0 0 0 21 17a1 1 0 0 0 .875-.514A1 1 0 0 0 22 16V8a1 1 0 0 0-.47-.85ZM15 15a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1h9a1 1 0 0 1 1 1v6Zm5-.62-3-1.5v-1.76l3-1.5v4.76Z",fill:"#fff"})});const Dc=yr.path`
491
682
  fill: ${e=>e.white?"#fff":e.theme.controlsIconColor};
492
- `,$s=yr.path`
683
+ `,Ic=yr.path`
493
684
  fill: ${e=>e.white?"#fff":e.theme.controlsIconColor};
494
685
  stroke: ${e=>e.white?"#fff":e.theme.controlsIconColor};
495
- `;var Ks=({arrow:e,white:t,deviceRequest:r})=>r?(0,a.jsxs)("svg",{width:"30",height:"30",viewBox:"0 0 30 30",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("path",{d:"M6.25 3.75h17.5A3.75 3.75 0 0 1 27.5 7.5v10a3.75 3.75 0 0 1-3.75 3.75H6.25A3.75 3.75 0 0 1 2.5 17.5v-10a3.75 3.75 0 0 1 3.75-3.75Z",fill:"url(#screenTop)"}),(0,a.jsx)("path",{d:"M13.75 23.75v-2.5h2.5v2.5h5a1.25 1.25 0 0 1 0 2.5H8.75a1.25 1.25 0 0 1 0-2.5h5Z",fill:"url(#screenBottom)"})]}):(0,a.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)(Ws,{d:"M19 3H5a3 3 0 0 0-3 3v8a3 3 0 0 0 3 3h6v2H7a1 1 0 0 0 0 2h10a1 1 0 0 0 0-2h-4v-2h6a3 3 0 0 0 3-3V6a3 3 0 0 0-3-3Zm1 11a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v8Z",white:t}),e&&(0,a.jsx)($s,{d:"m12.443 7.054-.002-.002a.625.625 0 0 0-.205-.13.624.624 0 0 0-.473 0 .625.625 0 0 0-.205.13l-.002.002-2.498 2.501a.627.627 0 0 0 .887.887l1.43-1.436V12.5a.625.625 0 1 0 1.25 0V9.006l1.429 1.436a.626.626 0 0 0 1.023-.684.627.627 0 0 0-.136-.203l-2.498-2.5Z",strokeWidth:".25",white:t})]});const Gs=yr.circle`
686
+ `;var Ac=({arrow:e,white:t,deviceRequest:r})=>r?(0,a.jsxs)("svg",{width:"30",height:"30",viewBox:"0 0 30 30",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("path",{d:"M6.25 3.75h17.5A3.75 3.75 0 0 1 27.5 7.5v10a3.75 3.75 0 0 1-3.75 3.75H6.25A3.75 3.75 0 0 1 2.5 17.5v-10a3.75 3.75 0 0 1 3.75-3.75Z",fill:"url(#screenTop)"}),(0,a.jsx)("path",{d:"M13.75 23.75v-2.5h2.5v2.5h5a1.25 1.25 0 0 1 0 2.5H8.75a1.25 1.25 0 0 1 0-2.5h5Z",fill:"url(#screenBottom)"})]}):(0,a.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)(Dc,{d:"M19 3H5a3 3 0 0 0-3 3v8a3 3 0 0 0 3 3h6v2H7a1 1 0 0 0 0 2h10a1 1 0 0 0 0-2h-4v-2h6a3 3 0 0 0 3-3V6a3 3 0 0 0-3-3Zm1 11a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v8Z",white:t}),e&&(0,a.jsx)(Ic,{d:"m12.443 7.054-.002-.002a.625.625 0 0 0-.205-.13.624.624 0 0 0-.473 0 .625.625 0 0 0-.205.13l-.002.002-2.498 2.501a.627.627 0 0 0 .887.887l1.43-1.436V12.5a.625.625 0 1 0 1.25 0V9.006l1.429 1.436a.626.626 0 0 0 1.023-.684.627.627 0 0 0-.136-.203l-2.498-2.5Z",strokeWidth:".25",white:t})]});const Nc=yr.circle`
496
687
  stroke: ${({theme:e})=>e.primaryColor};
497
- `,Zs=yr.circle`
498
- stroke: ${({theme:e})=>Qs(e.primaryColor,.7683870967741935)};
499
- `,Qs=(e,t)=>{const r=e.slice(1,3),n=e.slice(3,5),i=e.slice(5,7);return`rgba(${parseInt(r,16)}, ${parseInt(n,16)}, ${parseInt(i,16)}, ${t})`};var Ys=()=>(0,a.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",style:{margin:"auto",background:"0 0",display:"block",shapeRendering:"auto",maxWidth:"200px",maxHeight:"200px"},width:"100%",height:"100%",viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid",children:[(0,a.jsxs)(Gs,{cx:"50",cy:"50",r:"0",fill:"none",children:[(0,a.jsx)("animate",{attributeName:"r",repeatCount:"indefinite",dur:"1.25s",values:"0;28",keyTimes:"0;1",keySplines:"0 0.2 0.8 1",calcMode:"spline",begin:"0s"}),(0,a.jsx)("animate",{attributeName:"opacity",repeatCount:"indefinite",dur:"1.25s",values:"1;0",keyTimes:"0;1",keySplines:"0.2 0 0.8 1",calcMode:"spline",begin:"0s"})]}),(0,a.jsxs)(Zs,{cx:"50",cy:"50",r:"0",fill:"none",children:[(0,a.jsx)("animate",{attributeName:"r",repeatCount:"indefinite",dur:"1.25s",values:"0;28",keyTimes:"0;1",keySplines:"0 0.2 0.8 1",calcMode:"spline",begin:"-0.625s"}),(0,a.jsx)("animate",{attributeName:"opacity",repeatCount:"indefinite",dur:"1.25s",values:"1;0",keyTimes:"0;1",keySplines:"0.2 0 0.8 1",calcMode:"spline",begin:"-0.625s"})]})]});var Js=()=>(0,a.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M15.71 12.71a6 6 0 1 0-7.42 0 10 10 0 0 0-6.22 8.18 1.006 1.006 0 1 0 2 .22 8 8 0 0 1 15.9 0 1 1 0 0 0 1 .89h.11a1 1 0 0 0 .88-1.1 10 10 0 0 0-6.25-8.19ZM12 12a4 4 0 1 1 0-8 4 4 0 0 1 0 8Z",fill:"#fff"})});const Xs=yr.div`
688
+ `,Fc=yr.circle`
689
+ stroke: ${({theme:e})=>zc(e.primaryColor,.7683870967741935)};
690
+ `,zc=(e,t)=>{const r=e.slice(1,3),n=e.slice(3,5),i=e.slice(5,7);return`rgba(${parseInt(r,16)}, ${parseInt(n,16)}, ${parseInt(i,16)}, ${t})`};var Bc=()=>(0,a.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",style:{margin:"auto",background:"0 0",display:"block",shapeRendering:"auto",maxWidth:"200px",maxHeight:"200px"},width:"100%",height:"100%",viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid",children:[(0,a.jsxs)(Nc,{cx:"50",cy:"50",r:"0",fill:"none",children:[(0,a.jsx)("animate",{attributeName:"r",repeatCount:"indefinite",dur:"1.25s",values:"0;28",keyTimes:"0;1",keySplines:"0 0.2 0.8 1",calcMode:"spline",begin:"0s"}),(0,a.jsx)("animate",{attributeName:"opacity",repeatCount:"indefinite",dur:"1.25s",values:"1;0",keyTimes:"0;1",keySplines:"0.2 0 0.8 1",calcMode:"spline",begin:"0s"})]}),(0,a.jsxs)(Fc,{cx:"50",cy:"50",r:"0",fill:"none",children:[(0,a.jsx)("animate",{attributeName:"r",repeatCount:"indefinite",dur:"1.25s",values:"0;28",keyTimes:"0;1",keySplines:"0 0.2 0.8 1",calcMode:"spline",begin:"-0.625s"}),(0,a.jsx)("animate",{attributeName:"opacity",repeatCount:"indefinite",dur:"1.25s",values:"1;0",keyTimes:"0;1",keySplines:"0.2 0 0.8 1",calcMode:"spline",begin:"-0.625s"})]})]});const Uc=yr.div`
500
691
  display: flex;
501
692
  flex: 1;
502
693
  flex-direction: ${e=>e.direction};
@@ -504,7 +695,7 @@ to {
504
695
  padding: 0 10px;
505
696
  position: relative;
506
697
  overflow: hidden;
507
- `,ec=yr.div`
698
+ `,Vc=yr.div`
508
699
  display: flex;
509
700
  width: ${e=>e.audioTiles?"100%":"landscape"===e.orientation&&e.reduced?"20%":"100%"};
510
701
  height: ${e=>e.audioTiles?"100%":"portrait"===e.orientation&&e.reduced?"50%":"100%"};
@@ -514,7 +705,7 @@ to {
514
705
  align-content: center;
515
706
  gap: ${e=>e.audioTiles?"48px":"15px"};
516
707
  overflow: scroll;
517
- `,tc=yr.div`
708
+ `,Hc=yr.div`
518
709
  display: flex;
519
710
  justify-content: center;
520
711
  align-items: center;
@@ -526,7 +717,7 @@ to {
526
717
  box-sizing: border-box;
527
718
  max-height: 100%;
528
719
  cursor: ${e=>e.cursor?e.cursor:"default"};
529
- `,rc=yr.video`
720
+ `,qc=yr.video`
530
721
  position: absolute;
531
722
  top: 0;
532
723
  left: 0;
@@ -536,14 +727,14 @@ to {
536
727
  border-radius: inherit;
537
728
  transform: ${e=>e.mirror?"scale(-1, 1)":"none"};
538
729
  z-index: ${e=>e.zIndex?e.zIndex:"unset"};
539
- `,nc=yr.div`
730
+ `,Wc=yr.div`
540
731
  display: flex;
541
732
  position: absolute;
542
733
  top: 8px;
543
734
  left: 8px;
544
735
  gap: 8px;
545
736
  z-index: 15;
546
- `,ic=yr.div`
737
+ `,$c=yr.div`
547
738
  display: flex;
548
739
  justify-content: center;
549
740
  align-items: center;
@@ -551,7 +742,7 @@ to {
551
742
  height: 26px;
552
743
  border-radius: 50%;
553
744
  background-color: rgba(28, 32, 36, 0.25);
554
- `,oc=yr.div`
745
+ `,Kc=yr.div`
555
746
  position: absolute;
556
747
  display: flex;
557
748
  align-items: center;
@@ -563,7 +754,7 @@ to {
563
754
  left: 8px;
564
755
  color: white;
565
756
  z-index: 15;
566
- `,ac=yr.span`
757
+ `,Gc=yr.span`
567
758
  display: inline-block;
568
759
  font-size: 11px;
569
760
  font-weight: 700;
@@ -572,7 +763,7 @@ to {
572
763
  overflow: hidden;
573
764
  text-overflow: ellipsis;
574
765
  box-sizing: border-box;
575
- `,sc=yr.div`
766
+ `,Zc=yr.div`
576
767
  display: flex;
577
768
  justify-content: center;
578
769
  align-items: center;
@@ -589,12 +780,12 @@ to {
589
780
  width: 8px;
590
781
  height: 8px;
591
782
  }
592
- `,cc=yr.img`
783
+ `,Qc=yr.img`
593
784
  width: 100%;
594
785
  height: 100%;
595
786
  border-radius: inherit;
596
787
  object-fit: cover;
597
- `,lc=yr.div`
788
+ `,Yc=yr.div`
598
789
  display: flex;
599
790
  justify-content: center;
600
791
  align-items: center;
@@ -604,12 +795,12 @@ to {
604
795
  border-radius: inherit;
605
796
  z-index: 10;
606
797
  background: ${e=>e.streaming?"linear-gradient(0deg, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8))":"none"};
607
- `,dc=yr.p`
798
+ `,Jc=yr.p`
608
799
  text-align: center;
609
800
  font-weight: 600;
610
801
  font-size: ${e=>"small"===e.size?"12px":"medium"===e.size?"14px":(e.size,"16px")};
611
802
  margin: 12px 6px;
612
- `,uc=yr.div`
803
+ `,Xc=yr.div`
613
804
  display: flex;
614
805
  max-width: 90%;
615
806
  background: rgba(45, 45, 45, 0.5);
@@ -618,7 +809,7 @@ to {
618
809
  gap: ${e=>"small"===e.size?"8px":"medium"===e.size?"12px":(e.size,"18px")};
619
810
  gap: 18px;
620
811
  box-sizing: border-box;
621
- `,pc=yr.button`
812
+ `,el=yr.button`
622
813
  display: flex;
623
814
  justify-content: center;
624
815
  align-items: center;
@@ -632,7 +823,7 @@ to {
632
823
  border: 2px solid ${({theme:e})=>e.primaryColor};
633
824
  box-sizing: border-box;
634
825
  }
635
- `,hc=yr.div`
826
+ `,tl=yr.div`
636
827
  display: flex;
637
828
  justify-content: center;
638
829
  align-items: center;
@@ -640,12 +831,12 @@ to {
640
831
  height: 56px;
641
832
  background-color: #2d2d2d;
642
833
  border-radius: 30%;
643
- `,fc=yr.span`
834
+ `,rl=yr.span`
644
835
  font-size: 26px;
645
836
  font-weight: 600;
646
837
  line-height: 20px;
647
838
  color: #fff;
648
- `,mc=(yr.img`
839
+ `,nl=(yr.img`
649
840
  border: 2px solid #fff;
650
841
  border-radius: 8px;
651
842
  width: 36px;
@@ -673,7 +864,7 @@ to {
673
864
  100% {
674
865
  opacity: 0;
675
866
  }
676
- `),gc=vr`
867
+ `),il=vr`
677
868
  0% {
678
869
  opacity: 0;
679
870
  }
@@ -683,7 +874,7 @@ to {
683
874
  100% {
684
875
  opacity: 0;
685
876
  }
686
- `,vc=vr`
877
+ `,ol=vr`
687
878
  0% {
688
879
  width: 200px;
689
880
  height: 200px;
@@ -692,7 +883,7 @@ to {
692
883
  width: 88px;
693
884
  height: 88px;
694
885
  }
695
- `,yc=yr.div`
886
+ `,al=yr.div`
696
887
  display: flex;
697
888
  position: absolute;
698
889
  z-index: 20;
@@ -700,7 +891,7 @@ to {
700
891
  bottom: 0;
701
892
  cursor: ${e=>e.cursor};
702
893
  transition: all 0.4s;
703
- `,bc=yr.div`
894
+ `,sl=yr.div`
704
895
  display: flex;
705
896
  justify-content: center;
706
897
  align-items: center;
@@ -741,7 +932,7 @@ to {
741
932
  }
742
933
  }
743
934
  `}
744
- `,wc=yr.div`
935
+ `,cl=yr.div`
745
936
  display: flex;
746
937
  flex-direction: column;
747
938
  justify-content: center;
@@ -761,7 +952,7 @@ to {
761
952
  border-color: ${e.theme.primaryColor};
762
953
  }
763
954
  `} 1.3s infinite;
764
- `,xc=yr.div`
955
+ `,ll=yr.div`
765
956
  display: flex;
766
957
  justify-content: center;
767
958
  align-items: center;
@@ -769,18 +960,18 @@ to {
769
960
  border-radius: 50%;
770
961
  width: 62px;
771
962
  height: 62px;
772
- `,Sc=yr.span`
963
+ `,dl=yr.span`
773
964
  font-size: 16px;
774
965
  font-weight: 700;
775
966
  max-width: 60%;
776
967
  line-height: 18px;
777
968
  text-align: center;
778
969
  margin: 8px 0;
779
- `,_c=yr.div`
970
+ `,ul=yr.div`
780
971
  display: flex;
781
972
  gap: 10px;
782
973
  margin-top: 15px;
783
- `,kc=yr.button`
974
+ `,pl=yr.button`
784
975
  background-color: ${e=>e.active?e.theme.primaryColor:"transparent"};
785
976
  border: 2px solid ${({theme:e})=>e.primaryColor};
786
977
  border-radius: 50px;
@@ -793,7 +984,7 @@ to {
793
984
  &:hover {
794
985
  background-color: ${({theme:e})=>e.primaryColor};
795
986
  }
796
- `,Cc=yr.button`
987
+ `,hl=yr.button`
797
988
  display: flex;
798
989
  justify-content: center;
799
990
  align-items: center;
@@ -805,51 +996,51 @@ to {
805
996
  background-color: rgba(28, 32, 36, 0.5);
806
997
  color: #fff;
807
998
  z-index: 20;
808
- `,Ec=yr.div`
999
+ `,fl=yr.div`
809
1000
  display: flex;
810
1001
  flex-direction: column;
811
1002
  justify-content: space-between;
812
1003
  width: 100%;
813
1004
  height: 100%;
814
- `,Pc=yr.div`
1005
+ `,ml=yr.div`
815
1006
  display: flex;
816
1007
  flex-direction: row;
817
1008
  justify-content: space-between;
818
1009
  padding: 16px;
819
- `,Rc=yr.div`
1010
+ `,gl=yr.div`
820
1011
  position: absolute;
821
1012
  width: 100%;
822
1013
  height: 100%;
823
1014
  background-color: ${e=>e.show?"rgba(0, 0, 0, 0.75)":"transparent"};
824
1015
  transition: all ${({show:e})=>e?"0.2s":"0.66s"};
825
1016
  z-index: ${({show:e})=>e?16:-1};
826
- `,Tc=yr.div`
1017
+ `,vl=yr.div`
827
1018
  position: absolute;
828
1019
  width: 100%;
829
1020
  height: 100%;
830
1021
  background-color: #fff;
831
1022
  border-radius: inherit;
832
1023
  z-index: 20;
833
- animation: ${mc} 0.8s forwards;
834
- `,jc=yr.img`
1024
+ animation: ${nl} 0.8s forwards;
1025
+ `,yl=yr.img`
835
1026
  width: 88px;
836
1027
  height: 88px;
837
1028
  border: 3px solid #fff;
838
1029
  border-radius: 15px;
839
1030
  box-sizing: border-box;
840
1031
  z-index: 20;
841
- animation: ${gc} 2.5s, ${vc} 0.3s;
842
- `,Oc=yr.img`
1032
+ animation: ${il} 2.5s, ${ol} 0.3s;
1033
+ `,bl=yr.img`
843
1034
  border: 2px solid #fff;
844
1035
  border-radius: 8px;
845
1036
  width: 36px;
846
1037
  height: 36px;
847
- `,Mc=yr(oc)`
1038
+ `,wl=yr(Kc)`
848
1039
  padding: 5px 10px;
849
1040
  font-size: 11px;
850
1041
  font-weight: 700;
851
1042
  line-height: 13px;
852
- `,Lc=yr.div`
1043
+ `,xl=yr.div`
853
1044
  display: flex;
854
1045
  align-items: center;
855
1046
  font-size: 18px;
@@ -859,12 +1050,12 @@ to {
859
1050
  width: 12px;
860
1051
  height: 12px;
861
1052
  }
862
- `;var Dc=({stream:e,width:t=0,height:n=0})=>{const{t:i}=Fi(),o=(0,je.useRef)(null),[s,c]=(0,je.useState)(!1),[l,d]=(0,je.useState)(null),[u,p]=(0,je.useState)(!1),h=(0,je.useRef)(null),{selfPeerId:f,permissions:m,setBlockedFeaturePopupOpen:g}=(0,je.useContext)(Ya),{highlightedTile:y}=is(),b="screenshare"===y?.type&&y.peerId===f,w=e.microphone&&!e.muted,x=!l&&s&&!y&&(!w||!e.webcam||!b),S=`${t}px`,_=`${n}px`,k=(C=t)<200?"small":C<300?"medium":"large";var C;return(0,je.useEffect)((()=>{if(!o.current)throw new Error("videoElementRef not available");e.webcam&&o.current?Qa.requestVideo({mediaId:e.webcam,element:o.current}):e.webcam||(o.current.srcObject=null)}),[e.webcam]),(0,je.useEffect)((()=>{if(l)return h.current&&clearTimeout(h.current),h.current=setTimeout((()=>{d(null),r(v)(i("requestDevice.timedOut"),{className:"error"})}),2e4),()=>{h.current&&clearTimeout(h.current)};c(!1)}),[l,i]),(0,je.useEffect)((()=>{const t=t=>{const{peerId:n,result:o}=t.detail.result;if(n===e.id&&(h.current&&clearTimeout(h.current),d(null),!0!==o)){let t=i("requestDevice.declined");e.profile.name&&(t=i("requestDevice.userDeclined",{user:e.profile.name})),r(v)(t,{className:"error"})}};return Qa.addEventListener("requestDeviceResult",t),()=>{Qa.removeEventListener("requestDeviceResult",t)}}),[e.id,e.profile,i]),(0,je.useEffect)((()=>{const t=async t=>{const{peerId:r}=t.detail,{type:n}=t.detail.event;"snapshot"===n&&r===e.id&&p(!0)};return Qa.addEventListener("customMessage",t),()=>{Qa.removeEventListener("customMessage",t)}}),[e.id]),(0,a.jsxs)(tc,{onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),style:{width:S,height:_},border:!e.webcam,activeBorder:x||e.isSpeaking,cursor:x?"pointer":"default","data-peer-id":e.id,children:[(0,a.jsx)(rc,{ref:o,style:{maxHeight:"100%"},autoPlay:!0,playsInline:!0,muted:!0}),u&&(0,a.jsx)(Tc,{onAnimationEnd:()=>p(!1)}),!x&&(0,a.jsxs)(nc,{children:[!w&&(0,a.jsx)(ic,{children:(0,a.jsx)(Hs,{status:!0})}),!e.webcam&&(0,a.jsx)(ic,{children:(0,a.jsx)(qs,{status:!0})})]}),l&&(0,a.jsx)(lc,{streaming:Boolean(e.webcam),children:(0,a.jsx)(Ys,{})}),x&&(0,a.jsxs)(lc,{streaming:Boolean(e.webcam),children:[(0,a.jsx)(dc,{size:k,children:i("requestDevice.requestInput")}),(0,a.jsxs)(uc,{size:k,children:[!w&&(0,a.jsx)(pc,{onClick:()=>{m.find((e=>"request_input"===e))?(Qa.requestPeerDevice(e.id,"microphone"),d("microphone")):g(!0)},size:k,children:(0,a.jsx)(Hs,{deviceRequest:!0})}),!e.webcam&&(0,a.jsx)(pc,{onClick:()=>{m.find((e=>"request_input"===e))?(Qa.requestPeerDevice(e.id,"webcam"),d("webcam")):g(!0)},size:k,children:(0,a.jsx)(qs,{deviceRequest:!0})}),!b&&(0,a.jsx)(pc,{onClick:()=>{m.find((e=>"request_input"===e))?(Qa.requestPeerDevice(e.id,"screen"),d("screen")):g(!0)},size:k,children:(0,a.jsx)(Ks,{deviceRequest:!0})})]})]}),!l&&!x&&!e.webcam&&(0,a.jsx)(lc,{children:(0,a.jsx)(hc,{children:e.profile.image?(0,a.jsx)(cc,{src:e.profile.image}):e.profile.name?(0,a.jsx)(fc,{children:e.profile.name.slice(0,1).toUpperCase()}):(0,a.jsx)(Js,{})})}),!x&&(0,a.jsxs)(oc,{children:[(0,a.jsx)(sc,{children:e.profile.image?(0,a.jsx)(cc,{src:e.profile.image}):e.profile.name?(0,a.jsx)("span",{children:e.profile.name.slice(0,1).toUpperCase()}):(0,a.jsx)(Js,{})}),(0,a.jsx)(ac,{children:e.profile.name||i("misc.user")})]})]})};je=o("85Hg2");const Ic=yr.div`
1053
+ `;var Sl=({stream:e,width:t=0,height:n=0})=>{const{t:i}=Fi(),o=(0,je.useRef)(null),[s,c]=(0,je.useState)(!1),[l,d]=(0,je.useState)(null),[u,p]=(0,je.useState)(!1),h=(0,je.useRef)(null),{selfPeerId:f,permissions:m,setBlockedFeaturePopupOpen:g}=(0,je.useContext)(Ya),{highlightedTile:y}=is(),b="screenshare"===y?.type&&y.peerId===f,w=e.microphone&&!e.muted,x=!l&&s&&!y&&(!w||!e.webcam||!b),S=`${t}px`,_=`${n}px`,k=(C=t)<200?"small":C<300?"medium":"large";var C;return(0,je.useEffect)((()=>{if(!o.current)throw new Error("videoElementRef not available");e.webcam&&o.current?Qa.requestVideo({mediaId:e.webcam,element:o.current}):e.webcam||(o.current.srcObject=null)}),[e.webcam]),(0,je.useEffect)((()=>{if(l)return h.current&&clearTimeout(h.current),h.current=setTimeout((()=>{d(null),r(v)(i("requestDevice.timedOut"),{className:"error"})}),2e4),()=>{h.current&&clearTimeout(h.current)};c(!1)}),[l,i]),(0,je.useEffect)((()=>{const t=t=>{const{peerId:n,result:o}=t.detail.result;if(n===e.id&&(h.current&&clearTimeout(h.current),d(null),!0!==o)){let t=i("requestDevice.declined");e.profile.name&&(t=i("requestDevice.userDeclined",{user:e.profile.name})),r(v)(t,{className:"error"})}};return Qa.addEventListener("requestDeviceResult",t),()=>{Qa.removeEventListener("requestDeviceResult",t)}}),[e.id,e.profile,i]),(0,je.useEffect)((()=>{const t=async t=>{const{peerId:r}=t.detail,{type:n}=t.detail.event;"snapshot"===n&&r===e.id&&p(!0)};return Qa.addEventListener("customMessage",t),()=>{Qa.removeEventListener("customMessage",t)}}),[e.id]),(0,a.jsxs)(Hc,{onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),style:{width:S,height:_},border:!e.webcam,activeBorder:x||e.isSpeaking,cursor:x?"pointer":"default","data-peer-id":e.id,children:[(0,a.jsx)(qc,{ref:o,style:{maxHeight:"100%"},autoPlay:!0,playsInline:!0,muted:!0}),u&&(0,a.jsx)(vl,{onAnimationEnd:()=>p(!1)}),!x&&(0,a.jsxs)(Wc,{children:[!w&&(0,a.jsx)($c,{children:(0,a.jsx)(Mc,{status:!0})}),!e.webcam&&(0,a.jsx)($c,{children:(0,a.jsx)(Lc,{status:!0})})]}),l&&(0,a.jsx)(Yc,{streaming:Boolean(e.webcam),children:(0,a.jsx)(Bc,{})}),x&&(0,a.jsxs)(Yc,{streaming:Boolean(e.webcam),children:[(0,a.jsx)(Jc,{size:k,children:i("requestDevice.requestInput")}),(0,a.jsxs)(Xc,{size:k,children:[!w&&(0,a.jsx)(el,{onClick:()=>{m.find((e=>"request_input"===e))?(Qa.requestPeerDevice(e.id,"microphone"),d("microphone")):g(!0)},size:k,children:(0,a.jsx)(Mc,{deviceRequest:!0})}),!e.webcam&&(0,a.jsx)(el,{onClick:()=>{m.find((e=>"request_input"===e))?(Qa.requestPeerDevice(e.id,"webcam"),d("webcam")):g(!0)},size:k,children:(0,a.jsx)(Lc,{deviceRequest:!0})}),!b&&(0,a.jsx)(el,{onClick:()=>{m.find((e=>"request_input"===e))?(Qa.requestPeerDevice(e.id,"screen"),d("screen")):g(!0)},size:k,children:(0,a.jsx)(Ac,{deviceRequest:!0})})]})]}),!l&&!x&&!e.webcam&&(0,a.jsx)(Yc,{children:(0,a.jsx)(tl,{children:e.profile.image?(0,a.jsx)(Qc,{src:e.profile.image}):e.profile.name?(0,a.jsx)(rl,{children:e.profile.name.slice(0,1).toUpperCase()}):(0,a.jsx)(Hs,{})})}),!x&&(0,a.jsxs)(Kc,{children:[(0,a.jsx)(Zc,{children:e.profile.image?(0,a.jsx)(Qc,{src:e.profile.image}):e.profile.name?(0,a.jsx)("span",{children:e.profile.name.slice(0,1).toUpperCase()}):(0,a.jsx)(Hs,{})}),(0,a.jsx)(Gc,{children:e.profile.name||i("misc.user")})]})]})};je=o("85Hg2");const _l=yr.div`
863
1054
  display: flex;
864
1055
  flex-direction: column;
865
1056
  align-items: center;
866
1057
  border-radius: 14px;
867
- `,Ac=yr.div`
1058
+ `,kl=yr.div`
868
1059
  display: flex;
869
1060
  justify-content: center;
870
1061
  align-items: center;
@@ -873,7 +1064,7 @@ to {
873
1064
  background-color: #131313;
874
1065
  border-radius: inherit;
875
1066
  position: relative;
876
- `,Nc=(yr.img`
1067
+ `,Cl=(yr.img`
877
1068
  width: 100%;
878
1069
  height: 100%;
879
1070
  border-radius: inherit;
@@ -894,13 +1085,13 @@ to {
894
1085
  svg {
895
1086
  height: 12px;
896
1087
  }
897
- `),Fc=yr.span`
1088
+ `),El=yr.span`
898
1089
  font-size: 14px;
899
1090
  font-weight: 600;
900
1091
  line-height: 15px;
901
1092
  margin-top: 14px;
902
1093
  color: #fff;
903
- `;var zc=({stream:e})=>{const{selfPeerId:t}=(0,je.useContext)(Ya),r=t===e.id,n=(e.microphone||r)&&!e.muted;return(0,a.jsxs)(Ic,{children:[(0,a.jsxs)(Ac,{children:[e.profile.name&&(0,a.jsx)(fc,{children:e.profile.name.slice(0,1).toUpperCase()}),!e.profile.name&&(0,a.jsx)(Js,{}),(0,a.jsx)(Nc,{children:(0,a.jsx)(Hs,{redSlash:!n})})]}),(0,a.jsx)(Fc,{children:e.profile.name})]})};je=o("85Hg2");var Bc=()=>(0,a.jsx)("svg",{width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M9.625 5.042a.917.917 0 0 0-.917.916v1.458L3.401 2.099a.92.92 0 0 0-1.302 1.302l5.317 5.307H5.958a.917.917 0 0 0 0 1.834h3.667a.917.917 0 0 0 .348-.074.917.917 0 0 0 .495-.495.917.917 0 0 0 .074-.348V5.958a.917.917 0 0 0-.917-.916Zm10.276 13.557-5.317-5.307h1.458a.917.917 0 0 0 0-1.834h-3.667a.917.917 0 0 0-.348.074.916.916 0 0 0-.495.495.917.917 0 0 0-.074.348v3.667a.917.917 0 0 0 1.834 0v-1.458l5.307 5.317a.915.915 0 0 0 1.302 0 .915.915 0 0 0 0-1.302Z",fill:"#fff"})});var Uc=({color:e="#fff"})=>(0,a.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"m13.41 12 6.3-6.29a1.004 1.004 0 0 0-1.42-1.42L12 10.59l-6.29-6.3a1.004 1.004 0 1 0-1.42 1.42l6.3 6.29-6.3 6.29a.999.999 0 0 0 0 1.42 1 1 0 0 0 1.42 0l6.29-6.3 6.29 6.3a1.001 1.001 0 0 0 1.639-.325 1 1 0 0 0-.22-1.095L13.41 12Z",fill:e})});const Vc=()=>(0,a.jsx)("svg",{width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M18.333 9.625a.916.916 0 0 0-.916.916v6.417a.917.917 0 0 1-.917.917H3.667a.917.917 0 0 1-.917-.917V9.625a.917.917 0 0 1 .917-.917H5.5a.917.917 0 0 0 .917-.623l.495-1.504a.917.917 0 0 1 .87-.623h5.051a.917.917 0 1 0 0-1.833H7.737a2.75 2.75 0 0 0-2.604 1.879l-.293.917H3.667a2.75 2.75 0 0 0-2.75 2.75v7.333a2.75 2.75 0 0 0 2.75 2.75H16.5a2.75 2.75 0 0 0 2.75-2.75v-6.417a.916.916 0 0 0-.917-.962Zm-8.25-.917a3.667 3.667 0 1 0 0 7.333 3.667 3.667 0 0 0 0-7.333Zm0 5.5a1.834 1.834 0 1 1 0-3.667 1.834 1.834 0 0 1 0 3.667ZM20.167 4.125h-.917v-.917a.917.917 0 0 0-1.833 0v.917H16.5a.917.917 0 1 0 0 1.833h.917v.917a.916.916 0 1 0 1.833 0v-.917h.917a.917.917 0 0 0 0-1.833Z",fill:"#fff"})}),Hc=({availableWidth:e,availableHeight:t,numberOfTiles:r,ratio:n})=>{let i=0;for(let o=50,a=5e3;o<a&&(i=Math.floor((a+o)/2),i!==o);){const s=Math.floor(e/i);Math.ceil(r/s)*(i*n)<t?o=i:a=i}return i},qc=({containerWidth:e,containerHeight:t,minimumWidth:r,maximumWidth:n,orientation:i,extended:o})=>{const a=e/100*20,s=e/100*30,c=e-20;if("landscape"===i){const e={width:1,height:1};if(o){const r=t/e.height*e.width;return r>c?c:r}return a<r?r:a>n?n:a}return"portrait"===i?o?c:s<r?r:s>n?n:s:0};je=o("85Hg2");var Wc=({device:e,requesterId:t,setExtended:r,setDeviceRequest:n})=>{const{t:i}=Fi(),{streams:o}=is(),[s,c]=(0,je.useState)(!1),l=o.find((e=>e.id===t)),d=(e=>"microphone"===e?Hs:"webcam"===e?qs:"screen"===e?Ks:Hs)(e),u={microphone:i("misc.microphone"),webcam:i("misc.camera"),screen:i("misc.screen")};return(0,je.useEffect)((()=>{r(!0)}),[r]),(0,a.jsx)(wc,{children:s?(0,a.jsx)(Ys,{}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(xc,{children:(0,a.jsx)(d,{deviceRequest:!0})}),(0,a.jsx)(Sc,{children:i("requestDevice.request",{user:l?.profile?.name||i("misc.someone"),device:u[e]})}),(0,a.jsxs)(_c,{children:[(0,a.jsx)(kc,{onClick:async()=>{if(r(!1),c(!0),"microphone"===e){const{microphone:e}=Qa.getDevicesState();e.enabled?await Qa.unMuteMicrophone():await Qa.enableMicrophone()}else if("webcam"===e)await Qa.enableVideo();else if("screen"===e)return n(null),void await Qa.enableScreenshare();c(!1),n(null)},active:!0,children:i("misc.accept")}),(0,a.jsx)(kc,{onClick:()=>{r(!1),n(null),Qa.denyDeviceRequest(e)},children:i("misc.decline")})]})]})})};const $c=({mouseDownEvent:e,targetElement:t,containerElement:r})=>{let n=0,i=0,o=0;e.nativeEvent instanceof MouseEvent?(i=e.nativeEvent.clientX,o=e.nativeEvent.clientY):e.nativeEvent instanceof TouchEvent&&(i=e.nativeEvent.touches[0]?.clientX,o=e.nativeEvent.touches[0]?.clientY);const a=t.getBoundingClientRect(),s=i-a.left,c=o-a.top+60;t&&(t.style.transition="none");const l=e=>{e.stopPropagation(),window.removeEventListener("click",l,!0)},d=e=>{let i=0,o=0;if(e instanceof MouseEvent?(i=e.pageX,o=e.pageY):e instanceof TouchEvent&&(i=e.touches[0]?.pageX,o=e.touches[0]?.pageY),n+=1,t&&r){let e=i-s,n=o-c;e<0&&(e=0),n<0&&(n=0),e>r.clientWidth-t.offsetWidth&&(e=r.clientWidth-t.offsetWidth),n>r.clientHeight-t.offsetHeight&&(n=r.clientHeight-t.offsetHeight),t.style.left=`${e}px`,t.style.top=`${n}px`}},u=e=>{if(n>6&&e instanceof MouseEvent&&window.addEventListener("click",l,!0),t&&r){t.style.transition="all 0.4s",delete t.dataset.top,delete t.dataset.right,delete t.dataset.bottom,delete t.dataset.left;const e=r.getBoundingClientRect(),n=t.getBoundingClientRect(),i=(n.left+n.width/2-e.left)/e.width*100,o=(n.top+n.height/2-e.top)/e.height*100;o>=50&&(t.dataset.bottom="true",t.style.top=e.height-n.height+"px"),o<50&&(t.dataset.top="true",t.style.top="0"),i>=50&&(t.dataset.right="true",t.style.left=e.width-n.width-10+"px"),i<50&&(t.dataset.left="true",t.style.left="10px")}document.removeEventListener("mousemove",d),document.removeEventListener("touchmove",d),document.removeEventListener("mouseup",u),document.removeEventListener("touchend",u)};document.addEventListener("mousemove",d),document.addEventListener("touchmove",d),document.addEventListener("mouseup",u),document.addEventListener("touchend",u)},Kc=({element:e})=>{const t={top:"unset",right:"unset",bottom:"unset",left:"unset"},{top:r,right:n,bottom:i,left:o}=e.dataset;(r||n||i||o)&&(r&&(t.top="0"),n&&(t.right="10px"),i&&(t.bottom="0"),o&&(t.left="10px"),e.style.top=t.top,e.style.right=t.right,e.style.bottom=t.bottom,e.style.left=t.left)};je=o("85Hg2");var Gc=()=>{const{t:e}=Fi(),{muted:t,streaming:n}=(0,je.useContext)(Ya);return(0,je.useEffect)((()=>{navigator.mediaSession?.setMicrophoneActive?.(!t),navigator.mediaSession?.setCameraActive?.(n)}),[t,n]),(0,je.useEffect)((()=>{try{navigator.mediaSession.setActionHandler("togglemicrophone",(async()=>{try{Qa.getDevicesState().microphone.enabled?await Qa.toggleMute():await Qa.enableMicrophone()}catch(t){console.warn(t),r(v)(`${e("notifications.microphoneError")} (PiP)`,{className:"error"})}}))}catch(e){console.warn("MediaSession togglemicrophone action is not available")}try{navigator.mediaSession.setActionHandler("togglecamera",(async()=>{try{Qa.getDevicesState().camera.enabled?await Qa.disableVideo():await Qa.enableVideo()}catch(t){console.warn(t),r(v)(`${e("notifications.cameraError")} (PiP)`,{className:"error"})}}))}catch(e){console.warn("MediaSession togglecamera action is not available")}try{navigator.mediaSession.setActionHandler("hangup",(()=>{Qa.endCall()}))}catch(e){console.warn("MediaSession hangup action is not available")}}),[e]),null};var Zc=({isSomeonePresenting:e,width:t,height:n})=>{const{t:i}=Fi(),[o,s]=(0,je.useState)(!1),[l,d]=(0,je.useState)(!1),[u,p]=(0,je.useState)(!1),[h,f]=(0,je.useState)(null),[m,g]=(0,je.useState)("user"),[y,b]=(0,je.useState)(!1),[w,x]=(0,je.useState)(null),S=(0,je.useRef)(null),_=(0,je.useRef)(null),k=(0,je.useRef)(null),{videosContainerRef:C,remoteTilesContainerRef:E,profile:P,muted:R,streaming:T,orientation:j,options:O,permissions:M,setBlockedFeaturePopupOpen:L}=(0,je.useContext)(Ya),{streams:D}=is(),[I,A]=Bs(C.current),N=T&&!o?"pointer":"default",F=qc({containerWidth:I,containerHeight:A,minimumWidth:126,maximumWidth:150,orientation:j,extended:o});let z=`${F}px`,B=`${F}px`;const U=D.length<1,V=e=>{if(!e.detail?.camera?.device)return;if(!S.current)throw new Error("videoElementRef not available");const{facingMode:t}=Qa.requestLocalVideo(S.current);g(t),_.current=S.current.srcObject,p(Qa.isVideoZoomAvailable())},H=e=>{const{peerId:t,deviceType:r}=e.detail;k.current&&Kc({element:k.current}),f({device:r,requesterId:t})},q=e=>{!o&&k.current&&C.current&&$c({mouseDownEvent:e,targetElement:k.current,containerElement:C.current})};(0,je.useEffect)((()=>{if(!S.current)throw new Error("videoElementRef not available");if(T){const{facingMode:e}=Qa.requestLocalVideo(S.current);g(e),p(Qa.isVideoZoomAvailable()),_.current=S.current.srcObject}else S.current.srcObject=null,_.current=null,s(!1)}),[T]),(0,je.useEffect)((()=>{T&&S.current&&!S.current.srcObject&&(S.current.srcObject=_.current)}),[T,U,e]),(0,je.useEffect)((()=>{k.current&&Kc({element:k.current})}),[I,A]),(0,je.useEffect)((()=>{o||(b(!1),x(null))}),[o]),(0,je.useEffect)((()=>(Qa.addEventListener("localVideoChange",V),Qa.addEventListener("requestDevice",H),()=>{Qa.removeEventListener("localVideoChange",V),Qa.removeEventListener("requestDevice",H)})),[]);const W=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(Gc,{}),(0,a.jsx)(rc,{ref:S,mirror:"user"===m,zIndex:15,autoPlay:!0,playsInline:!0,muted:!0}),h&&(0,a.jsx)(Wc,{device:h.device,requesterId:h.requesterId,setExtended:s,setDeviceRequest:f}),!o&&(0,a.jsxs)(nc,{children:[R&&(0,a.jsx)(ic,{children:(0,a.jsx)(Hs,{status:!0})}),!T&&(0,a.jsx)(ic,{children:(0,a.jsx)(qs,{status:!0})})]}),!T&&(0,a.jsx)(lc,{children:(0,a.jsx)(hc,{children:P.image?(0,a.jsx)(cc,{src:P.image}):P.name?(0,a.jsx)(fc,{children:P.name.slice(0,1).toUpperCase()}):(0,a.jsx)(Js,{})})}),!o&&(0,a.jsx)(Mc,{children:(0,a.jsx)("span",{children:i("misc.you")})}),o&&(0,a.jsxs)(Ec,{children:[(0,a.jsxs)(Pc,{children:[(0,a.jsx)(Cc,{onClick:()=>{s(!1)},children:(0,a.jsx)(Bc,{})}),w&&(0,a.jsx)(jc,{src:w,onAnimationEnd:e=>{const t=gc.getName();e.animationName===t&&x(null)}})]}),(0,a.jsxs)(Pc,{children:[(0,a.jsx)(Cc,{onClick:async()=>{if(M.find((e=>"instant_picture"===e))){if(!y&&!w){if(!S.current)throw new Error("Video element is not available");b(!0);const e=await Qa.captureVideo(S.current);x(e);try{const{objectUrl:t}=await fetch(`${O.streamApiURL}/uploadSnapshot`,{method:"POST",body:JSON.stringify({file:e})}).then((e=>e.json()));await Qa.sendCustomMessageToAll({type:"snapshot",imageSrc:t});let r=i("snapshot.sentToUsers");if(1===D.length){const e=D[0].profile.name||i("misc.user");r=i("snapshot.sentToUser",{user:e})}Ir(r,{icon:(0,a.jsx)(Oc,{src:e}),duration:2500})}catch(e){r(v)(i("snapshot.error"),{className:"error"}),console.error(e)}}}else L(!0)},children:(0,a.jsx)(Vc,{})}),u&&(0,a.jsx)(Cc,{onClick:()=>{l?(Qa.unzoomVideo(),d(!1)):(Qa.zoomVideo(),d(!0))},children:(0,a.jsxs)(Lc,{children:[l?"2":"1",(0,a.jsx)(Uc,{})]})}),(0,a.jsx)("span",{style:{width:"36px"}})]})]})]});return E?.current&&(U||e)?(0,c.createPortal)((0,a.jsx)(tc,{style:{width:`${t}px`,height:`${n}px`},border:!T,children:W}),E.current):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(yc,{ref:k,style:{width:z,height:B},cursor:N,onClick:()=>{T&&!h&&!o&&k.current&&(Kc({element:k.current}),s(!0))},onMouseDown:q,onTouchStart:q,children:(0,a.jsxs)(bc,{orientation:j,border:!T&&!h,children:[y&&(0,a.jsx)(Tc,{onAnimationEnd:()=>b(!1)}),W]})}),(0,a.jsx)(Rc,{show:o})]})};je=o("85Hg2"),je=o("85Hg2");const Qc=yr.div`
1094
+ `;var Pl=({stream:e})=>{const{selfPeerId:t}=(0,je.useContext)(Ya),r=t===e.id,n=(e.microphone||r)&&!e.muted;return(0,a.jsxs)(_l,{children:[(0,a.jsxs)(kl,{children:[e.profile.name&&(0,a.jsx)(rl,{children:e.profile.name.slice(0,1).toUpperCase()}),!e.profile.name&&(0,a.jsx)(Hs,{}),(0,a.jsx)(Cl,{children:(0,a.jsx)(Mc,{redSlash:!n})})]}),(0,a.jsx)(El,{children:e.profile.name})]})};je=o("85Hg2");var Rl=()=>(0,a.jsx)("svg",{width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M9.625 5.042a.917.917 0 0 0-.917.916v1.458L3.401 2.099a.92.92 0 0 0-1.302 1.302l5.317 5.307H5.958a.917.917 0 0 0 0 1.834h3.667a.917.917 0 0 0 .348-.074.917.917 0 0 0 .495-.495.917.917 0 0 0 .074-.348V5.958a.917.917 0 0 0-.917-.916Zm10.276 13.557-5.317-5.307h1.458a.917.917 0 0 0 0-1.834h-3.667a.917.917 0 0 0-.348.074.916.916 0 0 0-.495.495.917.917 0 0 0-.074.348v3.667a.917.917 0 0 0 1.834 0v-1.458l5.307 5.317a.915.915 0 0 0 1.302 0 .915.915 0 0 0 0-1.302Z",fill:"#fff"})});const Tl=()=>(0,a.jsx)("svg",{width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M18.333 9.625a.916.916 0 0 0-.916.916v6.417a.917.917 0 0 1-.917.917H3.667a.917.917 0 0 1-.917-.917V9.625a.917.917 0 0 1 .917-.917H5.5a.917.917 0 0 0 .917-.623l.495-1.504a.917.917 0 0 1 .87-.623h5.051a.917.917 0 1 0 0-1.833H7.737a2.75 2.75 0 0 0-2.604 1.879l-.293.917H3.667a2.75 2.75 0 0 0-2.75 2.75v7.333a2.75 2.75 0 0 0 2.75 2.75H16.5a2.75 2.75 0 0 0 2.75-2.75v-6.417a.916.916 0 0 0-.917-.962Zm-8.25-.917a3.667 3.667 0 1 0 0 7.333 3.667 3.667 0 0 0 0-7.333Zm0 5.5a1.834 1.834 0 1 1 0-3.667 1.834 1.834 0 0 1 0 3.667ZM20.167 4.125h-.917v-.917a.917.917 0 0 0-1.833 0v.917H16.5a.917.917 0 1 0 0 1.833h.917v.917a.916.916 0 1 0 1.833 0v-.917h.917a.917.917 0 0 0 0-1.833Z",fill:"#fff"})}),jl=({availableWidth:e,availableHeight:t,numberOfTiles:r,ratio:n})=>{let i=0;for(let o=50,a=5e3;o<a&&(i=Math.floor((a+o)/2),i!==o);){const s=Math.floor(e/i);Math.ceil(r/s)*(i*n)<t?o=i:a=i}return i},Ol=({containerWidth:e,containerHeight:t,minimumWidth:r,maximumWidth:n,orientation:i,extended:o})=>{const a=e/100*20,s=e/100*30,c=e-20;if("landscape"===i){const e={width:1,height:1};if(o){const r=t/e.height*e.width;return r>c?c:r}return a<r?r:a>n?n:a}return"portrait"===i?o?c:s<r?r:s>n?n:s:0};je=o("85Hg2");var Ml=({device:e,requesterId:t,setExtended:r,setDeviceRequest:n})=>{const{t:i}=Fi(),{streams:o}=is(),[s,c]=(0,je.useState)(!1),l=o.find((e=>e.id===t)),d=(e=>"microphone"===e?Mc:"webcam"===e?Lc:"screen"===e?Ac:Mc)(e),u={microphone:i("misc.microphone"),webcam:i("misc.camera"),screen:i("misc.screen")};return(0,je.useEffect)((()=>{r(!0)}),[r]),(0,a.jsx)(cl,{children:s?(0,a.jsx)(Bc,{}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(ll,{children:(0,a.jsx)(d,{deviceRequest:!0})}),(0,a.jsx)(dl,{children:i("requestDevice.request",{user:l?.profile?.name||i("misc.someone"),device:u[e]})}),(0,a.jsxs)(ul,{children:[(0,a.jsx)(pl,{onClick:async()=>{if(r(!1),c(!0),"microphone"===e){const{microphone:e}=Qa.getDevicesState();e.enabled?await Qa.unMuteMicrophone():await Qa.enableMicrophone()}else if("webcam"===e)await Qa.enableVideo();else if("screen"===e)return n(null),void await Qa.enableScreenshare();c(!1),n(null)},active:!0,children:i("misc.accept")}),(0,a.jsx)(pl,{onClick:()=>{r(!1),n(null),Qa.denyDeviceRequest(e)},children:i("misc.decline")})]})]})})};const Ll=({mouseDownEvent:e,targetElement:t,containerElement:r})=>{let n=0,i=0,o=0;e.nativeEvent instanceof MouseEvent?(i=e.nativeEvent.clientX,o=e.nativeEvent.clientY):e.nativeEvent instanceof TouchEvent&&(i=e.nativeEvent.touches[0]?.clientX,o=e.nativeEvent.touches[0]?.clientY);const a=t.getBoundingClientRect(),s=i-a.left,c=o-a.top+60;t&&(t.style.transition="none");const l=e=>{e.stopPropagation(),window.removeEventListener("click",l,!0)},d=e=>{let i=0,o=0;if(e instanceof MouseEvent?(i=e.pageX,o=e.pageY):e instanceof TouchEvent&&(i=e.touches[0]?.pageX,o=e.touches[0]?.pageY),n+=1,t&&r){let e=i-s,n=o-c;e<0&&(e=0),n<0&&(n=0),e>r.clientWidth-t.offsetWidth&&(e=r.clientWidth-t.offsetWidth),n>r.clientHeight-t.offsetHeight&&(n=r.clientHeight-t.offsetHeight),t.style.left=`${e}px`,t.style.top=`${n}px`}},u=e=>{if(n>6&&e instanceof MouseEvent&&window.addEventListener("click",l,!0),t&&r){t.style.transition="all 0.4s",delete t.dataset.top,delete t.dataset.right,delete t.dataset.bottom,delete t.dataset.left;const e=r.getBoundingClientRect(),n=t.getBoundingClientRect(),i=(n.left+n.width/2-e.left)/e.width*100,o=(n.top+n.height/2-e.top)/e.height*100;o>=50&&(t.dataset.bottom="true",t.style.top=e.height-n.height+"px"),o<50&&(t.dataset.top="true",t.style.top="0"),i>=50&&(t.dataset.right="true",t.style.left=e.width-n.width-10+"px"),i<50&&(t.dataset.left="true",t.style.left="10px")}document.removeEventListener("mousemove",d),document.removeEventListener("touchmove",d),document.removeEventListener("mouseup",u),document.removeEventListener("touchend",u)};document.addEventListener("mousemove",d),document.addEventListener("touchmove",d),document.addEventListener("mouseup",u),document.addEventListener("touchend",u)},Dl=({element:e})=>{const t={top:"unset",right:"unset",bottom:"unset",left:"unset"},{top:r,right:n,bottom:i,left:o}=e.dataset;(r||n||i||o)&&(r&&(t.top="0"),n&&(t.right="10px"),i&&(t.bottom="0"),o&&(t.left="10px"),e.style.top=t.top,e.style.right=t.right,e.style.bottom=t.bottom,e.style.left=t.left)};je=o("85Hg2");var Il=()=>{const{t:e}=Fi(),{muted:t,streaming:n}=(0,je.useContext)(Ya);return(0,je.useEffect)((()=>{navigator.mediaSession?.setMicrophoneActive?.(!t),navigator.mediaSession?.setCameraActive?.(n)}),[t,n]),(0,je.useEffect)((()=>{try{navigator.mediaSession.setActionHandler("togglemicrophone",(async()=>{try{Qa.getDevicesState().microphone.enabled?await Qa.toggleMute():await Qa.enableMicrophone()}catch(t){console.warn(t),r(v)(`${e("notifications.microphoneError")} (PiP)`,{className:"error"})}}))}catch(e){console.warn("MediaSession togglemicrophone action is not available")}try{navigator.mediaSession.setActionHandler("togglecamera",(async()=>{try{Qa.getDevicesState().camera.enabled?await Qa.disableVideo():await Qa.enableVideo()}catch(t){console.warn(t),r(v)(`${e("notifications.cameraError")} (PiP)`,{className:"error"})}}))}catch(e){console.warn("MediaSession togglecamera action is not available")}try{navigator.mediaSession.setActionHandler("hangup",(()=>{Qa.endCall()}))}catch(e){console.warn("MediaSession hangup action is not available")}}),[e]),null};var Al=({isSomeonePresenting:e,width:t,height:n})=>{const{t:i}=Fi(),[o,s]=(0,je.useState)(!1),[l,d]=(0,je.useState)(!1),[u,p]=(0,je.useState)(!1),[h,f]=(0,je.useState)(null),[m,g]=(0,je.useState)("user"),[y,b]=(0,je.useState)(!1),[w,x]=(0,je.useState)(null),S=(0,je.useRef)(null),_=(0,je.useRef)(null),k=(0,je.useRef)(null),{videosContainerRef:C,remoteTilesContainerRef:E,profile:P,muted:R,streaming:T,orientation:j,options:O,permissions:M,setBlockedFeaturePopupOpen:L}=(0,je.useContext)(Ya),{streams:D}=is(),[I,A]=Tc(C.current),N=T&&!o?"pointer":"default",F=Ol({containerWidth:I,containerHeight:A,minimumWidth:126,maximumWidth:150,orientation:j,extended:o});let z=`${F}px`,B=`${F}px`;const U=D.length<1,V=e=>{if(!e.detail?.camera?.device)return;if(!S.current)throw new Error("videoElementRef not available");const{facingMode:t}=Qa.requestLocalVideo(S.current);g(t),_.current=S.current.srcObject,p(Qa.isVideoZoomAvailable())},H=e=>{const{peerId:t,deviceType:r}=e.detail;k.current&&Dl({element:k.current}),f({device:r,requesterId:t})},q=e=>{!o&&k.current&&C.current&&Ll({mouseDownEvent:e,targetElement:k.current,containerElement:C.current})};(0,je.useEffect)((()=>{if(!S.current)throw new Error("videoElementRef not available");if(T){const{facingMode:e}=Qa.requestLocalVideo(S.current);g(e),p(Qa.isVideoZoomAvailable()),_.current=S.current.srcObject}else S.current.srcObject=null,_.current=null,s(!1)}),[T]),(0,je.useEffect)((()=>{T&&S.current&&!S.current.srcObject&&(S.current.srcObject=_.current)}),[T,U,e]),(0,je.useEffect)((()=>{k.current&&Dl({element:k.current})}),[I,A]),(0,je.useEffect)((()=>{o||(b(!1),x(null))}),[o]),(0,je.useEffect)((()=>(Qa.addEventListener("localVideoChange",V),Qa.addEventListener("requestDevice",H),()=>{Qa.removeEventListener("localVideoChange",V),Qa.removeEventListener("requestDevice",H)})),[]);const W=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(Il,{}),(0,a.jsx)(qc,{ref:S,mirror:"user"===m,zIndex:15,autoPlay:!0,playsInline:!0,muted:!0}),h&&(0,a.jsx)(Ml,{device:h.device,requesterId:h.requesterId,setExtended:s,setDeviceRequest:f}),!o&&(0,a.jsxs)(Wc,{children:[R&&(0,a.jsx)($c,{children:(0,a.jsx)(Mc,{status:!0})}),!T&&(0,a.jsx)($c,{children:(0,a.jsx)(Lc,{status:!0})})]}),!T&&(0,a.jsx)(Yc,{children:(0,a.jsx)(tl,{children:P.image?(0,a.jsx)(Qc,{src:P.image}):P.name?(0,a.jsx)(rl,{children:P.name.slice(0,1).toUpperCase()}):(0,a.jsx)(Hs,{})})}),!o&&(0,a.jsx)(wl,{children:(0,a.jsx)("span",{children:i("misc.you")})}),o&&(0,a.jsxs)(fl,{children:[(0,a.jsxs)(ml,{children:[(0,a.jsx)(hl,{onClick:()=>{s(!1)},children:(0,a.jsx)(Rl,{})}),w&&(0,a.jsx)(yl,{src:w,onAnimationEnd:e=>{const t=il.getName();e.animationName===t&&x(null)}})]}),(0,a.jsxs)(ml,{children:[(0,a.jsx)(hl,{onClick:async()=>{if(M.find((e=>"instant_picture"===e))){if(!y&&!w){if(!S.current)throw new Error("Video element is not available");b(!0);const e=await Qa.captureVideo(S.current);x(e);try{const{objectUrl:t}=await fetch(`${O.streamApiURL}/uploadSnapshot`,{method:"POST",body:JSON.stringify({file:e})}).then((e=>e.json()));await Qa.sendCustomMessageToAll({type:"snapshot",imageSrc:t});let r=i("snapshot.sentToUsers");if(1===D.length){const e=D[0].profile.name||i("misc.user");r=i("snapshot.sentToUser",{user:e})}Ir(r,{icon:(0,a.jsx)(bl,{src:e}),duration:2500})}catch(e){r(v)(i("snapshot.error"),{className:"error"}),console.error(e)}}}else L(!0)},children:(0,a.jsx)(Tl,{})}),u&&(0,a.jsx)(hl,{onClick:()=>{l?(Qa.unzoomVideo(),d(!1)):(Qa.zoomVideo(),d(!0))},children:(0,a.jsxs)(xl,{children:[l?"2":"1",(0,a.jsx)(Us,{})]})}),(0,a.jsx)("span",{style:{width:"36px"}})]})]})]});return E?.current&&(U||e)?(0,c.createPortal)((0,a.jsx)(Hc,{style:{width:`${t}px`,height:`${n}px`},border:!T,children:W}),E.current):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(al,{ref:k,style:{width:z,height:B},cursor:N,onClick:()=>{T&&!h&&!o&&k.current&&(Dl({element:k.current}),s(!0))},onMouseDown:q,onTouchStart:q,children:(0,a.jsxs)(sl,{orientation:j,border:!T&&!h,children:[y&&(0,a.jsx)(vl,{onAnimationEnd:()=>b(!1)}),W]})}),(0,a.jsx)(gl,{show:o})]})};je=o("85Hg2"),je=o("85Hg2");const Nl=yr.div`
904
1095
  display: flex;
905
1096
  justify-content: center;
906
1097
  align-items: center;
@@ -908,45 +1099,12 @@ to {
908
1099
  height: 100%;
909
1100
  color: #cbcbcb;
910
1101
  box-sizing: border-box;
911
- `,Yc=yr.video`
1102
+ `,Fl=yr.video`
912
1103
  max-width: 100%;
913
1104
  max-height: 100%;
914
1105
  object-fit: contain;
915
1106
  border-radius: 10px;
916
- `;var Jc=e=>{const{selfPeerId:t}=(0,je.useContext)(Ya),r=(0,je.useRef)(null),n=e.peerId===t;return(0,je.useEffect)((()=>{e.data.mediaId&&r.current&&Qa.requestVideo({mediaId:e.data.mediaId,element:r.current})}),[e.data.mediaId]),(0,je.useEffect)((()=>{if(n&&r.current)return Qa.requestLocalScreenshare(r.current),()=>{Qa.disableScreenshare()}}),[n]),(0,a.jsx)(Qc,{children:(0,a.jsx)(Yc,{ref:r,autoPlay:!0,playsInline:!0,muted:!0})})};je=o("85Hg2");je=o("85Hg2");const Xc=yr.div`
917
- max-width: 100%;
918
- margin-top: 60px;
919
- margin-bottom: 20px;
920
- padding: 0 25px;
921
- box-sizing: border-box;
922
- `,el=yr.div`
923
- font-size: 20px;
924
- font-weight: 700;
925
- margin-bottom: 30px;
926
- `,tl=yr.div`
927
- display: flex;
928
- flex-direction: column;
929
- gap: 17px;
930
- `,rl=yr.img`
931
- border-radius: 8px;
932
- width: 36px;
933
- height: 36px;
934
- `,nl=yr.div`
935
- display: flex;
936
- justify-content: center;
937
- align-items: center;
938
- background-color: #2d2d2d;
939
- width: 100%;
940
- border-radius: 50px;
941
- color: #fff;
942
- font-size: 7px;
943
- font-weight: 700;
944
-
945
- svg {
946
- width: 8px;
947
- height: 8px;
948
- }
949
- `,il=e=>{const{roomId:t}=Qa.getState();if(t){const r=`stream_share_history_${t}`;try{const t=localStorage.getItem(r);if(t){const n=JSON.parse(t);n.push({...e,id:n.length});const i=JSON.stringify(n);localStorage.setItem(r,i)}else{const t=JSON.stringify([{...e,id:0}]);localStorage.setItem(r,t)}}catch(e){console.warn(e)}}else console.warn("Undefined room ID")},ol=()=>{const{t:e}=Fi(),[t,r]=(0,je.useState)([]);return(0,je.useEffect)((()=>{try{const{roomId:e}=Qa.getState(),t=localStorage.getItem(`stream_share_history_${e}`);if(t){const e=JSON.parse(t);r(e)}}catch(e){console.warn(e)}}),[]),t.length<1?null:(0,a.jsxs)(Xc,{children:[(0,a.jsx)(el,{children:e("sharedHistory.shared")}),(0,a.jsx)(tl,{children:t.map((e=>{let t;return e.statusText&&(t={text:"From",boldText:e.statusText},e.statusIconUrl&&(t.icon=e.statusIconUrl),e.statusIconLetter&&(t.icon=(0,a.jsx)(nl,{children:e.statusIconLetter.slice(0,1).toUpperCase()})),e.statusIconUser&&(t.icon=(0,a.jsx)(nl,{children:(0,a.jsx)(Js,{})}))),(0,a.jsx)(Or,{options:{width:"325px",backgroundColor:"#2d2d2d",ellipsis:!0,icon:e.iconUrl?(0,a.jsx)(rl,{style:{...e.iconStyle},src:e.iconUrl,onError:Tr}):void 0,button:{text:"Open",action:()=>window.open(e.url,"_blank"),style:{backgroundColor:"#515151",border:"2px solid #515151"}},status:t},children:e.title},e.id)}))})]})},al=yr.div`
1107
+ `;var zl=e=>{const{selfPeerId:t}=(0,je.useContext)(Ya),r=(0,je.useRef)(null),n=e.peerId===t;return(0,je.useEffect)((()=>{e.data.mediaId&&r.current&&Qa.requestVideo({mediaId:e.data.mediaId,element:r.current})}),[e.data.mediaId]),(0,je.useEffect)((()=>{if(n&&r.current)return Qa.requestLocalScreenshare(r.current),()=>{Qa.disableScreenshare()}}),[n]),(0,a.jsx)(Nl,{children:(0,a.jsx)(Fl,{ref:r,autoPlay:!0,playsInline:!0,muted:!0})})};je=o("85Hg2");const Bl=yr.div`
950
1108
  display: flex;
951
1109
  justify-content: center;
952
1110
  align-items: center;
@@ -958,7 +1116,7 @@ to {
958
1116
  width: 100%;
959
1117
  height: 100%;
960
1118
  overflow: hidden;
961
- `,sl=yr.div`
1119
+ `,Ul=yr.div`
962
1120
  width: 100%;
963
1121
  height: 100%;
964
1122
 
@@ -966,16 +1124,16 @@ to {
966
1124
  width: 100%;
967
1125
  height: 100%;
968
1126
  }
969
- `,cl="youtube_start",ll="youtube_play",dl="youtube_pause",ul="youtube_stop";var pl=e=>{const{selfPeerId:t}=(0,je.useContext)(Ya),[r,n]=(0,je.useState)(null),i=e.peerId===t,o=e=>{const t=e.target.getCurrentTime();e.data===YT.PlayerState.PAUSED&&Qa.sendCustomMessageToAll({type:dl,time:t}),e.data===YT.PlayerState.PLAYING&&Qa.sendCustomMessageToAll({type:ll,time:t})};return(0,je.useEffect)((()=>{const t=t=>{const r=t.target;i||il({title:r.videoTitle||"Video",url:`https://youtube.com/watch?v=${e.data.videoId}`,iconUrl:`https://i.ytimg.com/vi/${e.data.videoId}/mqdefault.jpg`,statusText:"YouTube",statusIconUrl:"https://stream-assets.snapcall.io/icons/youtube.png"})};var r;if(n((e=>(e&&e.destroy(),null))),window.onYouTubeIframeAPIReady=()=>{const r=new YT.Player("youtube-player",{height:"390",width:"640",videoId:e.data.videoId,playerVars:{autoplay:1,controls:i?1:0,playsinline:1,enablejsapi:1,origin:window.location.origin,rel:0,start:e.data.time||0},events:{onReady:t,onStateChange:i?o:void 0}});n(r)},window?.YT?.loaded?window.onYouTubeIframeAPIReady():(r="https://www.youtube.com/iframe_api",new Promise(((e,t)=>{const n=document.createElement("script");n.src=r,n.addEventListener("load",(()=>e(1))),n.addEventListener("error",(e=>t(e))),document.body.appendChild(n)}))),i)return Qa.sendCustomMessageToAll({type:cl,videoId:e.data.videoId}),()=>{Qa.sendCustomMessageToAll({type:ul,videoId:e.data.videoId})}}),[e.data,i]),(0,je.useEffect)((()=>{if(!i&&r){const e=e=>{const{type:t,time:n}=e.detail.event;t===dl?(r.pauseVideo(),r.seekTo(n,!0)):t===ll&&(r.playVideo(),r.seekTo(n,!0))};return Qa.addEventListener("customMessage",e),()=>{Qa.removeEventListener("customMessage",e)}}if(i&&r){const t=t=>{const{peerId:n}=t.detail,i=r.getCurrentTime();Qa.sendCustomMessage(n,{type:cl,videoId:e.data.videoId,time:i})};return Qa.addEventListener("newPeer",t),()=>{Qa.removeEventListener("newPeer",t)}}}),[e.data,i,r]),(0,a.jsx)(al,{children:(0,a.jsx)(sl,{children:(0,a.jsx)("div",{id:"youtube-player"})})})};je=o("85Hg2");const hl=yr.div`
1127
+ `,Vl="youtube_start",Hl="youtube_play",ql="youtube_pause",Wl="youtube_stop";var $l=e=>{const{selfPeerId:t}=(0,je.useContext)(Ya),[r,n]=(0,je.useState)(null),i=e.peerId===t,o=e=>{const t=e.target.getCurrentTime();e.data===YT.PlayerState.PAUSED&&Qa.sendCustomMessageToAll({type:ql,time:t}),e.data===YT.PlayerState.PLAYING&&Qa.sendCustomMessageToAll({type:Hl,time:t})};return(0,je.useEffect)((()=>{const t=t=>{const r=t.target;i||Zs({title:r.videoTitle||"Video",url:`https://youtube.com/watch?v=${e.data.videoId}`,iconUrl:`https://i.ytimg.com/vi/${e.data.videoId}/mqdefault.jpg`,statusText:"YouTube",statusIconUrl:"https://stream-assets.snapcall.io/icons/youtube.png"})};var r;if(n((e=>(e&&e.destroy(),null))),window.onYouTubeIframeAPIReady=()=>{const r=new YT.Player("youtube-player",{height:"390",width:"640",videoId:e.data.videoId,playerVars:{autoplay:1,controls:i?1:0,playsinline:1,enablejsapi:1,origin:window.location.origin,rel:0,start:e.data.time||0},events:{onReady:t,onStateChange:i?o:void 0}});n(r)},window?.YT?.loaded?window.onYouTubeIframeAPIReady():(r="https://www.youtube.com/iframe_api",new Promise(((e,t)=>{const n=document.createElement("script");n.src=r,n.addEventListener("load",(()=>e(1))),n.addEventListener("error",(e=>t(e))),document.body.appendChild(n)}))),i)return Qa.sendCustomMessageToAll({type:Vl,videoId:e.data.videoId}),()=>{Qa.sendCustomMessageToAll({type:Wl,videoId:e.data.videoId})}}),[e.data,i]),(0,je.useEffect)((()=>{if(!i&&r){const e=e=>{const{type:t,time:n}=e.detail.event;t===ql?(r.pauseVideo(),r.seekTo(n,!0)):t===Hl&&(r.playVideo(),r.seekTo(n,!0))};return Qa.addEventListener("customMessage",e),()=>{Qa.removeEventListener("customMessage",e)}}if(i&&r){const t=t=>{const{peerId:n}=t.detail,i=r.getCurrentTime();Qa.sendCustomMessage(n,{type:Vl,videoId:e.data.videoId,time:i})};return Qa.addEventListener("newPeer",t),()=>{Qa.removeEventListener("newPeer",t)}}}),[e.data,i,r]),(0,a.jsx)(Bl,{children:(0,a.jsx)(Ul,{children:(0,a.jsx)("div",{id:"youtube-player"})})})};je=o("85Hg2");const Kl=yr.div`
970
1128
  display: flex;
971
1129
  position: relative;
972
1130
  height: 100%;
973
1131
  max-width: 100%;
974
- `,fl=yr.img`
1132
+ `,Gl=yr.img`
975
1133
  max-height: 100%;
976
1134
  object-fit: contain;
977
1135
  border-radius: 20px;
978
- `,ml=yr.div`
1136
+ `,Zl=yr.div`
979
1137
  display: flex;
980
1138
  flex-direction: column;
981
1139
  justify-content: space-between;
@@ -984,16 +1142,16 @@ to {
984
1142
  height: 100%;
985
1143
  padding: 16px;
986
1144
  box-sizing: border-box;
987
- `,gl=yr.div`
1145
+ `,Ql=yr.div`
988
1146
  display: flex;
989
1147
  justify-content: space-between;
990
1148
  align-items: center;
991
- `,vl=yr.span`
1149
+ `,Yl=yr.span`
992
1150
  font-size: 12px;
993
1151
  font-weight: 700;
994
1152
  color: #fff;
995
1153
  text-shadow: 0px 1px 0px rgba(0, 0, 0, 0.15);
996
- `,yl=yr.a`
1154
+ `,Jl=yr.a`
997
1155
  color: #fff;
998
1156
  padding: 6px 12px;
999
1157
  font-size: 14px;
@@ -1004,10 +1162,10 @@ to {
1004
1162
  border-radius: 50px;
1005
1163
  text-decoration: none;
1006
1164
  cursor: pointer;
1007
- `,bl=yr.div`
1165
+ `,Xl=yr.div`
1008
1166
  display: flex;
1009
1167
  justify-content: center;
1010
- `,wl=yr.button`
1168
+ `,ed=yr.button`
1011
1169
  display: flex;
1012
1170
  justify-content: center;
1013
1171
  align-items: center;
@@ -1022,12 +1180,12 @@ to {
1022
1180
  width: 17px;
1023
1181
  height: 17px;
1024
1182
  }
1025
- `,xl=yr.img`
1183
+ `,td=yr.img`
1026
1184
  border: 2px solid #fff;
1027
1185
  border-radius: 8px;
1028
1186
  width: 36px;
1029
1187
  height: 36px;
1030
- `,Sl=yr.div`
1188
+ `,rd=yr.div`
1031
1189
  display: flex;
1032
1190
  justify-content: center;
1033
1191
  align-items: center;
@@ -1043,7 +1201,7 @@ to {
1043
1201
  width: 9px;
1044
1202
  height: 9px;
1045
1203
  }
1046
- `;var _l=e=>{const{t:t}=Fi(),{dispatch:r}=is(),n=(0,je.useRef)(null),[i,o]=(0,je.useState)(e.data.url),[s,c]=(0,je.useState)("auto"),l=(0,je.useMemo)((()=>{const t=e.data.url.split("/");return t[t.length-1]}),[e.data.url]),d=()=>{if(n.current){const{clientWidth:e}=n.current;c(`${e}px`)}},u=new Date(e.data.createdAt).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"});return(0,je.useEffect)((()=>{const t=document.createElement("img");t.onload=()=>{const e=document.createElement("canvas"),r=e.getContext("2d");e.width=t.width,e.height=t.height,r?.drawImage(t,0,0);const n=e.toDataURL("image/jpeg");o(n)},t.crossOrigin="anonymous",t.src=e.data.url}),[e.data.url]),(0,je.useEffect)((()=>(window.addEventListener("resize",d),()=>{window.removeEventListener("resize",d)})),[n]),(0,a.jsxs)(hl,{style:{width:s},children:[(0,a.jsx)(fl,{onLoad:d,ref:n,src:e.data.url,crossOrigin:"anonymous"}),(0,a.jsxs)(ml,{children:[(0,a.jsxs)(gl,{children:[(0,a.jsxs)(vl,{children:[t("snapshot.title")," · ",u]}),(0,a.jsx)(yl,{href:i,target:"_blank",download:l,children:t("snapshot.save")})]}),(0,a.jsx)(bl,{children:(0,a.jsx)(wl,{onClick:()=>{r({type:Ja.UNSET_HIGHLIGHTED_TILE})},children:(0,a.jsx)(Uc,{})})})]})]})};je=o("85Hg2");var kl=()=>{const{selfPeerId:e}=(0,je.useContext)(Ya),{dispatch:t,highlightedTile:r}=is();return(0,je.useEffect)((()=>{const n=e=>{const{peerId:n,mediaId:i,deviceType:o}=e.detail,a="mediaStart"===e.type;"screen"===o&&a?t({type:Ja.SET_HIGHLIGHTED_TILE,payload:{type:"screenshare",peerId:n,isGlobal:!0,data:{mediaId:i}}}):"screen"===o&&"screenshare"===r?.type&&r.peerId===n&&t({type:Ja.UNSET_HIGHLIGHTED_TILE})},i=n=>{"screenshareEnabled"===n.type?t({type:Ja.SET_HIGHLIGHTED_TILE,payload:{type:"screenshare",peerId:String(e),isGlobal:!0,data:{}}}):"screenshare"===r?.type&&r.peerId===e&&t({type:Ja.UNSET_HIGHLIGHTED_TILE})};return Qa.addEventListener("mediaStart",n),Qa.addEventListener("mediaStop",n),Qa.addEventListener("screenshareEnabled",i),Qa.addEventListener("screenshareDisabled",i),()=>{Qa.removeEventListener("mediaStart",n),Qa.removeEventListener("mediaStop",n),Qa.removeEventListener("screenshareEnabled",i),Qa.removeEventListener("screenshareDisabled",i)}}),[t,r,e]),null};je=o("85Hg2");var Cl=()=>{const{dispatch:e,highlightedTile:t}=is();return(0,je.useEffect)((()=>{const r=r=>{const{peerId:n}=r.detail,{type:i,videoId:o,time:a}=r.detail.event;i===cl?e({type:Ja.SET_HIGHLIGHTED_TILE,payload:{type:"youtube",peerId:n,isGlobal:!0,data:{videoId:o,time:a}}}):i===ul&&"youtube"===t?.type&&t.data.videoId===o&&e({type:Ja.UNSET_HIGHLIGHTED_TILE})};return Qa.addEventListener("customMessage",r),()=>{Qa.removeEventListener("customMessage",r)}}),[e,t]),null};je=o("85Hg2");var El=()=>{const{t:e}=Fi(),{dispatch:t,streams:r}=is();return(0,je.useEffect)((()=>{const n=async n=>{const{peerId:i}=n.detail,{type:o,imageSrc:s}=n.detail.event;if("snapshot"===o){const n=r.find((e=>e.id===i));if(n){const r=n.profile.name?(0,a.jsx)(Sl,{children:n.profile.name.slice(0,1).toUpperCase()}):(0,a.jsx)(Sl,{children:(0,a.jsx)(Js,{})}),o=new Date,c={text:e("misc.from"),boldText:n.profile.name||e("misc.user"),icon:r};Ir(e("snapshot.shared"),{width:"290px",icon:(0,a.jsx)(xl,{src:s,crossOrigin:"anonymous"}),messageStyle:{fontWeight:600,fontSize:"16px"},button:{text:e("misc.open"),action:({close:e})=>{t({type:Ja.SET_HIGHLIGHTED_TILE,payload:{type:"snapshot",peerId:i,isGlobal:!1,data:{url:s,createdAt:o.getTime()}}}),e()}},status:c,duration:1e4});const l=o.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"});il({title:`${e("snapshot.title")} · ${l}`,url:s,iconUrl:s,iconStyle:{border:"2px solid #fff"},statusText:c.boldText,statusIconLetter:n.profile.name?n.profile.name.slice(0,1).toUpperCase():void 0,statusIconUser:!n.profile.name})}}};return Qa.addEventListener("customMessage",n),()=>{Qa.removeEventListener("customMessage",n)}}),[r,t,e]),null};const Pl=yr.div`
1204
+ `;var nd=e=>{const{t:t}=Fi(),{dispatch:r}=is(),n=(0,je.useRef)(null),[i,o]=(0,je.useState)(e.data.url),[s,c]=(0,je.useState)("auto"),l=(0,je.useMemo)((()=>{const t=e.data.url.split("/");return t[t.length-1]}),[e.data.url]),d=()=>{if(n.current){const{clientWidth:e}=n.current;c(`${e}px`)}},u=new Date(e.data.createdAt).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"});return(0,je.useEffect)((()=>{const t=document.createElement("img");t.onload=()=>{const e=document.createElement("canvas"),r=e.getContext("2d");e.width=t.width,e.height=t.height,r?.drawImage(t,0,0);const n=e.toDataURL("image/jpeg");o(n)},t.crossOrigin="anonymous",t.src=e.data.url}),[e.data.url]),(0,je.useEffect)((()=>(window.addEventListener("resize",d),()=>{window.removeEventListener("resize",d)})),[n]),(0,a.jsxs)(Kl,{style:{width:s},children:[(0,a.jsx)(Gl,{onLoad:d,ref:n,src:e.data.url,crossOrigin:"anonymous"}),(0,a.jsxs)(Zl,{children:[(0,a.jsxs)(Ql,{children:[(0,a.jsxs)(Yl,{children:[t("snapshot.title")," · ",u]}),(0,a.jsx)(Jl,{href:i,target:"_blank",download:l,children:t("snapshot.save")})]}),(0,a.jsx)(Xl,{children:(0,a.jsx)(ed,{onClick:()=>{r({type:Ja.UNSET_HIGHLIGHTED_TILE})},children:(0,a.jsx)(Us,{})})})]})]})};je=o("85Hg2");var id=()=>{const{selfPeerId:e}=(0,je.useContext)(Ya),{dispatch:t,highlightedTile:r}=is();return(0,je.useEffect)((()=>{const n=e=>{const{peerId:n,mediaId:i,deviceType:o}=e.detail,a="mediaStart"===e.type;"screen"===o&&a?t({type:Ja.SET_HIGHLIGHTED_TILE,payload:{type:"screenshare",peerId:n,isGlobal:!0,data:{mediaId:i}}}):"screen"===o&&"screenshare"===r?.type&&r.peerId===n&&t({type:Ja.UNSET_HIGHLIGHTED_TILE})},i=n=>{"screenshareEnabled"===n.type?t({type:Ja.SET_HIGHLIGHTED_TILE,payload:{type:"screenshare",peerId:String(e),isGlobal:!0,data:{}}}):"screenshare"===r?.type&&r.peerId===e&&t({type:Ja.UNSET_HIGHLIGHTED_TILE})};return Qa.addEventListener("mediaStart",n),Qa.addEventListener("mediaStop",n),Qa.addEventListener("screenshareEnabled",i),Qa.addEventListener("screenshareDisabled",i),()=>{Qa.removeEventListener("mediaStart",n),Qa.removeEventListener("mediaStop",n),Qa.removeEventListener("screenshareEnabled",i),Qa.removeEventListener("screenshareDisabled",i)}}),[t,r,e]),null};je=o("85Hg2");var od=()=>{const{dispatch:e,highlightedTile:t}=is();return(0,je.useEffect)((()=>{const r=r=>{const{peerId:n}=r.detail,{type:i,videoId:o,time:a}=r.detail.event;i===Vl?e({type:Ja.SET_HIGHLIGHTED_TILE,payload:{type:"youtube",peerId:n,isGlobal:!0,data:{videoId:o,time:a}}}):i===Wl&&"youtube"===t?.type&&t.data.videoId===o&&e({type:Ja.UNSET_HIGHLIGHTED_TILE})};return Qa.addEventListener("customMessage",r),()=>{Qa.removeEventListener("customMessage",r)}}),[e,t]),null};je=o("85Hg2");var ad=()=>{const{t:e}=Fi(),{dispatch:t,streams:r}=is();return(0,je.useEffect)((()=>{const n=async n=>{const{peerId:i}=n.detail,{type:o,imageSrc:s}=n.detail.event;if("snapshot"===o){const n=r.find((e=>e.id===i));if(n){const r=n.profile.name?(0,a.jsx)(rd,{children:n.profile.name.slice(0,1).toUpperCase()}):(0,a.jsx)(rd,{children:(0,a.jsx)(Hs,{})}),o=new Date,c={text:e("misc.from"),boldText:n.profile.name||e("misc.user"),icon:r};Ir(e("snapshot.shared"),{width:"290px",icon:(0,a.jsx)(td,{src:s,crossOrigin:"anonymous"}),messageStyle:{fontWeight:600,fontSize:"16px"},button:{text:e("misc.open"),action:({close:e})=>{t({type:Ja.SET_HIGHLIGHTED_TILE,payload:{type:"snapshot",peerId:i,isGlobal:!1,data:{url:s,createdAt:o.getTime()}}}),e()}},status:c,duration:1e4});const l=o.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"});Zs({title:`${e("snapshot.title")} · ${l}`,url:s,iconUrl:s,iconStyle:{border:"2px solid #fff"},statusText:c.boldText,statusIconLetter:n.profile.name?n.profile.name.slice(0,1).toUpperCase():void 0,statusIconUser:!n.profile.name})}}};return Qa.addEventListener("customMessage",n),()=>{Qa.removeEventListener("customMessage",n)}}),[r,t,e]),null};const sd=yr.div`
1047
1205
  display: flex;
1048
1206
  justify-content: center;
1049
1207
  align-items: center;
@@ -1051,9 +1209,9 @@ to {
1051
1209
  height: ${e=>"portrait"===e.orientation?50:100}%;
1052
1210
  padding-right: ${e=>"portrait"===e.orientation?0:10}px;
1053
1211
  padding-bottom: ${e=>"portrait"===e.orientation?10:0}px;
1054
- `,Rl=()=>{const{dispatch:e,highlightedTile:t}=is();return(0,je.useEffect)((()=>{const r=r=>{const{peerId:n}=r.detail;t?.peerId===n&&e({type:Ja.UNSET_HIGHLIGHTED_TILE})};return Qa.addEventListener("peerClosed",r),()=>{Qa.removeEventListener("peerClosed",r)}}),[e,t]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(kl,{}),(0,a.jsx)(Cl,{}),(0,a.jsx)(El,{})]})};var Tl=e=>{const{orientation:t}=(0,je.useContext)(Ya);return(0,a.jsxs)(Pl,{orientation:t,children:["screenshare"===e.type&&(0,a.jsx)(Jc,{...e}),"youtube"===e.type&&(0,a.jsx)(pl,{...e}),"snapshot"===e.type&&(0,a.jsx)(_l,{...e})]})};const jl=yr.path`
1212
+ `,cd=()=>{const{dispatch:e,highlightedTile:t}=is();return(0,je.useEffect)((()=>{const r=r=>{const{peerId:n}=r.detail;t?.peerId===n&&e({type:Ja.UNSET_HIGHLIGHTED_TILE})};return Qa.addEventListener("peerClosed",r),()=>{Qa.removeEventListener("peerClosed",r)}}),[e,t]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(id,{}),(0,a.jsx)(od,{}),(0,a.jsx)(ad,{})]})};var ld=e=>{const{orientation:t}=(0,je.useContext)(Ya);return(0,a.jsxs)(sd,{orientation:t,children:["screenshare"===e.type&&(0,a.jsx)(zl,{...e}),"youtube"===e.type&&(0,a.jsx)($l,{...e}),"snapshot"===e.type&&(0,a.jsx)(nd,{...e})]})};const dd=yr.path`
1055
1213
  fill: ${({theme:e})=>e.primaryColor};
1056
- `,Ol=(0,a.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M7 6.333A.667.667 0 0 0 6.333 7v2.667a.667.667 0 1 0 1.334 0V7A.667.667 0 0 0 7 6.333Zm.253-2.613a.667.667 0 0 0-.506 0 .667.667 0 0 0-.22.14.767.767 0 0 0-.14.22.667.667 0 0 0 .14.727c.064.059.139.106.22.14a.667.667 0 0 0 .92-.614.7.7 0 0 0-.194-.473.667.667 0 0 0-.22-.14ZM7 .333a6.667 6.667 0 1 0 0 13.334A6.667 6.667 0 0 0 7 .333Zm0 12A5.334 5.334 0 1 1 7 1.666a5.334 5.334 0 0 1 0 10.667Z",fill:"#fff"})}),Ml=(0,a.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)(jl,{d:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z"}),(0,a.jsx)("path",{d:"M12 17a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM12 13a1 1 0 0 1-1-1V8a1 1 0 0 1 2 0v4a1 1 0 0 1-1 1Z",fill:"#fff"})]}),Ll=(0,a.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)(jl,{d:"M20.058 22H3.943a3.023 3.023 0 0 1-2.617-4.534L9.383 3.511a3.023 3.023 0 0 1 5.235 0l8.057 13.955A3.023 3.023 0 0 1 20.058 22Z"}),(0,a.jsx)("path",{d:"M12 18a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM12 14a1 1 0 0 1-1-1V9a1 1 0 0 1 2 0v4a1 1 0 0 1-1 1Z",fill:"#fff"})]}),Dl=yr.div`
1214
+ `,ud=(0,a.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M7 6.333A.667.667 0 0 0 6.333 7v2.667a.667.667 0 1 0 1.334 0V7A.667.667 0 0 0 7 6.333Zm.253-2.613a.667.667 0 0 0-.506 0 .667.667 0 0 0-.22.14.767.767 0 0 0-.14.22.667.667 0 0 0 .14.727c.064.059.139.106.22.14a.667.667 0 0 0 .92-.614.7.7 0 0 0-.194-.473.667.667 0 0 0-.22-.14ZM7 .333a6.667 6.667 0 1 0 0 13.334A6.667 6.667 0 0 0 7 .333Zm0 12A5.334 5.334 0 1 1 7 1.666a5.334 5.334 0 0 1 0 10.667Z",fill:"#fff"})}),pd=(0,a.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)(dd,{d:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z"}),(0,a.jsx)("path",{d:"M12 17a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM12 13a1 1 0 0 1-1-1V8a1 1 0 0 1 2 0v4a1 1 0 0 1-1 1Z",fill:"#fff"})]}),hd=(0,a.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)(dd,{d:"M20.058 22H3.943a3.023 3.023 0 0 1-2.617-4.534L9.383 3.511a3.023 3.023 0 0 1 5.235 0l8.057 13.955A3.023 3.023 0 0 1 20.058 22Z"}),(0,a.jsx)("path",{d:"M12 18a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM12 14a1 1 0 0 1-1-1V9a1 1 0 0 1 2 0v4a1 1 0 0 1-1 1Z",fill:"#fff"})]}),fd=yr.div`
1057
1215
  background-color: rgba(45, 45, 45, 0.75);
1058
1216
  display: flex;
1059
1217
  flex-direction: row;
@@ -1064,7 +1222,7 @@ to {
1064
1222
  border: 1px solid rgba(31, 31, 31, 0.5);
1065
1223
  box-sizing: border-box;
1066
1224
  pointer-events: auto;
1067
- `,Il=yr.button`
1225
+ `,md=yr.button`
1068
1226
  background-color: rgba(45, 45, 45, 0);
1069
1227
  color: #fff;
1070
1228
  border: none;
@@ -1075,55 +1233,17 @@ to {
1075
1233
  font-size: 12px;
1076
1234
  line-height: 14px;
1077
1235
  height: 100%;
1078
- `,Al=yr.p`
1236
+ `,gd=yr.p`
1079
1237
  color: #fff;
1080
1238
  font-size: 12px;
1081
1239
  font-weight: 400;
1082
1240
  line-height: 14px;
1083
1241
  max-width: 200px;
1084
1242
  margin: 0;
1085
- `,Nl=yr.div`
1243
+ `,vd=yr.div`
1086
1244
  display: flex;
1087
1245
  margin-right: 10px;
1088
- `;var Fl=e=>{r(v).custom((t=>(0,a.jsxs)(Dl,{children:[(0,a.jsx)(Nl,{children:Ol}),(0,a.jsx)(Al,{children:e.message}),e.buttonText&&(0,a.jsx)(Il,{onClick:()=>r(v).remove(t.id),children:e.buttonText})]})),{duration:e.duration||3e3,position:"top-center"})};var zl=()=>{const{selfPeerId:e,videosContainerRef:t,remoteTilesContainerRef:r,options:n,muted:i,profile:o,orientation:s,userInteractionTriggered:c}=(0,je.useContext)(Ya),[l,d]=(0,je.useState)({width:0,height:0}),{streams:u,highlightedTile:p,dispatch:h}=is(),[f,m]=Bs(r.current);return(0,je.useEffect)((()=>{n.GDPRDisclaimer&&Fl({message:"Para mejorar la calidad de nuestro servicio, esta llamada será grabada",buttonText:"Cerrar",duration:-1})}),[n.GDPRDisclaimer]),(0,je.useEffect)((()=>{if(r?.current){const e=1;let t=r.current.childElementCount;const n=Hc({availableWidth:f-16*(t-1),availableHeight:m-16*(t-1),numberOfTiles:t,ratio:e});d({width:n,height:n*e})}}),[r,f,m,u.length,p]),(0,je.useEffect)((()=>{c&&(n.controls?.microphone?.enabled&&Qa.enableMicrophone(),n.controls?.camera?.enabled&&!n.audioTiles&&Qa.enableVideo())}),[n.controls,n.audioTiles,c]),(0,je.useEffect)((()=>{const e=e=>{const{peerId:t,profile:r}=e.detail;h({type:Ja.ADD_STREAM,payload:{id:t,profile:r}})},t=e=>{const{peerId:t,mediaId:r,deviceType:n,paused:i}=e.detail,o="mediaStart"===e.type;"screen"!==n&&h({type:Ja.DEVICE_UPDATE,payload:{streamId:t,mediaId:r,device:n,available:o,paused:i}})},r=e=>{const{peerId:t,deviceType:r}=e.detail,n="mediaPause"===e.type;"microphone"===r&&n?h({type:Ja.MUTE,payload:{streamId:t}}):"microphone"===r&&h({type:Ja.UNMUTE,payload:{streamId:t}})},n=e=>{const{peers:t}=e.detail,r=t.map((e=>({id:e.peerId,profile:e.profile,muted:e.muted})));h({type:Ja.SET_STREAMS,payload:r})},i=e=>{const{peerId:t}=e.detail;h({type:Ja.REMOVE_STREAM,payload:{id:t}})},o=e=>{const{peerId:t,profile:r}=e.detail;h({type:Ja.SET_STREAM_PROFILE,payload:{streamId:t,profile:r}})},a=e=>{const t="peerStartSpeak"===e.type,{peerId:r}=e.detail;h({type:Ja.SET_STREAM_SPEAKING,payload:{streamId:r,isSpeaking:t}})};return Qa.addEventListener("enterRoom",n),Qa.addEventListener("newPeer",e),Qa.addEventListener("peerClosed",i),Qa.addEventListener("mediaStart",t),Qa.addEventListener("mediaStop",t),Qa.addEventListener("mediaPause",r),Qa.addEventListener("mediaResume",r),Qa.addEventListener("profileUpdate",o),Qa.addEventListener("peerStartSpeak",a),Qa.addEventListener("peerStopSpeak",a),()=>{Qa.removeEventListener("enterRoom",n),Qa.removeEventListener("newPeer",e),Qa.removeEventListener("peerClosed",i),Qa.removeEventListener("mediaStart",t),Qa.removeEventListener("mediaStop",t),Qa.removeEventListener("mediaPause",r),Qa.removeEventListener("mediaResume",r),Qa.removeEventListener("profileUpdate",o),Qa.removeEventListener("peerStartSpeak",a),Qa.removeEventListener("peerStopSpeak",a)}}),[h]),(0,a.jsxs)(Xs,{ref:t,direction:"portrait"===s?"column":"row",children:[!n.audioTiles&&(0,a.jsx)(Zc,{isSomeonePresenting:Boolean(p),width:l.width,height:l.height}),(0,a.jsx)(Rl,{}),p&&(0,a.jsx)(Tl,{...p}),(0,a.jsxs)(ec,{ref:r,orientation:s,reduced:Boolean(p),audioTiles:Boolean(n.audioTiles),children:[n.audioTiles&&(0,a.jsx)(zc,{stream:{id:String(e),muted:i,profile:o}}),u.map((e=>n.audioTiles?(0,a.jsx)(zc,{stream:e},e.id):(0,a.jsx)(Dc,{stream:e,width:l.width,height:l.height},e.id)))]})]})};je=o("85Hg2");var Bl=()=>(0,a.jsx)("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("g",{clipPath:"url(#hangup)",children:(0,a.jsx)("path",{d:"M6.942 16.21c.144-.145.34-.25.517-.36a8.735 8.735 0 0 1 1.113-.603 1.851 1.851 0 0 0 .969-2.278l-.151-.438a11.279 11.279 0 0 1 3.05-.432c1.032.003 2.058.149 3.05.432l-.091.458a1.852 1.852 0 0 0 .968 2.278 9.55 9.55 0 0 1 1.113.602c.177.111.354.235.524.366a2.777 2.777 0 0 0 3.593-.333l1.964-1.964a2.776 2.776 0 0 0-.269-4.196 17.588 17.588 0 0 0-21.586.04l-.249.248a2.777 2.777 0 0 0-.63 2.958c.14.367.358.7.637.976l1.963 1.964a2.777 2.777 0 0 0 3.515.281Zm-4.254-3.6a.926.926 0 0 1-.156-1.104.98.98 0 0 1 .26-.31 15.736 15.736 0 0 1 19.303.045 1.009 1.009 0 0 1 .373.7.925.925 0 0 1-.269.714l-1.963 1.964a.925.925 0 0 1-1.172.137 9.979 9.979 0 0 0-.628-.432c-.42-.27-.86-.508-1.316-.713l.491-1.342a.925.925 0 0 0-.55-1.191 13.412 13.412 0 0 0-9.163 0 .926.926 0 0 0-.498.497.926.926 0 0 0-.032.714l.51 1.322c-.46.217-.905.462-1.335.733-.214.135-.423.279-.629.432a.926.926 0 0 1-1.171-.138L2.688 12.61Z",fill:"#fff"})})});const Ul=()=>(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",fill:"none",children:(0,a.jsx)("path",{fill:"#fff",d:"M26.547 20.68h-6.04a1.333 1.333 0 1 0 0 2.666h3.2A10.667 10.667 0 0 1 5.334 16a1.333 1.333 0 0 0-2.667 0 13.333 13.333 0 0 0 22.507 9.64V28a1.333 1.333 0 1 0 2.666 0v-6a1.333 1.333 0 0 0-1.293-1.32ZM16 2.666A13.333 13.333 0 0 0 6.827 6.36V4A1.333 1.333 0 1 0 4.16 4v6a1.333 1.333 0 0 0 1.334 1.333h6a1.333 1.333 0 0 0 0-2.667h-3.2A10.667 10.667 0 0 1 26.667 16a1.333 1.333 0 1 0 2.667 0A13.333 13.333 0 0 0 16 2.666Z"})});var Vl=()=>(0,a.jsx)("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M20.41 15.51h-4.53a1 1 0 0 0 0 2h2.4A8 8 0 0 1 4.5 12a1 1 0 1 0-2 0 10 10 0 0 0 16.88 7.23V21a1 1 0 0 0 2 0v-4.5a1 1 0 0 0-.97-.99ZM12.5 2a10 10 0 0 0-6.88 2.77V3a1 1 0 0 0-2 0v4.5a1 1 0 0 0 1 1h4.5a1 1 0 0 0 0-2h-2.4A8 8 0 0 1 20.5 12a1 1 0 0 0 2 0 10 10 0 0 0-10-10Z",fill:"#F7F7F7"})});const Hl=vr`
1089
- 0% {
1090
- transform: rotate(0deg);
1091
- }
1092
- 100% {
1093
- transform: rotate(360deg);
1094
- }
1095
- `,ql=yr.div`
1096
- display: inline-block;
1097
- position: relative;
1098
- width: ${({size:e})=>e};
1099
- height: ${({size:e})=>e};
1100
-
1101
- div {
1102
- box-sizing: border-box;
1103
- display: block;
1104
- position: absolute;
1105
- width: ${({size:e})=>e};
1106
- height: ${({size:e})=>e};
1107
- top: 0px;
1108
- left: 0px;
1109
- border: 2px solid #fff;
1110
- border-radius: 50%;
1111
- animation: ${Hl} 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
1112
- border-color: #fff transparent transparent transparent;
1113
- }
1114
-
1115
- div:nth-child(1) {
1116
- animation-delay: -0.45s;
1117
- }
1118
-
1119
- div:nth-child(2) {
1120
- animation-delay: -0.3s;
1121
- }
1122
-
1123
- div:nth-child(3) {
1124
- animation-delay: -0.15s;
1125
- }
1126
- `;var Wl=({size:e})=>(0,a.jsxs)(ql,{size:e||"24px",children:[(0,a.jsx)("div",{}),(0,a.jsx)("div",{}),(0,a.jsx)("div",{}),(0,a.jsx)("div",{})]});je=o("85Hg2");var $l=({color:e})=>(0,a.jsx)("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M23 10.21a8.499 8.499 0 0 0-.91-4.13 2.92 2.92 0 0 0-1.72-1A78.362 78.362 0 0 0 12 4.77a78.45 78.45 0 0 0-8.34.3 2.87 2.87 0 0 0-1.46.74c-.9.83-1 2.25-1.1 3.45a48.29 48.29 0 0 0 0 6.48 9.55 9.55 0 0 0 .3 2c.12.505.365.972.71 1.36a2.86 2.86 0 0 0 1.49.78c2.156.266 4.328.376 6.5.33 3.5.05 6.57 0 10.2-.28a2.88 2.88 0 0 0 1.53-.78c.28-.28.49-.623.61-1 .358-1.097.533-2.246.52-3.4.04-.56.04-3.94.04-4.54ZM9.74 15.35V9.16l5.92 3.11c-1.66.92-3.85 1.96-5.92 3.08Z",fill:e||"#fff"})});var Kl=({color:e})=>(0,a.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1.004 1.004 0 0 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1.004 1.004 0 1 0-1.42-1.42Zm8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1.004 1.004 0 0 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.471 2.471 0 0 1 0 3.5l-3.88 3.88a1.002 1.002 0 0 0 .325 1.639.999.999 0 0 0 1.095-.219l3.88-3.89a4.49 4.49 0 0 0 0-6.33ZM8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1.004 1.004 0 0 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42Z",fill:e||"#fff"})});const Gl=yr.div`
1246
+ `;var yd=e=>{r(v).custom((t=>(0,a.jsxs)(fd,{children:[(0,a.jsx)(vd,{children:ud}),(0,a.jsx)(gd,{children:e.message}),e.buttonText&&(0,a.jsx)(md,{onClick:()=>r(v).remove(t.id),children:e.buttonText})]})),{duration:e.duration||3e3,position:"top-center"})};var bd=()=>{const{headless:e,selfPeerId:t,videosContainerRef:r,remoteTilesContainerRef:n,options:i,muted:o,profile:s,orientation:c,userInteractionTriggered:l}=(0,je.useContext)(Ya),[d,u]=(0,je.useState)({width:0,height:0}),{streams:p,highlightedTile:h,dispatch:f}=is(),[m,g]=Tc(n.current);return(0,je.useEffect)((()=>{i.GDPRDisclaimer&&yd({message:"Para mejorar la calidad de nuestro servicio, esta llamada será grabada",buttonText:"Cerrar",duration:-1})}),[i.GDPRDisclaimer]),(0,je.useEffect)((()=>{if(n?.current){const e=1;let t=n.current.childElementCount;const r=jl({availableWidth:m-16*(t-1),availableHeight:g-16*(t-1),numberOfTiles:t,ratio:e});u({width:r,height:r*e})}}),[n,m,g,p.length,h]),(0,je.useEffect)((()=>{l&&!e&&(i.controls?.microphone?.enabled&&Qa.enableMicrophone(),i.controls?.camera?.enabled&&!i.audioTiles&&Qa.enableVideo())}),[i.controls,i.audioTiles,l,e]),(0,je.useEffect)((()=>{const e=e=>{const{peerId:t,profile:r}=e.detail;f({type:Ja.ADD_STREAM,payload:{id:t,profile:r}})},t=e=>{const{peerId:t,mediaId:r,deviceType:n,paused:i}=e.detail,o="mediaStart"===e.type;"screen"!==n&&f({type:Ja.DEVICE_UPDATE,payload:{streamId:t,mediaId:r,device:n,available:o,paused:i}})},r=e=>{const{peerId:t,deviceType:r}=e.detail,n="mediaPause"===e.type;"microphone"===r&&n?f({type:Ja.MUTE,payload:{streamId:t}}):"microphone"===r&&f({type:Ja.UNMUTE,payload:{streamId:t}})},n=e=>{const{peers:t}=e.detail,r=t.map((e=>({id:e.peerId,profile:e.profile,muted:e.muted})));f({type:Ja.SET_STREAMS,payload:r})},i=e=>{const{peerId:t}=e.detail;f({type:Ja.REMOVE_STREAM,payload:{id:t}})},o=e=>{const{peerId:t,profile:r}=e.detail;f({type:Ja.SET_STREAM_PROFILE,payload:{streamId:t,profile:r}})},a=e=>{const t="peerStartSpeak"===e.type,{peerId:r}=e.detail;f({type:Ja.SET_STREAM_SPEAKING,payload:{streamId:r,isSpeaking:t}})};return Qa.addEventListener("enterRoom",n),Qa.addEventListener("newPeer",e),Qa.addEventListener("peerClosed",i),Qa.addEventListener("mediaStart",t),Qa.addEventListener("mediaStop",t),Qa.addEventListener("mediaPause",r),Qa.addEventListener("mediaResume",r),Qa.addEventListener("profileUpdate",o),Qa.addEventListener("peerStartSpeak",a),Qa.addEventListener("peerStopSpeak",a),()=>{Qa.removeEventListener("enterRoom",n),Qa.removeEventListener("newPeer",e),Qa.removeEventListener("peerClosed",i),Qa.removeEventListener("mediaStart",t),Qa.removeEventListener("mediaStop",t),Qa.removeEventListener("mediaPause",r),Qa.removeEventListener("mediaResume",r),Qa.removeEventListener("profileUpdate",o),Qa.removeEventListener("peerStartSpeak",a),Qa.removeEventListener("peerStopSpeak",a)}}),[f]),(0,a.jsxs)(Uc,{ref:r,direction:"portrait"===c?"column":"row",children:[!i.audioTiles&&!1===e&&(0,a.jsx)(Al,{isSomeonePresenting:Boolean(h),width:d.width,height:d.height}),(0,a.jsx)(cd,{}),h&&(0,a.jsx)(ld,{...h}),(0,a.jsxs)(Vc,{ref:n,orientation:c,reduced:Boolean(h),audioTiles:Boolean(i.audioTiles),children:[i.audioTiles&&(0,a.jsx)(Pl,{stream:{id:String(t),muted:o,profile:s}}),p.map((e=>i.audioTiles?(0,a.jsx)(Pl,{stream:e},e.id):(0,a.jsx)(Sl,{stream:e,width:d.width,height:d.height},e.id)))]})]})};je=o("85Hg2");var wd=()=>(0,a.jsx)("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("g",{clipPath:"url(#hangup)",children:(0,a.jsx)("path",{d:"M6.942 16.21c.144-.145.34-.25.517-.36a8.735 8.735 0 0 1 1.113-.603 1.851 1.851 0 0 0 .969-2.278l-.151-.438a11.279 11.279 0 0 1 3.05-.432c1.032.003 2.058.149 3.05.432l-.091.458a1.852 1.852 0 0 0 .968 2.278 9.55 9.55 0 0 1 1.113.602c.177.111.354.235.524.366a2.777 2.777 0 0 0 3.593-.333l1.964-1.964a2.776 2.776 0 0 0-.269-4.196 17.588 17.588 0 0 0-21.586.04l-.249.248a2.777 2.777 0 0 0-.63 2.958c.14.367.358.7.637.976l1.963 1.964a2.777 2.777 0 0 0 3.515.281Zm-4.254-3.6a.926.926 0 0 1-.156-1.104.98.98 0 0 1 .26-.31 15.736 15.736 0 0 1 19.303.045 1.009 1.009 0 0 1 .373.7.925.925 0 0 1-.269.714l-1.963 1.964a.925.925 0 0 1-1.172.137 9.979 9.979 0 0 0-.628-.432c-.42-.27-.86-.508-1.316-.713l.491-1.342a.925.925 0 0 0-.55-1.191 13.412 13.412 0 0 0-9.163 0 .926.926 0 0 0-.498.497.926.926 0 0 0-.032.714l.51 1.322c-.46.217-.905.462-1.335.733-.214.135-.423.279-.629.432a.926.926 0 0 1-1.171-.138L2.688 12.61Z",fill:"#fff"})})});const xd=()=>(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",fill:"none",children:(0,a.jsx)("path",{fill:"#fff",d:"M26.547 20.68h-6.04a1.333 1.333 0 1 0 0 2.666h3.2A10.667 10.667 0 0 1 5.334 16a1.333 1.333 0 0 0-2.667 0 13.333 13.333 0 0 0 22.507 9.64V28a1.333 1.333 0 1 0 2.666 0v-6a1.333 1.333 0 0 0-1.293-1.32ZM16 2.666A13.333 13.333 0 0 0 6.827 6.36V4A1.333 1.333 0 1 0 4.16 4v6a1.333 1.333 0 0 0 1.334 1.333h6a1.333 1.333 0 0 0 0-2.667h-3.2A10.667 10.667 0 0 1 26.667 16a1.333 1.333 0 1 0 2.667 0A13.333 13.333 0 0 0 16 2.666Z"})});var Sd=()=>(0,a.jsx)("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M20.41 15.51h-4.53a1 1 0 0 0 0 2h2.4A8 8 0 0 1 4.5 12a1 1 0 1 0-2 0 10 10 0 0 0 16.88 7.23V21a1 1 0 0 0 2 0v-4.5a1 1 0 0 0-.97-.99ZM12.5 2a10 10 0 0 0-6.88 2.77V3a1 1 0 0 0-2 0v4.5a1 1 0 0 0 1 1h4.5a1 1 0 0 0 0-2h-2.4A8 8 0 0 1 20.5 12a1 1 0 0 0 2 0 10 10 0 0 0-10-10Z",fill:"#F7F7F7"})});je=o("85Hg2");var _d=({color:e})=>(0,a.jsx)("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M23 10.21a8.499 8.499 0 0 0-.91-4.13 2.92 2.92 0 0 0-1.72-1A78.362 78.362 0 0 0 12 4.77a78.45 78.45 0 0 0-8.34.3 2.87 2.87 0 0 0-1.46.74c-.9.83-1 2.25-1.1 3.45a48.29 48.29 0 0 0 0 6.48 9.55 9.55 0 0 0 .3 2c.12.505.365.972.71 1.36a2.86 2.86 0 0 0 1.49.78c2.156.266 4.328.376 6.5.33 3.5.05 6.57 0 10.2-.28a2.88 2.88 0 0 0 1.53-.78c.28-.28.49-.623.61-1 .358-1.097.533-2.246.52-3.4.04-.56.04-3.94.04-4.54ZM9.74 15.35V9.16l5.92 3.11c-1.66.92-3.85 1.96-5.92 3.08Z",fill:e||"#fff"})});const kd=yr.div`
1127
1247
  display: flex;
1128
1248
  justify-content: center;
1129
1249
  align-items: center;
@@ -1138,7 +1258,7 @@ to {
1138
1258
  @media (max-height: 500px) {
1139
1259
  height: 60px;
1140
1260
  }
1141
- `,Zl=yr.button`
1261
+ `,Cd=yr.button`
1142
1262
  display: flex;
1143
1263
  align-items: center;
1144
1264
  justify-content: center;
@@ -1161,9 +1281,9 @@ to {
1161
1281
  border: 2px solid
1162
1282
  ${e=>e.danger?"#fc7d7d":e.primary?"#a3ceff":e.theme.controlsHoverBorderColor};
1163
1283
  }
1164
- `,Ql=yr.div`
1284
+ `,Ed=yr.div`
1165
1285
  position: relative;
1166
- `,Yl=yr(Zl)`
1286
+ `,Pd=yr(Cd)`
1167
1287
  padding: 0 14px;
1168
1288
 
1169
1289
  @media (max-width: 345px) {
@@ -1171,18 +1291,18 @@ to {
1171
1291
  display: none;
1172
1292
  }
1173
1293
  }
1174
- `,Jl=yr.div`
1294
+ `,Rd=yr.div`
1175
1295
  position: absolute;
1176
1296
  bottom: 58px;
1177
1297
  left: 50%;
1178
1298
  transform: translate(-50%, 0);
1179
1299
  z-index: 30;
1180
- `,Xl=yr.div`
1300
+ `,Td=yr.div`
1181
1301
  position: absolute;
1182
1302
  right: 0;
1183
1303
  bottom: 58px;
1184
1304
  z-index: 30;
1185
- `,ed=Boolean(navigator.mediaDevices.getDisplayMedia);var td=()=>{const{t:e}=Fi(),t=(0,je.useRef)(null),[n,i]=(0,je.useState)(!1),{setIsYoutubePopupVisible:o,setIsLinksharePopupVisible:s,selfPeerId:c,permissions:l,setBlockedFeaturePopupOpen:d}=(0,je.useContext)(Ya),{highlightedTile:u,dispatch:p}=is(),f=Boolean(u?.isGlobal&&u?.peerId===c);bs(t,(()=>i(!1)));const m=[{id:"1",items:[{id:"linksharing",title:e("shareLink.title"),jsxIcon:(0,a.jsx)(Kl,{}),action:()=>{l.find((e=>"share_link"===e))?(i(!1),s(!0),h.event("linkshareClick")):d(!0)}},{id:"youtube",title:e("youtube.title"),jsxIcon:(0,a.jsx)($l,{}),action:()=>{i(!1),o(!0),h.event("youtubeClick")}}]}];return ed&&m.push({id:"2",items:[{id:"screensharing",title:e("menu.screenSharing"),jsxIcon:(0,a.jsx)(Ks,{}),action:async()=>{if(l.find((e=>"screen_sharing"===e))){i(!1);try{h.event("screenshareClick"),await Qa.enableScreenshare(),h.event("enableScreenshare")}catch(t){console.warn(t),h.event("screenshareCancel"),r(v)(e("notifications.screensharingError"),{className:"error"})}}else d(!0)}}]}),(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)(Ql,{children:[n&&(0,a.jsx)(Jl,{ref:t,children:(0,a.jsx)(Es,{categories:m})}),(0,a.jsx)(Zl,{primary:f,onClick:async()=>{f?p({type:Ja.UNSET_HIGHLIGHTED_TILE}):i((e=>!e))},children:(0,a.jsx)(Ks,{white:f,arrow:!0})})]})})};var rd,nd,id,od,ad,sd,cd,ld,dd,ud=()=>{const{t:e}=Fi(),t=(0,je.useRef)(null),[n,i]=(0,je.useState)(0),[o,s]=(0,je.useState)(!1),[c,l]=(0,je.useState)(!1),{muted:d,streaming:u,options:p,isAgent:f}=(0,je.useContext)(Ya);bs(t,(()=>s(!1)));const m=()=>{Qa.endCall()},g=e=>{const{numberOfAvailableWebcams:t}=e.detail;i(t)};return(0,je.useEffect)((()=>(Qa.addEventListener("webcamsUpdate",g),()=>{Qa.removeEventListener("webcamsUpdate",g)})),[]),(0,a.jsxs)(Gl,{children:[p.controls?.microphone?.available&&(0,a.jsx)(Zl,{danger:d,onClick:async()=>{try{Qa.getDevicesState().microphone.enabled?(h.event("toggleMicrophone"),await Qa.toggleMute()):(h.event("enableMicrophone"),await Qa.enableMicrophone())}catch(t){console.warn(t),r(v)(e("notifications.microphoneError"),{className:"error"})}},children:(0,a.jsx)(Hs,{slash:d})}),p.controls?.camera?.available&&(0,a.jsx)(Zl,{danger:!u,onClick:async()=>{try{u?(h.event("disableCamera"),await Qa.disableVideo()):(l(!0),h.event("enableCamera"),await Qa.enableVideo())}catch(t){console.warn(t),r(v)(e("notifications.cameraError"),{className:"error"})}finally{l(!1)}},children:c?(0,a.jsx)(Wl,{}):(0,a.jsx)(qs,{slash:!u})}),p.controls?.screenshare?.available&&(0,a.jsx)(td,{}),u&&n>1&&(0,a.jsx)(Zl,{onClick:async()=>{try{h.event("rotateCamera"),await Qa.rotateVideo()}catch(t){console.warn(t),r(v)(e("notifications.cameraRotateError"),{className:"error"})}},children:(0,a.jsx)(Vl,{})}),(0,a.jsxs)(Ql,{children:[o&&(0,a.jsx)(Xl,{ref:t,children:(0,a.jsx)(Es,{categories:[{id:"1",items:[{id:"leaveCall",title:e("leave.leaveCall"),jsxIcon:(0,a.jsx)(ms,{}),action:m},{id:"terminateCall",title:e("leave.endCall"),jsxIcon:(0,a.jsx)(gs,{}),action:()=>{Qa.terminateRoom()},danger:!0}]}]})}),(0,a.jsxs)(Yl,{onClick:()=>{f?s((e=>!e)):m()},danger:!0,children:[(0,a.jsx)(Bl,{}),(0,a.jsx)("p",{children:e("leave.title")})]})]})]})};je=o("85Hg2"),je=o("85Hg2");let pd;nd=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then};const hd=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];var fd,md,gd,vd,yd,bd;od=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return 4*e+17},ad=function(e){return hd[e]},sd=function(e){let t=0;for(;0!==e;)t++,e>>>=1;return t},cd=function(e){if("function"!=typeof e)throw new Error('"toSJISFunc" is not a valid function.');pd=e},ld=function(){return void 0!==pd},dd=function(e){return pd(e)},fd={bit:1},md={bit:0},gd={bit:3},vd={bit:2},yd=function(e){return e&&void 0!==e.bit&&e.bit>=0&&e.bit<4},bd=function(e,t){if(yd(e))return e;try{return function(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return fd;case"m":case"medium":return md;case"q":case"quartile":return gd;case"h":case"high":return vd;default:throw new Error("Unknown EC Level: "+e)}}(e)}catch(e){return t}};var wd={};function xd(){this.buffer=[],this.length=0}xd.prototype={get:function(e){const t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(let r=0;r<t;r++)this.putBit(1==(e>>>t-r-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},wd=xd;var Sd,_d,kd={};function Cd(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}Cd.prototype.set=function(e,t,r,n){const i=e*this.size+t;this.data[i]=r,n&&(this.reservedBit[i]=!0)},Cd.prototype.get=function(e,t){return this.data[e*this.size+t]},Cd.prototype.xor=function(e,t,r){this.data[e*this.size+t]^=r},Cd.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},kd=Cd;var Ed,Pd=od;Sd=function(e){if(1===e)return[];const t=Math.floor(e/7)+2,r=Pd(e),n=145===r?26:2*Math.ceil((r-13)/(2*t-2)),i=[r-7];for(let e=1;e<t-1;e++)i[e]=i[e-1]-n;return i.push(6),i.reverse()},_d=function(e){const t=[],r=Sd(e),n=r.length;for(let e=0;e<n;e++)for(let i=0;i<n;i++)0===e&&0===i||0===e&&i===n-1||e===n-1&&0===i||t.push([r[e],r[i]]);return t};var Rd=od;var Td,jd,Od,Md,Ld,Dd,Id,Ad,Nd;Ed=function(e){const t=Rd(e);return[[0,0],[t-7,0],[0,t-7]]},Td={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const Fd=3,zd=3,Bd=40,Ud=10;function Vd(e,t,r){switch(e){case Td.PATTERN000:return(t+r)%2==0;case Td.PATTERN001:return t%2==0;case Td.PATTERN010:return r%3==0;case Td.PATTERN011:return(t+r)%3==0;case Td.PATTERN100:return(Math.floor(t/2)+Math.floor(r/3))%2==0;case Td.PATTERN101:return t*r%2+t*r%3==0;case Td.PATTERN110:return(t*r%2+t*r%3)%2==0;case Td.PATTERN111:return(t*r%3+(t+r)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}}var Hd,qd;jd=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},Od=function(e){return jd(e)?parseInt(e,10):void 0},Md=function(e){const t=e.size;let r=0,n=0,i=0,o=null,a=null;for(let s=0;s<t;s++){n=i=0,o=a=null;for(let c=0;c<t;c++){let t=e.get(s,c);t===o?n++:(n>=5&&(r+=Fd+(n-5)),o=t,n=1),t=e.get(c,s),t===a?i++:(i>=5&&(r+=Fd+(i-5)),a=t,i=1)}n>=5&&(r+=Fd+(n-5)),i>=5&&(r+=Fd+(i-5))}return r},Ld=function(e){const t=e.size;let r=0;for(let n=0;n<t-1;n++)for(let i=0;i<t-1;i++){const t=e.get(n,i)+e.get(n,i+1)+e.get(n+1,i)+e.get(n+1,i+1);4!==t&&0!==t||r++}return r*zd},Dd=function(e){const t=e.size;let r=0,n=0,i=0;for(let o=0;o<t;o++){n=i=0;for(let a=0;a<t;a++)n=n<<1&2047|e.get(o,a),a>=10&&(1488===n||93===n)&&r++,i=i<<1&2047|e.get(a,o),a>=10&&(1488===i||93===i)&&r++}return r*Bd},Id=function(e){let t=0;const r=e.data.length;for(let n=0;n<r;n++)t+=e.data[n];return Math.abs(Math.ceil(100*t/r/5)-10)*Ud},Ad=function(e,t){const r=t.size;for(let n=0;n<r;n++)for(let i=0;i<r;i++)t.isReserved(i,n)||t.xor(i,n,Vd(e,i,n))},Nd=function(e,t){const r=Object.keys(Td).length;let n=0,i=1/0;for(let o=0;o<r;o++){t(o),Ad(o,e);const r=Md(e)+Ld(e)+Dd(e)+Id(e);Ad(o,e),r<i&&(i=r,n=o)}return n};const Wd=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],$d=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];Hd=function(e,t){switch(t){case fd:return Wd[4*(e-1)+0];case md:return Wd[4*(e-1)+1];case gd:return Wd[4*(e-1)+2];case vd:return Wd[4*(e-1)+3];default:return}},qd=function(e,t){switch(t){case fd:return $d[4*(e-1)+0];case md:return $d[4*(e-1)+1];case gd:return $d[4*(e-1)+2];case vd:return $d[4*(e-1)+3];default:return}};var Kd,Gd,Zd,Qd,Yd,Jd={};const Xd=new Uint8Array(512),eu=new Uint8Array(256);function tu(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}var ru,nu,iu,ou,au,su,cu,lu,du,uu,pu,hu,fu,mu,gu,vu,yu,bu,wu,xu,Su,_u,ku;!function(){let e=1;for(let t=0;t<255;t++)Xd[t]=e,eu[e]=t,e<<=1,256&e&&(e^=285);for(let e=255;e<512;e++)Xd[e]=Xd[e-255]}(),Qd=function(e){return Xd[e]},Yd=function(e,t){return 0===e||0===t?0:Xd[eu[e]+eu[t]]},Kd=function(e,t){const r=new Uint8Array(e.length+t.length-1);for(let n=0;n<e.length;n++)for(let i=0;i<t.length;i++)r[n+i]^=Yd(e[n],t[i]);return r},Gd=function(e,t){let r=new Uint8Array(e);for(;r.length-t.length>=0;){const e=r[0];for(let n=0;n<t.length;n++)r[n]^=Yd(t[n],e);let n=0;for(;n<r.length&&0===r[n];)n++;r=r.slice(n)}return r},Zd=function(e){let t=new Uint8Array([1]);for(let r=0;r<e;r++)t=Kd(t,new Uint8Array([1,Qd(r)]));return t},tu.prototype.initialize=function(e){this.degree=e,this.genPoly=Zd(this.degree)},tu.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");const t=new Uint8Array(e.length+this.degree);t.set(e);const r=Gd(t,this.genPoly),n=this.degree-r.length;if(n>0){const e=new Uint8Array(this.degree);return e.set(r,n),e}return r},Jd=tu,gu=function(e){return!isNaN(e)&&e>=1&&e<=40};const Cu="[0-9]+";let Eu="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";Eu=Eu.replace(/u/g,"\\u");const Pu="(?:(?![A-Z0-9 $%*+\\-./:]|"+Eu+")(?:.|[\r\n]))+";vu=new RegExp(Eu,"g"),yu=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),bu=new RegExp(Pu,"g"),wu=new RegExp(Cu,"g"),xu=new RegExp("[A-Z $%*+\\-./:]+","g");const Ru=new RegExp("^"+Eu+"$"),Tu=new RegExp("^"+Cu+"$"),ju=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");Su=function(e){return Ru.test(e)},_u=function(e){return Tu.test(e)},ku=function(e){return ju.test(e)},au={id:"Numeric",bit:1,ccBits:[10,12,14]},su={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},cu={id:"Byte",bit:4,ccBits:[8,16,16]},lu={id:"Kanji",bit:8,ccBits:[8,10,12]},du={bit:-1},uu=function(e,t){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!gu(t))throw new Error("Invalid version: "+t);return t>=1&&t<10?e.ccBits[0]:t<27?e.ccBits[1]:e.ccBits[2]},pu=function(e){return _u(e)?au:ku(e)?su:Su(e)?lu:cu},hu=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},fu=function(e){return e&&e.bit&&e.ccBits},mu=function(e,t){if(fu(e))return e;try{return function(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return au;case"alphanumeric":return su;case"kanji":return lu;case"byte":return cu;default:throw new Error("Unknown mode: "+e)}}(e)}catch(e){return t}};const Ou=sd(7973);function Mu(e,t){return uu(e,t)+4}function Lu(e,t){let r=0;return e.forEach((function(e){const n=Mu(e.mode,t);r+=n+e.getBitsLength()})),r}var Du;ru=function(e,t){return gu(e)?parseInt(e,10):t},nu=function(e,t,r){if(!gu(e))throw new Error("Invalid QR Code version");void 0===r&&(r=cu);const n=8*(ad(e)-qd(e,t));if(r===du)return n;const i=n-Mu(r,e);switch(r){case au:return Math.floor(i/10*3);case su:return Math.floor(i/11*2);case lu:return Math.floor(i/13);default:return Math.floor(i/8)}},iu=function(e,t){let r;const n=bd(t,md);if(Array.isArray(e)){if(e.length>1)return function(e,t){for(let r=1;r<=40;r++)if(Lu(e,r)<=nu(r,t,du))return r}(e,n);if(0===e.length)return 1;r=e[0]}else r=e;return function(e,t,r){for(let n=1;n<=40;n++)if(t<=nu(n,r,e))return n}(r.mode,r.getLength(),n)},ou=function(e){if(!gu(e)||e<7)throw new Error("Invalid QR Code version");let t=e<<12;for(;sd(t)-Ou>=0;)t^=7973<<sd(t)-Ou;return e<<12|t};const Iu=sd(1335);var Au,Nu,Fu;Du=function(e,t){const r=e.bit<<3|t;let n=r<<10;for(;sd(n)-Iu>=0;)n^=1335<<sd(n)-Iu;return 21522^(r<<10|n)};var zu={};function Bu(e){this.mode=au,this.data=e.toString()}Bu.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},Bu.prototype.getLength=function(){return this.data.length},Bu.prototype.getBitsLength=function(){return Bu.getBitsLength(this.data.length)},Bu.prototype.write=function(e){let t,r,n;for(t=0;t+3<=this.data.length;t+=3)r=this.data.substr(t,3),n=parseInt(r,10),e.put(n,10);const i=this.data.length-t;i>0&&(r=this.data.substr(t),n=parseInt(r,10),e.put(n,3*i+1))},zu=Bu;var Uu={};const Vu=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function Hu(e){this.mode=su,this.data=e}Hu.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},Hu.prototype.getLength=function(){return this.data.length},Hu.prototype.getBitsLength=function(){return Hu.getBitsLength(this.data.length)},Hu.prototype.write=function(e){let t;for(t=0;t+2<=this.data.length;t+=2){let r=45*Vu.indexOf(this.data[t]);r+=Vu.indexOf(this.data[t+1]),e.put(r,11)}this.data.length%2&&e.put(Vu.indexOf(this.data[t]),6)},Uu=Hu;var qu,Wu={};function $u(e){this.mode=cu,"string"==typeof e&&(e=qu(e)),this.data=new Uint8Array(e)}qu=function(e){for(var t=[],r=e.length,n=0;n<r;n++){var i=e.charCodeAt(n);if(i>=55296&&i<=56319&&r>n+1){var o=e.charCodeAt(n+1);o>=56320&&o<=57343&&(i=1024*(i-55296)+o-56320+65536,n+=1)}i<128?t.push(i):i<2048?(t.push(i>>6|192),t.push(63&i|128)):i<55296||i>=57344&&i<65536?(t.push(i>>12|224),t.push(i>>6&63|128),t.push(63&i|128)):i>=65536&&i<=1114111?(t.push(i>>18|240),t.push(i>>12&63|128),t.push(i>>6&63|128),t.push(63&i|128)):t.push(239,191,189)}return new Uint8Array(t).buffer},$u.getBitsLength=function(e){return 8*e},$u.prototype.getLength=function(){return this.data.length},$u.prototype.getBitsLength=function(){return $u.getBitsLength(this.data.length)},$u.prototype.write=function(e){for(let t=0,r=this.data.length;t<r;t++)e.put(this.data[t],8)},Wu=$u;var Ku={};function Gu(e){this.mode=lu,this.data=e}Gu.getBitsLength=function(e){return 13*e},Gu.prototype.getLength=function(){return this.data.length},Gu.prototype.getBitsLength=function(){return Gu.getBitsLength(this.data.length)},Gu.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let r=dd(this.data[t]);if(r>=33088&&r<=40956)r-=33088;else{if(!(r>=57408&&r<=60351))throw new Error("Invalid SJIS character: "+this.data[t]+"\nMake sure your charset is UTF-8");r-=49472}r=192*(r>>>8&255)+(255&r),e.put(r,13)}},Ku=Gu;var Zu,Qu,Yu,Ju,Xu,ep,tp,rp={},np={single_source_shortest_paths:function(e,t,r){var n={},i={};i[t]=0;var o,a,s,c,l,d,u,p=np.PriorityQueue.make();for(p.push(t,0);!p.empty();)for(s in a=(o=p.pop()).value,c=o.cost,l=e[a]||{})l.hasOwnProperty(s)&&(d=c+l[s],u=i[s],(void 0===i[s]||u>d)&&(i[s]=d,p.push(s,d),n[s]=a));if(void 0!==r&&void 0===i[r]){var h=["Could not find a path from ",t," to ",r,"."].join("");throw new Error(h)}return n},extract_shortest_path_from_predecessor_list:function(e,t){for(var r=[],n=t;n;)r.push(n),e[n],n=e[n];return r.reverse(),r},find_path:function(e,t,r){var n=np.single_source_shortest_paths(e,t,r);return np.extract_shortest_path_from_predecessor_list(n,r)},PriorityQueue:{make:function(e){var t,r=np.PriorityQueue,n={};for(t in e=e||{},r)r.hasOwnProperty(t)&&(n[t]=r[t]);return n.queue=[],n.sorter=e.sorter||r.default_sorter,n},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var r={value:e,cost:t};this.queue.push(r),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};function ip(e){return unescape(encodeURIComponent(e)).length}function op(e,t,r){const n=[];let i;for(;null!==(i=e.exec(r));)n.push({data:i[0],index:i.index,mode:t,length:i[0].length});return n}function ap(e){const t=op(wu,au,e),r=op(xu,su,e);let n,i;ld()?(n=op(bu,cu,e),i=op(vu,lu,e)):(n=op(yu,cu,e),i=[]);return t.concat(r,n,i).sort((function(e,t){return e.index-t.index})).map((function(e){return{data:e.data,mode:e.mode,length:e.length}}))}function sp(e,t){switch(t){case au:return zu.getBitsLength(e);case su:return Uu.getBitsLength(e);case lu:return Ku.getBitsLength(e);case cu:return Wu.getBitsLength(e)}}function cp(e,t){let r;const n=pu(e);if(r=mu(t,n),r!==cu&&r.bit<n.bit)throw new Error('"'+e+'" cannot be encoded with mode '+hu(r)+".\n Suggested mode is: "+hu(n));switch(r!==lu||ld()||(r=cu),r){case au:return new zu(e);case su:return new Uu(e);case lu:return new Ku(e);case cu:return new Wu(e)}}function lp(e,t,r){const n=e.size,i=Du(t,r);let o,a;for(o=0;o<15;o++)a=1==(i>>o&1),o<6?e.set(o,8,a,!0):o<8?e.set(o+1,8,a,!0):e.set(n-15+o,8,a,!0),o<8?e.set(8,n-o-1,a,!0):o<9?e.set(8,15-o-1+1,a,!0):e.set(8,15-o-1,a,!0);e.set(n-8,8,1,!0)}function dp(e,t,r){const n=new wd;r.forEach((function(t){n.put(t.mode.bit,4),n.put(t.getLength(),uu(t.mode,e)),t.write(n)}));const i=8*(ad(e)-qd(e,t));for(n.getLengthInBits()+4<=i&&n.put(0,4);n.getLengthInBits()%8!=0;)n.putBit(0);const o=(i-n.getLengthInBits())/8;for(let e=0;e<o;e++)n.put(e%2?17:236,8);return function(e,t,r){const n=ad(t),i=qd(t,r),o=n-i,a=Hd(t,r),s=n%a,c=a-s,l=Math.floor(n/a),d=Math.floor(o/a),u=d+1,p=l-d,h=new Jd(p);let f=0;const m=new Array(a),g=new Array(a);let v=0;const y=new Uint8Array(e.buffer);for(let e=0;e<a;e++){const t=e<c?d:u;m[e]=y.slice(f,f+t),g[e]=h.encode(m[e]),f+=t,v=Math.max(v,t)}const b=new Uint8Array(n);let w,x,S=0;for(w=0;w<v;w++)for(x=0;x<a;x++)w<m[x].length&&(b[S++]=m[x][w]);for(w=0;w<p;w++)for(x=0;x<a;x++)b[S++]=g[x][w];return b}(n,e,t)}function up(e,t,r,n){let i;if(Array.isArray(e))i=Au(e);else{if("string"!=typeof e)throw new Error("Invalid data");{let n=t;if(!n){const t=Fu(e);n=iu(t,r)}i=Nu(e,n||40)}}const o=iu(i,r);if(!o)throw new Error("The amount of data is too big to be stored in a QR Code");if(t){if(t<o)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+o+".\n")}else t=o;const a=dp(t,r,i),s=od(t),c=new kd(s);return function(e,t){const r=e.size,n=Ed(t);for(let t=0;t<n.length;t++){const i=n[t][0],o=n[t][1];for(let t=-1;t<=7;t++)if(!(i+t<=-1||r<=i+t))for(let n=-1;n<=7;n++)o+n<=-1||r<=o+n||(t>=0&&t<=6&&(0===n||6===n)||n>=0&&n<=6&&(0===t||6===t)||t>=2&&t<=4&&n>=2&&n<=4?e.set(i+t,o+n,!0,!0):e.set(i+t,o+n,!1,!0))}}(c,t),function(e){const t=e.size;for(let r=8;r<t-8;r++){const t=r%2==0;e.set(r,6,t,!0),e.set(6,r,t,!0)}}(c),function(e,t){const r=_d(t);for(let t=0;t<r.length;t++){const n=r[t][0],i=r[t][1];for(let t=-2;t<=2;t++)for(let r=-2;r<=2;r++)-2===t||2===t||-2===r||2===r||0===t&&0===r?e.set(n+t,i+r,!0,!0):e.set(n+t,i+r,!1,!0)}}(c,t),lp(c,r,0),t>=7&&function(e,t){const r=e.size,n=ou(t);let i,o,a;for(let t=0;t<18;t++)i=Math.floor(t/3),o=t%3+r-8-3,a=1==(n>>t&1),e.set(i,o,a,!0),e.set(o,i,a,!0)}(c,t),function(e,t){const r=e.size;let n=-1,i=r-1,o=7,a=0;for(let s=r-1;s>0;s-=2)for(6===s&&s--;;){for(let r=0;r<2;r++)if(!e.isReserved(i,s-r)){let n=!1;a<t.length&&(n=1==(t[a]>>>o&1)),e.set(i,s-r,n),o--,-1===o&&(a++,o=7)}if(i+=n,i<0||r<=i){i-=n,n=-n;break}}}(c,a),isNaN(n)&&(n=Nd(c,lp.bind(null,c,r))),Ad(n,c),lp(c,r,n),{modules:c,version:t,errorCorrectionLevel:r,maskPattern:n,segments:i}}function pp(e){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)throw new Error("Color should be defined as hex string");let t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw new Error("Invalid hex color: "+e);3!==t.length&&4!==t.length||(t=Array.prototype.concat.apply([],t.map((function(e){return[e,e]})))),6===t.length&&t.push("F","F");const r=parseInt(t.join(""),16);return{r:r>>24&255,g:r>>16&255,b:r>>8&255,a:255&r,hex:"#"+t.slice(0,6).join("")}}function hp(e,t){const r=e.a/255,n=t+'="'+e.hex+'"';return r<1?n+" "+t+'-opacity="'+r.toFixed(2).slice(1)+'"':n}function fp(e,t,r){let n=e+t;return void 0!==r&&(n+=" "+r),n}function mp(e,t,r,n,i){const o=[].slice.call(arguments,1),a=o.length,s="function"==typeof o[a-1];if(!s&&!nd())throw new Error("Callback required as last argument");if(!s){if(a<1)throw new Error("Too few arguments provided");return 1===a?(r=t,t=n=void 0):2!==a||t.getContext||(n=r,r=t,t=void 0),new Promise((function(i,o){try{const o=id(r,n);i(e(o,t,n))}catch(e){o(e)}}))}if(a<2)throw new Error("Too few arguments provided");2===a?(i=r,r=t,t=n=void 0):3===a&&(t.getContext&&void 0===i?(i=n,n=void 0):(i=n,n=r,r=t,t=void 0));try{const o=id(r,n);i(null,e(o,t,n))}catch(e){i(e)}}rp=np,Au=function(e){return e.reduce((function(e,t){return"string"==typeof t?e.push(cp(t,null)):t.data&&e.push(cp(t.data,t.mode)),e}),[])},Nu=function(e,t){const r=function(e){const t=[];for(let r=0;r<e.length;r++){const n=e[r];switch(n.mode){case au:t.push([n,{data:n.data,mode:su,length:n.length},{data:n.data,mode:cu,length:n.length}]);break;case su:t.push([n,{data:n.data,mode:cu,length:n.length}]);break;case lu:t.push([n,{data:n.data,mode:cu,length:ip(n.data)}]);break;case cu:t.push([{data:n.data,mode:cu,length:ip(n.data)}])}}return t}(ap(e,ld())),n=function(e,t){const r={},n={start:{}};let i=["start"];for(let o=0;o<e.length;o++){const a=e[o],s=[];for(let e=0;e<a.length;e++){const c=a[e],l=""+o+e;s.push(l),r[l]={node:c,lastCount:0},n[l]={};for(let e=0;e<i.length;e++){const o=i[e];r[o]&&r[o].node.mode===c.mode?(n[o][l]=sp(r[o].lastCount+c.length,c.mode)-sp(r[o].lastCount,c.mode),r[o].lastCount+=c.length):(r[o]&&(r[o].lastCount=c.length),n[o][l]=sp(c.length,c.mode)+4+uu(c.mode,t))}}i=s}for(let e=0;e<i.length;e++)n[i[e]].end=0;return{map:n,table:r}}(r,t),i=rp.find_path(n.map,"start","end"),o=[];for(let e=1;e<i.length-1;e++)o.push(n.table[i[e]].node);return Au(function(e){return e.reduce((function(e,t){const r=e.length-1>=0?e[e.length-1]:null;return r&&r.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)}),[])}(o))},Fu=function(e){return Au(ap(e,ld()))},Yu=function(e){e||(e={}),e.color||(e.color={});const t=void 0===e.margin||null===e.margin||e.margin<0?4:e.margin,r=e.width&&e.width>=21?e.width:void 0,n=e.scale||4;return{width:r,scale:r?4:n,margin:t,color:{dark:pp(e.color.dark||"#000000ff"),light:pp(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},Ju=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},Xu=function(e,t){const r=Ju(e,t);return Math.floor((e+2*t.margin)*r)},ep=function(e,t,r){const n=t.modules.size,i=t.modules.data,o=Ju(n,r),a=Math.floor((n+2*r.margin)*o),s=r.margin*o,c=[r.color.light,r.color.dark];for(let t=0;t<a;t++)for(let l=0;l<a;l++){let d=4*(t*a+l),u=r.color.light;if(t>=s&&l>=s&&t<a-s&&l<a-s){u=c[i[Math.floor((t-s)/o)*n+Math.floor((l-s)/o)]?1:0]}e[d++]=u.r,e[d++]=u.g,e[d++]=u.b,e[d]=u.a}},Zu=function(e,t,r){let n=r,i=t;void 0!==n||t&&t.getContext||(n=t,t=void 0),t||(i=function(){try{return document.createElement("canvas")}catch(e){throw new Error("You need to specify a canvas element")}}()),n=Yu(n);const o=Xu(e.modules.size,n),a=i.getContext("2d"),s=a.createImageData(o,o);return ep(s.data,e,n),function(e,t,r){e.clearRect(0,0,t.width,t.height),t.style||(t.style={}),t.height=r,t.width=r,t.style.height=r+"px",t.style.width=r+"px"}(a,i,o),a.putImageData(s,0,0),i},Qu=function(e,t,r){let n=r;void 0!==n||t&&t.getContext||(n=t,t=void 0),n||(n={});const i=Zu(e,t,n),o=n.type||"image/png",a=n.rendererOpts||{};return i.toDataURL(o,a.quality)},tp=function(e,t,r){const n=Yu(t),i=e.modules.size,o=e.modules.data,a=i+2*n.margin,s=n.color.light.a?"<path "+hp(n.color.light,"fill")+' d="M0 0h'+a+"v"+a+'H0z"/>':"",c="<path "+hp(n.color.dark,"stroke")+' d="'+function(e,t,r){let n="",i=0,o=!1,a=0;for(let s=0;s<e.length;s++){const c=Math.floor(s%t),l=Math.floor(s/t);c||o||(o=!0),e[s]?(a++,s>0&&c>0&&e[s-1]||(n+=o?fp("M",c+r,.5+l+r):fp("m",i,0),i=0,o=!1),c+1<t&&e[s+1]||(n+=fp("h",a),a=0)):i++}return n}(o,i,n.margin)+'"/>',l='viewBox="0 0 '+a+" "+a+'"',d='<svg xmlns="http://www.w3.org/2000/svg" '+(n.width?'width="'+n.width+'" height="'+n.width+'" ':"")+l+' shape-rendering="crispEdges">'+s+c+"</svg>\n";return"function"==typeof r&&r(null,d),d},id=function(e,t){if(void 0===e||""===e)throw new Error("No input text");let r,n,i=md;return void 0!==t&&(i=bd(t.errorCorrectionLevel,md),r=ru(t.version),n=Od(t.maskPattern),t.toSJISFunc&&cd(t.toSJISFunc)),up(e,r,i,n)},rd=mp.bind(null,Zu),mp.bind(null,Qu),mp.bind(null,(function(e,t,r){return tp(e,r)}));const gp=yr.div`
1305
+ `,jd=Boolean(navigator.mediaDevices.getDisplayMedia);var Od=()=>{const{t:e}=Fi(),t=(0,je.useRef)(null),[n,i]=(0,je.useState)(!1),{setIsYoutubePopupVisible:o,setIsLinksharePopupVisible:s,selfPeerId:c,permissions:l,setBlockedFeaturePopupOpen:d}=(0,je.useContext)(Ya),{highlightedTile:u,dispatch:p}=is(),f=Boolean(u?.isGlobal&&u?.peerId===c);bs(t,(()=>i(!1)));const m=[{id:"1",items:[{id:"linksharing",title:e("shareLink.title"),jsxIcon:(0,a.jsx)(Bs,{}),action:()=>{l.find((e=>"share_link"===e))?(i(!1),s(!0),h.event("linkshareClick")):d(!0)}},{id:"youtube",title:e("youtube.title"),jsxIcon:(0,a.jsx)(_d,{}),action:()=>{i(!1),o(!0),h.event("youtubeClick")}}]}];return jd&&m.push({id:"2",items:[{id:"screensharing",title:e("menu.screenSharing"),jsxIcon:(0,a.jsx)(Ac,{}),action:async()=>{if(l.find((e=>"screen_sharing"===e))){i(!1);try{h.event("screenshareClick"),await Qa.enableScreenshare(),h.event("enableScreenshare")}catch(t){console.warn(t),h.event("screenshareCancel"),r(v)(e("notifications.screensharingError"),{className:"error"})}}else d(!0)}}]}),(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)(Ed,{children:[n&&(0,a.jsx)(Rd,{ref:t,children:(0,a.jsx)(Es,{categories:m})}),(0,a.jsx)(Cd,{primary:f,onClick:async()=>{f?p({type:Ja.UNSET_HIGHLIGHTED_TILE}):i((e=>!e))},children:(0,a.jsx)(Ac,{white:f,arrow:!0})})]})})};var Md,Ld,Dd,Id,Ad,Nd,Fd,zd,Bd,Ud=()=>{const{t:e}=Fi(),t=(0,je.useRef)(null),[n,i]=(0,je.useState)(0),[o,s]=(0,je.useState)(!1),[c,l]=(0,je.useState)(!1),{muted:d,streaming:u,options:p,isAgent:f,headless:m}=(0,je.useContext)(Ya);bs(t,(()=>s(!1)));const g=()=>{Qa.endCall()},y=e=>{const{numberOfAvailableWebcams:t}=e.detail;i(t)};return(0,je.useEffect)((()=>(Qa.addEventListener("webcamsUpdate",y),()=>{Qa.removeEventListener("webcamsUpdate",y)})),[]),m?null:(0,a.jsxs)(kd,{children:[p.controls?.microphone?.available&&(0,a.jsx)(Cd,{danger:d,onClick:async()=>{try{Qa.getDevicesState().microphone.enabled?(h.event("toggleMicrophone"),await Qa.toggleMute()):(h.event("enableMicrophone"),await Qa.enableMicrophone())}catch(t){console.warn(t),r(v)(e("notifications.microphoneError"),{className:"error"})}},children:(0,a.jsx)(Mc,{slash:d})}),p.controls?.camera?.available&&(0,a.jsx)(Cd,{danger:!u,onClick:async()=>{try{u?(h.event("disableCamera"),await Qa.disableVideo()):(l(!0),h.event("enableCamera"),await Qa.enableVideo())}catch(t){console.warn(t),r(v)(e("notifications.cameraError"),{className:"error"})}finally{l(!1)}},children:c?(0,a.jsx)(rc,{}):(0,a.jsx)(Lc,{slash:!u})}),p.controls?.screenshare?.available&&(0,a.jsx)(Od,{}),u&&n>1&&(0,a.jsx)(Cd,{onClick:async()=>{try{h.event("rotateCamera"),await Qa.rotateVideo()}catch(t){console.warn(t),r(v)(e("notifications.cameraRotateError"),{className:"error"})}},children:(0,a.jsx)(Sd,{})}),(0,a.jsxs)(Ed,{children:[o&&(0,a.jsx)(Td,{ref:t,children:(0,a.jsx)(Es,{categories:[{id:"1",items:[{id:"leaveCall",title:e("leave.leaveCall"),jsxIcon:(0,a.jsx)(ms,{}),action:g},{id:"terminateCall",title:e("leave.endCall"),jsxIcon:(0,a.jsx)(gs,{}),action:()=>{Qa.terminateRoom()},danger:!0}]}]})}),(0,a.jsxs)(Pd,{onClick:()=>{f?s((e=>!e)):g()},danger:!0,children:[(0,a.jsx)(wd,{}),(0,a.jsx)("p",{children:e("leave.title")})]})]})]})};je=o("85Hg2"),je=o("85Hg2");let Vd;Ld=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then};const Hd=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];var qd,Wd,$d,Kd,Gd,Zd;Id=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return 4*e+17},Ad=function(e){return Hd[e]},Nd=function(e){let t=0;for(;0!==e;)t++,e>>>=1;return t},Fd=function(e){if("function"!=typeof e)throw new Error('"toSJISFunc" is not a valid function.');Vd=e},zd=function(){return void 0!==Vd},Bd=function(e){return Vd(e)},qd={bit:1},Wd={bit:0},$d={bit:3},Kd={bit:2},Gd=function(e){return e&&void 0!==e.bit&&e.bit>=0&&e.bit<4},Zd=function(e,t){if(Gd(e))return e;try{return function(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return qd;case"m":case"medium":return Wd;case"q":case"quartile":return $d;case"h":case"high":return Kd;default:throw new Error("Unknown EC Level: "+e)}}(e)}catch(e){return t}};var Qd={};function Yd(){this.buffer=[],this.length=0}Yd.prototype={get:function(e){const t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(let r=0;r<t;r++)this.putBit(1==(e>>>t-r-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},Qd=Yd;var Jd,Xd,eu={};function tu(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}tu.prototype.set=function(e,t,r,n){const i=e*this.size+t;this.data[i]=r,n&&(this.reservedBit[i]=!0)},tu.prototype.get=function(e,t){return this.data[e*this.size+t]},tu.prototype.xor=function(e,t,r){this.data[e*this.size+t]^=r},tu.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},eu=tu;var ru,nu=Id;Jd=function(e){if(1===e)return[];const t=Math.floor(e/7)+2,r=nu(e),n=145===r?26:2*Math.ceil((r-13)/(2*t-2)),i=[r-7];for(let e=1;e<t-1;e++)i[e]=i[e-1]-n;return i.push(6),i.reverse()},Xd=function(e){const t=[],r=Jd(e),n=r.length;for(let e=0;e<n;e++)for(let i=0;i<n;i++)0===e&&0===i||0===e&&i===n-1||e===n-1&&0===i||t.push([r[e],r[i]]);return t};var iu=Id;var ou,au,su,cu,lu,du,uu,pu,hu;ru=function(e){const t=iu(e);return[[0,0],[t-7,0],[0,t-7]]},ou={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const fu=3,mu=3,gu=40,vu=10;function yu(e,t,r){switch(e){case ou.PATTERN000:return(t+r)%2==0;case ou.PATTERN001:return t%2==0;case ou.PATTERN010:return r%3==0;case ou.PATTERN011:return(t+r)%3==0;case ou.PATTERN100:return(Math.floor(t/2)+Math.floor(r/3))%2==0;case ou.PATTERN101:return t*r%2+t*r%3==0;case ou.PATTERN110:return(t*r%2+t*r%3)%2==0;case ou.PATTERN111:return(t*r%3+(t+r)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}}var bu,wu;au=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},su=function(e){return au(e)?parseInt(e,10):void 0},cu=function(e){const t=e.size;let r=0,n=0,i=0,o=null,a=null;for(let s=0;s<t;s++){n=i=0,o=a=null;for(let c=0;c<t;c++){let t=e.get(s,c);t===o?n++:(n>=5&&(r+=fu+(n-5)),o=t,n=1),t=e.get(c,s),t===a?i++:(i>=5&&(r+=fu+(i-5)),a=t,i=1)}n>=5&&(r+=fu+(n-5)),i>=5&&(r+=fu+(i-5))}return r},lu=function(e){const t=e.size;let r=0;for(let n=0;n<t-1;n++)for(let i=0;i<t-1;i++){const t=e.get(n,i)+e.get(n,i+1)+e.get(n+1,i)+e.get(n+1,i+1);4!==t&&0!==t||r++}return r*mu},du=function(e){const t=e.size;let r=0,n=0,i=0;for(let o=0;o<t;o++){n=i=0;for(let a=0;a<t;a++)n=n<<1&2047|e.get(o,a),a>=10&&(1488===n||93===n)&&r++,i=i<<1&2047|e.get(a,o),a>=10&&(1488===i||93===i)&&r++}return r*gu},uu=function(e){let t=0;const r=e.data.length;for(let n=0;n<r;n++)t+=e.data[n];return Math.abs(Math.ceil(100*t/r/5)-10)*vu},pu=function(e,t){const r=t.size;for(let n=0;n<r;n++)for(let i=0;i<r;i++)t.isReserved(i,n)||t.xor(i,n,yu(e,i,n))},hu=function(e,t){const r=Object.keys(ou).length;let n=0,i=1/0;for(let o=0;o<r;o++){t(o),pu(o,e);const r=cu(e)+lu(e)+du(e)+uu(e);pu(o,e),r<i&&(i=r,n=o)}return n};const xu=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],Su=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];bu=function(e,t){switch(t){case qd:return xu[4*(e-1)+0];case Wd:return xu[4*(e-1)+1];case $d:return xu[4*(e-1)+2];case Kd:return xu[4*(e-1)+3];default:return}},wu=function(e,t){switch(t){case qd:return Su[4*(e-1)+0];case Wd:return Su[4*(e-1)+1];case $d:return Su[4*(e-1)+2];case Kd:return Su[4*(e-1)+3];default:return}};var _u,ku,Cu,Eu,Pu,Ru={};const Tu=new Uint8Array(512),ju=new Uint8Array(256);function Ou(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}var Mu,Lu,Du,Iu,Au,Nu,Fu,zu,Bu,Uu,Vu,Hu,qu,Wu,$u,Ku,Gu,Zu,Qu,Yu,Ju,Xu,ep;!function(){let e=1;for(let t=0;t<255;t++)Tu[t]=e,ju[e]=t,e<<=1,256&e&&(e^=285);for(let e=255;e<512;e++)Tu[e]=Tu[e-255]}(),Eu=function(e){return Tu[e]},Pu=function(e,t){return 0===e||0===t?0:Tu[ju[e]+ju[t]]},_u=function(e,t){const r=new Uint8Array(e.length+t.length-1);for(let n=0;n<e.length;n++)for(let i=0;i<t.length;i++)r[n+i]^=Pu(e[n],t[i]);return r},ku=function(e,t){let r=new Uint8Array(e);for(;r.length-t.length>=0;){const e=r[0];for(let n=0;n<t.length;n++)r[n]^=Pu(t[n],e);let n=0;for(;n<r.length&&0===r[n];)n++;r=r.slice(n)}return r},Cu=function(e){let t=new Uint8Array([1]);for(let r=0;r<e;r++)t=_u(t,new Uint8Array([1,Eu(r)]));return t},Ou.prototype.initialize=function(e){this.degree=e,this.genPoly=Cu(this.degree)},Ou.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");const t=new Uint8Array(e.length+this.degree);t.set(e);const r=ku(t,this.genPoly),n=this.degree-r.length;if(n>0){const e=new Uint8Array(this.degree);return e.set(r,n),e}return r},Ru=Ou,$u=function(e){return!isNaN(e)&&e>=1&&e<=40};const tp="[0-9]+";let rp="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";rp=rp.replace(/u/g,"\\u");const np="(?:(?![A-Z0-9 $%*+\\-./:]|"+rp+")(?:.|[\r\n]))+";Ku=new RegExp(rp,"g"),Gu=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),Zu=new RegExp(np,"g"),Qu=new RegExp(tp,"g"),Yu=new RegExp("[A-Z $%*+\\-./:]+","g");const ip=new RegExp("^"+rp+"$"),op=new RegExp("^"+tp+"$"),ap=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");Ju=function(e){return ip.test(e)},Xu=function(e){return op.test(e)},ep=function(e){return ap.test(e)},Au={id:"Numeric",bit:1,ccBits:[10,12,14]},Nu={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},Fu={id:"Byte",bit:4,ccBits:[8,16,16]},zu={id:"Kanji",bit:8,ccBits:[8,10,12]},Bu={bit:-1},Uu=function(e,t){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!$u(t))throw new Error("Invalid version: "+t);return t>=1&&t<10?e.ccBits[0]:t<27?e.ccBits[1]:e.ccBits[2]},Vu=function(e){return Xu(e)?Au:ep(e)?Nu:Ju(e)?zu:Fu},Hu=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},qu=function(e){return e&&e.bit&&e.ccBits},Wu=function(e,t){if(qu(e))return e;try{return function(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return Au;case"alphanumeric":return Nu;case"kanji":return zu;case"byte":return Fu;default:throw new Error("Unknown mode: "+e)}}(e)}catch(e){return t}};const sp=Nd(7973);function cp(e,t){return Uu(e,t)+4}function lp(e,t){let r=0;return e.forEach((function(e){const n=cp(e.mode,t);r+=n+e.getBitsLength()})),r}var dp;Mu=function(e,t){return $u(e)?parseInt(e,10):t},Lu=function(e,t,r){if(!$u(e))throw new Error("Invalid QR Code version");void 0===r&&(r=Fu);const n=8*(Ad(e)-wu(e,t));if(r===Bu)return n;const i=n-cp(r,e);switch(r){case Au:return Math.floor(i/10*3);case Nu:return Math.floor(i/11*2);case zu:return Math.floor(i/13);default:return Math.floor(i/8)}},Du=function(e,t){let r;const n=Zd(t,Wd);if(Array.isArray(e)){if(e.length>1)return function(e,t){for(let r=1;r<=40;r++)if(lp(e,r)<=Lu(r,t,Bu))return r}(e,n);if(0===e.length)return 1;r=e[0]}else r=e;return function(e,t,r){for(let n=1;n<=40;n++)if(t<=Lu(n,r,e))return n}(r.mode,r.getLength(),n)},Iu=function(e){if(!$u(e)||e<7)throw new Error("Invalid QR Code version");let t=e<<12;for(;Nd(t)-sp>=0;)t^=7973<<Nd(t)-sp;return e<<12|t};const up=Nd(1335);var pp,hp,fp;dp=function(e,t){const r=e.bit<<3|t;let n=r<<10;for(;Nd(n)-up>=0;)n^=1335<<Nd(n)-up;return 21522^(r<<10|n)};var mp={};function gp(e){this.mode=Au,this.data=e.toString()}gp.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},gp.prototype.getLength=function(){return this.data.length},gp.prototype.getBitsLength=function(){return gp.getBitsLength(this.data.length)},gp.prototype.write=function(e){let t,r,n;for(t=0;t+3<=this.data.length;t+=3)r=this.data.substr(t,3),n=parseInt(r,10),e.put(n,10);const i=this.data.length-t;i>0&&(r=this.data.substr(t),n=parseInt(r,10),e.put(n,3*i+1))},mp=gp;var vp={};const yp=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function bp(e){this.mode=Nu,this.data=e}bp.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},bp.prototype.getLength=function(){return this.data.length},bp.prototype.getBitsLength=function(){return bp.getBitsLength(this.data.length)},bp.prototype.write=function(e){let t;for(t=0;t+2<=this.data.length;t+=2){let r=45*yp.indexOf(this.data[t]);r+=yp.indexOf(this.data[t+1]),e.put(r,11)}this.data.length%2&&e.put(yp.indexOf(this.data[t]),6)},vp=bp;var wp,xp={};function Sp(e){this.mode=Fu,"string"==typeof e&&(e=wp(e)),this.data=new Uint8Array(e)}wp=function(e){for(var t=[],r=e.length,n=0;n<r;n++){var i=e.charCodeAt(n);if(i>=55296&&i<=56319&&r>n+1){var o=e.charCodeAt(n+1);o>=56320&&o<=57343&&(i=1024*(i-55296)+o-56320+65536,n+=1)}i<128?t.push(i):i<2048?(t.push(i>>6|192),t.push(63&i|128)):i<55296||i>=57344&&i<65536?(t.push(i>>12|224),t.push(i>>6&63|128),t.push(63&i|128)):i>=65536&&i<=1114111?(t.push(i>>18|240),t.push(i>>12&63|128),t.push(i>>6&63|128),t.push(63&i|128)):t.push(239,191,189)}return new Uint8Array(t).buffer},Sp.getBitsLength=function(e){return 8*e},Sp.prototype.getLength=function(){return this.data.length},Sp.prototype.getBitsLength=function(){return Sp.getBitsLength(this.data.length)},Sp.prototype.write=function(e){for(let t=0,r=this.data.length;t<r;t++)e.put(this.data[t],8)},xp=Sp;var _p={};function kp(e){this.mode=zu,this.data=e}kp.getBitsLength=function(e){return 13*e},kp.prototype.getLength=function(){return this.data.length},kp.prototype.getBitsLength=function(){return kp.getBitsLength(this.data.length)},kp.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let r=Bd(this.data[t]);if(r>=33088&&r<=40956)r-=33088;else{if(!(r>=57408&&r<=60351))throw new Error("Invalid SJIS character: "+this.data[t]+"\nMake sure your charset is UTF-8");r-=49472}r=192*(r>>>8&255)+(255&r),e.put(r,13)}},_p=kp;var Cp,Ep,Pp,Rp,Tp,jp,Op,Mp={},Lp={single_source_shortest_paths:function(e,t,r){var n={},i={};i[t]=0;var o,a,s,c,l,d,u,p=Lp.PriorityQueue.make();for(p.push(t,0);!p.empty();)for(s in a=(o=p.pop()).value,c=o.cost,l=e[a]||{})l.hasOwnProperty(s)&&(d=c+l[s],u=i[s],(void 0===i[s]||u>d)&&(i[s]=d,p.push(s,d),n[s]=a));if(void 0!==r&&void 0===i[r]){var h=["Could not find a path from ",t," to ",r,"."].join("");throw new Error(h)}return n},extract_shortest_path_from_predecessor_list:function(e,t){for(var r=[],n=t;n;)r.push(n),e[n],n=e[n];return r.reverse(),r},find_path:function(e,t,r){var n=Lp.single_source_shortest_paths(e,t,r);return Lp.extract_shortest_path_from_predecessor_list(n,r)},PriorityQueue:{make:function(e){var t,r=Lp.PriorityQueue,n={};for(t in e=e||{},r)r.hasOwnProperty(t)&&(n[t]=r[t]);return n.queue=[],n.sorter=e.sorter||r.default_sorter,n},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var r={value:e,cost:t};this.queue.push(r),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};function Dp(e){return unescape(encodeURIComponent(e)).length}function Ip(e,t,r){const n=[];let i;for(;null!==(i=e.exec(r));)n.push({data:i[0],index:i.index,mode:t,length:i[0].length});return n}function Ap(e){const t=Ip(Qu,Au,e),r=Ip(Yu,Nu,e);let n,i;zd()?(n=Ip(Zu,Fu,e),i=Ip(Ku,zu,e)):(n=Ip(Gu,Fu,e),i=[]);return t.concat(r,n,i).sort((function(e,t){return e.index-t.index})).map((function(e){return{data:e.data,mode:e.mode,length:e.length}}))}function Np(e,t){switch(t){case Au:return mp.getBitsLength(e);case Nu:return vp.getBitsLength(e);case zu:return _p.getBitsLength(e);case Fu:return xp.getBitsLength(e)}}function Fp(e,t){let r;const n=Vu(e);if(r=Wu(t,n),r!==Fu&&r.bit<n.bit)throw new Error('"'+e+'" cannot be encoded with mode '+Hu(r)+".\n Suggested mode is: "+Hu(n));switch(r!==zu||zd()||(r=Fu),r){case Au:return new mp(e);case Nu:return new vp(e);case zu:return new _p(e);case Fu:return new xp(e)}}function zp(e,t,r){const n=e.size,i=dp(t,r);let o,a;for(o=0;o<15;o++)a=1==(i>>o&1),o<6?e.set(o,8,a,!0):o<8?e.set(o+1,8,a,!0):e.set(n-15+o,8,a,!0),o<8?e.set(8,n-o-1,a,!0):o<9?e.set(8,15-o-1+1,a,!0):e.set(8,15-o-1,a,!0);e.set(n-8,8,1,!0)}function Bp(e,t,r){const n=new Qd;r.forEach((function(t){n.put(t.mode.bit,4),n.put(t.getLength(),Uu(t.mode,e)),t.write(n)}));const i=8*(Ad(e)-wu(e,t));for(n.getLengthInBits()+4<=i&&n.put(0,4);n.getLengthInBits()%8!=0;)n.putBit(0);const o=(i-n.getLengthInBits())/8;for(let e=0;e<o;e++)n.put(e%2?17:236,8);return function(e,t,r){const n=Ad(t),i=wu(t,r),o=n-i,a=bu(t,r),s=n%a,c=a-s,l=Math.floor(n/a),d=Math.floor(o/a),u=d+1,p=l-d,h=new Ru(p);let f=0;const m=new Array(a),g=new Array(a);let v=0;const y=new Uint8Array(e.buffer);for(let e=0;e<a;e++){const t=e<c?d:u;m[e]=y.slice(f,f+t),g[e]=h.encode(m[e]),f+=t,v=Math.max(v,t)}const b=new Uint8Array(n);let w,x,S=0;for(w=0;w<v;w++)for(x=0;x<a;x++)w<m[x].length&&(b[S++]=m[x][w]);for(w=0;w<p;w++)for(x=0;x<a;x++)b[S++]=g[x][w];return b}(n,e,t)}function Up(e,t,r,n){let i;if(Array.isArray(e))i=pp(e);else{if("string"!=typeof e)throw new Error("Invalid data");{let n=t;if(!n){const t=fp(e);n=Du(t,r)}i=hp(e,n||40)}}const o=Du(i,r);if(!o)throw new Error("The amount of data is too big to be stored in a QR Code");if(t){if(t<o)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+o+".\n")}else t=o;const a=Bp(t,r,i),s=Id(t),c=new eu(s);return function(e,t){const r=e.size,n=ru(t);for(let t=0;t<n.length;t++){const i=n[t][0],o=n[t][1];for(let t=-1;t<=7;t++)if(!(i+t<=-1||r<=i+t))for(let n=-1;n<=7;n++)o+n<=-1||r<=o+n||(t>=0&&t<=6&&(0===n||6===n)||n>=0&&n<=6&&(0===t||6===t)||t>=2&&t<=4&&n>=2&&n<=4?e.set(i+t,o+n,!0,!0):e.set(i+t,o+n,!1,!0))}}(c,t),function(e){const t=e.size;for(let r=8;r<t-8;r++){const t=r%2==0;e.set(r,6,t,!0),e.set(6,r,t,!0)}}(c),function(e,t){const r=Xd(t);for(let t=0;t<r.length;t++){const n=r[t][0],i=r[t][1];for(let t=-2;t<=2;t++)for(let r=-2;r<=2;r++)-2===t||2===t||-2===r||2===r||0===t&&0===r?e.set(n+t,i+r,!0,!0):e.set(n+t,i+r,!1,!0)}}(c,t),zp(c,r,0),t>=7&&function(e,t){const r=e.size,n=Iu(t);let i,o,a;for(let t=0;t<18;t++)i=Math.floor(t/3),o=t%3+r-8-3,a=1==(n>>t&1),e.set(i,o,a,!0),e.set(o,i,a,!0)}(c,t),function(e,t){const r=e.size;let n=-1,i=r-1,o=7,a=0;for(let s=r-1;s>0;s-=2)for(6===s&&s--;;){for(let r=0;r<2;r++)if(!e.isReserved(i,s-r)){let n=!1;a<t.length&&(n=1==(t[a]>>>o&1)),e.set(i,s-r,n),o--,-1===o&&(a++,o=7)}if(i+=n,i<0||r<=i){i-=n,n=-n;break}}}(c,a),isNaN(n)&&(n=hu(c,zp.bind(null,c,r))),pu(n,c),zp(c,r,n),{modules:c,version:t,errorCorrectionLevel:r,maskPattern:n,segments:i}}function Vp(e){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)throw new Error("Color should be defined as hex string");let t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw new Error("Invalid hex color: "+e);3!==t.length&&4!==t.length||(t=Array.prototype.concat.apply([],t.map((function(e){return[e,e]})))),6===t.length&&t.push("F","F");const r=parseInt(t.join(""),16);return{r:r>>24&255,g:r>>16&255,b:r>>8&255,a:255&r,hex:"#"+t.slice(0,6).join("")}}function Hp(e,t){const r=e.a/255,n=t+'="'+e.hex+'"';return r<1?n+" "+t+'-opacity="'+r.toFixed(2).slice(1)+'"':n}function qp(e,t,r){let n=e+t;return void 0!==r&&(n+=" "+r),n}function Wp(e,t,r,n,i){const o=[].slice.call(arguments,1),a=o.length,s="function"==typeof o[a-1];if(!s&&!Ld())throw new Error("Callback required as last argument");if(!s){if(a<1)throw new Error("Too few arguments provided");return 1===a?(r=t,t=n=void 0):2!==a||t.getContext||(n=r,r=t,t=void 0),new Promise((function(i,o){try{const o=Dd(r,n);i(e(o,t,n))}catch(e){o(e)}}))}if(a<2)throw new Error("Too few arguments provided");2===a?(i=r,r=t,t=n=void 0):3===a&&(t.getContext&&void 0===i?(i=n,n=void 0):(i=n,n=r,r=t,t=void 0));try{const o=Dd(r,n);i(null,e(o,t,n))}catch(e){i(e)}}Mp=Lp,pp=function(e){return e.reduce((function(e,t){return"string"==typeof t?e.push(Fp(t,null)):t.data&&e.push(Fp(t.data,t.mode)),e}),[])},hp=function(e,t){const r=function(e){const t=[];for(let r=0;r<e.length;r++){const n=e[r];switch(n.mode){case Au:t.push([n,{data:n.data,mode:Nu,length:n.length},{data:n.data,mode:Fu,length:n.length}]);break;case Nu:t.push([n,{data:n.data,mode:Fu,length:n.length}]);break;case zu:t.push([n,{data:n.data,mode:Fu,length:Dp(n.data)}]);break;case Fu:t.push([{data:n.data,mode:Fu,length:Dp(n.data)}])}}return t}(Ap(e,zd())),n=function(e,t){const r={},n={start:{}};let i=["start"];for(let o=0;o<e.length;o++){const a=e[o],s=[];for(let e=0;e<a.length;e++){const c=a[e],l=""+o+e;s.push(l),r[l]={node:c,lastCount:0},n[l]={};for(let e=0;e<i.length;e++){const o=i[e];r[o]&&r[o].node.mode===c.mode?(n[o][l]=Np(r[o].lastCount+c.length,c.mode)-Np(r[o].lastCount,c.mode),r[o].lastCount+=c.length):(r[o]&&(r[o].lastCount=c.length),n[o][l]=Np(c.length,c.mode)+4+Uu(c.mode,t))}}i=s}for(let e=0;e<i.length;e++)n[i[e]].end=0;return{map:n,table:r}}(r,t),i=Mp.find_path(n.map,"start","end"),o=[];for(let e=1;e<i.length-1;e++)o.push(n.table[i[e]].node);return pp(function(e){return e.reduce((function(e,t){const r=e.length-1>=0?e[e.length-1]:null;return r&&r.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)}),[])}(o))},fp=function(e){return pp(Ap(e,zd()))},Pp=function(e){e||(e={}),e.color||(e.color={});const t=void 0===e.margin||null===e.margin||e.margin<0?4:e.margin,r=e.width&&e.width>=21?e.width:void 0,n=e.scale||4;return{width:r,scale:r?4:n,margin:t,color:{dark:Vp(e.color.dark||"#000000ff"),light:Vp(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},Rp=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},Tp=function(e,t){const r=Rp(e,t);return Math.floor((e+2*t.margin)*r)},jp=function(e,t,r){const n=t.modules.size,i=t.modules.data,o=Rp(n,r),a=Math.floor((n+2*r.margin)*o),s=r.margin*o,c=[r.color.light,r.color.dark];for(let t=0;t<a;t++)for(let l=0;l<a;l++){let d=4*(t*a+l),u=r.color.light;if(t>=s&&l>=s&&t<a-s&&l<a-s){u=c[i[Math.floor((t-s)/o)*n+Math.floor((l-s)/o)]?1:0]}e[d++]=u.r,e[d++]=u.g,e[d++]=u.b,e[d]=u.a}},Cp=function(e,t,r){let n=r,i=t;void 0!==n||t&&t.getContext||(n=t,t=void 0),t||(i=function(){try{return document.createElement("canvas")}catch(e){throw new Error("You need to specify a canvas element")}}()),n=Pp(n);const o=Tp(e.modules.size,n),a=i.getContext("2d"),s=a.createImageData(o,o);return jp(s.data,e,n),function(e,t,r){e.clearRect(0,0,t.width,t.height),t.style||(t.style={}),t.height=r,t.width=r,t.style.height=r+"px",t.style.width=r+"px"}(a,i,o),a.putImageData(s,0,0),i},Ep=function(e,t,r){let n=r;void 0!==n||t&&t.getContext||(n=t,t=void 0),n||(n={});const i=Cp(e,t,n),o=n.type||"image/png",a=n.rendererOpts||{};return i.toDataURL(o,a.quality)},Op=function(e,t,r){const n=Pp(t),i=e.modules.size,o=e.modules.data,a=i+2*n.margin,s=n.color.light.a?"<path "+Hp(n.color.light,"fill")+' d="M0 0h'+a+"v"+a+'H0z"/>':"",c="<path "+Hp(n.color.dark,"stroke")+' d="'+function(e,t,r){let n="",i=0,o=!1,a=0;for(let s=0;s<e.length;s++){const c=Math.floor(s%t),l=Math.floor(s/t);c||o||(o=!0),e[s]?(a++,s>0&&c>0&&e[s-1]||(n+=o?qp("M",c+r,.5+l+r):qp("m",i,0),i=0,o=!1),c+1<t&&e[s+1]||(n+=qp("h",a),a=0)):i++}return n}(o,i,n.margin)+'"/>',l='viewBox="0 0 '+a+" "+a+'"',d='<svg xmlns="http://www.w3.org/2000/svg" '+(n.width?'width="'+n.width+'" height="'+n.width+'" ':"")+l+' shape-rendering="crispEdges">'+s+c+"</svg>\n";return"function"==typeof r&&r(null,d),d},Dd=function(e,t){if(void 0===e||""===e)throw new Error("No input text");let r,n,i=Wd;return void 0!==t&&(i=Zd(t.errorCorrectionLevel,Wd),r=Mu(t.version),n=su(t.maskPattern),t.toSJISFunc&&Fd(t.toSJISFunc)),Up(e,r,i,n)},Md=Wp.bind(null,Cp),Wp.bind(null,Ep),Wp.bind(null,(function(e,t,r){return Op(e,r)}));const $p=yr.div`
1186
1306
  position: absolute;
1187
1307
  width: 100%;
1188
1308
  bottom: ${e=>e.open?0:"-500px"};
@@ -1195,16 +1315,16 @@ to {
1195
1315
  justify-content: center;
1196
1316
  align-items: center;
1197
1317
  `}}
1198
- `,vp=yr.div`
1318
+ `,Kp=yr.div`
1199
1319
  display: flex;
1200
1320
  flex-direction: column;
1201
1321
  height: 500px;
1202
1322
  max-height: 100vh;
1203
- background-color: ${e=>e.theme.popupBackgroundPrimaryColor};
1323
+ background-color: ${e=>e.open?e.theme.popupBackgroundPrimaryColor:"transparent"};
1204
1324
  color: ${e=>e.theme.popupTitleColor};
1205
1325
  border-radius: ${e=>e.desktop?"20px":"20px 20px 0 0"};
1206
1326
  padding-bottom: ${({desktop:e})=>e?0:"12px"};
1207
- `,yp=yr.div`
1327
+ `,Gp=yr.div`
1208
1328
  display: flex;
1209
1329
  justify-content: space-between;
1210
1330
  align-items: center;
@@ -1214,7 +1334,7 @@ to {
1214
1334
  margin: 0;
1215
1335
  font-weight: 600;
1216
1336
  }
1217
- `,bp=yr.div`
1337
+ `,Zp=yr.div`
1218
1338
  display: flex;
1219
1339
  align-items: center;
1220
1340
 
@@ -1228,7 +1348,7 @@ to {
1228
1348
  width: 20px;
1229
1349
  height: 20px;
1230
1350
  }
1231
- `,wp=yr.button`
1351
+ `,Qp=yr.button`
1232
1352
  display: flex;
1233
1353
  justify-content: center;
1234
1354
  align-items: center;
@@ -1247,7 +1367,7 @@ to {
1247
1367
  fill: #000;
1248
1368
  }
1249
1369
  }
1250
- `,xp=yr.div`
1370
+ `,Yp=yr.div`
1251
1371
  display: flex;
1252
1372
  justify-content: center;
1253
1373
  align-items: center;
@@ -1259,13 +1379,13 @@ to {
1259
1379
  height: 100% !important;
1260
1380
  width: auto !important;
1261
1381
  }
1262
- `,Sp=yr.p`
1382
+ `,Jp=yr.p`
1263
1383
  display: flex;
1264
1384
  justify-content: center;
1265
1385
  text-align: center;
1266
1386
  margin: 0px 16% 20px;
1267
1387
  font-size: 14px;
1268
- `,_p=yr.button`
1388
+ `,Xp=yr.button`
1269
1389
  font-size: 100%;
1270
1390
  font-family: inherit;
1271
1391
  font-weight: 700;
@@ -1279,11 +1399,11 @@ to {
1279
1399
  align-items: center;
1280
1400
  justify-content: center;
1281
1401
  color: ${({theme:e})=>e.popupTitleColor};
1282
- `,kp=yr.image`
1402
+ `,eh=yr.image`
1283
1403
  position: absolute;
1284
1404
  with: 70px;
1285
1405
  height: 70px;
1286
- `;var Cp=()=>(0,a.jsxs)("svg",{width:"71",height:"70",viewBox:"0 0 71 70",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("path",{d:"M2 35c0-7.171.386-12.832 1.38-17.303.99-4.454 2.562-7.635 4.872-9.945 2.31-2.31 5.491-3.882 9.945-4.872C22.668 1.886 28.33 1.5 35.5 1.5c7.171 0 12.832.386 17.303 1.38 4.454.99 7.635 2.562 9.945 4.872 2.31 2.31 3.882 5.491 4.872 9.945C68.614 22.168 69 27.83 69 35c0 7.171-.386 12.832-1.38 17.303-.99 4.454-2.562 7.635-4.872 9.945-2.31 2.31-5.491 3.882-9.945 4.872-4.471.994-10.132 1.38-17.303 1.38-7.171 0-12.832-.386-17.303-1.38-4.454-.99-7.635-2.562-9.945-4.872-2.31-2.31-3.882-5.491-4.872-9.945C2.386 47.832 2 42.17 2 35Z",fill:"#000",stroke:"#fff",strokeWidth:"3"}),(0,a.jsx)("path",{d:"M35.72 55.833c2.3 0 4.229-1.91 3.518-4.099a13.01 13.01 0 0 0-3.045-5.058c-2.365-2.43-5.572-3.794-8.917-3.794-3.344 0-6.551 1.365-8.916 3.794a13.01 13.01 0 0 0-3.045 5.058c-.711 2.189 1.217 4.099 3.518 4.099H35.72ZM35.28 14.167c-2.3 0-4.229 1.91-3.518 4.099a13.008 13.008 0 0 0 3.045 5.058c2.365 2.43 5.572 3.793 8.917 3.793 3.344 0 6.551-1.364 8.916-3.793a13.005 13.005 0 0 0 3.045-5.058c.711-2.189-1.217-4.099-3.519-4.099H35.281ZM43.724 51.667c0 2.301 1.916 4.231 4.087 3.467a12.565 12.565 0 0 0 4.829-3.094c2.365-2.428 3.693-5.722 3.693-9.157 0-3.435-1.328-6.729-3.693-9.158a12.565 12.565 0 0 0-4.829-3.093c-2.17-.764-4.087 1.166-4.087 3.467v17.568ZM27.277 18.333c0-2.3-1.917-4.23-4.088-3.467a12.565 12.565 0 0 0-4.829 3.094c-2.364 2.429-3.693 5.723-3.693 9.157 0 3.435 1.329 6.729 3.693 9.158a12.565 12.565 0 0 0 4.83 3.093c2.17.764 4.087-1.166 4.087-3.467V18.333Z",fill:"#fff"})]});var Ep=()=>{const{t:e}=Fi(),t=(0,je.useContext)(dr),r=(0,je.useRef)(null),n=(0,je.useRef)(null),{selfPeerId:i,profile:o,isQuickConnectPopupVisible:s,setIsQuickConnectPopupVisible:c,options:l,orientation:d}=(0,je.useContext)(Ya);bs(r,(()=>{s&&c(!1)}));const u="landscape"===d,p=(0,je.useMemo)((()=>{let e=new URL(window.location.href);if(i){if(l.sharedURL)try{e=new URL(l.sharedURL)}catch(e){console.warn(`Shared URL is invalid (${l.sharedURL})`)}e.searchParams.set("microphone-enabled","0"),e.searchParams.set("camera-enabled","1"),e.searchParams.set("quick-connect",i),o.name&&e.searchParams.set("name",o.name)}return e.href}),[l.sharedURL,i,o.name]),h=(0,je.useCallback)((async()=>{try{await os(p||window.location.href),Ir(e("copyLink.copied"),{duration:2e3})}catch(t){console.warn(t),Ir(e("copyLink.error"),{icon:Ml})}}),[e,p]);return(0,je.useEffect)((()=>{const e=e=>{const{type:t}=e.detail.event;"quick_connect_close"===t&&c(!1)};return Qa.addEventListener("customMessage",e),()=>{Qa.removeEventListener("customMessage",e)}}),[c]),(0,je.useEffect)((()=>{rd(n.current,p,{errorCorrectionLevel:"M"})}),[p]),(0,je.useEffect)((()=>{if(i){const e=new URLSearchParams(window.location.href),t=e.get("quick-connect"),r=e.get("name");t&&(Qa.sendCustomMessage(t,{type:"quick_connect_close"}),r?Qa.setProfile({name:`${r} (mobile)`}):Qa.setProfile({name:"Mobile"}))}}),[i]),(0,a.jsx)(gp,{open:s,desktop:u,children:(0,a.jsxs)(vp,{ref:r,desktop:u,children:[(0,a.jsxs)(yp,{children:[(0,a.jsxs)(bp,{children:[(0,a.jsx)(hs,{color:t.popupTitleColor}),(0,a.jsx)("h4",{children:e("quickConnect.scanTitle")})]}),(0,a.jsx)(wp,{onClick:()=>c(!1),children:(0,a.jsx)(Uc,{})})]}),(0,a.jsxs)(xp,{children:[(0,a.jsx)(kp,{children:(0,a.jsx)(Cp,{})}),(0,a.jsx)("canvas",{ref:n})]}),(0,a.jsx)(Sp,{children:e("quickConnect.scan")}),(0,a.jsxs)(_p,{onClick:h,children:[(0,a.jsx)(ps,{color:"#686868"}),e("copyLink.description")]})]})})};je=o("85Hg2");var Pp=()=>(0,a.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M15 9.017a.833.833 0 0 0-.833.833v5.983a.833.833 0 0 1-.833.833H4.167a.833.833 0 0 1-.833-.833V6.667a.833.833 0 0 1 .833-.834h5.983a.833.833 0 0 0 0-1.667H4.167a2.5 2.5 0 0 0-2.5 2.5v9.167a2.5 2.5 0 0 0 2.5 2.5h9.167a2.5 2.5 0 0 0 2.5-2.5V9.85A.833.833 0 0 0 15 9.017Zm3.267-6.834a.834.834 0 0 0-.45-.45.834.834 0 0 0-.317-.067h-5a.833.833 0 0 0 0 1.667h2.992l-8.583 8.575a.832.832 0 0 0 0 1.184.833.833 0 0 0 1.183 0l8.575-8.584V7.5a.833.833 0 1 0 1.667 0v-5a.835.835 0 0 0-.067-.317Z",fill:"#fff"})});var Rp=({direction:e})=>"right"===e?(0,a.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M8.233 14.37a.834.834 0 0 1-.59-1.423L10.59 10 7.643 7.054a.833.833 0 1 1 1.179-1.179l3.535 3.536a.833.833 0 0 1 0 1.178l-3.535 3.536a.83.83 0 0 1-.59.244Z",fill:"#fff"})}):"left"===e?(0,a.jsx)("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M22.667 14.666h-10.12l4.4-4.386a1.34 1.34 0 0 0-1.893-1.894l-6.667 6.667a1.334 1.334 0 0 0-.28.44 1.334 1.334 0 0 0 0 1.013c.063.164.158.314.28.44l6.666 6.667a1.333 1.333 0 0 0 1.894 0 1.334 1.334 0 0 0 0-1.893l-4.4-4.387h10.12a1.333 1.333 0 1 0 0-2.667Z",fill:"#fff"})}):null;var Tp=()=>(0,a.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M12.43 4.1a1 1 0 0 0-1 .12L6.65 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h3.65l4.73 3.78A1 1 0 0 0 12 20a.91.91 0 0 0 .43-.1A1 1 0 0 0 13 19V5a1 1 0 0 0-.57-.9ZM11 16.92l-3.38-2.7A1 1 0 0 0 7 14H4v-4h3a1 1 0 0 0 .62-.22L11 7.08v9.84Zm8.66-10.58a1.004 1.004 0 1 0-1.42 1.42 5.998 5.998 0 0 1-.38 8.84 1 1 0 0 0 .64 1.76 1 1 0 0 0 .64-.23 8 8 0 0 0 .52-11.79Zm-2.83 2.83a1.003 1.003 0 1 0-1.42 1.42A2 2 0 0 1 16 12a2.001 2.001 0 0 1-.71 1.53.997.997 0 1 0 1.28 1.53A4 4 0 0 0 18 12a4.06 4.06 0 0 0-1.17-2.83Z",fill:"#fff"})});je=o("85Hg2");const jp=()=>(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"17",height:"18",fill:"none",children:(0,a.jsx)("path",{fill:"#fff",d:"M10.767 6.325 7.192 9.908 5.817 8.533a.833.833 0 1 0-1.175 1.175L6.6 11.675a.831.831 0 0 0 .592.241.833.833 0 0 0 .583-.241l4.166-4.167a.833.833 0 1 0-1.175-1.183ZM8.5.667a8.333 8.333 0 1 0 0 16.666A8.333 8.333 0 0 0 8.5.667Zm0 15a6.667 6.667 0 1 1 0-13.334 6.667 6.667 0 0 1 0 13.333Z"})});var Op=()=>(0,a.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M15.592 6.008a.833.833 0 0 0-1.184 0L8.2 12.225 5.592 9.608a.852.852 0 0 0-1.184 1.225l3.2 3.2a.833.833 0 0 0 1.184 0l6.8-6.8a.834.834 0 0 0 0-1.225Z",fill:"#fff"})});const Mp=yr.div`
1406
+ `;var th=()=>(0,a.jsxs)("svg",{width:"71",height:"70",viewBox:"0 0 71 70",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("path",{d:"M2 35c0-7.171.386-12.832 1.38-17.303.99-4.454 2.562-7.635 4.872-9.945 2.31-2.31 5.491-3.882 9.945-4.872C22.668 1.886 28.33 1.5 35.5 1.5c7.171 0 12.832.386 17.303 1.38 4.454.99 7.635 2.562 9.945 4.872 2.31 2.31 3.882 5.491 4.872 9.945C68.614 22.168 69 27.83 69 35c0 7.171-.386 12.832-1.38 17.303-.99 4.454-2.562 7.635-4.872 9.945-2.31 2.31-5.491 3.882-9.945 4.872-4.471.994-10.132 1.38-17.303 1.38-7.171 0-12.832-.386-17.303-1.38-4.454-.99-7.635-2.562-9.945-4.872-2.31-2.31-3.882-5.491-4.872-9.945C2.386 47.832 2 42.17 2 35Z",fill:"#000",stroke:"#fff",strokeWidth:"3"}),(0,a.jsx)("path",{d:"M35.72 55.833c2.3 0 4.229-1.91 3.518-4.099a13.01 13.01 0 0 0-3.045-5.058c-2.365-2.43-5.572-3.794-8.917-3.794-3.344 0-6.551 1.365-8.916 3.794a13.01 13.01 0 0 0-3.045 5.058c-.711 2.189 1.217 4.099 3.518 4.099H35.72ZM35.28 14.167c-2.3 0-4.229 1.91-3.518 4.099a13.008 13.008 0 0 0 3.045 5.058c2.365 2.43 5.572 3.793 8.917 3.793 3.344 0 6.551-1.364 8.916-3.793a13.005 13.005 0 0 0 3.045-5.058c.711-2.189-1.217-4.099-3.519-4.099H35.281ZM43.724 51.667c0 2.301 1.916 4.231 4.087 3.467a12.565 12.565 0 0 0 4.829-3.094c2.365-2.428 3.693-5.722 3.693-9.157 0-3.435-1.328-6.729-3.693-9.158a12.565 12.565 0 0 0-4.829-3.093c-2.17-.764-4.087 1.166-4.087 3.467v17.568ZM27.277 18.333c0-2.3-1.917-4.23-4.088-3.467a12.565 12.565 0 0 0-4.829 3.094c-2.364 2.429-3.693 5.723-3.693 9.157 0 3.435 1.329 6.729 3.693 9.158a12.565 12.565 0 0 0 4.83 3.093c2.17.764 4.087-1.166 4.087-3.467V18.333Z",fill:"#fff"})]});var rh=()=>{const{t:e}=Fi(),t=(0,je.useContext)(dr),r=(0,je.useRef)(null),n=(0,je.useRef)(null),{selfPeerId:i,profile:o,isQuickConnectPopupVisible:s,setIsQuickConnectPopupVisible:c,options:l,orientation:d}=(0,je.useContext)(Ya);bs(r,(()=>{s&&c(!1)}));const u="landscape"===d,p=(0,je.useMemo)((()=>{let e=new URL(window.location.href);if(i){if(l.sharedURL)try{e=new URL(l.sharedURL)}catch(e){console.warn(`Shared URL is invalid (${l.sharedURL})`)}e.searchParams.set("microphone-enabled","0"),e.searchParams.set("camera-enabled","1"),e.searchParams.set("quick-connect",i),o.name&&e.searchParams.set("name",o.name)}return e.href}),[l.sharedURL,i,o.name]),h=(0,je.useCallback)((async()=>{try{await os(p||window.location.href),Ir(e("copyLink.copied"),{duration:2e3})}catch(t){console.warn(t),Ir(e("copyLink.error"),{icon:pd})}}),[e,p]);return(0,je.useEffect)((()=>{const e=e=>{const{type:t}=e.detail.event;"quick_connect_close"===t&&c(!1)};return Qa.addEventListener("customMessage",e),()=>{Qa.removeEventListener("customMessage",e)}}),[c]),(0,je.useEffect)((()=>{Md(n.current,p,{errorCorrectionLevel:"M"})}),[p]),(0,je.useEffect)((()=>{if(i){const e=new URLSearchParams(window.location.href),t=e.get("quick-connect"),r=e.get("name");t&&(Qa.sendCustomMessage(t,{type:"quick_connect_close"}),r?Qa.setProfile({name:`${r} (mobile)`}):Qa.setProfile({name:"Mobile"}))}}),[i]),(0,a.jsx)($p,{open:s,desktop:u,children:(0,a.jsxs)(Kp,{ref:r,desktop:u,open:s,children:[(0,a.jsxs)(Gp,{children:[(0,a.jsxs)(Zp,{children:[(0,a.jsx)(hs,{color:t.popupTitleColor}),(0,a.jsx)("h4",{children:e("quickConnect.scanTitle")})]}),(0,a.jsx)(Qp,{onClick:()=>c(!1),children:(0,a.jsx)(Us,{})})]}),(0,a.jsxs)(Yp,{children:[(0,a.jsx)(eh,{children:(0,a.jsx)(th,{})}),(0,a.jsx)("canvas",{ref:n})]}),(0,a.jsx)(Jp,{children:e("quickConnect.scan")}),(0,a.jsxs)(Xp,{onClick:h,children:[(0,a.jsx)(ps,{color:"#686868"}),e("copyLink.description")]})]})})};je=o("85Hg2");var nh=()=>(0,a.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M15 9.017a.833.833 0 0 0-.833.833v5.983a.833.833 0 0 1-.833.833H4.167a.833.833 0 0 1-.833-.833V6.667a.833.833 0 0 1 .833-.834h5.983a.833.833 0 0 0 0-1.667H4.167a2.5 2.5 0 0 0-2.5 2.5v9.167a2.5 2.5 0 0 0 2.5 2.5h9.167a2.5 2.5 0 0 0 2.5-2.5V9.85A.833.833 0 0 0 15 9.017Zm3.267-6.834a.834.834 0 0 0-.45-.45.834.834 0 0 0-.317-.067h-5a.833.833 0 0 0 0 1.667h2.992l-8.583 8.575a.832.832 0 0 0 0 1.184.833.833 0 0 0 1.183 0l8.575-8.584V7.5a.833.833 0 1 0 1.667 0v-5a.835.835 0 0 0-.067-.317Z",fill:"#fff"})});var ih=({direction:e})=>"right"===e?(0,a.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M8.233 14.37a.834.834 0 0 1-.59-1.423L10.59 10 7.643 7.054a.833.833 0 1 1 1.179-1.179l3.535 3.536a.833.833 0 0 1 0 1.178l-3.535 3.536a.83.83 0 0 1-.59.244Z",fill:"#fff"})}):"left"===e?(0,a.jsx)("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M22.667 14.666h-10.12l4.4-4.386a1.34 1.34 0 0 0-1.893-1.894l-6.667 6.667a1.334 1.334 0 0 0-.28.44 1.334 1.334 0 0 0 0 1.013c.063.164.158.314.28.44l6.666 6.667a1.333 1.333 0 0 0 1.894 0 1.334 1.334 0 0 0 0-1.893l-4.4-4.387h10.12a1.333 1.333 0 1 0 0-2.667Z",fill:"#fff"})}):null;var oh=()=>(0,a.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M12.43 4.1a1 1 0 0 0-1 .12L6.65 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h3.65l4.73 3.78A1 1 0 0 0 12 20a.91.91 0 0 0 .43-.1A1 1 0 0 0 13 19V5a1 1 0 0 0-.57-.9ZM11 16.92l-3.38-2.7A1 1 0 0 0 7 14H4v-4h3a1 1 0 0 0 .62-.22L11 7.08v9.84Zm8.66-10.58a1.004 1.004 0 1 0-1.42 1.42 5.998 5.998 0 0 1-.38 8.84 1 1 0 0 0 .64 1.76 1 1 0 0 0 .64-.23 8 8 0 0 0 .52-11.79Zm-2.83 2.83a1.003 1.003 0 1 0-1.42 1.42A2 2 0 0 1 16 12a2.001 2.001 0 0 1-.71 1.53.997.997 0 1 0 1.28 1.53A4 4 0 0 0 18 12a4.06 4.06 0 0 0-1.17-2.83Z",fill:"#fff"})});je=o("85Hg2");const ah=()=>(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"17",height:"18",fill:"none",children:(0,a.jsx)("path",{fill:"#fff",d:"M10.767 6.325 7.192 9.908 5.817 8.533a.833.833 0 1 0-1.175 1.175L6.6 11.675a.831.831 0 0 0 .592.241.833.833 0 0 0 .583-.241l4.166-4.167a.833.833 0 1 0-1.175-1.183ZM8.5.667a8.333 8.333 0 1 0 0 16.666A8.333 8.333 0 0 0 8.5.667Zm0 15a6.667 6.667 0 1 1 0-13.334 6.667 6.667 0 0 1 0 13.333Z"})});var sh=()=>(0,a.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M15.592 6.008a.833.833 0 0 0-1.184 0L8.2 12.225 5.592 9.608a.852.852 0 0 0-1.184 1.225l3.2 3.2a.833.833 0 0 0 1.184 0l6.8-6.8a.834.834 0 0 0 0-1.225Z",fill:"#fff"})});const ch=yr.div`
1287
1407
  display: flex;
1288
1408
  flex-direction: column;
1289
1409
  position: absolute;
@@ -1298,7 +1418,7 @@ to {
1298
1418
  bottom: 0;
1299
1419
  right: ${e=>e.open?0:"-375px"};
1300
1420
  }
1301
- `,Lp=yr.div`
1421
+ `,lh=yr.div`
1302
1422
  display: flex;
1303
1423
  flex-direction: column;
1304
1424
  height: 88%;
@@ -1314,7 +1434,7 @@ to {
1314
1434
  @media (min-width: 600px) {
1315
1435
  border-radius: 0;
1316
1436
  }
1317
- `,Dp=yr.div`
1437
+ `,dh=yr.div`
1318
1438
  display: flex;
1319
1439
  flex: 1;
1320
1440
  justify-content: center;
@@ -1326,7 +1446,7 @@ to {
1326
1446
  @media (min-width: 600px) {
1327
1447
  background-color: ${e=>e.theme.settingsBackgroundColor};
1328
1448
  }
1329
- `,Ip=yr.span`
1449
+ `,uh=yr.span`
1330
1450
  color: ${e=>e.theme.settingsHeaderTextColor};
1331
1451
  font-size: 18px;
1332
1452
  font-weight: 700;
@@ -1334,7 +1454,7 @@ to {
1334
1454
  @media (max-width: 600px) {
1335
1455
  color: #fff;
1336
1456
  }
1337
- `,Ap=yr.button`
1457
+ `,ph=yr.button`
1338
1458
  display: flex;
1339
1459
  justify-content: center;
1340
1460
  align-items: center;
@@ -1343,16 +1463,16 @@ to {
1343
1463
  padding: 0;
1344
1464
  border: none;
1345
1465
  background-color: transparent;
1346
- `,Np=yr.div`
1466
+ `,hh=yr.div`
1347
1467
  display: flex;
1348
1468
  flex-direction: column;
1349
1469
  gap: 12px;
1350
- `,Fp=yr.span`
1470
+ `,fh=yr.span`
1351
1471
  color: ${e=>e.theme.settingsHeaderTextColor};
1352
1472
  font-size: 18px;
1353
1473
  font-weight: 700;
1354
1474
  margin-bottom: 4px;
1355
- `,zp=yr.button`
1475
+ `,mh=yr.button`
1356
1476
  display: flex;
1357
1477
  background-color: ${e=>e.theme.controlsBackgroundColor};
1358
1478
  border: none;
@@ -1369,20 +1489,20 @@ to {
1369
1489
  display: flex;
1370
1490
  align-items: center;
1371
1491
  }
1372
- `,Bp=yr.div`
1492
+ `,gh=yr.div`
1373
1493
  display: flex;
1374
1494
  align-items: center;
1375
1495
  margin-right: 10px;
1376
- `,Up=yr.p`
1496
+ `,vh=yr.p`
1377
1497
  margin: 0;
1378
1498
  text-overflow: ellipsis;
1379
1499
  white-space: nowrap;
1380
1500
  overflow: hidden;
1381
- `,Vp=yr.div`
1501
+ `,yh=yr.div`
1382
1502
  display: flex;
1383
1503
  align-items: center;
1384
1504
  gap: 8px;
1385
- `,Hp=(yr.div`
1505
+ `,bh=(yr.div`
1386
1506
  display: flex;
1387
1507
  justify-content: ${e=>e.checked?"flex-end":"flex-start"};
1388
1508
  position: relative;
@@ -1415,48 +1535,48 @@ to {
1415
1535
  gap: 10px;
1416
1536
  background-color: #686868;
1417
1537
  border-radius: 15px;
1418
- `),qp=yr.p`
1538
+ `),wh=yr.p`
1419
1539
  font-weight: 700;
1420
1540
  font-size: 16px;
1421
1541
  line-height: 16px;
1422
1542
  text-align: center;
1423
1543
  margin: 0;
1424
- `,Wp=yr.p`
1544
+ `,xh=yr.p`
1425
1545
  font-weight: 500;
1426
1546
  font-size: 14px;
1427
1547
  line-height: 16px;
1428
1548
  text-align: center;
1429
1549
  margin: 0;
1430
- `,$p=Object.keys(xi);var Kp=({back:e})=>{const{t:t}=Fi(),{language:r,setLanguage:n}=(0,je.useContext)(Ya);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(Dp,{children:[(0,a.jsx)(Ip,{children:t("settings.language")}),(0,a.jsx)(Ap,{onClick:e,children:(0,a.jsx)(Rp,{direction:"left"})})]}),(0,a.jsx)(Lp,{children:(0,a.jsxs)(Np,{children:[(0,a.jsx)(Fp,{children:t("settings.language")}),$p.map((e=>{const t=r===e;return(0,a.jsxs)(zp,{onClick:()=>{n(e)},children:[(0,a.jsx)(Up,{children:xi[e].name}),(0,a.jsx)("span",{children:t&&(0,a.jsx)(Op,{})})]},e)}))]})})]})};je=o("85Hg2");var Gp=({back:e})=>{const{t:t}=Fi(),[r,n]=(0,je.useState)([]),[i,o]=(0,je.useState)(Qa.getCurrentMicrophoneId()),[s,c]=(0,je.useState)(Qa.getCurrentSpeakerId()),l=r.filter((e=>"audioinput"===e.kind)),d=r.filter((e=>"audiooutput"===e.kind)),u=l.length&&r.every((e=>""===e.deviceId)),p="setSinkId"in HTMLAudioElement.prototype,h=async()=>{const e=await Qa.listAudioDevices();n(e)};return(0,je.useEffect)((()=>(h(),Qa.addEventListener("devicesListChange",h),()=>Qa.removeEventListener("devicesListChange",h))),[]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(Dp,{children:[(0,a.jsx)(Ip,{children:t("audioMenu.title")}),(0,a.jsx)(Ap,{onClick:e,children:(0,a.jsx)(Rp,{direction:"left"})})]}),(0,a.jsx)(Lp,{children:u?(0,a.jsx)(Np,{children:(0,a.jsxs)(Hp,{children:[(0,a.jsx)(qp,{children:t("audioMenu.blockedMicrophone")}),(0,a.jsx)(Wp,{children:t("audioMenu.microphonePermissions")})]})}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(Np,{children:[(0,a.jsx)(Fp,{children:t("misc.microphone")}),l.map((e=>{const r=e.deviceId===i;return(0,a.jsxs)(zp,{onClick:()=>(async e=>{i!==e.deviceId&&(await Qa.switchMicrophone(e.deviceId),o(e.deviceId),Ir(t("notifications.connectedTo",{name:e.label}),{duration:3e3,icon:(0,a.jsx)(Hs,{}),messageStyle:{fontWeight:600}}))})(e),children:[(0,a.jsx)(Up,{children:e.label}),(0,a.jsx)("span",{children:r&&(0,a.jsx)(Op,{})})]},e.deviceId)}))]}),p&&(0,a.jsxs)(Np,{children:[(0,a.jsx)(Fp,{children:t("misc.speaker")}),d.map((e=>{const r=e.deviceId===s;return(0,a.jsxs)(zp,{onClick:()=>(e=>{s!==e.deviceId&&(Qa.setAudioSink(e.deviceId),c(e.deviceId),Ir(t("notifications.connectedTo",{name:e.label}),{duration:3e3,icon:(0,a.jsx)(Tp,{}),messageStyle:{fontWeight:600}}))})(e),children:[(0,a.jsx)(Up,{children:e.label}),(0,a.jsx)("span",{children:r&&(0,a.jsx)(Op,{})})]},e.deviceId)}))]})]})})]})};je=o("85Hg2");var Zp=({back:e})=>{const{t:t}=Fi(),[r,n]=(0,je.useState)([]),[i,o]=(0,je.useState)(Qa.getCurrentWebcam()),s=r.length&&r.every((e=>""===e.deviceId)),c=(0,je.useMemo)((()=>Object.keys($a).map((e=>{switch($a[e].height.ideal){case 240:return{name:t("videoMenu.lowDef"),key:e};case 480:return{name:t("videoMenu.standardDef"),key:e};case 720:return{name:t("videoMenu.highDef"),key:e};default:return{name:"",key:e}}})).filter((e=>""!==e.name))),[t]),l=async()=>{const e=await Qa.listVideoDevices();n(e)},d=e=>{o({...e.detail.camera})};return(0,je.useEffect)((()=>(l(),Qa.addEventListener("devicesListChange",l),Qa.addEventListener("localVideoChange",d),Qa.addEventListener("localVideoAvailable",d),()=>{Qa.removeEventListener("devicesListChange",l),Qa.removeEventListener("localVideoChange",d),Qa.removeEventListener("localVideoAvailable",d)})),[]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(Dp,{children:[(0,a.jsx)(Ip,{children:t("videoMenu.title")}),(0,a.jsx)(Ap,{onClick:e,children:(0,a.jsx)(Rp,{direction:"left"})})]}),(0,a.jsx)(Lp,{children:s?(0,a.jsx)(Np,{children:(0,a.jsxs)(Hp,{children:[(0,a.jsx)(qp,{children:t("videoMenu.blockedCamera")}),(0,a.jsx)(Wp,{children:t("videoMenu.cameraPermissions")})]})}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(Np,{children:[(0,a.jsx)(Fp,{children:t("misc.camera")}),r.map((e=>{const r=e.deviceId===i.device?.deviceId;return(0,a.jsxs)(zp,{onClick:()=>(async e=>{i.device?.deviceId!==e.deviceId&&(i.device?await Qa.switchWebcam({device:e}):await Qa.enableVideo({device:e,resolution:i.resolution}),Ir(t("notifications.connectedTo",{name:e.label}),{duration:3e3,icon:(0,a.jsx)(qs,{}),messageStyle:{fontWeight:600}}))})(e),children:[(0,a.jsx)(Up,{children:e.label}),(0,a.jsx)("span",{children:r&&(0,a.jsx)(Op,{})})]},e.deviceId)}))]}),(0,a.jsxs)(Np,{children:[(0,a.jsx)(Fp,{children:t("videoMenu.sendResolution")}),c.map((e=>{const t=e.key===i.resolution;return(0,a.jsxs)(zp,{onClick:()=>(async e=>{i.resolution!==e.key&&(await Qa.setWebcamResolution(e.key),Ir(e.name,{duration:3e3}))})(e),children:[(0,a.jsx)(Up,{children:e.name}),(0,a.jsx)("span",{children:t&&(0,a.jsx)(Op,{})})]},e.key)}))]})]})})]})};var Qp=()=>{const{t:e}=Fi(),[t,r]=(0,je.useState)("base"),n=(0,je.useRef)(null),{isSettingsMenuVisible:i,setIsSettingsMenuVisible:o,language:s,options:c}=(0,je.useContext)(Ya),l=()=>r("base"),d=(0,je.useCallback)((e=>{!n?.current?.contains(e.target)&&document.body.contains(e.target)&&(o(!1),r("base"))}),[o]);return(0,je.useEffect)((()=>{i?window.addEventListener("click",d):window.removeEventListener("click",d)}),[i,o,d]),(0,a.jsxs)(Mp,{ref:n,open:i,children:["base"===t&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(Dp,{children:[(0,a.jsx)(Ip,{children:e("settings.title")}),(0,a.jsx)(Ap,{onClick:()=>o(!1),children:(0,a.jsx)(Uc,{})})]}),(0,a.jsxs)(Lp,{children:[(0,a.jsxs)(Np,{children:[(0,a.jsx)(Fp,{children:e("settings.preferences")}),(0,a.jsxs)(zp,{onClick:()=>r("languages"),children:[(0,a.jsx)("span",{children:e("settings.language")}),(0,a.jsxs)(Vp,{children:[xi[s]?.name,(0,a.jsx)(Rp,{direction:"right"})]})]})]}),(0,a.jsxs)(Np,{children:[(0,a.jsx)(Fp,{children:e("settings.devices")}),Qa.isListDevicesSupported()&&(0,a.jsxs)(zp,{onClick:()=>r("audio"),children:[(0,a.jsxs)("span",{children:[(0,a.jsx)(Bp,{children:(0,a.jsx)(Tp,{})}),e("audioMenu.title")]}),(0,a.jsx)(Vp,{children:(0,a.jsx)(Rp,{direction:"right"})})]}),!c.audioTiles&&(0,a.jsxs)(zp,{onClick:()=>r("video"),children:[(0,a.jsxs)("span",{children:[(0,a.jsx)(Bp,{children:(0,a.jsx)(qs,{})}),e("videoMenu.title")]}),(0,a.jsx)(Vp,{children:(0,a.jsx)(Rp,{direction:"right"})})]})]}),(0,a.jsxs)(Np,{children:[(0,a.jsx)(Fp,{children:e("settings.help")}),(0,a.jsxs)(zp,{onClick:()=>{window.open("https://support.snapcall.io/hc/","_blank")},children:[(0,a.jsx)("span",{children:e("settings.helpCenter")}),(0,a.jsx)(Pp,{})]})]})]})]}),"languages"===t&&(0,a.jsx)(Kp,{back:l}),"audio"===t&&(0,a.jsx)(Gp,{back:l}),"video"===t&&(0,a.jsx)(Zp,{back:l})]})};je=o("85Hg2");var Yp=()=>(0,a.jsx)("svg",{width:"21",height:"20",viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M11.091 6.908a.833.833 0 0 0-.275-.175.833.833 0 0 0-.633 0 .833.833 0 0 0-.275.175l-2.5 2.5a.837.837 0 1 0 1.183 1.184l1.075-1.084V12.5a.833.833 0 1 0 1.667 0V9.508l1.075 1.084a.833.833 0 0 0 1.183 0 .833.833 0 0 0 0-1.184l-2.5-2.5Zm-.592-5.242a8.333 8.333 0 1 0 0 16.667 8.333 8.333 0 0 0 0-16.666Zm0 15a6.667 6.667 0 1 1 0-13.334 6.667 6.667 0 0 1 0 13.334Z",fill:"#fff"})});const Jp=e=>e?"215px":"227px",Xp=yr.div`
1550
+ `,Sh=Object.keys(xi);var _h=({back:e})=>{const{t:t}=Fi(),{language:r,setLanguage:n}=(0,je.useContext)(Ya);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(dh,{children:[(0,a.jsx)(uh,{children:t("settings.language")}),(0,a.jsx)(ph,{onClick:e,children:(0,a.jsx)(ih,{direction:"left"})})]}),(0,a.jsx)(lh,{children:(0,a.jsxs)(hh,{children:[(0,a.jsx)(fh,{children:t("settings.language")}),Sh.map((e=>{const t=r===e;return(0,a.jsxs)(mh,{onClick:()=>{n(e)},children:[(0,a.jsx)(vh,{children:xi[e].name}),(0,a.jsx)("span",{children:t&&(0,a.jsx)(sh,{})})]},e)}))]})})]})};je=o("85Hg2");var kh=({back:e})=>{const{t:t}=Fi(),[r,n]=(0,je.useState)([]),[i,o]=(0,je.useState)(Qa.getCurrentMicrophoneId()),[s,c]=(0,je.useState)(Qa.getCurrentSpeakerId()),l=r.filter((e=>"audioinput"===e.kind)),d=r.filter((e=>"audiooutput"===e.kind)),u=l.length&&r.every((e=>""===e.deviceId)),p="setSinkId"in HTMLAudioElement.prototype,h=async()=>{const e=await Qa.listAudioDevices();n(e)};return(0,je.useEffect)((()=>(h(),Qa.addEventListener("devicesListChange",h),()=>Qa.removeEventListener("devicesListChange",h))),[]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(dh,{children:[(0,a.jsx)(uh,{children:t("audioMenu.title")}),(0,a.jsx)(ph,{onClick:e,children:(0,a.jsx)(ih,{direction:"left"})})]}),(0,a.jsx)(lh,{children:u?(0,a.jsx)(hh,{children:(0,a.jsxs)(bh,{children:[(0,a.jsx)(wh,{children:t("audioMenu.blockedMicrophone")}),(0,a.jsx)(xh,{children:t("audioMenu.microphonePermissions")})]})}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(hh,{children:[(0,a.jsx)(fh,{children:t("misc.microphone")}),l.map((e=>{const r=e.deviceId===i;return(0,a.jsxs)(mh,{onClick:()=>(async e=>{i!==e.deviceId&&(await Qa.switchMicrophone(e.deviceId),o(e.deviceId),Ir(t("notifications.connectedTo",{name:e.label}),{duration:3e3,icon:(0,a.jsx)(Mc,{}),messageStyle:{fontWeight:600}}))})(e),children:[(0,a.jsx)(vh,{children:e.label}),(0,a.jsx)("span",{children:r&&(0,a.jsx)(sh,{})})]},e.deviceId)}))]}),p&&(0,a.jsxs)(hh,{children:[(0,a.jsx)(fh,{children:t("misc.speaker")}),d.map((e=>{const r=e.deviceId===s;return(0,a.jsxs)(mh,{onClick:()=>(e=>{s!==e.deviceId&&(Qa.setAudioSink(e.deviceId),c(e.deviceId),Ir(t("notifications.connectedTo",{name:e.label}),{duration:3e3,icon:(0,a.jsx)(oh,{}),messageStyle:{fontWeight:600}}))})(e),children:[(0,a.jsx)(vh,{children:e.label}),(0,a.jsx)("span",{children:r&&(0,a.jsx)(sh,{})})]},e.deviceId)}))]})]})})]})};je=o("85Hg2");var Ch=({back:e})=>{const{t:t}=Fi(),[r,n]=(0,je.useState)([]),[i,o]=(0,je.useState)(Qa.getCurrentWebcam()),s=r.length&&r.every((e=>""===e.deviceId)),c=(0,je.useMemo)((()=>Object.keys($a).map((e=>{switch($a[e].height.ideal){case 240:return{name:t("videoMenu.lowDef"),key:e};case 480:return{name:t("videoMenu.standardDef"),key:e};case 720:return{name:t("videoMenu.highDef"),key:e};default:return{name:"",key:e}}})).filter((e=>""!==e.name))),[t]),l=async()=>{const e=await Qa.listVideoDevices();n(e)},d=e=>{o({...e.detail.camera})};return(0,je.useEffect)((()=>(l(),Qa.addEventListener("devicesListChange",l),Qa.addEventListener("localVideoChange",d),Qa.addEventListener("localVideoAvailable",d),()=>{Qa.removeEventListener("devicesListChange",l),Qa.removeEventListener("localVideoChange",d),Qa.removeEventListener("localVideoAvailable",d)})),[]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(dh,{children:[(0,a.jsx)(uh,{children:t("videoMenu.title")}),(0,a.jsx)(ph,{onClick:e,children:(0,a.jsx)(ih,{direction:"left"})})]}),(0,a.jsx)(lh,{children:s?(0,a.jsx)(hh,{children:(0,a.jsxs)(bh,{children:[(0,a.jsx)(wh,{children:t("videoMenu.blockedCamera")}),(0,a.jsx)(xh,{children:t("videoMenu.cameraPermissions")})]})}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(hh,{children:[(0,a.jsx)(fh,{children:t("misc.camera")}),r.map((e=>{const r=e.deviceId===i.device?.deviceId;return(0,a.jsxs)(mh,{onClick:()=>(async e=>{i.device?.deviceId!==e.deviceId&&(i.device?await Qa.switchWebcam({device:e}):await Qa.enableVideo({device:e,resolution:i.resolution}),Ir(t("notifications.connectedTo",{name:e.label}),{duration:3e3,icon:(0,a.jsx)(Lc,{}),messageStyle:{fontWeight:600}}))})(e),children:[(0,a.jsx)(vh,{children:e.label}),(0,a.jsx)("span",{children:r&&(0,a.jsx)(sh,{})})]},e.deviceId)}))]}),(0,a.jsxs)(hh,{children:[(0,a.jsx)(fh,{children:t("videoMenu.sendResolution")}),c.map((e=>{const t=e.key===i.resolution;return(0,a.jsxs)(mh,{onClick:()=>(async e=>{i.resolution!==e.key&&(await Qa.setWebcamResolution(e.key),Ir(e.name,{duration:3e3}))})(e),children:[(0,a.jsx)(vh,{children:e.name}),(0,a.jsx)("span",{children:t&&(0,a.jsx)(sh,{})})]},e.key)}))]})]})})]})};var Eh=()=>{const{t:e}=Fi(),[t,r]=(0,je.useState)("base"),n=(0,je.useRef)(null),{isSettingsMenuVisible:i,setIsSettingsMenuVisible:o,language:s,options:c}=(0,je.useContext)(Ya),l=()=>r("base"),d=(0,je.useCallback)((e=>{!n?.current?.contains(e.target)&&document.body.contains(e.target)&&(o(!1),r("base"))}),[o]);return(0,je.useEffect)((()=>{i?window.addEventListener("click",d):window.removeEventListener("click",d)}),[i,o,d]),(0,a.jsxs)(ch,{ref:n,open:i,children:["base"===t&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(dh,{children:[(0,a.jsx)(uh,{children:e("settings.title")}),(0,a.jsx)(ph,{onClick:()=>o(!1),children:(0,a.jsx)(Us,{})})]}),(0,a.jsxs)(lh,{children:[(0,a.jsxs)(hh,{children:[(0,a.jsx)(fh,{children:e("settings.preferences")}),(0,a.jsxs)(mh,{onClick:()=>r("languages"),children:[(0,a.jsx)("span",{children:e("settings.language")}),(0,a.jsxs)(yh,{children:[xi[s]?.name,(0,a.jsx)(ih,{direction:"right"})]})]})]}),(0,a.jsxs)(hh,{children:[(0,a.jsx)(fh,{children:e("settings.devices")}),Qa.isListDevicesSupported()&&(0,a.jsxs)(mh,{onClick:()=>r("audio"),children:[(0,a.jsxs)("span",{children:[(0,a.jsx)(gh,{children:(0,a.jsx)(oh,{})}),e("audioMenu.title")]}),(0,a.jsx)(yh,{children:(0,a.jsx)(ih,{direction:"right"})})]}),!c.audioTiles&&(0,a.jsxs)(mh,{onClick:()=>r("video"),children:[(0,a.jsxs)("span",{children:[(0,a.jsx)(gh,{children:(0,a.jsx)(Lc,{})}),e("videoMenu.title")]}),(0,a.jsx)(yh,{children:(0,a.jsx)(ih,{direction:"right"})})]})]}),(0,a.jsxs)(hh,{children:[(0,a.jsx)(fh,{children:e("settings.help")}),(0,a.jsxs)(mh,{onClick:()=>{window.open("https://support.snapcall.io/hc/","_blank")},children:[(0,a.jsx)("span",{children:e("settings.helpCenter")}),(0,a.jsx)(nh,{})]})]})]})]}),"languages"===t&&(0,a.jsx)(_h,{back:l}),"audio"===t&&(0,a.jsx)(kh,{back:l}),"video"===t&&(0,a.jsx)(Ch,{back:l})]})};je=o("85Hg2");const Ph=e=>e?"215px":"227px",Rh=yr.div`
1431
1551
  position: absolute;
1432
1552
  width: 100%;
1433
- bottom: ${e=>e.open?0:`-${Jp(e.desktop)}`};
1553
+ bottom: ${e=>e.open?0:`-${Ph(e.desktop)}`};
1434
1554
  transition: all 0.4s;
1435
1555
 
1436
1556
  ${e=>{if(e.desktop)return Xt`
1437
- bottom: ${e.open?0:`calc(-${Jp(e.desktop)} - (100vh / 2))`};
1557
+ bottom: ${e.open?0:`calc(-${Ph(e.desktop)} - (100vh / 2))`};
1438
1558
  height: 100%;
1439
1559
  display: flex;
1440
1560
  justify-content: center;
1441
1561
  align-items: center;
1442
1562
  `}}
1443
- `,eh=yr.div`
1563
+ `,Th=yr.div`
1444
1564
  display: flex;
1445
1565
  flex-direction: column;
1446
1566
  width: ${e=>e.desktop?"375px":"100%"};
1447
- height: ${({desktop:e})=>Jp(e)};
1567
+ height: ${({desktop:e})=>Ph(e)};
1448
1568
  max-height: 100vh;
1449
1569
  background-color: ${e=>e.theme.popupBackgroundPrimaryColor};
1450
1570
  color: ${e=>e.theme.popupTitleColor};
1451
1571
  border-radius: ${e=>e.desktop?"20px":"20px 20px 0 0"};
1452
1572
  padding: ${({desktop:e})=>e?"16px 14px":"16px 14px 28px"};
1453
1573
  box-sizing: border-box;
1454
- `,th=yr.div`
1574
+ `,jh=yr.div`
1455
1575
  display: flex;
1456
1576
  justify-content: space-between;
1457
1577
  align-items: center;
1458
1578
  margin-bottom: 30px;
1459
- `,rh=yr.div`
1579
+ `,Oh=yr.div`
1460
1580
  display: flex;
1461
1581
  align-items: center;
1462
1582
 
@@ -1470,7 +1590,7 @@ to {
1470
1590
  width: 20px;
1471
1591
  height: 21px;
1472
1592
  }
1473
- `,nh=yr.button`
1593
+ `,Mh=yr.button`
1474
1594
  display: flex;
1475
1595
  justify-content: center;
1476
1596
  align-items: center;
@@ -1489,10 +1609,10 @@ to {
1489
1609
  fill: #000;
1490
1610
  }
1491
1611
  }
1492
- `,ih=yr.form`
1612
+ `,Lh=yr.form`
1493
1613
  display: flex;
1494
1614
  flex-direction: column;
1495
- `,oh=yr.div`
1615
+ `,Dh=yr.div`
1496
1616
  display: flex;
1497
1617
  flex-direction: column;
1498
1618
  position: relative;
@@ -1517,7 +1637,7 @@ to {
1517
1637
  border: 1px solid ${({theme:e})=>e.primaryColor};
1518
1638
  }
1519
1639
  }
1520
- `,ah=yr.span`
1640
+ `,Ih=yr.span`
1521
1641
  position: absolute;
1522
1642
  left: 0;
1523
1643
  bottom: -20px;
@@ -1526,7 +1646,7 @@ to {
1526
1646
  font-weight: 700;
1527
1647
  line-height: 10px;
1528
1648
  margin-top: 10px;
1529
- `,sh=yr.button`
1649
+ `,Ah=yr.button`
1530
1650
  background-color: ${({theme:e})=>e.primaryColor};
1531
1651
  padding: 8px 18px;
1532
1652
  width: 100%;
@@ -1546,156 +1666,36 @@ to {
1546
1666
  alig-items: center;
1547
1667
  justify-content: center;
1548
1668
  }
1549
- `,ch=/.*(?:youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=)([^#&?]*).*/;var lh=()=>{const{t:e}=Fi(),t=(0,je.useContext)(dr),r=(0,je.useRef)(null),[n,i]=(0,je.useState)(""),[o,s]=(0,je.useState)(null),{isYoutubePopupVisible:c,setIsYoutubePopupVisible:l,selfPeerId:d,orientation:u}=(0,je.useContext)(Ya),{dispatch:p}=is(),f="landscape"===u;bs(r,(()=>{c&&l(!1)}));return(0,je.useEffect)((()=>{i(""),s(null)}),[c]),(0,a.jsx)(Xp,{open:c,desktop:f,children:(0,a.jsxs)(eh,{ref:r,desktop:f,children:[(0,a.jsxs)(th,{children:[(0,a.jsxs)(rh,{children:[(0,a.jsx)($l,{color:t.popupTitleColor}),(0,a.jsx)("h4",{children:e("youtube.title")})]}),(0,a.jsx)(nh,{onClick:()=>l(!1),children:(0,a.jsx)(Uc,{})})]}),(0,a.jsxs)(ih,{onSubmit:t=>{t.preventDefault(),s(null),h.event("youtubeShare");const[,r]=n.match(ch)||[];r?(p({type:Ja.SET_HIGHLIGHTED_TILE,payload:{type:"youtube",peerId:String(d),isGlobal:!0,data:{videoId:r}}}),l(!1)):s(e("youtube.invalid"))},children:[(0,a.jsxs)(oh,{errored:Boolean(o),children:[(0,a.jsx)("input",{id:"youtube-popup-input",placeholder:"https://www.youtube.com/watch?v=abcdef",value:n,onChange:e=>i(e.target.value),"data-lpignore":!0,autoComplete:"off","data-form-type":"other"}),o&&(0,a.jsx)(ah,{children:o})]}),(0,a.jsx)(sh,{type:"submit",children:(0,a.jsxs)("span",{children:[(0,a.jsx)(Yp,{}),e("youtube.share")]})})]})]})})};je=o("85Hg2");const dh=()=>(0,a.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M20.437 7.104a3.825 3.825 0 0 0-.573-.523 4.727 4.727 0 0 0-1.158-3.74C17.622 1.619 15.775 1 13.214 1H7a1.892 1.892 0 0 0-1.863 1.592l-2.59 16.406a1.533 1.533 0 0 0 1.516 1.785h2.664l-.082.52A1.467 1.467 0 0 0 8.093 23h3.235a1.762 1.762 0 0 0 1.75-1.47l.641-4.031.01-.055h.3c4.032 0 6.55-1.993 7.285-5.762a5.15 5.15 0 0 0-.877-4.578Zm-12.595 6.6-.714 4.535-.087.544H4.606L7.097 3h6.117c1.936 0 3.318.404 3.992 1.164a2.966 2.966 0 0 1 .608 2.733l-.018.113c-.012.076-.023.15-.044.246a5.847 5.847 0 0 1-2.005 3.67 6.678 6.678 0 0 1-4.217 1.183H9.706a1.88 1.88 0 0 0-1.864 1.595ZM19.351 11.3c-.55 2.828-2.242 4.145-5.322 4.145h-.484a1.762 1.762 0 0 0-1.75 1.473l-.65 4.074L8.717 21l.478-3.034.611-3.853h1.72c.156 0 .295-.023.448-.029.359-.012.716-.026 1.053-.067.205-.026.393-.073.59-.11.272-.05.545-.1.8-.17.191-.053.369-.122.55-.186a7.68 7.68 0 0 0 .698-.279c.168-.079.328-.167.486-.257a6.745 6.745 0 0 0 1.027-.713 6.56 6.56 0 0 0 .537-.519c.113-.12.23-.237.334-.367.173-.221.334-.452.48-.693.076-.122.161-.235.231-.363.203-.371.377-.757.521-1.154.009-.024.021-.044.03-.068.004-.01.01-.02.014-.032.198.717.207 1.472.026 2.193Z",fill:"#fff"})}),uh=()=>(0,a.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:[(0,a.jsx)("rect",{width:"14",height:"14",rx:"7",fill:"#fff"}),(0,a.jsx)("rect",{width:"14",height:"14",rx:"7",fill:"url(#paypalPattern)"}),(0,a.jsxs)("defs",{children:[(0,a.jsx)("pattern",{id:"paypalPattern",patternContentUnits:"objectBoundingBox",width:"1",height:"1",children:(0,a.jsx)("use",{xlinkHref:"#paypalImage",transform:"matrix(.00308 0 0 .00308 .154 .154)"})}),(0,a.jsx)("image",{id:"paypalImage",width:"225",height:"225",xlinkHref:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOEAAADhCAIAAACx0UUtAAAMbWlDQ1BJQ0MgUHJvZmlsZQAASImVVwdYU8kWnltSSWgBBKSE3gSRGkBKCC2A9CLYCEkgocSYEFTsZVHBtYsI2NBVEcW2AmLHriyKvS8WVJR1URcbKm9CArruK9+b75s7/z1z5j/lztx7DwBaH3hSaR6qDUC+pECWEB7MHJ2WziQ9BRggAACcAJnHl0vZcXHR8A4MjH9v724ARDledVZy/XP+vzZdgVDOBwAZC3GmQM7Ph/g4AHgVXyorAIColFtNLpAq8WyI9WTQQYhXKXG2Cm9X4kwVPtyvk5TAgfgyAGQajyfLBkDzHpQzC/nZkEfzM8SuEoFYAoDWMIgD+CKeAGKl78Py8ycqcTnE9lBfCjH0B7Ayv+PM/ht/5iA/j5c9iFVx9TdyiFguzeNN/T9T879bfp5iwIYt7DSRLCJBGT/M4a3ciVFKTIO4S5IZE6vMNcQfxAJV3gFAqSJFRLJKHzXhyzkwf8AAYlcBLyQKYhOIwyR5MdFqeWaWOIwLMdwt6BRxATcJYkOIFwrloYlqnY2yiQlqW2h9lozDVsvP8WT9dpW2Hihyk9lq/jciIVfNj2kWiZJSIaZCbF0oTomBWBNiF3luYpRaZ2SRiBMzoCNTJCj9t4Y4QSgJD1bxY4VZsrAEtX5JvnwgXmyjSMyNUeN9BaKkCFV+sFN8Xr//MBbsslDCTh7gEcpHRw/EIhCGhKpix54LJcmJap4P0oLgBNVanCrNi1Pr45bCvHCl3BJiD3lhonotnlIAN6eKH8+SFsQlqfzEi3J4kXEqf/BlIBpwQAhgAgXsmWAiyAHi1q6GLninmgkDPCAD2UAInNWSgRWp/TMSeE0EReAPiIRAPrguuH9WCAqh/MugVHV1Bln9s4X9K3LBU4jzQRTIg/eK/lWSQWsp4AmUiP9hnQc7H/qbB7ty/t/LB6TfJGwoiVZLFAMWmVoDmsRQYggxghhGdMCN8QDcD4+G1yDY3XAW7jMQxzd9wlNCG+ER4TqhnXB7gniu7AcvR4F2yB+mzkXm97nAbSGnJx6M+0N2yIwb4MbAGfeAdth4ILTsCaUctd/KrDB/4P5bBN89DbUexZWCUoZQgij2P67UdNT0HGRR5vr7/Kh8zRzMN2dw5kf7nO+yL4Bj1I+a2EJsP3YWO4Gdxw5jDYCJHcMasRbsiBIP7q4n/btrwFpCvz+5kEf8D3s8tU1lJuWuta6drp9VcwXCKQXKg8eZKJ0qE2eLCphs+HUQMrkSvsswppurmxsAym+N6vX1Nr7/G4IYtHyTzfsdAP9jfX19h77JIo8BsNcbHv+D32T2LAB0NAA4d5CvkBWqZLjyQoBvCS140oyAGbAC9jAeN+AF/EAQCAWRIBYkgTQwHmZZBPe5DEwG08EcUAxKwTKwGlSADWAz2A52gX2gARwGJ8AZcBFcBtfBXbh7OsBL0A3egV4EQUgIHWEgRog5YoM4IW4ICwlAQpFoJAFJQzKQbESCKJDpyDykFFmBVCCbkBpkL3IQOYGcR9qQ28hDpBN5g3xCMZSG6qGmqC06HGWhbDQKTULHodnoJLQInY8uQcvRanQnWo+eQC+i19F29CXagwFMAzPALDBnjIVxsFgsHcvCZNhMrAQrw6qxOqwJPuerWDvWhX3EiTgDZ+LOcAdH4Mk4H5+Ez8QX4xX4drweP4VfxR/i3fhXAp1gQnAi+BK4hNGEbMJkQjGhjLCVcIBwGp6lDsI7IpFoQLQjesOzmEbMIU4jLiauI+4mHie2ER8Te0gkkhHJieRPiiXxSAWkYtJa0k7SMdIVUgfpA1mDbE52I4eR08kS8lxyGXkH+Sj5CvkZuZeiTbGh+FJiKQLKVMpSyhZKE+USpYPSS9Wh2lH9qUnUHOocajm1jnqaeo/6VkNDw1LDRyNeQ6wxW6NcY4/GOY2HGh9pujRHGoc2lqagLaFtox2n3aa9pdPptvQgejq9gL6EXkM/SX9A/6DJ0HTR5GoKNGdpVmrWa17RfKVF0bLRYmuN1yrSKtPar3VJq0ubom2rzdHmac/UrtQ+qH1Tu0eHoTNCJ1YnX2exzg6d8zrPdUm6trqhugLd+bqbdU/qPmZgDCsGh8FnzGNsYZxmdOgR9ez0uHo5eqV6u/Ra9br1dfU99FP0p+hX6h/RbzfADGwNuAZ5BksN9hncMPg0xHQIe4hwyKIhdUOuDHlvONQwyFBoWGK42/C64ScjplGoUa7RcqMGo/vGuLGjcbzxZOP1xqeNu4bqDfUbyh9aMnTf0DsmqImjSYLJNJPNJi0mPaZmpuGmUtO1pidNu8wMzILMcsxWmR016zRnmAeYi81XmR8zf8HUZ7KZecxy5ilmt4WJRYSFwmKTRatFr6WdZbLlXMvdlvetqFYsqyyrVVbNVt3W5tajrKdb11rfsaHYsGxENmtsztq8t7WzTbVdYNtg+9zO0I5rV2RXa3fPnm4faD/Jvtr+mgPRgeWQ67DO4bIj6ujpKHKsdLzkhDp5OYmd1jm1DSMM8xkmGVY97KYzzZntXOhc6/zQxcAl2mWuS4PLq+HWw9OHLx9+dvhXV0/XPNctrndH6I6IHDF3RNOIN26Obny3Srdr7nT3MPdZ7o3urz2cPIQe6z1ueTI8R3ku8Gz2/OLl7SXzqvPq9Lb2zvCu8r7J0mPFsRazzvkQfIJ9Zvkc9vno6+Vb4LvP908/Z79cvx1+z0fajRSO3DLysb+lP89/k397ADMgI2BjQHugRSAvsDrwUZBVkCBoa9AztgM7h72T/SrYNVgWfCD4PceXM4NzPAQLCQ8pCWkN1Q1NDq0IfRBmGZYdVhvWHe4ZPi38eAQhIipiecRNrimXz63hdkd6R86IPBVFi0qMqoh6FO0YLYtuGoWOihy1ctS9GJsYSUxDLIjlxq6MvR9nFzcp7lA8MT4uvjL+acKIhOkJZxMZiRMSdyS+SwpOWpp0N9k+WZHcnKKVMjalJuV9akjqitT20cNHzxh9Mc04TZzWmE5KT0nfmt4zJnTM6jEdYz3HFo+9Mc5u3JRx58cbj88bf2SC1gTehP0ZhIzUjB0Zn3mxvGpeTyY3syqzm8/hr+G/FAQJVgk6hf7CFcJnWf5ZK7KeZ/tnr8zuFAWKykRdYo64Qvw6JyJnQ8773Njcbbl9eal5u/PJ+Rn5ByW6klzJqYlmE6dMbJM6SYul7ZN8J62e1C2Lkm2VI/Jx8sYCPfhT36KwV/ykeFgYUFhZ+GFyyuT9U3SmSKa0THWcumjqs6Kwol+m4dP405qnW0yfM/3hDPaMTTORmZkzm2dZzZo/q2N2+Oztc6hzcuf8Ntd17oq5f81Lndc033T+7PmPfwr/qbZYs1hWfHOB34INC/GF4oWti9wXrV30tURQcqHUtbSs9PNi/uILP4/4ufznviVZS1qXei1dv4y4TLLsxvLA5dtX6KwoWvF45aiV9auYq0pW/bV6wurzZR5lG9ZQ1yjWtJdHlzeutV67bO3nClHF9crgyt1VJlWLqt6vE6y7sj5ofd0G0w2lGz5tFG+8tSl8U321bXXZZuLmws1Pt6RsOfsL65earcZbS7d+2SbZ1r49YfupGu+amh0mO5bWorWK2s6dY3de3hWyq7HOuW7TboPdpXvAHsWeF3sz9t7YF7WveT9rf92vNr9WHWAcKKlH6qfWdzeIGtob0xrbDkYebG7yazpwyOXQtsMWhyuP6B9ZepR6dP7RvmNFx3qOS493ncg+8bh5QvPdk6NPXjsVf6r1dNTpc2fCzpw8yz577Jz/ucPnfc8fvMC60HDR62J9i2fLgd88fzvQ6tVaf8n7UuNln8tNbSPbjl4JvHLiasjVM9e41y5ej7nediP5xq2bY2+23xLcen477/brO4V3eu/Ovke4V3Jf+37ZA5MH1b87/L673av9yMOQhy2PEh/dfcx//PKJ/MnnjvlP6U/Lnpk/q3nu9vxwZ1jn5RdjXnS8lL7s7Sr+Q+ePqlf2r379M+jPlu7R3R2vZa/73ix+a/R2218efzX3xPU8eJf/rvd9yQejD9s/sj6e/ZT66Vnv5M+kz+VfHL40fY36eq8vv69PypPx+n8FMNjRrCwA3mwDgJ4GAAPWbdQxqlqwvyGq+rUfgf+EVfVif/MCoA7+v8d3wb+bmwDs2QLLL8ivBWvVODoAST4AdXcf7Oomz3J3U3HRYJ1CeNDX9xbWbKSVAHxZ1tfXW93X92UzdBbWjsclqhpU2YiwZtjI/ZKZnwn+TVPVp9/F+OMIlB54gB/HfwF8vpCkG+BeJwAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAA4aADAAQAAAABAAAA4QAAAAA7V+T9AAAZtUlEQVR4Ae1daWxc13V+nOEs5HC4itRIpEiKkihqsTZLil27sCylChRbqVLbdeCidpymTmsbTdI2sV0YdZu2RpMaNeqiAdo0AequSX+kgFsUduHaTqTKWixZCzeJpCiSomlKFCmS4j7DfqMnPb7Z33rPe+R5IMC33PXcb+6959zvnps3Pz8vOeBqbe/rvXKNvCBjYxOCyxAOF8o5+nz54VAA96FQQUlxYWlpEe4LC/yCy+PA7PIdUqY3//WDn7x1JuDz0JbH48kTWYBYLKGDmIvGH6O3Xk7NRMvC/pVV4fKy0Irl4frayoqKcPXKZZGq0qrKkorysMhy0uaV55B+9LGnXr90edDn424jGQ/TM1H51cxsFJieno1VlRfUrCytWVGysWnV9i31q+sjixuyjsDo0PWxX/z8n5WE4yMdX1okMDs7E5v3yqgNBvIjVeHPPbjxvnuadu5YpyW6u8I4AqMnT1184mt/X1EadJfsnFNaQHZqRpqZjaFID+1b/4WHdn9mZ+Oimcs6Yj768bluP/VM1DmAM1ASzJF8vtvxPjja9V/vtuMHf3D/XV/8wj0b1tcYSNBRURzRj37zxR9BsgG/11GicXthMJGdmp67f/fqZ76819VzAEdgdMcDLzNAbfpJAKnjE7M7Nq985cVHXNqnEtt60DD9n1y/MT5jUwtxsvjxY9y/0HX1s4++/tIf/TPUU9fJhB6j51t7yM2irms2vQUGUmsjRW+9c/7hx197538/1hudNjw9RlvbegVbzmklTph7OBQ3P//2t/7lxVf+ibAYerOmx+jhYx1BttzrbTcT4bEE8J//07z/0KuYZZlIRlxUYoxOTM50dg/x8pK4Br+VEzrUa8MT+x/5C1imBWdtIDtijF7uGYR9xEC5OYpJCWCGCqQ++ewP3/v5eZNJ2R2dGKMtbT1215DTzyIBrD9/9RtvOlyLIsboydOXsNycRYj8yW4JYHoKLcrJvSkxRjsuDXrybvN67G4MTj+TBADTr/3uP4LCmykA7XtKjMKezAoTbfMruReHPF95/gfOtPBTYvRS9wCW6RQx8Q2hBGBawarpc7/3I8IyZMqaEqOnzzLdKVO7ELyHpn+29ZO/+v5bBHlnzZISoy1tvX4fc52yto/Yj1Dz3/jhz502MSXDKKz3zW0D+O2KbQXOLYcEysLer7/wZo5AYj+TYXRkZLyzd0RsZTm33BLAxLRvYNRRIz4ZRpnulBsvRCEw4v/Dj485ZzWfDKNMdyJCoNZs//pv/1trUJvDkWH07fdamO5kc+MaTx56AtwdOER5IsPomTbeTW8cQwJilhT54ZhDQEY5s6DBKH6gQdboczYOaQC5K3XCrJSGzwG6E+H+EOxGn5tbuutbHk/c3ufx3O6espB3CwLef//pka8/e5D0xyLRYPTEqS5CutPkxM3JSdG+x2ibWWPuXq/X7497i/H5/fn5PigMUPCXKEbPtlzRKDU7gs3MTNuR7CJIMxqNyr9e5TccvTn13E8vbNvaWFMgrSmSIkGp+I6zCWH1JehHMcUZGBwjXGFCSwiTr9szms/Laz52enJN48RQvCpBj1QTlHaWShuLpUZRrvtIMDoEuhMVRqenp9yOG5Hlzy8MDH10qv6xx4FO+eqbkjr64RYhjtfNYWlfpbS9zN4SEWCUlu40PTVpr0QXXeqjnVemPh0ILo8oNVPwevKGhD9c+yqkz0Wk2tvufpWA1tzc+XVYk5qmVGjpTjwZ1dRIiYGunjntSTcNBVjlv3eHpG83S69dkD4eToxpxZPofhR0p/bOq1QDPSTGk1HdsMn3TnR1ZY8l96xyt7q2UHqy1srZquh+FHSnjm4y1wOwjGaXNX9NlYA34Bs90x7TYFCW+9SOCekP2+J96qiGKKnZpb4RjVHQnfK9Qn3Oq+u8lE33ajnovR++9EneTa3OzGSkok/9nbPSaSuGftEYpaU7zc5wP6oXn/HwvnDgWnNr2ilppuTk0f+7HfEO1eQlGqNHT3QR7g9hhckYXGAlnbv2qYG4QCo61G+ckXpMrOuJxuip8/2sMBlobNooeV7PSE+PZGiOBpiOzMW1/gtaJwvJdRWKUdCd5MOHkksh5JkVJsNihtr06YenDUdHRCAVipSx6alQjNLSnVhhMgOyqb5hKeHAM92JAaaYnhqAqVCM0np3YoVJN6zUEfI98yNGR+s76cgw1WvnF4rR949cIJyMssJ0ByoG/0+O3zQYUxUNMP3zDn0qlDiMwpfQjTEyUhwmo7zCpIKK7luYn+aGR3SZnzLlEZ+btuqw8IvDKLw7ZSq0gPexWPwMOL7MSGB6dNRMdHXcqZj0Pc12U3EYxWF2hGczMN1JDRHye3SlWDL9D21Md3EYPf4RW+/JseGgAgCm/9avyWgqCKOgO3X3DBEqTDwZdRA87xQFMP1+DkJVPKggjILu1D9o1nJxp2q6/7P1XrfIREUYmMk94gvCKOhO8snVouqekA9b7xPE4aQHecTPzuIThFHQnYoK0zG5hciLrfdCxGw8kx/3ZosrCKPNbdimRXax9d4S0QeKiy1JJykRdKXYapKFGCUCo1CYTp7pZYUpqW3c9Thr8/rLT/oyykMERnGYHeHp36wwZWx8nR/yy0q17BjRmWo8OLpS0EwzzUpFYJTpTgaazYFRItUL25ftKF6mWakIjLZf6Cf07sQKkzV4mouN2gkWdKVHMmx+sjPbO7J5651zhJNRVpjutIOp/77KIlPxNUTGIn5adqntGIXC1DMwrqGEtgRhupMlYo1Oz67a1mRJUtkTefdqmu+2Y7Sl9XIoKNrThFJRpjspojBzMx+N5Tc0mOTh5ywAhvvzY2k0J9sx2nbxit9ney6Z6s90p0yS0fU+b37eW2KLcTSpGBjuu1IGXdvR87Mj7bxZOakl3PhYVrtaTLFPpGhOtmP0XCtvVhbTuDbmAgN+eFW1TcZRdbkx3F9O8WtoL0bhDnfsJplrELbeq5vfzH3Z6hXzIUEuccF9TjLm24vR9o7+WMzcjlcTomW6kwnhLUSFUl+8db0lO5kWEs16N5DoxthejB79sI2t91mbww0f56KltbUiC9qZqDbZi9Hu3lte1EXWT5UXW+9VwjB+i8loyd27BExGlSL2JU5JbcQoNiuzwqTI3b03mIwWFIWElT9VbbIRo4NXbwxeT/xFCKuoJPHZDJYIG5PRsvoVeWWCFCa5zFCb1JeNGKWlO8VifMCNuqGN3s9FA9u32b3ClL1wNmKU6U7ZRe+Wr5Vbt4ucjMpiUZufbMTo4eOdnjyyzkw5qc0tUHBmOYuWlReuspc2mrbiavOTXRiNnx/SNZTlvNS0JbPqJVvvLZEkDmKsPfhLJAP9zbmFGtiFUdCdvB5Dfn8Xymb8julOxmWniine6qTKfOHWLowy3WlBxq69q9jWUFhDMNAnCcwujDLdKUnQrnvEQF+1dw9Vsa+qlkPtwuj7R7sI94ewdyfz2MJZIrX33S9eo08tuS0YBd2Jz2ZIlbWL3sB0X733nrxSoab7TPKxBaOgOwXouPdMd8rU2Drez0Wr9+zTEd7OoLZglOlOdjaZ7WnHyXhrqovvaiIc6CuDC9W0BaNnW7Q56F0ohpV3THcyK825aP2vPGI2EeviW49R0J0u911nhcm6NhKdErSlNb+wm7ATRYVDqq3E1mMUdCfa80NEN+niyg8mp3VffWKUbPnltjSD3gWxWo9R0J0Wkhd+xwqTSZF7Q8FV+w/QdqKoQqnKWa31GOXD7EyihDA6OtH1v/rLIrcuZapssa0Y7bg0yHSnTKJ3+HuwnCIP7CHvREHFV1+JT+ovhu6hMLVeHKSiOxkqMke6LQF0opEvHnCC3b5GZXhC4SzGKA6zIzybgfeHmPnBwSbqhJko3OnUFSTUw2KM4jA79u6UIGCXPEwN3Fj/5aedMBOFwCoDCVKzGKPNrb3s3SlBwG54wMJSw4M7irdQLiyp5VRXqH6yeqz/gOlOCeJ1zcO655+PkTk9SpbSmkR3vFb2o6A78dkMyfJ2/DNUpS3ffM4JqpIsqohfUhue8NJKjOIwO6Y7OR6TCQXEKL9q56bK+4hXPpUyQWGqSVSYLMYoDrNj706KuN1yEx/lZx1U2LUpLlGs7Efffq+F0HrPdCe9QIMuv+uVl5wzysvl35jiL9oyjMbPZrgyQmi95/0hujCKaWjjbzzqHF1eLjxWmCKJBny8twyjOMyO0NUob6jXBdC5iWlMQ+sfe9w5urxcfqwwJSlMVmIUdCcP3YZ6pjtpxyj0pPIVy9e+8JL2KGJCQmG6rzxNVpb1o6A7EVrv+TC7NG2b7hUA6i8Mbn/1lXQf6d9tKklTBsswSkt3YoUpTdumvAJAvQHf3a/+sdP0JLmkmIzWJq4wye+twSis953dZN6dUBNWmFIAmfxCBuju7/4pXI84ytgkFxQD/aEMLlGswugQ4QoT052S8ZjyLA/xD/zN684EqFzeHWUp5b71whqMgu5UEFDtQEmfl11v+TC77JIFQMuqKu9/4zUM8Q7sQeXCYwk07UCPr9ZglOlO2VFC+BV20OK6CJQkJwMUA/2eZRmFpNoimjFMjg+w3je3DfBm5RxiovgMgK7cd+/633oOZ2TNO2nBM1UYe6tS391+YwFGR0bGO3tHqspTuAAZM7XyA1vvM0kTAN349OMrDh10mqE+qcDoRHeWpDHdK8EswCjTnRRpOuRG1pB2/MnL8aVOx7BCswjns5VZPkoWYBR0J8IVJrbeJzUvmCIg1YPNFJ+AugGg0Ja2ZdDo5apZgNHDxzqC/iRBiXtk670ia6zC5xcG7v7Otyrv3w10OnwCKhcbA/3nM89E5TAWYPT/TvXVRhLZ/YrY7L9h6z1kjMF9dnii7tCepl9/Eud9uaL7VKCxf4Vym/7GLEZb2/uCfjLLKCtMaFUM7st3N6154tdkb4zzbhjfZTCiE/3SyvS4VL81i1Haw+yWMt0Jfac0Fy1bGdn07DPY7IFGdax9Xg049T0W6LOYnJSQZjF64lQX7w9RpCnmBvPOvPn58g2rax4+iKknzk9yHTohKLkTTWWLpsrQLEZPnekhtN4vKYVJ7jilfG/Dwb2R/QfkU2ncNfVU409jJ4oopjAKutO14QlCjC4FhUmG5uzwZN2je5ft2LVs0wZZK3Jj36lgVHsnah6jQ+MTs1QYXcR0J+ByPhrDgO4vDi1/YDugWbF7twcGvlvDuou0IgWUSTfoRA9VJ73L+GiqHz19lr07ZZSs3g8yLudGp3xlhau2NeU3NCy7a2tRU5MCTfcO60miQCf6wtqkd9keTWG0pY3Su9P4yA0ottkq55JvOJbTFw5gE5yMy/CqaoUnjwF90UBTbg0AdG2htD3rwlJSuxnHaPxk5c6rVAM9qrH26S8lVcaNj2W1qwHK+VBY8VkHXLpiiciwtJ9ZrS+qcYyC7tTRfb2iNGU7tL4CGAk9PRNt+syG4MMHSI6tNlLirHFk7cfVOlDW+i18RCf6VE1GLvNCuMQ74xgF3SnfS3b8hD+y3KV2wUT5L6EneZQ/kGvlM1Uixnn4hHQnz8RkaHXtUuh4UhvM1W++3Wik+MYx2tzWT7ih3tdgqLpGRMRxLJCArMtrWVVKzcwgRqEwHT5+iUphWr2xZmQutS78xqESAED3VejT5dU1MYhReHeano2pExJ2D4Upv65O0YKF5csZGZOAPA39zQZjseOxDGKUlu5UVKOB0WVcJhzTSglgScnYNFQphEG9nvAwOyhMc02bFrcFUWmeRXDzxpZs++m0VNBgP/r+kQtUk9Hy6gotFeMwTpDAdzaYBShqYQSjOMxu8PokiQhAvB+rLFGWCknKwJlqlMAfNOo216dN2chYj8PsvESuRmPz3voV+q3AaavOL22TAPSk722yBqAooxGMEh5mNzMbLd++maYPt61FF1PCQCeUpL/bZsEQr4jFyFh//KMuKut9OOQfChTzCpPSfo66AUCxWd68kpRUKd39KKz33T1DVApTOBSIVEfYgJ/Uik54BEDhEuf3bVj+041R0J36B8fQn4mXCxSmZY2No0a6fvGFXVo5AqDYhaydWq9LOroxCroT1enfUJhCa9dE4QOOL8dIQJ6Avrg2hz8cM+XVjVHQnYoKfWayNBwX1vvhUGmRs30UGq6dGyPK4zs4y8bIIhqrrBujoDtpTNqOYDWbm3gyaodg9aYJdOL6So2U0xOO3pRTw+vDKBSmk2d6qRQmrDDxZDS1CcW/EdN9KvXSh1HQnXA2A4k7XNCd6u9tWhybQxTpu+4G6IR16ala40Q7A1XWh1FautP4itRzow1UmaMYkQAJOuWC6sNo+4V+Ku9OUJjgooOt90bwZSIOoIkLfSe8hAqYeqYtqT6MEtKdfKVF2OCbtg780nIJyNDEqib48w9USo2kgteBUShMzZ1DJO5wYb1v3L0Z3HvuRy2HozpBGZp4gxWjfZXSmiJ7jUrqrLPc68BoS+vlUFBH+Cy56v0E6/1wuJj5TnrlpjG8GppbwtI9yxwBTaXwOjDXdvGK30ezEInJaMPm9TfZeq+0m+kbBZeYa24KS7vKbFwoMllYHRj92ZF2KrpTrLAAdCcCjyh3pKu06J0XLv6PWWZNUKorkHaWOWU0zy5NHRg919pPZb2PVIUJ6U4AKDzATNNsg83efDq+BjxSJChVBKRSn7OG8px10IpRuMMduzlDRXcaLq0iXGGCnzcDHmByip4DaJSA1vlle0d/LEbDOILCtHnX3VQrTOhEd5ZqFCYHs0UCWjF69MM2Kus96g26ky2115ZoXaG2cBzKHgloxWh375A9BcidKibBoDsRWkZhJuSLUAKaMIrNyoQKE/aHEE5GYZqxlRxJ2PZuyVoTRgev3hgamSKpEuhOFVvI6E6YjDKNhaTd1ZlqwijoToTucEF3UpdY8D3s23zRSkATRpcy3Ykno7QARe6aMHr4eKcnj+wEj5ISsq4MSzKwe/NFK4HcGIXC1N415PPRbFZufHDHKJnT/fiaIStMtABF7rkxSuvdCXQnKhlBYcKiNl/kEsiNUUK6E7w7ge5EKCPGKKHwlaxzr9cT0p2CszMTFSsI3eE2lSiC4hsyCeTuR98/2kVFd6qqryLcHwKFqZZXQcmQuZBxDoyC7hQlopJgf8hEdVX8RFeiCwoTX06QQA6Mgu4UIOLeg+60buMGpjs5ASW0ZciB0bPnLlHRnbA/xF9ZTkglYboTLTSV3HNg9PCxDiWo4BtsVobCJDhTdXa8wqSWBuF9Noxis3Jf/wiVwlRWWphXRrnCxNZ7Qlyqs86G0bh3p7FpdWhh96A7lWxYRzgZ3Uz26xAmY9dklA2joDsR1oP2MDumOxE2fVLW2TBKeJgdSjlWU0+oMPFkNAkohI/ZMNpxaZCK7gSlvnBVhEouTHeiknzafDNiFHSn1ouDJHQnFBSnf6ctrpiXTHcSI2eNuWTEKOhOVGczQGEKbb2LUGFiKolG9IgJlhGjhIfZoebjyyn7UcaoGPBpzCUjRptbe6m8O2EyGl5VTagwMd1JI3rEBMuI0Q8/ukxlvcfZDLR0J3hE4ss5EkiPUdCdCE//XtZYB3e4VBcrTFSSz5RveoziMDtCupM/sjxTce1+z96d7JawgfTTYxSH2XmITqjHZDS0upZwMlrPvGYDOLIzSnqMvv1eS5CIXExOd2pg7052As5A2ukx2t07TGW9r1lZSruhnulOBmBka5Q0GG1t75sjOtwY+0N8y8nc4WIyynQnW9FmLPE0GCX07jQ1I+H0b6oVJkiQ6U7GYGRrrDQYJaQ7YdWA6U62trcbE0+DUUK6E1YNcDYDoRxpD3QjrLiTs07GKKz3nd003p0gJuwPIXSHi7MZ+HKgBFIxOjQ+QXNWF+hOVfdSns3AVBIHAhRFSsbo6bPdVIfZoTRMd3ImSmhLlYzRljZKuhPt2QxMd6LFYqbcEzAaP1m5bYCK7iSF/ISTUZzNwHSnTCihfZ+A0ZGR8c7eEZICyad/U1lGYb0vymd3uCQtnzvTBIwuWboT5MSH2eUGC1GIBIwy3YmoFTjbbBJIwOjRE11U+0Nw+jetd6fyQDYx8TdCCSRg9MTZK1QKU2NDJeH+EChM7A6XEIXZs17wNQ6609XRmYKAN3sEO75ik3RgU3GDX4rN2JF8jjShMPFhdjlkRPp5AaMoxl++/FAwSLOT6ErV2lYKgMrCZ7oTKQhzZL6A0Q3ra/CXI7htn3/QJU0NSXBiQ3KxdycSsWvMlAgUKaVrHiMDKMrCdKeUBnHQC0dgdHRWGqAb6KEw8eVkCTgCo53jZCKCwsSTUTLpa8vYERi9PKGtsPaEYkqePXK1LFVHYLTjpmX1MZAQ050MCE1kFEdg9OQNMoWJD7MTiTZjedFjtIduoOfNysZAIzgWPUaHaE4uuS3ntSHBAufsdEuAHqMnh3UX2sIIfJidhcK0KSl6jNJa73mFySZgWZgsMUbJrffs3clCMNmUFDFGB6ZsqlfuZJnulFtGzghBjFHCFSbIn1eYnAHCHKUgxigmo4QXT0YJha89a2KM9k2SWe8ho0hQu6A4JJkEKDEKhWlkjqzmoDuxwkQmfT0ZU2K0a1yC4kJyMd2JROzGMqXEaDfdKiiExXQnY4gRH4sSo0x3Et/ebsyREqPnSfeH8GZlt+CVDKOgOxFORtkdrlsAinKSYZSW7sTenRijuSXAdKfcMuIQtyRA1o8y3YkRqFECZBil3azM1nuN+HBCsAU/JSJLc+HWMj2VzsTenUS2tfm8aDAa9EpP1UgE3s9uCayeT601DxyBKfw/cnpqOmcCItgAAAAASUVORK5CYII="})]})]});var ph=({colored:e})=>e?(0,a.jsx)(uh,{}):(0,a.jsx)(dh,{});const hh=e=>e?"215px":"227px",fh=yr.div`
1550
- position: absolute;
1551
- width: 100%;
1552
- bottom: ${e=>e.open?0:`-${hh(e.desktop)}`};
1553
- transition: all 0.4s;
1554
-
1555
- ${e=>{if(e.desktop)return Xt`
1556
- bottom: ${e.open?0:`calc(-${hh(e.desktop)} - (100vh / 2))`};
1557
- height: 100%;
1558
- display: flex;
1559
- justify-content: center;
1560
- align-items: center;
1561
- `}}
1562
- `,mh=yr.div`
1563
- display: flex;
1564
- flex-direction: column;
1565
- width: ${e=>e.desktop?"375px":"100%"};
1566
- height: ${({desktop:e})=>hh(e)};
1567
- max-height: 100vh;
1568
- background-color: ${e=>e.theme.popupBackgroundPrimaryColor};
1569
- color: ${e=>e.theme.popupTitleColor};
1570
- border-radius: ${e=>e.desktop?"20px":"20px 20px 0 0"};
1571
- padding: ${({desktop:e})=>e?"16px 14px":"16px 14px 28px"};
1572
- box-sizing: border-box;
1573
- `,gh=yr.div`
1574
- display: flex;
1575
- justify-content: space-between;
1576
- align-items: center;
1577
- margin-bottom: 30px;
1578
- `,vh=yr.div`
1579
- display: flex;
1580
- align-items: center;
1581
-
1582
- h4 {
1583
- margin: 0 0 0 8px;
1584
- font-weight: 600;
1585
- line-height: 19px;
1586
- }
1587
-
1588
- svg {
1589
- width: 20px;
1590
- height: 20px;
1591
- }
1592
- `,yh=yr.button`
1593
- display: flex;
1594
- justify-content: center;
1595
- align-items: center;
1596
- border: none;
1597
- background-color: ${e=>e.theme.popupBackgroundSecondaryColor};
1598
- border-radius: 50%;
1599
- height: 30px;
1600
- width: 30px;
1601
- padding: 0;
1602
-
1603
- svg {
1604
- width: 15px;
1605
- height: 15px;
1606
-
1607
- path {
1608
- fill: #000;
1609
- }
1610
- }
1611
- `,bh=yr.form`
1612
- display: flex;
1613
- flex-direction: column;
1614
- `,wh=yr.div`
1615
- display: flex;
1616
- flex-direction: column;
1617
- position: relative;
1618
-
1619
- input {
1620
- padding: 16px 10px 16px 20px;
1621
- border-radius: 15px;
1622
- background-color: ${({theme:e})=>e.popupBackgroundSecondaryColor};
1623
- border: 1px solid ${e=>e.errored?"#d84949":e.theme.popupBorderColor};
1624
- color: #878787;
1625
-
1626
- &:focus {
1627
- outline: none;
1628
- border: 1px solid ${({theme:e})=>e.primaryColor};
1629
- }
1630
- }
1631
- `,xh=yr.span`
1632
- position: absolute;
1633
- left: 0;
1634
- bottom: -20px;
1635
- color: #d84949;
1636
- font-size: 10px;
1637
- font-weight: 700;
1638
- line-height: 10px;
1639
- margin-top: 10px;
1640
- `,Sh=yr.button`
1641
- background-color: ${({theme:e})=>e.primaryColor};
1642
- padding: ${({status:e})=>"waiting"!==e?"auto":"8px 18px"};
1643
- width: ${({status:e})=>"waiting"!==e?"46px":"100%"};
1644
- height: 46px;
1645
- border-radius: ${({status:e})=>"waiting"!==e?"50%":"15px"};
1646
- margin: 30px auto 0;
1647
- border: none;
1648
- color: #fff;
1649
- font-size: 16px;
1650
- font-weight: 700;
1651
- line-height: 18px;
1652
- transition: border-radius 0.3s ease-in, width 0.3s;
1653
-
1654
- span {
1655
- display: flex;
1656
- flex-direction: row;
1657
- gap: 5px;
1658
- align-items: center;
1659
- justify-content: center;
1660
- }
1661
- `,_h=yr.img`
1662
- width: 36px;
1663
- height: 36px;
1664
- border-radius: 8px;
1665
- `,kh=yr.div`
1666
- display: flex;
1667
- align-items: center;
1668
- justify-content: center;
1669
- `;je=o("85Hg2");function Ch(e){(0,je.useEffect)((()=>{const t=document.title;return e&&(document.title=e),()=>{document.title=t}}),[e])}const Eh="linkshare_sent",Ph=(e,t)=>{let r=new URL(e.url).hostname;r.startsWith("www.")&&(r=r.slice(4));const n=e.ogImage?(0,a.jsx)(_h,{src:e.ogImage}):void 0;Ir(e.title,{width:"350px",icon:n,status:{icon:e.favicon,text:t("misc.from"),boldText:r},button:{text:t("misc.open"),action:({close:t})=>{window.open(e.url,"_blank"),t()}},ellipsis:!0,duration:15e3}),il({title:e.title,url:e.url,iconUrl:e.ogImage,statusIconUrl:e.favicon,statusText:r})};var Rh=()=>{const{t:e}=Fi(),t=(0,je.useContext)(dr),n=(0,je.useRef)(null),i=(0,je.useRef)(null),[o,s]=(0,je.useState)([]),[c,l]=(0,je.useState)(),[d,u]=(0,je.useState)(""),[p,f]=(0,je.useState)(null),[m,g]=(0,je.useState)("waiting"),{isLinksharePopupVisible:y,setIsLinksharePopupVisible:b,orientation:w,options:x}=(0,je.useContext)(Ya),{streams:S}=is();Ch(c);const _="landscape"===w,k=(0,je.useCallback)((()=>{document.hidden||(o.forEach((t=>{Ph(t,e)})),s([]),l(void 0))}),[o,e]),C=(0,je.useCallback)((t=>{const{type:r,data:n}=t.detail.event,i=S.find((e=>e.id===t.detail?.peerId));if(r===Eh)if(document.hidden){const e="user"!==i?.profile.name?.toLowerCase()?i?.profile.name:void 0;s([...o,n]),l(`${e||"Someone"} shared a link`)}else Ph(n,e);else"paypal_invoice"===r&&((e,t,r)=>{const n=e||r("misc.user"),i=r("shareLink.invoice",{user:n});Ir(i,{button:{icon:(0,a.jsx)(ph,{}),text:r("shareLink.pay"),action:()=>window.open(t,"_blank")},status:{icon:(0,a.jsx)(ph,{colored:!0}),text:r("shareLink.poweredBy"),boldText:"PayPal"},duration:1e4}),il({title:i,url:t,statusIconUrl:"https://stream-assets.snapcall.io/icons/paypal.png",statusText:"PayPal"})})(i?.profile?.name,n.url,e)}),[S,e,o]);(0,je.useEffect)((()=>(window.addEventListener("visibilitychange",k),Qa.addEventListener("customMessage",C),()=>{window.removeEventListener("visibilitychange",k),Qa.removeEventListener("customMessage",C)})),[C,k]);return(0,a.jsx)(fh,{open:y,desktop:_,onTransitionEnd:()=>{y&&i.current?.focus(),"done"===m&&g("waiting")},children:(0,a.jsxs)(mh,{ref:n,desktop:_,children:[(0,a.jsxs)(gh,{children:[(0,a.jsxs)(vh,{children:[(0,a.jsx)(Kl,{color:t.popupTitleColor}),(0,a.jsx)("h4",{children:e("shareLink.title2")})]}),(0,a.jsx)(yh,{onClick:()=>b(!1),children:(0,a.jsx)(Uc,{})})]}),(0,a.jsxs)(bh,{onSubmit:async t=>{if(t.preventDefault(),!d)return;let n;f(null),g("loading"),h.event("linkshareShare");try{n=new URL(d),"http"===n.protocol&&(n.protocol="https")}catch(t){f(e("shareLink.invalid")),console.error(t)}if(n){try{if(-1!==n.href.indexOf("paypal.com/invoice"))Qa.sendCustomMessageToAll({type:"paypal_invoice",data:{url:n}});else{const{linkData:e}=await fetch(`${x.streamApiURL}/shareLink`,{method:"POST",body:JSON.stringify({url:n.href})}).then((e=>e.json()));Qa.sendCustomMessageToAll({type:Eh,data:e})}if(S.length<2){const t=S[0]?.profile?.name||e("misc.user");r(v)(e("shareLink.sentToUser",{user:t}))}else r(v)(e("shareLink.sentToUsers"));b(!1)}catch(t){console.error(t),r(v)(e("shareLink.failed"),{className:"error"})}u("")}g("done")},children:[(0,a.jsxs)(wh,{errored:Boolean(p),children:[(0,a.jsx)("input",{id:"linkshare-popup-input",ref:i,placeholder:"https://www.example.com",value:d,onChange:e=>u(e.target.value),"data-lpignore":!0,autoComplete:"off","data-form-type":"other"}),p&&(0,a.jsx)(xh,{children:p})]}),(0,a.jsx)(Sh,{type:"submit",disabled:"waiting"!==m,status:m,children:"waiting"!==m?(0,a.jsx)(kh,{children:(0,a.jsx)(Wl,{size:"18px"})}):(0,a.jsxs)("span",{children:[(0,a.jsx)(Yp,{}),e("shareLink.title")]})})]})]})})};je=o("85Hg2");var Th=()=>(0,a.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M12.266 7.325 8.691 10.91 7.316 9.534a.833.833 0 1 0-1.175 1.175l1.958 1.966a.831.831 0 0 0 .592.242.833.833 0 0 0 .583-.242l4.167-4.166a.833.833 0 1 0-1.175-1.184ZM9.999 1.667a8.333 8.333 0 1 0 0 16.667 8.333 8.333 0 0 0 0-16.667Zm0 15a6.667 6.667 0 1 1 0-13.334 6.667 6.667 0 0 1 0 13.334Z",fill:"#fff"})});const jh=e=>e?"420px":"432px",Oh=yr.div`
1669
+ `,Nh=/.*(?:youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=)([^#&?]*).*/;var Fh=()=>{const{t:e}=Fi(),t=(0,je.useContext)(dr),r=(0,je.useRef)(null),[n,i]=(0,je.useState)(""),[o,s]=(0,je.useState)(null),{isYoutubePopupVisible:c,setIsYoutubePopupVisible:l,selfPeerId:d,orientation:u}=(0,je.useContext)(Ya),{dispatch:p}=is(),f="landscape"===u;bs(r,(()=>{c&&l(!1)}));return(0,je.useEffect)((()=>{i(""),s(null)}),[c]),(0,a.jsx)(Rh,{open:c,desktop:f,children:(0,a.jsxs)(Th,{ref:r,desktop:f,children:[(0,a.jsxs)(jh,{children:[(0,a.jsxs)(Oh,{children:[(0,a.jsx)(_d,{color:t.popupTitleColor}),(0,a.jsx)("h4",{children:e("youtube.title")})]}),(0,a.jsx)(Mh,{onClick:()=>l(!1),children:(0,a.jsx)(Us,{})})]}),(0,a.jsxs)(Lh,{onSubmit:t=>{t.preventDefault(),s(null),h.event("youtubeShare");const[,r]=n.match(Nh)||[];r?(p({type:Ja.SET_HIGHLIGHTED_TILE,payload:{type:"youtube",peerId:String(d),isGlobal:!0,data:{videoId:r}}}),l(!1)):s(e("youtube.invalid"))},children:[(0,a.jsxs)(Dh,{errored:Boolean(o),children:[(0,a.jsx)("input",{id:"youtube-popup-input",placeholder:"https://www.youtube.com/watch?v=abcdef",value:n,onChange:e=>i(e.target.value),"data-lpignore":!0,autoComplete:"off","data-form-type":"other"}),o&&(0,a.jsx)(Ih,{children:o})]}),(0,a.jsx)(Ah,{type:"submit",children:(0,a.jsxs)("span",{children:[(0,a.jsx)(Vs,{}),e("youtube.share")]})})]})]})})};je=o("85Hg2");var zh=()=>(0,a.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M12.266 7.325 8.691 10.91 7.316 9.534a.833.833 0 1 0-1.175 1.175l1.958 1.966a.831.831 0 0 0 .592.242.833.833 0 0 0 .583-.242l4.167-4.166a.833.833 0 1 0-1.175-1.184ZM9.999 1.667a8.333 8.333 0 1 0 0 16.667 8.333 8.333 0 0 0 0-16.667Zm0 15a6.667 6.667 0 1 1 0-13.334 6.667 6.667 0 0 1 0 13.334Z",fill:"#fff"})});const Bh=e=>e?"420px":"432px",Uh=yr.div`
1670
1670
  position: absolute;
1671
1671
  width: 100%;
1672
- bottom: ${e=>e.open?0:`-${jh(e.desktop)}`};
1672
+ bottom: ${e=>e.open?0:`-${Bh(e.desktop)}`};
1673
1673
  transition: all 0.4s;
1674
1674
 
1675
1675
  ${e=>{if(e.desktop)return Xt`
1676
- bottom: ${e.open?0:`calc(-${jh(e.desktop)} - (100vh / 2))`};
1676
+ bottom: ${e.open?0:`calc(-${Bh(e.desktop)} - (100vh / 2))`};
1677
1677
  height: 100%;
1678
1678
  display: flex;
1679
1679
  justify-content: center;
1680
1680
  align-items: center;
1681
1681
  `}}
1682
- `,Mh=yr.div`
1682
+ `,Vh=yr.div`
1683
1683
  display: flex;
1684
1684
  flex-direction: column;
1685
1685
  width: ${e=>e.desktop?"375px":"100%"};
1686
- height: ${({desktop:e})=>jh(e)};
1686
+ height: ${({desktop:e})=>Bh(e)};
1687
1687
  max-height: 100vh;
1688
1688
  background-color: ${e=>e.theme.popupBackgroundPrimaryColor};
1689
1689
  color: ${e=>e.theme.popupTitleColor};
1690
1690
  border-radius: ${e=>e.desktop?"20px":"20px 20px 0 0"};
1691
1691
  padding: 12px 14px 30px;
1692
1692
  box-sizing: border-box;
1693
- `,Lh=yr.div`
1693
+ `,Hh=yr.div`
1694
1694
  display: flex;
1695
1695
  justify-content: space-between;
1696
1696
  align-items: center;
1697
1697
  margin-bottom: 30px;
1698
- `,Dh=yr.div`
1698
+ `,qh=yr.div`
1699
1699
  display: flex;
1700
1700
  align-items: center;
1701
1701
 
@@ -1709,7 +1709,7 @@ to {
1709
1709
  width: 20px;
1710
1710
  height: 20px;
1711
1711
  }
1712
- `,Ih=yr.button`
1712
+ `,Wh=yr.button`
1713
1713
  display: flex;
1714
1714
  justify-content: center;
1715
1715
  align-items: center;
@@ -1728,17 +1728,17 @@ to {
1728
1728
  fill: #000;
1729
1729
  }
1730
1730
  }
1731
- `,Ah=yr.form`
1731
+ `,$h=yr.form`
1732
1732
  display: flex;
1733
1733
  flex-direction: column;
1734
- `,Nh=yr.div`
1734
+ `,Kh=yr.div`
1735
1735
  display: flex;
1736
1736
  flex-direction: row;
1737
1737
  flex-wrap: wrap-reverse;
1738
1738
  gap: 10px 20px;
1739
1739
  width: 280px;
1740
1740
  margin: auto;
1741
- `,Fh=yr.label`
1741
+ `,Gh=yr.label`
1742
1742
  display: flex;
1743
1743
  flex-direction: column;
1744
1744
  position: relative;
@@ -1782,7 +1782,7 @@ to {
1782
1782
  text-align: center;
1783
1783
  display: ${({image:e})=>e?"none":"inline"};
1784
1784
  }
1785
- `,zh=yr.button`
1785
+ `,Zh=yr.button`
1786
1786
  background-color: ${({theme:e})=>e.primaryColor};
1787
1787
  padding: 8px 18px;
1788
1788
  width: 280px;
@@ -1803,46 +1803,46 @@ to {
1803
1803
  align-items: center;
1804
1804
  justify-content: center;
1805
1805
  }
1806
- `,Bh=[{title:"Blue",id:"background-blue",iconUrl:"https://stream-assets.snapcall.io/backgrounds/blue_background_icon.png",value:"https://stream-assets.snapcall.io/backgrounds/blue_background.png"},{title:"Cold",id:"background-cold",iconUrl:"https://stream-assets.snapcall.io/backgrounds/cold_background_icon.png",value:"https://stream-assets.snapcall.io/backgrounds/cold_background.png"},{title:"Bricks",id:"background-bricks",iconUrl:"https://stream-assets.snapcall.io/backgrounds/bricks_background_icon.png",value:"https://stream-assets.snapcall.io/backgrounds/bricks_background.png"},{title:"White",id:"background-white",iconUrl:"https://stream-assets.snapcall.io/backgrounds/white_background_icon.png",value:"https://stream-assets.snapcall.io/backgrounds/white_background.png"},{title:"Yellow",id:"background-yellow",iconUrl:"https://stream-assets.snapcall.io/backgrounds/yellow_background_icon.png",value:"https://stream-assets.snapcall.io/backgrounds/yellow_background.png"},{title:"Warm",id:"background-warm",iconUrl:"https://stream-assets.snapcall.io/backgrounds/warm_background_icon.png",value:"https://stream-assets.snapcall.io/backgrounds/warm_background.png"},{title:"None",value:"none",id:"background-none"},{title:"Blurred",value:"blurred",id:"background-blurred"}];var Uh=()=>{const{t:e}=Fi(),t=(0,je.useRef)(null),{isVirtualBackgroundPopupVisible:r,setIsVirtualBackgroundPopupVisible:n,orientation:i}=(0,je.useContext)(Ya),o="landscape"===i;return(0,a.jsx)(Oh,{open:r,desktop:o,children:(0,a.jsxs)(Mh,{ref:t,desktop:o,children:[(0,a.jsxs)(Lh,{children:[(0,a.jsxs)(Dh,{children:[(0,a.jsx)(ys,{color:"#000"}),(0,a.jsx)("h4",{children:e("virtualBackground.title")})]}),(0,a.jsx)(Ih,{onClick:()=>n(!1),children:(0,a.jsx)(Uc,{})})]}),(0,a.jsxs)(Ah,{onSubmit:e=>{e.preventDefault();const t=e.currentTarget.elements.background.value;if("none"===t)Qa.stopVideoBackground();else if("blurred"===t)Qa.setVideoBackground({blurLevel:16,type:"blur"}),Qa.initVideoBackground();else{const e=new Image;e.src=t,e.crossOrigin="anonymous",e.onload=()=>{Qa.setVideoBackground({background:e,type:"background"}),Qa.initVideoBackground()}}n(!1)},children:[(0,a.jsx)(Nh,{children:Bh.map((({id:e,title:t,value:r,iconUrl:n})=>(0,a.jsxs)(Fh,{htmlFor:e,image:n,children:[(0,a.jsx)("input",{type:"radio",value:r,id:e,name:"background",defaultChecked:"none"===r}),(0,a.jsx)("span",{children:t})]},e)))}),(0,a.jsx)(zh,{type:"submit",children:(0,a.jsxs)("span",{children:[(0,a.jsx)(Th,{}),e("virtualBackground.setBackground")]})})]})]})})};const Vh=e=>e?"225px":"237px",Hh=yr.div`
1806
+ `,Qh=[{title:"Blue",id:"background-blue",iconUrl:"https://stream-assets.snapcall.io/backgrounds/blue_background_icon.png",value:"https://stream-assets.snapcall.io/backgrounds/blue_background.png"},{title:"Cold",id:"background-cold",iconUrl:"https://stream-assets.snapcall.io/backgrounds/cold_background_icon.png",value:"https://stream-assets.snapcall.io/backgrounds/cold_background.png"},{title:"Bricks",id:"background-bricks",iconUrl:"https://stream-assets.snapcall.io/backgrounds/bricks_background_icon.png",value:"https://stream-assets.snapcall.io/backgrounds/bricks_background.png"},{title:"White",id:"background-white",iconUrl:"https://stream-assets.snapcall.io/backgrounds/white_background_icon.png",value:"https://stream-assets.snapcall.io/backgrounds/white_background.png"},{title:"Yellow",id:"background-yellow",iconUrl:"https://stream-assets.snapcall.io/backgrounds/yellow_background_icon.png",value:"https://stream-assets.snapcall.io/backgrounds/yellow_background.png"},{title:"Warm",id:"background-warm",iconUrl:"https://stream-assets.snapcall.io/backgrounds/warm_background_icon.png",value:"https://stream-assets.snapcall.io/backgrounds/warm_background.png"},{title:"None",value:"none",id:"background-none"},{title:"Blurred",value:"blurred",id:"background-blurred"}];var Yh=()=>{const{t:e}=Fi(),t=(0,je.useRef)(null),{isVirtualBackgroundPopupVisible:r,setIsVirtualBackgroundPopupVisible:n,orientation:i}=(0,je.useContext)(Ya),o="landscape"===i;return(0,a.jsx)(Uh,{open:r,desktop:o,children:(0,a.jsxs)(Vh,{ref:t,desktop:o,children:[(0,a.jsxs)(Hh,{children:[(0,a.jsxs)(qh,{children:[(0,a.jsx)(ys,{color:"#000"}),(0,a.jsx)("h4",{children:e("virtualBackground.title")})]}),(0,a.jsx)(Wh,{onClick:()=>n(!1),children:(0,a.jsx)(Us,{})})]}),(0,a.jsxs)($h,{onSubmit:e=>{e.preventDefault();const t=e.currentTarget.elements.background.value;if("none"===t)Qa.stopVideoBackground();else if("blurred"===t)Qa.setVideoBackground({blurLevel:16,type:"blur"}),Qa.initVideoBackground();else{const e=new Image;e.src=t,e.crossOrigin="anonymous",e.onload=()=>{Qa.setVideoBackground({background:e,type:"background"}),Qa.initVideoBackground()}}n(!1)},children:[(0,a.jsx)(Kh,{children:Qh.map((({id:e,title:t,value:r,iconUrl:n})=>(0,a.jsxs)(Gh,{htmlFor:e,image:n,children:[(0,a.jsx)("input",{type:"radio",value:r,id:e,name:"background",defaultChecked:"none"===r}),(0,a.jsx)("span",{children:t})]},e)))}),(0,a.jsx)(Zh,{type:"submit",children:(0,a.jsxs)("span",{children:[(0,a.jsx)(zh,{}),e("virtualBackground.setBackground")]})})]})]})})};const Jh=e=>e?"225px":"237px",Xh=yr.div`
1807
1807
  position: absolute;
1808
1808
  width: 100%;
1809
- bottom: ${e=>e.open?0:`-${Vh(e.desktop)}`};
1809
+ bottom: ${e=>e.open?0:`-${Jh(e.desktop)}`};
1810
1810
  transition: all 0.4s;
1811
1811
 
1812
1812
  ${e=>{if(e.desktop)return Xt`
1813
- bottom: ${e.open?0:`calc(-${Vh(e.desktop)} - (100vh / 2))`};
1813
+ bottom: ${e.open?0:`calc(-${Jh(e.desktop)} - (100vh / 2))`};
1814
1814
  height: 100%;
1815
1815
  display: flex;
1816
1816
  justify-content: center;
1817
1817
  align-items: center;
1818
1818
  `}}
1819
- `,qh=yr.div`
1819
+ `,ef=yr.div`
1820
1820
  display: flex;
1821
1821
  flex-direction: column;
1822
1822
  width: ${e=>e.desktop?"375px":"100%"};
1823
- height: ${({desktop:e})=>Vh(e)};
1823
+ height: ${({desktop:e})=>Jh(e)};
1824
1824
  max-height: 100vh;
1825
1825
  background-color: ${e=>e.theme.popupBackgroundPrimaryColor};
1826
1826
  color: ${e=>e.theme.popupTitleColor};
1827
1827
  border-radius: ${e=>e.desktop?"20px":"20px 20px 0 0"};
1828
1828
  box-sizing: border-box;
1829
- `,Wh=yr.div`
1829
+ `,tf=yr.div`
1830
1830
  display: flex;
1831
1831
  justify-content: space-between;
1832
1832
  align-items: center;
1833
1833
  border-bottom: 2px solid #f7f7f7;
1834
- `,$h=yr.div`
1834
+ `,rf=yr.div`
1835
1835
  display: flex;
1836
1836
  align-items: center;
1837
1837
  margin: 16px auto 16px 16px;
1838
- `,Kh=yr.div`
1838
+ `,nf=yr.div`
1839
1839
  font-family: 'Lato';
1840
1840
  font-style: normal;
1841
1841
  font-weight: 600;
1842
1842
  font-size: 18px;
1843
1843
  line-height: 22px;
1844
1844
  letter-spacing: -0.02em;
1845
- `,Gh=yr.button`
1845
+ `,of=yr.button`
1846
1846
  display: flex;
1847
1847
  justify-content: center;
1848
1848
  align-items: center;
@@ -1862,7 +1862,7 @@ to {
1862
1862
  fill: #000;
1863
1863
  }
1864
1864
  }
1865
- `,Zh=yr.div`
1865
+ `,af=yr.div`
1866
1866
  display: flex;
1867
1867
  align-items: center;
1868
1868
  justify-content: center;
@@ -1876,7 +1876,7 @@ to {
1876
1876
  line-height: 19px;
1877
1877
  text-align: left;
1878
1878
  letter-spacing: -0.02em;
1879
- `,Qh=yr.button`
1879
+ `,sf=yr.button`
1880
1880
  background-color: ${({theme:e})=>e.primaryColor};
1881
1881
  padding: 8px 18px;
1882
1882
  height: 46px;
@@ -1896,7 +1896,7 @@ to {
1896
1896
  alig-items: center;
1897
1897
  justify-content: center;
1898
1898
  }
1899
- `;je=o("85Hg2");var Yh=()=>{const{t:e}=Fi(),{isBlockedFeaturePopupOpen:t,setBlockedFeaturePopupOpen:r,orientation:n,isAgent:i}=(0,je.useContext)(Ya),o=(0,je.useRef)(null),s="landscape"===n;return bs(o,(()=>{t&&r(!1)})),(0,a.jsx)(Hh,{open:t,desktop:s,children:(0,a.jsxs)(qh,{ref:o,desktop:s,children:[(0,a.jsxs)(Wh,{children:[(0,a.jsx)($h,{children:(0,a.jsx)(Kh,{children:i&&e("blockedFeature.titleConnected")||e("blockedFeature.titleGuest")})}),(0,a.jsx)(Gh,{onClick:()=>r(!1),children:(0,a.jsx)(Uc,{})})]}),(0,a.jsx)(Zh,{children:i&&e("blockedFeature.descriptionConnected")||e("blockedFeature.descriptionGuest")}),(0,a.jsx)(Qh,{onClick:()=>{r(!1),i&&window.open("https://app.snapcall.io/settings/workspace/plans-invoices","_blank")},children:(0,a.jsxs)("span",{children:[i&&(0,a.jsx)(jp,{}),i&&e("blockedFeature.dismissConnected")||e("blockedFeature.dismissGuest")]})})]})})};const Jh=yr.div`
1899
+ `;je=o("85Hg2");var cf=()=>{const{t:e}=Fi(),{isBlockedFeaturePopupOpen:t,setBlockedFeaturePopupOpen:r,orientation:n,isAgent:i}=(0,je.useContext)(Ya),o=(0,je.useRef)(null),s="landscape"===n;return bs(o,(()=>{t&&r(!1)})),(0,a.jsx)(Xh,{open:t,desktop:s,children:(0,a.jsxs)(ef,{ref:o,desktop:s,children:[(0,a.jsxs)(tf,{children:[(0,a.jsx)(rf,{children:(0,a.jsx)(nf,{children:i&&e("blockedFeature.titleConnected")||e("blockedFeature.titleGuest")})}),(0,a.jsx)(of,{onClick:()=>r(!1),children:(0,a.jsx)(Us,{})})]}),(0,a.jsx)(af,{children:i&&e("blockedFeature.descriptionConnected")||e("blockedFeature.descriptionGuest")}),(0,a.jsx)(sf,{onClick:()=>{r(!1),i&&window.open("https://app.snapcall.io/settings/workspace/plans-invoices","_blank")},children:(0,a.jsxs)("span",{children:[i&&(0,a.jsx)(ah,{}),i&&e("blockedFeature.dismissConnected")||e("blockedFeature.dismissGuest")]})})]})})};const lf=yr.div`
1900
1900
  position: absolute;
1901
1901
  width: 100%;
1902
1902
  height: 100%;
@@ -1904,7 +1904,94 @@ to {
1904
1904
  z-index: ${e=>e.open?100:-1};
1905
1905
  overflow: hidden;
1906
1906
  transition: all ${e=>e.open?"0.2s":"0.6s"};
1907
- `;var Xh=()=>{const{isQuickConnectPopupVisible:e,isSettingsMenuVisible:t,isYoutubePopupVisible:r,isLinksharePopupVisible:n,isVirtualBackgroundPopupVisible:i,isBlockedFeaturePopupOpen:o}=(0,je.useContext)(Ya),s=e||t||r||o||n||i;return(0,a.jsxs)(Jh,{open:s,children:[(0,a.jsx)(Ep,{}),(0,a.jsx)(Qp,{}),(0,a.jsx)(lh,{}),(0,a.jsx)(Rh,{}),(0,a.jsx)(Uh,{}),(0,a.jsx)(Yh,{})]})};je=o("85Hg2");const ef=yr.div`
1907
+ `,df=yr.div`
1908
+ position: absolute;
1909
+ width: 100%;
1910
+ transition: all 0.4s;
1911
+ bottom: 0;
1912
+ height: 100%;
1913
+ display: flex;
1914
+ justify-content: center;
1915
+ align-items: center;
1916
+ `,uf=yr.div`
1917
+ display: flex;
1918
+ flex-direction: column;
1919
+ width: ${"320px"};
1920
+ max-height: 100vh;
1921
+ background-color: ${e=>e.theme.popupBackgroundPrimaryColor};
1922
+ color: ${e=>e.theme.popupTitleColor};
1923
+ border-radius: 10px;
1924
+ box-sizing: border-box;
1925
+ padding: 20px;
1926
+ gap: 20px;
1927
+ `,pf=yr.div`
1928
+ display: flex;
1929
+ justify-content: space-between;
1930
+
1931
+ gap: 20px;
1932
+ `,hf=yr.div`
1933
+ display: flex;
1934
+ align-items: center;
1935
+ `,ff=yr.div`
1936
+ font-family: 'Inter';
1937
+ font-style: normal;
1938
+ font-weight: 600;
1939
+ font-size: 20px;
1940
+ line-height: 24px;
1941
+ letter-spacing: -0.02em;
1942
+ `,mf=yr.button`
1943
+ display: flex;
1944
+ justify-content: center;
1945
+ align-items: center;
1946
+ border: none;
1947
+ background-color: ${e=>e.theme.popupBackgroundSecondaryColor};
1948
+ border-radius: 8px;
1949
+ min-width: 36px;
1950
+ height: 36px;
1951
+ width: 36px;
1952
+
1953
+ svg {
1954
+ height: 15px;
1955
+ width: 15px;
1956
+
1957
+ path {
1958
+ fill: #000;
1959
+ }
1960
+ }
1961
+ `,gf=yr.div`
1962
+ display: flex;
1963
+ align-items: center;
1964
+ justify-content: center;
1965
+ font-size: 12px;
1966
+ color: #2d2d2d;
1967
+ font-family: 'Inter';
1968
+ font-style: normal;
1969
+ font-weight: 400;
1970
+ font-size: 16px;
1971
+ line-height: 20px;
1972
+ text-align: left;
1973
+ letter-spacing: -0.02em;
1974
+ `,vf=yr.button`
1975
+ background-color: ${({theme:e})=>e.primaryColor};
1976
+ padding: 8px 18px;
1977
+ height: 46px;
1978
+ max-width: 100%;
1979
+ border-radius: 6px;
1980
+ border: none;
1981
+ color: #fff;
1982
+ font-size: 16px;
1983
+ font-weight: 700;
1984
+ font-family: 'Inter';
1985
+ line-height: 18px;
1986
+
1987
+ span {
1988
+ display: flex;
1989
+ flex-direction: row;
1990
+ gap: 5px;
1991
+ alig-items: center;
1992
+ justify-content: center;
1993
+ }
1994
+ `;je=o("85Hg2");var yf=()=>{const{t:e}=Fi(),{isRecordingStartPopupOpen:t,setRecordingStartPopupOpen:r}=(0,je.useContext)(Ya),n=(0,je.useRef)(null);return bs(n,(()=>{t&&r(!1)})),t?(0,a.jsx)(df,{open:t,children:(0,a.jsxs)(uf,{ref:n,children:[(0,a.jsxs)(pf,{children:[(0,a.jsx)(hf,{children:(0,a.jsx)(ff,{children:e("recordingPopup.recordingStartTitle")})}),(0,a.jsx)(mf,{onClick:()=>r(!1),children:(0,a.jsx)(Us,{})})]}),(0,a.jsx)(gf,{children:e("recordingPopup.recordingStartText")}),(0,a.jsx)(vf,{onClick:()=>{r(!1)},children:(0,a.jsx)("span",{children:e("recordingPopup.dismiss")})})]})}):null};var bf=()=>{const{isQuickConnectPopupVisible:e,isSettingsMenuVisible:t,isYoutubePopupVisible:r,isLinksharePopupVisible:n,isVirtualBackgroundPopupVisible:i,isBlockedFeaturePopupOpen:o,isRecordingStartPopupOpen:s}=(0,je.useContext)(Ya),c=e||t||r||o||n||s||i;return(0,a.jsxs)(lf,{open:c,children:[(0,a.jsx)(rh,{}),(0,a.jsx)(Eh,{}),(0,a.jsx)(Fh,{}),(0,a.jsx)(yc,{}),(0,a.jsx)(Yh,{}),(0,a.jsx)(cf,{}),(0,a.jsx)(yf,{})]})};je=o("85Hg2");const wf=yr.div`
1908
1995
  display: flex;
1909
1996
  flex: 1;
1910
1997
  flex-direction: column;
@@ -1913,18 +2000,18 @@ to {
1913
2000
  background-color: #000;
1914
2001
  color: #fff;
1915
2002
  padding-top: 70px;
1916
- `,tf=yr.span`
2003
+ `,xf=yr.span`
1917
2004
  font-size: 60px;
1918
- `,rf=yr.h1`
2005
+ `,Sf=yr.h1`
1919
2006
  font-size: 28px;
1920
2007
  font-weight: 600;
1921
2008
  line-height: 33.6px;
1922
- `,nf=yr.p`
2009
+ `,_f=yr.p`
1923
2010
  font-size: 22px;
1924
2011
  font-weight: 500;
1925
2012
  line-height: 26.4px;
1926
2013
  margin: 0;
1927
- `,of=yr.button`
2014
+ `,kf=yr.button`
1928
2015
  background-color: ${({theme:e})=>e.primaryColor};
1929
2016
  border: none;
1930
2017
  border-radius: 50px;
@@ -1934,7 +2021,7 @@ to {
1934
2021
  line-height: 18px;
1935
2022
  color: #fff;
1936
2023
  margin-top: 30px;
1937
- `;var af=()=>{const{t:e}=Fi(),{streamState:t,setStreamState:r}=(0,je.useContext)(Ya),n="ended"===t,i="terminated"===t,o="expired"===t,s="full"===t;return(0,je.useEffect)((()=>{document.pictureInPictureElement&&document.exitPictureInPicture()}),[]),(0,a.jsxs)(ef,{children:[(0,a.jsxs)(tf,{children:[(n||i)&&"👋",(o||s)&&"🥺"]}),(0,a.jsxs)(rf,{children:[n&&e("endView.callLeft"),i&&e("endView.callEnded"),o&&e("endView.tooLate"),s&&e("endView.full")]}),o&&(0,a.jsx)(nf,{children:e("endView.callIsOver")}),s&&(0,a.jsx)(nf,{children:e("endView.fullDescription")}),(n||s)&&(0,a.jsx)(of,{onClick:()=>{Qa.init(),r("loading")},children:e("endView.goBack")}),!s&&(0,a.jsx)(ol,{})]})};je=o("85Hg2");const sf=new Audio("https://cdn.snapcall.io/stream/connected.mp3"),cf=new Audio("https://cdn.snapcall.io/stream/disconnected.mp3"),lf=new Audio("https://cdn.snapcall.io/stream/user-connected.mp3"),df=new Audio("https://cdn.snapcall.io/stream/user-disconnected.mp3"),uf=new Audio("https://cdn.snapcall.io/stream/link-received.mp3");var pf=()=>{const{userInteractionTriggered:e}=(0,je.useContext)(Ya),t=async()=>{try{lf.currentTime=0,await lf.play()}catch(e){console.warn("Couldn't play user connected sound")}},r=async()=>{try{df.currentTime=0,await df.play()}catch(e){console.warn("Couldn't play user disconnected sound")}},n=async()=>{try{await cf.play()}catch(e){console.warn("Couldn't play disconnected sound")}},i=async e=>{const{type:t}=e.detail.event;if(t===Eh)try{await uf.play()}catch(e){console.warn("Couldn't play link-received sound")}};return(0,je.useEffect)((()=>(Qa.addEventListener("newPeer",t),Qa.addEventListener("peerClosed",r),Qa.addEventListener("leaveRoom",n),Qa.addEventListener("customMessage",i),()=>{Qa.removeEventListener("newPeer",t),Qa.removeEventListener("peerClosed",r),Qa.removeEventListener("leaveRoom",n),Qa.removeEventListener("customMessage",i)})),[]),(0,je.useEffect)((()=>{e&&(async()=>{try{await sf.play()}catch(e){console.warn("Couldn't play connected sound")}})()}),[e]),null};const hf={error:Ml,critical:Ll},ff=gr`
2024
+ `;var Cf=()=>{const{t:e}=Fi(),{streamState:t,setStreamState:r}=(0,je.useContext)(Ya),n="ended"===t,i="terminated"===t,o="expired"===t,s="full"===t;return(0,je.useEffect)((()=>{document.pictureInPictureElement&&document.exitPictureInPicture()}),[]),(0,a.jsxs)(wf,{children:[(0,a.jsxs)(xf,{children:[(n||i)&&"👋",(o||s)&&"🥺"]}),(0,a.jsxs)(Sf,{children:[n&&e("endView.callLeft"),i&&e("endView.callEnded"),o&&e("endView.tooLate"),s&&e("endView.full")]}),o&&(0,a.jsx)(_f,{children:e("endView.callIsOver")}),s&&(0,a.jsx)(_f,{children:e("endView.fullDescription")}),(n||s)&&(0,a.jsx)(kf,{onClick:()=>{Qa.init(),r("loading")},children:e("endView.goBack")}),!s&&(0,a.jsx)(Qs,{})]})};const Ef={error:pd,critical:hd},Pf=gr`
1938
2025
  @keyframes fadeIn {
1939
2026
  0% {
1940
2027
  opacity: 0;
@@ -1951,15 +2038,15 @@ to {
1951
2038
  opacity: 0;
1952
2039
  }
1953
2040
  }
1954
- `,mf={top:110},gf={style:{fontSize:"14px",fontWeight:400,lineHeight:"18px",padding:"10px 15px",color:"#fff",backgroundColor:"rgba(45, 45, 45, 0.75)",textAlign:"left",borderRadius:"50px"}},vf=yr.div`
2041
+ `,Rf={top:110},Tf={style:{fontSize:"14px",fontWeight:400,lineHeight:"18px",padding:"10px 15px",color:"#fff",backgroundColor:"rgba(45, 45, 45, 0.75)",textAlign:"left",borderRadius:"50px"}},jf=yr.div`
1955
2042
  max-width: ${({maxWidth:e})=>e||"200px"};
1956
2043
  div {
1957
2044
  margin: 0;
1958
2045
  }
1959
- `,yf=yr.div`
2046
+ `,Of=yr.div`
1960
2047
  display: flex;
1961
2048
  margin-right: 10px;
1962
- `;var bf=()=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(ff,{}),(0,a.jsx)(v.Toaster,{toastOptions:gf,containerStyle:mf,gutter:20,children:e=>(0,a.jsx)(v.ToastBar,{toast:e,style:{...e.style,animation:e.visible?"fadeIn 1s ease forwards":"fadeOut 1s forwards ease"},children:({message:t})=>{const r=(e=>{if(e){const t=hf[e];if(t)return t}return null})(e.className);return(0,a.jsxs)(a.Fragment,{children:[r&&(0,a.jsx)(yf,{children:r}),(0,a.jsx)(vf,{maxWidth:e.style?.maxWidth,children:t})]})}})})]});const wf={primaryColor:"#268AFA",backgroundColor:"#fff",controlBarBackground:"#fff",logoColor:"#000",controlsIconColor:"#4f5a65",controlsBackgroundColor:"#f9f9f9",controlsBorderColor:"#f5f5f5",controlsHoverBorderColor:"#8d8d8d",streamTileBackgroundColor:"#eaebec",streamTileBorderColor:"#d3d6d9",settingsBackgroundColor:"#fff",settingsHeaderTextColor:"#000",settingsTextColor:"#000",settingsCloseBackgroundColor:"#eaebec",popupBackgroundPrimaryColor:"#fff",popupBackgroundSecondaryColor:"#f3f3f3",popupBackgroundThirdColor:"#f7f7f7",popupBorderColor:"#d4d4d4",popupTitleColor:"#2d2d2d"},xf={primaryColor:"#268AFA",backgroundColor:"#000",controlBarBackground:"linear-gradient(180deg, #000000 0%, #131313 100%)",logoColor:"#fff",controlsIconColor:"#fff",controlsBackgroundColor:"#2d2d2d",controlsBorderColor:"#343434",controlsHoverBorderColor:"#8d8d8d",streamTileBackgroundColor:"#131313",streamTileBorderColor:"#1f1f1f",settingsBackgroundColor:"#242324",settingsHeaderTextColor:"#f9f9f9",settingsTextColor:"#fff",settingsCloseBackgroundColor:"#7b7c7e",popupBackgroundPrimaryColor:"#fff",popupBackgroundSecondaryColor:"#f3f3f3",popupBackgroundThirdColor:"#f7f7f7",popupBorderColor:"#d4d4d4",popupTitleColor:"#2d2d2d"};var Sf=()=>(0,a.jsx)("svg",{style:{position:"absolute",width:0,height:0},children:(0,a.jsxs)("defs",{children:[(0,a.jsxs)("linearGradient",{id:"snapcallLogoSmall",x1:"34.5",y1:"2",x2:"34.5",y2:"66.334",gradientUnits:"userSpaceOnUse",children:[(0,a.jsx)("stop",{stopColor:"#D4D4D4"}),(0,a.jsx)("stop",{offset:"1",stopColor:"#979797"})]}),(0,a.jsxs)("linearGradient",{id:"microphoneBottom",x1:"15",y1:"12.5",x2:"15",y2:"28.75",gradientUnits:"userSpaceOnUse",children:[(0,a.jsx)("stop",{stopColor:"#9A9A9A"}),(0,a.jsx)("stop",{offset:"1",stopColor:"#969696"})]}),(0,a.jsxs)("linearGradient",{id:"microphoneTop",x1:"15",y1:"1.25",x2:"15",y2:"18.75",gradientUnits:"userSpaceOnUse",children:[(0,a.jsx)("stop",{stopColor:"#D4D4D4"}),(0,a.jsx)("stop",{offset:"1",stopColor:"#BFBFBF"})]}),(0,a.jsxs)("linearGradient",{id:"cameraRight",x1:"24.531",y1:"8.438",x2:"24.531",y2:"21.563",gradientUnits:"userSpaceOnUse",children:[(0,a.jsx)("stop",{stopColor:"#9A9A9A"}),(0,a.jsx)("stop",{offset:"1",stopColor:"#969696"})]}),(0,a.jsxs)("linearGradient",{id:"cameraLeft",x1:"11.875",y1:"7.5",x2:"11.875",y2:"22.5",gradientUnits:"userSpaceOnUse",children:[(0,a.jsx)("stop",{stopColor:"#D4D4D4"}),(0,a.jsx)("stop",{offset:"1",stopColor:"#BFBFBF"})]}),(0,a.jsxs)("linearGradient",{id:"screenTop",x1:"15",y1:"3.75",x2:"15",y2:"21.25",gradientUnits:"userSpaceOnUse",children:[(0,a.jsx)("stop",{stopColor:"#D4D4D4"}),(0,a.jsx)("stop",{offset:"1",stopColor:"#BFBFBF"})]}),(0,a.jsxs)("linearGradient",{id:"screenBottom",x1:"15",y1:"21.25",x2:"15",y2:"26.25",gradientUnits:"userSpaceOnUse",children:[(0,a.jsx)("stop",{stopColor:"#9A9A9A"}),(0,a.jsx)("stop",{offset:"1",stopColor:"#969696"})]}),(0,a.jsx)("clipPath",{id:"hangup",children:(0,a.jsx)("path",{fill:"#fff",transform:"translate(.5)",d:"M0 0h24v24H0z"})}),(0,a.jsx)("clipPath",{id:"pip",children:(0,a.jsx)("path",{fill:"#fff",d:"M0 0h24v24H0z"})}),(0,a.jsx)("clipPath",{id:"greetingSnapcallLogo",children:(0,a.jsx)("path",{fill:"#fff",d:"M0 0h72v72H0z"})})]})});const _f=yr.div`
2049
+ `;var Mf=()=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(Pf,{}),(0,a.jsx)(v.Toaster,{toastOptions:Tf,containerStyle:Rf,gutter:20,children:e=>(0,a.jsx)(v.ToastBar,{toast:e,style:{...e.style,animation:e.visible?"fadeIn 1s ease forwards":"fadeOut 1s forwards ease"},children:({message:t})=>{const r=(e=>{if(e){const t=Ef[e];if(t)return t}return null})(e.className);return(0,a.jsxs)(a.Fragment,{children:[r&&(0,a.jsx)(Of,{children:r}),(0,a.jsx)(jf,{maxWidth:e.style?.maxWidth,children:t})]})}})})]});const Lf={primaryColor:"#006AFF",backgroundColor:"#fff",controlBarBackground:"#fff",logoColor:"#000",controlsIconColor:"#4f5a65",controlsBackgroundColor:"#f9f9f9",controlsBorderColor:"#f5f5f5",controlsHoverBorderColor:"#8d8d8d",streamTileBackgroundColor:"#eaebec",streamTileBorderColor:"#d3d6d9",settingsBackgroundColor:"#fff",settingsHeaderTextColor:"#000",settingsTextColor:"#000",settingsCloseBackgroundColor:"#eaebec",popupBackgroundPrimaryColor:"#fff",popupBackgroundSecondaryColor:"#f3f3f3",popupBackgroundThirdColor:"#f7f7f7",popupBorderColor:"#d4d4d4",popupTitleColor:"#2d2d2d"},Df={primaryColor:"#006AFF",backgroundColor:"#000",controlBarBackground:"linear-gradient(180deg, #000000 0%, #131313 100%)",logoColor:"#fff",controlsIconColor:"#fff",controlsBackgroundColor:"#2d2d2d",controlsBorderColor:"#343434",controlsHoverBorderColor:"#8d8d8d",streamTileBackgroundColor:"#131313",streamTileBorderColor:"#1f1f1f",settingsBackgroundColor:"#242324",settingsHeaderTextColor:"#f9f9f9",settingsTextColor:"#fff",settingsCloseBackgroundColor:"#7b7c7e",popupBackgroundPrimaryColor:"#fff",popupBackgroundSecondaryColor:"#f3f3f3",popupBackgroundThirdColor:"#f7f7f7",popupBorderColor:"#d4d4d4",popupTitleColor:"#2d2d2d"};var If=()=>(0,a.jsx)("svg",{style:{position:"absolute",width:0,height:0},children:(0,a.jsxs)("defs",{children:[(0,a.jsxs)("linearGradient",{id:"snapcallLogoSmall",x1:"34.5",y1:"2",x2:"34.5",y2:"66.334",gradientUnits:"userSpaceOnUse",children:[(0,a.jsx)("stop",{stopColor:"#D4D4D4"}),(0,a.jsx)("stop",{offset:"1",stopColor:"#979797"})]}),(0,a.jsxs)("linearGradient",{id:"microphoneBottom",x1:"15",y1:"12.5",x2:"15",y2:"28.75",gradientUnits:"userSpaceOnUse",children:[(0,a.jsx)("stop",{stopColor:"#9A9A9A"}),(0,a.jsx)("stop",{offset:"1",stopColor:"#969696"})]}),(0,a.jsxs)("linearGradient",{id:"microphoneTop",x1:"15",y1:"1.25",x2:"15",y2:"18.75",gradientUnits:"userSpaceOnUse",children:[(0,a.jsx)("stop",{stopColor:"#D4D4D4"}),(0,a.jsx)("stop",{offset:"1",stopColor:"#BFBFBF"})]}),(0,a.jsxs)("linearGradient",{id:"cameraRight",x1:"24.531",y1:"8.438",x2:"24.531",y2:"21.563",gradientUnits:"userSpaceOnUse",children:[(0,a.jsx)("stop",{stopColor:"#9A9A9A"}),(0,a.jsx)("stop",{offset:"1",stopColor:"#969696"})]}),(0,a.jsxs)("linearGradient",{id:"cameraLeft",x1:"11.875",y1:"7.5",x2:"11.875",y2:"22.5",gradientUnits:"userSpaceOnUse",children:[(0,a.jsx)("stop",{stopColor:"#D4D4D4"}),(0,a.jsx)("stop",{offset:"1",stopColor:"#BFBFBF"})]}),(0,a.jsxs)("linearGradient",{id:"screenTop",x1:"15",y1:"3.75",x2:"15",y2:"21.25",gradientUnits:"userSpaceOnUse",children:[(0,a.jsx)("stop",{stopColor:"#D4D4D4"}),(0,a.jsx)("stop",{offset:"1",stopColor:"#BFBFBF"})]}),(0,a.jsxs)("linearGradient",{id:"screenBottom",x1:"15",y1:"21.25",x2:"15",y2:"26.25",gradientUnits:"userSpaceOnUse",children:[(0,a.jsx)("stop",{stopColor:"#9A9A9A"}),(0,a.jsx)("stop",{offset:"1",stopColor:"#969696"})]}),(0,a.jsx)("clipPath",{id:"hangup",children:(0,a.jsx)("path",{fill:"#fff",transform:"translate(.5)",d:"M0 0h24v24H0z"})}),(0,a.jsx)("clipPath",{id:"pip",children:(0,a.jsx)("path",{fill:"#fff",d:"M0 0h24v24H0z"})}),(0,a.jsx)("clipPath",{id:"greetingSnapcallLogo",children:(0,a.jsx)("path",{fill:"#fff",d:"M0 0h72v72H0z"})})]})});const Af=yr.div`
1963
2050
  display: flex;
1964
2051
  justify-content: center;
1965
2052
  align-items: center;
@@ -1968,7 +2055,7 @@ to {
1968
2055
  height: 100%;
1969
2056
  background-color: rgba(0, 0, 0, 0.75);
1970
2057
  z-index: 999;
1971
- `,kf=yr.div`
2058
+ `,Nf=yr.div`
1972
2059
  display: flex;
1973
2060
  flex-direction: column;
1974
2061
  align-items: flex-start;
@@ -1977,17 +2064,17 @@ to {
1977
2064
  max-width: 300px;
1978
2065
  border-radius: 10px;
1979
2066
  box-sizing: border-box;
1980
- `,Cf=yr.h2`
2067
+ `,Ff=yr.h2`
1981
2068
  font-size: 16px;
1982
2069
  font-weight: 700;
1983
2070
  color: #242324;
1984
2071
  margin: 0 0 10px 0;
1985
- `,Ef=yr.p`
2072
+ `,zf=yr.p`
1986
2073
  font-size: 12px;
1987
2074
  font-weight: 500;
1988
2075
  color: #2d2d2d;
1989
2076
  margin: 0 0 15px 0;
1990
- `,Pf=yr.button`
2077
+ `,Bf=yr.button`
1991
2078
  align-self: flex-end;
1992
2079
  color: #242324;
1993
2080
  background-color: transparent;
@@ -2003,7 +2090,7 @@ to {
2003
2090
  color: #fff;
2004
2091
  background-color: #242324;
2005
2092
  }
2006
- `;var Rf=({close:e})=>{const{t:t}=Fi();return(0,a.jsx)(_f,{children:(0,a.jsxs)(kf,{children:[(0,a.jsx)(Cf,{children:t("notifications.blockedMicrophonePopupTitle")}),(0,a.jsx)(Ef,{children:t("notifications.blockedMicrophonePopup")}),(0,a.jsx)(Pf,{onClick:e,children:"Dismiss"})]})})};const Tf=new Blob([new Uint8Array([255,227,24,196,0,0,0,3,72,1,64,0,0,4,132,16,31,227,192,225,76,255,67,12,255,221,27,255,228,97,73,63,255,195,131,69,192,232,223,255,255,207,102,239,255,255,255,101,158,206,70,20,59,255,254,95,70,149,66,4,16,128,0,2,2,32,240,138,255,36,106,183,255,227,24,196,59,11,34,62,80,49,135,40,0,253,29,191,209,200,141,71,7,255,252,152,74,15,130,33,185,6,63,255,252,195,70,203,86,53,15,255,255,247,103,76,121,64,32,47,255,34,227,194,209,138,76,65,77,69,51,46,57,55,170,170,170,170,170,170,170,170,170,170,255,227,24,196,73,13,153,210,100,81,135,56,0,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170])],{type:"audio/mpeg"}),jf=URL.createObjectURL(Tf);let Of;const Mf=()=>{Of?.getTracks().forEach((e=>{e.stop()})),Of=void 0},Lf=async e=>{try{const e=new Audio(jf);await e.play()}catch(t){console.warn("User interaction is required, asking audio GUM"),Of=await navigator.mediaDevices.getUserMedia({audio:!0,video:!e.audioTiles}),Of.getVideoTracks().forEach((e=>e.stop()))}},Df=gr`
2093
+ `;var Uf=({close:e})=>{const{t:t}=Fi();return(0,a.jsx)(Af,{children:(0,a.jsxs)(Nf,{children:[(0,a.jsx)(Ff,{children:t("notifications.blockedMicrophonePopupTitle")}),(0,a.jsx)(zf,{children:t("notifications.blockedMicrophonePopup")}),(0,a.jsx)(Bf,{onClick:e,children:"Dismiss"})]})})};const Vf=new Blob([new Uint8Array([255,227,24,196,0,0,0,3,72,1,64,0,0,4,132,16,31,227,192,225,76,255,67,12,255,221,27,255,228,97,73,63,255,195,131,69,192,232,223,255,255,207,102,239,255,255,255,101,158,206,70,20,59,255,254,95,70,149,66,4,16,128,0,2,2,32,240,138,255,36,106,183,255,227,24,196,59,11,34,62,80,49,135,40,0,253,29,191,209,200,141,71,7,255,252,152,74,15,130,33,185,6,63,255,252,195,70,203,86,53,15,255,255,247,103,76,121,64,32,47,255,34,227,194,209,138,76,65,77,69,51,46,57,55,170,170,170,170,170,170,170,170,170,170,255,227,24,196,73,13,153,210,100,81,135,56,0,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170])],{type:"audio/mpeg"}),Hf=URL.createObjectURL(Vf);let qf;const Wf=()=>{qf?.getTracks().forEach((e=>{e.stop()})),qf=void 0},$f=async e=>{try{const e=new Audio(Hf);await e.play()}catch(t){console.warn("User interaction is required, asking audio GUM"),qf=await navigator.mediaDevices.getUserMedia({audio:!0,video:!e.audioTiles}),qf.getVideoTracks().forEach((e=>e.stop()))}},Kf=gr`
2007
2094
  ::-webkit-scrollbar {
2008
2095
  display: none;
2009
2096
  width: 0;
@@ -2046,7 +2133,7 @@ to {
2046
2133
  src: url('https://cdn.snapcall.io/fonts/Gazpacho/Bold.woff2') format('woff2'),
2047
2134
  url('https://cdn.snapcall.io/fonts/Gazpacho/Bold.woff') format('woff');
2048
2135
  }
2049
- `,If=yr.div`
2136
+ `,Gf=yr.div`
2050
2137
  display: flex;
2051
2138
  flex-direction: column;
2052
2139
  width: 100%;
@@ -2067,12 +2154,12 @@ to {
2067
2154
  font-size: 16px;
2068
2155
  font-family: Lato;
2069
2156
  }
2070
- `;je=o("85Hg2"),je=o("85Hg2"),je=o("85Hg2");function Af(e,t,r){let[n,i]=(0,je.useState)(e||t),o=(0,je.useRef)(void 0!==e),a=o.current,s=void 0!==e,c=(0,je.useRef)(n);a!==s&&console.warn(`WARN: A component changed from ${a?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}.`),o.current=s;let l=(0,je.useCallback)(((e,...t)=>{let n=(e,...t)=>{r&&(Object.is(c.current,e)||r(e,...t)),s||(c.current=e)};if("function"==typeof e){console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),i(((r,...i)=>{let o=e(s?c.current:r,...i);return n(o,...t),s?r:o}))}else s||i(e),n(e,...t)}),[s,r]);return s?c.current=e:e=n,[e,l]}function Nf(e){let[t,r]=Af(e.isOpen,e.defaultOpen||!1,e.onOpenChange);return{isOpen:t,setOpen:r,open(){r(!0)},close(){r(!1)},toggle(){r(!t)}}}function Ff({mode:e="photo",requestedMedia:t="camera",permissionBlockedModalState:r,captureThumbnail:n}){const[i,o]=(0,je.useState)(e),[a,s]=(0,je.useState)(!1),[c]=(0,je.useState)(t),[l,d]=(0,je.useState)(void 0),[u,p]=(0,je.useState)(0),[h,f]=(0,je.useState)([]),m=Nf({}),[g,v]=(0,je.useState)(!1);return(0,je.useEffect)((()=>{if(l){const e=setInterval((()=>{const e=(Date.now()-l)/1e3;p(e)}),1e3);return()=>clearInterval(e)}p(0)}),[l,p]),{requestedMedia:c,mode:i,setMode:o,streaming:a,setStreaming:s,permissionBlockedModalState:r,startRecordTime:l,setStartRecordTime:d,timer:u,assetsPopupState:m,assets:h,setAssets:f,assetLoading:g,setAssetLoading:v,captureThumbnail:n}}je=o("85Hg2");var zf={};
2157
+ `;je=o("85Hg2"),je=o("85Hg2"),je=o("85Hg2");function Zf(e,t,r){let[n,i]=(0,je.useState)(e||t),o=(0,je.useRef)(void 0!==e),a=o.current,s=void 0!==e,c=(0,je.useRef)(n);a!==s&&console.warn(`WARN: A component changed from ${a?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}.`),o.current=s;let l=(0,je.useCallback)(((e,...t)=>{let n=(e,...t)=>{r&&(Object.is(c.current,e)||r(e,...t)),s||(c.current=e)};if("function"==typeof e){console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),i(((r,...i)=>{let o=e(s?c.current:r,...i);return n(o,...t),s?r:o}))}else s||i(e),n(e,...t)}),[s,r]);return s?c.current=e:e=n,[e,l]}function Qf(e){let[t,r]=Zf(e.isOpen,e.defaultOpen||!1,e.onOpenChange);return{isOpen:t,setOpen:r,open(){r(!0)},close(){r(!1)},toggle(){r(!t)}}}function Yf({mode:e="photo",requestedMedia:t="camera",permissionBlockedModalState:r,captureThumbnail:n}){const[i,o]=(0,je.useState)(e),[a,s]=(0,je.useState)(!1),[c]=(0,je.useState)(t),[l,d]=(0,je.useState)(void 0),[u,p]=(0,je.useState)(0),[h,f]=(0,je.useState)([]),m=Qf({}),[g,v]=(0,je.useState)(!1);return(0,je.useEffect)((()=>{if(l){const e=setInterval((()=>{const e=(Date.now()-l)/1e3;p(e)}),1e3);return()=>clearInterval(e)}p(0)}),[l,p]),{requestedMedia:c,mode:i,setMode:o,streaming:a,setStreaming:s,permissionBlockedModalState:r,startRecordTime:l,setStartRecordTime:d,timer:u,assetsPopupState:m,assets:h,setAssets:f,assetLoading:g,setAssetLoading:v,captureThumbnail:n}}je=o("85Hg2");var Jf={};
2071
2158
  /*!
2072
2159
  Copyright (c) 2018 Jed Watson.
2073
2160
  Licensed under the MIT License (MIT), see
2074
2161
  http://jedwatson.github.io/classnames
2075
- */!function(){"use strict";var e={}.hasOwnProperty;function t(){for(var r=[],n=0;n<arguments.length;n++){var i=arguments[n];if(i){var o=typeof i;if("string"===o||"number"===o)r.push(i);else if(Array.isArray(i)){if(i.length){var a=t.apply(null,i);a&&r.push(a)}}else if("object"===o){if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]")){r.push(i.toString());continue}for(var s in i)e.call(i,s)&&i[s]&&r.push(s)}}}return r.join(" ")}zf?(t.default=t,zf=t):"function"==typeof define&&"object"==typeof define.amd&&define.amd?define("classnames",[],(function(){return t})):window.classNames=t}();je=o("85Hg2");function Bf(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}je=o("85Hg2"),je=o("85Hg2"),je=o("85Hg2");const Uf={prefix:String(Math.round(1e10*Math.random())),current:0},Vf=r(je).createContext(Uf);Boolean("undefined"!=typeof window&&window.document&&window.document.createElement);function Hf(){let e=(0,je.useContext)(Vf)!==Uf,[t,r]=(0,je.useState)(e);return"undefined"!=typeof window&&e&&(0,je.useLayoutEffect)((()=>{r(!1)}),[]),t}function qf(e){var t,r,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=qf(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}var Wf=function(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=qf(e))&&(n&&(n+=" "),n+=t);return n};const $f="undefined"!=typeof window?r(je).useLayoutEffect:()=>{};let Kf=new Map;function Gf(e,t){if(e===t)return e;let r=Kf.get(e);if(r)return r(t),t;let n=Kf.get(t);return n?(n(e),e):t}function Zf(...e){return(...t)=>{for(let r of e)"function"==typeof r&&r(...t)}}function Qf(...e){let t={...e[0]};for(let r=1;r<e.length;r++){let n=e[r];for(let e in n){let r=t[e],i=n[e];"function"==typeof r&&"function"==typeof i&&"o"===e[0]&&"n"===e[1]&&e.charCodeAt(2)>=65&&e.charCodeAt(2)<=90?t[e]=Zf(r,i):"className"!==e&&"UNSAFE_className"!==e||"string"!=typeof r||"string"!=typeof i?"id"===e&&r&&i?t.id=Gf(r,i):t[e]=void 0!==i?i:r:t[e]=Wf(r,i)}}return t}const Yf=new Set(["id"]),Jf=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),Xf=/^(data-.*)$/;function em(e,t={}){let{labelable:r,propNames:n}=t,i={};for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(Yf.has(t)||r&&Jf.has(t)||(null==n?void 0:n.has(t))||Xf.test(t))&&(i[t]=e[t]);return i}function tm(e){if(function(){if(null==rm){rm=!1;try{document.createElement("div").focus({get preventScroll(){return rm=!0,!0}})}catch(e){}}return rm}())e.focus({preventScroll:!0});else{let t=function(e){var t=e.parentNode,r=[],n=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==n;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&r.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;n instanceof HTMLElement&&r.push({element:n,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft});return r}(e);e.focus(),function(e){for(let{element:t,scrollTop:r,scrollLeft:n}of e)t.scrollTop=r,t.scrollLeft=n}(t)}}let rm=null;let nm=new Map,im=new Set;function om(){if("undefined"==typeof window)return;let e=t=>{let r=nm.get(t.target);if(r&&(r.delete(t.propertyName),0===r.size&&(t.target.removeEventListener("transitioncancel",e),nm.delete(t.target)),0===nm.size)){for(let e of im)e();im.clear()}};document.body.addEventListener("transitionrun",(t=>{let r=nm.get(t.target);r||(r=new Set,nm.set(t.target,r),t.target.addEventListener("transitioncancel",e)),r.add(t.propertyName)})),document.body.addEventListener("transitionend",e)}function am(e){requestAnimationFrame((()=>{0===nm.size?e():im.add(e)}))}"undefined"!=typeof document&&("loading"!==document.readyState?om():document.addEventListener("DOMContentLoaded",om));function sm(){let e=(0,je.useRef)(new Map),t=(0,je.useCallback)(((t,r,n,i)=>{let o=(null==i?void 0:i.once)?(...t)=>{e.current.delete(n),n(...t)}:n;e.current.set(n,{type:r,eventTarget:t,fn:o,options:i}),t.addEventListener(r,n,i)}),[]),r=(0,je.useCallback)(((t,r,n,i)=>{var o;let a=(null===(o=e.current.get(n))||void 0===o?void 0:o.fn)||n;t.removeEventListener(r,a,i),e.current.delete(n)}),[]),n=(0,je.useCallback)((()=>{e.current.forEach(((e,t)=>{r(e.eventTarget,e.type,t,e.options)}))}),[r]);return(0,je.useEffect)((()=>n),[n]),{addGlobalListener:t,removeGlobalListener:r,removeAllGlobalListeners:n}}function cm(e,t){$f((()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref.current=null}}),[e,t])}function lm(e){for(;e&&!dm(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}function dm(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}let um="undefined"!=typeof window&&window.visualViewport;function pm(){let[e,t]=(0,je.useState)((()=>hm()));return(0,je.useEffect)((()=>{let e=()=>{t((e=>{let t=hm();return t.width===e.width&&t.height===e.height?e:t}))};return um?um.addEventListener("resize",e):window.addEventListener("resize",e),()=>{um?um.removeEventListener("resize",e):window.removeEventListener("resize",e)}}),[]),e}function hm(){return{width:(null==um?void 0:um.width)||window.innerWidth,height:(null==um?void 0:um.height)||window.innerHeight}}new Map;function fm(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.brands.some((t=>e.test(t.brand))))||e.test(window.navigator.userAgent))}function mm(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform)}function gm(){return mm(/^Mac/i)}function vm(){return mm(/^iPhone/i)||mm(/^iPad/i)||gm()&&navigator.maxTouchPoints>1}function ym(e){return!(0!==e.mozInputSource||!e.isTrusted)||(fm(/Android/i)&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}je=o("85Hg2");let bm="default",wm="",xm=new WeakMap;function Sm(e){vm()?("default"===bm&&(wm=document.documentElement.style.webkitUserSelect,document.documentElement.style.webkitUserSelect="none"),bm="disabled"):(e instanceof HTMLElement||e instanceof SVGElement)&&(xm.set(e,e.style.userSelect),e.style.userSelect="none")}function _m(e){if(vm()){if("disabled"!==bm)return;bm="restoring",setTimeout((()=>{am((()=>{"restoring"===bm&&("none"===document.documentElement.style.webkitUserSelect&&(document.documentElement.style.webkitUserSelect=wm||""),wm="",bm="default")}))}),300)}else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&xm.has(e)){let t=xm.get(e);"none"===e.style.userSelect&&(e.style.userSelect=t),""===e.getAttribute("style")&&e.removeAttribute("style"),xm.delete(e)}}const km=r(je).createContext(null);function Cm(e){let{onPress:t,onPressChange:r,onPressStart:n,onPressEnd:i,onPressUp:o,isDisabled:a,isPressed:s,preventFocusOnPress:c,shouldCancelOnPointerExit:l,allowTextSelectionOnPress:d,ref:u,...p}=function(e){let t=(0,je.useContext)(km);if(t){let{register:r,...n}=t;e=Qf(n,e),r()}return cm(t,e.ref),e}(e),h=(0,je.useRef)(null);h.current={onPress:t,onPressChange:r,onPressStart:n,onPressEnd:i,onPressUp:o,isDisabled:a,shouldCancelOnPointerExit:l};let[f,m]=(0,je.useState)(!1),g=(0,je.useRef)({isPressed:!1,ignoreEmulatedMouseEvents:!1,ignoreClickAfterPress:!1,didFirePressStart:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null}),{addGlobalListener:v,removeAllGlobalListeners:y}=sm(),b=(0,je.useMemo)((()=>{let e=g.current,t=(t,r)=>{let{onPressStart:n,onPressChange:i,isDisabled:o}=h.current;o||e.didFirePressStart||(n&&n({type:"pressstart",pointerType:r,target:t.currentTarget,shiftKey:t.shiftKey,metaKey:t.metaKey,ctrlKey:t.ctrlKey,altKey:t.altKey}),i&&i(!0),e.didFirePressStart=!0,m(!0))},r=(t,r,n=!0)=>{let{onPressEnd:i,onPressChange:o,onPress:a,isDisabled:s}=h.current;e.didFirePressStart&&(e.ignoreClickAfterPress=!0,e.didFirePressStart=!1,i&&i({type:"pressend",pointerType:r,target:t.currentTarget,shiftKey:t.shiftKey,metaKey:t.metaKey,ctrlKey:t.ctrlKey,altKey:t.altKey}),o&&o(!1),m(!1),a&&n&&!s&&a({type:"press",pointerType:r,target:t.currentTarget,shiftKey:t.shiftKey,metaKey:t.metaKey,ctrlKey:t.ctrlKey,altKey:t.altKey}))},n=(e,t)=>{let{onPressUp:r,isDisabled:n}=h.current;n||r&&r({type:"pressup",pointerType:t,target:e.currentTarget,shiftKey:e.shiftKey,metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey})},i=t=>{e.isPressed&&(e.isOverTarget&&r(Tm(e.target,t),e.pointerType,!1),e.isPressed=!1,e.isOverTarget=!1,e.activePointerId=null,e.pointerType=null,y(),d||_m(e.target))},o={onKeyDown(r){Pm(r.nativeEvent,r.currentTarget)&&r.currentTarget.contains(r.target)?(Mm(r.target,r.key)&&r.preventDefault(),r.stopPropagation(),e.isPressed||r.repeat||(e.target=r.currentTarget,e.isPressed=!0,t(r,"keyboard"),v(document,"keyup",s,!1))):"Enter"===r.key&&Em(r.currentTarget)&&r.stopPropagation()},onKeyUp(t){Pm(t.nativeEvent,t.currentTarget)&&!t.repeat&&t.currentTarget.contains(t.target)&&n(Tm(e.target,t),"keyboard")},onClick(i){i&&!i.currentTarget.contains(i.target)||i&&0===i.button&&(i.stopPropagation(),a&&i.preventDefault(),e.ignoreClickAfterPress||e.ignoreEmulatedMouseEvents||"virtual"!==e.pointerType&&!ym(i.nativeEvent)||(a||c||tm(i.currentTarget),t(i,"virtual"),n(i,"virtual"),r(i,"virtual")),e.ignoreEmulatedMouseEvents=!1,e.ignoreClickAfterPress=!1)}},s=t=>{if(e.isPressed&&Pm(t,e.target)){Mm(t.target,t.key)&&t.preventDefault(),t.stopPropagation(),e.isPressed=!1;let n=t.target;r(Tm(e.target,t),"keyboard",e.target.contains(n)),y(),e.target instanceof HTMLElement&&e.target.contains(n)&&(Em(e.target)||"link"===e.target.getAttribute("role"))&&e.target.click()}};if("undefined"!=typeof PointerEvent){o.onPointerDown=r=>{var n;0===r.button&&r.currentTarget.contains(r.target)&&(0===(n=r.nativeEvent).width&&0===n.height||1===n.width&&1===n.height&&0===n.pressure&&0===n.detail&&"mouse"===n.pointerType?e.pointerType="virtual":(Om(r.currentTarget)&&r.preventDefault(),e.pointerType=r.pointerType,r.stopPropagation(),e.isPressed||(e.isPressed=!0,e.isOverTarget=!0,e.activePointerId=r.pointerId,e.target=r.currentTarget,a||c||tm(r.currentTarget),d||Sm(e.target),t(r,e.pointerType),v(document,"pointermove",s,!1),v(document,"pointerup",l,!1),v(document,"pointercancel",u,!1))))},o.onMouseDown=e=>{e.currentTarget.contains(e.target)&&0===e.button&&(Om(e.currentTarget)&&e.preventDefault(),e.stopPropagation())},o.onPointerUp=t=>{t.currentTarget.contains(t.target)&&"virtual"!==e.pointerType&&0===t.button&&jm(t,t.currentTarget)&&n(t,e.pointerType||t.pointerType)};let s=n=>{n.pointerId===e.activePointerId&&(jm(n,e.target)?e.isOverTarget||(e.isOverTarget=!0,t(Tm(e.target,n),e.pointerType)):e.isOverTarget&&(e.isOverTarget=!1,r(Tm(e.target,n),e.pointerType,!1),h.current.shouldCancelOnPointerExit&&i(n)))},l=t=>{t.pointerId===e.activePointerId&&e.isPressed&&0===t.button&&(jm(t,e.target)?r(Tm(e.target,t),e.pointerType):e.isOverTarget&&r(Tm(e.target,t),e.pointerType,!1),e.isPressed=!1,e.isOverTarget=!1,e.activePointerId=null,e.pointerType=null,y(),d||_m(e.target))},u=e=>{i(e)};o.onDragStart=e=>{e.currentTarget.contains(e.target)&&i(e)}}else{o.onMouseDown=r=>{0===r.button&&r.currentTarget.contains(r.target)&&(Om(r.currentTarget)&&r.preventDefault(),r.stopPropagation(),e.ignoreEmulatedMouseEvents||(e.isPressed=!0,e.isOverTarget=!0,e.target=r.currentTarget,e.pointerType=ym(r.nativeEvent)?"virtual":"mouse",a||c||tm(r.currentTarget),t(r,e.pointerType),v(document,"mouseup",s,!1)))},o.onMouseEnter=r=>{r.currentTarget.contains(r.target)&&(r.stopPropagation(),e.isPressed&&!e.ignoreEmulatedMouseEvents&&(e.isOverTarget=!0,t(r,e.pointerType)))},o.onMouseLeave=t=>{t.currentTarget.contains(t.target)&&(t.stopPropagation(),e.isPressed&&!e.ignoreEmulatedMouseEvents&&(e.isOverTarget=!1,r(t,e.pointerType,!1),h.current.shouldCancelOnPointerExit&&i(t)))},o.onMouseUp=t=>{t.currentTarget.contains(t.target)&&(e.ignoreEmulatedMouseEvents||0!==t.button||n(t,e.pointerType))};let s=t=>{0===t.button&&(e.isPressed=!1,y(),e.ignoreEmulatedMouseEvents?e.ignoreEmulatedMouseEvents=!1:(jm(t,e.target)?r(Tm(e.target,t),e.pointerType):e.isOverTarget&&r(Tm(e.target,t),e.pointerType,!1),e.isOverTarget=!1))};o.onTouchStart=r=>{if(!r.currentTarget.contains(r.target))return;r.stopPropagation();let n=function(e){const{targetTouches:t}=e;return t.length>0?t[0]:null}(r.nativeEvent);n&&(e.activePointerId=n.identifier,e.ignoreEmulatedMouseEvents=!0,e.isOverTarget=!0,e.isPressed=!0,e.target=r.currentTarget,e.pointerType="touch",a||c||tm(r.currentTarget),d||Sm(e.target),t(r,e.pointerType),v(window,"scroll",l,!0))},o.onTouchMove=n=>{if(!n.currentTarget.contains(n.target))return;if(n.stopPropagation(),!e.isPressed)return;let o=Rm(n.nativeEvent,e.activePointerId);o&&jm(o,n.currentTarget)?e.isOverTarget||(e.isOverTarget=!0,t(n,e.pointerType)):e.isOverTarget&&(e.isOverTarget=!1,r(n,e.pointerType,!1),h.current.shouldCancelOnPointerExit&&i(n))},o.onTouchEnd=t=>{if(!t.currentTarget.contains(t.target))return;if(t.stopPropagation(),!e.isPressed)return;let i=Rm(t.nativeEvent,e.activePointerId);i&&jm(i,t.currentTarget)?(n(t,e.pointerType),r(t,e.pointerType)):e.isOverTarget&&r(t,e.pointerType,!1),e.isPressed=!1,e.activePointerId=null,e.isOverTarget=!1,e.ignoreEmulatedMouseEvents=!0,d||_m(e.target),y()},o.onTouchCancel=t=>{t.currentTarget.contains(t.target)&&(t.stopPropagation(),e.isPressed&&i(t))};let l=t=>{e.isPressed&&t.target.contains(e.target)&&i({currentTarget:e.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};o.onDragStart=e=>{e.currentTarget.contains(e.target)&&i(e)}}return o}),[v,a,c,y,d]);return(0,je.useEffect)((()=>()=>{d||_m(g.current.target)}),[d]),{isPressed:s||f,pressProps:Qf(p,b)}}function Em(e){return"A"===e.tagName&&e.hasAttribute("href")}function Pm(e,t){const{key:r,code:n}=e,i=t,o=i.getAttribute("role");return!("Enter"!==r&&" "!==r&&"Spacebar"!==r&&"Space"!==n||i instanceof HTMLInputElement&&!Dm(i,r)||i instanceof HTMLTextAreaElement||i.isContentEditable||Em(i)&&("button"!==o||"Enter"===r)||"link"===o&&"Enter"!==r)}function Rm(e,t){const r=e.changedTouches;for(let e=0;e<r.length;e++){const n=r[e];if(n.identifier===t)return n}return null}function Tm(e,t){return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey}}function jm(e,t){let r=t.getBoundingClientRect(),n=function(e){let t=e.width/2||e.radiusX||0,r=e.height/2||e.radiusY||0;return{top:e.clientY-r,right:e.clientX+t,bottom:e.clientY+r,left:e.clientX-t}}(e);return o=n,!((i=r).left>o.right||o.left>i.right||i.top>o.bottom||o.top>i.bottom);var i,o}function Om(e){return!(e instanceof HTMLElement&&e.draggable)}function Mm(e,t){return e instanceof HTMLInputElement?!Dm(e,t):!(e instanceof HTMLButtonElement)||"submit"!==e.type}km.displayName="PressResponderContext";const Lm=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Dm(e,t){return"checkbox"===e.type||"radio"===e.type?" "===t:Lm.has(e.type)}r(je).forwardRef((({children:e,...t},n)=>{let i=(0,je.useRef)();n=null!=n?n:i;let{pressProps:o}=Cm({...t,ref:n}),a=r(je).Children.only(e);return r(je).cloneElement(a,{ref:n,...Qf(a.props,o)})})),r(je).forwardRef((({children:e,...t},n)=>{let i=(0,je.useRef)(!1),o=(0,je.useContext)(km),a=Qf(o||{},{...t,ref:n||(null==o?void 0:o.ref),register(){i.current=!0,o&&o.register()}});return cm(o,n),(0,je.useEffect)((()=>{i.current||console.warn("A PressResponder was rendered without a pressable child. Either call the usePress hook, or wrap your DOM node with <Pressable> component.")}),[]),r(je).createElement(km.Provider,{value:a},e)}));class Im{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(e,t){this.nativeEvent=t,this.target=t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget,this.bubbles=t.bubbles,this.cancelable=t.cancelable,this.defaultPrevented=t.defaultPrevented,this.eventPhase=t.eventPhase,this.isTrusted=t.isTrusted,this.timeStamp=t.timeStamp,this.type=e}}function Am(e){let t=(0,je.useRef)({isFocused:!1,onBlur:e,observer:null});return t.current.onBlur=e,$f((()=>{const e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}}),[]),(0,je.useCallback)((e=>{if(e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement){t.current.isFocused=!0;let r=e.target,n=e=>{var n,i;t.current.isFocused=!1,r.disabled&&(null===(i=(n=t.current).onBlur)||void 0===i||i.call(n,new Im("blur",e))),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};r.addEventListener("focusout",n,{once:!0}),t.current.observer=new MutationObserver((()=>{t.current.isFocused&&r.disabled&&(t.current.observer.disconnect(),r.dispatchEvent(new FocusEvent("blur")),r.dispatchEvent(new FocusEvent("focusout",{bubbles:!0})))})),t.current.observer.observe(r,{attributes:!0,attributeFilter:["disabled"]})}}),[])}function Nm(e){let{isDisabled:t,onFocus:r,onBlur:n,onFocusChange:i}=e;const o=(0,je.useCallback)((e=>{if(e.target===e.currentTarget)return n&&n(e),i&&i(!1),!0}),[n,i]),a=Am(o),s=(0,je.useCallback)((e=>{e.target===e.currentTarget&&(r&&r(e),i&&i(!0),a(e))}),[i,r,a]);return{focusProps:{onFocus:!t&&(r||i||n)?s:void 0,onBlur:t||!n&&!i?null:o}}}let Fm=null,zm=new Set,Bm=!1,Um=!1,Vm=!1;const Hm={Tab:!0,Escape:!0};function qm(e,t){for(let r of zm)r(e,t)}function Wm(e){Um=!0,function(e){return!(e.metaKey||!gm()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key)}(e)&&(Fm="keyboard",qm("keyboard",e))}function $m(e){Fm="pointer","mousedown"!==e.type&&"pointerdown"!==e.type||(Um=!0,qm("pointer",e))}function Km(e){ym(e)&&(Um=!0,Fm="virtual")}function Gm(e){e.target!==window&&e.target!==document&&(Um||Vm||(Fm="virtual",qm("virtual",e)),Um=!1,Vm=!1)}function Zm(){Um=!1,Vm=!0}function Qm(){if("undefined"==typeof window||Bm)return;let e=HTMLElement.prototype.focus;HTMLElement.prototype.focus=function(){Um=!0,e.apply(this,arguments)},document.addEventListener("keydown",Wm,!0),document.addEventListener("keyup",Wm,!0),document.addEventListener("click",Km,!0),window.addEventListener("focus",Gm,!0),window.addEventListener("blur",Zm,!1),"undefined"!=typeof PointerEvent?(document.addEventListener("pointerdown",$m,!0),document.addEventListener("pointermove",$m,!0),document.addEventListener("pointerup",$m,!0)):(document.addEventListener("mousedown",$m,!0),document.addEventListener("mousemove",$m,!0),document.addEventListener("mouseup",$m,!0)),Bm=!0}function Ym(){return"pointer"!==Fm}function Jm(e,t,r){Qm(),(0,je.useEffect)((()=>{let t=(t,n)=>{(function(e,t,r){return!(e&&"keyboard"===t&&r instanceof KeyboardEvent&&!Hm[r.key])})(null==r?void 0:r.isTextInput,t,n)&&e(Ym())};return zm.add(t),()=>{zm.delete(t)}}),t)}function Xm(e){let{isDisabled:t,onBlurWithin:r,onFocusWithin:n,onFocusWithinChange:i}=e,o=(0,je.useRef)({isFocusWithin:!1}),a=(0,je.useCallback)((e=>{o.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)&&(o.current.isFocusWithin=!1,r&&r(e),i&&i(!1))}),[r,i,o]),s=Am(a),c=(0,je.useCallback)((e=>{o.current.isFocusWithin||(n&&n(e),i&&i(!0),o.current.isFocusWithin=!0,s(e))}),[n,i,s]);return t?{focusWithinProps:{onFocus:null,onBlur:null}}:{focusWithinProps:{onFocus:c,onBlur:a}}}"undefined"!=typeof document&&("loading"!==document.readyState?Qm():document.addEventListener("DOMContentLoaded",Qm));let eg=!1,tg=0;function rg(){eg=!0,setTimeout((()=>{eg=!1}),50)}function ng(e){"touch"===e.pointerType&&rg()}function ig(){if("undefined"!=typeof document)return"undefined"!=typeof PointerEvent?document.addEventListener("pointerup",ng):document.addEventListener("touchend",rg),tg++,()=>{tg--,tg>0||("undefined"!=typeof PointerEvent?document.removeEventListener("pointerup",ng):document.removeEventListener("touchend",rg))}}function og(e){let{onHoverStart:t,onHoverChange:r,onHoverEnd:n,isDisabled:i}=e,[o,a]=(0,je.useState)(!1),s=(0,je.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;(0,je.useEffect)(ig,[]);let{hoverProps:c,triggerHoverEnd:l}=(0,je.useMemo)((()=>{let e=(e,n)=>{if(s.pointerType=n,i||"touch"===n||s.isHovered||!e.currentTarget.contains(e.target))return;s.isHovered=!0;let o=e.currentTarget;s.target=o,t&&t({type:"hoverstart",target:o,pointerType:n}),r&&r(!0),a(!0)},o=(e,t)=>{if(s.pointerType="",s.target=null,"touch"===t||!s.isHovered)return;s.isHovered=!1;let i=e.currentTarget;n&&n({type:"hoverend",target:i,pointerType:t}),r&&r(!1),a(!1)},c={};return"undefined"!=typeof PointerEvent?(c.onPointerEnter=t=>{eg&&"mouse"===t.pointerType||e(t,t.pointerType)},c.onPointerLeave=e=>{!i&&e.currentTarget.contains(e.target)&&o(e,e.pointerType)}):(c.onTouchStart=()=>{s.ignoreEmulatedMouseEvents=!0},c.onMouseEnter=t=>{s.ignoreEmulatedMouseEvents||eg||e(t,"mouse"),s.ignoreEmulatedMouseEvents=!1},c.onMouseLeave=e=>{!i&&e.currentTarget.contains(e.target)&&o(e,"mouse")}),{hoverProps:c,triggerHoverEnd:o}}),[t,r,n,i,s]);return(0,je.useEffect)((()=>{i&&l({currentTarget:s.target},s.pointerType)}),[i]),{hoverProps:c,isHovered:o}}function ag(e){let{ref:t,onInteractOutside:r,isDisabled:n,onInteractOutsideStart:i}=e,o=(0,je.useRef)({isPointerDown:!1,ignoreEmulatedMouseEvents:!1,onInteractOutside:r,onInteractOutsideStart:i}).current;o.onInteractOutside=r,o.onInteractOutsideStart=i,(0,je.useEffect)((()=>{if(n)return;let e=e=>{sg(e,t)&&o.onInteractOutside&&(o.onInteractOutsideStart&&o.onInteractOutsideStart(e),o.isPointerDown=!0)};if("undefined"!=typeof PointerEvent){let r=e=>{o.isPointerDown&&o.onInteractOutside&&sg(e,t)&&(o.isPointerDown=!1,o.onInteractOutside(e))};return document.addEventListener("pointerdown",e,!0),document.addEventListener("pointerup",r,!0),()=>{document.removeEventListener("pointerdown",e,!0),document.removeEventListener("pointerup",r,!0)}}{let r=e=>{o.ignoreEmulatedMouseEvents?o.ignoreEmulatedMouseEvents=!1:o.isPointerDown&&o.onInteractOutside&&sg(e,t)&&(o.isPointerDown=!1,o.onInteractOutside(e))},n=e=>{o.ignoreEmulatedMouseEvents=!0,o.onInteractOutside&&o.isPointerDown&&sg(e,t)&&(o.isPointerDown=!1,o.onInteractOutside(e))};return document.addEventListener("mousedown",e,!0),document.addEventListener("mouseup",r,!0),document.addEventListener("touchstart",e,!0),document.addEventListener("touchend",n,!0),()=>{document.removeEventListener("mousedown",e,!0),document.removeEventListener("mouseup",r,!0),document.removeEventListener("touchstart",e,!0),document.removeEventListener("touchend",n,!0)}}}),[t,o,n])}function sg(e,t){if(e.button>0)return!1;if(e.target){const t=e.target.ownerDocument;if(!t||!t.documentElement.contains(e.target))return!1}return t.current&&!t.current.contains(e.target)}function cg(e){if(!e)return;let t=!0;return r=>{let n={...r,preventDefault(){r.preventDefault()},isDefaultPrevented:()=>r.isDefaultPrevented(),stopPropagation(){console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior.")},continuePropagation(){t=!1}};e(n),t&&r.stopPropagation()}}function lg(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:cg(e.onKeyDown),onKeyUp:cg(e.onKeyUp)}}}function dg(e){if("virtual"===Fm){let t=document.activeElement;am((()=>{document.activeElement===t&&document.contains(e)&&tm(e)}))}else tm(e)}function ug(e,t){return"#comment"!==e.nodeName&&function(e){if(!(e instanceof HTMLElement||e instanceof SVGElement))return!1;let{display:t,visibility:r}=e.style,n="none"!==t&&"hidden"!==r&&"collapse"!==r;if(n){const{getComputedStyle:t}=e.ownerDocument.defaultView;let{display:r,visibility:i}=t(e);n="none"!==r&&"hidden"!==i&&"collapse"!==i}return n}(e)&&function(e,t){return!e.hasAttribute("hidden")&&("DETAILS"!==e.nodeName||!t||"SUMMARY"===t.nodeName||e.hasAttribute("open"))}(e,t)&&(!e.parentElement||ug(e.parentElement,e))}const pg=r(je).createContext(null);let hg=null;function fg(e){let{children:t,contain:n,restoreFocus:i,autoFocus:o}=e,a=(0,je.useRef)(),s=(0,je.useRef)(),c=(0,je.useRef)([]),l=(0,je.useContext)(pg);var d;let u=null!==(d=null==l?void 0:l.scopeRef)&&void 0!==d?d:null,p=(0,je.useMemo)((()=>hg&&Tg.getTreeNode(hg)&&!_g(hg,u)?hg:u),[u]);$f((()=>{let e=a.current.nextSibling,t=[];for(;e&&e!==s.current;)t.push(e),e=e.nextSibling;c.current=t}),[t,p]),Tg.getTreeNode(p)&&!Tg.getTreeNode(c)&&Tg.addTreeNode(c,p),Tg.getTreeNode(c).contain=n,function(e,t,r){$f((()=>{if(t||r)return;let n=e.current,i=t=>{let r=t.target;xg(r,e.current)?hg=e:wg(r)||(hg=null)};return document.addEventListener("focusin",i,!1),n.forEach((e=>e.addEventListener("focusin",i,!1))),()=>{document.removeEventListener("focusin",i,!1),n.forEach((e=>e.removeEventListener("focusin",i,!1)))}}),[e,t,r])}(c,i,n),function(e,t){let r=(0,je.useRef)(),n=(0,je.useRef)(null);$f((()=>{let i=e.current;if(!t)return void(n.current&&(cancelAnimationFrame(n.current),n.current=null));let o=t=>{if("Tab"!==t.key||t.altKey||t.ctrlKey||t.metaKey||!bg(e))return;let r=document.activeElement,n=e.current;if(!xg(r,n))return;let i=Eg(yg(n),{tabbable:!0},n);i.currentNode=r;let o=t.shiftKey?i.previousNode():i.nextNode();o||(i.currentNode=t.shiftKey?n[n.length-1].nextElementSibling:n[0].previousElementSibling,o=t.shiftKey?i.previousNode():i.nextNode()),t.preventDefault(),o&&kg(o,!0)},a=t=>{hg&&!_g(hg,e)||!xg(t.target,e.current)?bg(e)&&!Sg(t.target,e)?r.current?r.current.focus():hg&&Cg(hg.current):bg(e)&&(r.current=t.target):(hg=e,r.current=t.target)},s=t=>{n.current=requestAnimationFrame((()=>{bg(e)&&!Sg(document.activeElement,e)&&(hg=e,document.body.contains(t.target)?(r.current=t.target,r.current.focus()):hg&&Cg(hg.current))}))};return document.addEventListener("keydown",o,!1),document.addEventListener("focusin",a,!1),i.forEach((e=>e.addEventListener("focusin",a,!1))),i.forEach((e=>e.addEventListener("focusout",s,!1))),()=>{document.removeEventListener("keydown",o,!1),document.removeEventListener("focusin",a,!1),i.forEach((e=>e.removeEventListener("focusin",a,!1))),i.forEach((e=>e.removeEventListener("focusout",s,!1)))}}),[e,t]),(0,je.useEffect)((()=>()=>{n.current&&cancelAnimationFrame(n.current)}),[n])}(c,n),function(e,t,r){const n=(0,je.useRef)("undefined"!=typeof document?document.activeElement:null);$f((()=>{let n=e.current;if(!t||r)return;let i=()=>{hg&&!_g(hg,e)||(hg=e)};return document.addEventListener("focusin",i,!1),n.forEach((e=>e.addEventListener("focusin",i,!1))),()=>{document.removeEventListener("focusin",i,!1),n.forEach((e=>e.removeEventListener("focusin",i,!1)))}}),[e,r]),$f((()=>{if(!t)return;Tg.getTreeNode(e).nodeToRestore=n.current;let i=t=>{if("Tab"!==t.key||t.altKey||t.ctrlKey||t.metaKey)return;let r=document.activeElement;if(!xg(r,e.current))return;let n=Tg.getTreeNode(e).nodeToRestore,i=Eg(document.body,{tabbable:!0});i.currentNode=r;let o=t.shiftKey?i.previousNode():i.nextNode();if(document.body.contains(n)&&n!==document.body||(n=null,Tg.getTreeNode(e).nodeToRestore=null),(!o||!xg(o,e.current))&&n){i.currentNode=n;do{o=t.shiftKey?i.previousNode():i.nextNode()}while(xg(o,e.current));t.preventDefault(),t.stopPropagation(),o?kg(o,!0):wg(n)?kg(n,!0):r.blur()}};return r||document.addEventListener("keydown",i,!0),()=>{r||document.removeEventListener("keydown",i,!0);let n=Tg.getTreeNode(e).nodeToRestore;if(t&&n&&(xg(document.activeElement,e.current)||document.activeElement===document.body&&function(e){let t=Tg.getTreeNode(hg);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return(null==t?void 0:t.scopeRef)===e}(e))){let t=Tg.clone();requestAnimationFrame((()=>{if(document.activeElement===document.body){let r=t.getTreeNode(e);for(;r;){if(r.nodeToRestore&&document.body.contains(r.nodeToRestore))return void kg(r.nodeToRestore);r=r.parent}for(r=t.getTreeNode(e);r;){if(r.scopeRef&&Tg.getTreeNode(r.scopeRef))return void Cg(r.scopeRef.current,!0);r=r.parent}}}))}}}),[e,t,r])}(c,i,n),function(e,t){const n=r(je).useRef(t);(0,je.useEffect)((()=>{n.current&&(hg=e,xg(document.activeElement,hg.current)||Cg(e.current)),n.current=!1}),[e])}(c,o),$f((()=>{if(c)return()=>{let e=Tg.getTreeNode(c).parent.scopeRef;c!==hg&&!_g(c,hg)||e&&!Tg.getTreeNode(e)||(hg=e),Tg.removeTreeNode(c)}}),[c,p]);let h=function(e){return{focusNext(t={}){let r=e.current,{from:n,tabbable:i,wrap:o,accept:a}=t,s=n||document.activeElement,c=r[0].previousElementSibling,l=Eg(yg(r),{tabbable:i,accept:a},r);l.currentNode=xg(s,r)?s:c;let d=l.nextNode();return!d&&o&&(l.currentNode=c,d=l.nextNode()),d&&kg(d,!0),d},focusPrevious(t={}){let r=e.current,{from:n,tabbable:i,wrap:o,accept:a}=t,s=n||document.activeElement,c=r[r.length-1].nextElementSibling,l=Eg(yg(r),{tabbable:i,accept:a},r);l.currentNode=xg(s,r)?s:c;let d=l.previousNode();return!d&&o&&(l.currentNode=c,d=l.previousNode()),d&&kg(d,!0),d},focusFirst(t={}){let r=e.current,{tabbable:n,accept:i}=t,o=Eg(yg(r),{tabbable:n,accept:i},r);o.currentNode=r[0].previousElementSibling;let a=o.nextNode();return a&&kg(a,!0),a},focusLast(t={}){let r=e.current,{tabbable:n,accept:i}=t,o=Eg(yg(r),{tabbable:n,accept:i},r);o.currentNode=r[r.length-1].nextElementSibling;let a=o.previousNode();return a&&kg(a,!0),a}}}(c);return r(je).createElement(pg.Provider,{value:{scopeRef:c,focusManager:h}},r(je).createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:a}),t,r(je).createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:s}))}const mg=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[contenteditable]"],gg=mg.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";mg.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const vg=mg.join(':not([hidden]):not([tabindex="-1"]),');function yg(e){return e[0].parentElement}function bg(e){let t=Tg.getTreeNode(hg);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function wg(e){return Sg(e)}function xg(e,t){return t.some((t=>t.contains(e)))}function Sg(e,t=null){for(let{scopeRef:r}of Tg.traverse(Tg.getTreeNode(t)))if(xg(e,r.current))return!0;return!1}function _g(e,t){var r;let n=null===(r=Tg.getTreeNode(t))||void 0===r?void 0:r.parent;for(;n;){if(n.scopeRef===e)return!0;n=n.parent}return!1}function kg(e,t=!1){if(null==e||t){if(null!=e)try{e.focus()}catch(e){}}else try{dg(e)}catch(e){}}function Cg(e,t=!0){let r=e[0].previousElementSibling,n=Eg(yg(e),{tabbable:t},e);n.currentNode=r;let i=n.nextNode();t&&!i&&(n=Eg(yg(e),{tabbable:!1},e),n.currentNode=r,i=n.nextNode()),kg(i)}function Eg(e,t,r){let n=(null==t?void 0:t.tabbable)?vg:gg,i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(e){var i;return(null==t||null===(i=t.from)||void 0===i?void 0:i.contains(e))?NodeFilter.FILTER_REJECT:!e.matches(n)||!ug(e)||r&&!xg(e,r)||(null==t?void 0:t.accept)&&!t.accept(e)?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT}});return(null==t?void 0:t.from)&&(i.currentNode=t.from),i}class Pg{get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,t,r){let n=this.fastMap.get(null!=t?t:null),i=new Rg({scopeRef:e});n.addChild(i),i.parent=n,this.fastMap.set(e,i),r&&(i.nodeToRestore=r)}removeTreeNode(e){if(null===e)return;let t=this.fastMap.get(e),r=t.parent;for(let e of this.traverse())e!==t&&t.nodeToRestore&&e.nodeToRestore&&t.scopeRef.current&&xg(e.nodeToRestore,t.scopeRef.current)&&(e.nodeToRestore=t.nodeToRestore);let n=t.children;r.removeChild(t),n.length>0&&n.forEach((e=>r.addChild(e))),this.fastMap.delete(t.scopeRef)}*traverse(e=this.root){if(null!=e.scopeRef&&(yield e),e.children.length>0)for(let t of e.children)yield*this.traverse(t)}clone(){let e=new Pg;for(let t of this.traverse())e.addTreeNode(t.scopeRef,t.parent.scopeRef,t.nodeToRestore);return e}constructor(){Bf(this,"fastMap",new Map),this.root=new Rg({scopeRef:null}),this.fastMap.set(null,this.root)}}class Rg{addChild(e){this.children.push(e),e.parent=this}removeChild(e){this.children.splice(this.children.indexOf(e),1),e.parent=void 0}constructor(e){Bf(this,"children",[]),Bf(this,"contain",!1),this.scopeRef=e.scopeRef}}let Tg=new Pg;function jg(e={}){let{autoFocus:t=!1,isTextInput:r,within:n}=e,i=(0,je.useRef)({isFocused:!1,isFocusVisible:t||Ym()}),[o,a]=(0,je.useState)(!1),[s,c]=(0,je.useState)((()=>i.current.isFocused&&i.current.isFocusVisible)),l=(0,je.useCallback)((()=>c(i.current.isFocused&&i.current.isFocusVisible)),[]),d=(0,je.useCallback)((e=>{i.current.isFocused=e,a(e),l()}),[l]);Jm((e=>{i.current.isFocusVisible=e,l()}),[],{isTextInput:r});let{focusProps:u}=Nm({isDisabled:n,onFocusChange:d}),{focusWithinProps:p}=Xm({isDisabled:!n,onFocusWithinChange:d});return{isFocused:o,isFocusVisible:i.current.isFocused&&s,focusProps:n?p:u}}let Og=r(je).createContext(null);r(je).forwardRef((function(e,t){let{children:n,...i}=e,o={...i,ref:t};return r(je).createElement(Og.Provider,{value:o},n)}));function Mg(e,t){let{focusProps:r}=Nm(e),{keyboardProps:n}=lg(e),i=Qf(r,n),o=function(e){let t=(0,je.useContext)(Og)||{};cm(t,e);let{ref:r,...n}=t;return n}(t),a=e.isDisabled?{}:o,s=(0,je.useRef)(e.autoFocus);return(0,je.useEffect)((()=>{s.current&&t.current&&dg(t.current),s.current=!1}),[t]),{focusableProps:Qf({...i,tabIndex:e.excludeFromTabOrder&&!e.isDisabled?-1:void 0},a)}}function Lg(e,t){let r,{elementType:n="button",isDisabled:i,onPress:o,onPressStart:a,onPressEnd:s,onPressChange:c,preventFocusOnPress:l,allowFocusWhenDisabled:d,onClick:u,href:p,target:h,rel:f,type:m="button"}=e;r="button"===n?{type:m,disabled:i}:{role:"button",tabIndex:i?void 0:0,href:"a"===n&&i?void 0:p,target:"a"===n?h:void 0,type:"input"===n?m:void 0,disabled:"input"===n?i:void 0,"aria-disabled":i&&"input"!==n?i:void 0,rel:"a"===n?f:void 0};let{pressProps:g,isPressed:v}=Cm({onPressStart:a,onPressEnd:s,onPressChange:c,onPress:o,isDisabled:i,preventFocusOnPress:l,ref:t}),{focusableProps:y}=Mg(e,t);d&&(y.tabIndex=i?-1:y.tabIndex);let b=Qf(y,g,em(e,{labelable:!0}));return{isPressed:v,buttonProps:Qf(r,b,{"aria-haspopup":e["aria-haspopup"],"aria-expanded":e["aria-expanded"],"aria-controls":e["aria-controls"],"aria-pressed":e["aria-pressed"],onClick:e=>{u&&(u(e),console.warn("onClick is deprecated, please use onPress"))}})}}function Dg(e,t,r){const{isSelected:n}=t,{isPressed:i,buttonProps:o}=Lg({...e,onPress:Zf(t.toggle,e.onPress)},r);return{isPressed:i,buttonProps:Qf(o,{"aria-pressed":n})}}function Ig(e={}){let{isReadOnly:t}=e,[r,n]=Af(e.isSelected,e.defaultSelected||!1,e.onChange);return{isSelected:r,setSelected:function(e){t||n(e)},toggle:function(){t||n(!r)}}}function Ag(e){const t=(0,je.useRef)(null);return(0,je.useEffect)((()=>{e&&("function"==typeof e?e(t.current):e.current=t.current)})),t}const Ng=(0,je.forwardRef)((function({children:e,...t},n){const i=Ag(n);let o=Ig(t);const{buttonProps:s}=Dg(t,o,i),{isFocusVisible:c,focusProps:l}=jg();return(0,a.jsx)("button",{className:r(zf)("w-[76px] h-[40px]",t.isSelected?"bg-[#FFFFFF]":"bg-[#FFFFFF] opacity-[0.4]","rounded-full","text-black","flex items-center justify-center gap-[5px]","text-base font-medium","transition-colors ease-in-out","focus:outline-none",{"ring-[3px] ring-cta":c,"cursor-not-allowed":s.disabled}),...s,...l,ref:i,children:e})}));je=o("85Hg2");const Fg=e=>{const{selfPeerId:t}=(0,je.useContext)(Ya);return"request"===e.state?(0,a.jsx)("button",{className:r(zf)("bg-white rounded-full w-[86px] h-[86px] flex items-center justify-center"),children:(0,a.jsx)("div",{className:r(zf)("border-[7px] border-white border-b-[#E5484D] border-b-[7px] rounded-[50%] w-[64px] h-[64px] animate-spin")})}):"live"===e.state?(0,a.jsx)("button",{className:r(zf)("bg-white rounded-full w-[86px] h-[86px] flex items-center justify-center"),onClick:()=>{e.onCapturePress()},children:(0,a.jsx)("div",{className:"bg-white border-[4px] border-[#E5484D] w-[72px] h-[72px] rounded-full flex items-center justify-center",children:(0,a.jsx)("div",{className:"bg-[#E5484D] w-[24px] h-[24px] rounded-[8px] "})})}):(0,a.jsx)("button",{className:r(zf)("bg-white rounded-full w-[86px] h-[86px] flex items-center justify-center"),onClick:()=>{t&&e.onCapturePress()},children:(0,a.jsx)("div",{className:"bg-[#E5484D] w-[70px] h-[70px] rounded-full flex items-center justify-center",children:(0,a.jsx)("div",{className:"bg-[#E5484D] w-[62px] h-[62px] rounded-full border-[3px] border-[#FFFFF]"})})})},zg=e=>(0,a.jsx)("div",{className:r(zf)("bg-white rounded-full w-[72px] h-[72px] p-[3px]"),onClick:()=>e.onCapturePress(),children:(0,a.jsx)("div",{className:"bg-primary rounded-full w-full h-full p-[3px] flex items-center justify-center cursor-pointer",children:(0,a.jsx)("div",{className:r(zf)("w-full h-full transition-[transform,border-radius] duration-300","photo"===e.state.mode?"bg-white":"bg-[#f12828]",e.state.streaming?"rounded-[5px] scale-[0.4]":"rounded-[60px]")})})}),Bg=e=>{const{t:t}=Fi();return(0,a.jsxs)("div",{className:"flex flex-col bg-primary h-[150px] w-full max-w-[500px] rounded-[15px] p-2.5 gap-2.5",children:[(0,a.jsxs)("div",{className:"flex flex-1 flex-row px-[10px] w-full",children:[(0,a.jsxs)("div",{className:"flex flex-row flex-auto items-center gap-[10px]",children:[(0,a.jsx)(ls,{}),(0,a.jsx)("div",{className:" text-white text-base font-medium",children:"SnapCall"})]}),(0,a.jsxs)("div",{className:"flex flex-row justify-end flex-auto items-center gap-[10px] ",children:[(0,a.jsx)(Ng,{isSelected:"photo"===e.state.mode,onPress:()=>{e.state.streaming||e.changeMode("photo")},children:t("misc.photo")}),(0,a.jsx)(Ng,{isSelected:"video"===e.state.mode,onPress:()=>{e.state.streaming||e.changeMode("video")},children:t("misc.video")})]})]}),(0,a.jsxs)("div",{className:"flex flex-row flex-1 items-center justify-between w-full ",children:[(0,a.jsx)("div",{className:"w-[60px] h-[60px]",children:e.thumbnail}),(0,a.jsx)(zg,{...e}),(0,a.jsx)("div",{onClick:e.onSwitch,className:"rounded-full w-[56px] h-[56px] flex items-center justify-center bg-[#565656] cursor-pointer",children:(0,a.jsx)(Ul,{})})]})]})};je=o("85Hg2");const Ug=e=>{const[t,r]=(0,je.useState)(e.initialValue);return(0,je.useEffect)((()=>{if(void 0===t)return;const n=setTimeout((()=>{1===t&&e.onFinish(),r(t-1)}),1e3);return()=>clearTimeout(n)}),[t,e]),(0,a.jsx)("div",{className:"absolute w-full h-full flex justify-center items-center bg-black/[.6] z-50",children:(0,a.jsx)("span",{className:"text-white/80 text-[112px] font-medium",children:t})})};const Vg=(0,(je=o("85Hg2")).forwardRef)(((e,t)=>{const r=Ag(t);return(0,je.useEffect)((()=>{const e=()=>{r?.current&&Qa.requestLocalScreenshare(r.current)};return Qa.addEventListener("screenshareEnabled",e),()=>{Qa.removeEventListener("screenshareEnabled",e)}}),[r]),(0,a.jsx)("video",{autoPlay:!0,muted:!0,playsInline:!0,ref:r,className:"rounded-[10px] max-w-[100%] max-h-[100%] object-fit ",children:e.children})})),Hg=(0,je.forwardRef)(((e,t)=>{const n=Ag(t),[i,o]=(0,je.useState)("user");return(0,je.useEffect)((()=>{const e=e=>{if(!e.detail?.camera?.device||!n.current)return;const{facingMode:t}=Qa.requestLocalVideo(n?.current);o(t)};return Qa.addEventListener("localVideoAvailable",e),Qa.addEventListener("localVideoChange",e),()=>{Qa.removeEventListener("localVideoAvailable",e),Qa.removeEventListener("localVideoChange",e)}}),[n]),(0,a.jsx)("video",{autoPlay:!0,muted:!0,playsInline:!0,ref:n,className:r(zf)("w-full h-full object-cover rounded-[inherit]",{"scale-x-[-1]":"user"===i})})})),qg=({asset:e,onClick:t})=>e?(0,a.jsx)("div",{className:"flex items-center justify-center w-[60px] h-[60px] cursor-pointer relative overflow-hidden",onClick:t,children:(0,a.jsx)("img",{className:"cursor-pointer rounded-[8px] w-[60px] h-[60px] object-cover",src:e.thumbnailURL||e.objectUrl,alt:"last shot"})}):null;zi=o("4Fy4N"),je=o("85Hg2");const Wg=(0,(je=o("85Hg2")).forwardRef)((function({children:e,variant:t="primary",size:n="medium",fullWidth:i=!1,form:o,className:s,...c},l){const d=Ag(l),{buttonProps:u,isPressed:p}=Lg(c,d),{isFocusVisible:h,focusProps:f}=jg(),{hoverProps:m,isHovered:g}=og({isDisabled:u.disabled}),v=g||h||p,y={primary:r(zf)(v?"bg-primaryLight":"bg-primary","text-white disabled:bg-secondaryLight"),secondary:r(zf)(v?"bg-graySelected":"bg-transparent","text-primary border border-secondaryLight disabled:text-secondaryLight disabled:bg-graySelected"),basic:r(zf)(v?"bg-graySelected":"bg-white","text-primary disabled:text-secondaryLight disabled:bg-graySelected"),tertiary:r(zf)(v?"bg-tertiarySelected":"bg-tertiary","text-mainBlue disabled:opacity-50"),blue:r(zf)(v?"bg-mainBlueSelected":"bg-mainBlue","text-white disabled:opacity-50"),custom:""};return(0,a.jsx)("button",{className:r(zf)({large:"py-3 px-4 text-base rounded-lg",medium:"py-[9px] px-3.5 text-base rounded-lg",small:"py-2 px-3 text-sm rounded-lg",extraSmall:"py-1.5 px-2.5 text-xs rounded-md",custom:""}[n],y[t],"flex items-center justify-center gap-[5px] font-medium","transition-colors ease-in-out","focus:outline-none",{"ring-[3px] ring-cta":h,"cursor-not-allowed":u.disabled,"w-full":i},s),...u,...f,...m,form:o,ref:d,children:e})}));o("85Hg2");je=o("85Hg2"),je=o("85Hg2"),je=o("85Hg2");new Map,new Map;new Map;new Map;new Map;new Map;let $g=!1;try{$g="exceptZero"===new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay}catch(g){}let Kg=!1;try{Kg="unit"===new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style}catch(e){}new RegExp("^.*\\(.*\\).*$");new Map;new Set(["decimal","fraction","integer","minusSign","plusSign","group"]);const Gg=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),Zg=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function Qg(e){if(Intl.Locale){let t=new Intl.Locale(e).maximize().script;return Gg.has(t)}let t=e.split("-")[0];return Zg.has(t)}function Yg(){let e="undefined"!=typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch(t){e="en-US"}return{locale:e,direction:Qg(e)?"rtl":"ltr"}}Yg(),new Set;r(je).createContext(null);new WeakMap;new Map;je=o("85Hg2");"undefined"!=typeof window&&window.visualViewport;new WeakMap;"undefined"!=typeof window&&window.visualViewport;const Jg=[];function Xg(e,t){let{onClose:r,shouldCloseOnBlur:n,isOpen:i,isDismissable:o=!1,isKeyboardDismissDisabled:a=!1,shouldCloseOnInteractOutside:s}=e;(0,je.useEffect)((()=>(i&&Jg.push(t),()=>{let e=Jg.indexOf(t);e>=0&&Jg.splice(e,1)})),[i,t]);let c=()=>{Jg[Jg.length-1]===t&&r&&r()};ag({ref:t,onInteractOutside:o?e=>{s&&!s(e.target)||(Jg[Jg.length-1]===t&&(e.stopPropagation(),e.preventDefault()),c())}:null,onInteractOutsideStart:e=>{s&&!s(e.target)||Jg[Jg.length-1]===t&&(e.stopPropagation(),e.preventDefault())}});let{focusWithinProps:l}=Xm({isDisabled:!n,onBlurWithin:e=>{e.relatedTarget&&Sg(e.relatedTarget,hg)||(s&&!s(e.relatedTarget)||r())}});return{overlayProps:{onKeyDown:e=>{"Escape"!==e.key||a||(e.stopPropagation(),e.preventDefault(),c())},...l},underlayProps:{onPointerDown:e=>{e.target===e.currentTarget&&e.preventDefault()}}}}const ev="undefined"!=typeof window&&window.visualViewport,tv=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let rv,nv=0;function iv(e={}){let{isDisabled:t}=e;$f((()=>{if(!t)return nv++,1===nv&&(rv=vm()?function(){let e,t=0,r=r=>{e=lm(r.target),e===document.documentElement&&e===document.body||(t=r.changedTouches[0].pageY)},n=r=>{if(e===document.documentElement||e===document.body)return void r.preventDefault();let n=r.changedTouches[0].pageY,i=e.scrollTop,o=e.scrollHeight-e.clientHeight;(i<=0&&n>t||i>=o&&n<t)&&r.preventDefault(),t=n},i=e=>{let t=e.target;cv(t)&&t!==document.activeElement&&(e.preventDefault(),t.style.transform="translateY(-2000px)",t.focus(),requestAnimationFrame((()=>{t.style.transform=""})))},o=e=>{let t=e.target;cv(t)&&(t.style.transform="translateY(-2000px)",requestAnimationFrame((()=>{t.style.transform="",ev&&(ev.height<window.innerHeight?requestAnimationFrame((()=>{sv(t)})):ev.addEventListener("resize",(()=>sv(t)),{once:!0}))})))},a=()=>{window.scrollTo(0,0)},s=window.pageXOffset,c=window.pageYOffset,l=Zf(ov(document.documentElement,"paddingRight",window.innerWidth-document.documentElement.clientWidth+"px"),ov(document.documentElement,"overflow","hidden"),ov(document.body,"marginTop",`-${c}px`));window.scrollTo(0,0);let d=Zf(av(document,"touchstart",r,{passive:!1,capture:!0}),av(document,"touchmove",n,{passive:!1,capture:!0}),av(document,"touchend",i,{passive:!1,capture:!0}),av(document,"focus",o,!0),av(window,"scroll",a));return()=>{l(),d(),window.scrollTo(s,c)}}():Zf(ov(document.documentElement,"paddingRight",window.innerWidth-document.documentElement.clientWidth+"px"),ov(document.documentElement,"overflow","hidden"))),()=>{nv--,0===nv&&rv()}}),[t])}function ov(e,t,r){let n=e.style[t];return e.style[t]=r,()=>{e.style[t]=n}}function av(e,t,r,n){return e.addEventListener(t,r,n),()=>{e.removeEventListener(t,r,n)}}function sv(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let t=lm(e);if(t!==document.documentElement&&t!==document.body&&t!==e){let r=t.getBoundingClientRect().top,n=e.getBoundingClientRect().top;n>r+e.clientHeight&&(t.scrollTop+=n-r)}e=t.parentElement}}function cv(e){return e instanceof HTMLInputElement&&!tv.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}r(je).createContext(null);let lv=new WeakMap,dv=[];function uv(e,t=document.body){let r=new Set(e),n=new Set,i=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:t=>((t instanceof HTMLElement||t instanceof SVGElement)&&"true"===t.dataset.liveAnnouncer&&r.add(t),r.has(t)||n.has(t.parentElement)&&"row"!==t.parentElement.getAttribute("role")?NodeFilter.FILTER_REJECT:e.some((e=>t.contains(e)))?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT)}),o=e=>{var t;let r=null!==(t=lv.get(e))&&void 0!==t?t:0;"true"===e.getAttribute("aria-hidden")&&0===r||(0===r&&e.setAttribute("aria-hidden","true"),n.add(e),lv.set(e,r+1))};dv.length&&dv[dv.length-1].disconnect();let a=i.nextNode();for(;null!=a;)o(a),a=i.nextNode();let s=new MutationObserver((e=>{for(let t of e)if("childList"===t.type&&0!==t.addedNodes.length&&![...r,...n].some((e=>e.contains(t.target))))for(let e of t.addedNodes)(e instanceof HTMLElement||e instanceof SVGElement)&&"true"===e.dataset.liveAnnouncer?r.add(e):e instanceof Element&&o(e)}));s.observe(t,{childList:!0,subtree:!0});let c={observe(){s.observe(t,{childList:!0,subtree:!0})},disconnect(){s.disconnect()}};return dv.push(c),()=>{s.disconnect();for(let e of n){let t=lv.get(e);1===t?(e.removeAttribute("aria-hidden"),lv.delete(e)):lv.set(e,t-1)}c===dv[dv.length-1]?(dv.pop(),dv.length&&dv[dv.length-1].observe()):dv.splice(dv.indexOf(c),1)}}const pv=r(je).createContext(null);function hv(e){let t=Hf(),{portalContainer:n=(t?null:document.body)}=e,[i,o]=(0,je.useState)(!1),a=(0,je.useMemo)((()=>({contain:i,setContain:o})),[i,o]);if(!n)return null;let s=r(je).createElement(pv.Provider,{value:a},r(je).createElement(fg,{restoreFocus:!0,contain:i},e.children));return r(c).createPortal(s,n)}function fv(e,t,r){let{overlayProps:n,underlayProps:i}=Xg({...e,isOpen:t.isOpen,onClose:t.close},r);return iv({isDisabled:!t.isOpen}),function(){let e=(0,je.useContext)(pv),t=null==e?void 0:e.setContain;$f((()=>{null==t||t(!0)}),[t])}(),(0,je.useEffect)((()=>{if(t.isOpen)return uv([r.current])}),[t.isOpen,r]),{modalProps:Qf(n),underlayProps:i}}function mv(){return mv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},mv.apply(this,arguments)}function gv(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}function vv(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Hr(e,t)}function yv(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}je=o("85Hg2"),je=o("85Hg2");var bv={disabled:!1},wv=r(je=o("85Hg2")).createContext(null),xv=function(e){return e.scrollTop},Sv="unmounted",_v="exited",kv="entering",Cv="entered",Ev="exiting",Pv=function(e){function t(t,r){var n;n=e.call(this,t,r)||this;var i,o=r&&!r.isMounting?t.enter:t.appear;return n.appearStatus=null,t.in?o?(i=_v,n.appearStatus=kv):i=Cv:i=t.unmountOnExit||t.mountOnEnter?Sv:_v,n.state={status:i},n.nextCallback=null,n}vv(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===Sv?{status:_v}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var r=this.state.status;this.props.in?r!==kv&&r!==Cv&&(t=kv):r!==kv&&r!==Cv||(t=Ev)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,r,n=this.props.timeout;return e=t=r=n,null!=n&&"number"!=typeof n&&(e=n.exit,t=n.enter,r=void 0!==n.appear?n.appear:t),{exit:e,enter:t,appear:r}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===kv){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:r(c).findDOMNode(this);n&&xv(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===_v&&this.setState({status:Sv})},n.performEnter=function(e){var t=this,n=this.props.enter,i=this.context?this.context.isMounting:e,o=this.props.nodeRef?[i]:[r(c).findDOMNode(this),i],a=o[0],s=o[1],l=this.getTimeouts(),d=i?l.appear:l.enter;!e&&!n||bv.disabled?this.safeSetState({status:Cv},(function(){t.props.onEntered(a)})):(this.props.onEnter(a,s),this.safeSetState({status:kv},(function(){t.props.onEntering(a,s),t.onTransitionEnd(d,(function(){t.safeSetState({status:Cv},(function(){t.props.onEntered(a,s)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),i=this.props.nodeRef?void 0:r(c).findDOMNode(this);t&&!bv.disabled?(this.props.onExit(i),this.safeSetState({status:Ev},(function(){e.props.onExiting(i),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:_v},(function(){e.props.onExited(i)}))}))}))):this.safeSetState({status:_v},(function(){e.props.onExited(i)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,r=!0;return this.nextCallback=function(n){r&&(r=!1,t.nextCallback=null,e(n))},this.nextCallback.cancel=function(){r=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:r(c).findDOMNode(this),i=null==e&&!this.props.addEndListener;if(n&&!i){if(this.props.addEndListener){var o=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],a=o[0],s=o[1];this.props.addEndListener(a,s)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===Sv)return null;var t=this.props,n=t.children,i=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,gv(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return r(je).createElement(wv.Provider,{value:null},"function"==typeof n?n(e,i):r(je).cloneElement(r(je).Children.only(n),i))},t}(r(je).Component);function Rv(){}Pv.contextType=wv,Pv.propTypes={},Pv.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Rv,onEntering:Rv,onEntered:Rv,onExit:Rv,onExiting:Rv,onExited:Rv},Pv.UNMOUNTED=Sv,Pv.EXITED=_v,Pv.ENTERING=kv,Pv.ENTERED=Cv,Pv.EXITING=Ev;var Tv=Pv,jv=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return n=t,void((r=e).classList?r.classList.add(n):function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}(r,n)||("string"==typeof r.className?r.className=r.className+" "+n:r.setAttribute("class",(r.className&&r.className.baseVal||"")+" "+n)));var r,n}))},Ov=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return n=t,void((r=e).classList?r.classList.remove(n):"string"==typeof r.className?r.className=yv(r.className,n):r.setAttribute("class",yv(r.className&&r.className.baseVal||"",n)));var r,n}))},Mv=function(e){function t(){for(var t,r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return(t=e.call.apply(e,[this].concat(n))||this).appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,r){var n=t.resolveArguments(e,r),i=n[0],o=n[1];t.removeClasses(i,"exit"),t.addClass(i,o?"appear":"enter","base"),t.props.onEnter&&t.props.onEnter(e,r)},t.onEntering=function(e,r){var n=t.resolveArguments(e,r),i=n[0],o=n[1]?"appear":"enter";t.addClass(i,o,"active"),t.props.onEntering&&t.props.onEntering(e,r)},t.onEntered=function(e,r){var n=t.resolveArguments(e,r),i=n[0],o=n[1]?"appear":"enter";t.removeClasses(i,o),t.addClass(i,o,"done"),t.props.onEntered&&t.props.onEntered(e,r)},t.onExit=function(e){var r=t.resolveArguments(e)[0];t.removeClasses(r,"appear"),t.removeClasses(r,"enter"),t.addClass(r,"exit","base"),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var r=t.resolveArguments(e)[0];t.addClass(r,"exit","active"),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var r=t.resolveArguments(e)[0];t.removeClasses(r,"exit"),t.addClass(r,"exit","done"),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,r){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,r]},t.getClassNames=function(e){var r=t.props.classNames,n="string"==typeof r,i=n?""+(n&&r?r+"-":"")+e:r[e];return{baseClassName:i,activeClassName:n?i+"-active":r[e+"Active"],doneClassName:n?i+"-done":r[e+"Done"]}},t}vv(t,e);var n=t.prototype;return n.addClass=function(e,t,r){var n=this.getClassNames(t)[r+"ClassName"],i=this.getClassNames("enter").doneClassName;"appear"===t&&"done"===r&&i&&(n+=" "+i),"active"===r&&e&&xv(e),n&&(this.appliedClasses[t][r]=n,jv(e,n))},n.removeClasses=function(e,t){var r=this.appliedClasses[t],n=r.base,i=r.active,o=r.done;this.appliedClasses[t]={},n&&Ov(e,n),i&&Ov(e,i),o&&Ov(e,o)},n.render=function(){var e=this.props,t=(e.classNames,gv(e,["classNames"]));return r(je).createElement(Tv,mv({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(r(je).Component);Mv.defaultProps={classNames:""},Mv.propTypes={};var Lv=Mv;const Dv=e=>{const{state:t,children:r}=e,n=(0,je.useRef)(null),{modalProps:i,underlayProps:o}=fv({isDismissable:!0,...e},t,n),[s,c]=(0,je.useState)(!t.isOpen);return!t.isOpen&&s?null:(0,a.jsx)(hv,{children:(0,a.jsx)(Lv,{in:t.isOpen,appear:!0,onEntered:()=>c(!1),onExited:()=>c(!0),timeout:{enter:0,exit:300},classNames:{enter:"opacity-0",enterDone:"opacity-1 transition ease-in",exit:"opacity-0 transition ease-out"},children:(0,a.jsx)("div",{className:"fixed z-[100] inset-0 bg-black bg-opacity-90 flex justify-center items-center inter",...o,children:(0,a.jsx)(Lv,{in:t.isOpen,appear:!0,nodeRef:n,timeout:{enter:0,exit:300},classNames:{appear:"translate-y-2",appearDone:"translate-y-0 transition ease-in",exit:"translate-y-2 transition ease-out"},children:(0,a.jsx)("div",{...i,ref:n,children:r})})})})})};function Iv(e){const{children:t,state:n,size:i="small",title:o,description:s,primaryAction:c,secondaryAction:l,centered:d=!1,...u}=e,p=pm().height-64;return(0,a.jsx)(Dv,{state:n,...u,children:(0,a.jsx)("div",{className:r(zf)("bg-white rounded-[10px] z-[1] overflow-x-auto focus:outline-none",{small:"max-w-[400px] mx-[20px]",medium:"max-w-[600px]",large:"max-w-[800px]"}[i]),style:{maxHeight:`${p}px`},children:(0,a.jsxs)("div",{className:"flex flex-col gap-5 px-5 py-[25px] max-h-[inherit]",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-5 overflow-auto",children:[(0,a.jsxs)("div",{className:r(zf)("flex flex-col gap-[5px]",{"text-center":d}),children:[(0,a.jsx)("h2",{className:"text-xl font-medium",children:o}),s&&(0,a.jsx)("p",{className:"text-sm text-secondary",children:s})]}),t]}),(c||l)&&(0,a.jsxs)("div",{className:r(zf)("flex justify-end gap-2.5",d?"justify-center":"justify-end"),children:["string"==typeof l&&(0,a.jsx)(Wg,{variant:"secondary",onPress:n.close,fullWidth:d,children:l}),"function"==typeof l&&l({close:n.close}),"string"==typeof c&&(0,a.jsx)(Wg,{onPress:n.close,fullWidth:d,children:c}),"function"==typeof c&&c({close:n.close})]})]})})})}const Av=({state:e,onClose:t})=>{const{t:r}=Fi(),n=(0,je.useRef)(null),{options:i}=(0,je.useContext)(Ya),[o,{width:s}]=Vs();return(0,je.useEffect)((()=>{const e=i.sharedURL||window.location.href;rd(n.current,e,{width:s>300?300:s,errorCorrectionLevel:"Q",margin:0})}),[s,i.sharedURL]),(0,a.jsx)(Iv,{centered:!0,title:r("recorder.switchToMobileTitle"),description:r("recorder.switchToMobileDescription"),isDismissable:!1,state:e,primaryAction:({close:e})=>(0,a.jsx)(Wg,{fullWidth:!0,variant:"blue",onPress:()=>{e(),t()},children:r("recorder.useDesktopVersion")}),children:(0,a.jsxs)("div",{className:"flex flex-col gap-[20px]",children:[(0,a.jsxs)("div",{ref:o,className:"flex flex-1 items-center justify-center relative",children:[(0,a.jsx)("div",{className:"absolute w-1/3 h-1/3 max-w-[70px] max-h-[70px] flex items-center justify-center",children:(0,a.jsx)(Cp,{})}),(0,a.jsx)("canvas",{ref:n})]}),(0,a.jsx)("p",{className:"flex items-center justify-center text-xs text-primaryLight text-center",children:r("recorder.scanQRCode")})]})})};je=o("85Hg2");var Nv={},Fv={};Fv=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i},Fv.__esModule=!0,Fv.default=Fv,Nv=function(e,t){if(null==e)return{};var r,n,i=Fv(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i},Nv.__esModule=!0,Nv.default=Nv;var zv={};function Bv(e){return zv=Bv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},zv.__esModule=!0,zv.default=zv,Bv(e)}(zv=Bv).__esModule=!0,zv.default=zv;var Uv;je=o("85Hg2");Uv={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0};var Vv=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function Hv(e){var t={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},n=e.match(/<\/?([^\s]+?)[/\s>]/);if(n&&(t.name=n[1],(r(Uv)[n[1]]||"/"===e.charAt(e.length-2))&&(t.voidElement=!0),t.name.startsWith("!--"))){var i=e.indexOf("--\x3e");return{type:"comment",comment:-1!==i?e.slice(4,i):""}}for(var o=new RegExp(Vv),a=null;null!==(a=o.exec(e));)if(a[0].trim())if(a[1]){var s=a[1].trim(),c=[s,""];s.indexOf("=")>-1&&(c=s.split("=")),t.attrs[c[0]]=c[1],o.lastIndex--}else a[2]&&(t.attrs[a[2]]=a[3].trim().substring(1,a[3].length-1));return t}var qv=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,Wv=/^\s*$/,$v=Object.create(null);function Kv(e,t){switch(t.type){case"text":return e+t.content;case"tag":return e+="<"+t.name+(t.attrs?function(e){var t=[];for(var r in e)t.push(r+'="'+e[r]+'"');return t.length?" "+t.join(" "):""}(t.attrs):"")+(t.voidElement?"/>":">"),t.voidElement?e:e+t.children.reduce(Kv,"")+"</"+t.name+">";case"comment":return e+"\x3c!--"+t.comment+"--\x3e"}}var Gv={parse:function(e,t){t||(t={}),t.components||(t.components=$v);var r,n=[],i=[],o=-1,a=!1;if(0!==e.indexOf("<")){var s=e.indexOf("<");n.push({type:"text",content:-1===s?e:e.substring(0,s)})}return e.replace(qv,(function(s,c){if(a){if(s!=="</"+r.name+">")return;a=!1}var l,d="/"!==s.charAt(1),u=s.startsWith("\x3c!--"),p=c+s.length,h=e.charAt(p);if(u){var f=Hv(s);return o<0?(n.push(f),n):((l=i[o]).children.push(f),n)}if(d&&(o++,"tag"===(r=Hv(s)).type&&t.components[r.name]&&(r.type="component",a=!0),r.voidElement||a||!h||"<"===h||r.children.push({type:"text",content:e.slice(p,e.indexOf("<",p))}),0===o&&n.push(r),(l=i[o-1])&&l.children.push(r),i[o]=r),(!d||r.voidElement)&&(o>-1&&(r.voidElement||r.name===s.slice(2,-1))&&(o--,r=-1===o?n:i[o]),!a&&"<"!==h&&h)){l=-1===o?n:i[o].children;var m=e.indexOf("<",p),g=e.slice(p,-1===m?void 0:m);Wv.test(g)&&(g=" "),(m>-1&&o+l.length>=0||" "!==g)&&l.push({type:"text",content:g})}})),n},stringify:function(e){return e.reduce((function(e,t){return e+Kv("",t)}),"")}},Zv=Gv,Qv=["format"],Yv=["children","count","parent","i18nKey","context","tOptions","values","defaults","components","ns","i18n","t","shouldUnescape"];function Jv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Xv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Jv(Object(n),!0).forEach((function(t){r(si)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jv(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ey(e,t){if(!e)return!1;var r=e.props?e.props.children:e.children;return t?r.length>0:!!r}function ty(e){return e?e.props?e.props.children:e.children:[]}function ry(e){return Array.isArray(e)?e:[e]}function ny(e,t){if(!e)return"";var n="",i=ry(e),o=t.transSupportBasicHtmlNodes&&t.transKeepBasicHtmlNodesFor?t.transKeepBasicHtmlNodesFor:[];return i.forEach((function(e,i){if("string"==typeof e)n+="".concat(e);else if((0,je.isValidElement)(e)){var a=Object.keys(e.props).length,s=o.indexOf(e.type)>-1,c=e.props.children;if(!c&&s&&0===a)n+="<".concat(e.type,"/>");else if(c||s&&0===a)if(e.props.i18nIsDynamicList)n+="<".concat(i,"></").concat(i,">");else if(s&&1===a&&"string"==typeof c)n+="<".concat(e.type,">").concat(c,"</").concat(e.type,">");else{var l=ny(c,t);n+="<".concat(i,">").concat(l,"</").concat(i,">")}else n+="<".concat(i,"></").concat(i,">")}else if(null===e)Ti("Trans: the passed in value is invalid - seems you passed in a null child.");else if("object"===r(zv)(e)){var d=e.format,u=r(Nv)(e,Qv),p=Object.keys(u);if(1===p.length){var h=d?"".concat(p[0],", ").concat(d):p[0];n+="{{".concat(h,"}}")}else Ti("react-i18next: the passed in object contained more than one variable - the object should look like {{ value, format }} where format is optional.",e)}else Ti("Trans: the passed in value is invalid - seems you passed in a variable like {number} - please pass in variables for interpolation as full objects like {{number}}.",e)})),n}function iy(e,t,n,i,o,a){if(""===t)return[];var s=i.transKeepBasicHtmlNodesFor||[],c=t&&new RegExp(s.join("|")).test(t);if(!e&&!c)return[t];var l={};!function e(t){ry(t).forEach((function(t){"string"!=typeof t&&(ey(t)?e(ty(t)):"object"!==r(zv)(t)||(0,je.isValidElement)(t)||Object.assign(l,t))}))}(e);var d=Zv.parse("<0>".concat(t,"</0>")),u=Xv(Xv({},l),o);function p(e,t,r){var n=ty(e),i=f(n,t.children,r);return function(e){return"[object Array]"===Object.prototype.toString.call(e)&&e.every((function(e){return(0,je.isValidElement)(e)}))}(n)&&0===i.length?n:i}function h(e,t,r,n,i){e.dummy&&(e.children=t),r.push((0,je.cloneElement)(e,Xv(Xv({},e.props),{},{key:n}),i?void 0:t))}function f(t,o,l){var d=ry(t);return ry(o).reduce((function(t,o,m){var g,v,y,b=o.children&&o.children[0]&&o.children[0].content&&n.services.interpolator.interpolate(o.children[0].content,u,n.language);if("tag"===o.type){var w=d[parseInt(o.name,10)];!w&&1===l.length&&l[0][o.name]&&(w=l[0][o.name]),w||(w={});var x=0!==Object.keys(o.attrs).length?(g={props:o.attrs},(y=Xv({},v=w)).props=Object.assign(g.props,v.props),y):w,S=(0,je.isValidElement)(x),_=S&&ey(o,!0)&&!o.voidElement,k=c&&"object"===r(zv)(x)&&x.dummy&&!S,C="object"===r(zv)(e)&&null!==e&&Object.hasOwnProperty.call(e,o.name);if("string"==typeof x){var E=n.services.interpolator.interpolate(x,u,n.language);t.push(E)}else if(ey(x)||_){h(x,p(x,o,l),t,m)}else if(k){var P=f(d,o.children,l);t.push((0,je.cloneElement)(x,Xv(Xv({},x.props),{},{key:m}),P))}else if(Number.isNaN(parseFloat(o.name))){if(C)h(x,p(x,o,l),t,m,o.voidElement);else if(i.transSupportBasicHtmlNodes&&s.indexOf(o.name)>-1)if(o.voidElement)t.push((0,je.createElement)(o.name,{key:"".concat(o.name,"-").concat(m)}));else{var R=f(d,o.children,l);t.push((0,je.createElement)(o.name,{key:"".concat(o.name,"-").concat(m)},R))}else if(o.voidElement)t.push("<".concat(o.name," />"));else{var T=f(d,o.children,l);t.push("<".concat(o.name,">").concat(T,"</").concat(o.name,">"))}}else if("object"!==r(zv)(x)||S)1===o.children.length&&b?t.push((0,je.cloneElement)(x,Xv(Xv({},x.props),{},{key:m}),b)):t.push((0,je.cloneElement)(x,Xv(Xv({},x.props),{},{key:m})));else{var j=o.children[0]?b:null;j&&t.push(j)}}else if("text"===o.type){var O=i.transWrapTextNodes,M=a?i.unescape(n.services.interpolator.interpolate(o.content,u,n.language)):n.services.interpolator.interpolate(o.content,u,n.language);O?t.push((0,je.createElement)(O,{key:"".concat(o.name,"-").concat(m)},M)):t.push(M)}return t}),[])}return ty(f([{dummy:!0,children:e||[]}],d,ry(e||[]))[0])}function oy(e){var t=e.children,n=e.count,i=e.parent,o=e.i18nKey,a=e.context,s=e.tOptions,c=void 0===s?{}:s,l=e.values,d=e.defaults,u=e.components,p=e.ns,h=e.i18n,f=e.t,m=e.shouldUnescape,g=r(Nv)(e,Yv),v=(0,je.useContext)(mi)||{},y=v.i18n,b=v.defaultNS,w=h||y||yi();if(!w)return Oi("You will need to pass in an i18next instance by using i18nextReactModule"),t;var x=f||w.t.bind(w)||function(e){return e};a&&(c.context=a);var S=Xv(Xv({},gi()),w.options&&w.options.react),_=p||x.ns||b||w.options&&w.options.defaultNS;_="string"==typeof _?[_]:_||["translation"];var k=d||ny(t,S)||S.transEmptyNodeValue||o,C=S.hashTransKey,E=o||(C?C(k):k),P=l?c.interpolation:{interpolation:Xv(Xv({},c.interpolation),{},{prefix:"#$?",suffix:"?$#"})},R=Xv(Xv(Xv(Xv({},c),{},{count:n},l),P),{},{defaultValue:k,ns:_}),T=iy(u||t,E?x(E,R):k,w,S,R,m),j=void 0!==i?i:S.defaultTransParent;return j?(0,je.createElement)(j,g,T):T}const ay=({sideColor:e,mainColor:t})=>(0,a.jsxs)("svg",{width:"20",height:"21",viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{display:"inline"},transform:"translate(0 -1)",children:[(0,a.jsx)("path",{d:"M10 2.167a8.333 8.333 0 1 0 0 16.666 8.333 8.333 0 0 0 0-16.666Zm0 15a6.667 6.667 0 1 1 0-13.334 6.667 6.667 0 0 1 0 13.333Z",fill:e||"#1D1C20"}),(0,a.jsx)("path",{d:"M6.76 5.65a5.833 5.833 0 1 1 6.481 9.7 5.833 5.833 0 0 1-6.481-9.7Z",fill:t||"#F12828"})]}),sy=({sideColor:e,mainColor:t})=>(0,a.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{display:"inline"},transform:"translate(0 -1)",children:[(0,a.jsx)("path",{d:"M10 1.667a8.333 8.333 0 1 0 0 16.666 8.333 8.333 0 0 0 0-16.666Zm0 15a6.667 6.667 0 1 1 0-13.334 6.667 6.667 0 0 1 0 13.333Z",fill:e||"#1D1C20"}),(0,a.jsx)("path",{d:"M7.5 6.667h5a.833.833 0 0 1 .833.833v5a.833.833 0 0 1-.834.834h-5a.833.833 0 0 1-.833-.834v-5a.833.833 0 0 1 .833-.833Z",fill:t||"#F12828"})]}),cy=()=>(0,a.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{display:"inline"},transform:"translate(0 -1)",children:[(0,a.jsx)("path",{d:"M10 1.667a8.333 8.333 0 1 0 0 16.666 8.333 8.333 0 0 0 0-16.666Zm0 15a6.666 6.666 0 1 1 0-13.333 6.666 6.666 0 0 1 0 13.333Z",fill:"#1D1C20"}),(0,a.jsx)("path",{d:"M6.76 5.15a5.833 5.833 0 1 1 6.481 9.7 5.833 5.833 0 0 1-6.481-9.7Z",fill:"#1D1C20"})]});je=o("85Hg2");var ly={};e(ly,"QueryClient",(()=>Gy)),e(ly,"QueryClient",(()=>ab.QueryClient)),e(ly,"QueryClientProvider",(()=>tb)),e(ly,"useMutation",(()=>nb));var dy="undefined"==typeof window;function uy(){}function py(e,t){return"function"==typeof e?e(t):e}function hy(e){return Array.isArray(e)?e:[e]}function fy(e,t){return Math.max(e+(t||0)-Date.now(),0)}function my(e,t,r){return Py(e)?"function"==typeof t?mv({},r,{queryKey:e,queryFn:t}):mv({},t,{queryKey:e}):e}function gy(e,t,r){return Py(e)?"function"==typeof t?mv({},r,{mutationKey:e,mutationFn:t}):mv({},t,{mutationKey:e}):"function"==typeof e?mv({},t,{mutationFn:e}):mv({},e)}function vy(e,t,r){return Py(e)?[mv({},t,{queryKey:e}),r]:[e||{},t]}function yy(e,t){var r=e.active,n=e.exact,i=e.fetching,o=e.inactive,a=e.predicate,s=e.queryKey,c=e.stale;if(Py(s))if(n){if(t.queryHash!==wy(s,t.options))return!1}else if(!Sy(t.queryKey,s))return!1;var l=function(e,t){return!0===e&&!0===t||null==e&&null==t?"all":!1===e&&!1===t?"none":(null!=e?e:!t)?"active":"inactive"}(r,o);if("none"===l)return!1;if("all"!==l){var d=t.isActive();if("active"===l&&!d)return!1;if("inactive"===l&&d)return!1}return("boolean"!=typeof c||t.isStale()===c)&&(("boolean"!=typeof i||t.isFetching()===i)&&!(a&&!a(t)))}function by(e,t){var r=e.exact,n=e.fetching,i=e.predicate,o=e.mutationKey;if(Py(o)){if(!t.options.mutationKey)return!1;if(r){if(xy(t.options.mutationKey)!==xy(o))return!1}else if(!Sy(t.options.mutationKey,o))return!1}return("boolean"!=typeof n||"loading"===t.state.status===n)&&!(i&&!i(t))}function wy(e,t){return((null==t?void 0:t.queryKeyHashFn)||xy)(e)}function xy(e){var t,r=hy(e);return t=r,JSON.stringify(t,(function(e,t){return Cy(t)?Object.keys(t).sort().reduce((function(e,r){return e[r]=t[r],e}),{}):t}))}function Sy(e,t){return _y(hy(e),hy(t))}function _y(e,t){return e===t||typeof e==typeof t&&(!(!e||!t||"object"!=typeof e||"object"!=typeof t)&&!Object.keys(t).some((function(r){return!_y(e[r],t[r])})))}function ky(e,t){if(e===t)return e;var r=Array.isArray(e)&&Array.isArray(t);if(r||Cy(e)&&Cy(t)){for(var n=r?e.length:Object.keys(e).length,i=r?t:Object.keys(t),o=i.length,a=r?[]:{},s=0,c=0;c<o;c++){var l=r?c:i[c];a[l]=ky(e[l],t[l]),a[l]===e[l]&&s++}return n===o&&s===n?e:a}return t}function Cy(e){if(!Ey(e))return!1;var t=e.constructor;if(void 0===t)return!0;var r=t.prototype;return!!Ey(r)&&!!r.hasOwnProperty("isPrototypeOf")}function Ey(e){return"[object Object]"===Object.prototype.toString.call(e)}function Py(e){return"string"==typeof e||Array.isArray(e)}function Ry(e){Promise.resolve().then(e).catch((function(e){return setTimeout((function(){throw e}))}))}function Ty(){if("function"==typeof AbortController)return new AbortController}var jy=new(function(){function e(){this.queue=[],this.transactions=0,this.notifyFn=function(e){e()},this.batchNotifyFn=function(e){e()}}var t=e.prototype;return t.batch=function(e){var t;this.transactions++;try{t=e()}finally{this.transactions--,this.transactions||this.flush()}return t},t.schedule=function(e){var t=this;this.transactions?this.queue.push(e):Ry((function(){t.notifyFn(e)}))},t.batchCalls=function(e){var t=this;return function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.schedule((function(){e.apply(void 0,n)}))}},t.flush=function(){var e=this,t=this.queue;this.queue=[],t.length&&Ry((function(){e.batchNotifyFn((function(){t.forEach((function(t){e.notifyFn(t)}))}))}))},t.setNotifyFunction=function(e){this.notifyFn=e},t.setBatchNotifyFunction=function(e){this.batchNotifyFn=e},e}()),Oy=console;function My(){return Oy}var Ly=function(){function e(){this.listeners=[]}var t=e.prototype;return t.subscribe=function(e){var t=this,r=e||function(){};return this.listeners.push(r),this.onSubscribe(),function(){t.listeners=t.listeners.filter((function(e){return e!==r})),t.onUnsubscribe()}},t.hasListeners=function(){return this.listeners.length>0},t.onSubscribe=function(){},t.onUnsubscribe=function(){},e}(),Dy=new(function(e){function t(){var t;return(t=e.call(this)||this).setup=function(e){var t;if(!dy&&(null==(t=window)?void 0:t.addEventListener)){var r=function(){return e()};return window.addEventListener("visibilitychange",r,!1),window.addEventListener("focus",r,!1),function(){window.removeEventListener("visibilitychange",r),window.removeEventListener("focus",r)}}},t}vv(t,e);var r=t.prototype;return r.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},r.onUnsubscribe=function(){var e;this.hasListeners()||(null==(e=this.cleanup)||e.call(this),this.cleanup=void 0)},r.setEventListener=function(e){var t,r=this;this.setup=e,null==(t=this.cleanup)||t.call(this),this.cleanup=e((function(e){"boolean"==typeof e?r.setFocused(e):r.onFocus()}))},r.setFocused=function(e){this.focused=e,e&&this.onFocus()},r.onFocus=function(){this.listeners.forEach((function(e){e()}))},r.isFocused=function(){return"boolean"==typeof this.focused?this.focused:"undefined"==typeof document||[void 0,"visible","prerender"].includes(document.visibilityState)},t}(Ly)),Iy=new(function(e){function t(){var t;return(t=e.call(this)||this).setup=function(e){var t;if(!dy&&(null==(t=window)?void 0:t.addEventListener)){var r=function(){return e()};return window.addEventListener("online",r,!1),window.addEventListener("offline",r,!1),function(){window.removeEventListener("online",r),window.removeEventListener("offline",r)}}},t}vv(t,e);var r=t.prototype;return r.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},r.onUnsubscribe=function(){var e;this.hasListeners()||(null==(e=this.cleanup)||e.call(this),this.cleanup=void 0)},r.setEventListener=function(e){var t,r=this;this.setup=e,null==(t=this.cleanup)||t.call(this),this.cleanup=e((function(e){"boolean"==typeof e?r.setOnline(e):r.onOnline()}))},r.setOnline=function(e){this.online=e,e&&this.onOnline()},r.onOnline=function(){this.listeners.forEach((function(e){e()}))},r.isOnline=function(){return"boolean"==typeof this.online?this.online:"undefined"==typeof navigator||void 0===navigator.onLine||navigator.onLine},t}(Ly));function Ay(e){return Math.min(1e3*Math.pow(2,e),3e4)}function Ny(e){return"function"==typeof(null==e?void 0:e.cancel)}var Fy=function(e){this.revert=null==e?void 0:e.revert,this.silent=null==e?void 0:e.silent};function zy(e){return e instanceof Fy}var By=function(e){var t,r,n,i,o=this,a=!1;this.abort=e.abort,this.cancel=function(e){return null==t?void 0:t(e)},this.cancelRetry=function(){a=!0},this.continueRetry=function(){a=!1},this.continue=function(){return null==r?void 0:r()},this.failureCount=0,this.isPaused=!1,this.isResolved=!1,this.isTransportCancelable=!1,this.promise=new Promise((function(e,t){n=e,i=t}));var s=function(t){o.isResolved||(o.isResolved=!0,null==e.onSuccess||e.onSuccess(t),null==r||r(),n(t))},c=function(t){o.isResolved||(o.isResolved=!0,null==e.onError||e.onError(t),null==r||r(),i(t))};!function n(){if(!o.isResolved){var i;try{i=e.fn()}catch(e){i=Promise.reject(e)}t=function(e){if(!o.isResolved&&(c(new Fy(e)),null==o.abort||o.abort(),Ny(i)))try{i.cancel()}catch(e){}},o.isTransportCancelable=Ny(i),Promise.resolve(i).then(s).catch((function(t){var i,s;if(!o.isResolved){var l,d=null!=(i=e.retry)?i:3,u=null!=(s=e.retryDelay)?s:Ay,p="function"==typeof u?u(o.failureCount,t):u,h=!0===d||"number"==typeof d&&o.failureCount<d||"function"==typeof d&&d(o.failureCount,t);if(!a&&h)o.failureCount++,null==e.onFail||e.onFail(o.failureCount,t),(l=p,new Promise((function(e){setTimeout(e,l)}))).then((function(){if(!Dy.isFocused()||!Iy.isOnline())return new Promise((function(t){r=t,o.isPaused=!0,null==e.onPause||e.onPause()})).then((function(){r=void 0,o.isPaused=!1,null==e.onContinue||e.onContinue()}))})).then((function(){a?c(t):n()}));else c(t)}}))}}()},Uy=function(){function e(e){this.abortSignalConsumed=!1,this.hadObservers=!1,this.defaultOptions=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.cache=e.cache,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.initialState=e.state||this.getDefaultState(this.options),this.state=this.initialState,this.meta=e.meta,this.scheduleGc()}var t=e.prototype;return t.setOptions=function(e){var t;this.options=mv({},this.defaultOptions,e),this.meta=null==e?void 0:e.meta,this.cacheTime=Math.max(this.cacheTime||0,null!=(t=this.options.cacheTime)?t:3e5)},t.setDefaultOptions=function(e){this.defaultOptions=e},t.scheduleGc=function(){var e,t=this;this.clearGcTimeout(),"number"==typeof(e=this.cacheTime)&&e>=0&&e!==1/0&&(this.gcTimeout=setTimeout((function(){t.optionalRemove()}),this.cacheTime))},t.clearGcTimeout=function(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)},t.optionalRemove=function(){this.observers.length||(this.state.isFetching?this.hadObservers&&this.scheduleGc():this.cache.remove(this))},t.setData=function(e,t){var r,n,i=this.state.data,o=py(e,i);return(null==(r=(n=this.options).isDataEqual)?void 0:r.call(n,i,o))?o=i:!1!==this.options.structuralSharing&&(o=ky(i,o)),this.dispatch({data:o,type:"success",dataUpdatedAt:null==t?void 0:t.updatedAt}),o},t.setState=function(e,t){this.dispatch({type:"setState",state:e,setStateOptions:t})},t.cancel=function(e){var t,r=this.promise;return null==(t=this.retryer)||t.cancel(e),r?r.then(uy).catch(uy):Promise.resolve()},t.destroy=function(){this.clearGcTimeout(),this.cancel({silent:!0})},t.reset=function(){this.destroy(),this.setState(this.initialState)},t.isActive=function(){return this.observers.some((function(e){return!1!==e.options.enabled}))},t.isFetching=function(){return this.state.isFetching},t.isStale=function(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some((function(e){return e.getCurrentResult().isStale}))},t.isStaleByTime=function(e){return void 0===e&&(e=0),this.state.isInvalidated||!this.state.dataUpdatedAt||!fy(this.state.dataUpdatedAt,e)},t.onFocus=function(){var e,t=this.observers.find((function(e){return e.shouldFetchOnWindowFocus()}));t&&t.refetch(),null==(e=this.retryer)||e.continue()},t.onOnline=function(){var e,t=this.observers.find((function(e){return e.shouldFetchOnReconnect()}));t&&t.refetch(),null==(e=this.retryer)||e.continue()},t.addObserver=function(e){-1===this.observers.indexOf(e)&&(this.observers.push(e),this.hadObservers=!0,this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:e}))},t.removeObserver=function(e){-1!==this.observers.indexOf(e)&&(this.observers=this.observers.filter((function(t){return t!==e})),this.observers.length||(this.retryer&&(this.retryer.isTransportCancelable||this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.cacheTime?this.scheduleGc():this.cache.remove(this)),this.cache.notify({type:"observerRemoved",query:this,observer:e}))},t.getObserversCount=function(){return this.observers.length},t.invalidate=function(){this.state.isInvalidated||this.dispatch({type:"invalidate"})},t.fetch=function(e,t){var r,n,i,o=this;if(this.state.isFetching)if(this.state.dataUpdatedAt&&(null==t?void 0:t.cancelRefetch))this.cancel({silent:!0});else if(this.promise){var a;return null==(a=this.retryer)||a.continueRetry(),this.promise}if(e&&this.setOptions(e),!this.options.queryFn){var s=this.observers.find((function(e){return e.options.queryFn}));s&&this.setOptions(s.options)}var c=hy(this.queryKey),l=Ty(),d={queryKey:c,pageParam:void 0,meta:this.meta};Object.defineProperty(d,"signal",{enumerable:!0,get:function(){if(l)return o.abortSignalConsumed=!0,l.signal}});var u,p,h={fetchOptions:t,options:this.options,queryKey:c,state:this.state,fetchFn:function(){return o.options.queryFn?(o.abortSignalConsumed=!1,o.options.queryFn(d)):Promise.reject("Missing queryFn")},meta:this.meta};(null==(r=this.options.behavior)?void 0:r.onFetch)&&(null==(u=this.options.behavior)||u.onFetch(h));(this.revertState=this.state,this.state.isFetching&&this.state.fetchMeta===(null==(n=h.fetchOptions)?void 0:n.meta))||this.dispatch({type:"fetch",meta:null==(p=h.fetchOptions)?void 0:p.meta});return this.retryer=new By({fn:h.fetchFn,abort:null==l||null==(i=l.abort)?void 0:i.bind(l),onSuccess:function(e){o.setData(e),null==o.cache.config.onSuccess||o.cache.config.onSuccess(e,o),0===o.cacheTime&&o.optionalRemove()},onError:function(e){zy(e)&&e.silent||o.dispatch({type:"error",error:e}),zy(e)||(null==o.cache.config.onError||o.cache.config.onError(e,o),My().error(e)),0===o.cacheTime&&o.optionalRemove()},onFail:function(){o.dispatch({type:"failed"})},onPause:function(){o.dispatch({type:"pause"})},onContinue:function(){o.dispatch({type:"continue"})},retry:h.options.retry,retryDelay:h.options.retryDelay}),this.promise=this.retryer.promise,this.promise},t.dispatch=function(e){var t=this;this.state=this.reducer(this.state,e),jy.batch((function(){t.observers.forEach((function(t){t.onQueryUpdate(e)})),t.cache.notify({query:t,type:"queryUpdated",action:e})}))},t.getDefaultState=function(e){var t="function"==typeof e.initialData?e.initialData():e.initialData,r=void 0!==e.initialData?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0,n=void 0!==t;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?null!=r?r:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchMeta:null,isFetching:!1,isInvalidated:!1,isPaused:!1,status:n?"success":"idle"}},t.reducer=function(e,t){var r,n;switch(t.type){case"failed":return mv({},e,{fetchFailureCount:e.fetchFailureCount+1});case"pause":return mv({},e,{isPaused:!0});case"continue":return mv({},e,{isPaused:!1});case"fetch":return mv({},e,{fetchFailureCount:0,fetchMeta:null!=(r=t.meta)?r:null,isFetching:!0,isPaused:!1},!e.dataUpdatedAt&&{error:null,status:"loading"});case"success":return mv({},e,{data:t.data,dataUpdateCount:e.dataUpdateCount+1,dataUpdatedAt:null!=(n=t.dataUpdatedAt)?n:Date.now(),error:null,fetchFailureCount:0,isFetching:!1,isInvalidated:!1,isPaused:!1,status:"success"});case"error":var i=t.error;return zy(i)&&i.revert&&this.revertState?mv({},this.revertState):mv({},e,{error:i,errorUpdateCount:e.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:e.fetchFailureCount+1,isFetching:!1,isPaused:!1,status:"error"});case"invalidate":return mv({},e,{isInvalidated:!0});case"setState":return mv({},e,t.state);default:return e}},e}(),Vy=function(e){function t(t){var r;return(r=e.call(this)||this).config=t||{},r.queries=[],r.queriesMap={},r}vv(t,e);var r=t.prototype;return r.build=function(e,t,r){var n,i=t.queryKey,o=null!=(n=t.queryHash)?n:wy(i,t),a=this.get(o);return a||(a=new Uy({cache:this,queryKey:i,queryHash:o,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(i),meta:t.meta}),this.add(a)),a},r.add=function(e){this.queriesMap[e.queryHash]||(this.queriesMap[e.queryHash]=e,this.queries.push(e),this.notify({type:"queryAdded",query:e}))},r.remove=function(e){var t=this.queriesMap[e.queryHash];t&&(e.destroy(),this.queries=this.queries.filter((function(t){return t!==e})),t===e&&delete this.queriesMap[e.queryHash],this.notify({type:"queryRemoved",query:e}))},r.clear=function(){var e=this;jy.batch((function(){e.queries.forEach((function(t){e.remove(t)}))}))},r.get=function(e){return this.queriesMap[e]},r.getAll=function(){return this.queries},r.find=function(e,t){var r=vy(e,t)[0];return void 0===r.exact&&(r.exact=!0),this.queries.find((function(e){return yy(r,e)}))},r.findAll=function(e,t){var r=vy(e,t)[0];return Object.keys(r).length>0?this.queries.filter((function(e){return yy(r,e)})):this.queries},r.notify=function(e){var t=this;jy.batch((function(){t.listeners.forEach((function(t){t(e)}))}))},r.onFocus=function(){var e=this;jy.batch((function(){e.queries.forEach((function(e){e.onFocus()}))}))},r.onOnline=function(){var e=this;jy.batch((function(){e.queries.forEach((function(e){e.onOnline()}))}))},t}(Ly),Hy=function(){function e(e){this.options=mv({},e.defaultOptions,e.options),this.mutationId=e.mutationId,this.mutationCache=e.mutationCache,this.observers=[],this.state=e.state||qy(),this.meta=e.meta}var t=e.prototype;return t.setState=function(e){this.dispatch({type:"setState",state:e})},t.addObserver=function(e){-1===this.observers.indexOf(e)&&this.observers.push(e)},t.removeObserver=function(e){this.observers=this.observers.filter((function(t){return t!==e}))},t.cancel=function(){return this.retryer?(this.retryer.cancel(),this.retryer.promise.then(uy).catch(uy)):Promise.resolve()},t.continue=function(){return this.retryer?(this.retryer.continue(),this.retryer.promise):this.execute()},t.execute=function(){var e,t=this,r="loading"===this.state.status,n=Promise.resolve();return r||(this.dispatch({type:"loading",variables:this.options.variables}),n=n.then((function(){null==t.mutationCache.config.onMutate||t.mutationCache.config.onMutate(t.state.variables,t)})).then((function(){return null==t.options.onMutate?void 0:t.options.onMutate(t.state.variables)})).then((function(e){e!==t.state.context&&t.dispatch({type:"loading",context:e,variables:t.state.variables})}))),n.then((function(){return t.executeMutation()})).then((function(r){e=r,null==t.mutationCache.config.onSuccess||t.mutationCache.config.onSuccess(e,t.state.variables,t.state.context,t)})).then((function(){return null==t.options.onSuccess?void 0:t.options.onSuccess(e,t.state.variables,t.state.context)})).then((function(){return null==t.options.onSettled?void 0:t.options.onSettled(e,null,t.state.variables,t.state.context)})).then((function(){return t.dispatch({type:"success",data:e}),e})).catch((function(e){return null==t.mutationCache.config.onError||t.mutationCache.config.onError(e,t.state.variables,t.state.context,t),My().error(e),Promise.resolve().then((function(){return null==t.options.onError?void 0:t.options.onError(e,t.state.variables,t.state.context)})).then((function(){return null==t.options.onSettled?void 0:t.options.onSettled(void 0,e,t.state.variables,t.state.context)})).then((function(){throw t.dispatch({type:"error",error:e}),e}))}))},t.executeMutation=function(){var e,t=this;return this.retryer=new By({fn:function(){return t.options.mutationFn?t.options.mutationFn(t.state.variables):Promise.reject("No mutationFn found")},onFail:function(){t.dispatch({type:"failed"})},onPause:function(){t.dispatch({type:"pause"})},onContinue:function(){t.dispatch({type:"continue"})},retry:null!=(e=this.options.retry)?e:0,retryDelay:this.options.retryDelay}),this.retryer.promise},t.dispatch=function(e){var t=this;this.state=function(e,t){switch(t.type){case"failed":return mv({},e,{failureCount:e.failureCount+1});case"pause":return mv({},e,{isPaused:!0});case"continue":return mv({},e,{isPaused:!1});case"loading":return mv({},e,{context:t.context,data:void 0,error:null,isPaused:!1,status:"loading",variables:t.variables});case"success":return mv({},e,{data:t.data,error:null,status:"success",isPaused:!1});case"error":return mv({},e,{data:void 0,error:t.error,failureCount:e.failureCount+1,isPaused:!1,status:"error"});case"setState":return mv({},e,t.state);default:return e}}(this.state,e),jy.batch((function(){t.observers.forEach((function(t){t.onMutationUpdate(e)})),t.mutationCache.notify(t)}))},e}();function qy(){return{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0}}var Wy=function(e){function t(t){var r;return(r=e.call(this)||this).config=t||{},r.mutations=[],r.mutationId=0,r}vv(t,e);var r=t.prototype;return r.build=function(e,t,r){var n=new Hy({mutationCache:this,mutationId:++this.mutationId,options:e.defaultMutationOptions(t),state:r,defaultOptions:t.mutationKey?e.getMutationDefaults(t.mutationKey):void 0,meta:t.meta});return this.add(n),n},r.add=function(e){this.mutations.push(e),this.notify(e)},r.remove=function(e){this.mutations=this.mutations.filter((function(t){return t!==e})),e.cancel(),this.notify(e)},r.clear=function(){var e=this;jy.batch((function(){e.mutations.forEach((function(t){e.remove(t)}))}))},r.getAll=function(){return this.mutations},r.find=function(e){return void 0===e.exact&&(e.exact=!0),this.mutations.find((function(t){return by(e,t)}))},r.findAll=function(e){return this.mutations.filter((function(t){return by(e,t)}))},r.notify=function(e){var t=this;jy.batch((function(){t.listeners.forEach((function(t){t(e)}))}))},r.onFocus=function(){this.resumePausedMutations()},r.onOnline=function(){this.resumePausedMutations()},r.resumePausedMutations=function(){var e=this.mutations.filter((function(e){return e.state.isPaused}));return jy.batch((function(){return e.reduce((function(e,t){return e.then((function(){return t.continue().catch(uy)}))}),Promise.resolve())}))},t}(Ly);function $y(e,t){return null==e.getNextPageParam?void 0:e.getNextPageParam(t[t.length-1],t)}function Ky(e,t){return null==e.getPreviousPageParam?void 0:e.getPreviousPageParam(t[0],t)}var Gy=function(){function e(e){void 0===e&&(e={}),this.queryCache=e.queryCache||new Vy,this.mutationCache=e.mutationCache||new Wy,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[]}var t=e.prototype;return t.mount=function(){var e=this;this.unsubscribeFocus=Dy.subscribe((function(){Dy.isFocused()&&Iy.isOnline()&&(e.mutationCache.onFocus(),e.queryCache.onFocus())})),this.unsubscribeOnline=Iy.subscribe((function(){Dy.isFocused()&&Iy.isOnline()&&(e.mutationCache.onOnline(),e.queryCache.onOnline())}))},t.unmount=function(){var e,t;null==(e=this.unsubscribeFocus)||e.call(this),null==(t=this.unsubscribeOnline)||t.call(this)},t.isFetching=function(e,t){var r=vy(e,t)[0];return r.fetching=!0,this.queryCache.findAll(r).length},t.isMutating=function(e){return this.mutationCache.findAll(mv({},e,{fetching:!0})).length},t.getQueryData=function(e,t){var r;return null==(r=this.queryCache.find(e,t))?void 0:r.state.data},t.getQueriesData=function(e){return this.getQueryCache().findAll(e).map((function(e){return[e.queryKey,e.state.data]}))},t.setQueryData=function(e,t,r){var n=my(e),i=this.defaultQueryOptions(n);return this.queryCache.build(this,i).setData(t,r)},t.setQueriesData=function(e,t,r){var n=this;return jy.batch((function(){return n.getQueryCache().findAll(e).map((function(e){var i=e.queryKey;return[i,n.setQueryData(i,t,r)]}))}))},t.getQueryState=function(e,t){var r;return null==(r=this.queryCache.find(e,t))?void 0:r.state},t.removeQueries=function(e,t){var r=vy(e,t)[0],n=this.queryCache;jy.batch((function(){n.findAll(r).forEach((function(e){n.remove(e)}))}))},t.resetQueries=function(e,t,r){var n=this,i=vy(e,t,r),o=i[0],a=i[1],s=this.queryCache,c=mv({},o,{active:!0});return jy.batch((function(){return s.findAll(o).forEach((function(e){e.reset()})),n.refetchQueries(c,a)}))},t.cancelQueries=function(e,t,r){var n=this,i=vy(e,t,r),o=i[0],a=i[1],s=void 0===a?{}:a;void 0===s.revert&&(s.revert=!0);var c=jy.batch((function(){return n.queryCache.findAll(o).map((function(e){return e.cancel(s)}))}));return Promise.all(c).then(uy).catch(uy)},t.invalidateQueries=function(e,t,r){var n,i,o,a=this,s=vy(e,t,r),c=s[0],l=s[1],d=mv({},c,{active:null==(n=null!=(i=c.refetchActive)?i:c.active)||n,inactive:null!=(o=c.refetchInactive)&&o});return jy.batch((function(){return a.queryCache.findAll(c).forEach((function(e){e.invalidate()})),a.refetchQueries(d,l)}))},t.refetchQueries=function(e,t,r){var n=this,i=vy(e,t,r),o=i[0],a=i[1],s=jy.batch((function(){return n.queryCache.findAll(o).map((function(e){return e.fetch(void 0,mv({},a,{meta:{refetchPage:null==o?void 0:o.refetchPage}}))}))})),c=Promise.all(s).then(uy);return(null==a?void 0:a.throwOnError)||(c=c.catch(uy)),c},t.fetchQuery=function(e,t,r){var n=my(e,t,r),i=this.defaultQueryOptions(n);void 0===i.retry&&(i.retry=!1);var o=this.queryCache.build(this,i);return o.isStaleByTime(i.staleTime)?o.fetch(i):Promise.resolve(o.state.data)},t.prefetchQuery=function(e,t,r){return this.fetchQuery(e,t,r).then(uy).catch(uy)},t.fetchInfiniteQuery=function(e,t,r){var n=my(e,t,r);return n.behavior={onFetch:function(e){e.fetchFn=function(){var t,r,n,i,o,a,s,c=null==(t=e.fetchOptions)||null==(r=t.meta)?void 0:r.refetchPage,l=null==(n=e.fetchOptions)||null==(i=n.meta)?void 0:i.fetchMore,d=null==l?void 0:l.pageParam,u="forward"===(null==l?void 0:l.direction),p="backward"===(null==l?void 0:l.direction),h=(null==(o=e.state.data)?void 0:o.pages)||[],f=(null==(a=e.state.data)?void 0:a.pageParams)||[],m=Ty(),g=null==m?void 0:m.signal,v=f,y=!1,b=e.options.queryFn||function(){return Promise.reject("Missing queryFn")},w=function(e,t,r,n){return v=n?[t].concat(v):[].concat(v,[t]),n?[r].concat(e):[].concat(e,[r])},x=function(t,r,n,i){if(y)return Promise.reject("Cancelled");if(void 0===n&&!r&&t.length)return Promise.resolve(t);var o={queryKey:e.queryKey,signal:g,pageParam:n,meta:e.meta},a=b(o),s=Promise.resolve(a).then((function(e){return w(t,n,e,i)}));return Ny(a)&&(s.cancel=a.cancel),s};if(h.length)if(u){var S=void 0!==d,_=S?d:$y(e.options,h);s=x(h,S,_)}else if(p){var k=void 0!==d,C=k?d:Ky(e.options,h);s=x(h,k,C,!0)}else!function(){v=[];var t=void 0===e.options.getNextPageParam,r=!c||!h[0]||c(h[0],0,h);s=r?x([],t,f[0]):Promise.resolve(w([],f[0],h[0]));for(var n=function(r){s=s.then((function(n){if(!c||!h[r]||c(h[r],r,h)){var i=t?f[r]:$y(e.options,n);return x(n,t,i)}return Promise.resolve(w(n,f[r],h[r]))}))},i=1;i<h.length;i++)n(i)}();else s=x([]);var E=s.then((function(e){return{pages:e,pageParams:v}}));return E.cancel=function(){y=!0,null==m||m.abort(),Ny(s)&&s.cancel()},E}}},this.fetchQuery(n)},t.prefetchInfiniteQuery=function(e,t,r){return this.fetchInfiniteQuery(e,t,r).then(uy).catch(uy)},t.cancelMutations=function(){var e=this,t=jy.batch((function(){return e.mutationCache.getAll().map((function(e){return e.cancel()}))}));return Promise.all(t).then(uy).catch(uy)},t.resumePausedMutations=function(){return this.getMutationCache().resumePausedMutations()},t.executeMutation=function(e){return this.mutationCache.build(this,e).execute()},t.getQueryCache=function(){return this.queryCache},t.getMutationCache=function(){return this.mutationCache},t.getDefaultOptions=function(){return this.defaultOptions},t.setDefaultOptions=function(e){this.defaultOptions=e},t.setQueryDefaults=function(e,t){var r=this.queryDefaults.find((function(t){return xy(e)===xy(t.queryKey)}));r?r.defaultOptions=t:this.queryDefaults.push({queryKey:e,defaultOptions:t})},t.getQueryDefaults=function(e){var t;return e?null==(t=this.queryDefaults.find((function(t){return Sy(e,t.queryKey)})))?void 0:t.defaultOptions:void 0},t.setMutationDefaults=function(e,t){var r=this.mutationDefaults.find((function(t){return xy(e)===xy(t.mutationKey)}));r?r.defaultOptions=t:this.mutationDefaults.push({mutationKey:e,defaultOptions:t})},t.getMutationDefaults=function(e){var t;return e?null==(t=this.mutationDefaults.find((function(t){return Sy(e,t.mutationKey)})))?void 0:t.defaultOptions:void 0},t.defaultQueryOptions=function(e){if(null==e?void 0:e._defaulted)return e;var t=mv({},this.defaultOptions.queries,this.getQueryDefaults(null==e?void 0:e.queryKey),e,{_defaulted:!0});return!t.queryHash&&t.queryKey&&(t.queryHash=wy(t.queryKey,t)),t},t.defaultQueryObserverOptions=function(e){return this.defaultQueryOptions(e)},t.defaultMutationOptions=function(e){return(null==e?void 0:e._defaulted)?e:mv({},this.defaultOptions.mutations,this.getMutationDefaults(null==e?void 0:e.mutationKey),e,{_defaulted:!0})},t.clear=function(){this.queryCache.clear(),this.mutationCache.clear()},e}(),Zy=r(c).unstable_batchedUpdates;jy.setBatchNotifyFunction(Zy);var Qy=console;Oy=Qy;var Yy=r(je=o("85Hg2")).createContext(void 0),Jy=r(je).createContext(!1);function Xy(e){return e&&"undefined"!=typeof window?(window.ReactQueryClientContext||(window.ReactQueryClientContext=Yy),window.ReactQueryClientContext):Yy}var eb=function(){var e=r(je).useContext(Xy(r(je).useContext(Jy)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},tb=function(e){var t=e.client,n=e.contextSharing,i=void 0!==n&&n,o=e.children;r(je).useEffect((function(){return t.mount(),function(){t.unmount()}}),[t]);var a=Xy(i);return r(je).createElement(Jy.Provider,{value:i},r(je).createElement(a.Provider,{value:t},o))},rb=(je=o("85Hg2"),function(e){function t(t,r){var n;return(n=e.call(this)||this).client=t,n.setOptions(r),n.bindMethods(),n.updateResult(),n}vv(t,e);var r=t.prototype;return r.bindMethods=function(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)},r.setOptions=function(e){this.options=this.client.defaultMutationOptions(e)},r.onUnsubscribe=function(){var e;this.listeners.length||(null==(e=this.currentMutation)||e.removeObserver(this))},r.onMutationUpdate=function(e){this.updateResult();var t={listeners:!0};"success"===e.type?t.onSuccess=!0:"error"===e.type&&(t.onError=!0),this.notify(t)},r.getCurrentResult=function(){return this.currentResult},r.reset=function(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})},r.mutate=function(e,t){return this.mutateOptions=t,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,mv({},this.options,{variables:void 0!==e?e:this.options.variables})),this.currentMutation.addObserver(this),this.currentMutation.execute()},r.updateResult=function(){var e=this.currentMutation?this.currentMutation.state:{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0},t=mv({},e,{isLoading:"loading"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset});this.currentResult=t},r.notify=function(e){var t=this;jy.batch((function(){t.mutateOptions&&(e.onSuccess?(null==t.mutateOptions.onSuccess||t.mutateOptions.onSuccess(t.currentResult.data,t.currentResult.variables,t.currentResult.context),null==t.mutateOptions.onSettled||t.mutateOptions.onSettled(t.currentResult.data,null,t.currentResult.variables,t.currentResult.context)):e.onError&&(null==t.mutateOptions.onError||t.mutateOptions.onError(t.currentResult.error,t.currentResult.variables,t.currentResult.context),null==t.mutateOptions.onSettled||t.mutateOptions.onSettled(void 0,t.currentResult.error,t.currentResult.variables,t.currentResult.context))),e.listeners&&t.listeners.forEach((function(e){e(t.currentResult)}))}))},t}(Ly));function nb(e,t,n){var i=r(je).useRef(!1),o=r(je).useState(0)[1],a=gy(e,t,n),s=eb(),c=r(je).useRef();c.current?c.current.setOptions(a):c.current=new rb(s,a);var l=c.current.getCurrentResult();r(je).useEffect((function(){i.current=!0;var e=c.current.subscribe(jy.batchCalls((function(){i.current&&o((function(e){return e+1}))})));return function(){i.current=!1,e()}}),[]);var d,u,p,h=r(je).useCallback((function(e,t){c.current.mutate(e,t).catch(uy)}),[]);if(l.error&&(d=void 0,u=c.current.options.useErrorBoundary,p=[l.error],"function"==typeof u?u.apply(void 0,p):"boolean"==typeof u?u:d))throw l.error;return mv({},l,{mutate:h,mutateAsync:l.mutate})}var ib,ob,ab={};ib=ly,ob={},Object.keys(ob).forEach((function(e){"default"===e||"__esModule"===e||ib.hasOwnProperty(e)||Object.defineProperty(ib,e,{enumerable:!0,get:function(){return ob[e]}})}));const sb={audio:!1,video:!1},cb=e=>{const[t,r]=(0,je.useState)(),n=nb([e],(async()=>{const n=await navigator.mediaDevices.getUserMedia(e);return r(n),e.audio&&!sb.audio&&(sb.audio=!0),e.video&&!sb.video&&(sb.video=!0),{media:t,savedPermissions:sb}}));return null==n.data&&t?.getTracks().forEach((e=>{e.stop(),t?.removeTrack(e)})),{...n,savedPermissions:sb}},lb=({children:e})=>(0,a.jsx)("span",{className:"text-primary font-medium",children:e}),db=({state:e,mode:t,...r})=>{const{t:n}=Fi(),i=cb({audio:!0,video:!0}),[o,s]=(0,je.useState)("idle");(0,je.useEffect)((()=>{const{deviceState:e}=Qa.getState();return e.screenshare.enabled||e.camera.enabled?s("granted"):void s("idle")}),[t]);const{orientation:c}=(0,je.useContext)(Ya),l="landscape"===c?"desktop":"mobile",d="granted"===o?"short":"full",u=(0,je.useRef)(null),p=n("photo"===t?"recorder.photoInstructionsTitle":"recorder.videoInstructionsTitle"),h=[(0,a.jsxs)(oy,{i18nKey:"recorder.instructions.allowAccessOnPrompt",children:["When prompted, ",(0,a.jsx)(lb,{children:"allow access"})," to camera and microphone."]})],f=[(0,a.jsxs)(oy,{i18nKey:"recorder.instructions.tapPhotoButton",com:!0,children:["Tap the ",(0,a.jsx)(cy,{}),(0,a.jsx)(lb,{children:" Camera button"})," to take a photo."]}),n("recorder.instructions.multiplePhotos"),(0,a.jsxs)(oy,{i18nKey:"recorder.instructions.reviewAndSendPhotos",children:["You can review your photo and then ",(0,a.jsx)(lb,{children:"send it when you're done."})]})],m=[(0,a.jsxs)(oy,{i18nKey:"recorder.instructions.tapVideoButton",children:["Tap the ",(0,a.jsx)(ay,{}),(0,a.jsx)(lb,{children:" Record button"})," to start a recording."]}),(0,a.jsxs)(oy,{i18nKey:"recorder.instructions.videoSpeech",children:["You can ",(0,a.jsx)(lb,{children:"speak during"})," the recording for added detail."]}),(0,a.jsxs)(oy,{i18nKey:"recorder.instructions.tapStopVideoButton",children:["When you're finished, tap the ",(0,a.jsx)(sy,{}),(0,a.jsx)(lb,{children:" Stop button"}),"."]}),(0,a.jsxs)(oy,{i18nKey:"recorder.instructions.reviewAndSendVideos",children:["You can review your video and then ",(0,a.jsx)(lb,{children:"send it when you're done"}),"."]})],g=[];return i.savedPermissions.audio||g.push(...h),g.push(..."photo"===t?f:m),(0,a.jsx)(Iv,{title:p,state:e,centered:!0,isDismissable:!1,...r,children:(0,a.jsxs)("div",{className:"flex flex-col gap-[20px]",children:[(0,a.jsx)("div",{className:"flex flex-col gap-[10px]",ref:u,children:g.map(((e,t)=>(0,a.jsxs)("div",{className:"flex flex-row justify-center gap-[5px]",children:[(0,a.jsx)("div",{className:"flex items-center justify-center min-w-[24px] h-[24px] rounded-[50%] bg-secondaryVLight",children:t+1}),(0,a.jsx)("span",{className:"w-full text-base text-primaryLight font-normal leading-[20px]",children:e})]},t)))}),(0,a.jsx)("div",{className:"flex items-center justify-center rounded-[8px] overflow-hidden",children:(0,a.jsx)("video",{src:`https://stream-assets.snapcall.io/animations/${l}-assist-onboarding-${t}-${d}.mp4`,playsInline:!0,autoPlay:!0,muted:!0,loop:!0})})]})})},ub=e=>[Math.floor(e/60),Math.round(e%60)].map((e=>`${e<10?"0":""}${e}`)).join(":");function pb(e){const t=new Intl.DateTimeFormat("default",{dateStyle:"short"}),r=new Intl.DateTimeFormat("default",{hour:"numeric",minute:"2-digit"});return`${t.format(e)} at ${r.format(e)}`}const hb=r(zi).parse(window.navigator.userAgent),fb=({recorderState:e})=>{const{t:t}=Fi(),{selfPeerId:n}=(0,je.useContext)(Ya),i=cb({audio:!0,video:!0}),[o,s]=(0,je.useState)(!1),c=(0,je.useRef)(null),l="desktop"===hb.platform.type,d=Nf({defaultOpen:!l}),[u,p]=(0,je.useState)(!1),[h,f]=(0,je.useState)(!1),m=Nf({defaultOpen:l}),[g,v]=(0,je.useState)(!1),y=(0,je.useCallback)((()=>{s(!1)}),[]);return(0,je.useEffect)((()=>(Qa.addEventListener("recordStopped",y),()=>{Qa.removeEventListener("recordStopped",y)})),[y]),(0,a.jsxs)("div",{className:r(zf)("bg-[#000] w-full h-full justify-center flex flex-col antialiased inter",{}),children:[(0,a.jsx)(db,{state:d,mode:e.mode,primaryAction:()=>(0,a.jsx)(Wg,{fullWidth:!0,variant:"blue",isDisabled:!n||i.isLoading,onPress:()=>{if(!i.savedPermissions.audio)return(async()=>{i.mutate(void 0,{onError:()=>{e.permissionBlockedModalState.setOpen(!0)},onSettled:()=>{},onSuccess:async()=>{d.close();const{deviceState:e}=Qa.getState();i.reset(),e.microphone.enabled||await Qa.enableMicrophone(),e.camera.enabled||await Qa.enableVideo({resolution:"vga",frameRate:20,facingMode:"environment"})}})})();d.close()},children:i?.savedPermissions.audio?t("recorder.okay"):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(Op,{}),t("recorder.allowCamMicAccess")]})})}),(0,a.jsx)(Av,{state:m,onClose:d.open}),("video"===e.mode||e.streaming)&&(0,a.jsx)("div",{className:"text-base text-white text-center font-medium pt-2.5",children:ub(e.timer)}),(0,a.jsx)("div",{className:"flex-1 min-h-0 p-2.5 ",children:(0,a.jsxs)("div",{className:"relative w-full h-full rounded-[10px] ",children:[o&&(0,a.jsx)(Ug,{initialValue:3,onFinish:()=>{s(!1),e.setStartRecordTime(Date.now()),Qa.startRecord().then((()=>{c.current&&e.captureThumbnail(c.current)}))}}),g&&(0,a.jsx)(Tc,{onAnimationEnd:()=>{v(!1),e.assetsPopupState.open()}}),(0,a.jsx)(Hg,{ref:c})]})}),(0,a.jsx)("div",{className:"flex justify-center px-2.5 pb-2.5 z-10",children:(0,a.jsx)(Bg,{state:e,changeMode:t=>{e.setMode(t),"photo"!==t||h||(f(!0),d.open()),"video"!==t||u||(p(!0),d.open())},thumbnail:(0,a.jsx)(qg,{asset:e.assets[e.assets.length-1],onClick:e.assetsPopupState.open}),onSwitch:()=>{Qa.rotateVideo()},onCapturePress:()=>{"photo"===e.mode&&c.current&&((async t=>{const r=Date.now();e.setAssetLoading(!0);const n=await Qa.captureVideo(t),{url:i,assetId:o}=await Qa.saveCapture(n);e.setAssetLoading(!1),e.setAssets([...e.assets,{type:"photo",timestamp:r,objectUrl:i,assetId:o}])})(c.current),v(!0)),"photo"===e.mode||e.streaming||(e.setStreaming(!0),s(!0)),"photo"!==e.mode&&e.streaming&&(y(),e.startRecordTime&&(Qa.stopRecord(),e.setAssetLoading(!0),e.assetsPopupState.open()))}})})]})};je=o("85Hg2");const mb=({children:e})=>(0,a.jsx)("span",{className:"text-white font-medium",children:e}),gb=()=>{const{t:e}=Fi(),t=[(0,a.jsxs)(oy,{i18nKey:"recorder.instructions.tapVideoButton",children:["Tap the ",(0,a.jsx)(ay,{sideColor:"#FFFFFF",mainColor:"#E5484D"}),(0,a.jsx)(mb,{children:" Record button"})," to start a recording."]}),(0,a.jsx)(oy,{i18nKey:"recorder.instructions.screenShareInstruction"}),(0,a.jsxs)(oy,{i18nKey:"recorder.instructions.videoSpeech",children:["You can ",(0,a.jsx)(mb,{children:"speak during"})," the recording for added detail."]}),(0,a.jsxs)(oy,{i18nKey:"recorder.instructions.tapStopVideoButton",children:["When you're finished, tap the ",(0,a.jsx)(sy,{sideColor:"#FFFFFF",mainColor:"#E5484D"}),(0,a.jsx)(mb,{children:" Stop button"}),"."]}),(0,a.jsxs)(oy,{i18nKey:"recorder.instructions.reviewAndSendVideos",children:["You can review your video and then ",(0,a.jsx)(mb,{children:"send it when you're done"}),"."]})];return(0,a.jsxs)("div",{className:"flex flex-row gap-[20px] w-full justify-between px-[60px]",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-[10px] w-[50%] items-start justify-center",children:[(0,a.jsx)("span",{className:" text-white font-semibold text-lg pb-[20px]",children:e("recorder.screenTitle")}),t.map(((e,t)=>(0,a.jsxs)("div",{className:"flex flex-row items-center justify-center gap-[20px]",children:[(0,a.jsx)("div",{className:"flex items-center justify-center min-w-[24px] h-[24px] rounded-[50%] bg-[#171717] text-white",children:t+1}),(0,a.jsx)("span",{className:"w-full text-base text-white font-normal leading-[20px]",children:e})]},t)))]}),(0,a.jsx)("div",{className:"flex items-center justify-center overflow-hidden w-[50%] box-border",children:(0,a.jsx)("video",{src:"https://stream-assets.snapcall.io/animations/desktop-assist-onboarding-screen.mp4",playsInline:!0,autoPlay:!0,muted:!0,loop:!0,className:"object-fit border-[white] border-[2px] rounded-[8px]"})})]})},vb=({recorderState:e})=>{const t=(0,je.useRef)(null),{t:n}=Fi(),i=cb({audio:!0}),[o,s]=(0,je.useState)("base");(0,je.useEffect)((()=>{"video"!==e.mode&&e.setMode("video")}),[e]);const c=(0,je.useCallback)((()=>{e.assetsPopupState.setOpen(!0),Qa.stopRecord(),s("base")}),[e]);return(0,je.useEffect)((()=>(Qa.addEventListener("screenshareDisabled",c),()=>{Qa.removeEventListener("screenshareDisabled",c)})),[c]),(0,je.useEffect)((()=>{const t=()=>{e.assetsPopupState.setOpen(!0),Qa.disableScreenshare(),s("base")};return Qa.addEventListener("recordStopped",t),()=>{Qa.removeEventListener("recordStopped",t)}}),[e.assetsPopupState]),(0,a.jsxs)("div",{className:"w-full h-full bg-black flex flex-col items-center justify-center py-[125px]",children:["live"!==o&&(0,a.jsxs)("div",{className:"relative bg-cover box-border rounded-[8px] w-full h-full max-w-[1116px] bg-[url('https://cdn.snapcall.io/img/assist/gradient-bg.jpg')] flex flex-col items-center justify-center ",children:[(0,a.jsx)(gb,{}),(0,a.jsxs)("div",{className:"absolute w-[486px] bottom-[-85px] left-[calc(50%-243px)] flex flex-col gap-[7px] items-center justify-center",children:[(0,a.jsx)(Fg,{state:o,onCapturePress:()=>{s("request"),e.setStreaming(!0),i.mutate(void 0,{onError:()=>{e.permissionBlockedModalState.setOpen(!0)},onSuccess:async()=>{try{const{deviceState:r}=Qa.getState();i.reset(),r.microphone.enabled||await Qa.enableMicrophone(),await Qa.enableScreenshare({audioTransportOption:"mix"}),Qa.startRecord().then((()=>{setTimeout((()=>{t.current&&e.captureThumbnail(t.current)}),1e3)})),s("live"),e.setStartRecordTime(Date.now())}catch(t){console.log(t),e.permissionBlockedModalState.setOpen(!0)}}})}}),(0,a.jsx)("span",{className:"text-white text-center font-small text-sm overflow-visible",children:n("recorder.limit")})]})]}),(0,a.jsxs)("div",{className:r(zf)("relative",{"w-0 h-0":"live"!==o,"min-w-[200px] max-h-[100%]":"live"===o}),children:[(0,a.jsx)(Vg,{ref:t}),"live"===o&&(0,a.jsxs)("div",{className:"absolute w-[86px] h-[86px] bottom-[-65px] left-[calc(50%-43px)]",children:[(0,a.jsx)(Fg,{onCapturePress:()=>{e.setAssetLoading(!0),Qa.disableScreenshare()},state:o}),(0,a.jsxs)("span",{className:"text-white font-small text-sm text-center pt-[14px]",children:[ub(e.timer)," / 05:00"]})]})]})]})},yb=({state:e})=>{const{t:t}=Fi();return(0,a.jsx)(Iv,{title:t("recorder.permissionDeniedTitle"),state:e,centered:!1,isDismissable:!1,primaryAction:()=>(0,a.jsx)(Wg,{variant:"blue",fullWidth:!0,onPress:()=>window.location.reload(),children:t("recorder.allowAccess")}),children:(0,a.jsx)("div",{className:"flex flex-col gap-[20px]",children:(0,a.jsx)("div",{className:"flex flex-col gap-[10px]",children:(0,a.jsx)("span",{className:"w-full text-base text-primaryLight font-normal leading-[20px]",children:t("recorder.permissionDeniedDescription")})})})})};je=o("85Hg2"),je=o("85Hg2");function bb(e){const{children:t,state:n}=e,i=r(je).useRef(null),{orientation:o}=(0,je.useContext)(Ya),{modalProps:s,underlayProps:c}=fv(e,n,i),[l,d]=(0,je.useState)(!n.isOpen),u=pm().height-64,[p]=(0,je.useState)("landscape"===o);return!n.isOpen&&l?null:(0,a.jsx)(hv,{children:(0,a.jsx)(Lv,{in:n.isOpen,appear:!0,onEntered:()=>d(!1),onExited:()=>d(!0),timeout:{enter:0,exit:300},classNames:{enter:"opacity-0",enterDone:"opacity-1 transition ease-in",exit:"opacity-0 transition ease-out"},children:(0,a.jsx)("div",{className:r(zf)("fixed z-[100] inset-0 bg-underlay flex justify-center inter",p?"items-center":"items-end h-full"),...c,children:(0,a.jsx)(Lv,{in:n.isOpen,appear:!0,nodeRef:i,timeout:{enter:0,exit:300},classNames:{appear:p?"translate-y-[200%]":"translate-y-full",appearDone:"translate-y-0 transition duration-300 ease-out",exit:r(zf)("transition ease-out",p?"translate-y-[200%]":"translate-y-full")},children:(0,a.jsx)("div",{...s,ref:i,className:r(zf)("bg-white z-[1] overflow-auto focus:outline-none",p?"translate-y-[200%] rounded-[15px]":"translate-y-full rounded-t-[15px]"),style:{maxHeight:`${u}px`},children:t})})})})})}const wb=()=>(0,a.jsx)("svg",{width:"18",height:"19",viewBox:"0 0 18 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M7.5 14a.75.75 0 0 0 .75-.75v-4.5a.75.75 0 0 0-1.5 0v4.5a.75.75 0 0 0 .75.75ZM15 5h-3v-.75A2.25 2.25 0 0 0 9.75 2h-1.5A2.25 2.25 0 0 0 6 4.25V5H3a.75.75 0 0 0 0 1.5h.75v8.25A2.25 2.25 0 0 0 6 17h6a2.25 2.25 0 0 0 2.25-2.25V6.5H15A.75.75 0 1 0 15 5Zm-7.5-.75a.75.75 0 0 1 .75-.75h1.5a.75.75 0 0 1 .75.75V5h-3v-.75Zm5.25 10.5a.75.75 0 0 1-.75.75H6a.75.75 0 0 1-.75-.75V6.5h7.5v8.25ZM10.5 14a.75.75 0 0 0 .75-.75v-4.5a.75.75 0 1 0-1.5 0v4.5a.75.75 0 0 0 .75.75Z",fill:"#fff"})}),xb=({asset:e,state:t})=>(0,a.jsx)(Dv,{state:t,children:(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center w-screen h-screen p-[15px] gap-[10px]",children:["photo"===e.type&&(0,a.jsx)("img",{src:e.objectUrl,alt:`Asset-${e.assetId}`,className:"flex-1 object-cover rounded-[10px] max-h-[90%] max-w-[90%] mb-[9px]"}),"video"===e.type&&(0,a.jsx)("video",{src:e.objectUrl,playsInline:!0,autoPlay:!0,controls:!0,className:"flex-1 rounded-[10px] min-w-full max-h-[90%] max-w-[90%] pb-[9px]"}),(0,a.jsx)(Wg,{onPress:t.close,variant:"tertiary",size:"large",className:"w-[135px]",children:"Close"})]})}),Sb=({asset:e,index:t,removeAsset:r})=>{const{t:n}=Fi(),i=Nf({}),o=Nf({});return(0,a.jsxs)("div",{className:"flex flex-row justify-between items-center ",children:[(0,a.jsx)(Iv,{title:n("recorder.confirmRemovalTitle"),state:i,description:n("recorder.confirmRemovalDescription"),primaryAction:({close:t})=>(0,a.jsxs)(Wg,{fullWidth:!0,variant:"blue",onPress:async()=>{await(r?.(e)),t()},children:[(0,a.jsx)(wb,{}),n("misc.confirm")]}),secondaryAction:({close:e})=>(0,a.jsx)(Wg,{fullWidth:!0,variant:"tertiary",children:n("misc.cancel")})}),(0,a.jsxs)("div",{className:"flex flex-row gap-[10px] items-center justify-between",children:[(0,a.jsx)(xb,{state:o,asset:e}),(0,a.jsx)(qg,{asset:e,onClick:o.open}),(0,a.jsxs)("span",{className:"text-sm",style:{hyphens:"manual"},children:["photo"===e.type?n("misc.photo"):n("misc.video")," ",t+1," ·"," ",pb(new Date(e.timestamp))]})]}),r&&(0,a.jsx)("span",{className:"text-xs font-bold underline cursor-pointer ml-[10px]",onClick:i.open,children:n("misc.remove")})]},e.assetId)};je=o("85Hg2");
2162
+ */!function(){"use strict";var e={}.hasOwnProperty;function t(){for(var r=[],n=0;n<arguments.length;n++){var i=arguments[n];if(i){var o=typeof i;if("string"===o||"number"===o)r.push(i);else if(Array.isArray(i)){if(i.length){var a=t.apply(null,i);a&&r.push(a)}}else if("object"===o){if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]")){r.push(i.toString());continue}for(var s in i)e.call(i,s)&&i[s]&&r.push(s)}}}return r.join(" ")}Jf?(t.default=t,Jf=t):"function"==typeof define&&"object"==typeof define.amd&&define.amd?define("classnames",[],(function(){return t})):window.classNames=t}();je=o("85Hg2");function Xf(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}je=o("85Hg2"),je=o("85Hg2"),je=o("85Hg2");const em={prefix:String(Math.round(1e10*Math.random())),current:0},tm=r(je).createContext(em);Boolean("undefined"!=typeof window&&window.document&&window.document.createElement);function rm(){let e=(0,je.useContext)(tm)!==em,[t,r]=(0,je.useState)(e);return"undefined"!=typeof window&&e&&(0,je.useLayoutEffect)((()=>{r(!1)}),[]),t}function nm(e){var t,r,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=nm(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}var im=function(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=nm(e))&&(n&&(n+=" "),n+=t);return n};const om="undefined"!=typeof window?r(je).useLayoutEffect:()=>{};let am=new Map;function sm(e,t){if(e===t)return e;let r=am.get(e);if(r)return r(t),t;let n=am.get(t);return n?(n(e),e):t}function cm(...e){return(...t)=>{for(let r of e)"function"==typeof r&&r(...t)}}function lm(...e){let t={...e[0]};for(let r=1;r<e.length;r++){let n=e[r];for(let e in n){let r=t[e],i=n[e];"function"==typeof r&&"function"==typeof i&&"o"===e[0]&&"n"===e[1]&&e.charCodeAt(2)>=65&&e.charCodeAt(2)<=90?t[e]=cm(r,i):"className"!==e&&"UNSAFE_className"!==e||"string"!=typeof r||"string"!=typeof i?"id"===e&&r&&i?t.id=sm(r,i):t[e]=void 0!==i?i:r:t[e]=im(r,i)}}return t}const dm=new Set(["id"]),um=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),pm=/^(data-.*)$/;function hm(e,t={}){let{labelable:r,propNames:n}=t,i={};for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(dm.has(t)||r&&um.has(t)||(null==n?void 0:n.has(t))||pm.test(t))&&(i[t]=e[t]);return i}function fm(e){if(function(){if(null==mm){mm=!1;try{document.createElement("div").focus({get preventScroll(){return mm=!0,!0}})}catch(e){}}return mm}())e.focus({preventScroll:!0});else{let t=function(e){var t=e.parentNode,r=[],n=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==n;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&r.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;n instanceof HTMLElement&&r.push({element:n,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft});return r}(e);e.focus(),function(e){for(let{element:t,scrollTop:r,scrollLeft:n}of e)t.scrollTop=r,t.scrollLeft=n}(t)}}let mm=null;let gm=new Map,vm=new Set;function ym(){if("undefined"==typeof window)return;let e=t=>{let r=gm.get(t.target);if(r&&(r.delete(t.propertyName),0===r.size&&(t.target.removeEventListener("transitioncancel",e),gm.delete(t.target)),0===gm.size)){for(let e of vm)e();vm.clear()}};document.body.addEventListener("transitionrun",(t=>{let r=gm.get(t.target);r||(r=new Set,gm.set(t.target,r),t.target.addEventListener("transitioncancel",e)),r.add(t.propertyName)})),document.body.addEventListener("transitionend",e)}function bm(e){requestAnimationFrame((()=>{0===gm.size?e():vm.add(e)}))}"undefined"!=typeof document&&("loading"!==document.readyState?ym():document.addEventListener("DOMContentLoaded",ym));function wm(){let e=(0,je.useRef)(new Map),t=(0,je.useCallback)(((t,r,n,i)=>{let o=(null==i?void 0:i.once)?(...t)=>{e.current.delete(n),n(...t)}:n;e.current.set(n,{type:r,eventTarget:t,fn:o,options:i}),t.addEventListener(r,n,i)}),[]),r=(0,je.useCallback)(((t,r,n,i)=>{var o;let a=(null===(o=e.current.get(n))||void 0===o?void 0:o.fn)||n;t.removeEventListener(r,a,i),e.current.delete(n)}),[]),n=(0,je.useCallback)((()=>{e.current.forEach(((e,t)=>{r(e.eventTarget,e.type,t,e.options)}))}),[r]);return(0,je.useEffect)((()=>n),[n]),{addGlobalListener:t,removeGlobalListener:r,removeAllGlobalListeners:n}}function xm(e,t){om((()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref.current=null}}),[e,t])}function Sm(e){for(;e&&!_m(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}function _m(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}let km="undefined"!=typeof window&&window.visualViewport;function Cm(){let[e,t]=(0,je.useState)((()=>Em()));return(0,je.useEffect)((()=>{let e=()=>{t((e=>{let t=Em();return t.width===e.width&&t.height===e.height?e:t}))};return km?km.addEventListener("resize",e):window.addEventListener("resize",e),()=>{km?km.removeEventListener("resize",e):window.removeEventListener("resize",e)}}),[]),e}function Em(){return{width:(null==km?void 0:km.width)||window.innerWidth,height:(null==km?void 0:km.height)||window.innerHeight}}new Map;function Pm(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.brands.some((t=>e.test(t.brand))))||e.test(window.navigator.userAgent))}function Rm(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform)}function Tm(){return Rm(/^Mac/i)}function jm(){return Rm(/^iPhone/i)||Rm(/^iPad/i)||Tm()&&navigator.maxTouchPoints>1}function Om(e){return!(0!==e.mozInputSource||!e.isTrusted)||(Pm(/Android/i)&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}je=o("85Hg2");let Mm="default",Lm="",Dm=new WeakMap;function Im(e){jm()?("default"===Mm&&(Lm=document.documentElement.style.webkitUserSelect,document.documentElement.style.webkitUserSelect="none"),Mm="disabled"):(e instanceof HTMLElement||e instanceof SVGElement)&&(Dm.set(e,e.style.userSelect),e.style.userSelect="none")}function Am(e){if(jm()){if("disabled"!==Mm)return;Mm="restoring",setTimeout((()=>{bm((()=>{"restoring"===Mm&&("none"===document.documentElement.style.webkitUserSelect&&(document.documentElement.style.webkitUserSelect=Lm||""),Lm="",Mm="default")}))}),300)}else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&Dm.has(e)){let t=Dm.get(e);"none"===e.style.userSelect&&(e.style.userSelect=t),""===e.getAttribute("style")&&e.removeAttribute("style"),Dm.delete(e)}}const Nm=r(je).createContext(null);function Fm(e){let{onPress:t,onPressChange:r,onPressStart:n,onPressEnd:i,onPressUp:o,isDisabled:a,isPressed:s,preventFocusOnPress:c,shouldCancelOnPointerExit:l,allowTextSelectionOnPress:d,ref:u,...p}=function(e){let t=(0,je.useContext)(Nm);if(t){let{register:r,...n}=t;e=lm(n,e),r()}return xm(t,e.ref),e}(e),h=(0,je.useRef)(null);h.current={onPress:t,onPressChange:r,onPressStart:n,onPressEnd:i,onPressUp:o,isDisabled:a,shouldCancelOnPointerExit:l};let[f,m]=(0,je.useState)(!1),g=(0,je.useRef)({isPressed:!1,ignoreEmulatedMouseEvents:!1,ignoreClickAfterPress:!1,didFirePressStart:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null}),{addGlobalListener:v,removeAllGlobalListeners:y}=wm(),b=(0,je.useMemo)((()=>{let e=g.current,t=(t,r)=>{let{onPressStart:n,onPressChange:i,isDisabled:o}=h.current;o||e.didFirePressStart||(n&&n({type:"pressstart",pointerType:r,target:t.currentTarget,shiftKey:t.shiftKey,metaKey:t.metaKey,ctrlKey:t.ctrlKey,altKey:t.altKey}),i&&i(!0),e.didFirePressStart=!0,m(!0))},r=(t,r,n=!0)=>{let{onPressEnd:i,onPressChange:o,onPress:a,isDisabled:s}=h.current;e.didFirePressStart&&(e.ignoreClickAfterPress=!0,e.didFirePressStart=!1,i&&i({type:"pressend",pointerType:r,target:t.currentTarget,shiftKey:t.shiftKey,metaKey:t.metaKey,ctrlKey:t.ctrlKey,altKey:t.altKey}),o&&o(!1),m(!1),a&&n&&!s&&a({type:"press",pointerType:r,target:t.currentTarget,shiftKey:t.shiftKey,metaKey:t.metaKey,ctrlKey:t.ctrlKey,altKey:t.altKey}))},n=(e,t)=>{let{onPressUp:r,isDisabled:n}=h.current;n||r&&r({type:"pressup",pointerType:t,target:e.currentTarget,shiftKey:e.shiftKey,metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey})},i=t=>{e.isPressed&&(e.isOverTarget&&r(Vm(e.target,t),e.pointerType,!1),e.isPressed=!1,e.isOverTarget=!1,e.activePointerId=null,e.pointerType=null,y(),d||Am(e.target))},o={onKeyDown(r){Bm(r.nativeEvent,r.currentTarget)&&r.currentTarget.contains(r.target)?(Wm(r.target,r.key)&&r.preventDefault(),r.stopPropagation(),e.isPressed||r.repeat||(e.target=r.currentTarget,e.isPressed=!0,t(r,"keyboard"),v(document,"keyup",s,!1))):"Enter"===r.key&&zm(r.currentTarget)&&r.stopPropagation()},onKeyUp(t){Bm(t.nativeEvent,t.currentTarget)&&!t.repeat&&t.currentTarget.contains(t.target)&&n(Vm(e.target,t),"keyboard")},onClick(i){i&&!i.currentTarget.contains(i.target)||i&&0===i.button&&(i.stopPropagation(),a&&i.preventDefault(),e.ignoreClickAfterPress||e.ignoreEmulatedMouseEvents||"virtual"!==e.pointerType&&!Om(i.nativeEvent)||(a||c||fm(i.currentTarget),t(i,"virtual"),n(i,"virtual"),r(i,"virtual")),e.ignoreEmulatedMouseEvents=!1,e.ignoreClickAfterPress=!1)}},s=t=>{if(e.isPressed&&Bm(t,e.target)){Wm(t.target,t.key)&&t.preventDefault(),t.stopPropagation(),e.isPressed=!1;let n=t.target;r(Vm(e.target,t),"keyboard",e.target.contains(n)),y(),e.target instanceof HTMLElement&&e.target.contains(n)&&(zm(e.target)||"link"===e.target.getAttribute("role"))&&e.target.click()}};if("undefined"!=typeof PointerEvent){o.onPointerDown=r=>{var n;0===r.button&&r.currentTarget.contains(r.target)&&(0===(n=r.nativeEvent).width&&0===n.height||1===n.width&&1===n.height&&0===n.pressure&&0===n.detail&&"mouse"===n.pointerType?e.pointerType="virtual":(qm(r.currentTarget)&&r.preventDefault(),e.pointerType=r.pointerType,r.stopPropagation(),e.isPressed||(e.isPressed=!0,e.isOverTarget=!0,e.activePointerId=r.pointerId,e.target=r.currentTarget,a||c||fm(r.currentTarget),d||Im(e.target),t(r,e.pointerType),v(document,"pointermove",s,!1),v(document,"pointerup",l,!1),v(document,"pointercancel",u,!1))))},o.onMouseDown=e=>{e.currentTarget.contains(e.target)&&0===e.button&&(qm(e.currentTarget)&&e.preventDefault(),e.stopPropagation())},o.onPointerUp=t=>{t.currentTarget.contains(t.target)&&"virtual"!==e.pointerType&&0===t.button&&Hm(t,t.currentTarget)&&n(t,e.pointerType||t.pointerType)};let s=n=>{n.pointerId===e.activePointerId&&(Hm(n,e.target)?e.isOverTarget||(e.isOverTarget=!0,t(Vm(e.target,n),e.pointerType)):e.isOverTarget&&(e.isOverTarget=!1,r(Vm(e.target,n),e.pointerType,!1),h.current.shouldCancelOnPointerExit&&i(n)))},l=t=>{t.pointerId===e.activePointerId&&e.isPressed&&0===t.button&&(Hm(t,e.target)?r(Vm(e.target,t),e.pointerType):e.isOverTarget&&r(Vm(e.target,t),e.pointerType,!1),e.isPressed=!1,e.isOverTarget=!1,e.activePointerId=null,e.pointerType=null,y(),d||Am(e.target))},u=e=>{i(e)};o.onDragStart=e=>{e.currentTarget.contains(e.target)&&i(e)}}else{o.onMouseDown=r=>{0===r.button&&r.currentTarget.contains(r.target)&&(qm(r.currentTarget)&&r.preventDefault(),r.stopPropagation(),e.ignoreEmulatedMouseEvents||(e.isPressed=!0,e.isOverTarget=!0,e.target=r.currentTarget,e.pointerType=Om(r.nativeEvent)?"virtual":"mouse",a||c||fm(r.currentTarget),t(r,e.pointerType),v(document,"mouseup",s,!1)))},o.onMouseEnter=r=>{r.currentTarget.contains(r.target)&&(r.stopPropagation(),e.isPressed&&!e.ignoreEmulatedMouseEvents&&(e.isOverTarget=!0,t(r,e.pointerType)))},o.onMouseLeave=t=>{t.currentTarget.contains(t.target)&&(t.stopPropagation(),e.isPressed&&!e.ignoreEmulatedMouseEvents&&(e.isOverTarget=!1,r(t,e.pointerType,!1),h.current.shouldCancelOnPointerExit&&i(t)))},o.onMouseUp=t=>{t.currentTarget.contains(t.target)&&(e.ignoreEmulatedMouseEvents||0!==t.button||n(t,e.pointerType))};let s=t=>{0===t.button&&(e.isPressed=!1,y(),e.ignoreEmulatedMouseEvents?e.ignoreEmulatedMouseEvents=!1:(Hm(t,e.target)?r(Vm(e.target,t),e.pointerType):e.isOverTarget&&r(Vm(e.target,t),e.pointerType,!1),e.isOverTarget=!1))};o.onTouchStart=r=>{if(!r.currentTarget.contains(r.target))return;r.stopPropagation();let n=function(e){const{targetTouches:t}=e;return t.length>0?t[0]:null}(r.nativeEvent);n&&(e.activePointerId=n.identifier,e.ignoreEmulatedMouseEvents=!0,e.isOverTarget=!0,e.isPressed=!0,e.target=r.currentTarget,e.pointerType="touch",a||c||fm(r.currentTarget),d||Im(e.target),t(r,e.pointerType),v(window,"scroll",l,!0))},o.onTouchMove=n=>{if(!n.currentTarget.contains(n.target))return;if(n.stopPropagation(),!e.isPressed)return;let o=Um(n.nativeEvent,e.activePointerId);o&&Hm(o,n.currentTarget)?e.isOverTarget||(e.isOverTarget=!0,t(n,e.pointerType)):e.isOverTarget&&(e.isOverTarget=!1,r(n,e.pointerType,!1),h.current.shouldCancelOnPointerExit&&i(n))},o.onTouchEnd=t=>{if(!t.currentTarget.contains(t.target))return;if(t.stopPropagation(),!e.isPressed)return;let i=Um(t.nativeEvent,e.activePointerId);i&&Hm(i,t.currentTarget)?(n(t,e.pointerType),r(t,e.pointerType)):e.isOverTarget&&r(t,e.pointerType,!1),e.isPressed=!1,e.activePointerId=null,e.isOverTarget=!1,e.ignoreEmulatedMouseEvents=!0,d||Am(e.target),y()},o.onTouchCancel=t=>{t.currentTarget.contains(t.target)&&(t.stopPropagation(),e.isPressed&&i(t))};let l=t=>{e.isPressed&&t.target.contains(e.target)&&i({currentTarget:e.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};o.onDragStart=e=>{e.currentTarget.contains(e.target)&&i(e)}}return o}),[v,a,c,y,d]);return(0,je.useEffect)((()=>()=>{d||Am(g.current.target)}),[d]),{isPressed:s||f,pressProps:lm(p,b)}}function zm(e){return"A"===e.tagName&&e.hasAttribute("href")}function Bm(e,t){const{key:r,code:n}=e,i=t,o=i.getAttribute("role");return!("Enter"!==r&&" "!==r&&"Spacebar"!==r&&"Space"!==n||i instanceof HTMLInputElement&&!Km(i,r)||i instanceof HTMLTextAreaElement||i.isContentEditable||zm(i)&&("button"!==o||"Enter"===r)||"link"===o&&"Enter"!==r)}function Um(e,t){const r=e.changedTouches;for(let e=0;e<r.length;e++){const n=r[e];if(n.identifier===t)return n}return null}function Vm(e,t){return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey}}function Hm(e,t){let r=t.getBoundingClientRect(),n=function(e){let t=e.width/2||e.radiusX||0,r=e.height/2||e.radiusY||0;return{top:e.clientY-r,right:e.clientX+t,bottom:e.clientY+r,left:e.clientX-t}}(e);return o=n,!((i=r).left>o.right||o.left>i.right||i.top>o.bottom||o.top>i.bottom);var i,o}function qm(e){return!(e instanceof HTMLElement&&e.draggable)}function Wm(e,t){return e instanceof HTMLInputElement?!Km(e,t):!(e instanceof HTMLButtonElement)||"submit"!==e.type}Nm.displayName="PressResponderContext";const $m=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Km(e,t){return"checkbox"===e.type||"radio"===e.type?" "===t:$m.has(e.type)}r(je).forwardRef((({children:e,...t},n)=>{let i=(0,je.useRef)();n=null!=n?n:i;let{pressProps:o}=Fm({...t,ref:n}),a=r(je).Children.only(e);return r(je).cloneElement(a,{ref:n,...lm(a.props,o)})})),r(je).forwardRef((({children:e,...t},n)=>{let i=(0,je.useRef)(!1),o=(0,je.useContext)(Nm),a=lm(o||{},{...t,ref:n||(null==o?void 0:o.ref),register(){i.current=!0,o&&o.register()}});return xm(o,n),(0,je.useEffect)((()=>{i.current||console.warn("A PressResponder was rendered without a pressable child. Either call the usePress hook, or wrap your DOM node with <Pressable> component.")}),[]),r(je).createElement(Nm.Provider,{value:a},e)}));class Gm{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(e,t){this.nativeEvent=t,this.target=t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget,this.bubbles=t.bubbles,this.cancelable=t.cancelable,this.defaultPrevented=t.defaultPrevented,this.eventPhase=t.eventPhase,this.isTrusted=t.isTrusted,this.timeStamp=t.timeStamp,this.type=e}}function Zm(e){let t=(0,je.useRef)({isFocused:!1,onBlur:e,observer:null});return t.current.onBlur=e,om((()=>{const e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}}),[]),(0,je.useCallback)((e=>{if(e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement){t.current.isFocused=!0;let r=e.target,n=e=>{var n,i;t.current.isFocused=!1,r.disabled&&(null===(i=(n=t.current).onBlur)||void 0===i||i.call(n,new Gm("blur",e))),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};r.addEventListener("focusout",n,{once:!0}),t.current.observer=new MutationObserver((()=>{t.current.isFocused&&r.disabled&&(t.current.observer.disconnect(),r.dispatchEvent(new FocusEvent("blur")),r.dispatchEvent(new FocusEvent("focusout",{bubbles:!0})))})),t.current.observer.observe(r,{attributes:!0,attributeFilter:["disabled"]})}}),[])}function Qm(e){let{isDisabled:t,onFocus:r,onBlur:n,onFocusChange:i}=e;const o=(0,je.useCallback)((e=>{if(e.target===e.currentTarget)return n&&n(e),i&&i(!1),!0}),[n,i]),a=Zm(o),s=(0,je.useCallback)((e=>{e.target===e.currentTarget&&(r&&r(e),i&&i(!0),a(e))}),[i,r,a]);return{focusProps:{onFocus:!t&&(r||i||n)?s:void 0,onBlur:t||!n&&!i?null:o}}}let Ym=null,Jm=new Set,Xm=!1,eg=!1,tg=!1;const rg={Tab:!0,Escape:!0};function ng(e,t){for(let r of Jm)r(e,t)}function ig(e){eg=!0,function(e){return!(e.metaKey||!Tm()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key)}(e)&&(Ym="keyboard",ng("keyboard",e))}function og(e){Ym="pointer","mousedown"!==e.type&&"pointerdown"!==e.type||(eg=!0,ng("pointer",e))}function ag(e){Om(e)&&(eg=!0,Ym="virtual")}function sg(e){e.target!==window&&e.target!==document&&(eg||tg||(Ym="virtual",ng("virtual",e)),eg=!1,tg=!1)}function cg(){eg=!1,tg=!0}function lg(){if("undefined"==typeof window||Xm)return;let e=HTMLElement.prototype.focus;HTMLElement.prototype.focus=function(){eg=!0,e.apply(this,arguments)},document.addEventListener("keydown",ig,!0),document.addEventListener("keyup",ig,!0),document.addEventListener("click",ag,!0),window.addEventListener("focus",sg,!0),window.addEventListener("blur",cg,!1),"undefined"!=typeof PointerEvent?(document.addEventListener("pointerdown",og,!0),document.addEventListener("pointermove",og,!0),document.addEventListener("pointerup",og,!0)):(document.addEventListener("mousedown",og,!0),document.addEventListener("mousemove",og,!0),document.addEventListener("mouseup",og,!0)),Xm=!0}function dg(){return"pointer"!==Ym}function ug(e,t,r){lg(),(0,je.useEffect)((()=>{let t=(t,n)=>{(function(e,t,r){return!(e&&"keyboard"===t&&r instanceof KeyboardEvent&&!rg[r.key])})(null==r?void 0:r.isTextInput,t,n)&&e(dg())};return Jm.add(t),()=>{Jm.delete(t)}}),t)}function pg(e){let{isDisabled:t,onBlurWithin:r,onFocusWithin:n,onFocusWithinChange:i}=e,o=(0,je.useRef)({isFocusWithin:!1}),a=(0,je.useCallback)((e=>{o.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)&&(o.current.isFocusWithin=!1,r&&r(e),i&&i(!1))}),[r,i,o]),s=Zm(a),c=(0,je.useCallback)((e=>{o.current.isFocusWithin||(n&&n(e),i&&i(!0),o.current.isFocusWithin=!0,s(e))}),[n,i,s]);return t?{focusWithinProps:{onFocus:null,onBlur:null}}:{focusWithinProps:{onFocus:c,onBlur:a}}}"undefined"!=typeof document&&("loading"!==document.readyState?lg():document.addEventListener("DOMContentLoaded",lg));let hg=!1,fg=0;function mg(){hg=!0,setTimeout((()=>{hg=!1}),50)}function gg(e){"touch"===e.pointerType&&mg()}function vg(){if("undefined"!=typeof document)return"undefined"!=typeof PointerEvent?document.addEventListener("pointerup",gg):document.addEventListener("touchend",mg),fg++,()=>{fg--,fg>0||("undefined"!=typeof PointerEvent?document.removeEventListener("pointerup",gg):document.removeEventListener("touchend",mg))}}function yg(e){let{onHoverStart:t,onHoverChange:r,onHoverEnd:n,isDisabled:i}=e,[o,a]=(0,je.useState)(!1),s=(0,je.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;(0,je.useEffect)(vg,[]);let{hoverProps:c,triggerHoverEnd:l}=(0,je.useMemo)((()=>{let e=(e,n)=>{if(s.pointerType=n,i||"touch"===n||s.isHovered||!e.currentTarget.contains(e.target))return;s.isHovered=!0;let o=e.currentTarget;s.target=o,t&&t({type:"hoverstart",target:o,pointerType:n}),r&&r(!0),a(!0)},o=(e,t)=>{if(s.pointerType="",s.target=null,"touch"===t||!s.isHovered)return;s.isHovered=!1;let i=e.currentTarget;n&&n({type:"hoverend",target:i,pointerType:t}),r&&r(!1),a(!1)},c={};return"undefined"!=typeof PointerEvent?(c.onPointerEnter=t=>{hg&&"mouse"===t.pointerType||e(t,t.pointerType)},c.onPointerLeave=e=>{!i&&e.currentTarget.contains(e.target)&&o(e,e.pointerType)}):(c.onTouchStart=()=>{s.ignoreEmulatedMouseEvents=!0},c.onMouseEnter=t=>{s.ignoreEmulatedMouseEvents||hg||e(t,"mouse"),s.ignoreEmulatedMouseEvents=!1},c.onMouseLeave=e=>{!i&&e.currentTarget.contains(e.target)&&o(e,"mouse")}),{hoverProps:c,triggerHoverEnd:o}}),[t,r,n,i,s]);return(0,je.useEffect)((()=>{i&&l({currentTarget:s.target},s.pointerType)}),[i]),{hoverProps:c,isHovered:o}}function bg(e){let{ref:t,onInteractOutside:r,isDisabled:n,onInteractOutsideStart:i}=e,o=(0,je.useRef)({isPointerDown:!1,ignoreEmulatedMouseEvents:!1,onInteractOutside:r,onInteractOutsideStart:i}).current;o.onInteractOutside=r,o.onInteractOutsideStart=i,(0,je.useEffect)((()=>{if(n)return;let e=e=>{wg(e,t)&&o.onInteractOutside&&(o.onInteractOutsideStart&&o.onInteractOutsideStart(e),o.isPointerDown=!0)};if("undefined"!=typeof PointerEvent){let r=e=>{o.isPointerDown&&o.onInteractOutside&&wg(e,t)&&(o.isPointerDown=!1,o.onInteractOutside(e))};return document.addEventListener("pointerdown",e,!0),document.addEventListener("pointerup",r,!0),()=>{document.removeEventListener("pointerdown",e,!0),document.removeEventListener("pointerup",r,!0)}}{let r=e=>{o.ignoreEmulatedMouseEvents?o.ignoreEmulatedMouseEvents=!1:o.isPointerDown&&o.onInteractOutside&&wg(e,t)&&(o.isPointerDown=!1,o.onInteractOutside(e))},n=e=>{o.ignoreEmulatedMouseEvents=!0,o.onInteractOutside&&o.isPointerDown&&wg(e,t)&&(o.isPointerDown=!1,o.onInteractOutside(e))};return document.addEventListener("mousedown",e,!0),document.addEventListener("mouseup",r,!0),document.addEventListener("touchstart",e,!0),document.addEventListener("touchend",n,!0),()=>{document.removeEventListener("mousedown",e,!0),document.removeEventListener("mouseup",r,!0),document.removeEventListener("touchstart",e,!0),document.removeEventListener("touchend",n,!0)}}}),[t,o,n])}function wg(e,t){if(e.button>0)return!1;if(e.target){const t=e.target.ownerDocument;if(!t||!t.documentElement.contains(e.target))return!1}return t.current&&!t.current.contains(e.target)}function xg(e){if(!e)return;let t=!0;return r=>{let n={...r,preventDefault(){r.preventDefault()},isDefaultPrevented:()=>r.isDefaultPrevented(),stopPropagation(){console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior.")},continuePropagation(){t=!1}};e(n),t&&r.stopPropagation()}}function Sg(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:xg(e.onKeyDown),onKeyUp:xg(e.onKeyUp)}}}function _g(e){if("virtual"===Ym){let t=document.activeElement;bm((()=>{document.activeElement===t&&document.contains(e)&&fm(e)}))}else fm(e)}function kg(e,t){return"#comment"!==e.nodeName&&function(e){if(!(e instanceof HTMLElement||e instanceof SVGElement))return!1;let{display:t,visibility:r}=e.style,n="none"!==t&&"hidden"!==r&&"collapse"!==r;if(n){const{getComputedStyle:t}=e.ownerDocument.defaultView;let{display:r,visibility:i}=t(e);n="none"!==r&&"hidden"!==i&&"collapse"!==i}return n}(e)&&function(e,t){return!e.hasAttribute("hidden")&&("DETAILS"!==e.nodeName||!t||"SUMMARY"===t.nodeName||e.hasAttribute("open"))}(e,t)&&(!e.parentElement||kg(e.parentElement,e))}const Cg=r(je).createContext(null);let Eg=null;function Pg(e){let{children:t,contain:n,restoreFocus:i,autoFocus:o}=e,a=(0,je.useRef)(),s=(0,je.useRef)(),c=(0,je.useRef)([]),l=(0,je.useContext)(Cg);var d;let u=null!==(d=null==l?void 0:l.scopeRef)&&void 0!==d?d:null,p=(0,je.useMemo)((()=>Eg&&Vg.getTreeNode(Eg)&&!Ag(Eg,u)?Eg:u),[u]);om((()=>{let e=a.current.nextSibling,t=[];for(;e&&e!==s.current;)t.push(e),e=e.nextSibling;c.current=t}),[t,p]),Vg.getTreeNode(p)&&!Vg.getTreeNode(c)&&Vg.addTreeNode(c,p),Vg.getTreeNode(c).contain=n,function(e,t,r){om((()=>{if(t||r)return;let n=e.current,i=t=>{let r=t.target;Dg(r,e.current)?Eg=e:Lg(r)||(Eg=null)};return document.addEventListener("focusin",i,!1),n.forEach((e=>e.addEventListener("focusin",i,!1))),()=>{document.removeEventListener("focusin",i,!1),n.forEach((e=>e.removeEventListener("focusin",i,!1)))}}),[e,t,r])}(c,i,n),function(e,t){let r=(0,je.useRef)(),n=(0,je.useRef)(null);om((()=>{let i=e.current;if(!t)return void(n.current&&(cancelAnimationFrame(n.current),n.current=null));let o=t=>{if("Tab"!==t.key||t.altKey||t.ctrlKey||t.metaKey||!Mg(e))return;let r=document.activeElement,n=e.current;if(!Dg(r,n))return;let i=zg(Og(n),{tabbable:!0},n);i.currentNode=r;let o=t.shiftKey?i.previousNode():i.nextNode();o||(i.currentNode=t.shiftKey?n[n.length-1].nextElementSibling:n[0].previousElementSibling,o=t.shiftKey?i.previousNode():i.nextNode()),t.preventDefault(),o&&Ng(o,!0)},a=t=>{Eg&&!Ag(Eg,e)||!Dg(t.target,e.current)?Mg(e)&&!Ig(t.target,e)?r.current?r.current.focus():Eg&&Fg(Eg.current):Mg(e)&&(r.current=t.target):(Eg=e,r.current=t.target)},s=t=>{n.current=requestAnimationFrame((()=>{Mg(e)&&!Ig(document.activeElement,e)&&(Eg=e,document.body.contains(t.target)?(r.current=t.target,r.current.focus()):Eg&&Fg(Eg.current))}))};return document.addEventListener("keydown",o,!1),document.addEventListener("focusin",a,!1),i.forEach((e=>e.addEventListener("focusin",a,!1))),i.forEach((e=>e.addEventListener("focusout",s,!1))),()=>{document.removeEventListener("keydown",o,!1),document.removeEventListener("focusin",a,!1),i.forEach((e=>e.removeEventListener("focusin",a,!1))),i.forEach((e=>e.removeEventListener("focusout",s,!1)))}}),[e,t]),(0,je.useEffect)((()=>()=>{n.current&&cancelAnimationFrame(n.current)}),[n])}(c,n),function(e,t,r){const n=(0,je.useRef)("undefined"!=typeof document?document.activeElement:null);om((()=>{let n=e.current;if(!t||r)return;let i=()=>{Eg&&!Ag(Eg,e)||(Eg=e)};return document.addEventListener("focusin",i,!1),n.forEach((e=>e.addEventListener("focusin",i,!1))),()=>{document.removeEventListener("focusin",i,!1),n.forEach((e=>e.removeEventListener("focusin",i,!1)))}}),[e,r]),om((()=>{if(!t)return;Vg.getTreeNode(e).nodeToRestore=n.current;let i=t=>{if("Tab"!==t.key||t.altKey||t.ctrlKey||t.metaKey)return;let r=document.activeElement;if(!Dg(r,e.current))return;let n=Vg.getTreeNode(e).nodeToRestore,i=zg(document.body,{tabbable:!0});i.currentNode=r;let o=t.shiftKey?i.previousNode():i.nextNode();if(document.body.contains(n)&&n!==document.body||(n=null,Vg.getTreeNode(e).nodeToRestore=null),(!o||!Dg(o,e.current))&&n){i.currentNode=n;do{o=t.shiftKey?i.previousNode():i.nextNode()}while(Dg(o,e.current));t.preventDefault(),t.stopPropagation(),o?Ng(o,!0):Lg(n)?Ng(n,!0):r.blur()}};return r||document.addEventListener("keydown",i,!0),()=>{r||document.removeEventListener("keydown",i,!0);let n=Vg.getTreeNode(e).nodeToRestore;if(t&&n&&(Dg(document.activeElement,e.current)||document.activeElement===document.body&&function(e){let t=Vg.getTreeNode(Eg);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return(null==t?void 0:t.scopeRef)===e}(e))){let t=Vg.clone();requestAnimationFrame((()=>{if(document.activeElement===document.body){let r=t.getTreeNode(e);for(;r;){if(r.nodeToRestore&&document.body.contains(r.nodeToRestore))return void Ng(r.nodeToRestore);r=r.parent}for(r=t.getTreeNode(e);r;){if(r.scopeRef&&Vg.getTreeNode(r.scopeRef))return void Fg(r.scopeRef.current,!0);r=r.parent}}}))}}}),[e,t,r])}(c,i,n),function(e,t){const n=r(je).useRef(t);(0,je.useEffect)((()=>{n.current&&(Eg=e,Dg(document.activeElement,Eg.current)||Fg(e.current)),n.current=!1}),[e])}(c,o),om((()=>{if(c)return()=>{let e=Vg.getTreeNode(c).parent.scopeRef;c!==Eg&&!Ag(c,Eg)||e&&!Vg.getTreeNode(e)||(Eg=e),Vg.removeTreeNode(c)}}),[c,p]);let h=function(e){return{focusNext(t={}){let r=e.current,{from:n,tabbable:i,wrap:o,accept:a}=t,s=n||document.activeElement,c=r[0].previousElementSibling,l=zg(Og(r),{tabbable:i,accept:a},r);l.currentNode=Dg(s,r)?s:c;let d=l.nextNode();return!d&&o&&(l.currentNode=c,d=l.nextNode()),d&&Ng(d,!0),d},focusPrevious(t={}){let r=e.current,{from:n,tabbable:i,wrap:o,accept:a}=t,s=n||document.activeElement,c=r[r.length-1].nextElementSibling,l=zg(Og(r),{tabbable:i,accept:a},r);l.currentNode=Dg(s,r)?s:c;let d=l.previousNode();return!d&&o&&(l.currentNode=c,d=l.previousNode()),d&&Ng(d,!0),d},focusFirst(t={}){let r=e.current,{tabbable:n,accept:i}=t,o=zg(Og(r),{tabbable:n,accept:i},r);o.currentNode=r[0].previousElementSibling;let a=o.nextNode();return a&&Ng(a,!0),a},focusLast(t={}){let r=e.current,{tabbable:n,accept:i}=t,o=zg(Og(r),{tabbable:n,accept:i},r);o.currentNode=r[r.length-1].nextElementSibling;let a=o.previousNode();return a&&Ng(a,!0),a}}}(c);return r(je).createElement(Cg.Provider,{value:{scopeRef:c,focusManager:h}},r(je).createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:a}),t,r(je).createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:s}))}const Rg=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[contenteditable]"],Tg=Rg.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";Rg.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const jg=Rg.join(':not([hidden]):not([tabindex="-1"]),');function Og(e){return e[0].parentElement}function Mg(e){let t=Vg.getTreeNode(Eg);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function Lg(e){return Ig(e)}function Dg(e,t){return t.some((t=>t.contains(e)))}function Ig(e,t=null){for(let{scopeRef:r}of Vg.traverse(Vg.getTreeNode(t)))if(Dg(e,r.current))return!0;return!1}function Ag(e,t){var r;let n=null===(r=Vg.getTreeNode(t))||void 0===r?void 0:r.parent;for(;n;){if(n.scopeRef===e)return!0;n=n.parent}return!1}function Ng(e,t=!1){if(null==e||t){if(null!=e)try{e.focus()}catch(e){}}else try{_g(e)}catch(e){}}function Fg(e,t=!0){let r=e[0].previousElementSibling,n=zg(Og(e),{tabbable:t},e);n.currentNode=r;let i=n.nextNode();t&&!i&&(n=zg(Og(e),{tabbable:!1},e),n.currentNode=r,i=n.nextNode()),Ng(i)}function zg(e,t,r){let n=(null==t?void 0:t.tabbable)?jg:Tg,i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(e){var i;return(null==t||null===(i=t.from)||void 0===i?void 0:i.contains(e))?NodeFilter.FILTER_REJECT:!e.matches(n)||!kg(e)||r&&!Dg(e,r)||(null==t?void 0:t.accept)&&!t.accept(e)?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT}});return(null==t?void 0:t.from)&&(i.currentNode=t.from),i}class Bg{get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,t,r){let n=this.fastMap.get(null!=t?t:null),i=new Ug({scopeRef:e});n.addChild(i),i.parent=n,this.fastMap.set(e,i),r&&(i.nodeToRestore=r)}removeTreeNode(e){if(null===e)return;let t=this.fastMap.get(e),r=t.parent;for(let e of this.traverse())e!==t&&t.nodeToRestore&&e.nodeToRestore&&t.scopeRef.current&&Dg(e.nodeToRestore,t.scopeRef.current)&&(e.nodeToRestore=t.nodeToRestore);let n=t.children;r.removeChild(t),n.length>0&&n.forEach((e=>r.addChild(e))),this.fastMap.delete(t.scopeRef)}*traverse(e=this.root){if(null!=e.scopeRef&&(yield e),e.children.length>0)for(let t of e.children)yield*this.traverse(t)}clone(){let e=new Bg;for(let t of this.traverse())e.addTreeNode(t.scopeRef,t.parent.scopeRef,t.nodeToRestore);return e}constructor(){Xf(this,"fastMap",new Map),this.root=new Ug({scopeRef:null}),this.fastMap.set(null,this.root)}}class Ug{addChild(e){this.children.push(e),e.parent=this}removeChild(e){this.children.splice(this.children.indexOf(e),1),e.parent=void 0}constructor(e){Xf(this,"children",[]),Xf(this,"contain",!1),this.scopeRef=e.scopeRef}}let Vg=new Bg;function Hg(e={}){let{autoFocus:t=!1,isTextInput:r,within:n}=e,i=(0,je.useRef)({isFocused:!1,isFocusVisible:t||dg()}),[o,a]=(0,je.useState)(!1),[s,c]=(0,je.useState)((()=>i.current.isFocused&&i.current.isFocusVisible)),l=(0,je.useCallback)((()=>c(i.current.isFocused&&i.current.isFocusVisible)),[]),d=(0,je.useCallback)((e=>{i.current.isFocused=e,a(e),l()}),[l]);ug((e=>{i.current.isFocusVisible=e,l()}),[],{isTextInput:r});let{focusProps:u}=Qm({isDisabled:n,onFocusChange:d}),{focusWithinProps:p}=pg({isDisabled:!n,onFocusWithinChange:d});return{isFocused:o,isFocusVisible:i.current.isFocused&&s,focusProps:n?p:u}}let qg=r(je).createContext(null);r(je).forwardRef((function(e,t){let{children:n,...i}=e,o={...i,ref:t};return r(je).createElement(qg.Provider,{value:o},n)}));function Wg(e,t){let{focusProps:r}=Qm(e),{keyboardProps:n}=Sg(e),i=lm(r,n),o=function(e){let t=(0,je.useContext)(qg)||{};xm(t,e);let{ref:r,...n}=t;return n}(t),a=e.isDisabled?{}:o,s=(0,je.useRef)(e.autoFocus);return(0,je.useEffect)((()=>{s.current&&t.current&&_g(t.current),s.current=!1}),[t]),{focusableProps:lm({...i,tabIndex:e.excludeFromTabOrder&&!e.isDisabled?-1:void 0},a)}}function $g(e,t){let r,{elementType:n="button",isDisabled:i,onPress:o,onPressStart:a,onPressEnd:s,onPressChange:c,preventFocusOnPress:l,allowFocusWhenDisabled:d,onClick:u,href:p,target:h,rel:f,type:m="button"}=e;r="button"===n?{type:m,disabled:i}:{role:"button",tabIndex:i?void 0:0,href:"a"===n&&i?void 0:p,target:"a"===n?h:void 0,type:"input"===n?m:void 0,disabled:"input"===n?i:void 0,"aria-disabled":i&&"input"!==n?i:void 0,rel:"a"===n?f:void 0};let{pressProps:g,isPressed:v}=Fm({onPressStart:a,onPressEnd:s,onPressChange:c,onPress:o,isDisabled:i,preventFocusOnPress:l,ref:t}),{focusableProps:y}=Wg(e,t);d&&(y.tabIndex=i?-1:y.tabIndex);let b=lm(y,g,hm(e,{labelable:!0}));return{isPressed:v,buttonProps:lm(r,b,{"aria-haspopup":e["aria-haspopup"],"aria-expanded":e["aria-expanded"],"aria-controls":e["aria-controls"],"aria-pressed":e["aria-pressed"],onClick:e=>{u&&(u(e),console.warn("onClick is deprecated, please use onPress"))}})}}function Kg(e,t,r){const{isSelected:n}=t,{isPressed:i,buttonProps:o}=$g({...e,onPress:cm(t.toggle,e.onPress)},r);return{isPressed:i,buttonProps:lm(o,{"aria-pressed":n})}}function Gg(e={}){let{isReadOnly:t}=e,[r,n]=Zf(e.isSelected,e.defaultSelected||!1,e.onChange);return{isSelected:r,setSelected:function(e){t||n(e)},toggle:function(){t||n(!r)}}}function Zg(e){const t=(0,je.useRef)(null);return(0,je.useEffect)((()=>{e&&("function"==typeof e?e(t.current):e.current=t.current)})),t}const Qg=(0,je.forwardRef)((function({children:e,...t},n){const i=Zg(n);let o=Gg(t);const{buttonProps:s}=Kg(t,o,i),{isFocusVisible:c,focusProps:l}=Hg();return(0,a.jsx)("button",{className:r(Jf)("w-[76px] h-[40px]",t.isSelected?"bg-[#FFFFFF]":"bg-[#FFFFFF] opacity-[0.4]","rounded-full","text-black","flex items-center justify-center gap-[5px]","text-base font-medium","transition-colors ease-in-out","focus:outline-none",{"ring-[3px] ring-cta":c,"cursor-not-allowed":s.disabled}),...s,...l,ref:i,children:e})}));je=o("85Hg2");const Yg=e=>{const{selfPeerId:t}=(0,je.useContext)(Ya);return"request"===e.state?(0,a.jsx)("button",{className:r(Jf)("bg-white rounded-full w-[86px] h-[86px] flex items-center justify-center"),children:(0,a.jsx)("div",{className:r(Jf)("border-[7px] border-white border-b-[#E5484D] border-b-[7px] rounded-[50%] w-[64px] h-[64px] animate-spin")})}):"live"===e.state?(0,a.jsx)("button",{className:r(Jf)("bg-white rounded-full w-[86px] h-[86px] flex items-center justify-center"),onClick:()=>{e.onCapturePress()},children:(0,a.jsx)("div",{className:"bg-white border-[4px] border-[#E5484D] w-[72px] h-[72px] rounded-full flex items-center justify-center",children:(0,a.jsx)("div",{className:"bg-[#E5484D] w-[24px] h-[24px] rounded-[8px] "})})}):(0,a.jsx)("button",{className:r(Jf)("bg-white rounded-full w-[86px] h-[86px] flex items-center justify-center"),onClick:()=>{t&&e.onCapturePress()},children:(0,a.jsx)("div",{className:"bg-[#E5484D] w-[70px] h-[70px] rounded-full flex items-center justify-center",children:(0,a.jsx)("div",{className:"bg-[#E5484D] w-[62px] h-[62px] rounded-full border-[3px] border-[#FFFFF]"})})})},Jg=e=>(0,a.jsx)("div",{className:r(Jf)("bg-white rounded-full w-[72px] h-[72px] p-[3px]"),onClick:()=>e.onCapturePress(),children:(0,a.jsx)("div",{className:"bg-primary rounded-full w-full h-full p-[3px] flex items-center justify-center cursor-pointer",children:(0,a.jsx)("div",{className:r(Jf)("w-full h-full transition-[transform,border-radius] duration-300","photo"===e.state.mode?"bg-white":"bg-[#f12828]",e.state.streaming?"rounded-[5px] scale-[0.4]":"rounded-[60px]")})})}),Xg=e=>{const{t:t}=Fi();return(0,a.jsxs)("div",{className:"flex flex-col bg-primary h-[150px] w-full max-w-[500px] rounded-[15px] p-2.5 gap-2.5",children:[(0,a.jsxs)("div",{className:"flex flex-1 flex-row px-[10px] w-full",children:[(0,a.jsxs)("div",{className:"flex flex-row flex-auto items-center gap-[10px]",children:[(0,a.jsx)(ls,{}),(0,a.jsx)("div",{className:" text-white text-base font-medium",children:"SnapCall"})]}),(0,a.jsxs)("div",{className:"flex flex-row justify-end flex-auto items-center gap-[10px] ",children:[(0,a.jsx)(Qg,{isSelected:"photo"===e.state.mode,onPress:()=>{e.state.streaming||e.changeMode("photo")},children:t("misc.photo")}),(0,a.jsx)(Qg,{isSelected:"video"===e.state.mode,onPress:()=>{e.state.streaming||e.changeMode("video")},children:t("misc.video")})]})]}),(0,a.jsxs)("div",{className:"flex flex-row flex-1 items-center justify-between w-full ",children:[(0,a.jsx)("div",{className:"w-[60px] h-[60px]",children:e.thumbnail}),(0,a.jsx)(Jg,{...e}),(0,a.jsx)("div",{onClick:e.onSwitch,className:"rounded-full w-[56px] h-[56px] flex items-center justify-center bg-[#565656] cursor-pointer",children:(0,a.jsx)(xd,{})})]})]})};je=o("85Hg2");const ev=e=>{const[t,r]=(0,je.useState)(e.initialValue);return(0,je.useEffect)((()=>{if(void 0===t)return;const n=setTimeout((()=>{1===t&&e.onFinish(),r(t-1)}),1e3);return()=>clearTimeout(n)}),[t,e]),(0,a.jsx)("div",{className:"absolute w-full h-full flex justify-center items-center bg-black/[.6] z-50",children:(0,a.jsx)("span",{className:"text-white/80 text-[112px] font-medium",children:t})})};const tv=(0,(je=o("85Hg2")).forwardRef)(((e,t)=>{const r=Zg(t);return(0,je.useEffect)((()=>{const e=()=>{r?.current&&Qa.requestLocalScreenshare(r.current)};return Qa.addEventListener("screenshareEnabled",e),()=>{Qa.removeEventListener("screenshareEnabled",e)}}),[r]),(0,a.jsx)("video",{autoPlay:!0,muted:!0,playsInline:!0,ref:r,className:"rounded-[10px] max-w-[100%] max-h-[100%] object-fit ",children:e.children})})),rv=(0,je.forwardRef)(((e,t)=>{const n=Zg(t),[i,o]=(0,je.useState)("user");return(0,je.useEffect)((()=>{const e=e=>{if(!e.detail?.camera?.device||!n.current)return;const{facingMode:t}=Qa.requestLocalVideo(n?.current);o(t)};return Qa.addEventListener("localVideoAvailable",e),Qa.addEventListener("localVideoChange",e),()=>{Qa.removeEventListener("localVideoAvailable",e),Qa.removeEventListener("localVideoChange",e)}}),[n]),(0,a.jsx)("video",{autoPlay:!0,muted:!0,playsInline:!0,ref:n,className:r(Jf)("w-full h-full object-cover rounded-[inherit]",{"scale-x-[-1]":"user"===i})})})),nv=({asset:e,onClick:t})=>e?(0,a.jsx)("div",{className:"flex items-center justify-center w-[60px] h-[60px] cursor-pointer relative overflow-hidden",onClick:t,children:(0,a.jsx)("img",{className:"cursor-pointer rounded-[8px] w-[60px] h-[60px] object-cover",src:e.thumbnailURL||e.objectUrl,alt:"last shot"})}):null;zi=o("4Fy4N"),je=o("85Hg2");const iv=(0,(je=o("85Hg2")).forwardRef)((function({children:e,variant:t="primary",size:n="medium",fullWidth:i=!1,form:o,className:s,...c},l){const d=Zg(l),{buttonProps:u,isPressed:p}=$g(c,d),{isFocusVisible:h,focusProps:f}=Hg(),{hoverProps:m,isHovered:g}=yg({isDisabled:u.disabled}),v=g||h||p,y={primary:r(Jf)(v?"bg-primaryLight":"bg-primary","text-white disabled:bg-secondaryLight"),secondary:r(Jf)(v?"bg-graySelected":"bg-transparent","text-primary border border-secondaryLight disabled:text-secondaryLight disabled:bg-graySelected"),basic:r(Jf)(v?"bg-graySelected":"bg-white","text-primary disabled:text-secondaryLight disabled:bg-graySelected"),tertiary:r(Jf)(v?"bg-tertiarySelected":"bg-tertiary","text-mainBlue disabled:opacity-50"),blue:r(Jf)(v?"bg-mainBlueSelected":"bg-mainBlue","text-white disabled:opacity-50"),custom:""};return(0,a.jsx)("button",{className:r(Jf)({large:"py-3 px-4 text-base rounded-lg",medium:"py-[9px] px-3.5 text-base rounded-lg",small:"py-2 px-3 text-sm rounded-lg",extraSmall:"py-1.5 px-2.5 text-xs rounded-md",custom:""}[n],y[t],"flex items-center justify-center gap-[5px] font-medium","transition-colors ease-in-out","focus:outline-none",{"ring-[3px] ring-cta":h,"cursor-not-allowed":u.disabled,"w-full":i},s),...u,...f,...m,form:o,ref:d,children:e})}));o("85Hg2");je=o("85Hg2"),je=o("85Hg2"),je=o("85Hg2");new Map,new Map;new Map;new Map;new Map;new Map;let ov=!1;try{ov="exceptZero"===new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay}catch(g){}let av=!1;try{av="unit"===new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style}catch(e){}new RegExp("^.*\\(.*\\).*$");new Map;new Set(["decimal","fraction","integer","minusSign","plusSign","group"]);const sv=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),cv=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function lv(e){if(Intl.Locale){let t=new Intl.Locale(e).maximize().script;return sv.has(t)}let t=e.split("-")[0];return cv.has(t)}function dv(){let e="undefined"!=typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch(t){e="en-US"}return{locale:e,direction:lv(e)?"rtl":"ltr"}}dv(),new Set;r(je).createContext(null);new WeakMap;new Map;je=o("85Hg2");"undefined"!=typeof window&&window.visualViewport;new WeakMap;"undefined"!=typeof window&&window.visualViewport;const uv=[];function pv(e,t){let{onClose:r,shouldCloseOnBlur:n,isOpen:i,isDismissable:o=!1,isKeyboardDismissDisabled:a=!1,shouldCloseOnInteractOutside:s}=e;(0,je.useEffect)((()=>(i&&uv.push(t),()=>{let e=uv.indexOf(t);e>=0&&uv.splice(e,1)})),[i,t]);let c=()=>{uv[uv.length-1]===t&&r&&r()};bg({ref:t,onInteractOutside:o?e=>{s&&!s(e.target)||(uv[uv.length-1]===t&&(e.stopPropagation(),e.preventDefault()),c())}:null,onInteractOutsideStart:e=>{s&&!s(e.target)||uv[uv.length-1]===t&&(e.stopPropagation(),e.preventDefault())}});let{focusWithinProps:l}=pg({isDisabled:!n,onBlurWithin:e=>{e.relatedTarget&&Ig(e.relatedTarget,Eg)||(s&&!s(e.relatedTarget)||r())}});return{overlayProps:{onKeyDown:e=>{"Escape"!==e.key||a||(e.stopPropagation(),e.preventDefault(),c())},...l},underlayProps:{onPointerDown:e=>{e.target===e.currentTarget&&e.preventDefault()}}}}const hv="undefined"!=typeof window&&window.visualViewport,fv=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let mv,gv=0;function vv(e={}){let{isDisabled:t}=e;om((()=>{if(!t)return gv++,1===gv&&(mv=jm()?function(){let e,t=0,r=r=>{e=Sm(r.target),e===document.documentElement&&e===document.body||(t=r.changedTouches[0].pageY)},n=r=>{if(e===document.documentElement||e===document.body)return void r.preventDefault();let n=r.changedTouches[0].pageY,i=e.scrollTop,o=e.scrollHeight-e.clientHeight;(i<=0&&n>t||i>=o&&n<t)&&r.preventDefault(),t=n},i=e=>{let t=e.target;xv(t)&&t!==document.activeElement&&(e.preventDefault(),t.style.transform="translateY(-2000px)",t.focus(),requestAnimationFrame((()=>{t.style.transform=""})))},o=e=>{let t=e.target;xv(t)&&(t.style.transform="translateY(-2000px)",requestAnimationFrame((()=>{t.style.transform="",hv&&(hv.height<window.innerHeight?requestAnimationFrame((()=>{wv(t)})):hv.addEventListener("resize",(()=>wv(t)),{once:!0}))})))},a=()=>{window.scrollTo(0,0)},s=window.pageXOffset,c=window.pageYOffset,l=cm(yv(document.documentElement,"paddingRight",window.innerWidth-document.documentElement.clientWidth+"px"),yv(document.documentElement,"overflow","hidden"),yv(document.body,"marginTop",`-${c}px`));window.scrollTo(0,0);let d=cm(bv(document,"touchstart",r,{passive:!1,capture:!0}),bv(document,"touchmove",n,{passive:!1,capture:!0}),bv(document,"touchend",i,{passive:!1,capture:!0}),bv(document,"focus",o,!0),bv(window,"scroll",a));return()=>{l(),d(),window.scrollTo(s,c)}}():cm(yv(document.documentElement,"paddingRight",window.innerWidth-document.documentElement.clientWidth+"px"),yv(document.documentElement,"overflow","hidden"))),()=>{gv--,0===gv&&mv()}}),[t])}function yv(e,t,r){let n=e.style[t];return e.style[t]=r,()=>{e.style[t]=n}}function bv(e,t,r,n){return e.addEventListener(t,r,n),()=>{e.removeEventListener(t,r,n)}}function wv(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let t=Sm(e);if(t!==document.documentElement&&t!==document.body&&t!==e){let r=t.getBoundingClientRect().top,n=e.getBoundingClientRect().top;n>r+e.clientHeight&&(t.scrollTop+=n-r)}e=t.parentElement}}function xv(e){return e instanceof HTMLInputElement&&!fv.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}r(je).createContext(null);let Sv=new WeakMap,_v=[];function kv(e,t=document.body){let r=new Set(e),n=new Set,i=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:t=>((t instanceof HTMLElement||t instanceof SVGElement)&&"true"===t.dataset.liveAnnouncer&&r.add(t),r.has(t)||n.has(t.parentElement)&&"row"!==t.parentElement.getAttribute("role")?NodeFilter.FILTER_REJECT:e.some((e=>t.contains(e)))?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT)}),o=e=>{var t;let r=null!==(t=Sv.get(e))&&void 0!==t?t:0;"true"===e.getAttribute("aria-hidden")&&0===r||(0===r&&e.setAttribute("aria-hidden","true"),n.add(e),Sv.set(e,r+1))};_v.length&&_v[_v.length-1].disconnect();let a=i.nextNode();for(;null!=a;)o(a),a=i.nextNode();let s=new MutationObserver((e=>{for(let t of e)if("childList"===t.type&&0!==t.addedNodes.length&&![...r,...n].some((e=>e.contains(t.target))))for(let e of t.addedNodes)(e instanceof HTMLElement||e instanceof SVGElement)&&"true"===e.dataset.liveAnnouncer?r.add(e):e instanceof Element&&o(e)}));s.observe(t,{childList:!0,subtree:!0});let c={observe(){s.observe(t,{childList:!0,subtree:!0})},disconnect(){s.disconnect()}};return _v.push(c),()=>{s.disconnect();for(let e of n){let t=Sv.get(e);1===t?(e.removeAttribute("aria-hidden"),Sv.delete(e)):Sv.set(e,t-1)}c===_v[_v.length-1]?(_v.pop(),_v.length&&_v[_v.length-1].observe()):_v.splice(_v.indexOf(c),1)}}const Cv=r(je).createContext(null);function Ev(e){let t=rm(),{portalContainer:n=(t?null:document.body)}=e,[i,o]=(0,je.useState)(!1),a=(0,je.useMemo)((()=>({contain:i,setContain:o})),[i,o]);if(!n)return null;let s=r(je).createElement(Cv.Provider,{value:a},r(je).createElement(Pg,{restoreFocus:!0,contain:i},e.children));return r(c).createPortal(s,n)}function Pv(e,t,r){let{overlayProps:n,underlayProps:i}=pv({...e,isOpen:t.isOpen,onClose:t.close},r);return vv({isDisabled:!t.isOpen}),function(){let e=(0,je.useContext)(Cv),t=null==e?void 0:e.setContain;om((()=>{null==t||t(!0)}),[t])}(),(0,je.useEffect)((()=>{if(t.isOpen)return kv([r.current])}),[t.isOpen,r]),{modalProps:lm(n),underlayProps:i}}function Rv(){return Rv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Rv.apply(this,arguments)}function Tv(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}function jv(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Hr(e,t)}function Ov(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}je=o("85Hg2"),je=o("85Hg2");var Mv={disabled:!1},Lv=r(je=o("85Hg2")).createContext(null),Dv=function(e){return e.scrollTop},Iv="unmounted",Av="exited",Nv="entering",Fv="entered",zv="exiting",Bv=function(e){function t(t,r){var n;n=e.call(this,t,r)||this;var i,o=r&&!r.isMounting?t.enter:t.appear;return n.appearStatus=null,t.in?o?(i=Av,n.appearStatus=Nv):i=Fv:i=t.unmountOnExit||t.mountOnEnter?Iv:Av,n.state={status:i},n.nextCallback=null,n}jv(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===Iv?{status:Av}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var r=this.state.status;this.props.in?r!==Nv&&r!==Fv&&(t=Nv):r!==Nv&&r!==Fv||(t=zv)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,r,n=this.props.timeout;return e=t=r=n,null!=n&&"number"!=typeof n&&(e=n.exit,t=n.enter,r=void 0!==n.appear?n.appear:t),{exit:e,enter:t,appear:r}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===Nv){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:r(c).findDOMNode(this);n&&Dv(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Av&&this.setState({status:Iv})},n.performEnter=function(e){var t=this,n=this.props.enter,i=this.context?this.context.isMounting:e,o=this.props.nodeRef?[i]:[r(c).findDOMNode(this),i],a=o[0],s=o[1],l=this.getTimeouts(),d=i?l.appear:l.enter;!e&&!n||Mv.disabled?this.safeSetState({status:Fv},(function(){t.props.onEntered(a)})):(this.props.onEnter(a,s),this.safeSetState({status:Nv},(function(){t.props.onEntering(a,s),t.onTransitionEnd(d,(function(){t.safeSetState({status:Fv},(function(){t.props.onEntered(a,s)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),i=this.props.nodeRef?void 0:r(c).findDOMNode(this);t&&!Mv.disabled?(this.props.onExit(i),this.safeSetState({status:zv},(function(){e.props.onExiting(i),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:Av},(function(){e.props.onExited(i)}))}))}))):this.safeSetState({status:Av},(function(){e.props.onExited(i)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,r=!0;return this.nextCallback=function(n){r&&(r=!1,t.nextCallback=null,e(n))},this.nextCallback.cancel=function(){r=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:r(c).findDOMNode(this),i=null==e&&!this.props.addEndListener;if(n&&!i){if(this.props.addEndListener){var o=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],a=o[0],s=o[1];this.props.addEndListener(a,s)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===Iv)return null;var t=this.props,n=t.children,i=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,Tv(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return r(je).createElement(Lv.Provider,{value:null},"function"==typeof n?n(e,i):r(je).cloneElement(r(je).Children.only(n),i))},t}(r(je).Component);function Uv(){}Bv.contextType=Lv,Bv.propTypes={},Bv.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Uv,onEntering:Uv,onEntered:Uv,onExit:Uv,onExiting:Uv,onExited:Uv},Bv.UNMOUNTED=Iv,Bv.EXITED=Av,Bv.ENTERING=Nv,Bv.ENTERED=Fv,Bv.EXITING=zv;var Vv=Bv,Hv=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return n=t,void((r=e).classList?r.classList.add(n):function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}(r,n)||("string"==typeof r.className?r.className=r.className+" "+n:r.setAttribute("class",(r.className&&r.className.baseVal||"")+" "+n)));var r,n}))},qv=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return n=t,void((r=e).classList?r.classList.remove(n):"string"==typeof r.className?r.className=Ov(r.className,n):r.setAttribute("class",Ov(r.className&&r.className.baseVal||"",n)));var r,n}))},Wv=function(e){function t(){for(var t,r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return(t=e.call.apply(e,[this].concat(n))||this).appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,r){var n=t.resolveArguments(e,r),i=n[0],o=n[1];t.removeClasses(i,"exit"),t.addClass(i,o?"appear":"enter","base"),t.props.onEnter&&t.props.onEnter(e,r)},t.onEntering=function(e,r){var n=t.resolveArguments(e,r),i=n[0],o=n[1]?"appear":"enter";t.addClass(i,o,"active"),t.props.onEntering&&t.props.onEntering(e,r)},t.onEntered=function(e,r){var n=t.resolveArguments(e,r),i=n[0],o=n[1]?"appear":"enter";t.removeClasses(i,o),t.addClass(i,o,"done"),t.props.onEntered&&t.props.onEntered(e,r)},t.onExit=function(e){var r=t.resolveArguments(e)[0];t.removeClasses(r,"appear"),t.removeClasses(r,"enter"),t.addClass(r,"exit","base"),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var r=t.resolveArguments(e)[0];t.addClass(r,"exit","active"),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var r=t.resolveArguments(e)[0];t.removeClasses(r,"exit"),t.addClass(r,"exit","done"),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,r){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,r]},t.getClassNames=function(e){var r=t.props.classNames,n="string"==typeof r,i=n?""+(n&&r?r+"-":"")+e:r[e];return{baseClassName:i,activeClassName:n?i+"-active":r[e+"Active"],doneClassName:n?i+"-done":r[e+"Done"]}},t}jv(t,e);var n=t.prototype;return n.addClass=function(e,t,r){var n=this.getClassNames(t)[r+"ClassName"],i=this.getClassNames("enter").doneClassName;"appear"===t&&"done"===r&&i&&(n+=" "+i),"active"===r&&e&&Dv(e),n&&(this.appliedClasses[t][r]=n,Hv(e,n))},n.removeClasses=function(e,t){var r=this.appliedClasses[t],n=r.base,i=r.active,o=r.done;this.appliedClasses[t]={},n&&qv(e,n),i&&qv(e,i),o&&qv(e,o)},n.render=function(){var e=this.props,t=(e.classNames,Tv(e,["classNames"]));return r(je).createElement(Vv,Rv({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(r(je).Component);Wv.defaultProps={classNames:""},Wv.propTypes={};var $v=Wv;const Kv=e=>{const{state:t,children:r}=e,n=(0,je.useRef)(null),{modalProps:i,underlayProps:o}=Pv({isDismissable:!0,...e},t,n),[s,c]=(0,je.useState)(!t.isOpen);return!t.isOpen&&s?null:(0,a.jsx)(Ev,{children:(0,a.jsx)($v,{in:t.isOpen,appear:!0,onEntered:()=>c(!1),onExited:()=>c(!0),timeout:{enter:0,exit:300},classNames:{enter:"opacity-0",enterDone:"opacity-1 transition ease-in",exit:"opacity-0 transition ease-out"},children:(0,a.jsx)("div",{className:"fixed z-[100] inset-0 bg-black bg-opacity-90 flex justify-center items-center inter",...o,children:(0,a.jsx)($v,{in:t.isOpen,appear:!0,nodeRef:n,timeout:{enter:0,exit:300},classNames:{appear:"translate-y-2",appearDone:"translate-y-0 transition ease-in",exit:"translate-y-2 transition ease-out"},children:(0,a.jsx)("div",{...i,ref:n,children:r})})})})})};function Gv(e){const{children:t,state:n,size:i="small",title:o,description:s,primaryAction:c,secondaryAction:l,centered:d=!1,...u}=e,p=Cm().height-64;return(0,a.jsx)(Kv,{state:n,...u,children:(0,a.jsx)("div",{className:r(Jf)("bg-white rounded-[10px] z-[1] overflow-x-auto focus:outline-none antialiased",{small:"max-w-[400px] mx-[20px]",medium:"max-w-[600px]",large:"max-w-[800px]"}[i]),style:{maxHeight:`${p}px`},children:(0,a.jsxs)("div",{className:"flex flex-col gap-5 px-5 py-[25px] max-h-[inherit]",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-5 overflow-auto",children:[(0,a.jsxs)("div",{className:r(Jf)("flex flex-col gap-[5px]",{"text-center":d}),children:[(0,a.jsx)("h2",{className:"text-xl font-medium",children:o}),s&&(0,a.jsx)("p",{className:"text-sm text-secondary",children:s})]}),t]}),(c||l)&&(0,a.jsxs)("div",{className:r(Jf)("flex justify-end gap-2.5",d?"justify-center":"justify-end"),children:["string"==typeof l&&(0,a.jsx)(iv,{variant:"secondary",onPress:n.close,fullWidth:d,children:l}),"function"==typeof l&&l({close:n.close}),"string"==typeof c&&(0,a.jsx)(iv,{onPress:n.close,fullWidth:d,children:c}),"function"==typeof c&&c({close:n.close})]})]})})})}const Zv=({state:e,onClose:t})=>{const{t:r}=Fi(),n=(0,je.useRef)(null),{options:i}=(0,je.useContext)(Ya),[o,{width:s}]=Oc();return(0,je.useEffect)((()=>{const e=i.sharedURL||window.location.href;Md(n.current,e,{width:s>300?300:s,errorCorrectionLevel:"Q",margin:0})}),[s,i.sharedURL]),(0,a.jsx)(Gv,{centered:!0,title:r("recorder.switchToMobileTitle"),description:r("recorder.switchToMobileDescription"),isDismissable:!1,state:e,primaryAction:({close:e})=>(0,a.jsx)(iv,{fullWidth:!0,variant:"blue",onPress:()=>{e(),t()},children:r("recorder.useDesktopVersion")}),children:(0,a.jsxs)("div",{className:"flex flex-col gap-[20px]",children:[(0,a.jsxs)("div",{ref:o,className:"flex flex-1 items-center justify-center relative",children:[(0,a.jsx)("div",{className:"absolute w-1/3 h-1/3 max-w-[70px] max-h-[70px] flex items-center justify-center",children:(0,a.jsx)(th,{})}),(0,a.jsx)("canvas",{ref:n})]}),(0,a.jsx)("p",{className:"flex items-center justify-center text-xs text-primaryLight text-center",children:r("recorder.scanQRCode")})]})})};je=o("85Hg2");var Qv={},Yv={};Yv=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i},Yv.__esModule=!0,Yv.default=Yv,Qv=function(e,t){if(null==e)return{};var r,n,i=Yv(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i},Qv.__esModule=!0,Qv.default=Qv;var Jv={};function Xv(e){return Jv=Xv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Jv.__esModule=!0,Jv.default=Jv,Xv(e)}(Jv=Xv).__esModule=!0,Jv.default=Jv;var ey;je=o("85Hg2");ey={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0};var ty=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function ry(e){var t={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},n=e.match(/<\/?([^\s]+?)[/\s>]/);if(n&&(t.name=n[1],(r(ey)[n[1]]||"/"===e.charAt(e.length-2))&&(t.voidElement=!0),t.name.startsWith("!--"))){var i=e.indexOf("--\x3e");return{type:"comment",comment:-1!==i?e.slice(4,i):""}}for(var o=new RegExp(ty),a=null;null!==(a=o.exec(e));)if(a[0].trim())if(a[1]){var s=a[1].trim(),c=[s,""];s.indexOf("=")>-1&&(c=s.split("=")),t.attrs[c[0]]=c[1],o.lastIndex--}else a[2]&&(t.attrs[a[2]]=a[3].trim().substring(1,a[3].length-1));return t}var ny=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,iy=/^\s*$/,oy=Object.create(null);function ay(e,t){switch(t.type){case"text":return e+t.content;case"tag":return e+="<"+t.name+(t.attrs?function(e){var t=[];for(var r in e)t.push(r+'="'+e[r]+'"');return t.length?" "+t.join(" "):""}(t.attrs):"")+(t.voidElement?"/>":">"),t.voidElement?e:e+t.children.reduce(ay,"")+"</"+t.name+">";case"comment":return e+"\x3c!--"+t.comment+"--\x3e"}}var sy={parse:function(e,t){t||(t={}),t.components||(t.components=oy);var r,n=[],i=[],o=-1,a=!1;if(0!==e.indexOf("<")){var s=e.indexOf("<");n.push({type:"text",content:-1===s?e:e.substring(0,s)})}return e.replace(ny,(function(s,c){if(a){if(s!=="</"+r.name+">")return;a=!1}var l,d="/"!==s.charAt(1),u=s.startsWith("\x3c!--"),p=c+s.length,h=e.charAt(p);if(u){var f=ry(s);return o<0?(n.push(f),n):((l=i[o]).children.push(f),n)}if(d&&(o++,"tag"===(r=ry(s)).type&&t.components[r.name]&&(r.type="component",a=!0),r.voidElement||a||!h||"<"===h||r.children.push({type:"text",content:e.slice(p,e.indexOf("<",p))}),0===o&&n.push(r),(l=i[o-1])&&l.children.push(r),i[o]=r),(!d||r.voidElement)&&(o>-1&&(r.voidElement||r.name===s.slice(2,-1))&&(o--,r=-1===o?n:i[o]),!a&&"<"!==h&&h)){l=-1===o?n:i[o].children;var m=e.indexOf("<",p),g=e.slice(p,-1===m?void 0:m);iy.test(g)&&(g=" "),(m>-1&&o+l.length>=0||" "!==g)&&l.push({type:"text",content:g})}})),n},stringify:function(e){return e.reduce((function(e,t){return e+ay("",t)}),"")}},cy=sy,ly=["format"],dy=["children","count","parent","i18nKey","context","tOptions","values","defaults","components","ns","i18n","t","shouldUnescape"];function uy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function py(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uy(Object(n),!0).forEach((function(t){r(si)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uy(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function hy(e,t){if(!e)return!1;var r=e.props?e.props.children:e.children;return t?r.length>0:!!r}function fy(e){return e?e.props?e.props.children:e.children:[]}function my(e){return Array.isArray(e)?e:[e]}function gy(e,t){if(!e)return"";var n="",i=my(e),o=t.transSupportBasicHtmlNodes&&t.transKeepBasicHtmlNodesFor?t.transKeepBasicHtmlNodesFor:[];return i.forEach((function(e,i){if("string"==typeof e)n+="".concat(e);else if((0,je.isValidElement)(e)){var a=Object.keys(e.props).length,s=o.indexOf(e.type)>-1,c=e.props.children;if(!c&&s&&0===a)n+="<".concat(e.type,"/>");else if(c||s&&0===a)if(e.props.i18nIsDynamicList)n+="<".concat(i,"></").concat(i,">");else if(s&&1===a&&"string"==typeof c)n+="<".concat(e.type,">").concat(c,"</").concat(e.type,">");else{var l=gy(c,t);n+="<".concat(i,">").concat(l,"</").concat(i,">")}else n+="<".concat(i,"></").concat(i,">")}else if(null===e)Ti("Trans: the passed in value is invalid - seems you passed in a null child.");else if("object"===r(Jv)(e)){var d=e.format,u=r(Qv)(e,ly),p=Object.keys(u);if(1===p.length){var h=d?"".concat(p[0],", ").concat(d):p[0];n+="{{".concat(h,"}}")}else Ti("react-i18next: the passed in object contained more than one variable - the object should look like {{ value, format }} where format is optional.",e)}else Ti("Trans: the passed in value is invalid - seems you passed in a variable like {number} - please pass in variables for interpolation as full objects like {{number}}.",e)})),n}function vy(e,t,n,i,o,a){if(""===t)return[];var s=i.transKeepBasicHtmlNodesFor||[],c=t&&new RegExp(s.join("|")).test(t);if(!e&&!c)return[t];var l={};!function e(t){my(t).forEach((function(t){"string"!=typeof t&&(hy(t)?e(fy(t)):"object"!==r(Jv)(t)||(0,je.isValidElement)(t)||Object.assign(l,t))}))}(e);var d=cy.parse("<0>".concat(t,"</0>")),u=py(py({},l),o);function p(e,t,r){var n=fy(e),i=f(n,t.children,r);return function(e){return"[object Array]"===Object.prototype.toString.call(e)&&e.every((function(e){return(0,je.isValidElement)(e)}))}(n)&&0===i.length?n:i}function h(e,t,r,n,i){e.dummy&&(e.children=t),r.push((0,je.cloneElement)(e,py(py({},e.props),{},{key:n}),i?void 0:t))}function f(t,o,l){var d=my(t);return my(o).reduce((function(t,o,m){var g,v,y,b=o.children&&o.children[0]&&o.children[0].content&&n.services.interpolator.interpolate(o.children[0].content,u,n.language);if("tag"===o.type){var w=d[parseInt(o.name,10)];!w&&1===l.length&&l[0][o.name]&&(w=l[0][o.name]),w||(w={});var x=0!==Object.keys(o.attrs).length?(g={props:o.attrs},(y=py({},v=w)).props=Object.assign(g.props,v.props),y):w,S=(0,je.isValidElement)(x),_=S&&hy(o,!0)&&!o.voidElement,k=c&&"object"===r(Jv)(x)&&x.dummy&&!S,C="object"===r(Jv)(e)&&null!==e&&Object.hasOwnProperty.call(e,o.name);if("string"==typeof x){var E=n.services.interpolator.interpolate(x,u,n.language);t.push(E)}else if(hy(x)||_){h(x,p(x,o,l),t,m)}else if(k){var P=f(d,o.children,l);t.push((0,je.cloneElement)(x,py(py({},x.props),{},{key:m}),P))}else if(Number.isNaN(parseFloat(o.name))){if(C)h(x,p(x,o,l),t,m,o.voidElement);else if(i.transSupportBasicHtmlNodes&&s.indexOf(o.name)>-1)if(o.voidElement)t.push((0,je.createElement)(o.name,{key:"".concat(o.name,"-").concat(m)}));else{var R=f(d,o.children,l);t.push((0,je.createElement)(o.name,{key:"".concat(o.name,"-").concat(m)},R))}else if(o.voidElement)t.push("<".concat(o.name," />"));else{var T=f(d,o.children,l);t.push("<".concat(o.name,">").concat(T,"</").concat(o.name,">"))}}else if("object"!==r(Jv)(x)||S)1===o.children.length&&b?t.push((0,je.cloneElement)(x,py(py({},x.props),{},{key:m}),b)):t.push((0,je.cloneElement)(x,py(py({},x.props),{},{key:m})));else{var j=o.children[0]?b:null;j&&t.push(j)}}else if("text"===o.type){var O=i.transWrapTextNodes,M=a?i.unescape(n.services.interpolator.interpolate(o.content,u,n.language)):n.services.interpolator.interpolate(o.content,u,n.language);O?t.push((0,je.createElement)(O,{key:"".concat(o.name,"-").concat(m)},M)):t.push(M)}return t}),[])}return fy(f([{dummy:!0,children:e||[]}],d,my(e||[]))[0])}function yy(e){var t=e.children,n=e.count,i=e.parent,o=e.i18nKey,a=e.context,s=e.tOptions,c=void 0===s?{}:s,l=e.values,d=e.defaults,u=e.components,p=e.ns,h=e.i18n,f=e.t,m=e.shouldUnescape,g=r(Qv)(e,dy),v=(0,je.useContext)(mi)||{},y=v.i18n,b=v.defaultNS,w=h||y||yi();if(!w)return Oi("You will need to pass in an i18next instance by using i18nextReactModule"),t;var x=f||w.t.bind(w)||function(e){return e};a&&(c.context=a);var S=py(py({},gi()),w.options&&w.options.react),_=p||x.ns||b||w.options&&w.options.defaultNS;_="string"==typeof _?[_]:_||["translation"];var k=d||gy(t,S)||S.transEmptyNodeValue||o,C=S.hashTransKey,E=o||(C?C(k):k),P=l?c.interpolation:{interpolation:py(py({},c.interpolation),{},{prefix:"#$?",suffix:"?$#"})},R=py(py(py(py({},c),{},{count:n},l),P),{},{defaultValue:k,ns:_}),T=vy(u||t,E?x(E,R):k,w,S,R,m),j=void 0!==i?i:S.defaultTransParent;return j?(0,je.createElement)(j,g,T):T}const by=({sideColor:e,mainColor:t})=>(0,a.jsxs)("svg",{width:"20",height:"21",viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{display:"inline"},transform:"translate(0 -1)",children:[(0,a.jsx)("path",{d:"M10 2.167a8.333 8.333 0 1 0 0 16.666 8.333 8.333 0 0 0 0-16.666Zm0 15a6.667 6.667 0 1 1 0-13.334 6.667 6.667 0 0 1 0 13.333Z",fill:e||"#1D1C20"}),(0,a.jsx)("path",{d:"M6.76 5.65a5.833 5.833 0 1 1 6.481 9.7 5.833 5.833 0 0 1-6.481-9.7Z",fill:t||"#F12828"})]}),wy=({sideColor:e,mainColor:t})=>(0,a.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{display:"inline"},transform:"translate(0 -1)",children:[(0,a.jsx)("path",{d:"M10 1.667a8.333 8.333 0 1 0 0 16.666 8.333 8.333 0 0 0 0-16.666Zm0 15a6.667 6.667 0 1 1 0-13.334 6.667 6.667 0 0 1 0 13.333Z",fill:e||"#1D1C20"}),(0,a.jsx)("path",{d:"M7.5 6.667h5a.833.833 0 0 1 .833.833v5a.833.833 0 0 1-.834.834h-5a.833.833 0 0 1-.833-.834v-5a.833.833 0 0 1 .833-.833Z",fill:t||"#F12828"})]}),xy=()=>(0,a.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{display:"inline"},transform:"translate(0 -1)",children:[(0,a.jsx)("path",{d:"M10 1.667a8.333 8.333 0 1 0 0 16.666 8.333 8.333 0 0 0 0-16.666Zm0 15a6.666 6.666 0 1 1 0-13.333 6.666 6.666 0 0 1 0 13.333Z",fill:"#1D1C20"}),(0,a.jsx)("path",{d:"M6.76 5.15a5.833 5.833 0 1 1 6.481 9.7 5.833 5.833 0 0 1-6.481-9.7Z",fill:"#1D1C20"})]});je=o("85Hg2");var Sy={};e(Sy,"QueryClient",(()=>sb)),e(Sy,"QueryClient",(()=>bb.QueryClient)),e(Sy,"QueryClientProvider",(()=>fb)),e(Sy,"useMutation",(()=>gb));var _y="undefined"==typeof window;function ky(){}function Cy(e,t){return"function"==typeof e?e(t):e}function Ey(e){return Array.isArray(e)?e:[e]}function Py(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ry(e,t,r){return By(e)?"function"==typeof t?Rv({},r,{queryKey:e,queryFn:t}):Rv({},t,{queryKey:e}):e}function Ty(e,t,r){return By(e)?"function"==typeof t?Rv({},r,{mutationKey:e,mutationFn:t}):Rv({},t,{mutationKey:e}):"function"==typeof e?Rv({},t,{mutationFn:e}):Rv({},e)}function jy(e,t,r){return By(e)?[Rv({},t,{queryKey:e}),r]:[e||{},t]}function Oy(e,t){var r=e.active,n=e.exact,i=e.fetching,o=e.inactive,a=e.predicate,s=e.queryKey,c=e.stale;if(By(s))if(n){if(t.queryHash!==Ly(s,t.options))return!1}else if(!Iy(t.queryKey,s))return!1;var l=function(e,t){return!0===e&&!0===t||null==e&&null==t?"all":!1===e&&!1===t?"none":(null!=e?e:!t)?"active":"inactive"}(r,o);if("none"===l)return!1;if("all"!==l){var d=t.isActive();if("active"===l&&!d)return!1;if("inactive"===l&&d)return!1}return("boolean"!=typeof c||t.isStale()===c)&&(("boolean"!=typeof i||t.isFetching()===i)&&!(a&&!a(t)))}function My(e,t){var r=e.exact,n=e.fetching,i=e.predicate,o=e.mutationKey;if(By(o)){if(!t.options.mutationKey)return!1;if(r){if(Dy(t.options.mutationKey)!==Dy(o))return!1}else if(!Iy(t.options.mutationKey,o))return!1}return("boolean"!=typeof n||"loading"===t.state.status===n)&&!(i&&!i(t))}function Ly(e,t){return((null==t?void 0:t.queryKeyHashFn)||Dy)(e)}function Dy(e){var t,r=Ey(e);return t=r,JSON.stringify(t,(function(e,t){return Fy(t)?Object.keys(t).sort().reduce((function(e,r){return e[r]=t[r],e}),{}):t}))}function Iy(e,t){return Ay(Ey(e),Ey(t))}function Ay(e,t){return e===t||typeof e==typeof t&&(!(!e||!t||"object"!=typeof e||"object"!=typeof t)&&!Object.keys(t).some((function(r){return!Ay(e[r],t[r])})))}function Ny(e,t){if(e===t)return e;var r=Array.isArray(e)&&Array.isArray(t);if(r||Fy(e)&&Fy(t)){for(var n=r?e.length:Object.keys(e).length,i=r?t:Object.keys(t),o=i.length,a=r?[]:{},s=0,c=0;c<o;c++){var l=r?c:i[c];a[l]=Ny(e[l],t[l]),a[l]===e[l]&&s++}return n===o&&s===n?e:a}return t}function Fy(e){if(!zy(e))return!1;var t=e.constructor;if(void 0===t)return!0;var r=t.prototype;return!!zy(r)&&!!r.hasOwnProperty("isPrototypeOf")}function zy(e){return"[object Object]"===Object.prototype.toString.call(e)}function By(e){return"string"==typeof e||Array.isArray(e)}function Uy(e){Promise.resolve().then(e).catch((function(e){return setTimeout((function(){throw e}))}))}function Vy(){if("function"==typeof AbortController)return new AbortController}var Hy=new(function(){function e(){this.queue=[],this.transactions=0,this.notifyFn=function(e){e()},this.batchNotifyFn=function(e){e()}}var t=e.prototype;return t.batch=function(e){var t;this.transactions++;try{t=e()}finally{this.transactions--,this.transactions||this.flush()}return t},t.schedule=function(e){var t=this;this.transactions?this.queue.push(e):Uy((function(){t.notifyFn(e)}))},t.batchCalls=function(e){var t=this;return function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.schedule((function(){e.apply(void 0,n)}))}},t.flush=function(){var e=this,t=this.queue;this.queue=[],t.length&&Uy((function(){e.batchNotifyFn((function(){t.forEach((function(t){e.notifyFn(t)}))}))}))},t.setNotifyFunction=function(e){this.notifyFn=e},t.setBatchNotifyFunction=function(e){this.batchNotifyFn=e},e}()),qy=console;function Wy(){return qy}var $y=function(){function e(){this.listeners=[]}var t=e.prototype;return t.subscribe=function(e){var t=this,r=e||function(){};return this.listeners.push(r),this.onSubscribe(),function(){t.listeners=t.listeners.filter((function(e){return e!==r})),t.onUnsubscribe()}},t.hasListeners=function(){return this.listeners.length>0},t.onSubscribe=function(){},t.onUnsubscribe=function(){},e}(),Ky=new(function(e){function t(){var t;return(t=e.call(this)||this).setup=function(e){var t;if(!_y&&(null==(t=window)?void 0:t.addEventListener)){var r=function(){return e()};return window.addEventListener("visibilitychange",r,!1),window.addEventListener("focus",r,!1),function(){window.removeEventListener("visibilitychange",r),window.removeEventListener("focus",r)}}},t}jv(t,e);var r=t.prototype;return r.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},r.onUnsubscribe=function(){var e;this.hasListeners()||(null==(e=this.cleanup)||e.call(this),this.cleanup=void 0)},r.setEventListener=function(e){var t,r=this;this.setup=e,null==(t=this.cleanup)||t.call(this),this.cleanup=e((function(e){"boolean"==typeof e?r.setFocused(e):r.onFocus()}))},r.setFocused=function(e){this.focused=e,e&&this.onFocus()},r.onFocus=function(){this.listeners.forEach((function(e){e()}))},r.isFocused=function(){return"boolean"==typeof this.focused?this.focused:"undefined"==typeof document||[void 0,"visible","prerender"].includes(document.visibilityState)},t}($y)),Gy=new(function(e){function t(){var t;return(t=e.call(this)||this).setup=function(e){var t;if(!_y&&(null==(t=window)?void 0:t.addEventListener)){var r=function(){return e()};return window.addEventListener("online",r,!1),window.addEventListener("offline",r,!1),function(){window.removeEventListener("online",r),window.removeEventListener("offline",r)}}},t}jv(t,e);var r=t.prototype;return r.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},r.onUnsubscribe=function(){var e;this.hasListeners()||(null==(e=this.cleanup)||e.call(this),this.cleanup=void 0)},r.setEventListener=function(e){var t,r=this;this.setup=e,null==(t=this.cleanup)||t.call(this),this.cleanup=e((function(e){"boolean"==typeof e?r.setOnline(e):r.onOnline()}))},r.setOnline=function(e){this.online=e,e&&this.onOnline()},r.onOnline=function(){this.listeners.forEach((function(e){e()}))},r.isOnline=function(){return"boolean"==typeof this.online?this.online:"undefined"==typeof navigator||void 0===navigator.onLine||navigator.onLine},t}($y));function Zy(e){return Math.min(1e3*Math.pow(2,e),3e4)}function Qy(e){return"function"==typeof(null==e?void 0:e.cancel)}var Yy=function(e){this.revert=null==e?void 0:e.revert,this.silent=null==e?void 0:e.silent};function Jy(e){return e instanceof Yy}var Xy=function(e){var t,r,n,i,o=this,a=!1;this.abort=e.abort,this.cancel=function(e){return null==t?void 0:t(e)},this.cancelRetry=function(){a=!0},this.continueRetry=function(){a=!1},this.continue=function(){return null==r?void 0:r()},this.failureCount=0,this.isPaused=!1,this.isResolved=!1,this.isTransportCancelable=!1,this.promise=new Promise((function(e,t){n=e,i=t}));var s=function(t){o.isResolved||(o.isResolved=!0,null==e.onSuccess||e.onSuccess(t),null==r||r(),n(t))},c=function(t){o.isResolved||(o.isResolved=!0,null==e.onError||e.onError(t),null==r||r(),i(t))};!function n(){if(!o.isResolved){var i;try{i=e.fn()}catch(e){i=Promise.reject(e)}t=function(e){if(!o.isResolved&&(c(new Yy(e)),null==o.abort||o.abort(),Qy(i)))try{i.cancel()}catch(e){}},o.isTransportCancelable=Qy(i),Promise.resolve(i).then(s).catch((function(t){var i,s;if(!o.isResolved){var l,d=null!=(i=e.retry)?i:3,u=null!=(s=e.retryDelay)?s:Zy,p="function"==typeof u?u(o.failureCount,t):u,h=!0===d||"number"==typeof d&&o.failureCount<d||"function"==typeof d&&d(o.failureCount,t);if(!a&&h)o.failureCount++,null==e.onFail||e.onFail(o.failureCount,t),(l=p,new Promise((function(e){setTimeout(e,l)}))).then((function(){if(!Ky.isFocused()||!Gy.isOnline())return new Promise((function(t){r=t,o.isPaused=!0,null==e.onPause||e.onPause()})).then((function(){r=void 0,o.isPaused=!1,null==e.onContinue||e.onContinue()}))})).then((function(){a?c(t):n()}));else c(t)}}))}}()},eb=function(){function e(e){this.abortSignalConsumed=!1,this.hadObservers=!1,this.defaultOptions=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.cache=e.cache,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.initialState=e.state||this.getDefaultState(this.options),this.state=this.initialState,this.meta=e.meta,this.scheduleGc()}var t=e.prototype;return t.setOptions=function(e){var t;this.options=Rv({},this.defaultOptions,e),this.meta=null==e?void 0:e.meta,this.cacheTime=Math.max(this.cacheTime||0,null!=(t=this.options.cacheTime)?t:3e5)},t.setDefaultOptions=function(e){this.defaultOptions=e},t.scheduleGc=function(){var e,t=this;this.clearGcTimeout(),"number"==typeof(e=this.cacheTime)&&e>=0&&e!==1/0&&(this.gcTimeout=setTimeout((function(){t.optionalRemove()}),this.cacheTime))},t.clearGcTimeout=function(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)},t.optionalRemove=function(){this.observers.length||(this.state.isFetching?this.hadObservers&&this.scheduleGc():this.cache.remove(this))},t.setData=function(e,t){var r,n,i=this.state.data,o=Cy(e,i);return(null==(r=(n=this.options).isDataEqual)?void 0:r.call(n,i,o))?o=i:!1!==this.options.structuralSharing&&(o=Ny(i,o)),this.dispatch({data:o,type:"success",dataUpdatedAt:null==t?void 0:t.updatedAt}),o},t.setState=function(e,t){this.dispatch({type:"setState",state:e,setStateOptions:t})},t.cancel=function(e){var t,r=this.promise;return null==(t=this.retryer)||t.cancel(e),r?r.then(ky).catch(ky):Promise.resolve()},t.destroy=function(){this.clearGcTimeout(),this.cancel({silent:!0})},t.reset=function(){this.destroy(),this.setState(this.initialState)},t.isActive=function(){return this.observers.some((function(e){return!1!==e.options.enabled}))},t.isFetching=function(){return this.state.isFetching},t.isStale=function(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some((function(e){return e.getCurrentResult().isStale}))},t.isStaleByTime=function(e){return void 0===e&&(e=0),this.state.isInvalidated||!this.state.dataUpdatedAt||!Py(this.state.dataUpdatedAt,e)},t.onFocus=function(){var e,t=this.observers.find((function(e){return e.shouldFetchOnWindowFocus()}));t&&t.refetch(),null==(e=this.retryer)||e.continue()},t.onOnline=function(){var e,t=this.observers.find((function(e){return e.shouldFetchOnReconnect()}));t&&t.refetch(),null==(e=this.retryer)||e.continue()},t.addObserver=function(e){-1===this.observers.indexOf(e)&&(this.observers.push(e),this.hadObservers=!0,this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:e}))},t.removeObserver=function(e){-1!==this.observers.indexOf(e)&&(this.observers=this.observers.filter((function(t){return t!==e})),this.observers.length||(this.retryer&&(this.retryer.isTransportCancelable||this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.cacheTime?this.scheduleGc():this.cache.remove(this)),this.cache.notify({type:"observerRemoved",query:this,observer:e}))},t.getObserversCount=function(){return this.observers.length},t.invalidate=function(){this.state.isInvalidated||this.dispatch({type:"invalidate"})},t.fetch=function(e,t){var r,n,i,o=this;if(this.state.isFetching)if(this.state.dataUpdatedAt&&(null==t?void 0:t.cancelRefetch))this.cancel({silent:!0});else if(this.promise){var a;return null==(a=this.retryer)||a.continueRetry(),this.promise}if(e&&this.setOptions(e),!this.options.queryFn){var s=this.observers.find((function(e){return e.options.queryFn}));s&&this.setOptions(s.options)}var c=Ey(this.queryKey),l=Vy(),d={queryKey:c,pageParam:void 0,meta:this.meta};Object.defineProperty(d,"signal",{enumerable:!0,get:function(){if(l)return o.abortSignalConsumed=!0,l.signal}});var u,p,h={fetchOptions:t,options:this.options,queryKey:c,state:this.state,fetchFn:function(){return o.options.queryFn?(o.abortSignalConsumed=!1,o.options.queryFn(d)):Promise.reject("Missing queryFn")},meta:this.meta};(null==(r=this.options.behavior)?void 0:r.onFetch)&&(null==(u=this.options.behavior)||u.onFetch(h));(this.revertState=this.state,this.state.isFetching&&this.state.fetchMeta===(null==(n=h.fetchOptions)?void 0:n.meta))||this.dispatch({type:"fetch",meta:null==(p=h.fetchOptions)?void 0:p.meta});return this.retryer=new Xy({fn:h.fetchFn,abort:null==l||null==(i=l.abort)?void 0:i.bind(l),onSuccess:function(e){o.setData(e),null==o.cache.config.onSuccess||o.cache.config.onSuccess(e,o),0===o.cacheTime&&o.optionalRemove()},onError:function(e){Jy(e)&&e.silent||o.dispatch({type:"error",error:e}),Jy(e)||(null==o.cache.config.onError||o.cache.config.onError(e,o),Wy().error(e)),0===o.cacheTime&&o.optionalRemove()},onFail:function(){o.dispatch({type:"failed"})},onPause:function(){o.dispatch({type:"pause"})},onContinue:function(){o.dispatch({type:"continue"})},retry:h.options.retry,retryDelay:h.options.retryDelay}),this.promise=this.retryer.promise,this.promise},t.dispatch=function(e){var t=this;this.state=this.reducer(this.state,e),Hy.batch((function(){t.observers.forEach((function(t){t.onQueryUpdate(e)})),t.cache.notify({query:t,type:"queryUpdated",action:e})}))},t.getDefaultState=function(e){var t="function"==typeof e.initialData?e.initialData():e.initialData,r=void 0!==e.initialData?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0,n=void 0!==t;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?null!=r?r:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchMeta:null,isFetching:!1,isInvalidated:!1,isPaused:!1,status:n?"success":"idle"}},t.reducer=function(e,t){var r,n;switch(t.type){case"failed":return Rv({},e,{fetchFailureCount:e.fetchFailureCount+1});case"pause":return Rv({},e,{isPaused:!0});case"continue":return Rv({},e,{isPaused:!1});case"fetch":return Rv({},e,{fetchFailureCount:0,fetchMeta:null!=(r=t.meta)?r:null,isFetching:!0,isPaused:!1},!e.dataUpdatedAt&&{error:null,status:"loading"});case"success":return Rv({},e,{data:t.data,dataUpdateCount:e.dataUpdateCount+1,dataUpdatedAt:null!=(n=t.dataUpdatedAt)?n:Date.now(),error:null,fetchFailureCount:0,isFetching:!1,isInvalidated:!1,isPaused:!1,status:"success"});case"error":var i=t.error;return Jy(i)&&i.revert&&this.revertState?Rv({},this.revertState):Rv({},e,{error:i,errorUpdateCount:e.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:e.fetchFailureCount+1,isFetching:!1,isPaused:!1,status:"error"});case"invalidate":return Rv({},e,{isInvalidated:!0});case"setState":return Rv({},e,t.state);default:return e}},e}(),tb=function(e){function t(t){var r;return(r=e.call(this)||this).config=t||{},r.queries=[],r.queriesMap={},r}jv(t,e);var r=t.prototype;return r.build=function(e,t,r){var n,i=t.queryKey,o=null!=(n=t.queryHash)?n:Ly(i,t),a=this.get(o);return a||(a=new eb({cache:this,queryKey:i,queryHash:o,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(i),meta:t.meta}),this.add(a)),a},r.add=function(e){this.queriesMap[e.queryHash]||(this.queriesMap[e.queryHash]=e,this.queries.push(e),this.notify({type:"queryAdded",query:e}))},r.remove=function(e){var t=this.queriesMap[e.queryHash];t&&(e.destroy(),this.queries=this.queries.filter((function(t){return t!==e})),t===e&&delete this.queriesMap[e.queryHash],this.notify({type:"queryRemoved",query:e}))},r.clear=function(){var e=this;Hy.batch((function(){e.queries.forEach((function(t){e.remove(t)}))}))},r.get=function(e){return this.queriesMap[e]},r.getAll=function(){return this.queries},r.find=function(e,t){var r=jy(e,t)[0];return void 0===r.exact&&(r.exact=!0),this.queries.find((function(e){return Oy(r,e)}))},r.findAll=function(e,t){var r=jy(e,t)[0];return Object.keys(r).length>0?this.queries.filter((function(e){return Oy(r,e)})):this.queries},r.notify=function(e){var t=this;Hy.batch((function(){t.listeners.forEach((function(t){t(e)}))}))},r.onFocus=function(){var e=this;Hy.batch((function(){e.queries.forEach((function(e){e.onFocus()}))}))},r.onOnline=function(){var e=this;Hy.batch((function(){e.queries.forEach((function(e){e.onOnline()}))}))},t}($y),rb=function(){function e(e){this.options=Rv({},e.defaultOptions,e.options),this.mutationId=e.mutationId,this.mutationCache=e.mutationCache,this.observers=[],this.state=e.state||nb(),this.meta=e.meta}var t=e.prototype;return t.setState=function(e){this.dispatch({type:"setState",state:e})},t.addObserver=function(e){-1===this.observers.indexOf(e)&&this.observers.push(e)},t.removeObserver=function(e){this.observers=this.observers.filter((function(t){return t!==e}))},t.cancel=function(){return this.retryer?(this.retryer.cancel(),this.retryer.promise.then(ky).catch(ky)):Promise.resolve()},t.continue=function(){return this.retryer?(this.retryer.continue(),this.retryer.promise):this.execute()},t.execute=function(){var e,t=this,r="loading"===this.state.status,n=Promise.resolve();return r||(this.dispatch({type:"loading",variables:this.options.variables}),n=n.then((function(){null==t.mutationCache.config.onMutate||t.mutationCache.config.onMutate(t.state.variables,t)})).then((function(){return null==t.options.onMutate?void 0:t.options.onMutate(t.state.variables)})).then((function(e){e!==t.state.context&&t.dispatch({type:"loading",context:e,variables:t.state.variables})}))),n.then((function(){return t.executeMutation()})).then((function(r){e=r,null==t.mutationCache.config.onSuccess||t.mutationCache.config.onSuccess(e,t.state.variables,t.state.context,t)})).then((function(){return null==t.options.onSuccess?void 0:t.options.onSuccess(e,t.state.variables,t.state.context)})).then((function(){return null==t.options.onSettled?void 0:t.options.onSettled(e,null,t.state.variables,t.state.context)})).then((function(){return t.dispatch({type:"success",data:e}),e})).catch((function(e){return null==t.mutationCache.config.onError||t.mutationCache.config.onError(e,t.state.variables,t.state.context,t),Wy().error(e),Promise.resolve().then((function(){return null==t.options.onError?void 0:t.options.onError(e,t.state.variables,t.state.context)})).then((function(){return null==t.options.onSettled?void 0:t.options.onSettled(void 0,e,t.state.variables,t.state.context)})).then((function(){throw t.dispatch({type:"error",error:e}),e}))}))},t.executeMutation=function(){var e,t=this;return this.retryer=new Xy({fn:function(){return t.options.mutationFn?t.options.mutationFn(t.state.variables):Promise.reject("No mutationFn found")},onFail:function(){t.dispatch({type:"failed"})},onPause:function(){t.dispatch({type:"pause"})},onContinue:function(){t.dispatch({type:"continue"})},retry:null!=(e=this.options.retry)?e:0,retryDelay:this.options.retryDelay}),this.retryer.promise},t.dispatch=function(e){var t=this;this.state=function(e,t){switch(t.type){case"failed":return Rv({},e,{failureCount:e.failureCount+1});case"pause":return Rv({},e,{isPaused:!0});case"continue":return Rv({},e,{isPaused:!1});case"loading":return Rv({},e,{context:t.context,data:void 0,error:null,isPaused:!1,status:"loading",variables:t.variables});case"success":return Rv({},e,{data:t.data,error:null,status:"success",isPaused:!1});case"error":return Rv({},e,{data:void 0,error:t.error,failureCount:e.failureCount+1,isPaused:!1,status:"error"});case"setState":return Rv({},e,t.state);default:return e}}(this.state,e),Hy.batch((function(){t.observers.forEach((function(t){t.onMutationUpdate(e)})),t.mutationCache.notify(t)}))},e}();function nb(){return{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0}}var ib=function(e){function t(t){var r;return(r=e.call(this)||this).config=t||{},r.mutations=[],r.mutationId=0,r}jv(t,e);var r=t.prototype;return r.build=function(e,t,r){var n=new rb({mutationCache:this,mutationId:++this.mutationId,options:e.defaultMutationOptions(t),state:r,defaultOptions:t.mutationKey?e.getMutationDefaults(t.mutationKey):void 0,meta:t.meta});return this.add(n),n},r.add=function(e){this.mutations.push(e),this.notify(e)},r.remove=function(e){this.mutations=this.mutations.filter((function(t){return t!==e})),e.cancel(),this.notify(e)},r.clear=function(){var e=this;Hy.batch((function(){e.mutations.forEach((function(t){e.remove(t)}))}))},r.getAll=function(){return this.mutations},r.find=function(e){return void 0===e.exact&&(e.exact=!0),this.mutations.find((function(t){return My(e,t)}))},r.findAll=function(e){return this.mutations.filter((function(t){return My(e,t)}))},r.notify=function(e){var t=this;Hy.batch((function(){t.listeners.forEach((function(t){t(e)}))}))},r.onFocus=function(){this.resumePausedMutations()},r.onOnline=function(){this.resumePausedMutations()},r.resumePausedMutations=function(){var e=this.mutations.filter((function(e){return e.state.isPaused}));return Hy.batch((function(){return e.reduce((function(e,t){return e.then((function(){return t.continue().catch(ky)}))}),Promise.resolve())}))},t}($y);function ob(e,t){return null==e.getNextPageParam?void 0:e.getNextPageParam(t[t.length-1],t)}function ab(e,t){return null==e.getPreviousPageParam?void 0:e.getPreviousPageParam(t[0],t)}var sb=function(){function e(e){void 0===e&&(e={}),this.queryCache=e.queryCache||new tb,this.mutationCache=e.mutationCache||new ib,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[]}var t=e.prototype;return t.mount=function(){var e=this;this.unsubscribeFocus=Ky.subscribe((function(){Ky.isFocused()&&Gy.isOnline()&&(e.mutationCache.onFocus(),e.queryCache.onFocus())})),this.unsubscribeOnline=Gy.subscribe((function(){Ky.isFocused()&&Gy.isOnline()&&(e.mutationCache.onOnline(),e.queryCache.onOnline())}))},t.unmount=function(){var e,t;null==(e=this.unsubscribeFocus)||e.call(this),null==(t=this.unsubscribeOnline)||t.call(this)},t.isFetching=function(e,t){var r=jy(e,t)[0];return r.fetching=!0,this.queryCache.findAll(r).length},t.isMutating=function(e){return this.mutationCache.findAll(Rv({},e,{fetching:!0})).length},t.getQueryData=function(e,t){var r;return null==(r=this.queryCache.find(e,t))?void 0:r.state.data},t.getQueriesData=function(e){return this.getQueryCache().findAll(e).map((function(e){return[e.queryKey,e.state.data]}))},t.setQueryData=function(e,t,r){var n=Ry(e),i=this.defaultQueryOptions(n);return this.queryCache.build(this,i).setData(t,r)},t.setQueriesData=function(e,t,r){var n=this;return Hy.batch((function(){return n.getQueryCache().findAll(e).map((function(e){var i=e.queryKey;return[i,n.setQueryData(i,t,r)]}))}))},t.getQueryState=function(e,t){var r;return null==(r=this.queryCache.find(e,t))?void 0:r.state},t.removeQueries=function(e,t){var r=jy(e,t)[0],n=this.queryCache;Hy.batch((function(){n.findAll(r).forEach((function(e){n.remove(e)}))}))},t.resetQueries=function(e,t,r){var n=this,i=jy(e,t,r),o=i[0],a=i[1],s=this.queryCache,c=Rv({},o,{active:!0});return Hy.batch((function(){return s.findAll(o).forEach((function(e){e.reset()})),n.refetchQueries(c,a)}))},t.cancelQueries=function(e,t,r){var n=this,i=jy(e,t,r),o=i[0],a=i[1],s=void 0===a?{}:a;void 0===s.revert&&(s.revert=!0);var c=Hy.batch((function(){return n.queryCache.findAll(o).map((function(e){return e.cancel(s)}))}));return Promise.all(c).then(ky).catch(ky)},t.invalidateQueries=function(e,t,r){var n,i,o,a=this,s=jy(e,t,r),c=s[0],l=s[1],d=Rv({},c,{active:null==(n=null!=(i=c.refetchActive)?i:c.active)||n,inactive:null!=(o=c.refetchInactive)&&o});return Hy.batch((function(){return a.queryCache.findAll(c).forEach((function(e){e.invalidate()})),a.refetchQueries(d,l)}))},t.refetchQueries=function(e,t,r){var n=this,i=jy(e,t,r),o=i[0],a=i[1],s=Hy.batch((function(){return n.queryCache.findAll(o).map((function(e){return e.fetch(void 0,Rv({},a,{meta:{refetchPage:null==o?void 0:o.refetchPage}}))}))})),c=Promise.all(s).then(ky);return(null==a?void 0:a.throwOnError)||(c=c.catch(ky)),c},t.fetchQuery=function(e,t,r){var n=Ry(e,t,r),i=this.defaultQueryOptions(n);void 0===i.retry&&(i.retry=!1);var o=this.queryCache.build(this,i);return o.isStaleByTime(i.staleTime)?o.fetch(i):Promise.resolve(o.state.data)},t.prefetchQuery=function(e,t,r){return this.fetchQuery(e,t,r).then(ky).catch(ky)},t.fetchInfiniteQuery=function(e,t,r){var n=Ry(e,t,r);return n.behavior={onFetch:function(e){e.fetchFn=function(){var t,r,n,i,o,a,s,c=null==(t=e.fetchOptions)||null==(r=t.meta)?void 0:r.refetchPage,l=null==(n=e.fetchOptions)||null==(i=n.meta)?void 0:i.fetchMore,d=null==l?void 0:l.pageParam,u="forward"===(null==l?void 0:l.direction),p="backward"===(null==l?void 0:l.direction),h=(null==(o=e.state.data)?void 0:o.pages)||[],f=(null==(a=e.state.data)?void 0:a.pageParams)||[],m=Vy(),g=null==m?void 0:m.signal,v=f,y=!1,b=e.options.queryFn||function(){return Promise.reject("Missing queryFn")},w=function(e,t,r,n){return v=n?[t].concat(v):[].concat(v,[t]),n?[r].concat(e):[].concat(e,[r])},x=function(t,r,n,i){if(y)return Promise.reject("Cancelled");if(void 0===n&&!r&&t.length)return Promise.resolve(t);var o={queryKey:e.queryKey,signal:g,pageParam:n,meta:e.meta},a=b(o),s=Promise.resolve(a).then((function(e){return w(t,n,e,i)}));return Qy(a)&&(s.cancel=a.cancel),s};if(h.length)if(u){var S=void 0!==d,_=S?d:ob(e.options,h);s=x(h,S,_)}else if(p){var k=void 0!==d,C=k?d:ab(e.options,h);s=x(h,k,C,!0)}else!function(){v=[];var t=void 0===e.options.getNextPageParam,r=!c||!h[0]||c(h[0],0,h);s=r?x([],t,f[0]):Promise.resolve(w([],f[0],h[0]));for(var n=function(r){s=s.then((function(n){if(!c||!h[r]||c(h[r],r,h)){var i=t?f[r]:ob(e.options,n);return x(n,t,i)}return Promise.resolve(w(n,f[r],h[r]))}))},i=1;i<h.length;i++)n(i)}();else s=x([]);var E=s.then((function(e){return{pages:e,pageParams:v}}));return E.cancel=function(){y=!0,null==m||m.abort(),Qy(s)&&s.cancel()},E}}},this.fetchQuery(n)},t.prefetchInfiniteQuery=function(e,t,r){return this.fetchInfiniteQuery(e,t,r).then(ky).catch(ky)},t.cancelMutations=function(){var e=this,t=Hy.batch((function(){return e.mutationCache.getAll().map((function(e){return e.cancel()}))}));return Promise.all(t).then(ky).catch(ky)},t.resumePausedMutations=function(){return this.getMutationCache().resumePausedMutations()},t.executeMutation=function(e){return this.mutationCache.build(this,e).execute()},t.getQueryCache=function(){return this.queryCache},t.getMutationCache=function(){return this.mutationCache},t.getDefaultOptions=function(){return this.defaultOptions},t.setDefaultOptions=function(e){this.defaultOptions=e},t.setQueryDefaults=function(e,t){var r=this.queryDefaults.find((function(t){return Dy(e)===Dy(t.queryKey)}));r?r.defaultOptions=t:this.queryDefaults.push({queryKey:e,defaultOptions:t})},t.getQueryDefaults=function(e){var t;return e?null==(t=this.queryDefaults.find((function(t){return Iy(e,t.queryKey)})))?void 0:t.defaultOptions:void 0},t.setMutationDefaults=function(e,t){var r=this.mutationDefaults.find((function(t){return Dy(e)===Dy(t.mutationKey)}));r?r.defaultOptions=t:this.mutationDefaults.push({mutationKey:e,defaultOptions:t})},t.getMutationDefaults=function(e){var t;return e?null==(t=this.mutationDefaults.find((function(t){return Iy(e,t.mutationKey)})))?void 0:t.defaultOptions:void 0},t.defaultQueryOptions=function(e){if(null==e?void 0:e._defaulted)return e;var t=Rv({},this.defaultOptions.queries,this.getQueryDefaults(null==e?void 0:e.queryKey),e,{_defaulted:!0});return!t.queryHash&&t.queryKey&&(t.queryHash=Ly(t.queryKey,t)),t},t.defaultQueryObserverOptions=function(e){return this.defaultQueryOptions(e)},t.defaultMutationOptions=function(e){return(null==e?void 0:e._defaulted)?e:Rv({},this.defaultOptions.mutations,this.getMutationDefaults(null==e?void 0:e.mutationKey),e,{_defaulted:!0})},t.clear=function(){this.queryCache.clear(),this.mutationCache.clear()},e}(),cb=r(c).unstable_batchedUpdates;Hy.setBatchNotifyFunction(cb);var lb=console;qy=lb;var db=r(je=o("85Hg2")).createContext(void 0),ub=r(je).createContext(!1);function pb(e){return e&&"undefined"!=typeof window?(window.ReactQueryClientContext||(window.ReactQueryClientContext=db),window.ReactQueryClientContext):db}var hb=function(){var e=r(je).useContext(pb(r(je).useContext(ub)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},fb=function(e){var t=e.client,n=e.contextSharing,i=void 0!==n&&n,o=e.children;r(je).useEffect((function(){return t.mount(),function(){t.unmount()}}),[t]);var a=pb(i);return r(je).createElement(ub.Provider,{value:i},r(je).createElement(a.Provider,{value:t},o))},mb=(je=o("85Hg2"),function(e){function t(t,r){var n;return(n=e.call(this)||this).client=t,n.setOptions(r),n.bindMethods(),n.updateResult(),n}jv(t,e);var r=t.prototype;return r.bindMethods=function(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)},r.setOptions=function(e){this.options=this.client.defaultMutationOptions(e)},r.onUnsubscribe=function(){var e;this.listeners.length||(null==(e=this.currentMutation)||e.removeObserver(this))},r.onMutationUpdate=function(e){this.updateResult();var t={listeners:!0};"success"===e.type?t.onSuccess=!0:"error"===e.type&&(t.onError=!0),this.notify(t)},r.getCurrentResult=function(){return this.currentResult},r.reset=function(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})},r.mutate=function(e,t){return this.mutateOptions=t,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,Rv({},this.options,{variables:void 0!==e?e:this.options.variables})),this.currentMutation.addObserver(this),this.currentMutation.execute()},r.updateResult=function(){var e=this.currentMutation?this.currentMutation.state:{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0},t=Rv({},e,{isLoading:"loading"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset});this.currentResult=t},r.notify=function(e){var t=this;Hy.batch((function(){t.mutateOptions&&(e.onSuccess?(null==t.mutateOptions.onSuccess||t.mutateOptions.onSuccess(t.currentResult.data,t.currentResult.variables,t.currentResult.context),null==t.mutateOptions.onSettled||t.mutateOptions.onSettled(t.currentResult.data,null,t.currentResult.variables,t.currentResult.context)):e.onError&&(null==t.mutateOptions.onError||t.mutateOptions.onError(t.currentResult.error,t.currentResult.variables,t.currentResult.context),null==t.mutateOptions.onSettled||t.mutateOptions.onSettled(void 0,t.currentResult.error,t.currentResult.variables,t.currentResult.context))),e.listeners&&t.listeners.forEach((function(e){e(t.currentResult)}))}))},t}($y));function gb(e,t,n){var i=r(je).useRef(!1),o=r(je).useState(0)[1],a=Ty(e,t,n),s=hb(),c=r(je).useRef();c.current?c.current.setOptions(a):c.current=new mb(s,a);var l=c.current.getCurrentResult();r(je).useEffect((function(){i.current=!0;var e=c.current.subscribe(Hy.batchCalls((function(){i.current&&o((function(e){return e+1}))})));return function(){i.current=!1,e()}}),[]);var d,u,p,h=r(je).useCallback((function(e,t){c.current.mutate(e,t).catch(ky)}),[]);if(l.error&&(d=void 0,u=c.current.options.useErrorBoundary,p=[l.error],"function"==typeof u?u.apply(void 0,p):"boolean"==typeof u?u:d))throw l.error;return Rv({},l,{mutate:h,mutateAsync:l.mutate})}var vb,yb,bb={};vb=Sy,yb={},Object.keys(yb).forEach((function(e){"default"===e||"__esModule"===e||vb.hasOwnProperty(e)||Object.defineProperty(vb,e,{enumerable:!0,get:function(){return yb[e]}})}));const wb={audio:!1,video:!1},xb=e=>{const[t,r]=(0,je.useState)(),n=gb([e],(async()=>{const n=await navigator.mediaDevices.getUserMedia(e);return r(n),e.audio&&!wb.audio&&(wb.audio=!0),e.video&&!wb.video&&(wb.video=!0),{media:t,savedPermissions:wb}}));return null==n.data&&t?.getTracks().forEach((e=>{e.stop(),t?.removeTrack(e)})),{...n,savedPermissions:wb}},Sb=({children:e})=>(0,a.jsx)("span",{className:"text-primary font-medium",children:e}),_b=({state:e,mode:t,...r})=>{const{t:n}=Fi(),i=xb({audio:!0,video:!0}),[o,s]=(0,je.useState)("idle");(0,je.useEffect)((()=>{const{deviceState:e}=Qa.getState();return e.screenshare.enabled||e.camera.enabled?s("granted"):void s("idle")}),[t]);const{orientation:c}=(0,je.useContext)(Ya),l="landscape"===c?"desktop":"mobile",d="granted"===o?"short":"full",u=(0,je.useRef)(null),p=n("photo"===t?"recorder.photoInstructionsTitle":"recorder.videoInstructionsTitle"),h=[(0,a.jsxs)(yy,{i18nKey:"recorder.instructions.allowAccessOnPrompt",children:["When prompted, ",(0,a.jsx)(Sb,{children:"allow access"})," to camera and microphone."]})],f=[(0,a.jsxs)(yy,{i18nKey:"recorder.instructions.tapPhotoButton",com:!0,children:["Tap the ",(0,a.jsx)(xy,{}),(0,a.jsx)(Sb,{children:" Camera button"})," to take a photo."]}),n("recorder.instructions.multiplePhotos"),(0,a.jsxs)(yy,{i18nKey:"recorder.instructions.reviewAndSendPhotos",children:["You can review your photo and then ",(0,a.jsx)(Sb,{children:"send it when you're done."})]})],m=[(0,a.jsxs)(yy,{i18nKey:"recorder.instructions.tapVideoButton",children:["Tap the ",(0,a.jsx)(by,{}),(0,a.jsx)(Sb,{children:" Record button"})," to start a recording."]}),(0,a.jsxs)(yy,{i18nKey:"recorder.instructions.videoSpeech",children:["You can ",(0,a.jsx)(Sb,{children:"speak during"})," the recording for added detail."]}),(0,a.jsxs)(yy,{i18nKey:"recorder.instructions.tapStopVideoButton",children:["When you're finished, tap the ",(0,a.jsx)(wy,{}),(0,a.jsx)(Sb,{children:" Stop button"}),"."]}),(0,a.jsxs)(yy,{i18nKey:"recorder.instructions.reviewAndSendVideos",children:["You can review your video and then ",(0,a.jsx)(Sb,{children:"send it when you're done"}),"."]})],g=[];return i.savedPermissions.audio||g.push(...h),g.push(..."photo"===t?f:m),(0,a.jsx)(Gv,{title:p,state:e,centered:!0,isDismissable:!1,...r,children:(0,a.jsxs)("div",{className:"flex flex-col gap-[20px]",children:[(0,a.jsx)("div",{className:"flex flex-col gap-[10px]",ref:u,children:g.map(((e,t)=>(0,a.jsxs)("div",{className:"flex flex-row justify-center gap-[5px]",children:[(0,a.jsx)("div",{className:"flex items-center justify-center min-w-[24px] h-[24px] rounded-[50%] bg-secondaryVLight",children:t+1}),(0,a.jsx)("span",{className:"w-full text-base text-primaryLight font-normal leading-[20px]",children:e})]},t)))}),(0,a.jsx)("div",{className:"flex items-center justify-center rounded-[8px] overflow-hidden",children:(0,a.jsx)("video",{src:`https://stream-assets.snapcall.io/animations/${l}-assist-onboarding-${t}-${d}.mp4`,playsInline:!0,autoPlay:!0,muted:!0,loop:!0})}),(0,a.jsx)("p",{className:"text-xs text-[#707070] text-center",children:(0,a.jsxs)(yy,{i18nKey:"recorder.instructions.privacyPolicy",children:["By proceeding, you agree to our",(0,a.jsx)("a",{className:"text-black font-semibold",href:"https://www.snapcall.io/privacy-policy",target:"_blank",rel:"noreferrer",children:"privacy policy"}),"."]})})]})})},kb=e=>[Math.floor(e/60),Math.round(e%60)].map((e=>`${e<10?"0":""}${e}`)).join(":");function Cb(e){const t=new Intl.DateTimeFormat("default",{dateStyle:"short"}),r=new Intl.DateTimeFormat("default",{hour:"numeric",minute:"2-digit"});return`${t.format(e)} at ${r.format(e)}`}const Eb=r(zi).parse(window.navigator.userAgent),Pb=({recorderState:e})=>{const{t:t}=Fi(),{selfPeerId:n}=(0,je.useContext)(Ya),i=xb({audio:!0,video:!0}),[o,s]=(0,je.useState)(!1),c=(0,je.useRef)(null),l="desktop"===Eb.platform.type,d=Qf({defaultOpen:!l}),[u,p]=(0,je.useState)(!1),[h,f]=(0,je.useState)(!1),m=Qf({defaultOpen:l}),[g,v]=(0,je.useState)(!1),y=(0,je.useCallback)((()=>{s(!1)}),[]);return(0,je.useEffect)((()=>(Qa.addEventListener("recordStopped",y),()=>{Qa.removeEventListener("recordStopped",y)})),[y]),(0,a.jsxs)("div",{className:r(Jf)("bg-[#000] w-full h-full justify-center flex flex-col antialiased inter",{}),children:[(0,a.jsx)(_b,{state:d,mode:e.mode,primaryAction:()=>(0,a.jsx)(iv,{fullWidth:!0,variant:"blue",isDisabled:!n||i.isLoading,onPress:()=>{if(!i.savedPermissions.audio)return(async()=>{i.mutate(void 0,{onError:()=>{e.permissionBlockedModalState.setOpen(!0)},onSettled:()=>{},onSuccess:async()=>{d.close();const{deviceState:e}=Qa.getState();i.reset(),e.microphone.enabled||await Qa.enableMicrophone(),e.camera.enabled||await Qa.enableVideo({resolution:"vga",frameRate:20,facingMode:"environment"})}})})();d.close()},children:i?.savedPermissions.audio?t("recorder.okay"):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(sh,{}),t("recorder.allowCamMicAccess")]})})}),(0,a.jsx)(Zv,{state:m,onClose:d.open}),("video"===e.mode||e.streaming)&&(0,a.jsx)("div",{className:"text-base text-white text-center font-medium pt-2.5",children:kb(e.timer)}),(0,a.jsx)("div",{className:"flex-1 min-h-0 p-2.5 ",children:(0,a.jsxs)("div",{className:"relative w-full h-full rounded-[10px] ",children:[o&&(0,a.jsx)(ev,{initialValue:3,onFinish:()=>{s(!1),e.setStartRecordTime(Date.now()),Qa.startRecord().then((()=>{c.current&&e.captureThumbnail(c.current)}))}}),g&&(0,a.jsx)(vl,{onAnimationEnd:()=>{v(!1),e.assetsPopupState.open()}}),(0,a.jsx)(rv,{ref:c})]})}),(0,a.jsx)("div",{className:"flex justify-center px-2.5 pb-2.5 z-10",children:(0,a.jsx)(Xg,{state:e,changeMode:t=>{e.setMode(t),"photo"!==t||h||(f(!0),d.open()),"video"!==t||u||(p(!0),d.open())},thumbnail:(0,a.jsx)(nv,{asset:e.assets[e.assets.length-1],onClick:e.assetsPopupState.open}),onSwitch:()=>{Qa.rotateVideo()},onCapturePress:()=>{"photo"===e.mode&&c.current&&((async t=>{const r=Date.now();e.setAssetLoading(!0);const n=await Qa.captureVideo(t),{url:i,assetId:o}=await Qa.saveCapture(n);e.setAssetLoading(!1),e.setAssets([...e.assets,{type:"photo",timestamp:r,objectUrl:i,assetId:o}])})(c.current),v(!0)),"photo"===e.mode||e.streaming||(e.setStreaming(!0),s(!0)),"photo"!==e.mode&&e.streaming&&(y(),e.startRecordTime&&(Qa.stopRecord(),e.setAssetLoading(!0),e.assetsPopupState.open()))}})})]})};je=o("85Hg2");const Rb=({children:e})=>(0,a.jsx)("span",{className:"text-white font-medium",children:e}),Tb=()=>{const{t:e}=Fi(),t=[(0,a.jsxs)(yy,{i18nKey:"recorder.instructions.tapVideoButton",children:["Tap the ",(0,a.jsx)(by,{sideColor:"#FFFFFF",mainColor:"#E5484D"}),(0,a.jsx)(Rb,{children:" Record button"})," to start a recording."]}),(0,a.jsx)(yy,{i18nKey:"recorder.instructions.screenShareInstruction"}),(0,a.jsxs)(yy,{i18nKey:"recorder.instructions.videoSpeech",children:["You can ",(0,a.jsx)(Rb,{children:"speak during"})," the recording for added detail."]}),(0,a.jsxs)(yy,{i18nKey:"recorder.instructions.tapStopVideoButton",children:["When you're finished, tap the ",(0,a.jsx)(wy,{sideColor:"#FFFFFF",mainColor:"#E5484D"}),(0,a.jsx)(Rb,{children:" Stop button"}),"."]}),(0,a.jsxs)(yy,{i18nKey:"recorder.instructions.reviewAndSendVideos",children:["You can review your video and then ",(0,a.jsx)(Rb,{children:"send it when you're done"}),"."]})];return(0,a.jsxs)("div",{className:"flex flex-row gap-[20px] w-full justify-between px-[60px]",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-[10px] w-[50%] items-start justify-center",children:[(0,a.jsx)("span",{className:" text-white font-semibold text-lg pb-[20px]",children:e("recorder.screenTitle")}),t.map(((e,t)=>(0,a.jsxs)("div",{className:"flex flex-row items-center justify-center gap-[20px]",children:[(0,a.jsx)("div",{className:"flex items-center justify-center min-w-[24px] h-[24px] rounded-[50%] bg-[#171717] text-white",children:t+1}),(0,a.jsx)("span",{className:"w-full text-base text-white font-normal leading-[20px]",children:e})]},t)))]}),(0,a.jsx)("div",{className:"flex items-center justify-center overflow-hidden w-[50%] box-border",children:(0,a.jsx)("video",{src:"https://stream-assets.snapcall.io/animations/desktop-assist-onboarding-screen.mp4",playsInline:!0,autoPlay:!0,muted:!0,loop:!0,className:"object-fit border-[white] border-[2px] rounded-[8px]"})})]})},jb=({recorderState:e})=>{const t=(0,je.useRef)(null),{t:n}=Fi(),i=xb({audio:!0}),[o,s]=(0,je.useState)("base");(0,je.useEffect)((()=>{"video"!==e.mode&&e.setMode("video")}),[e]);const c=(0,je.useCallback)((()=>{e.assetsPopupState.setOpen(!0),Qa.stopRecord(),s("base")}),[e]);return(0,je.useEffect)((()=>(Qa.addEventListener("screenshareDisabled",c),()=>{Qa.removeEventListener("screenshareDisabled",c)})),[c]),(0,je.useEffect)((()=>{const t=()=>{e.assetsPopupState.setOpen(!0),Qa.disableScreenshare(),s("base")};return Qa.addEventListener("recordStopped",t),()=>{Qa.removeEventListener("recordStopped",t)}}),[e.assetsPopupState]),(0,a.jsxs)("div",{className:"w-full h-full bg-black flex flex-col items-center justify-center py-[125px]",children:["live"!==o&&(0,a.jsxs)("div",{className:"relative bg-cover box-border rounded-[8px] w-full h-full max-w-[1116px] bg-[url('https://cdn.snapcall.io/img/assist/gradient-bg.jpg')] flex flex-col items-center justify-center ",children:[(0,a.jsx)(Tb,{}),(0,a.jsxs)("div",{className:"absolute w-[486px] bottom-[-85px] left-[calc(50%-243px)] flex flex-col gap-[7px] items-center justify-center",children:[(0,a.jsx)(Yg,{state:o,onCapturePress:()=>{s("request"),e.setStreaming(!0),i.mutate(void 0,{onError:()=>{e.permissionBlockedModalState.setOpen(!0)},onSuccess:async()=>{try{const{deviceState:r}=Qa.getState();i.reset(),r.microphone.enabled||await Qa.enableMicrophone(),await Qa.enableScreenshare({audioTransportOption:"mix"}),Qa.startRecord().then((()=>{setTimeout((()=>{t.current&&e.captureThumbnail(t.current)}),1e3)})),s("live"),e.setStartRecordTime(Date.now())}catch(t){console.log(t),e.permissionBlockedModalState.setOpen(!0)}}})}}),(0,a.jsx)("span",{className:"text-white text-center font-small text-sm overflow-visible",children:n("recorder.limit")})]})]}),(0,a.jsxs)("div",{className:r(Jf)("relative",{"w-0 h-0":"live"!==o,"min-w-[200px] max-h-[100%]":"live"===o}),children:[(0,a.jsx)(tv,{ref:t}),"live"===o&&(0,a.jsxs)("div",{className:"absolute w-[86px] h-[86px] bottom-[-65px] left-[calc(50%-43px)]",children:[(0,a.jsx)(Yg,{onCapturePress:()=>{e.setAssetLoading(!0),Qa.disableScreenshare()},state:o}),(0,a.jsxs)("span",{className:"text-white font-small text-sm text-center pt-[14px]",children:[kb(e.timer)," / 05:00"]})]})]})]})},Ob=({state:e})=>{const{t:t}=Fi();return(0,a.jsx)(Gv,{title:t("recorder.permissionDeniedTitle"),state:e,centered:!1,isDismissable:!1,primaryAction:()=>(0,a.jsx)(iv,{variant:"blue",fullWidth:!0,onPress:()=>window.location.reload(),children:t("recorder.allowAccess")}),children:(0,a.jsx)("div",{className:"flex flex-col gap-[20px]",children:(0,a.jsx)("div",{className:"flex flex-col gap-[10px]",children:(0,a.jsx)("span",{className:"w-full text-base text-primaryLight font-normal leading-[20px]",children:t("recorder.permissionDeniedDescription")})})})})};je=o("85Hg2"),je=o("85Hg2");function Mb(e){const{children:t,state:n}=e,i=r(je).useRef(null),{orientation:o}=(0,je.useContext)(Ya),{modalProps:s,underlayProps:c}=Pv(e,n,i),[l,d]=(0,je.useState)(!n.isOpen),u=Cm().height-64,[p]=(0,je.useState)("landscape"===o);return!n.isOpen&&l?null:(0,a.jsx)(Ev,{children:(0,a.jsx)($v,{in:n.isOpen,appear:!0,onEntered:()=>d(!1),onExited:()=>d(!0),timeout:{enter:0,exit:300},classNames:{enter:"opacity-0",enterDone:"opacity-1 transition ease-in",exit:"opacity-0 transition ease-out"},children:(0,a.jsx)("div",{className:r(Jf)("fixed z-[100] inset-0 bg-underlay flex justify-center inter",p?"items-center":"items-end h-full"),...c,children:(0,a.jsx)($v,{in:n.isOpen,appear:!0,nodeRef:i,timeout:{enter:0,exit:300},classNames:{appear:p?"translate-y-[200%]":"translate-y-full",appearDone:"translate-y-0 transition duration-300 ease-out",exit:r(Jf)("transition ease-out",p?"translate-y-[200%]":"translate-y-full")},children:(0,a.jsx)("div",{...s,ref:i,className:r(Jf)("bg-white z-[1] overflow-auto focus:outline-none",p?"translate-y-[200%] rounded-[15px]":"translate-y-full rounded-t-[15px]"),style:{maxHeight:`${u}px`},children:t})})})})})}const Lb=()=>(0,a.jsx)("svg",{width:"18",height:"19",viewBox:"0 0 18 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M7.5 14a.75.75 0 0 0 .75-.75v-4.5a.75.75 0 0 0-1.5 0v4.5a.75.75 0 0 0 .75.75ZM15 5h-3v-.75A2.25 2.25 0 0 0 9.75 2h-1.5A2.25 2.25 0 0 0 6 4.25V5H3a.75.75 0 0 0 0 1.5h.75v8.25A2.25 2.25 0 0 0 6 17h6a2.25 2.25 0 0 0 2.25-2.25V6.5H15A.75.75 0 1 0 15 5Zm-7.5-.75a.75.75 0 0 1 .75-.75h1.5a.75.75 0 0 1 .75.75V5h-3v-.75Zm5.25 10.5a.75.75 0 0 1-.75.75H6a.75.75 0 0 1-.75-.75V6.5h7.5v8.25ZM10.5 14a.75.75 0 0 0 .75-.75v-4.5a.75.75 0 1 0-1.5 0v4.5a.75.75 0 0 0 .75.75Z",fill:"#fff"})}),Db=({asset:e,state:t})=>(0,a.jsx)(Kv,{state:t,children:(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center w-screen h-screen p-[15px] gap-[10px]",children:["photo"===e.type&&(0,a.jsx)("img",{src:e.objectUrl,alt:`Asset-${e.assetId}`,className:"flex-1 object-cover rounded-[10px] max-h-[90%] max-w-[90%] mb-[9px]"}),"video"===e.type&&(0,a.jsx)("video",{src:e.objectUrl,playsInline:!0,autoPlay:!0,controls:!0,className:"flex-1 rounded-[10px] min-w-full max-h-[90%] max-w-[90%] pb-[9px]"}),(0,a.jsx)(iv,{onPress:t.close,variant:"tertiary",size:"large",className:"w-[135px]",children:"Close"})]})}),Ib=({asset:e,index:t,removeAsset:r})=>{const{t:n}=Fi(),i=Qf({}),o=Qf({});return(0,a.jsxs)("div",{className:"flex flex-row justify-between items-center ",children:[(0,a.jsx)(Gv,{title:n("recorder.confirmRemovalTitle"),state:i,description:n("recorder.confirmRemovalDescription"),primaryAction:({close:t})=>(0,a.jsxs)(iv,{fullWidth:!0,variant:"blue",onPress:async()=>{await(r?.(e)),t()},children:[(0,a.jsx)(Lb,{}),n("misc.confirm")]}),secondaryAction:({close:e})=>(0,a.jsx)(iv,{fullWidth:!0,variant:"tertiary",children:n("misc.cancel")})}),(0,a.jsxs)("div",{className:"flex flex-row gap-[10px] items-center justify-between",children:[(0,a.jsx)(Db,{state:o,asset:e}),(0,a.jsx)(nv,{asset:e,onClick:o.open}),(0,a.jsxs)("span",{className:"text-sm",style:{hyphens:"manual"},children:["photo"===e.type?n("misc.photo"):n("misc.video")," ",t+1," ·"," ",Cb(new Date(e.timestamp))]})]}),r&&(0,a.jsx)("span",{className:"text-xs font-bold underline cursor-pointer ml-[10px]",onClick:i.open,children:n("misc.remove")})]},e.assetId)};je=o("85Hg2");
2076
2163
  /*! *****************************************************************************
2077
2164
  Copyright (c) Microsoft Corporation. All rights reserved.
2078
2165
  Licensed under the Apache License, Version 2.0 (the "License"); you may not use
@@ -2086,7 +2173,7 @@ MERCHANTABLITY OR NON-INFRINGEMENT.
2086
2173
 
2087
2174
  See the Apache Version 2.0 License for specific language governing permissions
2088
2175
  and limitations under the License.
2089
- ***************************************************************************** */var _b=function(){return _b=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},_b.apply(this,arguments)};var kb=function(e){var t=e.animate,r=e.animateBegin,n=e.backgroundColor,i=e.backgroundOpacity,o=e.baseUrl,a=e.children,s=e.foregroundColor,c=e.foregroundOpacity,l=e.gradientRatio,d=e.gradientDirection,u=e.uniqueKey,p=e.interval,h=e.rtl,f=e.speed,m=e.style,g=e.title,v=e.beforeMask,y=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}(e,["animate","animateBegin","backgroundColor","backgroundOpacity","baseUrl","children","foregroundColor","foregroundOpacity","gradientRatio","gradientDirection","uniqueKey","interval","rtl","speed","style","title","beforeMask"]),b=u||Math.random().toString(36).substring(6),w=b+"-diff",x=b+"-animated-diff",S=b+"-aria",_=h?{transform:"scaleX(-1)"}:null,k="0; "+p+"; 1",C=f+"s",E="top-bottom"===d?"rotate(90)":void 0;return(0,je.createElement)("svg",_b({"aria-labelledby":S,role:"img",style:_b(_b({},m),_)},y),g?(0,je.createElement)("title",{id:S},g):null,v&&(0,je.isValidElement)(v)?v:null,(0,je.createElement)("rect",{role:"presentation",x:"0",y:"0",width:"100%",height:"100%",clipPath:"url("+o+"#"+w+")",style:{fill:"url("+o+"#"+x+")"}}),(0,je.createElement)("defs",null,(0,je.createElement)("clipPath",{id:w},a),(0,je.createElement)("linearGradient",{id:x,gradientTransform:E},(0,je.createElement)("stop",{offset:"0%",stopColor:n,stopOpacity:i},t&&(0,je.createElement)("animate",{attributeName:"offset",values:-l+"; "+-l+"; 1",keyTimes:k,dur:C,repeatCount:"indefinite",begin:r})),(0,je.createElement)("stop",{offset:"50%",stopColor:s,stopOpacity:c},t&&(0,je.createElement)("animate",{attributeName:"offset",values:-l/2+"; "+-l/2+"; "+(1+l/2),keyTimes:k,dur:C,repeatCount:"indefinite",begin:r})),(0,je.createElement)("stop",{offset:"100%",stopColor:n,stopOpacity:i},t&&(0,je.createElement)("animate",{attributeName:"offset",values:"0; 0; "+(1+l),keyTimes:k,dur:C,repeatCount:"indefinite",begin:r})))))};kb.defaultProps={animate:!0,backgroundColor:"#f5f6f7",backgroundOpacity:1,baseUrl:"",foregroundColor:"#eee",foregroundOpacity:1,gradientRatio:2,gradientDirection:"left-right",id:null,interval:.25,rtl:!1,speed:1.2,style:{},title:"Loading...",beforeMask:null};var Cb=function(e){return e.children?(0,je.createElement)(kb,_b({},e)):(0,je.createElement)(Eb,_b({},e))},Eb=function(e){return(0,je.createElement)(Cb,_b({viewBox:"0 0 476 124"},e),(0,je.createElement)("rect",{x:"48",y:"8",width:"88",height:"6",rx:"3"}),(0,je.createElement)("rect",{x:"48",y:"26",width:"52",height:"6",rx:"3"}),(0,je.createElement)("rect",{x:"0",y:"56",width:"410",height:"6",rx:"3"}),(0,je.createElement)("rect",{x:"0",y:"72",width:"380",height:"6",rx:"3"}),(0,je.createElement)("rect",{x:"0",y:"88",width:"178",height:"6",rx:"3"}),(0,je.createElement)("circle",{cx:"20",cy:"20",r:"20"}))},Pb=Cb;const Rb=()=>(0,a.jsxs)("div",{className:"w-screen max-w-[400px] h-[235px] px-[20px] py-[25px] gap-[10px]",children:[(0,a.jsx)("div",{className:"w-[360px] h-[93px]",children:(0,a.jsxs)(Pb,{width:360,height:93,foregroundColor:"#C7DEFF",children:[(0,a.jsx)("rect",{x:0,y:0,rx:8,ry:8,width:230,height:16}),(0,a.jsx)("rect",{x:0,y:33,rx:8,ry:8,width:60,height:60}),(0,a.jsx)("rect",{x:70,y:56,rx:7,ry:7,width:180,height:14})]})}),(0,a.jsx)("div",{className:"flex items-center justify-center w-full h-[40px] rounded-[8px] bg-[#F7F7F7] mt-[10px]",children:(0,a.jsx)(Pb,{width:120,height:14,foregroundColor:"#C7DEFF",children:(0,a.jsx)("rect",{x:0,y:0,rx:7,ry:7,width:120,height:14})})}),(0,a.jsx)("div",{className:"flex items-center justify-center w-full h-[40px] rounded-[8px] bg-[#C7DEFF] mt-[10px]",children:(0,a.jsx)(Pb,{width:120,height:14,foregroundColor:"#C7DEFF",children:(0,a.jsx)("rect",{x:0,y:0,rx:7,ry:7,width:120,height:14})})})]}),Tb=({assets:e,state:t,onSendAssets:n,removeAsset:i,loading:o,recorderState:s})=>{const{t:c}=Fi(),{orientation:l}=(0,je.useContext)(Ya),[d]=(0,je.useState)("landscape"===l),u=s.mode,p=c("photo"===u?"misc.photo":"misc.video");return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(Lv,{in:t.isOpen,timeout:{enter:0,exit:300},classNames:{enter:"opacity-0",enterDone:"opacity-90 transition ease-in",exit:"opacity-0 transition ease-out"},children:(0,a.jsxs)("div",{className:r(zf)("fixed justify-center w-screen h-screen top-0 left-0 bg-black z-[1]",t.isOpen?"flex":"hidden"),children:[o&&(0,a.jsxs)("div",{className:r(zf)("flex mt-[50px] h-fit opacity-1",d?"flex-row items-center w-[450px]":"flex-col items-center text-center w-[320px]"),children:[(0,a.jsx)("div",{className:"w-[24px] h-[24px] m-[10px]",children:(0,a.jsx)(Wl,{})}),(0,a.jsxs)("span",{className:"text-sm text-white",children:[c("recorder.elementBeingProcessed",{type:p.toLocaleLowerCase()})," ","video"===u&&c("recorder.waitVideo")]})]}),(0,a.jsx)(bb,{state:{...t,close:o?()=>{}:t.close},children:o?(0,a.jsx)(Rb,{}):(0,a.jsxs)("div",{className:"flex flex-col max-w-[400px] text-primary",children:[(0,a.jsxs)("div",{className:"flex flex-row justify-between p-[12px]",children:[(0,a.jsx)("h1",{className:"text-lg first-letter:capitalize",children:c("recorder.elementCaptureSuccess",{type:p})}),(0,a.jsx)("div",{className:"flex justify-center items-center rounded-full bg-[#f3f3f3] h-[30px] w-[30px] cursor-pointer",onClick:t.close,children:(0,a.jsx)(Uc,{color:"#565656"})})]}),(0,a.jsxs)("div",{className:"flex flex-col px-[20px] pb-[25px] gap-[10px]",children:[e.map(((e,t)=>(0,a.jsx)(Sb,{asset:e,index:t,removeAsset:i},e.assetId))),(0,a.jsx)(Wg,{variant:"tertiary",onPress:t.close,children:c("recorder.takeNewElement",{type:p.toLocaleLowerCase()})}),(0,a.jsx)(Wg,{variant:"blue",onPress:()=>{n(),t.close()},children:e.length>1?c("recorder.sendElements",{count:e.length}):c("recorder.sendElement",{type:p.toLocaleLowerCase()})})]})]})})]})})})},jb=({state:e,assets:t})=>{const{t:r}=Fi();return(0,a.jsxs)(Iv,{title:r("recorder.submissionTitle"),state:e,isDismissable:!1,children:[(0,a.jsx)("span",{className:"text-base text-primaryLight",children:r("recorder.submissionDescription")}),(0,a.jsx)("div",{className:"flex flex-col gap-[20px] border-t border-secondaryVLight pt-[20px]",children:t.map(((e,t)=>(0,a.jsx)(Sb,{asset:e,index:t,removeAsset:void 0},e.assetId)))})]})},Ob=()=>{const{options:e}=(0,je.useContext)(Ya),t=Nf({}),r=Nf({}),[n,i]=(0,je.useState)(void 0),o=Ff({mode:e?.recorder?.defaultMode||"photo",requestedMedia:e?.recorder?.defaultMedia||"camera",permissionBlockedModalState:r,captureThumbnail:async e=>{let t=await Qa.captureVideo(void 0,{addPlayWatermark:!0}).catch(console.error);t||(t=await Qa.captureVideo(e,{addPlayWatermark:!0}));const{url:r}=await Qa.saveThumbnail(t);i(r)}}),s=(0,je.useCallback)((async e=>{if(!e.assetId)return;Qa.deleteCapture(e.assetId);const t=o.assets.filter((t=>t.assetId!==e.assetId));o.setAssets(t),t.length<1&&o.assetsPopupState.close()}),[o]),c=(0,je.useCallback)((()=>{o.setStreaming(!1),o.setStartRecordTime(void 0)}),[o]),l=(0,je.useCallback)((e=>{const{url:t,assetId:r}=e.detail;c(),o.setAssetLoading(!1),o.setAssets([...o.assets,{type:"video",timestamp:Date.now(),objectUrl:t,assetId:r,thumbnailURL:n}])}),[c,o,n]);return(0,je.useEffect)((()=>(Qa.addEventListener("recordStopped",l),()=>{Qa.removeEventListener("recordStopped",l)})),[l]),(0,a.jsxs)("div",{className:"w-full h-full ",children:[(0,a.jsx)(yb,{state:r}),"camera"===o.requestedMedia&&(0,a.jsx)(fb,{recorderState:o}),"screen"===o.requestedMedia&&(0,a.jsx)(vb,{recorderState:o}),(0,a.jsx)(Tb,{assets:o.assets,state:o.assetsPopupState,onSendAssets:()=>{Qa.release(),t.open()},removeAsset:s,loading:o.assetLoading,recorderState:o}),(0,a.jsx)(jb,{state:t,assets:o.assets})]})},Mb=yr.div`
2176
+ ***************************************************************************** */var Ab=function(){return Ab=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Ab.apply(this,arguments)};var Nb=function(e){var t=e.animate,r=e.animateBegin,n=e.backgroundColor,i=e.backgroundOpacity,o=e.baseUrl,a=e.children,s=e.foregroundColor,c=e.foregroundOpacity,l=e.gradientRatio,d=e.gradientDirection,u=e.uniqueKey,p=e.interval,h=e.rtl,f=e.speed,m=e.style,g=e.title,v=e.beforeMask,y=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}(e,["animate","animateBegin","backgroundColor","backgroundOpacity","baseUrl","children","foregroundColor","foregroundOpacity","gradientRatio","gradientDirection","uniqueKey","interval","rtl","speed","style","title","beforeMask"]),b=u||Math.random().toString(36).substring(6),w=b+"-diff",x=b+"-animated-diff",S=b+"-aria",_=h?{transform:"scaleX(-1)"}:null,k="0; "+p+"; 1",C=f+"s",E="top-bottom"===d?"rotate(90)":void 0;return(0,je.createElement)("svg",Ab({"aria-labelledby":S,role:"img",style:Ab(Ab({},m),_)},y),g?(0,je.createElement)("title",{id:S},g):null,v&&(0,je.isValidElement)(v)?v:null,(0,je.createElement)("rect",{role:"presentation",x:"0",y:"0",width:"100%",height:"100%",clipPath:"url("+o+"#"+w+")",style:{fill:"url("+o+"#"+x+")"}}),(0,je.createElement)("defs",null,(0,je.createElement)("clipPath",{id:w},a),(0,je.createElement)("linearGradient",{id:x,gradientTransform:E},(0,je.createElement)("stop",{offset:"0%",stopColor:n,stopOpacity:i},t&&(0,je.createElement)("animate",{attributeName:"offset",values:-l+"; "+-l+"; 1",keyTimes:k,dur:C,repeatCount:"indefinite",begin:r})),(0,je.createElement)("stop",{offset:"50%",stopColor:s,stopOpacity:c},t&&(0,je.createElement)("animate",{attributeName:"offset",values:-l/2+"; "+-l/2+"; "+(1+l/2),keyTimes:k,dur:C,repeatCount:"indefinite",begin:r})),(0,je.createElement)("stop",{offset:"100%",stopColor:n,stopOpacity:i},t&&(0,je.createElement)("animate",{attributeName:"offset",values:"0; 0; "+(1+l),keyTimes:k,dur:C,repeatCount:"indefinite",begin:r})))))};Nb.defaultProps={animate:!0,backgroundColor:"#f5f6f7",backgroundOpacity:1,baseUrl:"",foregroundColor:"#eee",foregroundOpacity:1,gradientRatio:2,gradientDirection:"left-right",id:null,interval:.25,rtl:!1,speed:1.2,style:{},title:"Loading...",beforeMask:null};var Fb=function(e){return e.children?(0,je.createElement)(Nb,Ab({},e)):(0,je.createElement)(zb,Ab({},e))},zb=function(e){return(0,je.createElement)(Fb,Ab({viewBox:"0 0 476 124"},e),(0,je.createElement)("rect",{x:"48",y:"8",width:"88",height:"6",rx:"3"}),(0,je.createElement)("rect",{x:"48",y:"26",width:"52",height:"6",rx:"3"}),(0,je.createElement)("rect",{x:"0",y:"56",width:"410",height:"6",rx:"3"}),(0,je.createElement)("rect",{x:"0",y:"72",width:"380",height:"6",rx:"3"}),(0,je.createElement)("rect",{x:"0",y:"88",width:"178",height:"6",rx:"3"}),(0,je.createElement)("circle",{cx:"20",cy:"20",r:"20"}))},Bb=Fb;const Ub=()=>(0,a.jsxs)("div",{className:"w-screen max-w-[400px] h-[235px] px-[20px] py-[25px] gap-[10px]",children:[(0,a.jsx)("div",{className:"w-[360px] h-[93px]",children:(0,a.jsxs)(Bb,{width:360,height:93,foregroundColor:"#C7DEFF",children:[(0,a.jsx)("rect",{x:0,y:0,rx:8,ry:8,width:230,height:16}),(0,a.jsx)("rect",{x:0,y:33,rx:8,ry:8,width:60,height:60}),(0,a.jsx)("rect",{x:70,y:56,rx:7,ry:7,width:180,height:14})]})}),(0,a.jsx)("div",{className:"flex items-center justify-center w-full h-[40px] rounded-[8px] bg-[#F7F7F7] mt-[10px]",children:(0,a.jsx)(Bb,{width:120,height:14,foregroundColor:"#C7DEFF",children:(0,a.jsx)("rect",{x:0,y:0,rx:7,ry:7,width:120,height:14})})}),(0,a.jsx)("div",{className:"flex items-center justify-center w-full h-[40px] rounded-[8px] bg-[#C7DEFF] mt-[10px]",children:(0,a.jsx)(Bb,{width:120,height:14,foregroundColor:"#C7DEFF",children:(0,a.jsx)("rect",{x:0,y:0,rx:7,ry:7,width:120,height:14})})})]}),Vb=({assets:e,state:t,onSendAssets:n,removeAsset:i,loading:o,recorderState:s})=>{const{t:c}=Fi(),{orientation:l}=(0,je.useContext)(Ya),[d]=(0,je.useState)("landscape"===l),u=s.mode,p=c("photo"===u?"misc.photo":"misc.video");return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)($v,{in:t.isOpen,timeout:{enter:0,exit:300},classNames:{enter:"opacity-0",enterDone:"opacity-90 transition ease-in",exit:"opacity-0 transition ease-out"},children:(0,a.jsxs)("div",{className:r(Jf)("fixed justify-center w-screen h-screen top-0 left-0 bg-black z-[1]",t.isOpen?"flex":"hidden"),children:[o&&(0,a.jsxs)("div",{className:r(Jf)("flex mt-[50px] h-fit opacity-1",d?"flex-row items-center w-[450px]":"flex-col items-center text-center w-[320px]"),children:[(0,a.jsx)("div",{className:"w-[24px] h-[24px] m-[10px]",children:(0,a.jsx)(rc,{})}),(0,a.jsxs)("span",{className:"text-sm text-white",children:[c("recorder.elementBeingProcessed",{type:p.toLocaleLowerCase()})," ","video"===u&&c("recorder.waitVideo")]})]}),(0,a.jsx)(Mb,{state:{...t,close:o?()=>{}:t.close},children:o?(0,a.jsx)(Ub,{}):(0,a.jsxs)("div",{className:"flex flex-col max-w-[400px] text-primary",children:[(0,a.jsxs)("div",{className:"flex flex-row justify-between p-[12px]",children:[(0,a.jsx)("h1",{className:"text-lg first-letter:capitalize",children:c("recorder.elementCaptureSuccess",{type:p})}),(0,a.jsx)("div",{className:"flex justify-center items-center rounded-full bg-[#f3f3f3] h-[30px] w-[30px] cursor-pointer",onClick:t.close,children:(0,a.jsx)(Us,{color:"#565656"})})]}),(0,a.jsxs)("div",{className:"flex flex-col px-[20px] pb-[25px] gap-[10px]",children:[e.map(((e,t)=>(0,a.jsx)(Ib,{asset:e,index:t,removeAsset:i},e.assetId))),(0,a.jsx)(iv,{variant:"tertiary",onPress:t.close,children:c("recorder.takeNewElement",{type:p.toLocaleLowerCase()})}),(0,a.jsx)(iv,{variant:"blue",onPress:()=>{n(),t.close()},children:e.length>1?c("recorder.sendElements",{count:e.length}):c("recorder.sendElement",{type:p.toLocaleLowerCase()})})]})]})})]})})})},Hb=({state:e,assets:t})=>{const{t:r}=Fi();return(0,a.jsxs)(Gv,{title:r("recorder.submissionTitle"),state:e,isDismissable:!1,children:[(0,a.jsx)("span",{className:"text-base text-primaryLight",children:r("recorder.submissionDescription")}),(0,a.jsx)("div",{className:"flex flex-col gap-[20px] border-t border-secondaryVLight pt-[20px]",children:t.map(((e,t)=>(0,a.jsx)(Ib,{asset:e,index:t,removeAsset:void 0},e.assetId)))})]})},qb=()=>{const{options:e}=(0,je.useContext)(Ya),t=Qf({}),r=Qf({}),[n,i]=(0,je.useState)(void 0),o=Yf({mode:e?.recorder?.defaultMode||"photo",requestedMedia:e?.recorder?.defaultMedia||"camera",permissionBlockedModalState:r,captureThumbnail:async e=>{let t=await Qa.captureVideo(void 0,{addPlayWatermark:!0}).catch(console.error);t||(t=await Qa.captureVideo(e,{addPlayWatermark:!0}));const{url:r}=await Qa.saveThumbnail(t);i(r)}}),s=(0,je.useCallback)((async e=>{if(!e.assetId)return;Qa.deleteCapture(e.assetId);const t=o.assets.filter((t=>t.assetId!==e.assetId));o.setAssets(t),t.length<1&&o.assetsPopupState.close()}),[o]),c=(0,je.useCallback)((()=>{o.setStreaming(!1),o.setStartRecordTime(void 0)}),[o]),l=(0,je.useCallback)((e=>{const{url:t,assetId:r}=e.detail;c(),o.setAssetLoading(!1),o.setAssets([...o.assets,{type:"video",timestamp:Date.now(),objectUrl:t,assetId:r,thumbnailURL:n}])}),[c,o,n]);return(0,je.useEffect)((()=>(Qa.addEventListener("recordStopped",l),()=>{Qa.removeEventListener("recordStopped",l)})),[l]),(0,a.jsxs)("div",{className:"w-full h-full antialiased",children:[(0,a.jsx)(Ob,{state:r}),"camera"===o.requestedMedia&&(0,a.jsx)(Pb,{recorderState:o}),"screen"===o.requestedMedia&&(0,a.jsx)(jb,{recorderState:o}),(0,a.jsx)(Vb,{assets:o.assets,state:o.assetsPopupState,onSendAssets:()=>{Qa.release(),t.open()},removeAsset:s,loading:o.assetLoading,recorderState:o}),(0,a.jsx)(Hb,{state:t,assets:o.assets})]})},Wb=yr.div`
2090
2177
  border: 2px solid #ffffff;
2091
2178
  border-top: 2px solid #000000;
2092
2179
  border-radius: 50%;
@@ -2101,7 +2188,7 @@ and limitations under the License.
2101
2188
  transform: rotate(360deg);
2102
2189
  }
2103
2190
  }
2104
- `,Lb=yr.div`
2191
+ `,$b=yr.div`
2105
2192
  position: absolute;
2106
2193
  background-color: #000000;
2107
2194
  opacity: 0.9;
@@ -2114,7 +2201,7 @@ and limitations under the License.
2114
2201
  bottom: 0px;
2115
2202
  left: 0px;
2116
2203
  gap: 0.25rem;
2117
- `,Db=yr.div`
2204
+ `,Kb=yr.div`
2118
2205
  display: flex;
2119
2206
  gap: 25px;
2120
2207
  width: 100%;
@@ -2123,12 +2210,12 @@ and limitations under the License.
2123
2210
  justify-content: center;
2124
2211
  align-items: center;
2125
2212
  vertical-align: middle;
2126
- `,Ib=yr.h2`
2213
+ `,Gb=yr.h2`
2127
2214
  color: #ffffff;
2128
2215
  font-weight: 500;
2129
2216
  font-size: 14px;
2130
2217
  font-family: 'Lato';
2131
- `,Ab=()=>{const{t:e}=Fi();return(0,a.jsx)(Lb,{children:(0,a.jsxs)(Db,{children:[(0,a.jsx)(Mb,{}),(0,a.jsx)(Ib,{children:e("loader.connection")})]})})},Nb=(()=>{try{const e=localStorage.getItem("stream_ui_theme");return e||"dark"}catch(e){return console.warn(e),"dark"}})(),Fb=wi(),zb=new Gy;let Bb=-1;var Ub=({options:e})=>{const[t,n]=(0,je.useState)(void 0),i=(0,je.useRef)(null),o=(0,je.useRef)(null),s=(0,je.useRef)(null),[c,l]=(0,je.useState)(e.recorder?.enabled?"recorder":"loading"),[d,u]=(0,je.useState)(!1),[p,f]=(0,je.useState)(!1),[m,g]=(0,je.useState)(!1),[y,b]=(0,je.useState)(!1),[w,x]=(0,je.useState)(!1),[S,_]=(0,je.useState)(Nb),[k,C]=(0,je.useState)(e.language||Fb),[E,P]=(0,je.useState)({}),[R,T]=(0,je.useState)(!0),[j,O]=(0,je.useState)(!1),[M,L]=(0,je.useState)(!1),[D,I]=(0,je.useState)(!1),[A,N]=(0,je.useState)(!1),[F,z]=Bs(i.current),[B,U]=(0,je.useState)(!1),[V,H]=(0,je.useState)(!1),[q,W]=(0,je.useState)([]),[$,K]=(0,je.useState)(void 0),G=(F||window.screen.width)>(z||window.screen.height)?"landscape":"portrait",Z="dark"===S?xf:wf,Q=e=>{"localVideoAvailable"===e.type?O(!0):O(!1)},Y=e=>{"screenshareEnabled"===e.type?L(!0):L(!1)},J=e=>{"microphoneMute"===e.type?T(!0):T(!1)},X=e=>{const t=e.detail.label;Ir(`Connected to ${t}`,{duration:3e3,icon:(0,a.jsx)(Hs,{}),messageStyle:{fontWeight:600}})},ee=e=>{const{profile:t}=e.detail;P(t)},te=()=>{Mf(),l("ended"),T(!0),O(!1),L(!1),N(!1)},re=()=>{Mf(),l("terminated")},ne=()=>{l("expired")},ie=e=>{const{success:t,email:n}=e.detail;t?(I(!0),n&&h.identify(null,{email:n})):r(v)("An error occured while trying to join the room as an agent",{className:"error"})},oe=e=>{const t=Date.now();"USERLIMIT"!==e.detail.code?-1!==Bb&&Bb+2e4>t||(Bb=t,Ir(`A critical error has occurred (error ${e.detail.code}).`,{icon:Ll,button:{text:"Reload",action:()=>{window.location.reload()}},duration:2e4})):l("full")};return(0,je.useEffect)((()=>{try{localStorage.setItem("stream_ui_theme",S)}catch(e){console.warn(e)}}),[S]),(0,je.useEffect)((()=>{try{localStorage.setItem("stream_ui_language",k),Si.changeLanguage(k)}catch(e){console.warn(e)}}),[k]),(0,je.useEffect)((()=>(Qa.addEventListener("localVideoAvailable",Q),Qa.addEventListener("localVideoUnavailable",Q),Qa.addEventListener("screenshareEnabled",Y),Qa.addEventListener("screenshareDisabled",Y),Qa.addEventListener("microphoneEnabled",J),Qa.addEventListener("microphoneMute",J),Qa.addEventListener("microphoneUnmute",J),Qa.addEventListener("defaultAudioDeviceChange",X),Qa.addEventListener("selfProfileUpdate",ee),Qa.addEventListener("terminateRoom",re),Qa.addEventListener("leaveRoom",te),Qa.addEventListener("invalidRoom",ne),Qa.addEventListener("agentIdentity",ie),Qa.addEventListener("criticalError",oe),()=>{Qa.removeEventListener("localVideoAvailable",Q),Qa.removeEventListener("localVideoUnavailable",Q),Qa.removeEventListener("screenshareEnabled",Y),Qa.removeEventListener("screenshareDisabled",Y),Qa.removeEventListener("microphoneEnabled",J),Qa.removeEventListener("microphoneMute",J),Qa.removeEventListener("microphoneUnmute",J),Qa.removeEventListener("defaultAudioDeviceChange",X),Qa.removeEventListener("selfProfileUpdate",ee),Qa.removeEventListener("terminateRoom",re),Qa.removeEventListener("leaveRoom",te),Qa.removeEventListener("invalidRoom",ne),Qa.removeEventListener("agentIdentity",ie),Qa.removeEventListener("criticalError",oe)})),[]),(0,je.useEffect)((()=>{const t=async t=>{const r=t.detail.peerId;if(K(t.detail.plan),W(t.detail.permissions),console.log(t.detail.permissions),n(r),!e.recorder?.enabled)try{await Lf(e),N(!0)}catch(e){U(!0),console.error("User interaction trigger failed",e)}finally{l("streaming")}};return Qa.addEventListener("enterRoom",t),()=>{Qa.removeEventListener("enterRoom",t)}}),[e]),(0,a.jsx)(tb,{client:zb,children:(0,a.jsx)(Ya.Provider,{value:{plan:$,permissions:q,selfPeerId:t,streamUIContainerRef:i,videosContainerRef:o,remoteTilesContainerRef:s,streamState:c,setStreamState:l,isQuickConnectPopupVisible:d,setIsQuickConnectPopupVisible:u,isSettingsMenuVisible:p,setIsSettingsMenuVisible:f,isYoutubePopupVisible:m,setIsYoutubePopupVisible:g,isLinksharePopupVisible:y,setIsLinksharePopupVisible:b,isVirtualBackgroundPopupVisible:w,setIsVirtualBackgroundPopupVisible:x,isBlockedFeaturePopupOpen:V,setBlockedFeaturePopupOpen:H,theme:S,setTheme:_,language:k,setLanguage:C,options:e,profile:E,muted:R,streaming:j,screensharing:M,isAgent:D,userInteractionTriggered:A,orientation:G},children:(0,a.jsxs)(ur,{theme:Z,children:[(0,a.jsx)(Df,{}),(0,a.jsx)(Sf,{}),(0,a.jsxs)(If,{ref:i,children:["loading"===c&&(0,a.jsx)(Ab,{}),(0,a.jsx)(bf,{}),(0,a.jsx)(pf,{}),B&&(0,a.jsx)(Rf,{close:()=>{N(!0),U(!1)}}),"recorder"===c&&(0,a.jsx)(Ob,{}),("streaming"===c||"loading"===c)&&(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)(ns,{children:[(0,a.jsx)(zs,{}),(0,a.jsx)(zl,{}),(0,a.jsx)(ud,{}),(0,a.jsx)(Xh,{})]})}),("ended"===c||"terminated"===c||"full"===c||"expired"===c)&&(0,a.jsx)(af,{})]})]})})})};window.hj=window.hj||function(){(hj.q=hj.q||[]).push(arguments)};je=o("85Hg2");var Vb=()=>(0,a.jsx)("svg",{width:"72",height:"72",viewBox:"0 0 72 72",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsxs)("g",{clipPath:"url(#greetingSnapcallLogo)",children:[(0,a.jsx)("path",{d:"M0 36C0 6.354 6.354 0 36 0s36 6.354 36 36-6.354 36-36 36S0 65.646 0 36Z",fill:"#000"}),(0,a.jsx)("path",{d:"M36.225 57.428c2.367 0 4.35-1.964 3.62-4.215a13.38 13.38 0 0 0-3.133-5.203c-2.432-2.498-5.73-3.902-9.17-3.902-3.44 0-6.74 1.404-9.172 3.902a13.381 13.381 0 0 0-3.132 5.203c-.731 2.25 1.252 4.215 3.62 4.215h17.367ZM35.775 14.572c-2.367 0-4.35 1.965-3.62 4.216a13.381 13.381 0 0 0 3.133 5.203c2.432 2.498 5.73 3.901 9.17 3.901 3.44 0 6.74-1.403 9.172-3.901a13.375 13.375 0 0 0 3.132-5.203c.731-2.252-1.252-4.216-3.62-4.216H35.776ZM44.459 53.143c0 2.367 1.971 4.352 4.204 3.566a12.924 12.924 0 0 0 4.967-3.182c2.432-2.498 3.799-5.886 3.799-9.419 0-3.533-1.367-6.921-3.8-9.42a12.923 12.923 0 0 0-4.966-3.181c-2.233-.786-4.204 1.2-4.204 3.566v18.07ZM27.541 18.857c0-2.367-1.971-4.352-4.204-3.566a12.923 12.923 0 0 0-4.967 3.182c-2.432 2.498-3.799 5.886-3.799 9.42 0 3.532 1.367 6.92 3.8 9.418a12.923 12.923 0 0 0 4.966 3.182c2.233.786 4.204-1.2 4.204-3.566v-18.07Z",fill:"#fff"})]})});const Hb=yr.div`
2218
+ `,Zb=()=>{const{t:e}=Fi();return(0,a.jsx)($b,{children:(0,a.jsxs)(Kb,{children:[(0,a.jsx)(Wb,{}),(0,a.jsx)(Gb,{children:e("loader.connection")})]})})},Qb=(()=>{try{const e=localStorage.getItem("stream_ui_theme");return e||"dark"}catch(e){return console.warn(e),"dark"}})(),Yb=wi(),Jb=new sb;let Xb=-1;var ew=({options:e})=>{const{t:t}=Fi(),[n,i]=(0,je.useState)(void 0),o=(0,je.useRef)(null),s=(0,je.useRef)(null),c=(0,je.useRef)(null),[l,d]=(0,je.useState)(e.recorder?.enabled?"recorder":"loading"),[u,p]=(0,je.useState)(!1),[f,m]=(0,je.useState)(!1),[g,y]=(0,je.useState)(!1),[b,w]=(0,je.useState)(!1),[x,S]=(0,je.useState)(!1),[_,k]=(0,je.useState)(Qb),[C,E]=(0,je.useState)(e.language||Yb),[P,R]=(0,je.useState)({}),[T,j]=(0,je.useState)(!0),[O,M]=(0,je.useState)(!1),[L,D]=(0,je.useState)(!1),[I,A]=(0,je.useState)(!0),[N,F]=(0,je.useState)(!1),[z,B]=Tc(o.current),[U,V]=(0,je.useState)(!1),[H,q]=(0,je.useState)(!1),[W,$]=(0,je.useState)({requested:!1,started:!1}),[K,G]=(0,je.useState)(!1),[Z,Q]=(0,je.useState)([]),[Y,J]=(0,je.useState)(void 0),X=(z||window.screen.width)>(B||window.screen.height)?"landscape":"portrait",ee="dark"===_?Df:Lf,te=e=>{"localVideoAvailable"===e.type?M(!0):M(!1)},re=e=>{"screenshareEnabled"===e.type?D(!0):D(!1)},ne=e=>{"microphoneMute"===e.type?j(!0):j(!1)},ie=()=>{$({requested:!0,started:!0})},oe=()=>{$({requested:!1,started:!1})},ae=(0,je.useCallback)((()=>{$({requested:!0,started:!1}),G(!0),Ir(t("notifications.recording"),{duration:1e4,icon:(0,a.jsx)(zs,{}),messageStyle:{fontWeight:600}})}),[t]),se=e=>{const t=e.detail.label;Ir(`Connected to ${t}`,{duration:3e3,icon:(0,a.jsx)(Mc,{}),messageStyle:{fontWeight:600}})},ce=e=>{const{profile:t}=e.detail;R(t)},le=()=>{Wf(),d("ended"),j(!0),M(!1),D(!1),F(!1)},de=()=>{Wf(),d("terminated")},ue=()=>{d("expired")},pe=e=>{const{success:t,email:n}=e.detail;t?(A(!0),n&&h.identify(null,{email:n})):r(v)("An error occured while trying to join the room as an agent",{className:"error"})},he=e=>{const t=Date.now();"USERLIMIT"!==e.detail.code?-1!==Xb&&Xb+2e4>t||(Xb=t,Ir(`A critical error has occurred (error ${e.detail.code}).`,{icon:hd,button:{text:"Reload",action:()=>{window.location.reload()}},duration:2e4})):d("full")};return(0,je.useEffect)((()=>{try{localStorage.setItem("stream_ui_theme",_)}catch(e){console.warn(e)}}),[_]),(0,je.useEffect)((()=>{try{localStorage.setItem("stream_ui_language",C),Si.changeLanguage(C)}catch(e){console.warn(e)}}),[C]),(0,je.useEffect)((()=>(Qa.addEventListener("localVideoAvailable",te),Qa.addEventListener("localVideoUnavailable",te),Qa.addEventListener("screenshareEnabled",re),Qa.addEventListener("screenshareDisabled",re),Qa.addEventListener("microphoneEnabled",ne),Qa.addEventListener("microphoneMute",ne),Qa.addEventListener("microphoneUnmute",ne),Qa.addEventListener("defaultAudioDeviceChange",se),Qa.addEventListener("selfProfileUpdate",ce),Qa.addEventListener("terminateRoom",de),Qa.addEventListener("leaveRoom",le),Qa.addEventListener("invalidRoom",ue),Qa.addEventListener("agentIdentity",pe),Qa.addEventListener("criticalError",he),Qa.addEventListener("videoRecordingStarted",ie),Qa.addEventListener("videoRecordingStopped",oe),Qa.addEventListener("videoRecordingRequested",ae),()=>{Qa.removeEventListener("localVideoAvailable",te),Qa.removeEventListener("localVideoUnavailable",te),Qa.removeEventListener("screenshareEnabled",re),Qa.removeEventListener("screenshareDisabled",re),Qa.removeEventListener("microphoneEnabled",ne),Qa.removeEventListener("microphoneMute",ne),Qa.removeEventListener("microphoneUnmute",ne),Qa.removeEventListener("defaultAudioDeviceChange",se),Qa.removeEventListener("selfProfileUpdate",ce),Qa.removeEventListener("terminateRoom",de),Qa.removeEventListener("leaveRoom",le),Qa.removeEventListener("invalidRoom",ue),Qa.removeEventListener("agentIdentity",pe),Qa.removeEventListener("criticalError",he),Qa.removeEventListener("videoRecordingStarted",ie),Qa.removeEventListener("videoRecordingStopped",oe),Qa.removeEventListener("videoRecordingRequested",ae)})),[ae]),(0,je.useEffect)((()=>{const r=async r=>{const n=r.detail.peerId;if(J(r.detail.plan),Q(r.detail.permissions),i(n),$(r.detail.videoRecording),r.detail.videoRecording.requested&&Ir(t("notifications.recording"),{duration:11e3,icon:(0,a.jsx)(zs,{}),messageStyle:{fontWeight:600}}),!e.recorder?.enabled)try{e.headless||await $f(e),F(!0)}catch(e){V(!0),console.error("User interaction trigger failed",e)}finally{d("streaming")}};return Qa.addEventListener("enterRoom",r),()=>{Qa.removeEventListener("enterRoom",r)}}),[e,t]),(0,a.jsx)(fb,{client:Jb,children:(0,a.jsx)(Ya.Provider,{value:{videoRecording:W,setVideoRecording:$,headless:Boolean(e.headless),plan:Y,permissions:Z,selfPeerId:n,streamUIContainerRef:o,videosContainerRef:s,remoteTilesContainerRef:c,streamState:l,setStreamState:d,isQuickConnectPopupVisible:u,setIsQuickConnectPopupVisible:p,isSettingsMenuVisible:f,setIsSettingsMenuVisible:m,isYoutubePopupVisible:g,setIsYoutubePopupVisible:y,isLinksharePopupVisible:b,setIsLinksharePopupVisible:w,isVirtualBackgroundPopupVisible:x,setIsVirtualBackgroundPopupVisible:S,isBlockedFeaturePopupOpen:H,setBlockedFeaturePopupOpen:q,isRecordingStartPopupOpen:K,setRecordingStartPopupOpen:G,theme:_,setTheme:k,language:C,setLanguage:E,options:e,profile:P,muted:T,streaming:O,screensharing:L,isAgent:I,userInteractionTriggered:N,orientation:X},children:(0,a.jsxs)(ur,{theme:ee,children:[(0,a.jsx)(Kf,{}),(0,a.jsx)(If,{}),(0,a.jsxs)(Gf,{ref:o,children:["loading"===l&&(0,a.jsx)(Zb,{}),(0,a.jsx)(Mf,{}),(0,a.jsx)(Cc,{}),U&&(0,a.jsx)(Uf,{close:()=>{F(!0),V(!1)}}),"recorder"===l&&(0,a.jsx)(qb,{}),("streaming"===l||"loading"===l)&&(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)(ns,{children:[(0,a.jsx)(Rc,{}),(0,a.jsx)(bd,{}),(0,a.jsx)(Ud,{}),(0,a.jsx)(bf,{})]})}),("ended"===l||"terminated"===l||"full"===l||"expired"===l)&&(0,a.jsx)(Cf,{})]})]})})})};window.hj=window.hj||function(){(hj.q=hj.q||[]).push(arguments)};je=o("85Hg2");var tw=()=>(0,a.jsx)("svg",{width:"72",height:"72",viewBox:"0 0 72 72",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsxs)("g",{clipPath:"url(#greetingSnapcallLogo)",children:[(0,a.jsx)("path",{d:"M0 36C0 6.354 6.354 0 36 0s36 6.354 36 36-6.354 36-36 36S0 65.646 0 36Z",fill:"#000"}),(0,a.jsx)("path",{d:"M36.225 57.428c2.367 0 4.35-1.964 3.62-4.215a13.38 13.38 0 0 0-3.133-5.203c-2.432-2.498-5.73-3.902-9.17-3.902-3.44 0-6.74 1.404-9.172 3.902a13.381 13.381 0 0 0-3.132 5.203c-.731 2.25 1.252 4.215 3.62 4.215h17.367ZM35.775 14.572c-2.367 0-4.35 1.965-3.62 4.216a13.381 13.381 0 0 0 3.133 5.203c2.432 2.498 5.73 3.901 9.17 3.901 3.44 0 6.74-1.403 9.172-3.901a13.375 13.375 0 0 0 3.132-5.203c.731-2.252-1.252-4.216-3.62-4.216H35.776ZM44.459 53.143c0 2.367 1.971 4.352 4.204 3.566a12.924 12.924 0 0 0 4.967-3.182c2.432-2.498 3.799-5.886 3.799-9.419 0-3.533-1.367-6.921-3.8-9.42a12.923 12.923 0 0 0-4.966-3.181c-2.233-.786-4.204 1.2-4.204 3.566v18.07ZM27.541 18.857c0-2.367-1.971-4.352-4.204-3.566a12.923 12.923 0 0 0-4.967 3.182c-2.432 2.498-3.799 5.886-3.799 9.42 0 3.532 1.367 6.92 3.8 9.418a12.923 12.923 0 0 0 4.966 3.182c2.233.786 4.204-1.2 4.204-3.566v-18.07Z",fill:"#fff"})]})});const rw=yr.div`
2132
2219
  height: 100%;
2133
2220
  display: flex;
2134
2221
  flex-direction: column;
@@ -2137,7 +2224,7 @@ and limitations under the License.
2137
2224
  padding-top: 76px;
2138
2225
  font-family: Lato;
2139
2226
  box-sizing: border-box;
2140
- `,qb=(yr.div`
2227
+ `,nw=(yr.div`
2141
2228
  display: flex;
2142
2229
  align-items: center;
2143
2230
  justify-content: center;
@@ -2156,32 +2243,32 @@ and limitations under the License.
2156
2243
  font-weight: 700;
2157
2244
  font-family: Gazpacho;
2158
2245
  text-align: center;
2159
- `),Wb=yr.div`
2246
+ `),iw=yr.div`
2160
2247
  display: flex;
2161
2248
  align-items: center;
2162
2249
  gap: 10px;
2163
- `,$b=yr.div`
2250
+ `,ow=yr.div`
2164
2251
  position: relative;
2165
2252
  width: 350px;
2166
2253
  height: 350px;
2167
2254
  display: flex;
2168
2255
  align-items: center;
2169
2256
  justify-content: center;
2170
- `,Kb=yr.video`
2257
+ `,aw=yr.video`
2171
2258
  width: 300px;
2172
2259
  height: 300px;
2173
2260
  background-color: black;
2174
2261
  border-radius: 15px;
2175
2262
  object-fit: cover;
2176
2263
  transform: scale(-1, 1);
2177
- `,Gb=yr.div`
2264
+ `,sw=yr.div`
2178
2265
  display: flex;
2179
2266
  position: absolute;
2180
2267
  top: 8px;
2181
2268
  left: 8px;
2182
2269
  gap: 8px;
2183
2270
  z-index: 15;
2184
- `,Zb=yr.div`
2271
+ `,cw=yr.div`
2185
2272
  display: flex;
2186
2273
  justify-content: center;
2187
2274
  align-items: center;
@@ -2190,7 +2277,7 @@ and limitations under the License.
2190
2277
  border-radius: 50%;
2191
2278
  background-color: rgba(28, 32, 36, 0.25);
2192
2279
  z-index: 2;
2193
- `,Qb=yr.div`
2280
+ `,lw=yr.div`
2194
2281
  position: absolute;
2195
2282
  width: 300px;
2196
2283
  height: 300px;
@@ -2200,7 +2287,7 @@ and limitations under the License.
2200
2287
  display: ${({webcamEnabled:e})=>e?"none":"flex"};
2201
2288
  align-items: center;
2202
2289
  justify-content: center;
2203
- `,Yb=yr.div`
2290
+ `,dw=yr.div`
2204
2291
  position: absolute;
2205
2292
  bottom: 45px;
2206
2293
  display: flex;
@@ -2208,7 +2295,7 @@ and limitations under the License.
2208
2295
  justify-content: center;
2209
2296
  gap: 13px;
2210
2297
  z-index: 2;
2211
- `,Jb=yr.button`
2298
+ `,uw=yr.button`
2212
2299
  display: flex;
2213
2300
  align-items: center;
2214
2301
  justify-content: center;
@@ -2236,7 +2323,7 @@ and limitations under the License.
2236
2323
  width: 24px;
2237
2324
  height: 24px;
2238
2325
  }
2239
- `,Xb=yr.div`
2326
+ `,pw=yr.div`
2240
2327
  display: flex;
2241
2328
  flex-direction: column;
2242
2329
  align-items: flex-start;
@@ -2245,17 +2332,17 @@ and limitations under the License.
2245
2332
  h3 {
2246
2333
  margin: 0;
2247
2334
  }
2248
- `,ew=yr.h3`
2335
+ `,hw=yr.h3`
2249
2336
  font-size: 20px;
2250
2337
  line-height: 24px;
2251
2338
  font-weight: 700;
2252
2339
  margin: 0;
2253
2340
  font-family: Gazpacho;
2254
- `,tw=yr.p`
2341
+ `,fw=yr.p`
2255
2342
  font-size: 16px;
2256
2343
  line-height: 22px;
2257
2344
  font-weight: 400;
2258
- `,rw=yr.input`
2345
+ `,mw=yr.input`
2259
2346
  width: 100%;
2260
2347
  border: 1px solid #c9c9ca;
2261
2348
  border-radius: 8px;
@@ -2264,7 +2351,7 @@ and limitations under the License.
2264
2351
  box-sizing: border-box;
2265
2352
  margin-top: 40px;
2266
2353
  font-size: 16px;
2267
- `,nw=yr.button`
2354
+ `,gw=yr.button`
2268
2355
  width: 100%;
2269
2356
  background-color: #1d1c20;
2270
2357
  color: white;
@@ -2278,7 +2365,7 @@ and limitations under the License.
2278
2365
  line-height: 19px;
2279
2366
  font-weight: 500;
2280
2367
  cursor: pointer;
2281
- `,iw=yr.footer`
2368
+ `,vw=yr.footer`
2282
2369
  display: flex;
2283
2370
  flex: 1;
2284
2371
  justify-content: flex-end;
@@ -2287,20 +2374,20 @@ and limitations under the License.
2287
2374
  align-items: center;
2288
2375
  text-align: center;
2289
2376
  width: 300px;
2290
- `,ow=yr.h5`
2377
+ `,yw=yr.h5`
2291
2378
  font-weight: 700;
2292
2379
  font-size: 16px;
2293
2380
  line-height: 19px;
2294
2381
  margin: 0;
2295
2382
  font-family: Gazpacho;
2296
- `,aw=yr.p`
2383
+ `,bw=yr.p`
2297
2384
  font-weight: 400;
2298
2385
  font-size: 12px;
2299
2386
  line-height: 14px;
2300
2387
  color: black;
2301
2388
  margin-bottom: 0;
2302
2389
  margin-top: 10px;
2303
- `,sw=yr.div`
2390
+ `,ww=yr.div`
2304
2391
  display: flex;
2305
2392
  flex-direction: column;
2306
2393
  align-items: center;
@@ -2308,4 +2395,4 @@ and limitations under the License.
2308
2395
  background-color: #fff;
2309
2396
  color: #1d1c20;
2310
2397
  height: 100%;
2311
- `;var cw=({onGreetingDone:e})=>{const{t:t}=Fi(),[r,{width:n,height:i}]=Vs(),o=(0,je.useRef)(null),s=(0,je.useRef)(null),[c,l]=(0,je.useState)(void 0),[d,u]=(0,je.useState)(!1),[p,h]=(0,je.useState)(!1),f=n>=i,m=async e=>{try{const t=await navigator.mediaDevices.getUserMedia(e),r=t.getVideoTracks()[0],n=t.getAudioTracks()[0];r&&l(r),n&&u(!0),n?.stop()}catch(e){console.error("Get User Media Failed: ",e)}},g=(0,je.useCallback)((async()=>{c?(c.stop(),l(void 0)):await m({video:!0})}),[c]),v=(0,je.useCallback)((async()=>{d?u(!1):await m({audio:!0})}),[d]);if((0,je.useEffect)((()=>{s.current&&(s.current.srcObject=c?new MediaStream([c]):null)}),[s,c,n,i]),(0,je.useEffect)((()=>{m({audio:!0,video:!0})}),[]),!0===p)return(0,a.jsx)(sw,{children:(0,a.jsx)("img",{src:"https://stream-assets.snapcall.io/animations/snapcall-logo-animation.gif",alt:"Snapcall logo animation",height:40})});const y=Boolean(c);return(0,a.jsxs)(Hb,{ref:r,children:[(0,a.jsx)(Df,{}),(0,a.jsx)(Vb,{}),(0,a.jsx)(qb,{children:t("greeting.mainTitle")}),(0,a.jsxs)(Wb,{children:[f&&(0,a.jsxs)($b,{children:[(0,a.jsx)(Kb,{webcamEnabled:y,ref:s,autoPlay:!0}),(0,a.jsxs)(Qb,{webcamEnabled:y,children:[(0,a.jsxs)(Gb,{children:[!d&&(0,a.jsx)(Zb,{children:(0,a.jsx)(Hs,{status:!d})}),!y&&(0,a.jsx)(Zb,{children:(0,a.jsx)(qs,{status:!y})})]}),(0,a.jsx)(Jb,{children:(0,a.jsx)(Js,{})})]}),(0,a.jsxs)(Yb,{children:[(0,a.jsx)(Jb,{onClick:v,danger:!d,children:(0,a.jsx)(Hs,{status:!d})}),(0,a.jsx)(Jb,{onClick:g,danger:!y,children:(0,a.jsx)(qs,{status:!y})})]})]}),(0,a.jsxs)(Xb,{children:[f&&(0,a.jsx)(ew,{children:t("greeting.sideTitle")}),(0,a.jsx)(tw,{children:t("greeting.sideDescription")}),(0,a.jsx)(rw,{ref:o,name:"displayName",type:"text",placeholder:t("greeting.namePlaceholder"),autoFocus:!0}),(0,a.jsx)(nw,{onClick:()=>{const t=o.current?.value,r=Boolean(c);c?.stop(),h(!0),setTimeout((()=>{e({cameraEnabled:r,micEnabled:d,displayName:t})}),4e3)},children:t("greeting.nameSubmit")})]})]}),(0,a.jsxs)(iw,{children:[(0,a.jsx)(ow,{children:t("greeting.footerTitle")}),(0,a.jsx)(aw,{children:t("greeting.footerDescription")})]})]})};const lw={recorder:{enabled:!1,defaultMode:"photo",defaultMedia:"camera"},sharedURL:window.location.href,showMenuButton:!0,settingsShortcuts:[{id:"pip",displayType:"icon"}],controls:{microphone:{available:!0,enabled:!0},camera:{available:!0,enabled:!1},screenshare:{available:!0}},streamApiURL:String("https://apistream.snapcall.io"),tracking:!1},dw={init:({element:e,...t})=>{if("boolean"==typeof t.recorder&&(t.recorder={enabled:t.recorder,defaultMode:"photo",defaultMedia:"camera"}),e?.nodeType!==window.Node.ELEMENT_NODE)throw new Error('The "element" property must be a valid element!');const n=m(lw,t),i=s(e);let o=null;o=(0,a.jsxs)(a.Fragment,{children:[t.recorder?.enabled&&(0,a.jsx)("style",{children:r('*,:before,:after{box-sizing:border-box;border:0 solid #e5e7eb}:before,:after{--tw-content:""}html{-webkit-text-size-adjust:100%;tab-size:4;font-feature-settings:normal;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}body{line-height:inherit;margin:0}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:#0000;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{margin:0;padding:0;list-style:none}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}[hidden]{display:none}')}),(0,a.jsx)("style",{children:r("*,:before,:after,::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.bottom-\\[-85px\\]{bottom:-85px}.left-\\[calc\\(50\\%-243px\\)\\]{left:calc(50% - 243px)}.bottom-\\[-65px\\]{bottom:-65px}.left-\\[calc\\(50\\%-43px\\)\\]{left:calc(50% - 43px)}.top-0{top:0}.left-0{left:0}.z-10{z-index:10}.z-50{z-index:50}.z-\\[1\\]{z-index:1}.z-\\[100\\]{z-index:100}.m-\\[10px\\]{margin:10px}.mx-\\[20px\\]{margin-left:20px;margin-right:20px}.ml-\\[10px\\]{margin-left:10px}.mt-\\[10px\\]{margin-top:10px}.mt-\\[50px\\]{margin-top:50px}.mb-\\[9px\\]{margin-bottom:9px}.box-border{box-sizing:border-box}.block{display:block}.inline{display:inline}.flex{display:flex}.table{display:table}.hidden{display:none}.h-full{height:100%}.h-0{height:0}.h-\\[86px\\]{height:86px}.h-\\[150px\\]{height:150px}.h-\\[60px\\]{height:60px}.h-\\[56px\\]{height:56px}.h-\\[64px\\]{height:64px}.h-\\[72px\\]{height:72px}.h-\\[24px\\]{height:24px}.h-\\[70px\\]{height:70px}.h-\\[62px\\]{height:62px}.h-\\[40px\\]{height:40px}.h-1\\/3{height:33.3333%}.h-\\[235px\\]{height:235px}.h-\\[93px\\]{height:93px}.h-screen{height:100vh}.h-fit{height:-moz-fit-content;height:-moz-fit-content;height:fit-content}.h-\\[30px\\]{height:30px}.max-h-\\[100\\%\\]{max-height:100%}.max-h-\\[inherit\\]{max-height:inherit}.max-h-\\[70px\\]{max-height:70px}.max-h-\\[90\\%\\]{max-height:90%}.min-h-0{min-height:0}.w-full{width:100%}.w-\\[486px\\]{width:486px}.w-0{width:0}.w-\\[86px\\]{width:86px}.w-\\[60px\\]{width:60px}.w-\\[56px\\]{width:56px}.w-\\[64px\\]{width:64px}.w-\\[72px\\]{width:72px}.w-\\[24px\\]{width:24px}.w-\\[70px\\]{width:70px}.w-\\[62px\\]{width:62px}.w-\\[50\\%\\]{width:50%}.w-\\[76px\\]{width:76px}.w-1\\/3{width:33.3333%}.w-screen{width:100vw}.w-\\[360px\\]{width:360px}.w-\\[450px\\]{width:450px}.w-\\[320px\\]{width:320px}.w-\\[30px\\]{width:30px}.w-\\[135px\\]{width:135px}.min-w-\\[200px\\]{min-width:200px}.min-w-\\[24px\\]{min-width:24px}.min-w-full{min-width:100%}.max-w-\\[1116px\\]{max-width:1116px}.max-w-\\[500px\\]{max-width:500px}.max-w-\\[400px\\]{max-width:400px}.max-w-\\[600px\\]{max-width:600px}.max-w-\\[800px\\]{max-width:800px}.max-w-\\[100\\%\\]{max-width:100%}.max-w-\\[70px\\]{max-width:70px}.max-w-\\[90\\%\\]{max-width:90%}.flex-1{flex:1}.flex-auto{flex:auto}.flex-grow{flex-grow:1}.translate-y-\\[200\\%\\]{--tw-translate-y:200%;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.translate-y-full{--tw-translate-y:100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.translate-y-0{--tw-translate-y:0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.translate-y-2{--tw-translate-y:.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.scale-\\[0\\.4\\]{--tw-scale-x:.4;--tw-scale-y:.4;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.scale-x-\\[-1\\]{--tw-scale-x:-1;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:1s linear infinite spin}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize{resize:both}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-\\[7px\\]{gap:7px}.gap-\\[5px\\]{gap:5px}.gap-2\\.5{gap:.625rem}.gap-2{gap:.5rem}.gap-\\[10px\\]{gap:10px}.gap-5{gap:1.25rem}.gap-\\[20px\\]{gap:20px}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.rounded-\\[10px\\]{border-radius:10px}.rounded-\\[8px\\]{border-radius:8px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-\\[15px\\]{border-radius:15px}.rounded-full{border-radius:9999px}.rounded-\\[50\\%\\]{border-radius:50%}.rounded-\\[5px\\]{border-radius:5px}.rounded-\\[60px\\]{border-radius:60px}.rounded-\\[inherit\\]{border-radius:inherit}.rounded-t-\\[15px\\]{border-top-left-radius:15px;border-top-right-radius:15px}.border{border-width:1px}.border-\\[7px\\]{border-width:7px}.border-\\[4px\\]{border-width:4px}.border-\\[3px\\]{border-width:3px}.border-\\[2px\\]{border-width:2px}.border-b-\\[7px\\]{border-bottom-width:7px}.border-t{border-top-width:1px}.border-secondaryLight{--tw-border-opacity:1;border-color:rgb(179 179 179/var(--tw-border-opacity))}.border-white{--tw-border-opacity:1;border-color:rgb(255 255 255/var(--tw-border-opacity))}.border-\\[\\#E5484D\\]{--tw-border-opacity:1;border-color:rgb(229 72 77/var(--tw-border-opacity))}.border-\\[\\#FFFFF\\]{border-color:#FFFFF}.border-\\[white\\]{--tw-border-opacity:1;border-color:rgb(255 255 255/var(--tw-border-opacity))}.border-secondaryVLight{--tw-border-opacity:1;border-color:rgb(235 235 235/var(--tw-border-opacity))}.border-b-\\[\\#E5484D\\]{--tw-border-opacity:1;border-bottom-color:rgb(229 72 77/var(--tw-border-opacity))}.bg-\\[\\#000\\],.bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity))}.bg-primaryLight{--tw-bg-opacity:1;background-color:rgb(86 86 86/var(--tw-bg-opacity))}.bg-primary{--tw-bg-opacity:1;background-color:rgb(29 28 32/var(--tw-bg-opacity))}.bg-graySelected{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity))}.bg-transparent{background-color:#0000}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.bg-tertiarySelected{--tw-bg-opacity:1;background-color:rgb(216 216 216/var(--tw-bg-opacity))}.bg-tertiary{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity))}.bg-mainBlueSelected{--tw-bg-opacity:1;background-color:rgb(0 90 218/var(--tw-bg-opacity))}.bg-mainBlue{--tw-bg-opacity:1;background-color:rgb(0 106 255/var(--tw-bg-opacity))}.bg-black\\/\\[\\.6\\]{background-color:#0009}.bg-\\[\\#565656\\]{--tw-bg-opacity:1;background-color:rgb(86 86 86/var(--tw-bg-opacity))}.bg-\\[\\#E5484D\\]{--tw-bg-opacity:1;background-color:rgb(229 72 77/var(--tw-bg-opacity))}.bg-\\[\\#f12828\\]{--tw-bg-opacity:1;background-color:rgb(241 40 40/var(--tw-bg-opacity))}.bg-\\[\\#171717\\]{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity))}.bg-\\[\\#FFFFFF\\]{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.bg-underlay{background-color:#00000040}.bg-\\[\\#F7F7F7\\]{--tw-bg-opacity:1;background-color:rgb(247 247 247/var(--tw-bg-opacity))}.bg-\\[\\#C7DEFF\\]{--tw-bg-opacity:1;background-color:rgb(199 222 255/var(--tw-bg-opacity))}.bg-\\[\\#f3f3f3\\]{--tw-bg-opacity:1;background-color:rgb(243 243 243/var(--tw-bg-opacity))}.bg-secondaryVLight{--tw-bg-opacity:1;background-color:rgb(235 235 235/var(--tw-bg-opacity))}.bg-opacity-90{--tw-bg-opacity:.9}.bg-\\[url\\(\\'https\\:\\/\\/cdn\\.snapcall\\.io\\/img\\/assist\\/gradient-bg\\.jpg\\'\\)\\]{background-image:url(https://cdn.snapcall.io/img/assist/gradient-bg.jpg)}.bg-cover{background-size:cover}.object-cover{object-fit:cover}.p-2\\.5{padding:.625rem}.p-2{padding:.5rem}.p-\\[3px\\]{padding:3px}.p-\\[12px\\]{padding:12px}.p-\\[15px\\]{padding:15px}.px-2\\.5{padding-left:.625rem;padding-right:.625rem}.px-2{padding-left:.5rem;padding-right:.5rem}.py-\\[125px\\]{padding-top:125px;padding-bottom:125px}.py-3{padding-top:.75rem;padding-bottom:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-\\[9px\\]{padding-top:9px;padding-bottom:9px}.px-3\\.5{padding-left:.875rem;padding-right:.875rem}.px-3{padding-left:.75rem;padding-right:.75rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.px-\\[10px\\]{padding-left:10px;padding-right:10px}.px-5{padding-left:1.25rem;padding-right:1.25rem}.py-\\[25px\\]{padding-top:25px;padding-bottom:25px}.px-\\[60px\\]{padding-left:60px;padding-right:60px}.px-\\[20px\\]{padding-left:20px;padding-right:20px}.pt-2\\.5{padding-top:.625rem}.pt-2{padding-top:.5rem}.pb-2\\.5{padding-bottom:.625rem}.pb-2{padding-bottom:.5rem}.pt-\\[14px\\]{padding-top:14px}.pb-\\[20px\\]{padding-bottom:20px}.pb-\\[25px\\]{padding-bottom:25px}.pb-\\[9px\\]{padding-bottom:9px}.pt-\\[20px\\]{padding-top:20px}.text-center{text-align:center}.text-base{letter-spacing:-.02em;font-size:16px;line-height:19px}.text-sm{letter-spacing:-.02em;font-size:14px;line-height:17px}.text-xs{letter-spacing:-.02em;font-size:12px;line-height:14px}.text-\\[112px\\]{font-size:112px}.text-xl{letter-spacing:-.02em;font-size:20px;line-height:24px}.text-lg{letter-spacing:-.02em;font-size:18px;line-height:22px}.font-medium{font-weight:500}.font-semibold{font-weight:600}.font-normal{font-weight:400}.font-bold{font-weight:700}.leading-\\[20px\\]{line-height:20px}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.text-primary{--tw-text-opacity:1;color:rgb(29 28 32/var(--tw-text-opacity))}.text-mainBlue{--tw-text-opacity:1;color:rgb(0 106 255/var(--tw-text-opacity))}.text-white\\/80{color:#fffc}.text-secondary{--tw-text-opacity:1;color:rgb(134 134 134/var(--tw-text-opacity))}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.text-primaryLight{--tw-text-opacity:1;color:rgb(86 86 86/var(--tw-text-opacity))}.underline{text-decoration-line:underline}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-\\[0\\.4\\]{opacity:.4}.opacity-0{opacity:0}.opacity-90{opacity:.9}.outline{outline-style:solid}.ring-\\[3px\\]{--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(3px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-cta{--tw-ring-opacity:1;--tw-ring-color:rgb(38 138 250/var(--tw-ring-opacity))}.blur{--tw-blur:blur(8px);filter:var(--tw-blur)var(--tw-brightness)var(--tw-contrast)var(--tw-grayscale)var(--tw-hue-rotate)var(--tw-invert)var(--tw-saturate)var(--tw-sepia)var(--tw-drop-shadow)}.filter{filter:var(--tw-blur)var(--tw-brightness)var(--tw-contrast)var(--tw-grayscale)var(--tw-hue-rotate)var(--tw-invert)var(--tw-saturate)var(--tw-sepia)var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter,-webkit-backdrop-filter,backdrop-filter;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-\\[transform\\,border-radius\\]{transition-property:transform,border-radius;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.inter{font-family:Inter,sans-serif}@supports (font-variation-settings:normal){.inter{font-family:Inter var,sans-serif}}.first-letter\\:capitalize:first-letter{text-transform:capitalize}.focus\\:outline-none:focus{outline-offset:2px;outline:2px solid #0000}.disabled\\:bg-secondaryLight:disabled{--tw-bg-opacity:1;background-color:rgb(179 179 179/var(--tw-bg-opacity))}.disabled\\:bg-graySelected:disabled{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity))}.disabled\\:text-secondaryLight:disabled{--tw-text-opacity:1;color:rgb(179 179 179/var(--tw-text-opacity))}.disabled\\:opacity-50:disabled{opacity:.5}")})]}),i.render((0,a.jsxs)(a.Fragment,{children:[o,(0,a.jsx)("link",{rel:"preconnect",href:"https://rsms.me/"}),(0,a.jsx)("link",{rel:"stylesheet",href:"https://rsms.me/inter/inter.css"}),(0,a.jsx)(Ub,{options:n})]})),n.tracking&&h.init(3111933,6),Ar(i,e)},initGreeting:(e,t)=>{const r=s(e);r.render((0,a.jsx)(cw,{onGreetingDone:t})),Ar(r,e)},setExtraSettingsOptions:e=>{const t=new CustomEvent("streamUISetExtraSettingsOptions",{detail:{extraOptions:e}});window.dispatchEvent(t)},startRecord:Qa.startRecord.bind(Qa),stopRecord:Qa.stopRecord.bind(Qa),sendNotification:Ir,joinRoom:Qa.init.bind(Qa),leaveRoom:Qa.endCall.bind(Qa),terminateRoom:Qa.terminateRoom.bind(Qa),generateToken:Qa.generateToken.bind(Qa),addEventListener:Qa.addEventListener.bind(Qa),removeEventListener:Qa.removeEventListener.bind(Qa),dispatchEvent:Qa.dispatchEvent.bind(Qa),getState:Qa.getState.bind(Qa),setProfile:Qa.setProfile.bind(Qa),setConfig:Qa.setConfig.bind(Qa),setLogLevel:e=>ta.setLogLevel(e),getPermissions:()=>Qa.getPermissions()};window.streamUI=dw,window.snapcallAPI={join:(...e)=>(console.warn("snapcallAPI.join is deprecated, please use streamUI.joinRoom instead!"),dw.joinRoom(...e)),endCall:(...e)=>(console.warn("snapcallAPI.endCall is deprecated, please use streamUI.leaveRoom instead!"),dw.leaveRoom(...e)),terminateRoom:(...e)=>(console.warn("snapcallAPI.terminateRoom is deprecated, please use streamUI.terminateRoom instead!"),dw.terminateRoom(...e)),generateToken:(...e)=>(console.warn("snapcallAPI.generateToken is deprecated, please use streamUI.generateToken instead!"),dw.generateToken(...e)),setDisplayName:(...e)=>(console.warn("snapcallAPI.setDisplayName is deprecated, please use streamUI.joinRoom options instead!"),Qa.setDisplayName(...e))}})();
2398
+ `;var xw=({onGreetingDone:e})=>{const{t:t}=Fi(),[r,{width:n,height:i}]=Oc(),o=(0,je.useRef)(null),s=(0,je.useRef)(null),[c,l]=(0,je.useState)(void 0),[d,u]=(0,je.useState)(!1),[p,h]=(0,je.useState)(!1),f=n>=i,m=async e=>{try{const t=await navigator.mediaDevices.getUserMedia(e),r=t.getVideoTracks()[0],n=t.getAudioTracks()[0];r&&l(r),n&&u(!0),n?.stop()}catch(e){console.error("Get User Media Failed: ",e)}},g=(0,je.useCallback)((async()=>{c?(c.stop(),l(void 0)):await m({video:!0})}),[c]),v=(0,je.useCallback)((async()=>{d?u(!1):await m({audio:!0})}),[d]);if((0,je.useEffect)((()=>{s.current&&(s.current.srcObject=c?new MediaStream([c]):null)}),[s,c,n,i]),(0,je.useEffect)((()=>{m({audio:!0,video:!0})}),[]),!0===p)return(0,a.jsx)(ww,{children:(0,a.jsx)("img",{src:"https://stream-assets.snapcall.io/animations/snapcall-logo-animation.gif",alt:"Snapcall logo animation",height:40})});const y=Boolean(c);return(0,a.jsxs)(rw,{ref:r,children:[(0,a.jsx)(Kf,{}),(0,a.jsx)(tw,{}),(0,a.jsx)(nw,{children:t("greeting.mainTitle")}),(0,a.jsxs)(iw,{children:[f&&(0,a.jsxs)(ow,{children:[(0,a.jsx)(aw,{webcamEnabled:y,ref:s,autoPlay:!0}),(0,a.jsxs)(lw,{webcamEnabled:y,children:[(0,a.jsxs)(sw,{children:[!d&&(0,a.jsx)(cw,{children:(0,a.jsx)(Mc,{status:!d})}),!y&&(0,a.jsx)(cw,{children:(0,a.jsx)(Lc,{status:!y})})]}),(0,a.jsx)(uw,{children:(0,a.jsx)(Hs,{})})]}),(0,a.jsxs)(dw,{children:[(0,a.jsx)(uw,{onClick:v,danger:!d,children:(0,a.jsx)(Mc,{status:!d})}),(0,a.jsx)(uw,{onClick:g,danger:!y,children:(0,a.jsx)(Lc,{status:!y})})]})]}),(0,a.jsxs)(pw,{children:[f&&(0,a.jsx)(hw,{children:t("greeting.sideTitle")}),(0,a.jsx)(fw,{children:t("greeting.sideDescription")}),(0,a.jsx)(mw,{ref:o,name:"displayName",type:"text",placeholder:t("greeting.namePlaceholder"),autoFocus:!0}),(0,a.jsx)(gw,{onClick:()=>{const t=o.current?.value,r=Boolean(c);c?.stop(),h(!0),setTimeout((()=>{e({cameraEnabled:r,micEnabled:d,displayName:t})}),4e3)},children:t("greeting.nameSubmit")})]})]}),(0,a.jsxs)(vw,{children:[(0,a.jsx)(yw,{children:t("greeting.footerTitle")}),(0,a.jsx)(bw,{children:t("greeting.footerDescription")})]})]})};const Sw={headless:!1,recorder:{enabled:!1,defaultMode:"photo",defaultMedia:"camera"},sharedURL:window.location.href,showMenuButton:!0,settingsShortcuts:[{id:"pip",displayType:"icon"}],controls:{microphone:{available:!0,enabled:!0},camera:{available:!0,enabled:!1},screenshare:{available:!0}},streamApiURL:String("https://apistream.snapcall.io"),tracking:!1},_w={init:({element:e,...t})=>{if("boolean"==typeof t.recorder&&(t.recorder={enabled:t.recorder,defaultMode:"photo",defaultMedia:"camera"}),e?.nodeType!==window.Node.ELEMENT_NODE)throw new Error('The "element" property must be a valid element!');const n=m(Sw,t),i=s(e);let o=null;o=(0,a.jsxs)(a.Fragment,{children:[t.recorder?.enabled&&(0,a.jsx)("style",{children:r('*,:before,:after{box-sizing:border-box;border:0 solid #e5e7eb}:before,:after{--tw-content:""}html{-webkit-text-size-adjust:100%;tab-size:4;font-feature-settings:normal;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}body{line-height:inherit;margin:0}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:#0000;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{margin:0;padding:0;list-style:none}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}[hidden]{display:none}')}),(0,a.jsx)("style",{children:r("*,:before,:after,::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.bottom-\\[-85px\\]{bottom:-85px}.left-\\[calc\\(50\\%-243px\\)\\]{left:calc(50% - 243px)}.bottom-\\[-65px\\]{bottom:-65px}.left-\\[calc\\(50\\%-43px\\)\\]{left:calc(50% - 43px)}.top-0{top:0}.left-0{left:0}.z-10{z-index:10}.z-50{z-index:50}.z-\\[1\\]{z-index:1}.z-\\[100\\]{z-index:100}.m-\\[10px\\]{margin:10px}.mx-\\[20px\\]{margin-left:20px;margin-right:20px}.ml-\\[10px\\]{margin-left:10px}.mt-\\[10px\\]{margin-top:10px}.mt-\\[50px\\]{margin-top:50px}.mb-\\[9px\\]{margin-bottom:9px}.box-border{box-sizing:border-box}.block{display:block}.inline{display:inline}.flex{display:flex}.table{display:table}.hidden{display:none}.h-full{height:100%}.h-0{height:0}.h-\\[86px\\]{height:86px}.h-\\[150px\\]{height:150px}.h-\\[60px\\]{height:60px}.h-\\[56px\\]{height:56px}.h-\\[64px\\]{height:64px}.h-\\[72px\\]{height:72px}.h-\\[24px\\]{height:24px}.h-\\[70px\\]{height:70px}.h-\\[62px\\]{height:62px}.h-\\[40px\\]{height:40px}.h-1\\/3{height:33.3333%}.h-\\[235px\\]{height:235px}.h-\\[93px\\]{height:93px}.h-screen{height:100vh}.h-fit{height:-moz-fit-content;height:-moz-fit-content;height:fit-content}.h-\\[30px\\]{height:30px}.max-h-\\[100\\%\\]{max-height:100%}.max-h-\\[inherit\\]{max-height:inherit}.max-h-\\[70px\\]{max-height:70px}.max-h-\\[90\\%\\]{max-height:90%}.min-h-0{min-height:0}.w-full{width:100%}.w-\\[486px\\]{width:486px}.w-0{width:0}.w-\\[86px\\]{width:86px}.w-\\[60px\\]{width:60px}.w-\\[56px\\]{width:56px}.w-\\[64px\\]{width:64px}.w-\\[72px\\]{width:72px}.w-\\[24px\\]{width:24px}.w-\\[70px\\]{width:70px}.w-\\[62px\\]{width:62px}.w-\\[50\\%\\]{width:50%}.w-\\[76px\\]{width:76px}.w-1\\/3{width:33.3333%}.w-screen{width:100vw}.w-\\[360px\\]{width:360px}.w-\\[450px\\]{width:450px}.w-\\[320px\\]{width:320px}.w-\\[30px\\]{width:30px}.w-\\[135px\\]{width:135px}.min-w-\\[200px\\]{min-width:200px}.min-w-\\[24px\\]{min-width:24px}.min-w-full{min-width:100%}.max-w-\\[1116px\\]{max-width:1116px}.max-w-\\[500px\\]{max-width:500px}.max-w-\\[400px\\]{max-width:400px}.max-w-\\[600px\\]{max-width:600px}.max-w-\\[800px\\]{max-width:800px}.max-w-\\[100\\%\\]{max-width:100%}.max-w-\\[70px\\]{max-width:70px}.max-w-\\[90\\%\\]{max-width:90%}.flex-1{flex:1}.flex-auto{flex:auto}.flex-grow{flex-grow:1}.translate-y-\\[200\\%\\]{--tw-translate-y:200%;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.translate-y-full{--tw-translate-y:100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.translate-y-0{--tw-translate-y:0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.translate-y-2{--tw-translate-y:.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.scale-\\[0\\.4\\]{--tw-scale-x:.4;--tw-scale-y:.4;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.scale-x-\\[-1\\]{--tw-scale-x:-1;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:1s linear infinite spin}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize{resize:both}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-\\[7px\\]{gap:7px}.gap-\\[5px\\]{gap:5px}.gap-2\\.5{gap:.625rem}.gap-2{gap:.5rem}.gap-\\[10px\\]{gap:10px}.gap-5{gap:1.25rem}.gap-\\[20px\\]{gap:20px}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.rounded-\\[10px\\]{border-radius:10px}.rounded-\\[8px\\]{border-radius:8px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-\\[15px\\]{border-radius:15px}.rounded-full{border-radius:9999px}.rounded-\\[50\\%\\]{border-radius:50%}.rounded-\\[5px\\]{border-radius:5px}.rounded-\\[60px\\]{border-radius:60px}.rounded-\\[inherit\\]{border-radius:inherit}.rounded-t-\\[15px\\]{border-top-left-radius:15px;border-top-right-radius:15px}.border{border-width:1px}.border-\\[7px\\]{border-width:7px}.border-\\[4px\\]{border-width:4px}.border-\\[3px\\]{border-width:3px}.border-\\[2px\\]{border-width:2px}.border-b-\\[7px\\]{border-bottom-width:7px}.border-t{border-top-width:1px}.border-secondaryLight{--tw-border-opacity:1;border-color:rgb(179 179 179/var(--tw-border-opacity))}.border-white{--tw-border-opacity:1;border-color:rgb(255 255 255/var(--tw-border-opacity))}.border-\\[\\#E5484D\\]{--tw-border-opacity:1;border-color:rgb(229 72 77/var(--tw-border-opacity))}.border-\\[\\#FFFFF\\]{border-color:#FFFFF}.border-\\[white\\]{--tw-border-opacity:1;border-color:rgb(255 255 255/var(--tw-border-opacity))}.border-secondaryVLight{--tw-border-opacity:1;border-color:rgb(235 235 235/var(--tw-border-opacity))}.border-b-\\[\\#E5484D\\]{--tw-border-opacity:1;border-bottom-color:rgb(229 72 77/var(--tw-border-opacity))}.bg-\\[\\#000\\],.bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity))}.bg-primaryLight{--tw-bg-opacity:1;background-color:rgb(86 86 86/var(--tw-bg-opacity))}.bg-primary{--tw-bg-opacity:1;background-color:rgb(29 28 32/var(--tw-bg-opacity))}.bg-graySelected{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity))}.bg-transparent{background-color:#0000}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.bg-tertiarySelected{--tw-bg-opacity:1;background-color:rgb(216 216 216/var(--tw-bg-opacity))}.bg-tertiary{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity))}.bg-mainBlueSelected{--tw-bg-opacity:1;background-color:rgb(0 90 218/var(--tw-bg-opacity))}.bg-mainBlue{--tw-bg-opacity:1;background-color:rgb(0 106 255/var(--tw-bg-opacity))}.bg-black\\/\\[\\.6\\]{background-color:#0009}.bg-\\[\\#565656\\]{--tw-bg-opacity:1;background-color:rgb(86 86 86/var(--tw-bg-opacity))}.bg-\\[\\#E5484D\\]{--tw-bg-opacity:1;background-color:rgb(229 72 77/var(--tw-bg-opacity))}.bg-\\[\\#f12828\\]{--tw-bg-opacity:1;background-color:rgb(241 40 40/var(--tw-bg-opacity))}.bg-\\[\\#171717\\]{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity))}.bg-\\[\\#FFFFFF\\]{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.bg-underlay{background-color:#00000040}.bg-\\[\\#F7F7F7\\]{--tw-bg-opacity:1;background-color:rgb(247 247 247/var(--tw-bg-opacity))}.bg-\\[\\#C7DEFF\\]{--tw-bg-opacity:1;background-color:rgb(199 222 255/var(--tw-bg-opacity))}.bg-\\[\\#f3f3f3\\]{--tw-bg-opacity:1;background-color:rgb(243 243 243/var(--tw-bg-opacity))}.bg-secondaryVLight{--tw-bg-opacity:1;background-color:rgb(235 235 235/var(--tw-bg-opacity))}.bg-opacity-90{--tw-bg-opacity:.9}.bg-\\[url\\(\\'https\\:\\/\\/cdn\\.snapcall\\.io\\/img\\/assist\\/gradient-bg\\.jpg\\'\\)\\]{background-image:url(https://cdn.snapcall.io/img/assist/gradient-bg.jpg)}.bg-cover{background-size:cover}.object-cover{object-fit:cover}.p-2\\.5{padding:.625rem}.p-2{padding:.5rem}.p-\\[3px\\]{padding:3px}.p-\\[12px\\]{padding:12px}.p-\\[15px\\]{padding:15px}.px-2\\.5{padding-left:.625rem;padding-right:.625rem}.px-2{padding-left:.5rem;padding-right:.5rem}.py-\\[125px\\]{padding-top:125px;padding-bottom:125px}.py-3{padding-top:.75rem;padding-bottom:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-\\[9px\\]{padding-top:9px;padding-bottom:9px}.px-3\\.5{padding-left:.875rem;padding-right:.875rem}.px-3{padding-left:.75rem;padding-right:.75rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.px-\\[10px\\]{padding-left:10px;padding-right:10px}.px-5{padding-left:1.25rem;padding-right:1.25rem}.py-\\[25px\\]{padding-top:25px;padding-bottom:25px}.px-\\[60px\\]{padding-left:60px;padding-right:60px}.px-\\[20px\\]{padding-left:20px;padding-right:20px}.pt-2\\.5{padding-top:.625rem}.pt-2{padding-top:.5rem}.pb-2\\.5{padding-bottom:.625rem}.pb-2{padding-bottom:.5rem}.pt-\\[14px\\]{padding-top:14px}.pb-\\[20px\\]{padding-bottom:20px}.pb-\\[25px\\]{padding-bottom:25px}.pb-\\[9px\\]{padding-bottom:9px}.pt-\\[20px\\]{padding-top:20px}.text-center{text-align:center}.text-base{letter-spacing:-.02em;font-size:16px;line-height:19px}.text-sm{letter-spacing:-.02em;font-size:14px;line-height:17px}.text-xs{letter-spacing:-.02em;font-size:12px;line-height:14px}.text-\\[112px\\]{font-size:112px}.text-xl{letter-spacing:-.02em;font-size:20px;line-height:24px}.text-lg{letter-spacing:-.02em;font-size:18px;line-height:22px}.font-medium{font-weight:500}.font-semibold{font-weight:600}.font-normal{font-weight:400}.font-bold{font-weight:700}.leading-\\[20px\\]{line-height:20px}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.text-primary{--tw-text-opacity:1;color:rgb(29 28 32/var(--tw-text-opacity))}.text-mainBlue{--tw-text-opacity:1;color:rgb(0 106 255/var(--tw-text-opacity))}.text-white\\/80{color:#fffc}.text-secondary{--tw-text-opacity:1;color:rgb(134 134 134/var(--tw-text-opacity))}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.text-primaryLight{--tw-text-opacity:1;color:rgb(86 86 86/var(--tw-text-opacity))}.text-\\[\\#707070\\]{--tw-text-opacity:1;color:rgb(112 112 112/var(--tw-text-opacity))}.underline{text-decoration-line:underline}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-\\[0\\.4\\]{opacity:.4}.opacity-0{opacity:0}.opacity-90{opacity:.9}.outline{outline-style:solid}.ring-\\[3px\\]{--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(3px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-cta{--tw-ring-opacity:1;--tw-ring-color:rgb(38 138 250/var(--tw-ring-opacity))}.blur{--tw-blur:blur(8px);filter:var(--tw-blur)var(--tw-brightness)var(--tw-contrast)var(--tw-grayscale)var(--tw-hue-rotate)var(--tw-invert)var(--tw-saturate)var(--tw-sepia)var(--tw-drop-shadow)}.filter{filter:var(--tw-blur)var(--tw-brightness)var(--tw-contrast)var(--tw-grayscale)var(--tw-hue-rotate)var(--tw-invert)var(--tw-saturate)var(--tw-sepia)var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter,-webkit-backdrop-filter,backdrop-filter;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-\\[transform\\,border-radius\\]{transition-property:transform,border-radius;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.inter{font-family:Inter,sans-serif}@supports (font-variation-settings:normal){.inter{font-family:Inter var,sans-serif}}.first-letter\\:capitalize:first-letter{text-transform:capitalize}.focus\\:outline-none:focus{outline-offset:2px;outline:2px solid #0000}.disabled\\:bg-secondaryLight:disabled{--tw-bg-opacity:1;background-color:rgb(179 179 179/var(--tw-bg-opacity))}.disabled\\:bg-graySelected:disabled{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity))}.disabled\\:text-secondaryLight:disabled{--tw-text-opacity:1;color:rgb(179 179 179/var(--tw-text-opacity))}.disabled\\:opacity-50:disabled{opacity:.5}")})]}),i.render((0,a.jsxs)(a.Fragment,{children:[o,(0,a.jsx)("link",{rel:"preconnect",href:"https://rsms.me/"}),(0,a.jsx)("link",{rel:"stylesheet",href:"https://rsms.me/inter/inter.css"}),(0,a.jsx)(ew,{options:n})]})),n.tracking&&h.init(3111933,6),Ar(i,e)},initGreeting:(e,t)=>{const r=s(e);r.render((0,a.jsx)(xw,{onGreetingDone:t})),Ar(r,e)},setExtraSettingsOptions:e=>{const t=new CustomEvent("streamUISetExtraSettingsOptions",{detail:{extraOptions:e}});window.dispatchEvent(t)},startRecord:Qa.startRecord.bind(Qa),stopRecord:Qa.stopRecord.bind(Qa),sendNotification:Ir,joinRoom:Qa.init.bind(Qa),leaveRoom:Qa.endCall.bind(Qa),terminateRoom:Qa.terminateRoom.bind(Qa),generateToken:Qa.generateToken.bind(Qa),addEventListener:Qa.addEventListener.bind(Qa),removeEventListener:Qa.removeEventListener.bind(Qa),dispatchEvent:Qa.dispatchEvent.bind(Qa),getState:Qa.getState.bind(Qa),setProfile:Qa.setProfile.bind(Qa),setConfig:Qa.setConfig.bind(Qa),setLogLevel:e=>ta.setLogLevel(e),getPermissions:()=>Qa.getPermissions()};window.streamUI=_w,window.snapcallAPI={join:(...e)=>(console.warn("snapcallAPI.join is deprecated, please use streamUI.joinRoom instead!"),_w.joinRoom(...e)),endCall:(...e)=>(console.warn("snapcallAPI.endCall is deprecated, please use streamUI.leaveRoom instead!"),_w.leaveRoom(...e)),terminateRoom:(...e)=>(console.warn("snapcallAPI.terminateRoom is deprecated, please use streamUI.terminateRoom instead!"),_w.terminateRoom(...e)),generateToken:(...e)=>(console.warn("snapcallAPI.generateToken is deprecated, please use streamUI.generateToken instead!"),_w.generateToken(...e)),setDisplayName:(...e)=>(console.warn("snapcallAPI.setDisplayName is deprecated, please use streamUI.joinRoom options instead!"),Qa.setDisplayName(...e))}})();