/*! VERSION | 10.78.9 */(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[5836],{19068:(e,t,r)=>{"use strict";r.d(t,{nt:()=>rC,rj:()=>rz});var n,a=r(1021),o=r(27378),i=function(){return(i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};function s(e,t,r){if(r||2==arguments.length)for(var n,a=0,o=t.length;a<o;a++)!n&&a in t||(n||(n=Array.prototype.slice.call(t,0,a)),n[a]=t[a]);return e.concat(n||Array.prototype.slice.call(t))}Object.create,Object.create;var l=r(74445),c=r.n(l),u="-ms-",d="-moz-",p="-webkit-",m="comm",f="rule",h="decl",g="@keyframes",y=Math.abs,v=String.fromCharCode,b=Object.assign;function E(e,t){return(e=t.exec(e))?e[0]:e}function _(e,t,r){return e.replace(t,r)}function w(e,t,r){return e.indexOf(t,r)}function C(e,t){return 0|e.charCodeAt(t)}function S(e,t,r){return e.slice(t,r)}function k(e){return e.length}function x(e,t){return t.push(e),e}function I(e,t){return e.filter(function(e){return!E(e,t)})}var A=1,N=1,P=0,M=0,R=0,O="";function L(e,t,r,n,a,o,i,s){return{value:e,root:t,parent:r,type:n,props:a,children:o,line:A,column:N,length:i,return:"",siblings:s}}function $(e,t){return b(L("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function j(e){for(;e.root;)e=$(e.root,{children:[e]});x(e,e.siblings)}function T(){return R=M<P?C(O,M++):0,N++,10===R&&(N=1,A++),R}function D(){return C(O,M)}function F(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function B(e){var t,r;return(t=M-1,r=function e(t){for(;T();)switch(R){case t:return M;case 34:case 39:34!==t&&39!==t&&e(R);break;case 40:41===t&&e(t);break;case 92:T()}return M}(91===e?e+2:40===e?e+1:e),S(O,t,r)).trim()}function U(e,t){for(var r="",n=0;n<e.length;n++)r+=t(e[n],n,e,t)||"";return r}function W(e,t,r,n){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case h:return e.return=e.return||e.value;case m:return"";case g:return e.return=e.value+"{"+U(e.children,n)+"}";case f:if(!k(e.value=e.props.join(",")))return""}return k(r=U(e.children,n))?e.return=e.value+"{"+r+"}":""}function G(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case h:e.return=function e(t,r,n){var a;switch(a=r,45^C(t,0)?(((a<<2^C(t,0))<<2^C(t,1))<<2^C(t,2))<<2^C(t,3):0){case 5103:return p+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return p+t+t;case 4789:return d+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return p+t+d+t+u+t+t;case 5936:switch(C(t,r+11)){case 114:return p+t+u+_(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return p+t+u+_(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return p+t+u+_(t,/[svh]\w+-[tblr]{2}/,"lr")+t}case 6828:case 4268:case 2903:return p+t+u+t+t;case 6165:return p+t+u+"flex-"+t+t;case 5187:return p+t+_(t,/(\w+).+(:[^]+)/,p+"box-$1$2"+u+"flex-$1$2")+t;case 5443:return p+t+u+"flex-item-"+_(t,/flex-|-self/g,"")+(E(t,/flex-|baseline/)?"":u+"grid-row-"+_(t,/flex-|-self/g,""))+t;case 4675:return p+t+u+"flex-line-pack"+_(t,/align-content|flex-|-self/g,"")+t;case 5548:return p+t+u+_(t,"shrink","negative")+t;case 5292:return p+t+u+_(t,"basis","preferred-size")+t;case 6060:return p+"box-"+_(t,"-grow","")+p+t+u+_(t,"grow","positive")+t;case 4554:return p+_(t,/([^-])(transform)/g,"$1"+p+"$2")+t;case 6187:return _(_(_(t,/(zoom-|grab)/,p+"$1"),/(image-set)/,p+"$1"),t,"")+t;case 5495:case 3959:return _(t,/(image-set\([^]*)/,p+"$1$`$1");case 4968:return _(_(t,/(.+:)(flex-)?(.*)/,p+"box-pack:$3"+u+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+p+t+t;case 4200:if(!E(t,/flex-|baseline/))return u+"grid-column-align"+S(t,r)+t;break;case 2592:case 3360:return u+_(t,"template-","")+t;case 4384:case 3616:if(n&&n.some(function(e,t){return r=t,E(e.props,/grid-\w+-end/)}))return~w(t+(n=n[r].value),"span",0)?t:u+_(t,"-start","")+t+u+"grid-row-span:"+(~w(n,"span",0)?E(n,/\d+/):+E(n,/\d+/)-+E(t,/\d+/))+";";return u+_(t,"-start","")+t;case 4896:case 4128:return n&&n.some(function(e){return E(e.props,/grid-\w+-start/)})?t:u+_(_(t,"-end","-span"),"span ","")+t;case 4095:case 3583:case 4068:case 2532:return _(t,/(.+)-inline(.+)/,p+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(k(t)-1-r>6)switch(C(t,r+1)){case 109:if(45!==C(t,r+4))break;case 102:return _(t,/(.+:)(.+)-([^]+)/,"$1"+p+"$2-$3$1"+d+(108==C(t,r+3)?"$3":"$2-$3"))+t;case 115:return~w(t,"stretch",0)?e(_(t,"stretch","fill-available"),r,n)+t:t}break;case 5152:case 5920:return _(t,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(e,r,n,a,o,i,s){return u+r+":"+n+s+(a?u+r+"-span:"+(o?i:+i-+n)+s:"")+t});case 4949:if(121===C(t,r+6))return _(t,":",":"+p)+t;break;case 6444:switch(C(t,45===C(t,14)?18:11)){case 120:return _(t,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+p+(45===C(t,14)?"inline-":"")+"box$3$1"+p+"$2$3$1"+u+"$2box$3")+t;case 100:return _(t,":",":"+u)+t}break;case 5719:case 2647:case 2135:case 3927:case 2391:return _(t,"scroll-","scroll-snap-")+t}return t}(e.value,e.length,r);return;case g:return U([$(e,{value:_(e.value,"@","@"+p)})],n);case f:if(e.length)return(r=e.props).map(function(t){switch(E(t,n=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":j($(e,{props:[_(t,/:(read-\w+)/,":"+d+"$1")]})),j($(e,{props:[t]})),b(e,{props:I(r,n)});break;case"::placeholder":j($(e,{props:[_(t,/:(plac\w+)/,":"+p+"input-$1")]})),j($(e,{props:[_(t,/:(plac\w+)/,":"+d+"$1")]})),j($(e,{props:[_(t,/:(plac\w+)/,u+"input-$1")]})),j($(e,{props:[t]})),b(e,{props:I(r,n)})}return""}).join("")}}function Z(e,t,r,n,a,o,i,s,l,c,u,d){for(var p=a-1,m=0===a?o:[""],h=m.length,g=0,v=0,b=0;g<n;++g)for(var E=0,w=S(e,p+1,p=y(v=i[g])),C=e;E<h;++E)(C=(v>0?m[E]+" "+w:_(w,/&\f/g,m[E])).trim())&&(l[b++]=C);return L(e,t,r,0===a?f:s,l,c,u,d)}function K(e,t,r,n,a){return L(e,t,r,h,S(e,0,n),S(e,n+1,-1),n,a)}let H={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var V="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",z="active",q="data-styled-version",Y="6.1.8",Q="/*!sc*/\n",J="undefined"!=typeof window&&"HTMLElement"in window,X=!!("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY&&"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY),ee=Object.freeze([]),et=Object.freeze({}),er=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),en=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,ea=/(^-|-$)/g;function eo(e){return e.replace(en,"-").replace(ea,"")}var ei=/(a)(d)/gi,es=function(e){return String.fromCharCode(e+(e>25?39:97))};function el(e){var t,r="";for(t=Math.abs(e);t>52;t=t/52|0)r=es(t%52)+r;return(es(t%52)+r).replace(ei,"$1-$2")}var ec,eu=function(e,t){for(var r=t.length;r;)e=33*e^t.charCodeAt(--r);return e},ed=function(e){return eu(5381,e)};function ep(e){return"string"==typeof e}var em="function"==typeof Symbol&&Symbol.for,ef=em?Symbol.for("react.memo"):60115,eh=em?Symbol.for("react.forward_ref"):60112,eg={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},ey={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},ev={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},eb=((ec={})[eh]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},ec[ef]=ev,ec);function eE(e){return("type"in e&&e.type.$$typeof)===ef?ev:"$$typeof"in e?eb[e.$$typeof]:eg}var e_=Object.defineProperty,ew=Object.getOwnPropertyNames,eC=Object.getOwnPropertySymbols,eS=Object.getOwnPropertyDescriptor,ek=Object.getPrototypeOf,ex=Object.prototype;function eI(e){return"function"==typeof e}function eA(e){return"object"==typeof e&&"styledComponentId"in e}function eN(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function eP(e,t){if(0===e.length)return"";for(var r=e[0],n=1;n<e.length;n++)r+=t?t+e[n]:e[n];return r}function eM(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function eR(e,t){Object.defineProperty(e,"toString",{value:t})}function eO(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e," for more information.").concat(t.length>0?" Args: ".concat(t.join(", ")):""))}var eL=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,r=0;r<e;r++)t+=this.groupSizes[r];return t},e.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var r=this.groupSizes,n=r.length,a=n;e>=a;)if((a<<=1)<0)throw eO(16,"".concat(e));this.groupSizes=new Uint32Array(a),this.groupSizes.set(r),this.length=a;for(var o=n;o<a;o++)this.groupSizes[o]=0}for(var i=this.indexOfGroup(e+1),s=(o=0,t.length);o<s;o++)this.tag.insertRule(i,t[o])&&(this.groupSizes[e]++,i++)},e.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],r=this.indexOfGroup(e),n=r+t;this.groupSizes[e]=0;for(var a=r;a<n;a++)this.tag.deleteRule(r)}},e.prototype.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var r=this.groupSizes[e],n=this.indexOfGroup(e),a=n+r,o=n;o<a;o++)t+="".concat(this.tag.getRule(o)).concat(Q);return t},e}(),e$=new Map,ej=new Map,eT=1,eD=function(e){if(e$.has(e))return e$.get(e);for(;ej.has(eT);)eT++;var t=eT++;return e$.set(e,t),ej.set(t,e),t},eF=function(e,t){eT=t+1,e$.set(e,t),ej.set(t,e)},eB="style[".concat(V,"][").concat(q,'="').concat(Y,'"]'),eU=new RegExp("^".concat(V,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),eW=function(e,t,r){for(var n,a=r.split(","),o=0,i=a.length;o<i;o++)(n=a[o])&&e.registerName(t,n)},eG=function(e,t){for(var r,n=(null!==(r=t.textContent)&&void 0!==r?r:"").split(Q),a=[],o=0,i=n.length;o<i;o++){var s=n[o].trim();if(s){var l=s.match(eU);if(l){var c=0|parseInt(l[1],10),u=l[2];0!==c&&(eF(u,c),eW(e,u,l[3]),e.getTag().insertRules(c,a)),a.length=0}else a.push(s)}}},eZ=function(e){var t,n=document.head,a=e||n,o=document.createElement("style"),i=(t=Array.from(a.querySelectorAll("style[".concat(V,"]"))))[t.length-1],s=void 0!==i?i.nextSibling:null;o.setAttribute(V,z),o.setAttribute(q,Y);var l=r.nc;return l&&o.setAttribute("nonce",l),a.insertBefore(o,s),o},eK=function(){function e(e){this.element=eZ(e),this.element.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,r=0,n=t.length;r<n;r++){var a=t[r];if(a.ownerNode===e)return a}throw eO(17)}(this.element),this.length=0}return e.prototype.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},e.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},e.prototype.getRule=function(e){var t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:""},e}(),eH=function(){function e(e){this.element=eZ(e),this.nodes=this.element.childNodes,this.length=0}return e.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var r=document.createTextNode(t);return this.element.insertBefore(r,this.nodes[e]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),eV=function(){function e(e){this.rules=[],this.length=0}return e.prototype.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},e.prototype.deleteRule=function(e){this.rules.splice(e,1),this.length--},e.prototype.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),ez=J,eq={isServer:!J,useCSSOMInjection:!X},eY=function(){function e(e,t,r){void 0===e&&(e=et),void 0===t&&(t={});var n=this;this.options=i(i({},eq),e),this.gs=t,this.names=new Map(r),this.server=!!e.isServer,!this.server&&J&&ez&&(ez=!1,function(e){for(var t=document.querySelectorAll(eB),r=0,n=t.length;r<n;r++){var a=t[r];a&&a.getAttribute(V)!==z&&(eG(e,a),a.parentNode&&a.parentNode.removeChild(a))}}(this)),eR(this,function(){return function(e){for(var t=e.getTag(),r=t.length,n="",a=0;a<r;a++)(function(r){var a=ej.get(r);if(void 0!==a){var o=e.names.get(a),i=t.getGroup(r);if(void 0!==o&&0!==i.length){var s="".concat(V,".g").concat(r,'[id="').concat(a,'"]'),l="";void 0!==o&&o.forEach(function(e){e.length>0&&(l+="".concat(e,","))}),n+="".concat(i).concat(s,'{content:"').concat(l,'"}').concat(Q)}}})(a);return n}(n)})}return e.registerId=function(e){return eD(e)},e.prototype.reconstructWithOptions=function(t,r){return void 0===r&&(r=!0),new e(i(i({},this.options),t),this.gs,r&&this.names||void 0)},e.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},e.prototype.getTag=function(){var e,t,r,n;return this.tag||(this.tag=(r=(t=this.options).useCSSOMInjection,n=t.target,e=t.isServer?new eV(n):r?new eK(n):new eH(n),new eL(e)))},e.prototype.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},e.prototype.registerName=function(e,t){if(eD(e),this.names.has(e))this.names.get(e).add(t);else{var r=new Set;r.add(t),this.names.set(e,r)}},e.prototype.insertRules=function(e,t,r){this.registerName(e,t),this.getTag().insertRules(eD(e),r)},e.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},e.prototype.clearRules=function(e){this.getTag().clearGroup(eD(e)),this.clearNames(e)},e.prototype.clearTag=function(){this.tag=void 0},e}(),eQ=/&/g,eJ=/^\s*\/\/.*$/gm;function eX(e){var t,r,n,a=void 0===e?et:e,o=a.options,i=void 0===o?et:o,s=a.plugins,l=void 0===s?ee:s,c=function(e,n,a){return a.startsWith(r)&&a.endsWith(r)&&a.replaceAll(r,"").length>0?".".concat(t):e},u=l.slice();u.push(function(e){e.type===f&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(eQ,r).replace(n,c))}),i.prefix&&u.push(G),u.push(W);var d=function(e,a,o,s){void 0===a&&(a=""),void 0===o&&(o=""),void 0===s&&(s="&"),t=s,r=a,n=RegExp("\\".concat(r,"\\b"),"g");var l,c,d,p,f,h=e.replace(eJ,""),g=(f=function e(t,r,n,a,o,i,s,l,c){for(var u,d=0,p=0,f=s,h=0,g=0,b=0,E=1,I=1,P=1,$=0,j="",U=o,W=i,G=a,H=j;I;)switch(b=$,$=T()){case 40:if(108!=b&&58==C(H,f-1)){-1!=w(H+=_(B($),"&","&\f"),"&\f",y(d?l[d-1]:0))&&(P=-1);break}case 34:case 39:case 91:H+=B($);break;case 9:case 10:case 13:case 32:H+=function(e){for(;R=D();)if(R<33)T();else break;return F(e)>2||F(R)>3?"":" "}(b);break;case 92:H+=function(e,t){for(var r;--t&&T()&&!(R<48)&&!(R>102)&&(!(R>57)||!(R<65))&&(!(R>70)||!(R<97)););return r=M+(t<6&&32==D()&&32==T()),S(O,e,r)}(M-1,7);continue;case 47:switch(D()){case 42:case 47:x(L(u=function(e,t){for(;T();)if(e+R===57)break;else if(e+R===84&&47===D())break;return"/*"+S(O,t,M-1)+"*"+v(47===e?e:T())}(T(),M),r,n,m,v(R),S(u,2,-2),0,c),c);break;default:H+="/"}break;case 123*E:l[d++]=k(H)*P;case 125*E:case 59:case 0:switch($){case 0:case 125:I=0;case 59+p:-1==P&&(H=_(H,/\f/g,"")),g>0&&k(H)-f&&x(g>32?K(H+";",a,n,f-1,c):K(_(H," ","")+";",a,n,f-2,c),c);break;case 59:H+=";";default:if(x(G=Z(H,r,n,d,p,o,l,j,U=[],W=[],f,i),i),123===$){if(0===p)e(H,r,G,G,U,i,f,l,W);else switch(99===h&&110===C(H,3)?100:h){case 100:case 108:case 109:case 115:e(t,G,G,a&&x(Z(t,G,G,0,0,o,l,j,o,U=[],f,W),W),o,W,f,l,a?U:W);break;default:e(H,G,G,G,[""],W,0,l,W)}}}d=p=g=0,E=P=1,j=H="",f=s;break;case 58:f=1+k(H),g=b;default:if(E<1){if(123==$)--E;else if(125==$&&0==E++&&125==(R=M>0?C(O,--M):0,N--,10===R&&(N=1,A--),R))continue}switch(H+=v($),$*E){case 38:P=p>0?1:(H+="\f",-1);break;case 44:l[d++]=(k(H)-1)*P,P=1;break;case 64:45===D()&&(H+=B(T())),h=D(),p=f=k(j=H+=function(e){for(;!F(D());)T();return S(O,e,M)}(M)),$++;break;case 45:45===b&&2==k(H)&&(E=0)}}return i}("",null,null,null,[""],(d=p=o||a?"".concat(o," ").concat(a," { ").concat(h," }"):h,A=N=1,P=k(O=d),M=0,p=[]),0,[0],p),O="",f);i.namespace&&(g=function e(t,r){return t.map(function(t){return"rule"===t.type&&(t.value="".concat(r," ").concat(t.value),t.value=t.value.replaceAll(",",",".concat(r," ")),t.props=t.props.map(function(e){return"".concat(r," ").concat(e)})),Array.isArray(t.children)&&"@keyframes"!==t.type&&(t.children=e(t.children,r)),t})}(g,i.namespace));var b=[];return U(g,(c=(l=u.concat(function(e){var t;!e.root&&(e=e.return)&&(t=e,b.push(t))})).length,function(e,t,r,n){for(var a="",o=0;o<c;o++)a+=l[o](e,t,r,n)||"";return a})),b};return d.hash=l.length?l.reduce(function(e,t){return t.name||eO(15),eu(e,t.name)},5381).toString():"",d}var e0=new eY,e1=eX(),e2=o.createContext({shouldForwardProp:void 0,styleSheet:e0,stylis:e1}),e4=(e2.Consumer,o.createContext(void 0));function e3(){return(0,o.useContext)(e2)}function e8(e){var t=(0,o.useState)(e.stylisPlugins),r=t[0],n=t[1],a=e3().styleSheet,i=(0,o.useMemo)(function(){var t=a;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t},[e.disableCSSOMInjection,e.sheet,e.target,a]),s=(0,o.useMemo)(function(){return eX({options:{namespace:e.namespace,prefix:e.enableVendorPrefixes},plugins:r})},[e.enableVendorPrefixes,e.namespace,r]);(0,o.useEffect)(function(){c()(r,e.stylisPlugins)||n(e.stylisPlugins)},[e.stylisPlugins]);var l=(0,o.useMemo)(function(){return{shouldForwardProp:e.shouldForwardProp,styleSheet:i,stylis:s}},[e.shouldForwardProp,i,s]);return o.createElement(e2.Provider,{value:l},o.createElement(e4.Provider,{value:s},e.children))}var e6=function(){function e(e,t){var r=this;this.inject=function(e,t){void 0===t&&(t=e1);var n=r.name+t.hash;e.hasNameForId(r.id,n)||e.insertRules(r.id,n,t(r.rules,n,"@keyframes"))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t,eR(this,function(){throw eO(12,String(r.name))})}return e.prototype.getName=function(e){return void 0===e&&(e=e1),this.name+e.hash},e}();function e5(e){for(var t="",r=0;r<e.length;r++){var n=e[r];if(1===r&&"-"===n&&"-"===e[0])return e;n>="A"&&n<="Z"?t+="-"+n.toLowerCase():t+=n}return t.startsWith("ms-")?"-"+t:t}var e9=function(e){return null==e||!1===e||""===e},e7=function(e){var t=[];for(var r in e){var n=e[r];e.hasOwnProperty(r)&&!e9(n)&&(Array.isArray(n)&&n.isCss||eI(n)?t.push("".concat(e5(r),":"),n,";"):eM(n)?t.push.apply(t,s(s(["".concat(r," {")],e7(n),!1),["}"],!1)):t.push("".concat(e5(r),": ").concat(null==n||"boolean"==typeof n||""===n?"":"number"!=typeof n||0===n||r in H||r.startsWith("--")?String(n).trim():"".concat(n,"px"),";")))}return t};function te(e,t,r,n){return e9(e)?[]:eA(e)?[".".concat(e.styledComponentId)]:eI(e)?!eI(e)||e.prototype&&e.prototype.isReactComponent||!t?[e]:te(e(t),t,r,n):e instanceof e6?r?(e.inject(r,n),[e.getName(n)]):[e]:eM(e)?e7(e):Array.isArray(e)?Array.prototype.concat.apply(ee,e.map(function(e){return te(e,t,r,n)})):[e.toString()]}function tt(e){for(var t=0;t<e.length;t+=1){var r=e[t];if(eI(r)&&!eA(r))return!1}return!0}var tr=ed(Y),tn=function(){function e(e,t,r){this.rules=e,this.staticRulesId="",this.isStatic=(void 0===r||r.isStatic)&&tt(e),this.componentId=t,this.baseHash=eu(tr,t),this.baseStyle=r,eY.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,r){var n=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,r):"";if(this.isStatic&&!r.hash){if(this.staticRulesId&&t.hasNameForId(this.componentId,this.staticRulesId))n=eN(n,this.staticRulesId);else{var a=eP(te(this.rules,e,t,r)),o=el(eu(this.baseHash,a)>>>0);if(!t.hasNameForId(this.componentId,o)){var i=r(a,".".concat(o),void 0,this.componentId);t.insertRules(this.componentId,o,i)}n=eN(n,o),this.staticRulesId=o}}else{for(var s=eu(this.baseHash,r.hash),l="",c=0;c<this.rules.length;c++){var u=this.rules[c];if("string"==typeof u)l+=u;else if(u){var d=eP(te(u,e,t,r));s=eu(s,d+c),l+=d}}if(l){var p=el(s>>>0);t.hasNameForId(this.componentId,p)||t.insertRules(this.componentId,p,r(l,".".concat(p),void 0,this.componentId)),n=eN(n,p)}}return n},e}(),ta=o.createContext(void 0);ta.Consumer;var to={};function ti(e,t,r){var n,a,s,l,c=eA(e),u=!ep(e),d=t.attrs,p=void 0===d?ee:d,m=t.componentId,f=void 0===m?(n=t.displayName,a=t.parentComponentId,to[s="string"!=typeof n?"sc":eo(n)]=(to[s]||0)+1,l="".concat(s,"-").concat(el(ed(Y+s+to[s])>>>0)),a?"".concat(a,"-").concat(l):l):m,h=t.displayName,g=void 0===h?ep(e)?"styled.".concat(e):"Styled(".concat(e.displayName||e.name||"Component",")"):h,y=t.displayName&&t.componentId?"".concat(eo(t.displayName),"-").concat(t.componentId):t.componentId||f,v=c&&e.attrs?e.attrs.concat(p).filter(Boolean):p,b=t.shouldForwardProp;if(c&&e.shouldForwardProp){var E=e.shouldForwardProp;if(t.shouldForwardProp){var _=t.shouldForwardProp;b=function(e,t){return E(e,t)&&_(e,t)}}else b=E}var w=new tn(r,y,c?e.componentStyle:void 0);function C(e,t){return function(e,t,r){var n,a,s=e.attrs,l=e.componentStyle,c=e.defaultProps,u=e.foldedComponentIds,d=e.styledComponentId,p=e.target,m=o.useContext(ta),f=e3(),h=e.shouldForwardProp||f.shouldForwardProp,g=(void 0===(n=c)&&(n=et),t.theme!==n.theme&&t.theme||m||n.theme||et),y=function(e,t,r){for(var n,a=i(i({},t),{className:void 0,theme:r}),o=0;o<e.length;o+=1){var s=eI(n=e[o])?n(a):n;for(var l in s)a[l]="className"===l?eN(a[l],s[l]):"style"===l?i(i({},a[l]),s[l]):s[l]}return t.className&&(a.className=eN(a.className,t.className)),a}(s,t,g),v=y.as||p,b={};for(var E in y)void 0===y[E]||"$"===E[0]||"as"===E||"theme"===E&&y.theme===g||("forwardedAs"===E?b.as=y.forwardedAs:h&&!h(E,v)||(b[E]=y[E]));var _=(a=e3(),l.generateAndInjectStyles(y,a.styleSheet,a.stylis)),w=eN(u,d);return _&&(w+=" "+_),y.className&&(w+=" "+y.className),b[ep(v)&&!er.has(v)?"class":"className"]=w,b.ref=r,(0,o.createElement)(v,b)}(S,e,t)}C.displayName=g;var S=o.forwardRef(C);return S.attrs=v,S.componentStyle=w,S.displayName=g,S.shouldForwardProp=b,S.foldedComponentIds=c?eN(e.foldedComponentIds,e.styledComponentId):"",S.styledComponentId=y,S.target=c?e.target:e,Object.defineProperty(S,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=c?function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];for(var n=0;n<t.length;n++)(function e(t,r,n){if(void 0===n&&(n=!1),!n&&!eM(t)&&!Array.isArray(t))return r;if(Array.isArray(r))for(var a=0;a<r.length;a++)t[a]=e(t[a],r[a]);else if(eM(r))for(var a in r)t[a]=e(t[a],r[a]);return t})(e,t[n],!0);return e}({},e.defaultProps,t):t}}),eR(S,function(){return".".concat(S.styledComponentId)}),u&&function e(t,r,n){if("string"!=typeof r){if(ex){var a=ek(r);a&&a!==ex&&e(t,a,n)}var o=ew(r);eC&&(o=o.concat(eC(r)));for(var i=eE(t),s=eE(r),l=0;l<o.length;++l){var c=o[l];if(!(c in ey||n&&n[c]||s&&c in s||i&&c in i)){var u=eS(r,c);try{e_(t,c,u)}catch(e){}}}}return t}(S,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),S}function ts(e,t){for(var r=[e[0]],n=0,a=t.length;n<a;n+=1)r.push(t[n],e[n+1]);return r}var tl=function(e){return Object.assign(e,{isCss:!0})};function tc(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return eI(e)||eM(e)?tl(te(ts(ee,s([e],t,!0)))):0===t.length&&1===e.length&&"string"==typeof e[0]?te(e):tl(te(ts(e,t)))}var tu=function(e){return function e(t,r,n){if(void 0===n&&(n=et),!r)throw eO(1,r);var a=function(e){for(var a=[],o=1;o<arguments.length;o++)a[o-1]=arguments[o];return t(r,n,tc.apply(void 0,s([e],a,!1)))};return a.attrs=function(a){return e(t,r,i(i({},n),{attrs:Array.prototype.concat(n.attrs,a).filter(Boolean)}))},a.withConfig=function(a){return e(t,r,i(i({},n),a))},a}(ti,e)};function td(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n=eP(tc.apply(void 0,s([e],t,!1))),a=el(ed(n)>>>0);return new e6(a,n)}er.forEach(function(e){tu[e]=tu(e)}),function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=tt(e),eY.registerId(this.componentId+1)}e.prototype.createStyles=function(e,t,r,n){var a=n(eP(te(this.rules,t,r,n)),""),o=this.componentId+e;r.insertRules(o,o,a)},e.prototype.removeStyles=function(e,t){t.clearRules(this.componentId+e)},e.prototype.renderStyles=function(e,t,r,n){e>2&&eY.registerId(this.componentId+e),this.removeStyles(e,r),this.createStyles(e,t,r,n)}}(),function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString(),n=r.nc,a=eP([n&&'nonce="'.concat(n,'"'),"".concat(V,'="true"'),"".concat(q,'="').concat(Y,'"')].filter(Boolean)," ");return"<style ".concat(a,">").concat(t,"</style>")},this.getStyleTags=function(){if(e.sealed)throw eO(2);return e._emitSheetCSS()},this.getStyleElement=function(){if(e.sealed)throw eO(2);var t,n=((t={})[V]="",t[q]=Y,t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),a=r.nc;return a&&(n.nonce=a),[o.createElement("style",i({},n,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new eY({isServer:!0}),this.sealed=!1}e.prototype.collectStyles=function(e){if(this.sealed)throw eO(2);return o.createElement(e8,{sheet:this.instance},e)},e.prototype.interleaveWithNodeStream=function(e){throw eO(3)}}();var tp="#121212",tm="#212121",tf="#4a4a4a",th="#a6a6a6",tg="#ffffff",ty="#00ccff",tv="#00ff99",tb="#9933ff",tE="#ff6666",t_="#fff35c",tw=r(28175);function tC(e,t,r,n){var a,o=!1,i=0;function s(){a&&clearTimeout(a)}function l(){for(var l=arguments.length,c=Array(l),u=0;u<l;u++)c[u]=arguments[u];var d=this,p=Date.now()-i;function m(){i=Date.now(),r.apply(d,c)}o||(n&&!a&&m(),s(),void 0===n&&p>e?m():!0!==t&&(a=setTimeout(n?function(){a=void 0}:m,void 0===n?e-p:e)))}return"boolean"!=typeof t&&(n=r,r=t,t=void 0),l.cancel=function(){s(),o=!0},l}function tS(e,t,r){return void 0===r?tC(e,t,!1):tC(e,r,!1!==t)}r(36889);var tk=Object.defineProperty,tx=Object.getOwnPropertySymbols,tI=Object.prototype.hasOwnProperty,tA=Object.prototype.propertyIsEnumerable,tN=(e,t,r)=>t in e?tk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,tP=(e,t)=>{for(var r in t||(t={}))tI.call(t,r)&&tN(e,r,t[r]);if(tx)for(var r of tx(t))tA.call(t,r)&&tN(e,r,t[r]);return e},tM=(e,t,r)=>{let n=(0,a.ei)(e,[r]),o=(0,a.ei)(t,[r]);return n[r]&&o[r]?tP(tP(tP({},e),t),{[r]:n[r]+", "+o[r]}):tP(tP({},e),t)},tR=("undefined"!=typeof window?window:global)||{},tO=`${(null==tR?void 0:tR.GIPHY_PINGBACK_URL)||"https://pingback.giphy.com"}/v2/pingback?apikey=l0HlIwPWyBBUDAUgM`,tL=e=>{let t=(0,a.iJ)();return(null==t||t.set("Content-Type","application/json"),a.Yd.debug("Pingback session",e),e.length)?fetch(tO,{method:"POST",body:JSON.stringify({events:e}),headers:t}).catch(e=>{a.Yd.warn(`pingbacks failing to post ${e}`)}):new Promise(e=>e())},t$=[];tR.giphyRandomId=(0,a.u8)();var tj="";function tT(){let e=[...t$];t$=[],tL(e)}var tD=tS(1e3,tT);null==(n=tR.addEventListener)||n.call(tR,"beforeunload",tT);var tF=({userId:e,eventType:t,actionType:r,attributes:n,queueEvents:o=!0,analyticsResponsePayload:i})=>{tj=e?String(e):tj;let s={ts:Date.now(),attributes:n,action_type:r,user_id:(0,a.u8)(),analytics_response_payload:i};tj&&(s.logged_in_user_id=tj),s.analytics_response_payload&&(s.analytics_response_payload=`${s.analytics_response_payload}${a.Yd.ENABLED?"&mode=verification":""}`),t&&(s.event_type=t),t$.push(s),o?tD():tT()},tB=r(53125),tU=r(78217),tW=r(85859),tG=r(72146),tZ=r(73893),tK=r(4687),tH=Object.defineProperty,tV=Object.defineProperties,tz=Object.getOwnPropertyDescriptors,tq=Object.getOwnPropertySymbols,tY=Object.prototype.hasOwnProperty,tQ=Object.prototype.propertyIsEnumerable,tJ=(e,t,r)=>t in e?tH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,tX=(e,t)=>{for(var r in t||(t={}))tY.call(t,r)&&tJ(e,r,t[r]);if(tq)for(var r of tq(t))tQ.call(t,r)&&tJ(e,r,t[r]);return e},t0=(e,t)=>tV(e,tz(t)),t1=(e,t)=>{var r={};for(var n in e)tY.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&tq)for(var n of tq(e))0>t.indexOf(n)&&tQ.call(e,n)&&(r[n]=e[n]);return r},t2=(e,t,r)=>new Promise((n,a)=>{var o=e=>{try{s(r.next(e))}catch(e){a(e)}},i=e=>{try{s(r.throw(e))}catch(e){a(e)}},s=e=>e.done?n(e.value):Promise.resolve(e.value).then(o,i);s((r=r.apply(e,t)).next())}),t4=e=>{var t,r;if(!e)return"";let n=null==(r=null==(t=null==e?void 0:e.split("."))?void 0:t.pop())?void 0:r.toLowerCase();return e.replace(`.${n}`,`/80h.${n}`)},t3=tu.img`
    object-fit: cover;
    width: 32px;
    height: 32px;
    margin-right: 8px;
`,t8=({user:e,className:t=""})=>{let r=(0,o.useRef)(Math.floor(5*Math.random())+1),n=e.avatar_url?t4(e.avatar_url):`https://media.giphy.com/avatars/default${r.current}.gif`;return o.createElement(t3,{src:n,className:t})},t6=({className:e="",size:t=17,fill:r="#15CDFF"})=>o.createElement("svg",{className:[t6.className,e].join(" "),height:t,width:"19px",viewBox:"0 0 19 17"},o.createElement("path",{className:t6.checkMarkClassName,d:"M9.32727273,9.44126709 L9.32727273,3.03016561 L6.55027155,3.03016561 L6.55027155,10.8150746 L6.55027155,12.188882 L12.1042739,12.188882 L12.1042739,9.44126709 L9.32727273,9.44126709 Z",fill:tp,transform:"translate(9.327273, 7.609524) scale(-1, 1) rotate(-45.000000) translate(-9.327273, -7.609524) "}),o.createElement("g",{transform:"translate(-532.000000, -466.000000)",fill:r},o.createElement("g",{transform:"translate(141.000000, 235.000000)"},o.createElement("g",{transform:"translate(264.000000, 0.000000)"},o.createElement("g",{transform:"translate(10.000000, 224.000000)"},o.createElement("g",{transform:"translate(114.000000, 2.500000)"},o.createElement("path",{d:"M15.112432,4.80769231 L16.8814194,6.87556817 L19.4157673,7.90116318 L19.6184416,10.6028916 L21.0594951,12.9065042 L19.6184416,15.2101168 L19.4157673,17.9118452 L16.8814194,18.9374402 L15.112432,21.0053161 L12.4528245,20.3611511 L9.79321699,21.0053161 L8.02422954,18.9374402 L5.48988167,17.9118452 L5.28720734,15.2101168 L3.84615385,12.9065042 L5.28720734,10.6028916 L5.48988167,7.90116318 L8.02422954,6.87556817 L9.79321699,4.80769231 L12.4528245,5.4518573 L15.112432,4.80769231 Z M17.8163503,10.8991009 L15.9282384,9.01098901 L11.5681538,13.3696923 L9.68115218,11.4818515 L7.81302031,13.3499833 L9.7011322,15.2380952 L11.5892441,17.1262071 L17.8163503,10.8991009 Z"})))))));t6.className="giphy-verified-badge",t6.checkMarkClassName="giphy-verified-checkmark";var t5=tu.div`
    color: white;
    font-size: 16px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    -webkit-font-smoothing: antialiased;
`,t9=tu(t6)`
    margin-left: 4px;
    flex-shrink: 0;
`,t7=tu.div`
    display: flex;
    align-items: center;
    min-width: 0;
`,re=({user:e})=>{let{display_name:t,username:r}=e;return o.createElement(t7,null,o.createElement(t5,null,t||`@${r}`),e.is_verified?o.createElement(t9,{size:14}):null)},rt=tu.div`
    display: flex;
    align-items: center;
    font-family: interface, helvetica, arial;
`,rr=tu(t8)`
    flex-shrink: 0;
`,rn=({gif:e,className:t,onClick:r})=>{let{user:n}=e;return(null==n?void 0:n.username)||(null==n?void 0:n.display_name)?o.createElement(rt,{className:[rn.className,t].join(" "),onClick:t=>{if(t.preventDefault(),t.stopPropagation(),r)r(e);else{let e=n.profile_url;e&&window.open(e,"_blank")}}},o.createElement(rr,{user:n}),o.createElement(re,{user:e.user})):null};rn.className="giphy-attribution";var ra=tu.div`
    background: linear-gradient(rgba(0, 0, 0, 0), rgba(18, 18, 18, 0.6));
    cursor: default;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 75px;
    pointer-events: none;
`,ro=tu(rn)`
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
`,ri=tu.div`
    transition: opacity 150ms ease-in;
`,rs=({gif:e,isHovered:t,onClick:r})=>{let n=(0,o.useRef)(t);return t&&(n.current=!0),e.user&&n.current?o.createElement(ri,{style:{opacity:t?1:0}},o.createElement(ra,null),o.createElement(ro,{gif:e,onClick:r})):null},rl=({children:e,className:t,onVisibleChange:r,config:n})=>{let a=(0,o.useRef)(null);return(0,o.useEffect)(()=>{let e;return a.current&&(e=new IntersectionObserver(([e])=>{r&&r(e.isIntersecting)},n)).observe(a.current),()=>null==e?void 0:e.disconnect()},[r,a,n]),o.createElement("div",{ref:a,className:t},e)},rc=e=>(t,r,n,o={})=>{t.analytics_response_payload&&tF({analyticsResponsePayload:t.analytics_response_payload,userId:r,actionType:e,attributes:tX({position:JSON.stringify((0,a.VK)(n))},o)})},ru=(e,t,r,n={})=>{e.analytics_response_payload&&tF({analyticsResponsePayload:e.analytics_response_payload,userId:t,actionType:"SEEN",attributes:tX({position:JSON.stringify(r)},n)})},rd=rc("CLICK"),rp=rc("HOVER"),rm=(0,o.createContext)({}),rf=({attributes:e,children:t})=>{let{attributes:r={}}=(0,o.useContext)(rm);return o.createElement(rm.Provider,{value:{attributes:tM(r,e,"layout_type")}},t)},rh=tu.div`
    position: relative;
    display: block;
    picture {
        display: block;
        width: 100%;
        height: 100%;
    }
    img {
        display: block;
    }
    .${t6.className} {
        g {
            fill: white;
        }
    }
    .${t6.checkMarkClassName} {
        opacity: 0;
    }
`,rg=[ty,tv,tb,tE,t_],ry=()=>rg[Math.round(Math.random()*(rg.length-1))],rv="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",rb=!!("undefined"!=typeof window&&window.document&&window.document.createElement),rE=()=>{},r_=({children:e})=>{let[t,r]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{r(!0)},[]),t?o.createElement(o.Fragment,null,e):null},rw=({gif:e,width:t,percentWidth:r,height:n,onGifRightClick:i=rE,className:s="",onGifClick:l=rE,onGifKeyPress:c=rE,onGifSeen:u=rE,onGifVisible:d=rE,user:p={},backgroundColor:m,overlay:f,hideAttribution:h=!1,noLink:g=!1,borderRadius:y=4,style:v,tabIndex:b})=>{let E;let[_,w]=(0,o.useState)(!1),[C,S]=(0,o.useState)(!1),[k,x]=(0,o.useState)(!rb),[I,A]=(0,o.useState)(""),N=(0,o.useRef)(ry()),P=(0,o.useRef)(null),M=(0,o.useRef)(null),R=(0,o.useRef)(),O=(0,o.useRef)(),L=(0,o.useRef)(),$=(0,o.useRef)(rE),{attributes:j}=(0,o.useContext)(rm),T=f;T||h||(T=rs),$.current=t=>{w(!0),a.Yd.debug(`GIF ${e.id} seen. ${e.title}`),ru(e,null==p?void 0:p.id,t.boundingClientRect,j),null==u||u(e,t.boundingClientRect),O.current&&O.current.disconnect()};let D=()=>{O.current||(O.current=new IntersectionObserver(([e])=>{e.isIntersecting&&$.current(e)},{threshold:[.99]})),!_&&P.current&&O.current&&O.current.observe(P.current)};(0,o.useEffect)(()=>{var t,r;(null==(t=M.current)?void 0:t.complete)&&(D(),d(e)),null==(r=O.current)||r.disconnect(),w(!1)},[e.id]),(0,o.useEffect)(()=>(R.current=new IntersectionObserver(([e])=>{let{isIntersecting:t}=e;x(t),!t&&O.current&&O.current.disconnect()}),R.current.observe(P.current),()=>{R.current&&R.current.disconnect(),O.current&&O.current.disconnect(),L.current&&clearTimeout(L.current)}),[]);let F=n||(0,a.f8)(e,t);if(r){let e=Math.round(F/t*100);E=`${e}%`}let B=(0,a.oj)(e.images,t,F),U=e.images[B.renditionName],W=m||(e.is_sticker?"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAA4AQMAAACSSKldAAAABlBMVEUhIiIWFhYoSqvJAAAAGElEQVQY02MAAv7///8PWxqIPwDZw5UGABtgwz2xhFKxAAAAAElFTkSuQmCC') 0 0":N.current),G=y?"hidden":"unset";return o.createElement(rh,{as:g?"div":"a",href:g?void 0:e.url,"data-giphy-id":e.id,"data-giphy-is-sticker":e.is_sticker,style:tX({width:r||t,height:E||F,overflow:G,borderRadius:y},v),className:[rw.className,s].join(" "),onMouseOver:t=>{clearTimeout(L.current),t.persist(),S(!0),L.current=window.setTimeout(()=>{rp(e,null==p?void 0:p.id,t.target,j)},200)},onMouseLeave:()=>{clearTimeout(L.current),S(!1)},onClick:t=>{rd(e,null==p?void 0:p.id,t.target,j),l(e,t)},onContextMenu:t=>i(e,t),onKeyPress:t=>{c(e,t)},tabIndex:b,ref:P},o.createElement("picture",null,o.createElement("source",{type:"image/webp",srcSet:k?U.webp:rv,suppressHydrationWarning:!0}),o.createElement("img",{ref:M,suppressHydrationWarning:!0,className:[rw.imgClassName,I].join(" "),src:k?U.url:rv,style:{background:W},width:"100%",height:"100%",alt:(0,a.PY)(e),onLoad:k?t=>{D(),d(e,t),A(rw.imgLoadedClassName)}:()=>{}})),T&&o.createElement(r_,null,k&&o.createElement(T,{gif:e,isHovered:C,width:t,height:F})))};rw.className="giphy-gif",rw.imgClassName="giphy-gif-img",rw.imgLoadedClassName="giphy-img-loaded";var rC=rw,rS=tu.div`
    -webkit-overflow-scrolling: touch;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    position: relative;
`,rk=tu(rC)`
    position: relative;
    display: inline-block;
    list-style: none;
    margin-left: ${e=>e.$ml}px;
    /* make sure gifs are fully visible with a scrollbar */
    margin-bottom: 1px;

    &:first-of-type {
        margin-left: 0;
    }
    .${rC.imgClassName} {
        position: absolute;
        top: 0;
        left: 0;
    }
`,rx=tu(rl)`
    display: inline-block;
`,rI=tu.div`
    width: 30px;
    display: inline-block;
    opacity: ${e=>e.$isFirstLoad?0:1};
    height: ${e=>e.$height}px;
`,rA=Object.freeze({gutter:6,user:{},initialGifs:[]}),rN=Object.freeze({isFetching:!1,gifs:[],isLoaderVisible:!1,isDoneFetching:!1}),rP=class e extends o.PureComponent{constructor(){super(...arguments),this.state=t0(tX({},rN),{gifs:this.props.initialGifs||[]}),this.unmounted=!1,this.paginator=(0,tw.mY)(this.props.fetchGifs,this.state.gifs),this.onLoaderVisible=e=>{this.unmounted||this.setState({isLoaderVisible:e},this.onFetch)},this.onFetch=tS(100,()=>t2(this,null,function*(){if(this.unmounted)return;let{isFetching:e,isLoaderVisible:t,gifs:r}=this.state;if(!e&&t){let e;this.setState({isFetching:!0});try{e=yield this.paginator()}catch(e){this.setState({isFetching:!1})}if(e){if(r.length===e.length)this.setState({isDoneFetching:!0});else{this.setState({gifs:e,isFetching:!1});let{onGifsFetched:t}=this.props;t&&t(e),this.onFetch()}}}}))}componentDidMount(){this.unmounted=!1,this.onFetch()}componentWillUnmount(){this.unmounted=!0}render(){let{onGifVisible:t,onGifRightClick:r,gifHeight:n,gifWidth:i,gutter:s,className:l=e.className,onGifSeen:c,onGifClick:u,onGifKeyPress:d,user:p,overlay:m,hideAttribution:f,noLink:h,noResultsMessage:g,backgroundColor:y,borderRadius:v,tabIndex:b=0,loaderConfig:E}=this.props,{gifs:_,isDoneFetching:w}=this.state,C=!w,S=0===_.length;return o.createElement(rf,{attributes:{layout_type:"CAROUSEL"}},o.createElement(rS,{className:l},_.map(e=>o.createElement(rk,{gif:e,key:e.id,tabIndex:b,width:i||(0,a.Ol)(e,n),height:n,onGifClick:u,onGifKeyPress:d,onGifSeen:c,onGifVisible:t,onGifRightClick:r,user:p,$ml:s,overlay:m,hideAttribution:f,noLink:h,borderRadius:v,backgroundColor:y})),!C&&0===_.length&&g,C&&o.createElement(rx,{onVisibleChange:this.onLoaderVisible,config:E},o.createElement(rI,{$isFirstLoad:S,$height:n}))))}};rP.className="giphy-carousel",rP.defaultProps=rA;var rM=tu.div`
    color: ${th};
    display: flex;
    justify-content: center;
    margin: 30px 0;
    font-family: interface, Helvetica Neue, helvetica, sans-serif;
    font-size: 16px;
    font-weight: 600;
    a {
        color: ${ty};
        cursor: pointer;
        &:hover {
            color: white;
        }
    }
`,rR=({onClick:e})=>o.createElement(rM,null,"Error loading GIFs.\xa0",o.createElement("a",{onClick:e},"Try again?")),rO=tu.div`
    align-items: center;
    background-color: ${({$backgroundColor:e})=>e};
    border-radius: 16px;
    display: flex;
    max-width: fit-content;
    overflow: hidden;
    padding: 4px 5px 5px 6px;
`,rL=tu.div`
    overflow-x: auto;
    overflow-y: hidden;
    position: relative;
    -webkit-overflow-scrolling: touch;
`,r$=tu.div`
    display: inline-flex;
    justify-content: space-between;
    overflow: hidden;
    white-space: nowrap;
    width: ${({$width:e})=>`${e}px`};
`,rj=tu.div`
    background-color: ${({$color:e})=>e};
    box-sizing: border-box;
    height: ${({$gifHeight:e})=>`${Math.round(.75*e)}px`};
    margin: ${({$gutter:e})=>`0 ${e}px`};
    width: 2px;
`,rT=tu(rC)`
    display: inline-block;
    flex-shrink: 0;
    list-style: none;
    /* make sure gifs are fully visible with a scrollbar */
    margin-bottom: 1px;
    position: relative;

    .${rC.imgClassName} {
        position: absolute;
        top: 0;
        left: 0;
    }
`;function rD(e){var t,r;let{backgroundColor:n="#2e2e2e",className:i,dividerColor:s=tf,fetchVariations:l,gif:c,gifHeight:u,GifProps:d={},gifWidth:p,gutter:m=6,hideAttribution:f,loader:h,noLink:g,onGifClick:y,onGifKeyPress:v,onGifRightClick:b,onGifSeen:E,onGifVisible:_,onVariationsFetched:w,overlay:C,tabIndex:S=0,user:k}=e,x=t1(e,["backgroundColor","className","dividerColor","fetchVariations","gif","gifHeight","GifProps","gifWidth","gutter","hideAttribution","loader","noLink","onGifClick","onGifKeyPress","onGifRightClick","onGifSeen","onGifVisible","onVariationsFetched","overlay","tabIndex","user"]),I=null!=(t=c.variation_count)?t:0,A=p||(0,a.Ol)(c,u),N=I*A+Math.max(0,I-1)*m,P=(0,tU.Z)(l),M=(0,tU.Z)(w),[R,O]=(0,tB.Z)(()=>t2(this,null,function*(){var e;let t=yield P.current(c.id),r=null!=(e=null==t?void 0:t.data)?e:[];return M.current&&M.current(r),r}),[c],{loading:!0,value:[]});(0,o.useEffect)(()=>{O()},[O]);let L=tX({backgroundColor:"transparent",height:u,hideAttribution:f,noLink:g,onGifClick:y,onGifKeyPress:v,onGifRightClick:b,onGifSeen:E,onGifVisible:_,overlay:C,tabIndex:S,user:k,width:A},d);return o.createElement(rO,tX({$backgroundColor:n,className:[rD.className,i].join(" ")},x),o.createElement(rT,t0(tX({},L),{gif:c})),I?o.createElement(rj,{className:rD.dividerClassName,$color:s,$gifHeight:u,$gutter:m}):null,o.createElement(rL,{className:rD.variationsViewportClassName},o.createElement(r$,{className:rD.variationsContainerClassName,$width:N},R.loading?h?o.createElement(h,{className:rD.loaderClassName}):null:R.error?o.createElement(rR,{onClick:O}):o.createElement(o.Fragment,null,(null!=(r=R.value)?r:[]).map(e=>o.createElement(rT,t0(tX({},L),{key:e.id,gif:e})))))))}rD.className="giphy-emoji-variations-list",rD.dividerClassName="giphy-emoji-variations-divider",rD.loaderClassName="giphy-emoji-variations-loader",rD.variationsViewportClassName="giphy-emoji-variations-viewport",rD.variationsContainerClassName="giphy-emoji-variations-container";var rF=td`
     to {
    transform: scale(1.75) translateY(-20px);
  }
`,rB=tu.div`
    display: flex;
    align-items: center;
    height: ${37}px;
    padding-top: 15px;
    margin: 0 auto;
    text-align: center;
    justify-content: center;
    animation: pulse 0.8s ease-in-out 0s infinite alternate backwards;
`,rU=tu.div`
    display: inline-block;
    height: 10px;
    width: 10px;
    margin: ${37}px 10px 10px 10px;
    position: relative;
    box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.3);
    animation: ${rF} cubic-bezier(0.455, 0.03, 0.515, 0.955) 0.75s infinite alternate;
    background: ${e=>e.$color};
    animation-delay: ${e=>e.$delay};
`,rW=({className:e=""})=>o.createElement(rB,{className:e},o.createElement(rU,{$color:tv,$delay:"0"}),o.createElement(rU,{$color:ty,$delay:".1s"}),o.createElement(rU,{$color:tb,$delay:".2s"}),o.createElement(rU,{$color:tE,$delay:".3s"}),o.createElement(rU,{$color:t_,$delay:".4s"})),rG=(0,o.memo)(({columns:e,gutter:t,useTransform:r=!0,itemWidth:n,itemHeights:a,children:i,columnOffsets:s=[]})=>{let l={};return o.createElement("div",{style:l},function(){let c;let u=function(e,t=[]){return Array.apply(null,Array(e)).map((e,r)=>t[r]||0)}(e,s),d=o.Children.map(i,(e,i)=>{let s={position:"absolute"};c=u.indexOf(Math.min.apply(Math,u));let l=`${u[c]}px`,d=`${c*n+c*t}px`;r?s.transform=`translate3d(${d}, ${l}, 0)`:(s.top=l,s.left=d);let p=a[i];return p&&(u[c]+=p+t),o.cloneElement(e,{style:s})});return l.position="relative",l.width=`${e*n+(e-1)*t}px`,l.height=`${Math.max.apply(Math,u)-t}px`,d}())}),rZ=tu.div`
    opacity: ${e=>e.$isFirstLoad?0:1};
`,rK=Object.freeze({gutter:6,user:{},initialGifs:[]}),rH=Object.freeze({isFetching:!1,isError:!1,gifWidth:0,gifs:[],isLoaderVisible:!1,isDoneFetching:!1}),rV=class e extends o.PureComponent{constructor(){super(...arguments),this.state=t0(tX({},rH),{gifs:this.props.initialGifs||[]}),this.unmounted=!1,this.paginator=(0,tw.mY)(this.props.fetchGifs,this.state.gifs),this.onLoaderVisible=e=>{this.unmounted||this.setState({isLoaderVisible:e},this.onFetch)},this.onFetch=tS(e.fetchDebounce,()=>t2(this,null,function*(){if(this.unmounted)return;let{isFetching:e,isLoaderVisible:t,gifs:r}=this.state,n=r.length;if(!e&&t){let e;this.setState({isFetching:!0,isError:!1});try{if(e=yield this.paginator(),this.unmounted)return}catch(t){if(this.unmounted)return;this.setState({isFetching:!1,isError:!0});let{onGifsFetchError:e}=this.props;e&&e(t)}if(e){if(n===e.length)this.setState({isDoneFetching:!0});else{this.setState({gifs:e,isFetching:!1});let{onGifsFetched:t}=this.props;t&&t(e),this.onFetch()}}}}))}componentDidMount(){this.unmounted=!1,this.onFetch()}componentWillUnmount(){this.unmounted=!0}render(){let{onGifVisible:t,onGifRightClick:r,className:n=e.className,onGifSeen:i,onGifClick:s,onGifKeyPress:l,user:c,overlay:u,hideAttribution:d,noLink:p,borderRadius:m,noResultsMessage:f,columns:h,width:g,gutter:y,useTransform:v,columnOffsets:b,backgroundColor:E,loaderConfig:_,tabIndex:w=0,layoutType:C="GRID",loader:S=rW}=this.props,{gifWidth:k,gifs:x,isError:I,isDoneFetching:A}=this.state,N=!A,P=0===x.length,M=x.map(e=>(0,a.f8)(e,k));return o.createElement(rf,{attributes:{layout_type:C}},o.createElement("div",{className:n,style:{width:g}},o.createElement(rG,{itemHeights:M,useTransform:v,itemWidth:k,columns:h,gutter:y,columnOffsets:b},x.map(e=>o.createElement(rC,{gif:e,tabIndex:w,key:e.id,width:k,onGifClick:s,onGifKeyPress:l,onGifSeen:i,onGifVisible:t,onGifRightClick:r,user:c,overlay:u,backgroundColor:E,hideAttribution:d,noLink:p,borderRadius:m}))),!N&&0===x.length&&f,I?o.createElement(rR,{onClick:this.onFetch}):N&&o.createElement(rl,{onVisibleChange:this.onLoaderVisible,config:_},o.createElement(rZ,{$isFirstLoad:P},o.createElement(S,{className:e.loaderClassName})))))}};rV.className="giphy-grid",rV.loaderClassName="loader",rV.fetchDebounce=250,rV.defaultProps=rK,rV.getDerivedStateFromProps=({columns:e,gutter:t,width:r},n)=>{let a=Math.floor((r-t*(e-1))/e);return n.gifWidth!==a?{gifWidth:a}:null};var rz=rV,rq={searchbarHeight:"--searchbar-height",bgColor:"--searchbar-bg-color",bgColor2:"--searchbar-bg-color-2",fgColor:"--searchbar-fg-color",cancelButtonDisplay:"--searchbar-cancel-button-display"},rY=(tu.div`
    ${rq.searchbarHeight}: ${e=>e.$searchbarHeight||42}px;
    @media (${e=>e.$mobileMediaQuery}) {
        ${rq.searchbarHeight}: ${e=>e.$mobileSearchbarHeight||35}px;
    }
    ${rq.bgColor}: ${tg};
    ${rq.bgColor2}: ${tg};
    ${rq.fgColor}: ${tp};
    ${e=>e.$darkMode&&tc`
            ${rq.fgColor}: ${tg};
            ${rq.bgColor}: ${tp};
            ${rq.bgColor2}: ${tf};
        `}
    ${rq.cancelButtonDisplay}: ${e=>e.$hideCancelButton?"none":"block"};
`,(0,o.createContext)({})),rQ=(0,o.createContext)({}),rJ=tu.svg`
    position: relative;
    right: 10px;
    margin-left: 5px;
    cursor: pointer;
    display: var(${rq.cancelButtonDisplay});
`,rX=({width:e=17,height:t=17,setCleared:r})=>{let{term:n,setActiveChannel:a,activeChannel:i}=(0,o.useContext)(rY);return n||i?o.createElement(rJ,{className:rX.className,width:e,height:t,viewBox:"0 0 17 17",version:"1.1",xmlns:"http://www.w3.org/2000/svg",onClick:e=>{e.stopPropagation(),e.preventDefault(),r(!0),a(void 0)}},o.createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",opacity:"0.582730817"},o.createElement("g",{transform:"translate(-300.000000, -150.000000)",fill:"#8E8E93",fillRule:"nonzero"},o.createElement("g",{transform:"translate(0.000000, 135.000000)"},o.createElement("g",null,o.createElement("g",null,o.createElement("g",{transform:"translate(11.000000, 13.000000)"},o.createElement("g",{transform:"translate(289.000000, 2.000000)"},o.createElement("path",{d:"M8.5,0 C3.805875,0 0,3.805875 0,8.5 C0,13.194125 3.805875,17 8.5,17 C13.194125,17 17,13.194125 17,8.5 C17,3.805875 13.194125,0 8.5,0 Z M9.50158333,8.5 C9.50158333,8.5 11.7250417,10.7234583 11.834125,10.8325417 C12.1110833,11.1095 12.1110833,11.557875 11.834125,11.834125 C11.5571667,12.1110833 11.1087917,12.1110833 10.8325417,11.834125 C10.7234583,11.72575 8.5,9.50158333 8.5,9.50158333 C8.5,9.50158333 6.27654167,11.7250417 6.16745833,11.834125 C5.8905,12.1110833 5.442125,12.1110833 5.165875,11.834125 C4.88891667,11.5571667 4.88891667,11.1087917 5.165875,10.8325417 C5.27425,10.7234583 7.49841667,8.5 7.49841667,8.5 C7.49841667,8.5 5.27495833,6.27654167 5.165875,6.16745833 C4.88891667,5.8905 4.88891667,5.442125 5.165875,5.165875 C5.44283333,4.88891667 5.89120833,4.88891667 6.16745833,5.165875 C6.27654167,5.27425 8.5,7.49841667 8.5,7.49841667 C8.5,7.49841667 10.7234583,5.27495833 10.8325417,5.165875 C11.1095,4.88891667 11.557875,4.88891667 11.834125,5.165875 C12.1110833,5.44283333 12.1110833,5.89120833 11.834125,6.16745833 C11.72575,6.27654167 9.50158333,8.5 9.50158333,8.5 Z",opacity:"0.75"}))))))))):null};rX.className="giphy-search-bar-cancel";var r0=`calc(var(${rq.searchbarHeight}) - 12px)`,r1=tu(t8)`
    height: ${r0};
    margin: 0;
    width: 0;
    animation: ${td`
to {
    width: ${r0};
}
`} 100ms ease-in-out forwards;
`,r2=tu.div`
    background: var(${rq.bgColor2});
    display: flex;
    align-items: center;
    padding-left: ${6}px;
`,r4=tu.div`
    background: ${"#ececec"};
    display: flex;
    padding: 0 4px;
    color: ${"#3e3e3e"};
    font-family: interface, Helvetica Neue, helvetica, sans-serif;
    font-weight: 600;
    font-size: 12px;
    align-items: center;
    height: ${r0};
    @media (max-width: 480px) {
        display: none;
    }
`,r3=({className:e=""})=>{let{activeChannel:t}=(0,o.useContext)(rY);return t?o.createElement(r2,{className:e},o.createElement(r1,{user:t.user}),o.createElement(r4,{key:t.id},o.createElement("div",null,"@",t.user.username),t.user.is_verified&&o.createElement(t6,{size:14}))):null},r8="#E646B6",r6="#FF6666",r5="cubic-bezier(0.920, 0.240, 0.185, 0.730)",r9=td`
    0% {
      transform: rotate(34deg) translate(-10px, 80px);
    };
    
    100% {
      transform: rotate(34deg) translate(-10px, -20px);
    }
`,r7=td`
    0% { 
      transform: translate(0px, 0px);
      opacity: 0;
    }
    50% {
      opacity: 1;
    }
    100% {
      transform: translate(10px, -17px);
      opacity: 0;
    }
`,ne=td`
    0% {
      opacity: 0;
      transform: translateX(-400%);
    }
    50% {
      opacity: 1;
    }
    100% {
      opacity: 0;
      transform: translateX(0);
    }
`,nt=tu.div`
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    cursor: pointer;
    @media screen and (-ms-high-contrast: active), screen and (-ms-high-contrast: none) {
        display: none;
    }
    height: var(${rq.searchbarHeight});
    width: var(${rq.searchbarHeight});
`,nr=tu.div`
    position: absolute;
    height: 100%;
    width: 100%;
    background: linear-gradient(45deg, ${r8} 0%, ${r6} 100%);
    border-radius: 0 4px 4px 0;
    overflow: hidden;
    &:before {
        animation: ${ne} ${"2s"} linear 0s infinite;
        background-image: linear-gradient(45deg, ${r8} 0%, ${r6} 50%, ${r8} 100%);
        background-size: 400%;
        background-position: 0% 100%;
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        right: 0;
        bottom: 0;
        width: 400%;
    }
`,nn=tu.div`
    width: 100%;
    height: 100%;
    position: absolute;
    overflow: hidden;
    &::after {
        content: '+';
        color: white;
        font-family: 'SS Standard';
        font-size: 8px;
        position: absolute;
        top: 65%;
        left: 66%;
        animation: ${r7} 1s ${r5} 0s 1 forwards;
    }
`,na=tu.div`
    position: absolute;
    width: 200%;
    height: 20px;
    background: rgba(255, 255, 255, 0.5);
    transform: rotate(34deg) translate(-10px, -20px);
    animation: ${r9} 1s ${r5} 0s 1;
    filter: blur(1px);
`,no=tu(({className:e=""})=>o.createElement("svg",{viewBox:"0 0 30 30",version:"1.1",className:e},o.createElement("defs",null,o.createElement("path",{d:"M11.5482521,20.4090671 L4.24727698,28.2009189 C3.68084207,28.8054377 2.73159653,28.8363108 2.12707771,28.2698759 C1.5225589,27.703441 1.4916858,26.7541954 2.0581207,26.1496766 L9.40599838,18.3077689 C7.95982241,16.4371424 7.0978836,14.0789715 7.0978836,11.5181818 C7.0978836,5.44914339 11.9392549,0.518181818 17.9252787,0.518181818 C23.9113026,0.518181818 28.7526738,5.44914339 28.7526738,11.5181818 C28.7526738,17.5872202 23.9113026,22.5181818 17.9252787,22.5181818 C15.539851,22.5181818 13.3361963,21.7351359 11.5482521,20.4090671 Z M17.9252787,19.5181818 C22.242011,19.5181818 25.7526738,15.9425536 25.7526738,11.5181818 C25.7526738,7.09381 22.242011,3.51818182 17.9252787,3.51818182 C13.6085464,3.51818182 10.0978836,7.09381 10.0978836,11.5181818 C10.0978836,15.9425536 13.6085464,19.5181818 17.9252787,19.5181818 Z",id:"giphy-search-icon-path-1"})),o.createElement("g",{id:"search",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},o.createElement("g",{id:"icons/search"},o.createElement("mask",{id:"giphy-search-icon-mask-2",fill:"white"},o.createElement("use",{xlinkHref:"#giphy-search-icon-path-1"})),o.createElement("use",{id:"Mask",fill:"#FFFFFF",fillRule:"nonzero",xlinkHref:"#giphy-search-icon-path-1"}),o.createElement("g",{mask:"url(#giphy-search-icon-mask-2)"},o.createElement("g",{transform:"translate(0.250000, 0.250000)"},o.createElement("g",null)))))))`
    z-index: 1;
    display: flex;
    width: 50%;
    height: 50%;
`,ni=({onClick:e})=>{let{isFetching:t}=(0,o.useContext)(rY),r=(0,tG.Z)(t,1e3);return o.createElement(nt,{onClick:()=>null==e?void 0:e()},o.createElement(nr,null),o.createElement(no,null),r&&o.createElement(nn,null,o.createElement(na,null)))},ns=500,nl=tu.div`
    display: flex;
    background: white;
    align-items: center;
    border-radius: 4px;
    height: var(${rq.searchbarHeight});
    background: var(${rq.bgColor2});
`,nc=tu.input`
    background: inherit;
    box-sizing: border-box;
    border: 0;
    appearance: none;
    font-weight: normal;
    font-family: interface, Helvetica Neue, helvetica, sans-serif;
    outline: 0;
    font-size: 15px;
    padding: 0 10px;
    border-radius: 0;
    text-overflow: ellipsis;
    color: var(${rq.fgColor});
    &::placeholder {
        color: ${th};
    }
    min-width: 150px;
    flex: 1;
    ${e=>e.$isUsernameSearch&&tc`
            color: ${"#6157ff"};
        `}
`,nu=({className:e,placeholder:t="Search GIPHY",clear:r=!1,autoFocus:n,searchDebounce:a=ns,onEnter:i})=>{let{activeChannel:s,setActiveChannel:l,term:c,setChannels:u}=(0,o.useContext)(rY),{setIsFocused:d,_inputValOverride:p,_setSearch:m}=(0,o.useContext)(rQ),[f,h]=(0,o.useState)(c);(0,tW.Z)(()=>m(f),a,[f]);let g=(0,o.useRef)(null),y=function(e){let t=(0,o.useRef)(e);return(0,o.useEffect)(()=>{t.current=e}),t.current}(s),[v,b]=(0,o.useState)(r);return(0,o.useEffect)(()=>{var e;n&&(null==(e=g.current)||e.focus())},[n]),(0,o.useEffect)(()=>{var e;s&&!y&&(null==(e=g.current)||e.focus()," "===f?h(""):h(f.replace(/@?\w*\s?/,"")))},[f,s,y]),(0,o.useEffect)(()=>{b(r)},[r]),(0,o.useEffect)(()=>{h(p)},[p,h]),o.createElement(nl,{className:[nu.className,e].join(" ")},o.createElement(r3,null),o.createElement(nc,{$isUsernameSearch:0===c.indexOf("@"),onChange:({target:{value:e}})=>{v&&""===e||(b(!1),h(e))},onFocus:()=>{d(!0)},onBlur:()=>{d(!1)},value:v?"":f,placeholder:s?`Search ${s.display_name}`:t,autoCapitalize:"off",autoCorrect:"off",autoComplete:"off",ref:g,onKeyUp:e=>{let t=e.keyCode||e.key;switch(t){case 27:case"Escape":l(void 0),u([]);break;case 13:case"Enter":null==i||i(f)}},onKeyDown:e=>{let t=e.keyCode||e.key;switch(t){case 8:case"Backspace":""===f&&(l(void 0),u([]))}}}),o.createElement(rX,{setCleared:()=>h("")}),o.createElement(ni,{onClick:()=>null==i?void 0:i(f)}))};nu.className="giphy-search-bar";var nd=tu.div`
    background: ${tm};
    display: flex;
    padding-right: 4px;
    align-items: center;
    margin-right: ${9}px;
    cursor: pointer;
`,np=tu.div`
    background: ${tm};
    display: flex;
    padding: 14px;
    align-items: center;
    margin-right: ${9}px;
    white-space: nowrap;
    cursor: pointer;
    font-style: italic;
    border-radius: 20px;
`,nm=tu(t8)`
    height: var(${rq.searchbarHeight});
    width: var(${rq.searchbarHeight});
`,nf=tu(({size:e=18,className:t})=>o.createElement("svg",{width:e,height:e,viewBox:"0 0 18 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg",className:t},o.createElement("g",{id:"trending",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},o.createElement("g",null,o.createElement("rect",{id:"Rectangle",stroke:"#979797",fill:"#D8D8D8",opacity:"0",x:"0.5",y:"0.5",width:"17",height:"17"}),o.createElement("path",{d:"M12.6093329,3.12057664 L15.156896,3.12057664 L9.64199318,9.04253019 L6.88133868,6.8175119 C6.7544587,6.67603813 6.56616874,6.60087259 6.38404017,6.61897279 C6.2490402,6.63288422 6.11891631,6.69661171 6.02063992,6.79697337 C2.21226835,10.5943119 0.308082561,12.4929812 0.308082561,12.4929812 C0.308082561,12.4929812 0.527106106,12.8074292 0.710953088,13.0215425 C0.833517743,13.1642848 0.975497751,13.3098497 1.13689311,13.4582373 L6.47329888,8.13191205 L9.16381134,10.2953038 C9.40800276,10.5710787 9.68933701,10.7021044 10.019278,10.4570223 L16.0239805,4.04474473 C16.0239805,5.87956383 16.0239805,6.79697337 16.0239805,6.79697337 C16.0239805,6.79697337 16.4320205,6.79697337 17.2481004,6.79697337 L17.2481004,1.80604505 C14.1555887,1.80604505 12.6093329,1.80604505 12.6093329,1.80604505 C12.6093329,1.80604505 12.6093329,2.24422225 12.6093329,3.12057664 Z",id:"Shape",stroke:"#00CCFF",strokeWidth:"0.4",fill:"#00CCFF",fillRule:"nonzero",transform:"translate(8.778091, 7.632141) rotate(-2.000000) translate(-8.778091, -7.632141) "})))))`
    margin-right: 2px;
`,nh=({channel:e})=>{let{setActiveChannel:t}=(0,o.useContext)(rY);return o.createElement(nd,{key:e.id,onClick:()=>t(e)},o.createElement(nm,{user:e.user}),o.createElement("div",null,"@",e.user.username),e.user.is_verified&&o.createElement(t6,{size:14}))},ng=({trendingSearch:e})=>{let{setSearch:t}=(0,o.useContext)(rY);return o.createElement(np,{key:e,onClick:()=>t(e)},o.createElement(nf,{size:16}),e)},ny=tu.div`
    display: flex;
    color: white;
    flex-direction: row;
    font-family: 'interface';
    font-weight: 600;
    font-size: 14px;
    -webkit-overflow-scrolling: touch;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 10px;
    height: var(${rq.searchbarHeight});
`,nv=()=>{let{trendingSearches:e,currentChannels:t}=(0,o.useContext)(rY);return o.createElement(ny,{className:nv.className},t.length>0?t.map(e=>o.createElement(nh,{key:e.id,channel:e})):e.map(e=>o.createElement(ng,{key:e,trendingSearch:e})))};nv.className="giphy-suggestion-bar";var nb=({onClick:e})=>o.createElement("svg",{width:"66px",height:"13px",viewBox:"0 0 66 13",onClick:e},o.createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},o.createElement("g",{transform:"translate(-1060.000000, -462.000000)",fill:"#FFFFFF",fillRule:"nonzero"},o.createElement("g",{transform:"translate(931.000000, 286.375671)"},o.createElement("g",{transform:"translate(86.000000, 136.124329)"},o.createElement("path",{d:"M47.968,49.1962322 C49.588,49.1962322 51.052,48.6202322 51.58,47.5522322 L51.58,43.8202322 L47.476,43.8202322 L47.476,45.6802322 L49.6,45.6802322 L49.6,46.7602322 C49.12,47.1082322 48.424,47.1922322 47.98,47.1922322 C46.288,47.1922322 45.724,45.8602322 45.724,44.7802322 C45.724,43.1362322 46.612,42.3202322 47.98,42.3202322 C48.544,42.3202322 49.288,42.4762322 49.9,43.0522322 L51.28,41.6842322 C50.176,40.5682322 49.144,40.3282322 47.98,40.3282322 C44.824,40.3282322 43.384,42.5842322 43.384,44.7802322 C43.384,46.9762322 44.644,49.1962322 47.968,49.1962322 Z M54.928,48.9682322 L54.928,40.5682322 L52.564,40.5682322 L52.564,48.9682322 L54.928,48.9682322 Z M58.648,48.9682322 L58.648,46.7002322 L60.352,46.7002322 C62.596,46.6762322 63.724,45.3442322 63.724,43.6282322 C63.724,41.9842322 62.608,40.5682322 60.352,40.5682322 L56.272,40.5682322 L56.272,48.9682322 L58.648,48.9682322 Z M60.352,44.6962322 L58.648,44.6962322 L58.648,42.6082322 L60.352,42.6082322 C61,42.6082322 61.348,43.1122322 61.348,43.6642322 C61.348,44.2162322 61.012,44.6962322 60.352,44.6962322 Z M66.796,48.9802322 L66.796,45.8002322 L69.82,45.8002322 L69.82,48.9802322 L72.172,48.9802322 L72.172,40.5802322 L69.82,40.5802322 L69.82,43.7722322 L66.796,43.7722322 L66.796,40.5802322 L64.42,40.5802322 L64.42,48.9802322 L66.796,48.9802322 Z M78.16,48.9682322 L78.16,45.6202322 L81.496,40.6762322 L81.496,40.5682322 L78.82,40.5682322 L77.008,43.4482322 L75.268,40.5682322 L72.592,40.5682322 L72.592,40.6642322 L75.784,45.6202322 L75.784,48.9682322 L78.16,48.9682322 Z M87.796,49.1362322 C88.972,49.1362322 90.088,48.7402322 90.952,47.8882322 L90.028,46.9642322 C89.44,47.5522322 88.576,47.8762322 87.796,47.8762322 C85.624,47.8762322 84.712,46.3522322 84.7,44.8162322 C84.688,43.2682322 85.66,41.6962322 87.796,41.6962322 C88.576,41.6962322 89.368,41.9722322 89.968,42.5602322 L90.868,41.6962322 C90.016,40.8442322 88.924,40.4242322 87.796,40.4242322 C84.796,40.4242322 83.356,42.6202322 83.3679256,44.8282322 C83.38,47.0362322 84.748,49.1362322 87.796,49.1362322 Z M93.028,48.9682322 L93.028,40.5802322 L91.792,40.5802322 L91.792,48.9682322 L93.028,48.9682322 Z M94.252,41.3122322 C94.252,42.3322322 95.788,42.3322322 95.788,41.3122322 C95.788,40.3042322 94.252,40.3042322 94.252,41.3122322 Z M95.632,48.9682322 L95.632,43.0282322 L94.396,43.0282322 L94.396,48.9682322 L95.632,48.9682322 Z M98.188,51.7162322 L98.188,48.1042322 C98.632,48.8362322 99.556,49.1002322 100.276,49.1002322 C102.112,49.1002322 103.264,47.8042322 103.264,46.0162322 C103.264,44.2282322 102.04,42.9442322 100.276,42.9322322 C99.484,42.9322322 98.644,43.2922322 98.188,44.0122322 L98.116,43.0522322 L96.952,43.0522322 L96.952,51.7162322 L98.188,51.7162322 Z M100.156,47.9002322 C99.076,47.9002322 98.296,47.0722322 98.296,46.0162322 C98.296,44.9602322 99.016,44.1322322 100.156,44.1322322 C101.284,44.1322322 102.028,44.9002322 102.028,46.0162322 C102.028,47.1202322 101.236,47.9002322 100.156,47.9002322 Z M106.456,49.1482322 C107.992,49.1482322 108.964,48.3802322 108.976,47.2762322 C108.988,45.7522322 107.56,45.5122322 106.468,45.4162322 C105.712,45.3442322 105.196,45.1522322 105.184,44.6602322 C105.184,44.1922322 105.688,43.9402322 106.444,43.9522322 C107.032,43.9522322 107.536,44.0722322 108.004,44.5042322 L108.7,43.6882322 C108.04,43.1002322 107.332,42.8962322 106.42,42.8962322 C105.316,42.8962322 103.96,43.3882322 103.96,44.6962322 C103.972,46.0042322 105.256,46.3642322 106.372,46.4722322 C107.248,46.5562322 107.752,46.7602322 107.74,47.2882322 C107.728,47.8402322 107.068,48.0562322 106.48,48.0562322 C105.784,48.0442322 104.956,47.7922322 104.404,47.1802322 L103.756,48.0562322 C104.536,48.9322322 105.496,49.1482322 106.456,49.1482322 Z",id:"GIPHYClips"})))))),nE=tu.div`
    display: flex;
    align-items: center;
    font-family: interface, helvetica, arial;
    cursor: pointer;
`,n_=tu(t8)`
    flex-shrink: 0;
`,nw=tu.div`
    display: flex;
    flex-direction: column;
`,nC=({gif:e,className:t,onClick:r})=>{let{user:n}=e;return(null==n?void 0:n.username)||(null==n?void 0:n.display_name)?o.createElement(nE,{className:[nC.className,t].join(" "),onClick:t=>{if(t.preventDefault(),t.stopPropagation(),r)r(e);else{let e=n.profile_url;e&&window.open(e,"_blank")}}},o.createElement(n_,{user:n}),o.createElement(nw,null,o.createElement(nb,{onClick:t=>{t.preventDefault(),t.stopPropagation(),r?r(e):e.url&&window.open(e.url,"_blank")}}),o.createElement(re,{user:n}))):null};nC.className="giphy-attribution";var nS=25,nk=({size:e=nS,onClick:t=()=>{}})=>o.createElement("svg",{width:e,height:e,viewBox:"0 0 26 23",onClick:t},o.createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},o.createElement("g",{transform:"translate(1.000000, 0.000000)",fill:"#FFF",fillRule:"nonzero"},o.createElement("path",{d:"M11.9625091,0.572584405 L11.9625091,22.2272644 C11.9625091,22.4856644 11.8466091,22.6635044 11.6151891,22.7611644 C11.3480491,22.8413444 11.1390491,22.7968844 10.9878091,22.6277844 L4.8732291,15.9143244 L0.573909096,15.9143244 C0.413549096,15.9143244 0.277509096,15.8588444 0.166549096,15.7475044 C0.0573082348,15.6406091 -0.00292164572,15.4933347 -1.77635684e-15,15.3405244 L-1.77635684e-15,7.45058441 C-1.77635684e-15,7.29022441 0.0555890961,7.15456441 0.167309096,7.04322441 C0.278269096,6.93226441 0.414309096,6.87640441 0.573909096,6.87640441 L4.8732291,6.87640441 L10.9874291,0.172064405 C11.1390491,0.00296440549 11.3484291,-0.0414955945 11.6151891,0.0386844055 C11.8466091,0.136344405 11.9621291,0.314564405 11.9621291,0.572584405 L11.9625091,0.572584405 Z"}),o.createElement("path",{d:"M15.7579491,16.0914044 L14.6798891,13.6594044 C15.5739159,13.2635547 16.1503537,12.3776671 16.1501091,11.3999244 C16.150386,10.4242626 15.5763999,9.53983269 14.6852091,9.14272441 L15.7697291,6.71376441 C17.6193585,7.53872062 18.810518,9.37466359 18.8101092,11.3999244 C18.8105521,13.4298903 17.6139475,15.2691931 15.7579491,16.0914044 L15.7579491,16.0914044 Z"}),o.createElement("path",{d:"M18.3647491,20.2619044 L17.2863091,17.8299044 C19.8302925,16.7031661 21.4705725,14.1822599 21.4701091,11.3999244 C21.4701091,8.59818441 19.8167291,6.09892441 17.3022691,4.97678441 L18.3864091,2.54782441 C21.8804724,4.10607079 24.1307363,7.57414217 24.1301093,11.3999244 C24.1308375,15.2343934 21.8705556,18.7086904 18.3647491,20.2619044 Z"})))),nx=({size:e=nS,onClick:t=()=>{}})=>o.createElement("svg",{onClick:t,height:e,width:e,viewBox:"0 0 26 23",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},o.createElement("g",{id:"Page-1",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},o.createElement("g",{id:"Group",transform:"translate(1.000000, 0.000000)",fill:"#FFFFFF",fillRule:"nonzero"},o.createElement("path",{d:"M11.9625091,0.572584405 L11.9625091,22.2272644 C11.9625091,22.4856644 11.8466091,22.6635044 11.6151891,22.7611644 C11.3480491,22.8413444 11.1390491,22.7968844 10.9878091,22.6277844 L4.8732291,15.9143244 L0.573909096,15.9143244 C0.413549096,15.9143244 0.277509096,15.8588444 0.166549096,15.7475044 C0.0573082348,15.6406091 -0.00292164572,15.4933347 0,15.3405244 L0,7.45058441 C0,7.29022441 0.0555890961,7.15456441 0.167309096,7.04322441 C0.278269096,6.93226441 0.414309096,6.87640441 0.573909096,6.87640441 L4.8732291,6.87640441 L10.9874291,0.172064405 C11.1390491,0.00296440549 11.3484291,-0.0414955945 11.6151891,0.0386844055 C11.8466091,0.136344405 11.9621291,0.314564405 11.9621291,0.572584405 L11.9625091,0.572584405 Z",id:"Path"})),o.createElement("g",{id:"Group",transform:"translate(14.887009, 6.947630)",fill:"#FFFFFF",fillRule:"nonzero"},o.createElement("path",{d:"M7.88199149,6.27905236 C7.94693088,6.35707599 7.94693088,6.47033309 7.88199149,6.54835671 L6.54835671,7.88199149 C6.47033309,7.94693088 6.35707599,7.94693088 6.27905236,7.88199149 L3.96534802,5.56828715 L1.65164367,7.88199149 C1.57362004,7.94693088 1.46036294,7.94693088 1.38233932,7.88199149 L0.0487045381,6.54835671 C-0.016234846,6.47033309 -0.016234846,6.35707599 0.0487045381,6.27905236 L2.36240889,3.96534802 L0.0487045381,1.65164367 C-0.016234846,1.57362004 -0.016234846,1.46036294 0.0487045381,1.38233932 L1.38233932,0.0487045381 C1.46036294,-0.016234846 1.57362004,-0.016234846 1.65164367,0.0487045381 L3.96534802,2.36240889 L6.27905236,0.0487045381 C6.35707599,-0.016234846 6.47033309,-0.016234846 6.54835671,0.0487045381 L7.88199149,1.38233932 C7.94693088,1.46036294 7.94693088,1.57362004 7.88199149,1.65164367 L5.56828715,3.96534802 L7.88199149,6.27905236 Z",id:"Shape"})))),nI=tu.div`
    background: ${tg};
    height: ${e=>e.$barHeight}px;
    position: absolute;
    width: 5px;
    bottom: 0;
    left: 0;
    opacity: 0.95;
`,nA=({videoEl:e})=>{(0,tK.Z)(2147483647,100);let t=(null==e?void 0:e.currentTime)||0,r=(null==e?void 0:e.duration)||0,n=Math.round(100*(t/r)),a=5;return(null==e?void 0:e.height)<200?a=3:(null==e?void 0:e.height)<300&&(a=4),n=r<10&&n>98?100:n,o.createElement(nI,{style:{width:`${n}%`},$barHeight:a,className:"hide-in-percy"})},nN=(e,t="")=>{switch(e){case 1:return"Aborted. The fetching process for the media resource was aborted by the user agent at the user's request.";case 2:return"Network Error. A network error of some description caused the user agent to stop fetching the media resource, after the resource was established to be usable.";case 3:return"Decode Error. An error of some description occurred while decoding the media resource, after the resource was established to be usable.";case 4:return`Can not play a video of type "${t.split(".").pop()}" on this platform.`;default:return""}},nP=(e,t,r,n,a)=>{let o=a+e;return!n.has(o)&&r>0&&t>r*e&&(n.add(o),!0)},nM=[.25,.5,.75],nR="giphy-video",nO={IDLE:1},nL=({muted:e,ccEnabled:t=!1,ccLanguage:r="en",loop:n=!0,onStateChange:i,onTimeUpdate:s,onCanPlay:l,onFirstPlay:c,onWaiting:u,onMuted:d,onError:p,onEnded:m,onLoop:f,onQuartile:h,onEndFullscreen:g,setVideoEl:y,gif:v,width:b,height:E,volume:_=.7,className:w=nR})=>{var C,S,k;let x=E||(0,a.f8)(v,b),[I,A]=(0,o.useState)((0,a.i1)(v.video,b,x)),N=(0,o.useRef)(0);I||console.warn(`GiphyJS No video content for id: ${v.id}`);let P=(0,o.useRef)(Date.now()),M=(0,o.useRef)(!1),R=(0,o.useRef)(0),O=(0,o.useRef)(0),L=(0,o.useRef)(new Set);(0,o.useEffect)(()=>{P.current=Date.now(),M.current=!1,R.current=1,O.current=0,L.current=new Set},[v.id]);let $=(0,o.useRef)(null);(0,o.useEffect)(()=>{let e=(0,a.i1)(v.video,b,x);$.current&&(null==I?void 0:I.url)&&e.url!==I.url&&(-1!==I.url.indexOf(String(v.id))&&(N.current=$.current.currentTime),A(e))},[b,E,v.video,x,null==I?void 0:I.url,v.id]),(0,o.useEffect)(()=>{$.current&&(null==I?void 0:I.url)&&N.current&&($.current.currentTime=N.current,N.current=0)},[null==I?void 0:I.url,N]);let j=(0,o.useCallback)(()=>{var e;let t=$.current,r=null==(e=null==t?void 0:t.error)?void 0:e.code;if(r&&(null==t?void 0:t.src)){let e=nN(r,null==t?void 0:t.src);console.error(e),null==p||p(r)}},[p]),T=(0,o.useCallback)(()=>{null==i||i("playing"),M.current||(M.current=!0,v.analytics_response_payload&&tF({actionType:"START",analyticsResponsePayload:v.analytics_response_payload}),null==c||c(Date.now()-P.current))},[c,i,v]),D=(0,o.useCallback)(()=>null==i?void 0:i("paused"),[i]),F=(0,o.useCallback)(()=>{let e=$.current;if(e){let t=e.currentTime;nM.some(r=>!!nP(r,t,e.duration,L.current,R.current)&&(null==h||h(r),!0)),null==s||s(t||0)}},[h,s]),B=(0,o.useCallback)(()=>null==l?void 0:l(),[l]),U=(0,o.useCallback)(()=>{let e=$.current;(null==e?void 0:e.currentTime)!==0&&(null==e?void 0:e.networkState)!==nO.IDLE&&(null==u||u(++O.current))},[u]),W=(0,o.useCallback)(()=>{M.current&&(n&&$.current&&$.current.play(),null==f||f(R.current),R.current=R.current+1,null==m||m())},[m,n,f]),G=(0,o.useCallback)(()=>null==g?void 0:g(),[g]),Z=(0,o.useCallback)(e=>t2(void 0,null,function*(){if(e){let t=e.play();if(void 0!==t)try{yield t,null==d||d(!1)}catch(t){e.muted=!0,null==d||d(!0),e.play()}}}),[d]);(0,o.useEffect)(()=>{let e=$.current;e&&(Z(e),null==y||y(e),isNaN(_)||(e.volume=_))},[]),(0,o.useEffect)(()=>{let e=$.current;return e&&(e.addEventListener("play",T),e.addEventListener("pause",D),e.addEventListener("error",j),e.addEventListener("timeupdate",F),e.addEventListener("canplay",B),e.addEventListener("ended",W),e.addEventListener("waiting",U),e.addEventListener("webkitendfullscreen",G)),()=>{e&&(e.removeEventListener("play",T),e.removeEventListener("pause",D),e.removeEventListener("error",j),e.removeEventListener("timeupdate",F),e.removeEventListener("canplay",B),e.removeEventListener("ended",W),e.removeEventListener("waiting",U),e.removeEventListener("webkitendfullscreen",G))}},[T,D,j,F,B,W,U,G]);let K=null==(k=null==(S=null==(C=v.video)?void 0:C.captions)?void 0:S[r])?void 0:k.vtt;return(null==I?void 0:I.url)?o.createElement("video",{crossOrigin:"anonymous",draggable:!0,className:w,width:b,height:x,muted:e,autoPlay:!0,playsInline:!0,ref:$,src:null==I?void 0:I.url,"data-giphy-id":v.id},t&&K&&o.createElement("track",{label:"English",kind:"subtitles",srcLang:r,src:K,default:!0})):null};nL.className=nR;var n$=tu.div`
    position: relative;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: black;
    font-family: interface, helvetica, arial;
    -webkit-font-smoothing: antialiased;
`,nj=tu.div`
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    cursor: pointer;
`,nT=tu.div`
    position: absolute;
    top: 10px;
    right: 10px;
    left: 10px;
    bottom: 0;
    display: flex;
    justify-content: space-between;
    opacity: ${e=>e.$isHovered?1:0};
    transition: opacity ease-out 250ms;
    align-items: flex-start;
`,nD=tu.div`
    font-size: 22px;
    color: white;
    margin-bottom: 5px;
    font-weight: bold;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    user-select: none;
    cursor: pointer;
`,nF=tu.div`
    position: relative;
    min-width: 0;
`,nB=tu.div`
    &:before {
        background: linear-gradient(rgba(18, 18, 18, 0.6), rgba(0, 0, 0, 0));
        content: '';
        height: ${e=>e.$isLargePlayer?125:75}px;
        left: 0;
        pointer-events: none;
        position: absolute;
        top: 0;
        width: 100%;
    }
    &:after {
        background: linear-gradient(rgba(0, 0, 0, 0), rgba(18, 18, 18, 0.6));
        content: '';
        height: ${e=>e.$isLargePlayer?125:75}px;
        left: 0;
        pointer-events: none;
        position: absolute;
        bottom: 0;
        width: 100%;
    }
`,nU=e=>{let{width:t,hideMute:r,hideAttribution:n,hideProgressBar:i,className:s,persistentControls:l,gif:c,overlay:u}=e,[d,p]=(0,o.useState)(!1),[m,f]=(0,o.useState)(null),[h,g]=(0,o.useState)(e.muted),[y,v]=(0,o.useState)(!1),{setVideoEl:b,onMuted:E,onUserMuted:_}=e,w=e.height||(0,a.f8)(c,t),[,C,S]=(0,tZ.default)(()=>{p(!1)},4e3),k=(0,o.useCallback)(e=>{null==E||E(e),v(e)},[v,E]),x=(0,o.useCallback)(e=>{null==b||b(e),f(e)},[b,f]),I=()=>{y?(v(!1),g(!1)):g(!h)};(0,o.useEffect)(()=>{g(e.muted)},[e.muted]);let A=l||d,N=w>=300;return(0,o.useEffect)(()=>(A?S():C(),()=>C()),[A,C,S]),o.createElement(n$,{className:s,style:{width:t,height:w},onMouseOver:()=>p(!0),onMouseLeave:()=>p(!1),onMouseMove:()=>{p(!0),S()},onClick:e=>{null==_||_(!(h||y)),null==m||m.play(),e.preventDefault(),I()}},o.createElement(nL,t0(tX({},e),{onMuted:k,setVideoEl:x,muted:h})),A&&o.createElement(nB,{$isLargePlayer:N}),o.createElement(nT,{$isHovered:A},o.createElement(nF,null,N&&o.createElement(nD,{onClick:e=>{e.preventDefault(),e.stopPropagation(),window.open(c.url,"_blank")}},c.title),m&&!n?o.createElement(nC,{gif:c}):null),!r&&o.createElement(nj,null,h||y?o.createElement(nx,null):o.createElement(nk,null))),A&&!i&&m?o.createElement(nA,{videoEl:m}):null,u&&o.createElement(u,{gif:c,isHovered:d,width:t,height:w}))};tu.div`
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    height: 100%;
    width: 100%;
`,tu(e=>(e.overlay&&!e.controls&&console.warn(`${a.Yd.PREFIX}: Overlays only work when controls are enabled`),e.controls?o.createElement(nU,tX({},e)):o.createElement(nL,tX({},e))))`
    height: 100%;
    display: inline-block;
    object-fit: fill;
    pointer-events: none;
    background: rgb(0, 0, 0, 0);
`,tu.div`
    position: absolute;
    top: 6px;
    right: 6px;
    cursor: pointer;
    opacity: ${e=>e.$isHovered?1:.8};
    transition: opacity ease-out 800ms;
`,(0,a.fg)("X-GIPHY-SDK-NAME","ReactSDK")},36889:()=>{!function(){"use strict";if("object"==typeof window){if("IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype){"isIntersecting"in window.IntersectionObserverEntry.prototype||Object.defineProperty(window.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0}});return}var e=function(e){for(var t=e,r=a(t);r;)r=a(t=r.ownerDocument);return t}(window.document),t=[],r=null,n=null;i.prototype.THROTTLE_TIMEOUT=100,i.prototype.POLL_INTERVAL=null,i.prototype.USE_MUTATION_OBSERVER=!0,i._setupCrossOriginUpdater=function(){return r||(r=function(e,r){n=e&&r?p(e,r):u(),t.forEach(function(e){e._checkForIntersections()})}),r},i._resetCrossOriginUpdater=function(){r=null,n=null},i.prototype.observe=function(e){if(!this._observationTargets.some(function(t){return t.element==e})){if(!(e&&1==e.nodeType))throw Error("target must be an Element");this._registerInstance(),this._observationTargets.push({element:e,entry:null}),this._monitorIntersections(e.ownerDocument),this._checkForIntersections()}},i.prototype.unobserve=function(e){this._observationTargets=this._observationTargets.filter(function(t){return t.element!=e}),this._unmonitorIntersections(e.ownerDocument),0==this._observationTargets.length&&this._unregisterInstance()},i.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorAllIntersections(),this._unregisterInstance()},i.prototype.takeRecords=function(){var e=this._queuedEntries.slice();return this._queuedEntries=[],e},i.prototype._initThresholds=function(e){var t=e||[0];return Array.isArray(t)||(t=[t]),t.sort().filter(function(e,t,r){if("number"!=typeof e||isNaN(e)||e<0||e>1)throw Error("threshold must be a number between 0 and 1 inclusively");return e!==r[t-1]})},i.prototype._parseRootMargin=function(e){var t=(e||"0px").split(/\s+/).map(function(e){var t=/^(-?\d*\.?\d+)(px|%)$/.exec(e);if(!t)throw Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(t[1]),unit:t[2]}});return t[1]=t[1]||t[0],t[2]=t[2]||t[0],t[3]=t[3]||t[1],t},i.prototype._monitorIntersections=function(t){var r=t.defaultView;if(r&&-1==this._monitoringDocuments.indexOf(t)){var n=this._checkForIntersections,o=null,i=null;if(this.POLL_INTERVAL?o=r.setInterval(n,this.POLL_INTERVAL):(s(r,"resize",n,!0),s(t,"scroll",n,!0),this.USE_MUTATION_OBSERVER&&"MutationObserver"in r&&(i=new r.MutationObserver(n)).observe(t,{attributes:!0,childList:!0,characterData:!0,subtree:!0})),this._monitoringDocuments.push(t),this._monitoringUnsubscribes.push(function(){var e=t.defaultView;e&&(o&&e.clearInterval(o),l(e,"resize",n,!0)),l(t,"scroll",n,!0),i&&i.disconnect()}),t!=(this.root&&(this.root.ownerDocument||this.root)||e)){var c=a(t);c&&this._monitorIntersections(c.ownerDocument)}}},i.prototype._unmonitorIntersections=function(t){var r=this._monitoringDocuments.indexOf(t);if(-1!=r){var n=this.root&&(this.root.ownerDocument||this.root)||e;if(!this._observationTargets.some(function(e){var r=e.element.ownerDocument;if(r==t)return!0;for(;r&&r!=n;){var o=a(r);if((r=o&&o.ownerDocument)==t)return!0}return!1})){var o=this._monitoringUnsubscribes[r];if(this._monitoringDocuments.splice(r,1),this._monitoringUnsubscribes.splice(r,1),o(),t!=n){var i=a(t);i&&this._unmonitorIntersections(i.ownerDocument)}}}},i.prototype._unmonitorAllIntersections=function(){var e=this._monitoringUnsubscribes.slice(0);this._monitoringDocuments.length=0,this._monitoringUnsubscribes.length=0;for(var t=0;t<e.length;t++)e[t]()},i.prototype._checkForIntersections=function(){if(this.root||!r||n){var e=this._rootIsInDom(),t=e?this._getRootRect():u();this._observationTargets.forEach(function(n){var a=n.element,i=c(a),s=this._rootContainsTarget(a),l=n.entry,d=e&&s&&this._computeTargetAndRootIntersection(a,i,t),p=null;this._rootContainsTarget(a)?(!r||this.root)&&(p=t):p=u();var m=n.entry=new o({time:window.performance&&performance.now&&performance.now(),target:a,boundingClientRect:i,rootBounds:p,intersectionRect:d});l?e&&s?this._hasCrossedThreshold(l,m)&&this._queuedEntries.push(m):l&&l.isIntersecting&&this._queuedEntries.push(m):this._queuedEntries.push(m)},this),this._queuedEntries.length&&this._callback(this.takeRecords(),this)}},i.prototype._computeTargetAndRootIntersection=function(t,a,o){if("none"!=window.getComputedStyle(t).display){for(var i=a,s=f(t),l=!1;!l&&s;){var u=null,d=1==s.nodeType?window.getComputedStyle(s):{};if("none"==d.display)return null;if(s==this.root||9==s.nodeType){if(l=!0,s==this.root||s==e)r&&!this.root?n&&(0!=n.width||0!=n.height)?u=n:(s=null,u=null,i=null):u=o;else{var m=f(s),h=m&&c(m),g=m&&this._computeTargetAndRootIntersection(m,h,o);h&&g?(s=m,u=p(h,g)):(s=null,i=null)}}else{var y=s.ownerDocument;s!=y.body&&s!=y.documentElement&&"visible"!=d.overflow&&(u=c(s))}if(u&&(i=function(e,t){var r=Math.max(e.top,t.top),n=Math.min(e.bottom,t.bottom),a=Math.max(e.left,t.left),o=Math.min(e.right,t.right),i=o-a,s=n-r;return i>=0&&s>=0&&{top:r,bottom:n,left:a,right:o,width:i,height:s}||null}(u,i)),!i)break;s=s&&f(s)}return i}},i.prototype._getRootRect=function(){var t;if(this.root&&!h(this.root))t=c(this.root);else{var r=h(this.root)?this.root:e,n=r.documentElement,a=r.body;t={top:0,left:0,right:n.clientWidth||a.clientWidth,width:n.clientWidth||a.clientWidth,bottom:n.clientHeight||a.clientHeight,height:n.clientHeight||a.clientHeight}}return this._expandRectByRootMargin(t)},i.prototype._expandRectByRootMargin=function(e){var t=this._rootMarginValues.map(function(t,r){return"px"==t.unit?t.value:t.value*(r%2?e.width:e.height)/100}),r={top:e.top-t[0],right:e.right+t[1],bottom:e.bottom+t[2],left:e.left-t[3]};return r.width=r.right-r.left,r.height=r.bottom-r.top,r},i.prototype._hasCrossedThreshold=function(e,t){var r=e&&e.isIntersecting?e.intersectionRatio||0:-1,n=t.isIntersecting?t.intersectionRatio||0:-1;if(r!==n)for(var a=0;a<this.thresholds.length;a++){var o=this.thresholds[a];if(o==r||o==n||o<r!=o<n)return!0}},i.prototype._rootIsInDom=function(){return!this.root||m(e,this.root)},i.prototype._rootContainsTarget=function(t){var r=this.root&&(this.root.ownerDocument||this.root)||e;return m(r,t)&&(!this.root||r==t.ownerDocument)},i.prototype._registerInstance=function(){0>t.indexOf(this)&&t.push(this)},i.prototype._unregisterInstance=function(){var e=t.indexOf(this);-1!=e&&t.splice(e,1)},window.IntersectionObserver=i,window.IntersectionObserverEntry=o}function a(e){try{return e.defaultView&&e.defaultView.frameElement||null}catch(e){return null}}function o(e){this.time=e.time,this.target=e.target,this.rootBounds=d(e.rootBounds),this.boundingClientRect=d(e.boundingClientRect),this.intersectionRect=d(e.intersectionRect||u()),this.isIntersecting=!!e.intersectionRect;var t=this.boundingClientRect,r=t.width*t.height,n=this.intersectionRect,a=n.width*n.height;r?this.intersectionRatio=Number((a/r).toFixed(4)):this.intersectionRatio=this.isIntersecting?1:0}function i(e,t){var r,n,a,o=t||{};if("function"!=typeof e)throw Error("callback must be a function");if(o.root&&1!=o.root.nodeType&&9!=o.root.nodeType)throw Error("root must be a Document or Element");this._checkForIntersections=(r=this._checkForIntersections.bind(this),n=this.THROTTLE_TIMEOUT,a=null,function(){a||(a=setTimeout(function(){r(),a=null},n))}),this._callback=e,this._observationTargets=[],this._queuedEntries=[],this._rootMarginValues=this._parseRootMargin(o.rootMargin),this.thresholds=this._initThresholds(o.threshold),this.root=o.root||null,this.rootMargin=this._rootMarginValues.map(function(e){return e.value+e.unit}).join(" "),this._monitoringDocuments=[],this._monitoringUnsubscribes=[]}function s(e,t,r,n){"function"==typeof e.addEventListener?e.addEventListener(t,r,n||!1):"function"==typeof e.attachEvent&&e.attachEvent("on"+t,r)}function l(e,t,r,n){"function"==typeof e.removeEventListener?e.removeEventListener(t,r,n||!1):"function"==typeof e.detachEvent&&e.detachEvent("on"+t,r)}function c(e){var t;try{t=e.getBoundingClientRect()}catch(e){}return t?(t.width&&t.height||(t={top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.right-t.left,height:t.bottom-t.top}),t):u()}function u(){return{top:0,bottom:0,left:0,right:0,width:0,height:0}}function d(e){return!e||"x"in e?e:{top:e.top,y:e.top,bottom:e.bottom,left:e.left,x:e.left,right:e.right,width:e.width,height:e.height}}function p(e,t){var r=t.top-e.top,n=t.left-e.left;return{top:r,left:n,height:t.height,width:t.width,bottom:r+t.height,right:n+t.width}}function m(e,t){for(var r=t;r;){if(r==e)return!0;r=f(r)}return!1}function f(t){var r=t.parentNode;return 9==t.nodeType&&t!=e?a(t):(r&&r.assignedSlot&&(r=r.assignedSlot.parentNode),r&&11==r.nodeType&&r.host)?r.host:r}function h(e){return e&&9===e.nodeType}}()},12737:(e,t,r)=>{"use strict";var n=r(68750),a=r(34573),o=a(n("String.prototype.indexOf"));e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&o(e,".prototype.")>-1?a(r):r}},34573:(e,t,r)=>{"use strict";var n=r(20132),a=r(68750),o=a("%Function.prototype.apply%"),i=a("%Function.prototype.call%"),s=a("%Reflect.apply%",!0)||n.call(i,o),l=a("%Object.getOwnPropertyDescriptor%",!0),c=a("%Object.defineProperty%",!0),u=a("%Math.max%");if(c)try{c({},"a",{value:1})}catch(e){c=null}e.exports=function(e){var t=s(n,i,arguments);return l&&c&&l(t,"length").configurable&&c(t,"length",{value:1+u(0,e.length-(arguments.length-1))}),t};var d=function(){return s(n,o,arguments)};c?c(e.exports,"apply",{value:d}):e.exports.apply=d},68458:e=>{"use strict";var t=Array.prototype.slice,r=Object.prototype.toString;e.exports=function(e){var n,a=this;if("function"!=typeof a||"[object Function]"!==r.call(a))throw TypeError("Function.prototype.bind called on incompatible "+a);for(var o=t.call(arguments,1),i=Math.max(0,a.length-o.length),s=[],l=0;l<i;l++)s.push("$"+l);if(n=Function("binder","return function ("+s.join(",")+"){ return binder.apply(this,arguments); }")(function(){if(!(this instanceof n))return a.apply(e,o.concat(t.call(arguments)));var r=a.apply(this,o.concat(t.call(arguments)));return Object(r)===r?r:this}),a.prototype){var c=function(){};c.prototype=a.prototype,n.prototype=new c,c.prototype=null}return n}},20132:(e,t,r)=>{"use strict";var n=r(68458);e.exports=Function.prototype.bind||n},68750:(e,t,r)=>{"use strict";var n,a=SyntaxError,o=Function,i=TypeError,s=function(e){try{return o('"use strict"; return ('+e+").constructor;")()}catch(e){}},l=Object.getOwnPropertyDescriptor;if(l)try{l({},"")}catch(e){l=null}var c=function(){throw new i},u=l?function(){try{return arguments.callee,c}catch(e){try{return l(arguments,"callee").get}catch(e){return c}}}():c,d=r(40679)(),p=r(42574)(),m=Object.getPrototypeOf||(p?function(e){return e.__proto__}:null),f={},h="undefined"!=typeof Uint8Array&&m?m(Uint8Array):n,g={"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":d&&m?m([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":f,"%AsyncGenerator%":f,"%AsyncGeneratorFunction%":f,"%AsyncIteratorPrototype%":f,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":f,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":d&&m?m(m([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&d&&m?m(new Map()[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&d&&m?m(new Set()[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":d&&m?m(""[Symbol.iterator]()):n,"%Symbol%":d?Symbol:n,"%SyntaxError%":a,"%ThrowTypeError%":u,"%TypedArray%":h,"%TypeError%":i,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet};if(m)try{null.error}catch(e){var y=m(m(e));g["%Error.prototype%"]=y}var v=function e(t){var r;if("%AsyncFunction%"===t)r=s("async function () {}");else if("%GeneratorFunction%"===t)r=s("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=s("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var a=e("%AsyncGenerator%");a&&m&&(r=m(a.prototype))}return g[t]=r,r},b={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},E=r(20132),_=r(77492),w=E.call(Function.call,Array.prototype.concat),C=E.call(Function.apply,Array.prototype.splice),S=E.call(Function.call,String.prototype.replace),k=E.call(Function.call,String.prototype.slice),x=E.call(Function.call,RegExp.prototype.exec),I=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,A=/\\(\\)?/g,N=function(e){var t=k(e,0,1),r=k(e,-1);if("%"===t&&"%"!==r)throw new a("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new a("invalid intrinsic syntax, expected opening `%`");var n=[];return S(e,I,function(e,t,r,a){n[n.length]=r?S(a,A,"$1"):t||e}),n},P=function(e,t){var r,n=e;if(_(b,n)&&(n="%"+(r=b[n])[0]+"%"),_(g,n)){var o=g[n];if(o===f&&(o=v(n)),void 0===o&&!t)throw new i("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new a("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new i("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new i('"allowMissing" argument must be a boolean');if(null===x(/^%?[^%]*%?$/,e))throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=N(e),n=r.length>0?r[0]:"",o=P("%"+n+"%",t),s=o.name,c=o.value,u=!1,d=o.alias;d&&(n=d[0],C(r,w([0,1],d)));for(var p=1,m=!0;p<r.length;p+=1){var f=r[p],h=k(f,0,1),y=k(f,-1);if(('"'===h||"'"===h||"`"===h||'"'===y||"'"===y||"`"===y)&&h!==y)throw new a("property names with quotes must have matching quotes");if("constructor"!==f&&m||(u=!0),n+="."+f,_(g,s="%"+n+"%"))c=g[s];else if(null!=c){if(!(f in c)){if(!t)throw new i("base intrinsic for "+e+" exists, but the property is not available.");return}if(l&&p+1>=r.length){var v=l(c,f);c=(m=!!v)&&"get"in v&&!("originalValue"in v.get)?v.get:c[f]}else m=_(c,f),c=c[f];m&&!u&&(g[s]=c)}}return c}},42574:e=>{"use strict";var t={foo:{}},r=Object;e.exports=function(){return({__proto__:t}).foo===t.foo&&!(({__proto__:null})instanceof r)}},40679:(e,t,r)=>{"use strict";var n="undefined"!=typeof Symbol&&Symbol,a=r(8186);e.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&a()}},8186:e=>{"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t||"[object Symbol]"!==Object.prototype.toString.call(t)||"[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var a=Object.getOwnPropertyDescriptor(e,t);if(42!==a.value||!0!==a.enumerable)return!1}return!0}},77492:(e,t,r)=>{"use strict";var n=r(20132);e.exports=n.call(Function.call,Object.prototype.hasOwnProperty)},86524:(e,t,r)=>{var n="function"==typeof Map&&Map.prototype,a=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=n&&a&&"function"==typeof a.get?a.get:null,i=n&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,l=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=s&&l&&"function"==typeof l.get?l.get:null,u=s&&Set.prototype.forEach,d="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,m="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,f=Boolean.prototype.valueOf,h=Object.prototype.toString,g=Function.prototype.toString,y=String.prototype.match,v=String.prototype.slice,b=String.prototype.replace,E=String.prototype.toUpperCase,_=String.prototype.toLowerCase,w=RegExp.prototype.test,C=Array.prototype.concat,S=Array.prototype.join,k=Array.prototype.slice,x=Math.floor,I="function"==typeof BigInt?BigInt.prototype.valueOf:null,A=Object.getOwnPropertySymbols,N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,P="function"==typeof Symbol&&"object"==typeof Symbol.iterator,M="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===P?"object":"symbol")?Symbol.toStringTag:null,R=Object.prototype.propertyIsEnumerable,O=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function L(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||w.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var n=e<0?-x(-e):x(e);if(n!==e){var a=String(n),o=v.call(t,a.length+1);return b.call(a,r,"$&_")+"."+b.call(b.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return b.call(t,r,"$&_")}var $=r(96553),j=$.custom,T=U(j)?j:null;function D(e,t,r){var n="double"===(r.quoteStyle||t)?'"':"'";return n+e+n}function F(e){return"[object Array]"===Z(e)&&(!M||!("object"==typeof e&&M in e))}function B(e){return"[object RegExp]"===Z(e)&&(!M||!("object"==typeof e&&M in e))}function U(e){if(P)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!N)return!1;try{return N.call(e),!0}catch(e){}return!1}e.exports=function e(t,r,n,a){var s=r||{};if(G(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw TypeError('option "quoteStyle" must be "single" or "double"');if(G(s,"maxStringLength")&&("number"==typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var l=!G(s,"customInspect")||s.customInspect;if("boolean"!=typeof l&&"symbol"!==l)throw TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(G(s,"indent")&&null!==s.indent&&"	"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(G(s,"numericSeparator")&&"boolean"!=typeof s.numericSeparator)throw TypeError('option "numericSeparator", if provided, must be `true` or `false`');var h=s.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return function e(t,r){if(t.length>r.maxStringLength){var n=t.length-r.maxStringLength;return e(v.call(t,0,r.maxStringLength),r)+"... "+n+" more character"+(n>1?"s":"")}return D(b.call(b.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,H),"single",r)}(t,s);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var E=String(t);return h?L(t,E):E}if("bigint"==typeof t){var w=String(t)+"n";return h?L(t,w):w}var x=void 0===s.depth?5:s.depth;if(void 0===n&&(n=0),n>=x&&x>0&&"object"==typeof t)return F(t)?"[Array]":"[Object]";var A=function(e,t){var r;if("	"===e.indent)r="	";else{if("number"!=typeof e.indent||!(e.indent>0))return null;r=S.call(Array(e.indent+1)," ")}return{base:r,prev:S.call(Array(t+1),r)}}(s,n);if(void 0===a)a=[];else if(K(a,t)>=0)return"[Circular]";function j(t,r,o){if(r&&(a=k.call(a)).push(r),o){var i={depth:s.depth};return G(s,"quoteStyle")&&(i.quoteStyle=s.quoteStyle),e(t,i,n+1,a)}return e(t,s,n+1,a)}if("function"==typeof t&&!B(t)){var W=function(e){if(e.name)return e.name;var t=y.call(g.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}(t),J=Q(t,j);return"[Function"+(W?": "+W:" (anonymous)")+"]"+(J.length>0?" { "+S.call(J,", ")+" }":"")}if(U(t)){var X=P?b.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):N.call(t);return"object"!=typeof t||P?X:V(X)}if(t&&"object"==typeof t&&("undefined"!=typeof HTMLElement&&t instanceof HTMLElement||"string"==typeof t.nodeName&&"function"==typeof t.getAttribute)){for(var ee,et="<"+_.call(String(t.nodeName)),er=t.attributes||[],en=0;en<er.length;en++)et+=" "+er[en].name+"="+D((ee=er[en].value,b.call(String(ee),/"/g,"&quot;")),"double",s);return et+=">",t.childNodes&&t.childNodes.length&&(et+="..."),et+="</"+_.call(String(t.nodeName))+">"}if(F(t)){if(0===t.length)return"[]";var ea=Q(t,j);return A&&!function(e){for(var t=0;t<e.length;t++)if(K(e[t],"\n")>=0)return!1;return!0}(ea)?"["+Y(ea,A)+"]":"[ "+S.call(ea,", ")+" ]"}if("[object Error]"===Z(t)&&(!M||!("object"==typeof t&&M in t))){var eo=Q(t,j);return"cause"in Error.prototype||!("cause"in t)||R.call(t,"cause")?0===eo.length?"["+String(t)+"]":"{ ["+String(t)+"] "+S.call(eo,", ")+" }":"{ ["+String(t)+"] "+S.call(C.call("[cause]: "+j(t.cause),eo),", ")+" }"}if("object"==typeof t&&l){if(T&&"function"==typeof t[T]&&$)return $(t,{depth:x-n});if("symbol"!==l&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!o||!e||"object"!=typeof e)return!1;try{o.call(e);try{c.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var ei=[];return i&&i.call(t,function(e,r){ei.push(j(r,t,!0)+" => "+j(e,t))}),q("Map",o.call(t),ei,A)}if(function(e){if(!c||!e||"object"!=typeof e)return!1;try{c.call(e);try{o.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var es=[];return u&&u.call(t,function(e){es.push(j(e,t))}),q("Set",c.call(t),es,A)}if(function(e){if(!d||!e||"object"!=typeof e)return!1;try{d.call(e,d);try{p.call(e,p)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return z("WeakMap");if(function(e){if(!p||!e||"object"!=typeof e)return!1;try{p.call(e,p);try{d.call(e,d)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return z("WeakSet");if(function(e){if(!m||!e||"object"!=typeof e)return!1;try{return m.call(e),!0}catch(e){}return!1}(t))return z("WeakRef");if("[object Number]"===Z(t)&&(!M||!("object"==typeof t&&M in t)))return V(j(Number(t)));if(function(e){if(!e||"object"!=typeof e||!I)return!1;try{return I.call(e),!0}catch(e){}return!1}(t))return V(j(I.call(t)));if("[object Boolean]"===Z(t)&&(!M||!("object"==typeof t&&M in t)))return V(f.call(t));if("[object String]"===Z(t)&&(!M||!("object"==typeof t&&M in t)))return V(j(String(t)));if(!("[object Date]"===Z(t)&&(!M||!("object"==typeof t&&M in t)))&&!B(t)){var el=Q(t,j),ec=O?O(t)===Object.prototype:t instanceof Object||t.constructor===Object,eu=t instanceof Object?"":"null prototype",ed=!ec&&M&&Object(t)===t&&M in t?v.call(Z(t),8,-1):eu?"Object":"",ep=(ec||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(ed||eu?"["+S.call(C.call([],ed||[],eu||[]),": ")+"] ":"");return 0===el.length?ep+"{}":A?ep+"{"+Y(el,A)+"}":ep+"{ "+S.call(el,", ")+" }"}return String(t)};var W=Object.prototype.hasOwnProperty||function(e){return e in this};function G(e,t){return W.call(e,t)}function Z(e){return h.call(e)}function K(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return -1}function H(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+E.call(t.toString(16))}function V(e){return"Object("+e+")"}function z(e){return e+" { ? }"}function q(e,t,r,n){return e+" ("+t+") {"+(n?Y(r,n):S.call(r,", "))+"}"}function Y(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+S.call(e,","+r)+"\n"+t.prev}function Q(e,t){var r,n=F(e),a=[];if(n){a.length=e.length;for(var o=0;o<e.length;o++)a[o]=G(e,o)?t(e[o],e):""}var i="function"==typeof A?A(e):[];if(P){r={};for(var s=0;s<i.length;s++)r["$"+i[s]]=i[s]}for(var l in e)G(e,l)&&(!n||String(Number(l))!==l||!(l<e.length))&&(P&&r["$"+l]instanceof Symbol||(w.call(/[^\w$]/,l)?a.push(t(l,e)+": "+t(e[l],e)):a.push(l+": "+t(e[l],e))));if("function"==typeof A)for(var c=0;c<i.length;c++)R.call(e,i[c])&&a.push("["+t(i[c])+"]: "+t(e[i[c]],e));return a}},69771:e=>{"use strict";var t=String.prototype.replace,r=/%20/g,n={RFC1738:"RFC1738",RFC3986:"RFC3986"};e.exports={default:n.RFC3986,formatters:{RFC1738:function(e){return t.call(e,r,"+")},RFC3986:function(e){return String(e)}},RFC1738:n.RFC1738,RFC3986:n.RFC3986}},8139:(e,t,r)=>{"use strict";var n=r(56360),a=r(19520),o=r(69771);e.exports={formats:o,parse:a,stringify:n}},19520:(e,t,r)=>{"use strict";var n=r(54330),a=Object.prototype.hasOwnProperty,o=Array.isArray,i={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:n.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},s=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},l=function(e,t){var r={},l=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,c=t.parameterLimit===1/0?void 0:t.parameterLimit,u=l.split(t.delimiter,c),d=-1,p=t.charset;if(t.charsetSentinel)for(m=0;m<u.length;++m)0===u[m].indexOf("utf8=")&&("utf8=%E2%9C%93"===u[m]?p="utf-8":"utf8=%26%2310003%3B"===u[m]&&(p="iso-8859-1"),d=m,m=u.length);for(m=0;m<u.length;++m)if(m!==d){var m,f,h,g=u[m],y=g.indexOf("]="),v=-1===y?g.indexOf("="):y+1;-1===v?(f=t.decoder(g,i.decoder,p,"key"),h=t.strictNullHandling?null:""):(f=t.decoder(g.slice(0,v),i.decoder,p,"key"),h=n.maybeMap(s(g.slice(v+1),t),function(e){return t.decoder(e,i.decoder,p,"value")})),h&&t.interpretNumericEntities&&"iso-8859-1"===p&&(h=h.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})),g.indexOf("[]=")>-1&&(h=o(h)?[h]:h),a.call(r,f)?r[f]=n.combine(r[f],h):r[f]=h}return r},c=function(e,t,r,n){for(var a=n?t:s(t,r),o=e.length-1;o>=0;--o){var i,l=e[o];if("[]"===l&&r.parseArrays)i=[].concat(a);else{i=r.plainObjects?Object.create(null):{};var c="["===l.charAt(0)&&"]"===l.charAt(l.length-1)?l.slice(1,-1):l,u=parseInt(c,10);r.parseArrays||""!==c?!isNaN(u)&&l!==c&&String(u)===c&&u>=0&&r.parseArrays&&u<=r.arrayLimit?(i=[])[u]=a:"__proto__"!==c&&(i[c]=a):i={0:a}}a=i}return a},u=function(e,t,r,n){if(e){var o=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,i=/(\[[^[\]]*])/g,s=r.depth>0&&/(\[[^[\]]*])/.exec(o),l=s?o.slice(0,s.index):o,u=[];if(l){if(!r.plainObjects&&a.call(Object.prototype,l)&&!r.allowPrototypes)return;u.push(l)}for(var d=0;r.depth>0&&null!==(s=i.exec(o))&&d<r.depth;){if(d+=1,!r.plainObjects&&a.call(Object.prototype,s[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(s[1])}return s&&u.push("["+o.slice(s.index)+"]"),c(u,t,r,n)}},d=function(e){if(!e)return i;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?i.charset:e.charset;return{allowDots:void 0===e.allowDots?i.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:i.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:i.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:i.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:i.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:i.comma,decoder:"function"==typeof e.decoder?e.decoder:i.decoder,delimiter:"string"==typeof e.delimiter||n.isRegExp(e.delimiter)?e.delimiter:i.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:i.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:i.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:i.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:i.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:i.strictNullHandling}};e.exports=function(e,t){var r=d(t);if(""===e||null==e)return r.plainObjects?Object.create(null):{};for(var a="string"==typeof e?l(e,r):e,o=r.plainObjects?Object.create(null):{},i=Object.keys(a),s=0;s<i.length;++s){var c=i[s],p=u(c,a[c],r,"string"==typeof e);o=n.merge(o,p,r)}return!0===r.allowSparse?o:n.compact(o)}},56360:(e,t,r)=>{"use strict";var n=r(95337),a=r(54330),o=r(69771),i=Object.prototype.hasOwnProperty,s={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},l=Array.isArray,c=String.prototype.split,u=Array.prototype.push,d=function(e,t){u.apply(e,l(t)?t:[t])},p=Date.prototype.toISOString,m=o.default,f={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:a.encode,encodeValuesOnly:!1,format:m,formatter:o.formatters[m],indices:!1,serializeDate:function(e){return p.call(e)},skipNulls:!1,strictNullHandling:!1},h={},g=function e(t,r,o,i,s,u,p,m,g,y,v,b,E,_,w,C){for(var S,k,x=t,I=C,A=0,N=!1;void 0!==(I=I.get(h))&&!N;){var P=I.get(t);if(A+=1,void 0!==P){if(P===A)throw RangeError("Cyclic object value");N=!0}void 0===I.get(h)&&(A=0)}if("function"==typeof m?x=m(r,x):x instanceof Date?x=v(x):"comma"===o&&l(x)&&(x=a.maybeMap(x,function(e){return e instanceof Date?v(e):e})),null===x){if(s)return p&&!_?p(r,f.encoder,w,"key",b):r;x=""}if("string"==typeof(S=x)||"number"==typeof S||"boolean"==typeof S||"symbol"==typeof S||"bigint"==typeof S||a.isBuffer(x)){if(p){var M=_?r:p(r,f.encoder,w,"key",b);if("comma"===o&&_){for(var R=c.call(String(x),","),O="",L=0;L<R.length;++L)O+=(0===L?"":",")+E(p(R[L],f.encoder,w,"value",b));return[E(M)+(i&&l(x)&&1===R.length?"[]":"")+"="+O]}return[E(M)+"="+E(p(x,f.encoder,w,"value",b))]}return[E(r)+"="+E(String(x))]}var $=[];if(void 0===x)return $;if("comma"===o&&l(x))k=[{value:x.length>0?x.join(",")||null:void 0}];else if(l(m))k=m;else{var j=Object.keys(x);k=g?j.sort(g):j}for(var T=i&&l(x)&&1===x.length?r+"[]":r,D=0;D<k.length;++D){var F=k[D],B="object"==typeof F&&void 0!==F.value?F.value:x[F];if(!u||null!==B){var U=l(x)?"function"==typeof o?o(T,F):T:T+(y?"."+F:"["+F+"]");C.set(t,A);var W=n();W.set(h,C),d($,e(B,U,o,i,s,u,p,m,g,y,v,b,E,_,w,W))}}return $},y=function(e){if(!e)return f;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw TypeError("Encoder has to be a function.");var t=e.charset||f.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=o.default;if(void 0!==e.format){if(!i.call(o.formatters,e.format))throw TypeError("Unknown format option provided.");r=e.format}var n=o.formatters[r],a=f.filter;return("function"==typeof e.filter||l(e.filter))&&(a=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:f.addQueryPrefix,allowDots:void 0===e.allowDots?f.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:f.charsetSentinel,delimiter:void 0===e.delimiter?f.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:f.encode,encoder:"function"==typeof e.encoder?e.encoder:f.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:f.encodeValuesOnly,filter:a,format:r,formatter:n,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:f.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:f.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:f.strictNullHandling}};e.exports=function(e,t){var r,a,o=e,i=y(t);"function"==typeof i.filter?o=(0,i.filter)("",o):l(i.filter)&&(r=i.filter);var c=[];if("object"!=typeof o||null===o)return"";a=t&&t.arrayFormat in s?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var u=s[a];if(t&&"commaRoundTrip"in t&&"boolean"!=typeof t.commaRoundTrip)throw TypeError("`commaRoundTrip` must be a boolean, or absent");var p="comma"===u&&t&&t.commaRoundTrip;r||(r=Object.keys(o)),i.sort&&r.sort(i.sort);for(var m=n(),f=0;f<r.length;++f){var h=r[f];i.skipNulls&&null===o[h]||d(c,g(o[h],h,u,p,i.strictNullHandling,i.skipNulls,i.encode?i.encoder:null,i.filter,i.sort,i.allowDots,i.serializeDate,i.format,i.formatter,i.encodeValuesOnly,i.charset,m))}var v=c.join(i.delimiter),b=!0===i.addQueryPrefix?"?":"";return i.charsetSentinel&&("iso-8859-1"===i.charset?b+="utf8=%26%2310003%3B&":b+="utf8=%E2%9C%93&"),v.length>0?b+v:""}},54330:(e,t,r)=>{"use strict";var n=r(69771),a=Object.prototype.hasOwnProperty,o=Array.isArray,i=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),s=function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(o(r)){for(var n=[],a=0;a<r.length;++a)void 0!==r[a]&&n.push(r[a]);t.obj[t.prop]=n}}},l=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r};e.exports={arrayToObject:l,assign:function(e,t){return Object.keys(t).reduce(function(e,r){return e[r]=t[r],e},e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var a=t[n],o=a.obj[a.prop],i=Object.keys(o),l=0;l<i.length;++l){var c=i[l],u=o[c];"object"==typeof u&&null!==u&&-1===r.indexOf(u)&&(t.push({obj:o,prop:c}),r.push(u))}return s(t),e},decode:function(e,t,r){var n=e.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(e){return n}},encode:function(e,t,r,a,o){if(0===e.length)return e;var s=e;if("symbol"==typeof e?s=Symbol.prototype.toString.call(e):"string"!=typeof e&&(s=String(e)),"iso-8859-1"===r)return escape(s).replace(/%u[0-9a-f]{4}/gi,function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"});for(var l="",c=0;c<s.length;++c){var u=s.charCodeAt(c);if(45===u||46===u||95===u||126===u||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||o===n.RFC1738&&(40===u||41===u)){l+=s.charAt(c);continue}if(u<128){l+=i[u];continue}if(u<2048){l+=i[192|u>>6]+i[128|63&u];continue}if(u<55296||u>=57344){l+=i[224|u>>12]+i[128|u>>6&63]+i[128|63&u];continue}c+=1,l+=i[240|(u=65536+((1023&u)<<10|1023&s.charCodeAt(c)))>>18]+i[128|u>>12&63]+i[128|u>>6&63]+i[128|63&u]}return l},isBuffer:function(e){return!!e&&"object"==typeof e&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(o(e)){for(var r=[],n=0;n<e.length;n+=1)r.push(t(e[n]));return r}return t(e)},merge:function e(t,r,n){if(!r)return t;if("object"!=typeof r){if(o(t))t.push(r);else{if(!t||"object"!=typeof t)return[t,r];(n&&(n.plainObjects||n.allowPrototypes)||!a.call(Object.prototype,r))&&(t[r]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(r);var i=t;return(o(t)&&!o(r)&&(i=l(t,n)),o(t)&&o(r))?(r.forEach(function(r,o){if(a.call(t,o)){var i=t[o];i&&"object"==typeof i&&r&&"object"==typeof r?t[o]=e(i,r,n):t.push(r)}else t[o]=r}),t):Object.keys(r).reduce(function(t,o){var i=r[o];return a.call(t,o)?t[o]=e(t[o],i,n):t[o]=i,t},i)}}},74445:e=>{e.exports=function(e,t,r,n){var a=r?r.call(n,e,t):void 0;if(void 0!==a)return!!a;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var o=Object.keys(e),i=Object.keys(t);if(o.length!==i.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),l=0;l<o.length;l++){var c=o[l];if(!s(c))return!1;var u=e[c],d=t[c];if(!1===(a=r?r.call(n,u,d,c):void 0)||void 0===a&&u!==d)return!1}return!0}},95337:(e,t,r)=>{"use strict";var n=r(68750),a=r(12737),o=r(86524),i=n("%TypeError%"),s=n("%WeakMap%",!0),l=n("%Map%",!0),c=a("WeakMap.prototype.get",!0),u=a("WeakMap.prototype.set",!0),d=a("WeakMap.prototype.has",!0),p=a("Map.prototype.get",!0),m=a("Map.prototype.set",!0),f=a("Map.prototype.has",!0),h=function(e,t){for(var r,n=e;null!==(r=n.next);n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r},g=function(e,t){var r=h(e,t);return r&&r.value},y=function(e,t,r){var n=h(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}};e.exports=function(){var e,t,r,n={assert:function(e){if(!n.has(e))throw new i("Side channel does not contain "+o(e))},get:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(e)return c(e,n)}else if(l){if(t)return p(t,n)}else if(r)return g(r,n)},has:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(e)return d(e,n)}else if(l){if(t)return f(t,n)}else if(r)return!!h(r,n);return!1},set:function(n,a){s&&n&&("object"==typeof n||"function"==typeof n)?(e||(e=new s),u(e,n,a)):l?(t||(t=new l),m(t,n,a)):(r||(r={key:{},next:null}),y(r,n,a))}};return n}},16740:(e,t,r)=>{"use strict";r.d(t,{g:()=>i,Z:()=>s});var n=r(2979),a=r(27378);let o=(0,a.memo)(({backgroundImage:e,initialUrl:t,isBlur:r,isVideo:o,onClick:i,onLoad:s,alt:l})=>a.createElement("div",{className:(0,n.AK)({"ui-photo-item":!0,"ui-photo-item--blur":r,"ui-photo-item--video":o}),style:e?{backgroundImage:`url(${e})`}:{},onClick:()=>i(e)},a.createElement("img",{alt:l||t,"aria-hidden":"true",className:"ui-photo-item__img",hidden:!0,onLoad:()=>s(t),src:t}),o&&a.createElement("div",{className:"ui-photo-item__icon"},a.createElement("svg",{width:"15",height:"17",viewBox:"0 0 30 34",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("path",{d:"M26.7034 12.6935C29.9817 14.6283 29.9817 19.3708 26.7034 21.3055L7.79083 32.4674C4.45773 34.4345 0.249516 32.0317 0.249516 28.1614L0.249517 5.83769C0.249517 1.96739 4.45774 -0.435452 7.79084 1.53168L26.7034 12.6935Z",fill:"currentColor"}))))),i=3,s=({displayingImagesConfig:e,newPhotoCount:t=0,onClick:r=()=>!1,shouldBlurFirstPhoto:s=!1,shouldBlurSecondAndThirdPhoto:l=!1})=>{let[c,u]=(0,a.useState)({}),[d,p,m]=e,f=(0,a.useCallback)(e=>r(e),[r]),h=(0,a.useCallback)(e=>{u(t=>({...t,[e]:e}))},[]),g=e.length===Object.keys(c).length,y=1===e.length,v=2===e.length,b=e.length>=3;return a.createElement("div",{className:"message-image-grid"},a.createElement("div",{className:(0,n.AK)({"message-image-grid__photo-wrapper":!0,"message-image-grid__photo-wrapper--loading":!g,"message-image-grid__photo-wrapper--first-of-three":b,"message-image-grid__photo-wrapper--first-of-two":v,"message-image-grid__photo-wrapper--has-right-border":!y})},a.createElement(o,{backgroundImage:c[d.url],initialUrl:d.url,alt:d.alt,isBlur:s,isVideo:"video"===e[0].type,onClick:f,onLoad:h})),(null==p?void 0:p.url)&&a.createElement("div",{className:(0,n.AK)({"message-image-grid__column":!0,"message-image-grid__column--triple":b})},a.createElement("div",{className:(0,n.AK)({"message-image-grid__photo-wrapper":!0,"message-image-grid__photo-wrapper--loading":!g,"message-image-grid__photo-wrapper--half-height":b,"message-image-grid__photo-wrapper--has-bottom-border":b})},a.createElement(o,{backgroundImage:c[p.url],initialUrl:p.url,alt:p.alt,isBlur:l,isVideo:"video"===e[1].type,onClick:f,onLoad:h})),(null==m?void 0:m.url)&&a.createElement("div",{className:(0,n.AK)({"message-image-grid__photo-wrapper":!0,"message-image-grid__photo-wrapper--loading":!g,"message-image-grid__photo-wrapper--half-height":b})},a.createElement(o,{backgroundImage:c[m.url],initialUrl:m.url,alt:m.alt,isBlur:l,isVideo:"video"===e[2].type,onClick:f,onLoad:h}))),t>i&&a.createElement("div",{className:"message-image-grid__counter-wrapper"},a.createElement("span",{className:"message-image-grid__counter"},"+",t-i)))}},73331:(e,t,r)=>{"use strict";r.d(t,{c:()=>y});var n=r(86570),a=r(27378),o=r(29413),i=r(99748),s=r(94380),l=r(56509);let c=({modelId:e,messageId:t,source:r},n)=>n.post(`/models/${e}/messages/${t}/translation`,{source:r},{timeout:3e3});var u=r(62235),d=r(74012),p=r(49873);let m=(e,t,r)=>({type:p.fe,data:{messageId:e,source:t,isVisible:r}}),f=(e,t,r)=>({type:p.O7,data:{messageId:e,source:t,text:r}}),h=(e,t,r)=>({type:p.S5,data:{messageId:e,source:t,error:r}});var g=r(33127);let y=(0,a.memo)(({source:e,messageId:t,iconSize:r})=>{let{isVisible:p}=(0,g.B)(e,t),y=(0,s.T)(),[v,b]=(0,a.useState)(!1),E=async()=>{if(!v)try{b(!0),await y(function(e,t){return async(r,n,{Api:a})=>{let o=(0,d.ts)(n());if(!(null==o?void 0:o.isModel))return;let i=(0,u.i)(n())(t,e);if(!i||i.error)try{let{translatedMessage:n}=await c({modelId:null==o?void 0:o.id,messageId:e,source:t},a);r(f(e,t,n))}catch(n){r(h(e,t,(0,l.dW)("messagesTranslation.message.error")))}else r(m(e,t,!i.isVisible))}}(t,e))}finally{b(!1)}};return a.createElement("button",{className:(0,i.AK)("chat-message-translate-button",{"chat-message-translate-button--translated":p}),onClick:E,type:"button"},v?a.createElement(n.Z,{size:"small"}):a.createElement(o.Z,{size:r,img:"translate"}))})},52318:(e,t,r)=>{"use strict";r.d(t,{d:()=>b});var n=r(27378),a=r(13696),o=r(28175),i=r(19068),s=r(29413),l=r(99748),c=r(56509),u=r(95654),d=r(63256);let p={root:"Gif#LQ",error:"Gif__error#Q7",errorMessage:"Gif__errorMessage#nH"},m=({className:e,giphyId:t,width:r,height:a,imageClassName:m})=>{let[f,h]=(0,n.useState)(null),[g,y]=(0,n.useState)(!0),[v,b]=(0,n.useState)(!1),E=(0,u.C)(d.gwT);return(0,n.useEffect)(()=>{let e=new o.sF(E),r=async()=>{b(!1);try{let{data:r}=await e.gif(t);h(r)}catch(e){b(!0)}finally{y(!1)}};r()},[t,E]),n.createElement("div",{className:(0,l.AK)(p.root,e,{[p.loading]:g}),style:{width:r,height:a}},v?n.createElement("div",{className:p.error},n.createElement(s.Z,{img:"error-circle-outline-ds",size:24}),n.createElement("span",{className:p.errorMessage},(0,c.dW)("privateMessages.gif.wasRemovedByGiphy"))):f&&n.createElement(i.nt,{className:m,hideAttribution:!0,noLink:!0,gif:{...f,url:f.images.fixed_height.url},width:r||0}))};var f=r(94092),h=r(19434),g=r(93776),y=r(21044);let v={root:"GifMessage#wP",fullscreen:"GifMessage__fullscreen#IF",commonMessage:"GifMessage__commonMessage#pD",indicators:"GifMessage__indicators#h0",username:"GifMessage__username#Sh",fullScreenImage:"GifMessage__fullScreenImage#ne",fullscreenGifContainer:"GifMessage__fullscreenGifContainer#LW"},b=({message:e,counterpart:t,isFullscreen:r,renderPlaceId:o,isPopupEnabled:i,isSenderCurrentModel:s,sender:l,chatOwner:c})=>{var u;if(!e.details.giphyId)return null;let d=s||!(null==l?void 0:l.isModel),p=n.createElement(m,{giphyId:e.details.giphyId,width:e.details.giphyWidth,height:e.details.giphyHeight,className:r?v.fullscreenGifContainer:"",imageClassName:r?v.fullScreenImage:""});return r?n.createElement("div",{className:v.root},n.createElement(a.v0,{className:(0,g.AK)(v.fullscreen,"regular-private-message regular-message")},c&&l&&n.createElement(a.mu,{className:v.username,isPopupEnabled:i||!1,isColored:d,fanClubTier:(null==l?void 0:l.isModel)?null:null===(u=e.details)||void 0===u?void 0:u.fanClubTier,modelId:c.id,placeId:e.id,user:l,banReportSource:y.OV.PRIVATE_CHAT}),p)):n.createElement(h.Z,{messageId:e.id,user:t,className:v.commonMessage,canBeDeleted:!0},p,o&&n.createElement(f.Z,{hasBackground:!0,className:v.indicators,createdAt:e.createdAt,renderPlaceId:o,isMessageRead:e.isRead,shouldHaveAbsolutePosition:!0}))}},30478:(e,t,r)=>{"use strict";r.d(t,{a:()=>u});var n=r(27378),a=r(96499),o=r(57174),i=r(29413),s=r(99748),l=r(95654),c=r(62203);let u=({onClick:e,children:t,className:r})=>{let u=(0,l.C)(c.LK),{isXLFontSize:d}=(0,a.m3)();return n.createElement(o.ZP,{onClick:e,className:(0,s.AK)("highlight-button",r,{"highlight-button--with-border":u})},n.createElement("span",{className:(0,s.AK)("highlight-button__content",{"highlight-button__content--xl":d})},t,n.createElement(i.Z,{className:"highlight-button__icon",img:"chevron-right",size:12})))}},53043:(e,t,r)=>{"use strict";r.d(t,{w:()=>I});var n=r(64553),a=r(27378),o=r(11657),i=r(79081),s=r(2762),l=r(15504),c=r(10269),u=r(46424),d=r(13696),p=r(30478),m=r(95366),f=r(62668),h=r(99748),g=r(94380),y=r(95654),v=r(63256);let b=/%username%/,E=/%pluginName%/,_=/%pluginNameText%/,w=RegExp("\\{#fade\\}(?<activity>.+)\\{\\/fade\\}"),C=RegExp("\\{#accent\\}(?<activity>.+)\\{\\/accent\\}"),S=RegExp("\\{#action name=(?:\"|')(?<name>.+)(?:\"|')\\}(?<text>.+)\\{\\/action\\}"),k=RegExp(`(${b.source}|${E.source}|${_.source}|${/\{#accent\}.+\{\/accent\}/.source}|${/\{#action name=(?:"|').+(?:"|')\}.+\{\/action\}/.source}|${/\{#fade\}.+\{\/fade\}/.source})`),x={[o._t]:"battleships",[o.O1]:"polls",[o.iD]:"reactions",[o.kS]:"wheel"},I=e=>{let{onUsernameClick:t,id:r,isFullscreen:o,message:I,plugin:A,user:N}=e,P=(0,g.T)(),M=(0,y.C)(v.Duv),R=(0,y.C)(s.H$),O=()=>{let e=x[A.name];e&&P((0,f.Ae)({type:"extension",subtype:e}))},L=()=>{R.some(e=>e.id===A.id)?P((0,c._f)(m.pow.PLUGINS_MENU,A.id)):P((0,u.dI)(A))},$=e=>{if(O(),(0,l.Cs)(A)){P((0,i.LY)(A));return}P((0,i.Mq)(A.id,e))},j=I.split(k),T=()=>{t(N.username)};return j.map((e,t)=>{let i=C.exec(e),s=S.exec(e),l=w.exec(e);if(N&&b.test(e))return a.createElement(d.nr,{key:`${N.id}-${t}`,isLevelLeagueStatusVisible:!1,isUltimateIconVisible:!1,user:N,className:"plugin-message-username",placeId:r,onClick:T,withoutUserCardPopup:o});if((null==l?void 0:l.length)===2){let e=l[1];return a.createElement("span",{key:t,className:"plugin-message-fade"},e)}if((null==i?void 0:i.length)===2){let e=i[1];return a.createElement("span",{key:t,className:"plugin-message-accent"},e)}let c=M?p.a:n.Z;return(null==s?void 0:s.length)===3?a.createElement(c,{key:t,onClick:()=>$(s[1]),className:(0,h.AK)({"plugin-message-plugin-name":!M})},s[2]):E.test(e)?a.createElement(c,{key:t,onClick:L,className:"plugin-message-plugin-name"},A.title):_.test(e)?A.title:a.createElement("span",{key:t,className:"plugin-message-text"},e)})}},8506:(e,t,r)=>{"use strict";r.d(t,{o:()=>b});var n=r(27378),a=r(13696),o=r(80439),i=r(89294),s=r(73545);let l={},c=(e,t)=>{if(!t)return l;let r=(0,o.iD)(e),n=(0,s.ti)(e),a=(0,i.AX)(e,t);return r?a:n};var u=r(95376),d=r(68798),p=r(30486),m=r(99748),f=r(56509),h=r(20717),g=r(95654),y=r(63256),v=r(47742);let b=({message:e})=>{let t=(0,g.C)(o.iD),{fanClubTier:r}=e.details,i=(0,g.C)(v.Pn),s=(0,g.C)(y.oA2),l=(0,g.C)(e=>c(e,r)),b=s&&!!l.p2p,E=(0,h.jz)(`/cams/components/ui/HeartImage/images/${b?"heart-with-lightning.svg":"heart-exclusive.svg"}`),_=t?"model":"user";return n.createElement(a.v0,{className:"upgrade-private-message",background:"private-upgraded",leftLineColor:"private-upgraded","data-message-id":e.id},n.createElement("div",{className:"upgrade-private-message__icon-wrapper"},n.createElement("img",{className:(0,m.AK)("upgrade-private-message__icon",{"upgrade-private-message__icon--with-benefits":b}),src:E,alt:""})),n.createElement("div",{className:(0,m.AK)("upgrade-private-message__text-wrapper",{"upgrade-private-message__text-wrapper--with-benefits":b})},n.createElement("div",{className:"upgrade-private-message__header"},n.createElement(p.Z,{messageId:`camChat.showUpgraded.${_}.${b?"titleWithBenefit":"title"}`,elements:{tier:r?n.createElement(u.F,{classNames:{root:"upgrade-private-message__fan-club-label"},tier:r}):n.createElement("span",null),accent:n.createElement("span",{className:"upgrade-private-message__highlighted"})},parameters:{tokens:(0,d.Fg)(e.details.p2pRate,(0,d.D4)("p2p",i,l).value)}})),n.createElement("div",{className:"upgrade-private-message__footer"},(0,f.dW)(`camChat.showUpgraded.${_}.description`))))}},97344:(e,t,r)=>{"use strict";r.d(t,{Z:()=>y});var n=r(18775),a=r(27378),o=r(48204),i=r(4289),s=r(77382),l=r(99382),c=r(99748),u=r(56509),d=r(93776),p=r(77617),m=r(32284);let f={showAuthModal:s.Vu,showSubscriptionPackage:p._o},h=[{icon:"chat-with-badge",title:"camChat.stubs.newUltimateRequired.benefits.messages"},{icon:"camera",title:"camChat.stubs.newUltimateRequired.benefits.photos"},{icon:"emoji-colors",title:"camChat.stubs.newUltimateRequired.benefits.emoji"}];class g extends a.PureComponent{renderAction(){let{action:e}=this.props,t=null;return("getUltimate"===e?t=a.createElement(l.ZP,{style:"ultimate",size:"medium",onClick:this.clickHandler},(0,u.dW)("camChat.stubs.newUltimateRequired.getUltimate")):"register"===e&&(t=a.createElement(l.ZP,{style:"signup",size:"medium",onClick:this.clickHandler},(0,u.dW)("camChat.stubs.newUltimateRequired.register"))),t)?a.createElement("div",{className:"new-ultimate-required__action"},t):null}render(){let{compact:e,withoutIcon:t,onLinkClick:r,counterpart:n}=this.props;return a.createElement("div",{className:(0,c.AK)("new-ultimate-required",{"new-ultimate-required--compact":!!e,"new-ultimate-required--with-icon":!t})},a.createElement("div",{className:"new-ultimate-required__icon"},a.createElement("div",{className:"new-ultimate-required__star"}),a.createElement("div",{className:"new-ultimate-required__shadow"})),a.createElement("div",{className:"new-ultimate-required__title"},a.createElement(d.IJ,{messageId:"camChat.stubs.newUltimateRequired.title",elements:{span:a.createElement("span",{className:"new-ultimate-required__title--highlight"})}})),a.createElement("div",{className:"new-ultimate-required__benefits"},h.map(e=>a.createElement("div",{className:"new-ultimate-required__benefit",key:e.icon},a.createElement("div",{className:`new-ultimate-required__benefit-icon  new-ultimate-required__benefit-icon--${e.icon}`}),a.createElement("div",{className:"new-ultimate-required__benefit-title"},(0,u.dW)(e.title))))),a.createElement("div",{className:"new-ultimate-required__benefits-description"},a.createElement(d.IJ,{messageId:"camChat.stubs.newUltimateRequired.description",elements:{link:a.createElement(i.rU,{to:{pathname:"/subscriptions",search:n.username?`?modelName=${n.username}`:void 0},onClick:r})}})),this.renderAction())}constructor(...e){super(...e),(0,n._)(this,"clickHandler",()=>{let{action:e,onButtonClick:t,counterpart:r}=this.props;null==t||t(),"getUltimate"===e?this.props.showSubscriptionPackage("",r.username):"register"===e&&this.props.showAuthModal({action:{backgroundImage:r.avatarUrl||void 0,type:"regAndUltimateToMsg",user:(0,m.T$)(r),shouldBypassActionPrefix:!0},component:"SignUp",className:"auth-modal-signup",triggerSource:d.Dt.PRIVATE_TAB_SIGNUP})})}}let y=(0,o.$j)(null,f)(g)},62928:(e,t,r)=>{"use strict";r.d(t,{x:()=>E});var n=r(64553),a=r(27378),o=r(83550),i=r(29413),s=r(99748),l=r(56509),c=r(70203),u=r(94380),d=r(95654),p=r(63256),m=r(27251),f=r(74012),h=r(76482),g=r(30486),y=r(56322);let v=({targetRef:e,onClose:t,onClick:r,className:o})=>{let c=(0,a.useRef)(null),u=(0,a.useCallback)(()=>{if(e.current&&c.current){let t=e.current.getBoundingClientRect().x-c.current.getBoundingClientRect().x;c.current.style.setProperty("--teaser-tooltip-arrow-left",`${t}px`)}},[e,c]),d=(0,a.useCallback)(()=>{(0,h.Z)(u,500)()},[u]);return(0,a.useEffect)(()=>(window.addEventListener("resize",d),()=>window.removeEventListener("resize",d)),[d]),(0,a.useLayoutEffect)(()=>{u()},[u]),a.createElement(y.Z,{isForceVisible:!0,isForcePlacement:!0,placement:"top",targetRef:e,isMobileRelative:!1,className:"TeaserTooltip#Dz",innerClassName:(0,s.AK)("TeaserTooltip__inner#B6",o),gap:14,onClick:r,innerRef:c},a.createElement(n.Z,{className:"TeaserTooltip__closeIcon#ch",onClick:t,"aria-label":(0,l.dW)("aria.controls.closeTooltip")},a.createElement(i.Z,{img:"close-ds",size:16})),a.createElement("span",{className:"TeaserTooltip__icon#m8"}),a.createElement("div",{className:"TeaserTooltip__content#sc"},a.createElement("span",{className:"TeaserTooltip__new#N2"},"NEW"),a.createElement(g.Z,{messageId:"privateMessages.gif.teaser"})))},b="gifTeaserWasShown",E=({onClick:e,isActive:t,className:r,teaserClassName:h,counterpartId:g})=>{let[y,E]=(0,a.useState)(!1),_=(0,a.useRef)(null),w=(0,u.T)(),C=(0,d.C)(p.CWf),S=(0,d.C)(p.N_M),k=(0,d.C)(f.ts),x=(0,d.C)(m.GG);(0,a.useLayoutEffect)(()=>{let e=!c.m.get(b)&&g;return e&&(w((0,o.R3)(g)),E(!0),setTimeout(()=>c.m.set(b,!0),1e3)),()=>{y&&g&&w((0,o.xx)(g))}},[g,w,y]);let I=()=>{y&&g&&w((0,o.xx)(g))},A=()=>{e(),I()};if(!C)return null;let N=y&&S&&!(null==k?void 0:k.isModel)&&g===x;return a.createElement(a.Fragment,null,N&&S&&!(null==k?void 0:k.isModel)&&g===x&&a.createElement(v,{targetRef:_,onClose:e=>{e.stopPropagation(),I()},onClick:A,className:h}),a.createElement(n.Z,{className:(0,s.AK)("GiphyGallery#XB",r,{"GiphyGallery__active#pe":t}),onClick:A,ref:_,"aria-label":(0,l.dW)("aria.controls.showGifGallery")},a.createElement(i.Z,{img:"gif-ds",className:"GiphyGallery__icon#fy"})))}},8433:(e,t,r)=>{"use strict";r.d(t,{M:()=>_});var n=r(28175),a=r(19068),o=r(76482),i=r(27378),s=r(11850),l=r(99748),c=r(95654),u=r(63256);let d={root:"GifGallery#eE",gridWrapper:"GifGallery__gridWrapper#Jv",grid:"GifGallery__grid#Xa"};var p=r(64553),m=r(29413),f=r(74753),h=r(56509);let g=({onChange:e,onClose:t,className:r,inputClassName:n,inputRef:a,closeIconSize:o})=>i.createElement("header",{className:(0,l.AK)("GifGalleryHeader#LB",r)},i.createElement("div",{className:"GifGalleryHeader__logo#aC"},i.createElement("div",{className:"GifGalleryHeader__logoIcon#h5"})),i.createElement("label",{className:"GifGalleryHeader__inputWrapper#Q5"},i.createElement(m.Z,{className:(0,l.AK)("GifGalleryHeader__searchIcon#Ew","GifGalleryHeader__icon#r0"),size:17,img:"search-ds"}),i.createElement(f.Z,{autoFocus:!0,type:"text",className:(0,l.AK)("GifGalleryHeader__input#Dk",n),onChange:t=>{e(t.target.value)},placeholder:(0,h.dW)("privateMessages.gif.searchPlaceholder"),maxLength:50,ref:a})),i.createElement(p.Z,{className:"GifGalleryHeader__closeButton#nl",onClick:t,"aria-label":(0,h.dW)("button.close")},i.createElement(m.Z,{img:"close-ds",size:o||20}))),y={root:"Message#MF",text:"Message__text#d3",errorMessage:"Message__errorMessage#nQ",noResultMessage:"Message__noResultMessage#Ga",icon:"Message__icon#Qq",randomButton:"Message__randomButton#LN",smile:"Message__smile#h0"},v=()=>i.createElement("div",{className:y.root},i.createElement(m.Z,{className:y.icon,img:"error-circle-outline-ds",size:24}),i.createElement("div",{className:(0,l.AK)(y.text,y.errorMessage)},(0,h.dW)("privateMessages.gif.cantLoadGallery")));var b=r(30486);let E=({onRandomButtonClick:e})=>i.createElement("div",{className:y.root},i.createElement(m.Z,{img:"search-off-ds",className:y.icon,size:24}),i.createElement("span",{className:(0,l.AK)(y.text,y.noResultMessage)},i.createElement(b.Z,{messageId:"privateMessages.gif.noResult",elements:{br:i.createElement("br",null),smile:i.createElement("span",{className:y.smile},"\uD83D\uDE15")}})," ",i.createElement(p.Z,{onClick:e,className:y.randomButton},(0,h.dW)("privateMessages.gif.randomGifs")))),_=({className:e,searchBarClassName:t,onClose:r,onGifClick:p,searchInputClassName:m,closeIconSize:f})=>{let[h,y]=(0,i.useState)(""),[b,_]=(0,i.useState)(0),[w,C]=(0,i.useState)(!1),S=(0,i.useRef)(null),k=(0,c.C)(u.gwT),x=new n.sF(k),I=(0,i.useRef)(null),A=(0,i.useRef)(!1),[N,P]=(0,s.eW)();return(0,i.useEffect)(()=>{!N&&A.current&&r()},[N,r]),(0,i.useEffect)(()=>{P(),A.current=!0},[P]),(0,i.useLayoutEffect)(()=>{let e;let t=S.current;return t&&(e=new ResizeObserver(e=>{_(e[0].contentRect.width-32)})).observe(t),()=>{var t;null===(t=e)||void 0===t||t.disconnect()}},[]),i.createElement("div",{className:(0,l.AK)(d.root,e),ref:S,onClick:e=>{e.stopPropagation()}},i.createElement(g,{onChange:(0,o.Z)(e=>{C(!1),y(e)},300),onClose:r,className:t,inputClassName:m,inputRef:I,closeIconSize:f}),i.createElement("div",{className:d.gridWrapper},w?i.createElement(v,null):i.createElement(a.rj,{noResultsMessage:i.createElement(E,{onRandomButtonClick:()=>{C(!1),y(""),I.current&&(I.current.value="")}}),className:(0,l.AK)(d.grid),fetchGifs:e=>{let t={offset:e,limit:25};return h?x.search(h,t):x.trending(t)},width:b,columns:3,gutter:8,hideAttribution:!0,key:h,onGifClick:(e,t)=>{t.preventDefault(),p({giphyId:e.id,giphyWidth:e.images.fixed_width.width,giphyHeight:e.images.fixed_width.height}),r()},onGifsFetchError:()=>{C(!0)}})))}},44986:(e,t,r)=>{"use strict";r.d(t,{n:()=>o});var n=r(16740),a=r(27378);let o=({displayingImagesConfig:e,newPhotoCount:t=0,onClick:r=()=>!1,shouldBlurFirstPhoto:o=!1,shouldBlurSecondAndThirdPhoto:i=!1})=>a.createElement("div",{className:"message-image-grid-wrapper"},a.createElement(n.Z,{displayingImagesConfig:e,newPhotoCount:t,onClick:r,shouldBlurFirstPhoto:o,shouldBlurSecondAndThirdPhoto:i}))},96830:(e,t,r)=>{"use strict";r.d(t,{c:()=>l});var n=r(64553),a=r(27378),o=r(29413),i=r(99748),s=r(56509);let l=({className:e,isInPrivate:t,onClick:r,isDisabled:l})=>a.createElement(n.Z,{onClick:r,className:(0,i.AK)("SendButton#YP",{"SendButton__private#NI":t},e),disabled:l,"aria-label":(0,s.dW)("aria.controls.sendMessage")},a.createElement(o.Z,{className:"SendButton__sendIcon#Fj",img:"send-ds",size:24}))},55570:(e,t,r)=>{"use strict";r.d(t,{R:()=>i,m:()=>s});var n=r(27378),a=r(10642);let o=(0,n.createContext)(null),i=({value:e,children:t})=>n.createElement(o.Provider,{value:e},t),s=()=>{let e=(0,n.useContext)(o);return e||a.ZP.error("useChatScroll must be used inside ChatScrollContext context"),e}},58438:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(27378),a=r(63213);let o=[{isCounterpart:!0,lines:[50,70,[20,20]]},{isCounterpart:!1,lines:[60,35,[20,20]]},{isCounterpart:!0,lines:[80,60,[20,20]]},{isCounterpart:!0,lines:[30,50,[20,20]]},{isCounterpart:!1,lines:[30,35,[15,15]]},{isCounterpart:!0,lines:[40,65,[20,20]]},{isCounterpart:!1,lines:[55,40,[20,20]]},{isCounterpart:!0,lines:[80,85,[30,30]]}],i=({line:e})=>Array.isArray(e)?n.createElement("div",{className:"skeleton-dashes skeleton-line"},n.createElement("div",{className:"skeleton-dash",style:{width:`${e[0]}%`}}),n.createElement("div",{className:"skeleton-dash",style:{width:`${e[1]}%`}})):n.createElement("div",{className:"skeleton-line skeleton-dash",style:{width:`${e}%`}}),s=({message:e})=>n.createElement("div",{className:(0,a.AK)("message-skeleton",{"right-message":!e.isCounterpart})},e.isCounterpart&&n.createElement("div",{className:"avatar-skeleton"}),n.createElement("div",{className:"skeleton-message-content"},e.lines.map((e,t)=>n.createElement(i,{line:e,key:`line_${t}`})))),l=({messagesCount:e})=>{let t=!e||e>o.length?o:o.slice(0,e);return n.createElement("div",{className:"chat-skeleton"},t.map((e,t)=>n.createElement(s,{message:e,key:`message_${t}`})))}},15421:(e,t,r)=>{"use strict";r.d(t,{C:()=>h});var n=r(27378),a=r(29413),o=r(56509),i=r(95654),s=r(83550),l=r(99382),c=r(59593),u=r(94380);let d=({user:e,canFriend:t,hasFriendshipRequestSent:r})=>{let a=(0,u.T)(),i=(0,n.useCallback)(()=>{a((0,s.d2)(c.FO.FRIENDSHIP,{user:e}))},[e,a]),d=(0,o.dW)("messenger.chat.modelNotFriendStub.button");return r?n.createElement("div",{className:"model-not-friend-stub-request-placeholder"},(0,o.dW)("messenger.chat.modelNotFriendStub.requestSent")):t?n.createElement(l.ZP,{className:"model-not-friend-stub-btn",style:"apply",onClick:i,"aria-label":d},d):null};var p=r(21044),m=r(65754),f=r(46607);let h=({user:e,iconSize:t=56})=>{let r=(0,i.C)(t=>(0,f.u$)(t,e.id)),s=(0,i.C)(t=>{var r;return(null===(r=(0,m.wg)(t,e.id))||void 0===r?void 0:r.status)===p.Rk.REQUESTED});return n.createElement(n.Fragment,null,n.createElement(a.Z,{width:t,height:t,img:"chat-lock",className:"model-not-friend-stub-icon"}),n.createElement("div",{className:"model-not-friend-stub-title"},(0,o.dW)(s||r?"messenger.chat.modelNotFriendStub.title":"messenger.chat.modelNotFriendStub.cantAdd")),n.createElement(d,{user:e,canFriend:r,hasFriendshipRequestSent:s}))}},66248:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(76482),a=r(27378),o=r(93776);let i=({textarea:e,hiddenTextarea:t,value:r="x",minRows:n=1,maxRows:a=1/0})=>{let o=window.getComputedStyle(e),i=parseFloat(o.paddingBottom)+parseFloat(o.paddingTop),s=parseFloat(o.borderBottomWidth)+parseFloat(o.borderTopWidth);t.style.width=o.width,t.value=r;let l=t.scrollHeight;t.value="x";let c=t.scrollHeight;return l=Math.max(c*n+i+s,l),Math.min(c*a+i+s,l)},s=()=>!1,l=({className:e,maxRows:t,minRows:r,onBlur:l,onChange:c,onChangeHeight:u=s,onEnterPress:d=s,onFocus:p,onKeyDown:m=s,placeholder:f,textareaRef:h,maxLength:g,value:y,disabled:v})=>{let b=(0,a.useRef)(0),E=(0,a.useRef)(null),[_,w]=(0,a.useState)(0),C=(0,a.useCallback)(()=>{if(E.current&&h.current){let e=i({textarea:h.current,hiddenTextarea:E.current,value:y||f,minRows:r,maxRows:t});b.current!==e&&(w(e),b.current=e)}},[t,r,f,h,y]);(0,a.useEffect)(()=>{C();let e=(0,n.Z)(C,200);return addEventListener("orientationchange",e),()=>{removeEventListener("orientationchange",e)}},[C]),(0,a.useEffect)(()=>{u(_)},[_,u]);let S=(0,o.Db)(d,m);return a.createElement(a.Fragment,null,a.createElement("textarea",{className:e,onBlur:l,onChange:e=>{c(e.target.value)},onFocus:p,onKeyDown:S,placeholder:f,ref:h,style:{height:`${_}px`},value:y,maxLength:g,disabled:v}),a.createElement("textarea",{"aria-hidden":"true",className:e,ref:E,disabled:v,style:{minHeight:0,maxHeight:"none",height:0,visibility:"hidden",overflow:"hidden",position:"absolute",zIndex:-1e3,top:0,left:0,boxSizing:"border-box",border:0},tabIndex:-1}))}},66028:(e,t,r)=>{"use strict";r.d(t,{Z:()=>u});var n=r(64553),a=r(27378),o=r(30486),i=r(29413),s=r(41950),l=r(56509);let c=({activeIndex:e,onNextClick:t,onPrevClick:r,quantity:o})=>a.createElement("div",{className:"player-pagination"},a.createElement(n.Z,{onClick:r,className:"player-pagination__button player-pagination__button--rotate",disabled:0===e},a.createElement(i.Z,{img:"chevron-right",size:12})),a.createElement(n.Z,{onClick:t,className:"player-pagination__button",disabled:e===o},a.createElement(i.Z,{img:"chevron-right",size:12}))),u=({audios:e,onClose:t})=>{let r=(0,a.useRef)(null),[u,d]=(0,a.useState)(0),p=e.length>1,m=p?e[u]:e[0];return(0,a.useEffect)(()=>{r.current&&r.current.scrollIntoView({block:"center",behavior:"smooth"})},[]),a.createElement("div",{className:"chat-voice-player-modal",ref:r},a.createElement("div",{className:"chat-voice-player-modal__close"},a.createElement("div",{className:"chat-voice-player-modal__header"},p?a.createElement(o.Z,{elements:{darken:a.createElement("span",{className:"chat-voice-player-modal__text-darken"})},messageId:"messenger.mediaUploader.voiceMessages",parameters:{activeIndex:u+1,audioCount:e.length}}):(0,l.dW)("messenger.mediaUploader.voiceMessage")),a.createElement(n.Z,{onClick:t,className:"chat-voice-player-modal__close-btn"},a.createElement(i.Z,{img:"close-3",size:14}))),a.createElement("div",{className:"chat-voice-player-modal__content"},a.createElement("div",{className:"chat-voice-player-modal__player"},a.createElement(s.ZP,{url:m.url,isMessage:!0,duration:m.duration,disableAutostart:!0}))),!!m.title&&a.createElement("div",{className:"chat-voice-player-modal__title"},m.title),p&&a.createElement("div",{className:"chat-voice-player-modal__pagination"},a.createElement(c,{activeIndex:u,onNextClick:()=>{d(u+1)},onPrevClick:()=>{d(u-1)},quantity:e.length-1})))}},31181:(e,t,r)=>{"use strict";r.d(t,{Z:()=>d});var n=r(27378),a=r(3034),o=r(56509),i=r(94380),s=r(95654),l=r(63256),c=r(31843),u=r(93776);let d=({recipientId:e,renderPlaceId:t})=>{let r=(0,i.T)(),d=(0,s.C)(l.CWf),p=(0,s.C)(u.ts),m=(0,n.useRef)(null);return n.createElement(n.Fragment,null,n.createElement(u.mI,{onClick:()=>r((0,c.KY)(e,t)),className:(0,u.AK)("messenger-upload-button-wrapper",{"messenger-upload-button-wrapper-new":d}),"aria-label":(0,o.dW)("aria.controls.uploadFile"),ref:m},n.createElement(u.JO,{className:"upload-icon",img:"photo-3"})),!u.L4.touch&&n.createElement(a.Z,{targetRef:m,placement:"top",isMobileRelative:!1},(null==p?void 0:p.isModel)?(0,o.dW)("messenger.mediaUploader.titles.sendPhotoVideo"):(0,o.dW)("messenger.mediaUploader.titles.sendPhoto")))}},94092:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(27378),a=r(95654),o=r(27),i=r(93776),s=r(63213);let l=({createdAt:e,renderPlaceId:t,className:r,hasBackground:l,isMessageRead:c,shouldHaveAbsolutePosition:u})=>{let d=(0,a.C)(e=>(0,o.Sl)(e,t)),p=c?"read":"check-4",m=t=>n.createElement("span",{className:t},d&&(0,i.B_)(e),n.createElement(s.JO,{img:p,className:"read-icon"}));return n.createElement("span",{className:(0,s.AK)("message-indicators",{"with-absolute-position":u},{"with-background":l},{"without-timestamp":!d},r)},m("message-indicators-placeholder"),m("message-indicators-content"))}},12082:(e,t,r)=>{"use strict";r.d(t,{L:()=>w});var n=r(64553),a=r(27378),o=r(11850),i=r(29413),s=r(56322),l=r(96552),c=r(99748),u=r(56509),d=r(57174),p=r(52719),m=r(94380),f=r(95654),h=r(7685),g=r(79080),y=r(66827),v=r(66483);let b={content:"DeletePrivateMessageConfirmationModal__content#sZ",message:"DeletePrivateMessageConfirmationModal__message#F4",buttons:"DeletePrivateMessageConfirmationModal__buttons#YF"},E=l.P4.create(({onClose:e,messageId:t})=>{let r=(0,f.C)(e=>(0,y._t)(e,t)),n=(0,f.C)(e=>(0,v.GA)(e,null==r?void 0:r.recipientId)),o=(0,h.L)("title"),i=(0,m.T)();return a.createElement(p.Z,{onClose:e,contentClassName:b.content,"aria-describedby":o},a.createElement("header",{className:b.message},(0,u.dW)("privateMessages.deleteMessageConfirmation",{username:null==n?void 0:n.username})),a.createElement("div",{className:b.buttons},a.createElement(d.ZP,{style:"accept",className:b.button,onClick:()=>{r&&i((0,g.Qr)(t,r.recipientId)),e()}},(0,u.dW)("button.delete")),a.createElement(d.ZP,{style:"default",className:b.button,onClick:e},(0,u.dW)("button.cancel"))))}),_={root:"DeletePrivateMessageButton#_A",tooltipInner:"DeletePrivateMessageButton__tooltipInner#KT",visible:"DeletePrivateMessageButton__visible#s4",light:"DeletePrivateMessageButton__light#ji",tooltipContentWrapper:"DeletePrivateMessageButton__tooltipContentWrapper#PF",tooltipContent:"DeletePrivateMessageButton__tooltipContent#KS",left:"DeletePrivateMessageButton__left#i0",top:"DeletePrivateMessageButton__top#yL",default:"DeletePrivateMessageButton__default#mf",button:"DeletePrivateMessageButton__button#QC",menuIcon:"DeletePrivateMessageButton__menuIcon#JB",hasBackground:"DeletePrivateMessageButton__hasBackground#tO",trashIcon:"DeletePrivateMessageButton__trashIcon#qR"},w=({variant:e="default",placement:t="left",className:r,hasBackground:d,messageId:p})=>{let[m,f]=(0,o.eW)(),h=(0,a.useRef)(null),g=(0,a.useCallback)(e=>{e.preventDefault(),f(e)},[f]);return a.createElement("div",{className:(0,c.AK)(_.root,{[_.light]:"light"===e,[_.default]:"default"===e})},a.createElement(n.Z,{className:(0,c.AK)(_.button,r,{[_.hasBackground]:d,[_.visible]:m}),"aria-label":(0,u.dW)("privateMessages.deleteMessageTooltipAria"),onClick:g,ref:h},a.createElement(i.Z,{img:"menu-mobile",className:_.menuIcon})),m&&a.createElement(s.Z,{targetRef:h,isForceVisible:!0,isForcePlacement:!0,isMobileRelative:!1,innerClassName:(0,c.AK)(_.tooltipInner,{[_.left]:"left"===t,[_.top]:"top"===t}),placement:t,shouldRenderWithoutPortal:!0,isOtimized:!1},a.createElement(n.Z,{className:_.tooltipContentWrapper,onClick:()=>{l.P4.show(E,{messageId:p})}},a.createElement("div",{className:_.tooltipContent},a.createElement(i.Z,{img:"trash",className:_.trashIcon}),(0,u.dW)("privateMessages.deleteMessage")))))}},47285:(e,t,r)=>{"use strict";r.d(t,{B:()=>eN,Z:()=>eP});var n=r(27378),a=r(9957),o=r(52318),i=r(8506),s=r(95654),l=r(99748),c=r(94380),u=r(63256),d=r(31843),p=r(94092),m=r(19434),f=r(27),h=r(63213);let g=({className:e,imageSrc:t,altMessage:r,retryLoad:a,onImageLoadingStatusChanged:o=()=>!1})=>{let i=(0,s.C)(e=>(0,f.Wk)(e,t)),[l,c]=(0,n.useState)(!0),{isMounted:u}=(0,h.tm)();return((0,n.useEffect)(()=>{a&&(0,h.po)(t).catch(async()=>{u.current&&(c(!1),await (0,h.gw)(500),await (0,h.kQ)(()=>(0,h.po)(t),500,6),u&&c(!0))})},[u,t,a]),(0,n.useEffect)(()=>{null==o||o(!i&&l)},[i,o,l]),i||!l)?n.createElement("div",{className:(0,h.AK)("image-with-loader-placeholder",e)}):t?n.createElement("img",{className:(0,h.AK)("image-with-loader",e),src:t,alt:r}):null};var y=r(93776);let v=({isCurrentUserModel:e,isLocked:t,contentType:r})=>{if(e)return t?"messenger.messages.notPurchased":"messenger.messages.unlocked";if(t)switch(r){case"album":return"messenger.messages.unlockAlbum";case"video":return"messenger.messages.unlockVideo";case"mixed":return"messenger.messages.unlockMedia";default:return"messenger.messages.unlockPhoto"}return""};function b(){return n.createElement("span",null)}let E=({price:e,isCurrentUserModel:t,isLocked:r,contentType:a,onUnlock:o,originalPrice:i,className:s})=>{if(!t&&!r)return null;let l=t?"div":y.mI;return n.createElement(l,{className:(0,y.AK)("pay-lock",s),onClick:t?void 0:o},n.createElement(y.JO,{img:t&&!r?"check-round-fat":"lock",className:(0,y.AK)("pay-lock-icon",{"pay-lock-icon-unlocked":t&&!r})}),n.createElement("div",{className:"pay-lock-label"},n.createElement(y.IJ,{elements:{priceWrapper:n.createElement("div",{className:"pay-lock-price"}),originalPriceWrapper:i&&i!==e?n.createElement("div",{className:"pay-lock-original-price"}):n.createElement(b,null)},messageId:v({isCurrentUserModel:t,isLocked:r,contentType:a}),parameters:{price:e,originalPrice:null!=i?i:0}})))};var _=r(81326),w=r(32284);let C=(e,t,r)=>{let n=t.photos.length>0?t.photos[0].id:null;e((0,h.K4)(h.Ny.UNIVERSAL_MEDIA_VIEWER,{selectedItemId:n,userPhotos:t.photos,user:(0,w.T$)(r),selectedAlbum:t,likeMode:h.mK.ALBUM,bookmarkMode:h.HY.ALBUM}))},S=n.memo(({message:e,media:t,counterpart:r,renderPlaceId:a})=>{var o;let{album:i}=t,f=(0,c.T)(),y=(0,s.C)(h.A4),v=(0,s.C)(u.JNm),b="paid"===t.accessMode,w="paid"!==t.accessMode||"paid"===t.accessMode&&!!t.boughtAt,[S,k]=(0,n.useState)(!1),x=(0,n.useCallback)(()=>k(!1),[]),I=(0,s.C)(e=>(0,h.GA)(e,i.userId)),[A,N]=(0,h.HQ)(()=>f((0,d.Sc)({messageId:v?e.id:t.id,cost:t.cost,mediaOwner:I,source:a,type:"album",messageKind:e.kind})).then(()=>x()).catch(()=>x())),{photosCount:P,name:M}=i,R=e=>{e.stopPropagation(),(y||!y&&w)&&I?C(f,i,I):y||k(!0)},O=w||y?i.preview:i.previewMicro,L="massMessage"===e.kind&&!!e.body;return n.createElement(m.Z,{className:(0,l.AK)("album-message",{"album-message--with-text":L}),messageId:e.id,user:r,onClick:R,canBeDeleted:!0},n.createElement("div",{className:"image-container"},n.createElement(h.mI,{onClick:R,className:"album-message__album-image-wrapper"},n.createElement(g,{imageSrc:O,className:(0,l.AK)("album-image",{"album-img-restricted":!(0,_.CI)(i)})}),b&&n.createElement(n.Fragment,null,n.createElement(E,{price:t.cost,originalPrice:null===(o=t.details)||void 0===o?void 0:o.originCost,isCurrentUserModel:y,isLocked:!w,contentType:"album",onUnlock:()=>k(!0)}),n.createElement(h.Hh,{isOpen:S,onConfirm:N,onClose:x,cost:t.cost,isLoading:A.fetching})))),n.createElement("div",{className:(0,l.AK)("texts",{"texts--with-body":L})},n.createElement("div",null,M),n.createElement("div",{className:"photos-count"},P," ",(0,h.dW)("messenger.mediaUploader.photos")),L&&n.createElement(n.Fragment,null,n.createElement("div",{className:"texts-divider"}),e.body)),n.createElement(p.Z,{shouldHaveAbsolutePosition:!L,createdAt:e.createdAt,className:"text-message-indicators",renderPlaceId:a,isMessageRead:e.isRead}))});var k=r(10642),x=r(29413),I=r(41950);let A=({duration:e,url:t})=>{let[r,a]=(0,n.useState)(!0),[o,i]=(0,n.useState)(""),[s,c]=(0,n.useState)(!1),u=()=>{i(t),c(!0)};return n.createElement("div",{className:"audio-message-player"},n.createElement("div",{className:(0,l.AK)("audio-message-player__loader",{"audio-message-player__loader--hidden":!r})},n.createElement(I.An,{duration:e,isLoading:s,onPlayClick:u,onPlayerClick:u})),n.createElement("div",{className:(0,l.AK)("audio-message-player__player",{"audio-message-player__player--hidden":r})},n.createElement(I.ZP,{duration:e,isMessage:!0,url:o,onReady:()=>{a(!1),c(!1)}})))};var N=r(9425),P=r(74012);let M=(0,n.memo)(({counterpart:e,isPrivateTab:t,message:{body:r,createdAt:a,id:o,isRead:i,kind:u,media:f,senderId:g},renderPlaceId:y})=>{var v;let b=(0,c.T)(),[E,_]=(0,n.useState)(!1),[w,C]=(0,n.useState)(!1),S=(0,s.C)(P.ts),M=r||(null==f?void 0:f.audio.title),R=null==f?void 0:f.cost,O=null==f?void 0:null===(v=f.audio)||void 0===v?void 0:v.duration,L=(null==f?void 0:f.accessMode)==="paid",$=!L||L&&!!(null==f?void 0:f.boughtAt),j=(null==S?void 0:S.id)===g,T=L&&!$&&e,D=$?"check-in-circle":"lock",F=(0,N.uR)($,j),B=`messenger.messages.${F}`,U=()=>{C(!1)},W=e=>{U(),_(!1),k.ZP.error("Error buyConversation action in AudioMessage",e)},[G,Z]=(0,h.HQ)(()=>(_(!0),b((0,d.Sc)({messageId:o,cost:R,mediaOwner:e,source:y,type:"audio",messageKind:u})).then(U).catch(W))),K=()=>{$||j||C(!0)};return n.createElement(m.Z,{user:e,className:(0,l.AK)("audio-message",{"audio-message--private-tab":t}),messageId:o,onClick:K,canBeDeleted:!0},n.createElement("div",{className:"audio-message__inner"},L&&n.createElement(n.Fragment,null,n.createElement("div",{className:(0,l.AK)("audio-message__access",{"audio-message__access--locked":!$&&!j,"audio-message__access--unlocked":$,"audio-message__access--locked-model":!$&&j})},n.createElement(x.Z,{img:D}),n.createElement("span",{className:"audio-message__access-text"},(0,h.dW)(B,{price:R}))),n.createElement(h.Hh,{isOpen:w,onConfirm:Z,onClose:U,cost:R,isLoading:G.fetching})),n.createElement("div",{className:"audio-message__content"},T?n.createElement("div",{className:"audio-message__loader"},n.createElement(I.An,{duration:O,isLoading:E,onPlayClick:K})):n.createElement("div",{className:"audio-message__player"},n.createElement(A,{url:(null==f?void 0:f.audio.url)||"",duration:O}))),!!M&&n.createElement("p",{className:"audio-message__title"},M),n.createElement(p.Z,{createdAt:a,renderPlaceId:y,isMessageRead:i})))});var R=r(77382),O=r(44986),L=r(59593);let $={audio:[],audioCount:0,imagesConfig:[],photoCount:0,videoCount:0},j=e=>e.reduce((e,t)=>"video"===t.type?{...e,videoCount:e.videoCount+1,imagesConfig:[...e.imagesConfig,{...t,url:t.coverUrl,type:"video"}]}:"audio"===t.type?{...e,audio:[...e.audio,t],audioCount:e.audioCount+1}:{...e,photoCount:e.photoCount+1,imagesConfig:[...e.imagesConfig,{...t,url:t.url||t.urlThumbMicro,type:"photo"}]},$);var T=r(56509);let D=({audioCount:e,photoCount:t,videoCount:r})=>{let n=[];return t&&n.push([t,"photoCount"]),r&&n.push([r,"videoCount"]),e&&n.push([e,"audioCount"]),n.map(([e,t])=>(0,T.dW)(`messenger.mediaTypes.mixed.${t}`,{[t]:e},t)).join(", ")},F=(0,n.memo)(({message:e,counterpart:t,renderPlaceId:r})=>{var a,o,i,u,f,g,v;let b=(null===(a=e.media)||void 0===a?void 0:a.mixed)||[],{audio:_,audioCount:C,imagesConfig:S,photoCount:N,videoCount:M}=j(b),$=(0,c.T)(),T=(0,s.C)(P.ts),[F,B]=(0,n.useState)(!1),U=b.filter(e=>"audio"!==e.type),W=(null===(o=e.media)||void 0===o?void 0:o.accessMode)==="paid",G=!W||W&&!!(null===(i=e.media)||void 0===i?void 0:i.boughtAt),Z=!!(null==T?void 0:T.isModel),K=e.senderId===(null==T?void 0:T.id),H=!!e.body,V=!!_.length,z=!!S.length,q=G?"check-in-circle":"lock",Y=(0,y.uR)(G,Z),Q=`messenger.messages.${Y}`,J=()=>{B(!1)},[X,ee]=(0,h.HQ)(()=>{var n;return $((0,d.Sc)({messageId:e.id,cost:null===(n=e.media)||void 0===n?void 0:n.cost,mediaOwner:t,source:r,type:"mixed",messageKind:"massMessage"})).then(J).catch(e=>{J(),k.ZP.error("Error buyConversation action in MixedMessage",e)})}),et=()=>{G||Z||B(!0)};return n.createElement(m.Z,{user:t,className:"mixed-message",messageId:e.id,onClick:()=>{if(!G&&!K){B(!0);return}M>0&&I.KY.emitPlayAudioEvent(""),$((0,R.K4)(L.MODAL_TYPES.UNIVERSAL_MEDIA_VIEWER,{user:t?(0,w.T$)(t):T&&(0,w.T$)(T),selectedItemId:U[0].id,userPhotos:U}))},canBeDeleted:!0},z&&n.createElement("div",{className:"mixed-message__gallery"},n.createElement(O.n,{displayingImagesConfig:S,shouldBlurFirstPhoto:!G,shouldBlurSecondAndThirdPhoto:!G}),W&&n.createElement(E,{price:null===(u=e.media)||void 0===u?void 0:u.cost,originalPrice:null===(f=e.media)||void 0===f?void 0:f.cost,isCurrentUserModel:Z,isLocked:!G,contentType:"mixed"})),n.createElement("div",{className:(0,l.AK)("mixed-message__footer",{"mixed-message__footer--with-body":H,"mixed-message__footer--with-audio":!H&&V})},z&&n.createElement("div",{className:"mixed-message__media-title"},n.createElement("div",null,(0,h.dW)("messenger.mediaTypes.mixed.title")),n.createElement("div",{className:"mixed-message__counters"},D({audioCount:C,photoCount:N,videoCount:M}))),W&&!z&&n.createElement("div",{className:(0,l.AK)("mixed-message__pay-lock",{"mixed-message__pay-lock--locked":!G&&!Z,"mixed-message__pay-lock--unlocked":G,"mixed-message__pay-lock--locked-model":!G&&Z})},n.createElement(x.Z,{img:q}),n.createElement("span",{className:"audio-message__access-text"},(0,h.dW)(Q,{price:null===(g=e.media)||void 0===g?void 0:g.cost}))),_.map(e=>n.createElement("div",{className:"mixed-message__voice",key:e.id},G||K?n.createElement(A,{duration:e.duration,url:e.url}):n.createElement(I.An,{duration:e.duration,onPlayClick:et,onPlayerClick:et}))),H&&n.createElement("div",{className:(0,l.AK)("mixed-message__body",{"mixed-message__body--no-border":V})},e.body)),n.createElement(p.Z,{shouldHaveAbsolutePosition:!H,createdAt:e.createdAt,renderPlaceId:r,isMessageRead:e.isRead}),n.createElement(h.Hh,{isOpen:F,onConfirm:ee,onClose:J,cost:null===(v=e.media)||void 0===v?void 0:v.cost,isLoading:X.fetching}))});var B=r(98510),U=r(84088),W=r(83971);let G=({photo:e,renderImageModal:t})=>{let[r,a]=(0,n.useState)(!0);(0,W.u)(e.url,a);let[o,i]=r?[e.url,void 0]:[e.urlThumbMicro,"photo-message-modal-loading"];return t(o,i)},Z=({isCurrentUserModel:e,isPhotoModalOpen:t,photo:r,setIsPhotoModalOpen:a})=>{let o=()=>a(!1),i=(e,r)=>n.createElement(y.yv,{isOpen:t,imageUrl:e,altText:"Chat message",onClose:o,modalContentClassName:(0,y.AK)("photo-message-modal-content",r)});return e?n.createElement(G,{photo:r,renderImageModal:i}):i(r.url)},K=n.memo(({message:e,media:t,counterpart:r,renderPlaceId:a})=>{var o;let{photo:i}=t,l=(0,c.T)(),f=(0,s.C)(h.A4),y=(0,s.C)(t=>(0,h.GA)(t,e.senderId)),v=(0,s.C)(u.JNm),b="paid"===t.accessMode&&(!r||r.isModel),_="paid"!==t.accessMode||"paid"===t.accessMode&&!!t.boughtAt,[w,C]=(0,n.useState)(!1),S=(0,n.useCallback)(()=>C(!1),[]),[k,x]=(0,n.useState)(!1),[I,A]=(0,n.useState)(!1),N=e=>{e.stopPropagation(),k&&(f||!f&&_?A(!0):C(!0))},[P,M]=(0,U.HQ)(()=>l((0,d.Sc)({messageId:v?e.id:t.id,cost:t.cost,mediaOwner:y,source:a,type:"photo",messageKind:e.kind})).then(()=>S()).catch(()=>S())),R=_?i.url:i.urlThumbMicro,O="massMessage"===e.kind&&e.body;return n.createElement(n.Fragment,null,n.createElement(m.Z,{user:r,className:(0,h.AK)("photo-message",{"photo-message--with-text":O}),messageId:e.id,onClick:N,renderPlaceId:a,canBeDeleted:!0},n.createElement(h.mI,{onClick:N,className:"photo-message__photo-image-wrapper"},n.createElement(g,{onImageLoadingStatusChanged:x,className:(0,h.AK)(r?"counterpart-photo-image":"own-photo-image","photo-image",{"photo-image-blocked":t.cost&&!_,"photo-image-not-bottom-border-radius":O}),imageSrc:R,retryLoad:!0}),b&&n.createElement(n.Fragment,null,n.createElement(E,{price:t.cost,originalPrice:null===(o=t.details)||void 0===o?void 0:o.originCost,isCurrentUserModel:f,isLocked:!_,contentType:"photo",onUnlock:()=>C(!0)}),n.createElement(B.Z,{isOpen:w,onConfirm:M,onClose:S,cost:t.cost,isLoading:P.fetching}))),O&&n.createElement("div",{className:"texts"},e.body),n.createElement(p.Z,{hasBackground:!O,shouldHaveAbsolutePosition:!O,createdAt:e.createdAt,renderPlaceId:a,isMessageRead:e.isRead})),(_||f)&&n.createElement(Z,{isCurrentUserModel:f,isPhotoModalOpen:I,photo:i,setIsPhotoModalOpen:A}))}),H=({children:e,messageId:t,className:r})=>n.createElement("div",{className:(0,h.AK)("announcement-message",r),"data-message-id":t},e),V=({date:e,messageId:t})=>n.createElement(H,{className:"date-message",messageId:t},e),z=n.memo(({message:e,counterpart:t})=>{var r;let a=null===(r=e.details)||void 0===r?void 0:r.tokens;return a?n.createElement(m.Z,{user:t,messageId:e.id,className:"gift-message"},n.createElement(h.IJ,{elements:{accent:n.createElement("span",{className:"accent"})},messageId:"messenger.messages.gift",parameters:{tokensCount:a}})):null}),q=e=>{switch(e){case h.pn.MEDIUM:return"lovense-medium";case h.pn.LOW:return"lovense-low";case h.pn.HIGH:case h.pn.ULTRA_HIGH:default:return"lovense"}},Y=n.memo(({message:e})=>{if(!e.details.detail)return null;let{name:t,time:r,power:a="default",specialActualValue:o}=e.details.detail,i=q(a),[s,l]=o?["power power-special",`actionList.interactiveToy.special.${o}`]:[`power power-${a}`,`actionList.interactiveToy.levels.power.${a}`];return n.createElement(m.Z,{messageId:e.id,className:"messenger-lovense-tip-message",avatar:n.createElement(h.JO,{img:i,className:"lovense-power-icon"})},n.createElement(h.IJ,{messageId:"camChat.interactiveToy.tip",elements:{power:n.createElement("span",{className:s},(0,h.dW)(l)),duration:n.createElement("span",{className:"duration"}),mobileHidden:n.createElement("span",{className:"vibration-word"}),user:n.createElement("span",{className:"username"},t)},parameters:{time:r}}))}),Q=(e,t)=>r=>{var n;I.KY.emitPlayAudioEvent(""),r((0,h.K4)(h.Ny.UNIVERSAL_MEDIA_VIEWER,{video:null===(n=e.media)||void 0===n?void 0:n.video,isOwnProfile:!1,user:(0,w.T$)(t),userId:t.id,messageId:e.id,messageKind:e.kind,likeMode:h.mK.VIDEO,bookmarkMode:h.HY.VIDEO}))},J=({message:e,media:t,counterpart:r,renderPlaceId:a})=>{var o;let{video:i}=t,l=(0,c.T)(),f=(0,s.C)(h.A4),y=(0,s.C)(u.JNm),v="paid"===t.accessMode,b="paid"!==t.accessMode||"paid"===t.accessMode&&!!t.boughtAt,[_,w]=(0,n.useState)(!1),C=(0,n.useCallback)(()=>w(!1),[]),S=(0,s.C)(e=>(0,h.GA)(e,i.userId)),[k,x]=(0,h.HQ)(()=>l((0,d.Sc)({messageId:y?e.id:t.id,cost:t.cost,mediaOwner:S,source:a,type:"video",messageKind:e.kind})).then(()=>C()).catch(()=>C())),I=b?i.coverUrl:i.microCoverUrl,A=Math.floor(i.duration/60).toString().padStart(2,"0"),N=(i.duration%60).toString().padStart(2,"0"),P="massMessage"===e.kind&&e.body;return I?n.createElement(m.Z,{user:r,className:(0,h.AK)("video-message",{"video-message--with-message-text":P}),messageId:e.id,onClick:t=>{t.stopPropagation(),(f||!f&&b)&&S?l(Q(e,S)):w(!0)},canBeDeleted:!0},n.createElement("div",{className:"video-message__cover-wrapper"},n.createElement(g,{className:(0,h.AK)(r?"counterpart-video-image":"own-video-image",{"video-image-blocked":t.cost&&!b}),imageSrc:I}),v?n.createElement(n.Fragment,null,n.createElement(E,{price:t.cost,originalPrice:null===(o=t.details)||void 0===o?void 0:o.originCost,isCurrentUserModel:f,isLocked:!b,contentType:"video",onUnlock:()=>w(!0),className:"video-message__pay-lock"}),n.createElement(h.Hh,{isOpen:_,onConfirm:x,onClose:C,cost:t.cost,isLoading:k.fetching})):n.createElement(h.mI,{className:"play"},n.createElement(h.JO,{img:"play-5",className:"play-icon"}))),n.createElement("div",{className:"right-top"},v&&n.createElement(h.mI,{className:"mini-play"},n.createElement(h.JO,{img:"play-5",className:"mini-play-icon",size:10})),n.createElement("div",{className:"duration"},`${A}:${N}`)),P&&n.createElement("div",{className:"texts"},e.body),n.createElement(p.Z,{shouldHaveAbsolutePosition:!P,hasBackground:!P,className:P?"text-message-indicators":void 0,createdAt:e.createdAt,renderPlaceId:a,isMessageRead:e.isRead})):null},X=n.memo(({message:e,media:t,counterpart:r,...a})=>{let o=(0,s.C)(h.ts);switch(t.video.status){case"processing":if(t.senderId===(null==o?void 0:o.id))return n.createElement(m.Z,{user:r,className:"processing-video-message",messageId:e.id,canBeDeleted:!0},n.createElement(h.JO,{img:"time-pending",size:32,className:"time-icon"}),n.createElement(h.xv,{type:"s11-w500"},(0,h.dW)("messenger.messages.sendingVideo")));return null;case"error":return null;default:return n.createElement(J,{...a,message:e,media:t,counterpart:r})}}),ee=(0,n.memo)(({message:e,media:t,counterpart:r,renderPlaceId:a,onUnlockedAudioClick:o})=>{var i;let{translationId:l,ownerId:u,name:d}=(0,y.o)(t),[f,g,v]=(0,h.O0)(!1),b=(0,c.T)(),E=(0,s.C)(t=>(0,h.GA)(t,u||e.senderId)),_=(0,n.useCallback)(()=>{(null==t?void 0:t.audio)&&o([null==t?void 0:t.audio])},[null==t?void 0:t.audio,o]),S=(0,n.useCallback)(e=>{b((0,h.K4)(h.Ny.UNIVERSAL_MEDIA_VIEWER,{user:E?(0,w.T$)(E):null,selectedItemId:e[0].id,userPhotos:e}))},[b,E]),k=()=>{if(!(null==t?void 0:t.mixed))return;let{viewerItems:e,audioItems:r}=(0,y.MU)(t.mixed);if(e.length){S(e);return}r.length&&o(r)};return n.createElement(m.Z,{user:r,messageId:e.id,className:"media-unlocked-message"},n.createElement(h.IJ,{elements:{accent:n.createElement("span",{className:"media-unlocked-message-accent"}),mediaLink:n.createElement("span",{role:"button",tabIndex:0,onClick:()=>{if(E)switch(null==t?void 0:t.type){case"video":b(Q(e,E));break;case"album":C(b,t.album,E);break;case"photo":g();break;case"mixed":k();break;case"audio":_()}},className:"media-unlocked-message-media-button"})},messageId:l,parameters:{mediaCost:t.cost,mediaName:null!=d?d:""}}),n.createElement(p.Z,{createdAt:e.createdAt,renderPlaceId:a,className:"text-message-indicators",isMessageRead:e.isRead}),(null===(i=t.photo)||void 0===i?void 0:i.url)&&n.createElement(h.yv,{isOpen:f,imageUrl:t.photo.url,altText:"Chat message",onClose:v}))}),et=()=>n.createElement(h.JO,{className:"system-message-avatar",img:"chat-actions"}),er=n.memo(({message:e,counterpart:t})=>{var r;let a=(0,c.T)(),o=null===(r=e.details)||void 0===r?void 0:r.activity;if(!o)return null;let i=(0,h.dW)(`broadcast.activities.${o}`)===`broadcast.activities.${o}`?o:(0,h.dW)(`broadcast.activities.${o}`);return n.createElement(m.Z,{messageId:e.id,className:"messenger-private-menu-message",onClick:t?void 0:e=>{e.stopPropagation(),a((0,h.iy)())},avatar:n.createElement(et,null),user:null},n.createElement(h.IJ,{className:"message-text",elements:{activity:n.createElement("span",{className:"accent"},i)},messageId:t?"camChat.console.privateMenu.incomingRequest":"camChat.console.privateMenu.outgoingRequest"}))}),en=n.memo(({messageId:e,showMode:t})=>n.createElement(H,{className:"private-show-ended-message",messageId:e},(0,h.dW)(`camChat.showEnded.${t}`))),ea=n.memo(({messageId:e,showMode:t})=>n.createElement(H,{className:"private-show-started-message",messageId:e},(0,h.dW)(`camChat.showStarted.${t}`)));var eo=r(37051),ei=r(2762),es=r(10269),el=r(95366);let ec=({src:e,alt:t})=>n.createElement("img",{src:e,className:"PluginMessageAvatar__avatar#SS",alt:t});var eu=r(53043);let ed=e=>{let t=(0,eu.w)(e);return n.createElement("div",{className:"PluginMessageContent__content#lF"},t)},ep=()=>{let e=(0,c.T)(),t=(0,s.C)(ei.Rq),r=(0,s.C)(u.aPS);return n.createElement(n.Fragment,null,n.createElement(h.IJ,{elements:{a:n.createElement(h.mI,{className:"private-menu-link",onClick:()=>e((0,h.iy)())})},messageId:"camChat.console.privateMenu.announcement"}),t&&r&&n.createElement(n.Fragment,null," ",n.createElement(h.IJ,{elements:{icon:n.createElement("img",{className:"private-menu-icon",src:t.iconUrl,alt:t.name}),a:n.createElement(h.mI,{className:"private-menu-link",onClick:()=>{t&&e((0,es._f)(el.pow.PLUGINS_MENU,t.id))}})},messageId:"camChat.console.privateMenu.reactions"})))},em=e=>{let{details:t}=e;switch(t.subtype){case h.X$.PRIVATE_MENU_UNAVAILABLE:return{content:(0,h.dW)("camChat.console.privateMenu.unavailable")};case h.X$.PRIVATE_MENU_ANNOUNCEMENT:return{content:n.createElement(ep,null),className:"private-menu-announcement"};case h.X$.PLUGIN:{let r=null==t?void 0:t.plugin,a=null==t?void 0:t.message,o=null==t?void 0:t.userData,i=r&&a?n.createElement(ed,{id:e.id,message:a,plugin:r,isFullscreen:!1,user:o,onUsernameClick:eo.Z}):void 0,s=(null==r?void 0:r.iconUrl)?n.createElement(ec,{src:r.iconUrl,alt:`${r.title} plugin icon`}):void 0;return{content:i,className:"plugin-message",avatar:s}}default:return}},ef=n.memo(({message:e})=>{let{content:t,className:r,avatar:a=n.createElement(et,null)}=em(e)||{};return t?n.createElement(m.Z,{messageId:e.id,className:(0,h.AK)("messenger-system-message",r),avatar:a},t):null});var eh=r(20717),eg=r(55570),ey=r(71021);let ev=({body:e})=>e?n.createElement("span",{className:"accent"},'"',n.createElement(h.DB,{body:e}),'"'):null,eb=({message:e})=>{let{body:t}=e.details;return e.details.source===h.oK.EPIC_GOAL?n.createElement("span",null,n.createElement("br",null),(0,h.dW)("messenger.chat.contributionToEpicGoal"),":",n.createElement("br",null),n.createElement("span",{className:"epic-goal-accent"},t)):e.details.source===ey.DW?n.createElement("span",null,n.createElement("br",null),(0,h.dW)("messenger.chat.fromFeed"),t?": ":"",n.createElement(ev,{body:t})):n.createElement("span",null,n.createElement("br",null),n.createElement(ev,{body:e.details.body}))},eE=n.memo(({message:e,counterpart:t,renderPlaceId:r})=>{var a,o;let i=(0,eg.m)(),l=(0,s.C)(h.rc),c=(0,s.C)(u.MVJ),d=null===(a=e.details)||void 0===a?void 0:a.amount,f=(null===(o=e.details)||void 0===o?void 0:o.body)||e.details.source===h.oK.EPIC_GOAL||e.details.source===ey.DW,g=(0,y.JL)(e,{currentUserId:l,isMarkTipMessageAfterPrivateShow:c}),v=(()=>{if(e.details.source===h.oK.AFTER_SHOW&&c)return(0,eh.jz)("messenger/components/messages/system/TipMessage/images/emoji-tip-after-show.png")})();return d?n.createElement(m.Z,{user:t,messageId:e.id,className:(0,h.AK)("tipped-message",{"tipped-message--has-icon":!!v,"tipped-message--compact":null==i?void 0:i.compact}),renderPlaceId:r},v&&n.createElement("img",{src:v,alt:"tip message",className:"tip-message-icon"}),n.createElement(h.IJ,{className:"tip-message-text",wrapper:"span",elements:{accent:n.createElement("span",{className:"accent"})},messageId:g,parameters:{tokensCount:d}}),f&&n.createElement(eb,{message:e}),n.createElement(p.Z,{createdAt:e.createdAt,renderPlaceId:r,className:"tip-message-indicators",isMessageRead:e.isRead})):null});var e_=r(73331),ew=r(49873),eC=r(33127),eS=r(62235);let ek=n.memo(({message:e,isPrivateTab:t,counterpart:r,renderPlaceId:a,sender:o})=>{let i=(0,s.C)(eS.b),{isVisible:l,text:c,error:d}=(0,eC.B)(t?ew.jQ.PRIVATE_CHAT:ew.jQ.MESSENGER,e.id),f=(0,s.C)(u.Ze0),g=r&&i?n.createElement(e_.c,{messageId:e.id,source:t?ew.jQ.PRIVATE_CHAT:ew.jQ.MESSENGER,key:"translate-button"}):null;return n.createElement(m.Z,{user:r,rightControls:g,error:d,messageId:e.id,className:r?"counterpart-text-message":"own-text-message",isNextMessageFromSameUser:e.isNextMessageFromSameUser,renderPlaceId:a,canBeDeleted:!0},n.createElement(h.DB,{body:l?c:e.body,wordStickers:f,sender:o}),n.createElement(p.Z,{createdAt:e.createdAt,renderPlaceId:a,className:"text-message-indicators",isMessageRead:e.isRead}))}),ex=({counterpart:e,isPrivateTab:t,message:r,renderPlaceId:a,sender:o})=>{var i,s,l,c,u;return(null==r?void 0:null===(i=r.media)||void 0===i?void 0:i.audio)?n.createElement(M,{counterpart:e,isPrivateTab:t,message:r,renderPlaceId:a}):(null==r?void 0:null===(s=r.media)||void 0===s?void 0:s.video)?n.createElement(X,{message:r,media:r.media,counterpart:e,renderPlaceId:a}):(null==r?void 0:null===(l=r.media)||void 0===l?void 0:l.photo)?n.createElement(K,{message:r,media:r.media,counterpart:e,renderPlaceId:a}):(null==r?void 0:null===(c=r.media)||void 0===c?void 0:c.album)?n.createElement(S,{message:r,media:r.media,counterpart:e,renderPlaceId:a}):(null==r?void 0:null===(u=r.media)||void 0===u?void 0:u.mixed)?n.createElement(F,{message:r,counterpart:e,renderPlaceId:a}):n.createElement(ek,{isPrivateTab:t,message:r,counterpart:e,renderPlaceId:a,sender:o})},eI=(e,t,r)=>t.senderId===e?null:null!=r?r:null,eA=n.memo(({isPrivateTab:e,message:t,onUnlockedAudioClick:r,renderPlaceId:a})=>{var l,c;let u=(0,s.C)(e=>(0,h.GA)(e,t.senderId)),d=(0,s.C)(h.rc),p=eI(d,t,u);switch(t.type){case h.oK.PRIVATE_TIP:case h.oK.TIP:case h.oK.OFFLINE_TIP:case h.oK.PM_PRIVATE_TIP:case h.oK.PM_PRIVATE_TIP_VR:case h.oK.PM_PUBLIC_TIP:return n.createElement(eE,{message:t,counterpart:p,renderPlaceId:a});case h.oK.GIFT:return n.createElement(z,{message:t,counterpart:p});case h.oK.TEXT:case h.oK.PRIVATE_SHOW_MESSAGE:return n.createElement(ex,{counterpart:p,isPrivateTab:e,message:t,renderPlaceId:a,sender:u});case h.oK.PM_PRIVATE_STARTED:return n.createElement(ea,{showMode:null===(l=t.details)||void 0===l?void 0:l.showMode,messageId:t.id});case h.oK.PM_PRIVATE_ENDED:return n.createElement(en,{showMode:null===(c=t.details)||void 0===c?void 0:c.showMode,messageId:t.id});case h.oK.PRIVATE_MENU:return n.createElement(er,{message:t,counterpart:p});case h.oK.SYSTEM:return n.createElement(ef,{message:t});case h.oK.PM_LOVENSE:return n.createElement(Y,{message:t});case h.oK.MEDIA_UNLOCKED:if(!t.media)return null;return n.createElement(ee,{message:t,counterpart:p,media:t.media,renderPlaceId:a,onUnlockedAudioClick:r});case h.oK.SHOW_UPGRADED:return n.createElement(i.o,{message:t});case h.oK.GIPHY:return n.createElement(o.d,{message:t,counterpart:p,renderPlaceId:a});default:return null}}),eN=8,eP=({day:e,isLast:t,isPrivateTab:r,messages:o,onSeenLastMessage:i,onUnlockedAudioClick:l,renderPlaceId:c,scrollContainer:u})=>{let d=o[0],p=o[o.length-1],m=!p.isRead,f=(0,s.C)(h.rc),g=f===p.senderId,{ref:y,inView:v}=(0,a.YD)({skip:!t||(0,h.sk)(),root:u,triggerOnce:!0});return(0,n.useEffect)(()=>{v&&!g&&m&&i(p.id)},[v,m,g,p.id,i]),n.createElement(n.Fragment,null,n.createElement(V,{date:e,messageId:d.id}),o.map((e,a)=>{let i=o[a+1];return(e.isNextMessageFromSameUser=(null==i?void 0:i.senderId)===e.senderId,t&&a===o.length-1)?n.createElement(n.Fragment,{key:`${e.id}_${e.kind}_${e.recipientId}`},n.createElement(eA,{isPrivateTab:r,message:e,onUnlockedAudioClick:l,renderPlaceId:c}),n.createElement("div",{style:{height:eN},ref:y})):n.createElement(eA,{isPrivateTab:r,key:`${e.id}_${e.kind}_${e.recipientId}`,message:e,onUnlockedAudioClick:l,renderPlaceId:c})}))}},52986:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(27378),a=r(59188),o=r(47285);let i=({groupedMessages:e,isPrivateTab:t,onSeenLastMessage:r,onUnlockedAudioClick:i,renderPlaceId:s,scrollContainer:l})=>((0,a.H)(()=>{let t=e[e.length-1],n=null==t?void 0:t[1],a=null==n?void 0:n[n.length-1];if(!a)return;let o=!a.isRead;o||r(a.id)}),n.createElement(n.Fragment,null,e.map(([a,c],u)=>0!==c.length?n.createElement(o.Z,{day:a,isLast:u===e.length-1,isPrivateTab:t,key:a,messages:c,onSeenLastMessage:r,onUnlockedAudioClick:i,renderPlaceId:s,scrollContainer:l}):null)))},88870:(e,t,r)=>{"use strict";r.d(t,{Z:()=>Z});var n=r(18775),a=r(91343),o=r(27378),i=r(48204),s=r(16421),l=r(41950),c=r(8031),u=r(99748),d=r(56509),p=r(13219),m=r(65103),f=r(64553),h=r(29413);let g=({isInitStep:e,hideControls:t,onSettingsClick:r,onCloseClick:n})=>o.createElement("div",{className:"voice-panel-controls"},e&&o.createElement(f.Z,{className:"voice-panel-controls__button",onClick:r,type:"button"},o.createElement(h.Z,{img:"settings",size:18})),!t&&o.createElement(f.Z,{className:"voice-panel-controls__button",onClick:n,type:"button"},o.createElement(h.Z,{img:"close-3",size:14})));var y=r(37001),v=r(30713),b=r(99382),E=r(58927),_=r(74753),w=r(44054),C=r(19938),S=r(39618),k=r(94380),x=r(38622),I=r(31843),A=r(35578);let N={accessMode:"paid",cost:"50",title:""},P=({buffer:e,recipientId:t,onSuccess:r=()=>!1,className:n,onSendRecordStart:a,onSendRecordEnd:i})=>{var s,l,c;let p=(0,k.T)(),{getMp3BlobPromise:m}=(0,A.m)(),{isMounted:f}=(0,x.t)(),[h,g]=(0,o.useState)(""),P=(0,o.useCallback)(e=>{1===e.key.length&&/\D/.test(e.key)&&e.preventDefault()},[]),M=async({cost:r,accessMode:n,title:a})=>{let o;try{o=await m({buffer:e})}catch(e){return{[y.Ck]:(0,d.dW)("voiceMessages.somethingWentWrong")}}try{await p((0,I.ed)({accessMode:n,cost:"paid"===n?parseInt(null!=r?r:"0",10):0,audio:o,title:a,recipientId:t,duration:e.duration}))}catch(e){if(e instanceof C.Z){let{error:t,...r}=e.details;if(r.cost||r.title||r.accessMode)return r;return{[y.Ck]:t||e.message}}return{}}},R=async e=>{a();let t=await M(e);return f.current&&(i(),t||r()),t};return o.createElement(v.l0,{onSubmit:R,validate:({accessMode:e,cost:t,title:r})=>{let n={};if(e||(n.accessMode=(0,d.dW)("errors.validation.requiredFields.default",{fieldName:(0,d.dW)("voiceMessages.fields.accessMode")})),"paid"===e){let e=parseInt(null!=t?t:"",10);Number.isNaN(e)?n.cost=(0,d.dW)("errors.validation.requiredFields.pleaseSetPrice",{fieldName:(0,d.dW)("voiceMessages.fields.cost")}):(e<1||e>9999)&&(n.cost=(0,d.dW)("errors.validation.invalidCost",{min:1,max:9999}))}return r&&r.length>100&&(n.title=(0,d.dW)("errors.validation.exceededMaxLength",{fieldName:(0,d.dW)("voiceMessages.fields.title"),count:100},"count")),n},initialValues:N},({handleSubmit:e,submitting:t,values:r,submitError:a,error:i})=>o.createElement("form",{noValidate:!0,className:(0,u.AK)("voice-panel-form",n),onSubmit:e},o.createElement("div",{className:"voice-panel-form__access-settings"},o.createElement(v.gN,{name:"accessMode",render:({input:{onChange:e,...r},meta:n})=>o.createElement(o.Fragment,null,o.createElement(w.P,{...r,isRemoveByBackspaceEnabled:!1,isDisabled:t,id:"voice-panel-access-mode",className:"voice-panel-form__access-mode",size:"small",onSelect:({value:t})=>{g(t),e(t)},options:[{value:"free",label:(0,d.dW)("voiceMessages.accesses.free")},{value:"paid",label:(0,d.dW)("voiceMessages.accesses.paid")}]}),(0,S.G)(n)&&o.createElement(E.Z,{error:{message:null!==(s=n.error)&&void 0!==s?s:n.submitError},maxWidth:400,isMobileRelative:!1,targetId:"voice-panel-access-mode",placement:"top"}))}),o.createElement(v.gN,{name:"cost",render:({input:{value:e,...n},meta:a})=>o.createElement(o.Fragment,null,o.createElement("span",{className:(0,u.AK)("voice-panel-form__cost",{"voice-panel-form__cost--with-value":e&&"free"!==h})},o.createElement(_.Z,{...n,disabled:t||"paid"!==r.accessMode,id:"voice-panel-content-price",size:"small",className:(0,u.AK)("voice-panel-form__cost-field",{error:a.dirty&&a.error}),placeholder:(0,d.dW)("voiceMessages.placeholders.cost"),type:"text",autoComplete:"off",maxLength:String(9999).length,onKeyPress:P,value:"free"===h?"":e})),(0,S.G)(a)&&o.createElement(E.Z,{error:{message:null!==(l=a.error)&&void 0!==l?l:a.submitError},maxWidth:400,isMobileRelative:!1,targetId:"voice-panel-content-price",placement:"top"}))})),o.createElement(v.gN,{name:"title",render:({input:e,meta:r})=>o.createElement(o.Fragment,null,o.createElement(_.Z,{...e,disabled:t,id:"voice-panel-title",size:"small",className:(0,u.AK)("voice-panel-form__title",{error:r.dirty&&r.error}),placeholder:(0,d.dW)("voiceMessages.placeholders.title"),maxLength:100,type:"text"}),(0,S.G)(r)&&o.createElement(E.Z,{error:{message:null!==(c=r.error)&&void 0!==c?c:r.submitError},maxWidth:400,isMobileRelative:!1,targetId:"voice-panel-title",placement:"top"}))}),o.createElement(b.ZP,{className:"voice-panel-form__submit-btn",style:"send",loading:t,disabled:t,type:"submit",id:"voice-panel-submit-btn"},(0,d.dW)("voiceMessages.send")),(a||i)&&o.createElement(E.Z,{targetId:"voice-panel-submit-btn",error:{message:a||i},isMobileRelative:!0})))};var M=r(89057);let R=({onClose:e})=>o.createElement(M.Z,{titlePosition:"outside",closeIcon:"close-3",isInPortal:!0,className:"voice-panel-modal voice-panel-modal--error",onClose:e,source:"voicePanelModal"},o.createElement("div",{className:"voice-panel-modal__icon-wrapper"},o.createElement(h.Z,{img:"mic-on-2"}),o.createElement("div",{className:"voice-panel-modal__warning-icon-wrapper"},o.createElement(h.Z,{img:"exclamation"}))),o.createElement("div",{className:"voice-panel-modal__title voice-panel-modal__title--error"},(0,d.dW)("voiceMessages.settingsModal.errorTitle")),o.createElement("ul",{className:"voice-panel-modal__check-list"},(0,d.dW)("voiceMessages.settingsModal.checkListTitle"),":",o.createElement("li",{className:"voice-panel-modal__check-action"},(0,d.dW)("voiceMessages.settingsModal.checkListItem1")),o.createElement("li",{className:"voice-panel-modal__check-action"},(0,d.dW)("voiceMessages.settingsModal.checkListItem2")),o.createElement("li",{className:"voice-panel-modal__check-action"},(0,d.dW)("voiceMessages.settingsModal.checkListItem3"))),o.createElement(b.ZP,{className:"voice-panel-modal__btn-ok",onClick:e,size:"medium",style:"default"},(0,d.dW)("button.ok"))),O=({onClose:e,devices:t,deviceId:r,setDevice:n})=>{let[a,i]=(0,o.useState)();return o.createElement(M.Z,{titlePosition:"outside",closeIcon:"close-3",isInPortal:!0,className:"voice-panel-modal",onClose:e,source:"voicePanelModal"},o.createElement("div",{className:"voice-panel-modal__icon-wrapper"},o.createElement(h.Z,{img:"mic-on-2"})),o.createElement("div",{className:"voice-panel-modal__title"},(0,d.dW)("voiceMessages.settingsModal.title")),o.createElement("p",{className:"voice-panel-modal__description"},(0,d.dW)("voiceMessages.settingsModal.description")),o.createElement(w.Z,{className:"voice-panel-modal__devices",isRemoveByBackspaceEnabled:!1,options:t,value:(null==a?void 0:a.deviceId)||r,isIPhoneEmptyOptionHack:!1,onSelect:i,valueKey:"deviceId"}),o.createElement(b.ZP,{className:"voice-panel-modal__btn-ok",onClick:()=>{a&&a.deviceId!==r&&n(a),e()},size:"medium",style:"default"},(0,d.dW)("button.ok")))};var L=r(78983);let $=({className:e,currentTime:t,maxTime:r})=>o.createElement("span",{className:(0,u.AK)("voice-recording-timer",e)},(0,L.mr)(t,L.TIME_FORMATS.MINUTES_SECONDS)," ",o.createElement("span",{className:"voice-recording-timer__max-time"},"/ ",(0,L.mr)(r,L.TIME_FORMATS.MINUTES_SECONDS)));var j=r(70203),T=r(59352),D=r(7284);let F="voiceRecorderDeviceId",B={onInitStart:()=>{},onInitSuccess:()=>{},onInitError:()=>{},onUpdateAudioDevices:()=>{},maxTimeSeconds:60,onRecordStart:()=>{},onUpdateTime:()=>{},onRecordStop:()=>{}};class U{async checkUserMediaDevices(){U.checkUserMediaDevicesPromise||(U.checkUserMediaDevicesPromise=(0,T.Z7)({audio:!0}));let e=await U.checkUserMediaDevicesPromise;setTimeout(()=>(0,T.g)(e),100)}async initAudioDevices(e){let{audioDevices:t}=await (0,D.a)();if(e())return;let r=U.lastSelectedDeviceId&&t.find(({deviceId:e})=>e===U.lastSelectedDeviceId);if(!r){var n;U.lastSelectedDeviceId=null===(n=t[0])||void 0===n?void 0:n.deviceId}if(this.deviceId=U.lastSelectedDeviceId,!this.deviceId)throw Error("Can't access audio devices");this.onUpdateAudioDevices(t,this.deviceId)}async initStream(e){let t=await (0,T.Z7)({audio:{deviceId:{exact:this.deviceId}}});if(e()){(0,T.g)(t);return}this.stream=t,this.streamSource=U.audioContext.createMediaStreamSource(this.stream),U.audioContext.createScriptProcessor?this.scriptProcessor=U.audioContext.createScriptProcessor(0,1,1):this.scriptProcessor=U.audioContext.createJavaScriptNode(0,1,1),this.scriptProcessor.onaudioprocess=e=>{if("recording"!==this.state)return;let t=e.inputBuffer.getChannelData(0);this.bufferLength+=t.length;let r=Math.floor(this.bufferLength/U.audioContext.sampleRate);if(r!==this.time&&(setTimeout(()=>this.onUpdateTime(r),0),this.time=r),this.bufferParts.push(new Float32Array(t)),this.bufferLength>=this.maxBufferLength){let e=this.bufferLength-this.maxBufferLength;if(e){this.bufferLength=this.maxBufferLength;let t=this.bufferParts.length-1;this.bufferParts[t]=this.bufferParts[t].slice(0,-e)}this.stopRecord()}},this.streamSource.connect(this.scriptProcessor).connect(U.audioContext.destination)}async init(){this.onInitStart();let e=this.resetCounter,t=()=>e!==this.resetCounter;try{if(U.audioContext||(U.audioContext=new(window.AudioContext||window.webkitAudioContext)),this.maxBufferLength=this.config.maxTimeSeconds*U.audioContext.sampleRate,await this.checkUserMediaDevices(),t()||(await this.initAudioDevices(t),t())||(await this.initStream(t),t()))return;this.onInitSuccess()}catch(e){if(t())return;this.onInitError(e)}}onInitStart(){this.state="init-start",this.config.onInitStart()}onUpdateAudioDevices(e,t){this.config.onUpdateAudioDevices(e,t)}onInitSuccess(){this.state="init-success",this.config.onInitSuccess()}onInitError(e){this.state="init-error",this.config.onInitError(e)}onRecordStart(){this.state="recording",this.config.onRecordStart()}onUpdateTime(e){("recording"===this.state||"recorded"===this.state)&&this.config.onUpdateTime(e)}onRecordStop(e){this.state="recorded",this.config.onRecordStop(e)}constructor(e={}){(0,n._)(this,"maxBufferLength",0),(0,n._)(this,"deviceId",null),(0,n._)(this,"stream",null),(0,n._)(this,"state",null),(0,n._)(this,"bufferParts",[]),(0,n._)(this,"bufferLength",0),(0,n._)(this,"time",0),(0,n._)(this,"streamSource",null),(0,n._)(this,"scriptProcessor",null),(0,n._)(this,"resetCounter",0),(0,n._)(this,"config",void 0),(0,n._)(this,"startRecord",()=>{"init-success"===this.state&&this.onRecordStart()}),(0,n._)(this,"stopRecord",()=>{if("recording"!==this.state)return;let e=function(e,t=e.reduce((e,{length:t})=>e+t,0)){let r=new Float32Array(t),n=0;for(let t of e)r.set(t,n),n+=t.length;return r}(this.bufferParts,this.bufferLength),t=U.audioContext.createBuffer(1,this.bufferLength,U.audioContext.sampleRate);t.getChannelData(0).set(e),this.reset(),this.onRecordStop(t)}),(0,n._)(this,"reset",()=>{this.resetCounter++,this.deviceId=null,this.state=null,this.bufferLength=0,this.bufferParts=[],this.time=0,this.streamSource&&(this.streamSource.disconnect(),this.streamSource=null),this.scriptProcessor&&(this.scriptProcessor.disconnect(),this.scriptProcessor=null),this.stream&&((0,T.g)(this.stream),this.stream=null)}),(0,n._)(this,"reInit",()=>{this.reset(),this.init()}),(0,n._)(this,"setDeviceId",e=>{U.lastSelectedDeviceId=e,j.m.set(F,e),this.deviceId!==e&&this.reInit()}),this.config={...B,...e}}}(0,n._)(U,"audioContext",void 0),(0,n._)(U,"checkUserMediaDevicesPromise",void 0),(0,n._)(U,"lastSelectedDeviceId",j.m.get(F));let W={setIsVoiceSettingsHidden:p.TE};class G extends o.Component{componentDidMount(){this.removeRecorderStartListener=l.KY.subscribeRecordStartAudioEvent(this.onRecordStartAudioEvent),this.removeAudioStartListener=l.KY.subscribePlayAudioEvent(this.onRecordStartAudioEvent),this.recorder.init()}componentWillUnmount(){var e,t;this.recorder.reset(),null===(e=this.removeRecorderStartListener)||void 0===e||e.call(this),null===(t=this.removeAudioStartListener)||void 0===t||t.call(this)}render(){let{buffer:e,isConfirmModal:t,isDevicesModal:r,isErrorModal:n,devices:a,deviceId:i,step:p,time:m}=this.state,{className:f,hideForm:h,recipientId:y}=this.props,v="init-start"===p||"init-success"===p||"init-error"===p;return o.createElement("div",{className:(0,u.AK)("voice-panel",f,{"voice-panel--hide-form":h})},t&&o.createElement(s.Z,{cancelText:(0,d.dW)("voiceMessages.closeConfirmation.back"),isInPortal:!0,isModerModal:!0,isNegativeModal:!0,okButtonStyle:"accept",okText:(0,d.dW)("voiceMessages.closeConfirmation.discard"),onCancel:this.closeConfirmationModal,onConfirm:this.props.onClose,title:(0,d.dW)("voiceMessages.closeConfirmation.title")}),n&&o.createElement(R,{onClose:this.closeErrorModal}),r&&o.createElement(O,{deviceId:i,devices:a,onClose:this.closeDevicesModal,setDevice:this.setDevice}),o.createElement("div",{className:"voice-panel__controls"},o.createElement(g,{isInitStep:v,hideControls:this.props.hideControls,onCloseClick:this.onClose,onSettingsClick:this.onSettingsClick})),o.createElement("div",{className:(0,u.AK)("voice-panel__content",`voice-panel__content--${v?"init":p}`)},v&&o.createElement(o.Fragment,null,o.createElement("div",{className:"voice-panel__start-rec-hint"},(0,d.dW)("voiceMessages.startRecord")),o.createElement(l.At,{iconImg:"mic-on-2",isLoading:"init-start"===p,onClick:this.onBtnClick,size:"big"})),"recording"===p&&o.createElement(o.Fragment,null,o.createElement($,{className:"voice-panel__timer",currentTime:m*c.Zv,maxTime:60*c.Zv}),o.createElement(l.vB,{className:"voice-panel__example-wave",duration:60}),o.createElement(l.At,{iconImg:"stop-rect",onClick:this.onBtnClick,size:"big"})),("recorded"===p||"record-sending"===p)&&e&&o.createElement(o.Fragment,null,o.createElement(l.ZP,{buffer:e,className:(0,u.AK)("voice-panel__player",{"voice-panel__player--disabled":"record-sending"===p}),isLoading:this.props.isLoading,duration:e.duration,onRemove:this.onRemoveClick}),!this.props.hideForm&&!!this.props.recipientId&&o.createElement(P,{buffer:e,className:"voice-panel__form",onSuccess:this.props.onClose,recipientId:y,onSendRecordStart:this.onSendRecordStart,onSendRecordEnd:this.onSendRecordEnd}))))}constructor(e){super(e),(0,n._)(this,"recorderId",(0,a.x0)()),(0,n._)(this,"removeRecorderStartListener",void 0),(0,n._)(this,"removeAudioStartListener",void 0),(0,n._)(this,"onRecordStartAudioEvent",e=>{e.detail.playerId!==this.recorderId&&"recording"===this.state.step&&this.recorder.stopRecord()}),(0,n._)(this,"handleRecordStop",e=>{this.props.onRecorded&&this.props.onRecorded(e),this.setState({buffer:e,step:"recorded"})}),(0,n._)(this,"recorder",new U({onInitStart:()=>this.setState({step:"init-start",buffer:null,time:0}),onInitSuccess:()=>this.setState({step:"init-success"}),onInitError:()=>this.setState({step:"init-error",isErrorModal:!0}),onUpdateAudioDevices:(e,t)=>this.setState({devices:e,deviceId:t}),onRecordStart:()=>this.setState({step:"recording"}),onUpdateTime:e=>this.setState({time:e}),onRecordStop:this.handleRecordStop,maxTimeSeconds:60})),(0,n._)(this,"openErrorModal",()=>this.setState({isErrorModal:!0})),(0,n._)(this,"closeErrorModal",()=>{var e,t;this.setState({isErrorModal:!1}),null===(e=(t=this.props).onClose)||void 0===e||e.call(t)}),(0,n._)(this,"openDevicesModal",()=>{this.props.isVoiceSettingsHidden||this.props.setIsVoiceSettingsHidden(!0),this.setState({isDevicesModal:!0})}),(0,n._)(this,"closeDevicesModal",()=>this.setState({isDevicesModal:!1})),(0,n._)(this,"closeConfirmationModal",()=>this.setState({isConfirmModal:!1})),(0,n._)(this,"startRecord",()=>{if(this.props.isVoiceSettingsHidden){this.recorder.startRecord(),l.KY.emitRecordStartAudioEvent(this.recorderId);return}this.openDevicesModal()}),(0,n._)(this,"onBtnClick",()=>{let{step:e}=this.state;if("init-error"===e){this.openErrorModal();return}if("init-success"===e){this.startRecord();return}"recording"===e&&this.recorder.stopRecord()}),(0,n._)(this,"onRemoveClick",()=>{this.props.onReset&&this.props.onReset(),this.recorder.reInit()}),(0,n._)(this,"onSettingsClick",()=>{let{step:e}=this.state;if("init-success"===e){this.openDevicesModal();return}"init-error"===e&&this.openErrorModal()}),(0,n._)(this,"onClose",()=>{var e,t;if("recorded"===this.state.step||"record-sending"===this.state.step){this.setState({isConfirmModal:!0});return}null===(e=(t=this.props).onClose)||void 0===e||e.call(t)}),(0,n._)(this,"onSendRecordStart",()=>this.setState({step:"record-sending"})),(0,n._)(this,"onSendRecordEnd",()=>this.setState({step:"recorded"})),(0,n._)(this,"setDevice",e=>{this.recorder.setDeviceId(e.deviceId)}),this.state={step:"init-start",time:0,buffer:null,devices:[],deviceId:"",isErrorModal:!1,isDevicesModal:!1,isConfirmModal:!1}}}let Z=(0,i.$j)(e=>({isVoiceSettingsHidden:(0,m.gy)(e)}),W)(G)},35578:(e,t,r)=>{"use strict";r.d(t,{m:()=>c});var n=r(27378),a=r(10642),o=r(20717),i=r(18775);function s(e){function t(e){postMessage({error:(null==e?void 0:e.message)||"Unknown error"})}try{importScripts(e),onmessage=function(e){try{let{buffer:t,sampleRate:r,bitRate:n}=e.data;if(!lamejs)return;let a=new lamejs.Mp3Encoder(1,r,n),o=[];for(let e=0;e<t.length;e++)t[e]=function(e){let t=Math.max(-1,Math.min(1,e));return t<0?32768*t:32767*t}(t[e]);let i=t.length;for(let e=0;i>=1152;e+=1152){let r=t.subarray(e,e+1152),n=a.encodeBuffer(r);o.push(n),i-=1152}o.push(a.flush()),postMessage(o)}catch(e){t(e)}}}catch(e){t(e)}}class l{constructor({audioBuffer:e,lameJsSrc:t}){var r;(0,i._)(this,"promise",void 0),(0,i._)(this,"destroy",void 0);try{l.workerUrl||(l.workerUrl=(0,o.wX)(new Blob(["(",s.toString(),')("',t,'")'])));let r=new Worker(l.workerUrl);this.promise=new Promise((e,t)=>{r.onmessage=r=>{var n;(null===(n=r.data)||void 0===n?void 0:n.error)?t(Error(r.data.error)):e(new Blob(r.data,{type:"audio/mp3"}))}}),this.destroy=()=>{r.onmessage=null,r.terminate()},r.postMessage({buffer:e.getChannelData(0),sampleRate:e.sampleRate,bitRate:128})}catch(e){null===(r=this.destroy)||void 0===r||r.call(this),this.promise=Promise.reject(e),this.destroy=()=>{}}}}(0,i._)(l,"workerUrl",void 0);let c=()=>{let e=(0,n.useCallback)(async({buffer:e})=>{let t=new l({lameJsSrc:(0,o.jz)("messenger/components/VoiceMessages/VoicePanel/components/VoicePanelForm/Mp3Encoder/lame.min.js"),audioBuffer:e});try{return await t.promise}catch(e){return a.ZP.error("Error in useMp3Encoder encoder.promise",e),Promise.reject(e)}finally{t.destroy()}},[]);return{getMp3BlobPromise:e}}},20659:(e,t,r)=>{"use strict";r.d(t,{Z:()=>m});var n=r(64553),a=r(27378),o=r(29413),i=r(3034),s=r(59593),l=r(99748),c=r(56509),u=r(95654),d=r(63256);let p="voiceButtonId",m=({onClick:e,isActive:t})=>{let r=(0,u.C)(d.CWf);return a.createElement(a.Fragment,null,a.createElement(n.Z,{id:p,onClick:e,className:(0,l.AK)("voice-panel-toggle-btn",{"voice-panel-toggle-btn--new":r,"voice-panel-toggle-btn--active":t})},a.createElement(o.Z,{className:"voice-panel-toggle-btn__icon",img:"mic-on-2"})),!s.BROWSER_CAPABILITIES.touch&&!t&&a.createElement(i.Z,{targetId:p,placement:"top",isMobileRelative:!1},(0,c.dW)("messenger.mediaUploader.voiceMessage")))}},19434:(e,t,r)=>{"use strict";r.d(t,{Z:()=>_});var n=r(27378),a=r(62668),o=r(94380),i=r(95654),s=r(63213);let l=({className:e,onClick:t,children:r})=>{let a=(0,s.AK)("base-message",{"base-message-clickable":!!t},e);return n.createElement("div",{className:a,onClick:t},r)},c=({position:e="right",className:t,containerClassName:r,children:a,avatar:o,leftControls:i,rightControls:c,error:u,messageId:d,onClick:p})=>n.createElement("div",{"data-message-id":d,className:(0,s.AK)(`base-message-wrapper position-${e}`,r)},n.createElement("div",{className:"base-message-wrapper-inner"},o,i,n.createElement(l,{className:(0,s.AK)("base-message",t),onClick:p},a),c),u&&n.createElement("div",{className:"base-message-wrapper-error"},u));var u=r(74012),d=r(87489),p=r(32284);let m=({avatar:e,user:t,isNextMessageFromSameUser:r=!1})=>{let a=(0,d.n3)(t);return(e||t)&&r?n.createElement("div",{className:"counterpart-base-message-avatar-placeholder"}):e||(t?n.createElement(s.qE,{isBorderAvatar:!1,showOnlineStatus:!1,className:"counterpart-base-message-avatar",user:(0,p.T$)(t),modelData:a}):null)},f=({user:e,error:t,className:r,children:l,messageId:d,onClick:p,avatar:f,isNextMessageFromSameUser:h,renderPlaceId:g="",rightControls:y,avatarClassName:v})=>{let b=(0,o.T)(),E=(0,i.C)(u.ts),_=`private-chat-${d}-${g}`,w="privateTab"===g&&(null==E?void 0:E.isModel),C=()=>{w&&b((0,a.n)({user:e,userCardPopupId:_}))};return n.createElement(c,{position:"left",className:(0,s.AK)("counterpart-base-message",r),avatar:n.createElement("span",{id:_,className:v,onMouseEnter:C,onMouseLeave:()=>{w&&b((0,a.$x)(!0))},onClick:e=>{e.stopPropagation()},onTouchStart:C},n.createElement(m,{user:e,avatar:f,isNextMessageFromSameUser:h})),rightControls:y&&n.createElement("div",{className:"counterpart-base-message-controls"},y),error:t,messageId:d,onClick:p},l)};var h=r(99748),g=r(63256),y=r(12082),v=r(71021);let b={OwnBaseMessageWrapper:"OwnBaseMessage__OwnBaseMessageWrapper#To",DeleteMessageButton:"OwnBaseMessage__DeleteMessageButton#R4"},E=({canBeDeleted:e,containerClassName:t,messageId:r,renderPlaceId:a,...o})=>{let s=(0,i.C)(g.hZs);return n.createElement(c,{messageId:r,containerClassName:(0,h.AK)(t,b.OwnBaseMessageWrapper),...o,leftControls:e&&s?n.createElement(y.L,{variant:a===v.Rj.MESSENGER?"light":"default",className:b.DeleteMessageButton,messageId:r}):void 0})},_=({user:e,className:t,children:r,messageId:a,onClick:o,avatar:i,error:s,isNextMessageFromSameUser:l,renderPlaceId:c,leftControls:u,rightControls:d,canBeDeleted:p,avatarClassName:m})=>e||i?n.createElement(f,{messageId:a,user:e,className:t,onClick:o,avatar:i,leftControls:u,rightControls:d,error:s,avatarClassName:m,isNextMessageFromSameUser:l,renderPlaceId:c},r):n.createElement(E,{messageId:a,className:t,onClick:o,canBeDeleted:p,renderPlaceId:c},r)},33127:(e,t,r)=>{"use strict";r.d(t,{B:()=>c});var n=r(95654),a=r(27378);let o=(e,t)=>{let r=(0,a.useRef)(!1);(0,a.useLayoutEffect)(()=>{if(!r.current){r.current=!0;return}return null==e?void 0:e()},t)};var i=r(55570),s=r(49873),l=r(62235);let c=(e,t)=>{let r=(0,n.C)(l.i)(e,t)||s.w_,a=(0,i.m)();return o(()=>{r&&a&&a.messageDidUpdate(t)},[a,t,r.isVisible,r.text,r.error]),r}},12426:(e,t,r)=>{"use strict";r.d(t,{C:()=>a,l:()=>o});var n=r(63256);let a=({messagesTranslation:e})=>e,o=e=>(0,n._2O)(e,"translateChatsForModels")||(0,n.EZA)(e)},62235:(e,t,r)=>{"use strict";r.d(t,{b:()=>l,i:()=>s});var n=r(80406),a=r(96636),o=r(65103),i=r(12426);let s=(0,n.P1)([i.C],e=>(t,r)=>e[(0,a.T)(t,r)]),l=(0,n.P1)([i.l,o.GS,o.Qv],(e,t,r)=>e&&t&&r)},83971:(e,t,r)=>{"use strict";r.d(t,{a:()=>c,u:()=>u});var n=r(27378),a=r(28480),o=r(51431),i=r(72036),s=r(38622),l=r(93776);let c=e=>{(0,n.useEffect)(()=>{(0,l.Ti)(e.current)},[])},u=(e,t)=>{let{isMounted:r}=(0,s.t)();(0,n.useEffect)(()=>{(0,o.p)(e).catch(async()=>{r.current&&(t(!1),await (0,a.g)(500),await (0,i.k)(()=>(0,o.p)(e),500,6),r.current&&t(!0))})},[e])}},59312:(e,t,r)=>{"use strict";r.r(t),r.d(t,{__assign:()=>o,__asyncDelegator:()=>_,__asyncGenerator:()=>E,__asyncValues:()=>w,__await:()=>b,__awaiter:()=>u,__classPrivateFieldGet:()=>I,__classPrivateFieldSet:()=>A,__createBinding:()=>p,__decorate:()=>s,__exportStar:()=>m,__extends:()=>a,__generator:()=>d,__importDefault:()=>x,__importStar:()=>k,__makeTemplateObject:()=>C,__metadata:()=>c,__param:()=>l,__read:()=>h,__rest:()=>i,__spread:()=>g,__spreadArray:()=>v,__spreadArrays:()=>y,__values:()=>f});/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function a(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var o=function(){return(o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};function i(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)0>t.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r}function s(e,t,r,n){var a,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(i=(o<3?a(i):o>3?a(t,r,i):a(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i}function l(e,t){return function(r,n){t(r,n,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function u(e,t,r,n){return new(r||(r=Promise))(function(a,o){function i(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(i,s)}l((n=n.apply(e,t||[])).next())})}function d(e,t){var r,n,a,o,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(a=2&o[0]?n.return:o[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,o[1])).done)return a;switch(n=0,a&&(o=[2&o[0],a.value]),o[0]){case 0:case 1:a=o;break;case 4:return i.label++,{value:o[1],done:!1};case 5:i.label++,n=o[1],o=[0];continue;case 7:o=i.ops.pop(),i.trys.pop();continue;default:if(!(a=(a=i.trys).length>0&&a[a.length-1])&&(6===o[0]||2===o[0])){i=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]<a[3])){i.label=o[1];break}if(6===o[0]&&i.label<a[1]){i.label=a[1],a=o;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(o);break}a[2]&&i.ops.pop(),i.trys.pop();continue}o=t.call(e,i)}catch(e){o=[6,e],n=0}finally{r=a=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}var p=Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]};function m(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||p(t,e,r)}function f(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function h(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,a,o=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)i.push(n.value)}catch(e){a={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(a)throw a.error}}return i}function g(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(h(arguments[t]));return e}function y(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),a=0,t=0;t<r;t++)for(var o=arguments[t],i=0,s=o.length;i<s;i++,a++)n[a]=o[i];return n}function v(e,t,r){if(r||2==arguments.length)for(var n,a=0,o=t.length;a<o;a++)!n&&a in t||(n||(n=Array.prototype.slice.call(t,0,a)),n[a]=t[a]);return e.concat(n||Array.prototype.slice.call(t))}function b(e){return this instanceof b?(this.v=e,this):new b(e)}function E(e,t,r){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var n,a=r.apply(e,t||[]),o=[];return n={},i("next"),i("throw"),i("return"),n[Symbol.asyncIterator]=function(){return this},n;function i(e){a[e]&&(n[e]=function(t){return new Promise(function(r,n){o.push([e,t,r,n])>1||s(e,t)})})}function s(e,t){try{var r;(r=a[e](t)).value instanceof b?Promise.resolve(r.value.v).then(l,c):u(o[0][2],r)}catch(e){u(o[0][3],e)}}function l(e){s("next",e)}function c(e){s("throw",e)}function u(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}function _(e){var t,r;return t={},n("next"),n("throw",function(e){throw e}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,a){t[n]=e[n]?function(t){return(r=!r)?{value:b(e[n](t)),done:"return"===n}:a?a(t):t}:a}}function w(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=f(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,a){!function(e,t,r,n){Promise.resolve(n).then(function(t){e({value:t,done:r})},t)}(n,a,(t=e[r](t)).done,t.value)})}}}function C(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var S=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function k(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)&&p(t,e,r);return S(t,e),t}function x(e){return e&&e.__esModule?e:{default:e}}function I(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function A(e,t,r,n,a){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!a)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!a:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?a.call(e,r):a?a.value=r:t.set(e,r),r}},96553:()=>{},28175:(e,t,r)=>{"use strict";r.d(t,{mY:()=>T,sF:()=>j});var n,a,o,i,s=r(1021),l=r(8139),c=Object.defineProperty,u=Object.defineProperties,d=Object.getOwnPropertyDescriptors,p=Object.getOwnPropertyNames,m=Object.getOwnPropertySymbols,f=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable,g=(e,t,r)=>t in e?c(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,y=(e,t)=>{for(var r in t||(t={}))f.call(t,r)&&g(e,r,t[r]);if(m)for(var r of m(t))h.call(t,r)&&g(e,r,t[r]);return e},v=(e,t)=>u(e,d(t)),b=(n=function(e){if("undefined"!=typeof require)return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')},"undefined"!=typeof require?require:"undefined"!=typeof Proxy?new Proxy(n,{get:(e,t)=>("undefined"!=typeof require?require:e)[t]}):n),E=(e,t,r)=>new Promise((n,a)=>{var o=e=>{try{s(r.next(e))}catch(e){a(e)}},i=e=>{try{s(r.throw(e))}catch(e){a(e)}},s=e=>e.done?n(e.value):Promise.resolve(e.value).then(o,i);s((r=r.apply(e,t)).next())}),_=(a={"package.json"(e,t){t.exports={scripts:{lint:"run -T eslint . --ext .ts,.tsx",clean:"rm -rf ./dist",dev:"parcel public/test.html",docs:"typedoc src/index.ts",build:"run -T tsup src/index.ts --format cjs,esm --dts && run -T publint",prepublish:"npm run clean && npm run build",test:"run -T jest --config ./jestconfig.js","test:watch":"run -T jest --config ./jestconfig.js --watchAll"},name:"@giphy/js-fetch-api",version:"5.3.0",description:"Javascript API to fetch gifs and stickers from the GIPHY API.",homepage:"https://github.com/Giphy/giphy-js/tree/master/packages/fetch-api",main:"dist/index.cjs",types:"dist/index.d.ts",module:"dist/index.js",type:"module",sideEffects:!1,exports:{".":{types:"./dist/index.d.ts",import:"./dist/index.js",require:"./dist/index.cjs"},"./package.json":"./package.json"},files:["dist/","src/**/*"],license:"MIT",publishConfig:{access:"public"},dependencies:{"@giphy/js-types":"*","@giphy/js-util":"*",qs:"^6.9.4"},devDependencies:{"@types/qs":"^6.9.4","jest-fetch-mock":"^3.0.3","parcel-bundler":"latest",typedoc:"^0.20.37","typedoc-thunder-theme":"^0.0.3",typescript:"^5.0.4"}}}},function(){return o||(0,a[p(a)[0]])((o={exports:{}}).exports,o),o.exports}),w=["is_anonymous","is_community","is_featured","is_hidden","is_indexable","is_preserve_size","is_realtime","is_removed","is_sticker","is_dynamic"],C=["suppress_chrome","is_public","is_verified"],S=e=>t=>e[t]=!!e[t],k=e=>"string"==typeof e?e:e.text,x=e=>{let t=y({},e);t.id=String(t.id),t.tags=(t.tags||[]).map(k),w.forEach(S(t)),Object.keys(t.images||{}).forEach(e=>{let r=t.images[e];r.width=parseInt(r.width),r.height=parseInt(r.height)});let{user:r}=t;if(r){let e=y({},r);C.forEach(S(e)),t.user=e}return t},I=e=>(e.data=x(e.data),e),A=e=>(e.data=e.data.map(e=>x(e)),e),N=(("undefined"!=typeof window?window:global)||{}).GIPHY_API_URL||"https://api.giphy.com/v1/",P=class extends Error{constructor(e,t,r=0,n=""){super(e),this.url=t,this.status=r,this.statusText=n}},M=e=>e,R={},O=()=>{let e=Date.now();Object.keys(R).forEach(t=>{let r=R[t].isError?6e3:6e4;e-R[t].ts>=r&&delete R[t]})},L=function(e,t={}){let{apiVersion:r=1,noCache:n=!1,normalizer:a=M}=t,o=N.replace(/\/v\d+\/$/,`/v${r}/`);if(O(),!R[e]||n){let t=`${o}${e}`;R[e]={request:E(this,null,function*(){var r;let n;try{let o=yield fetch(t,{method:"get"});if(o.ok){let e=yield o.json();if(null==(r=e.meta)?void 0:r.response_id)return a(e);throw{message:"synthetic response"}}{let r="Error fetching";try{let e=yield o.json();e.message&&(r=e.message)}catch(e){}R[e]&&(R[e].isError=!0),n=new P(`@giphy/js-fetch-api: ${r}`,t,o.status,o.statusText)}}catch(r){n=new P(r.message,t),R[e]&&(R[e].isError=!0)}throw n}),ts:Date.now()}}return R[e].request},$=e=>e&&e.type?e.type:"gifs",j=class{constructor(e,t={}){this.getQS=(e={})=>l.stringify(y(v(y({},e),{api_key:this.apiKey,pingback_id:(0,s.u8)()}),this.qsParams)),this.apiKey=e,this.qsParams=t}categories(e){return L(`gifs/categories?${this.getQS(e)}`)}gif(e,t){let r=(null==t?void 0:t.internal)?"internal/":"";return L(`${r}gifs/${e}?${this.getQS()}`,{normalizer:I})}gifs(e,t){return Array.isArray(e)?L(`gifs?${this.getQS({ids:e.join(",")})}`,{normalizer:A}):L(`gifs/categories/${e}/${t}?${this.getQS()}`,{normalizer:A})}emoji(e){return L(`emoji?${this.getQS(e)}`,{normalizer:A})}emojiDefaultVariations(e){return L(`emoji?${this.getQS(e)}`,{apiVersion:2,normalizer:A})}emojiVariations(e){return L(`emoji/${e}/variations?${this.getQS()}`,{apiVersion:2,normalizer:A})}animate(e,t={}){let r=this.getQS(v(y({},t),{m:e}));return L(`text/animate?${r}`,{normalizer:A})}search(e,t={}){let r;let n=t.channel?`@${t.channel} ${e}`:e;"text"===t.type&&(r=!0);let a=this.getQS(v(y({rating:"pg-13"},t),{q:n,excludeDynamicResults:r}));return L(`${$(t)}/search?${a}`,{normalizer:A})}subcategories(e,t){return L(`gifs/categories/${e}?${this.getQS(t)}`)}trending(e={}){return L(`${$(e)}/trending?${this.getQS(y({rating:"pg-13"},e))}`,{normalizer:A})}random(e){return L(`${$(e)}/random?${this.getQS(y({rating:"pg-13"},e))}`,{noCache:!0,normalizer:I})}related(e,t={}){let{type:r="gifs"}=t;return L(`${r}/related?${this.getQS(y({gif_id:e,rating:"pg-13"},t))}`,{normalizer:A})}channels(e,t={}){return L(`channels/search?${this.getQS(y({q:e,rating:"pg-13"},t))}`)}},T=(e,t=[])=>{let r=[...t],n=t.map(e=>e.id),a=t.length,o=!1;return()=>E(void 0,null,function*(){if(o)return r;let t=yield e(a),{pagination:i,data:s}=t;return o=(a=i.count+i.offset)===i.total_count,s.forEach(e=>{let{id:t}=e;n.includes(t)||(r.push(e),n.push(t))}),[...r]})};if(void 0!==b){let{version:e}=_();(null==(i=(0,s.iJ)())?void 0:i.get("X-GIPHY-SDK-NAME"))||((0,s.fg)("X-GIPHY-SDK-NAME","FetchAPI"),(0,s.fg)("X-GIPHY-SDK-VERSION",e))}},1021:(e,t,r)=>{"use strict";let n;r.d(t,{Yd:()=>E,fg:()=>$,PY:()=>R,oj:()=>N,i1:()=>A,VK:()=>S,f8:()=>P,Ol:()=>M,iJ:()=>L,u8:()=>I,ei:()=>C});let a="undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),o={randomUUID:a},i=new Uint8Array(16),s=[];for(let e=0;e<256;++e)s.push((e+256).toString(16).slice(1));let l=function(e,t,r){if(o.randomUUID&&!t&&!e)return o.randomUUID();e=e||{};let a=e.random||(e.rng||function(){if(!n&&!(n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(i)})();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=a[e];return t}return function(e,t=0){return s[e[t+0]]+s[e[t+1]]+s[e[t+2]]+s[e[t+3]]+"-"+s[e[t+4]]+s[e[t+5]]+"-"+s[e[t+6]]+s[e[t+7]]+"-"+s[e[t+8]]+s[e[t+9]]+"-"+s[e[t+10]]+s[e[t+11]]+s[e[t+12]]+s[e[t+13]]+s[e[t+14]]+s[e[t+15]]}(a)};var c,u=Object.defineProperty,d=Object.defineProperties,p=Object.getOwnPropertyDescriptors,m=Object.getOwnPropertySymbols,f=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable,g=(e,t,r)=>t in e?u(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,y=(e,t)=>{for(var r in t||(t={}))f.call(t,r)&&g(e,r,t[r]);if(m)for(var r of m(t))h.call(t,r)&&g(e,r,t[r]);return e},v=(e,t)=>d(e,p(t)),b=((c=b||{})[c.DEBUG=0]="DEBUG",c[c.INFO=1]="INFO",c[c.WARN=2]="WARN",c[c.ERROR=3]="ERROR",c),E={ENABLED:"undefined"!=typeof window&&"undefined"!=typeof location&&-1!==location.search.indexOf("giphy-debug"),LEVEL:0,PREFIX:"GiphyJS",debug:(...e)=>{E.ENABLED&&E.LEVEL<=0&&console.debug(E.PREFIX,...e)},info:(...e)=>{E.ENABLED&&E.LEVEL<=1&&console.info(E.PREFIX,...e)},warn:(...e)=>{E.ENABLED&&E.LEVEL<=2&&console.warn(E.PREFIX,...e)},error:(...e)=>{E.ENABLED&&E.LEVEL<=3&&console.error(E.PREFIX,...e)}},_=(e,t,r)=>{let n,a=1/0;return r.forEach(r=>{let o=r.width/e,i=r.height/t,s=Math.abs(1-o*i);s<a&&(a=s,n=r)}),n},w=function(e,t,r,n=50){let[a]=e,o=e.filter(e=>(e.width*e.height>a.width*a.height&&(a=e),t-e.width<=n&&r-e.height<=n));return 0===o.length?a:_(t,r,o)};function C(e,t){let r={};return t.forEach(t=>{void 0!==e[t]&&(r[t]=e[t])}),r}var S=e=>{let t=0,r=0,n=e.offsetWidth,a=e.offsetHeight;do t+=e.offsetLeft,r+=e.offsetTop,e=e.offsetParent;while(e);let o={left:t,top:r,width:n,height:a,right:t+n,bottom:r+a,x:t,y:r};return v(y({},o),{toJSON:()=>JSON.stringify(o)})},k="",x=()=>{let e="",t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=t.length;for(let n=0;n<16;n++)e+=t.charAt(Math.floor(Math.random()*r));return e},I=()=>{if(!k){try{k=sessionStorage.getItem("giphyPingbackId")}catch(e){}if(!k){let e=new Date().getTime().toString(16);try{k=`${e}${l().replace(/-/g,"")}`.substring(0,16)}catch(e){k=x()}try{sessionStorage.setItem("giphyPingbackId",k)}catch(e){}}}return k};new Promise(e=>{"undefined"==typeof Image&&e(!1);let t=new Image;t.onload=()=>{e(!0)},t.onerror=()=>{e(!1)},t.src="data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA"});var A=(e,t,r)=>{let n=null==e?void 0:e.assets;if(n){n=y({},n),delete n.source;let e=Object.values(n).sort((e,t)=>e.width-t.width);return w(e,t,r)}},N=(e,t,r,n)=>{let a=C(e,["original","fixed_width","fixed_height","fixed_width_small","fixed_height_small"]),o=Object.entries(a).map(([e,t])=>y({renditionName:e},t));return w(o,t,r,n)},P=({images:e},t)=>{let{fixed_width:r}=e;if(r){let{width:e,height:n}=r;return Math.round(t/(e/n))}return 0},M=({images:e},t)=>{let{fixed_width:r}=e;if(r){let{width:e,height:n}=r;return Math.round(t*(e/n))}return 0},R=({alt_text:e,user:t,tags:r=[],is_sticker:n=!1,title:a=""})=>{var o;if(e)return e;if(a)return a;let i=t&&t.username||"",s=function(e,t=0){return e.slice(0,t)}((o=["transparent"],r.filter(e=>-1===o.indexOf(e))),i?4:5);return`${i?`${i} `:""}${s.join(" ")} ${n?"Sticker":"GIF"}`},O=("undefined"!=typeof window?window:global)||{};O._GIPHY_SDK_HEADERS_=O._GIPHY_SDK_HEADERS_||(O.Headers?new O.Headers({"X-GIPHY-SDK-PLATFORM":"web"}):void 0);var L=()=>O._GIPHY_SDK_HEADERS_,$=(e,t)=>{var r;return null==(r=L())?void 0:r.set(e,t)}}}]);