(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[888],{7856:function(e){e.exports=function(){"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e,n){return(t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,n)}function n(e,r,i){return(n=!function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}()?function(e,n,r){var i=[null];i.push.apply(i,n);var o=new(Function.bind.apply(e,i));return r&&t(o,r.prototype),o}:Reflect.construct).apply(null,arguments)}function r(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var o,a=Object.hasOwnProperty,s=Object.setPrototypeOf,u=Object.isFrozen,c=Object.getPrototypeOf,l=Object.getOwnPropertyDescriptor,f=Object.freeze,p=Object.seal,d=Object.create,h="undefined"!=typeof Reflect&&Reflect,v=h.apply,m=h.construct;v||(v=function(e,t,n){return e.apply(t,n)}),f||(f=function(e){return e}),p||(p=function(e){return e}),m||(m=function(e,t){return n(e,r(t))});var y=P(Array.prototype.forEach),g=P(Array.prototype.pop),_=P(Array.prototype.push),b=P(String.prototype.toLowerCase),w=P(String.prototype.toString),E=P(String.prototype.match),k=P(String.prototype.replace),S=P(String.prototype.indexOf),x=P(String.prototype.trim),O=P(RegExp.prototype.test),T=(o=TypeError,function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return m(o,t)});function P(e){return function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return v(e,t,r)}}function A(e,t,n){n=n||b,s&&s(e,null);for(var r=t.length;r--;){var i=t[r];if("string"==typeof i){var o=n(i);o!==i&&(u(t)||(t[r]=o),i=o)}e[i]=!0}return e}function D(e){var t,n=d(null);for(t in e)!0===v(a,e,[t])&&(n[t]=e[t]);return n}function C(e,t){for(;null!==e;){var n=l(e,t);if(n){if(n.get)return P(n.get);if("function"==typeof n.value)return P(n.value)}e=c(e)}return function(e){return console.warn("fallback value for",e),null}}var R=f(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),I=f(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),F=f(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),M=f(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),j=f(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),N=f(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),V=f(["#text"]),L=f(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),q=f(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),B=f(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),U=f(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Q=p(/\{\{[\w\W]*|[\w\W]*\}\}/gm),z=p(/<%[\w\W]*|[\w\W]*%>/gm),$=p(/\${[\w\W]*}/gm),H=p(/^data-[\-\w.\u00B7-\uFFFF]/),W=p(/^aria-[\-\w]+$/),G=p(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Y=p(/^(?:\w+script|data):/i),J=p(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),X=p(/^html$/i),Z=function(t,n){if("object"!==e(t)||"function"!=typeof t.createPolicy)return null;var r=null,i="data-tt-policy-suffix";n.currentScript&&n.currentScript.hasAttribute(i)&&(r=n.currentScript.getAttribute(i));var o="dompurify"+(r?"#"+r:"");try{return t.createPolicy(o,{createHTML:function(e){return e},createScriptURL:function(e){return e}})}catch(a){return console.warn("TrustedTypes policy "+o+" could not be created."),null}};return function t(){var n,i,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"undefined"==typeof window?null:window,a=function(e){return t(e)};if(a.version="2.4.3",a.removed=[],!o||!o.document||9!==o.document.nodeType)return a.isSupported=!1,a;var s=o.document,u=o.document,c=o.DocumentFragment,l=o.HTMLTemplateElement,p=o.Node,d=o.Element,h=o.NodeFilter,v=o.NamedNodeMap,m=void 0===v?o.NamedNodeMap||o.MozNamedAttrMap:v,P=o.HTMLFormElement,K=o.DOMParser,ee=o.trustedTypes,et=d.prototype,en=C(et,"cloneNode"),er=C(et,"nextSibling"),ei=C(et,"childNodes"),eo=C(et,"parentNode");if("function"==typeof l){var ea=u.createElement("template");ea.content&&ea.content.ownerDocument&&(u=ea.content.ownerDocument)}var es=Z(ee,s),eu=es?es.createHTML(""):"",ec=u,el=ec.implementation,ef=ec.createNodeIterator,ep=ec.createDocumentFragment,ed=ec.getElementsByTagName,eh=s.importNode,ev={};try{ev=D(u).documentMode?u.documentMode:{}}catch(em){}var ey={};a.isSupported="function"==typeof eo&&el&&void 0!==el.createHTMLDocument&&9!==ev;var eg=G,e_=null,eb=A({},[].concat(r(R),r(I),r(F),r(j),r(V))),ew=null,eE=A({},[].concat(r(L),r(q),r(B),r(U))),ek=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),eS=null,ex=null,eO=!0,eT=!0,eP=!1,eA=!1,eD=!1,eC=!1,eR=!1,eI=!1,eF=!1,eM=!1,ej=!0,eN=!1,eV=!0,eL=!1,eq={},eB=null,eU=A({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),eQ=null,ez=A({},["audio","video","img","source","image","track"]),e$=null,eH=A({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),eW="http://www.w3.org/1998/Math/MathML",eG="http://www.w3.org/2000/svg",eY="http://www.w3.org/1999/xhtml",eJ=eY,eX=!1,eZ=null,eK=A({},[eW,eG,eY],w),e0=["application/xhtml+xml","text/html"],e1=null,e2=u.createElement("form"),e3=function(e){return e instanceof RegExp||e instanceof Function},e5=function(t){e1&&e1===t||(t&&"object"===e(t)||(t={}),t=D(t),i="application/xhtml+xml"===(n=n=-1===e0.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE)?w:b,e_="ALLOWED_TAGS"in t?A({},t.ALLOWED_TAGS,i):eb,ew="ALLOWED_ATTR"in t?A({},t.ALLOWED_ATTR,i):eE,eZ="ALLOWED_NAMESPACES"in t?A({},t.ALLOWED_NAMESPACES,w):eK,e$="ADD_URI_SAFE_ATTR"in t?A(D(eH),t.ADD_URI_SAFE_ATTR,i):eH,eQ="ADD_DATA_URI_TAGS"in t?A(D(ez),t.ADD_DATA_URI_TAGS,i):ez,eB="FORBID_CONTENTS"in t?A({},t.FORBID_CONTENTS,i):eU,eS="FORBID_TAGS"in t?A({},t.FORBID_TAGS,i):{},ex="FORBID_ATTR"in t?A({},t.FORBID_ATTR,i):{},eq="USE_PROFILES"in t&&t.USE_PROFILES,eO=!1!==t.ALLOW_ARIA_ATTR,eT=!1!==t.ALLOW_DATA_ATTR,eP=t.ALLOW_UNKNOWN_PROTOCOLS||!1,eA=t.SAFE_FOR_TEMPLATES||!1,eD=t.WHOLE_DOCUMENT||!1,eI=t.RETURN_DOM||!1,eF=t.RETURN_DOM_FRAGMENT||!1,eM=t.RETURN_TRUSTED_TYPE||!1,eR=t.FORCE_BODY||!1,ej=!1!==t.SANITIZE_DOM,eN=t.SANITIZE_NAMED_PROPS||!1,eV=!1!==t.KEEP_CONTENT,eL=t.IN_PLACE||!1,eg=t.ALLOWED_URI_REGEXP||eg,eJ=t.NAMESPACE||eY,t.CUSTOM_ELEMENT_HANDLING&&e3(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ek.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&e3(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ek.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(ek.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),eA&&(eT=!1),eF&&(eI=!0),eq&&(e_=A({},r(V)),ew=[],!0===eq.html&&(A(e_,R),A(ew,L)),!0===eq.svg&&(A(e_,I),A(ew,q),A(ew,U)),!0===eq.svgFilters&&(A(e_,F),A(ew,q),A(ew,U)),!0===eq.mathMl&&(A(e_,j),A(ew,B),A(ew,U))),t.ADD_TAGS&&(e_===eb&&(e_=D(e_)),A(e_,t.ADD_TAGS,i)),t.ADD_ATTR&&(ew===eE&&(ew=D(ew)),A(ew,t.ADD_ATTR,i)),t.ADD_URI_SAFE_ATTR&&A(e$,t.ADD_URI_SAFE_ATTR,i),t.FORBID_CONTENTS&&(eB===eU&&(eB=D(eB)),A(eB,t.FORBID_CONTENTS,i)),eV&&(e_["#text"]=!0),eD&&A(e_,["html","head","body"]),e_.table&&(A(e_,["tbody"]),delete eS.tbody),f&&f(t),e1=t)},e6=A({},["mi","mo","mn","ms","mtext"]),e8=A({},["foreignobject","desc","title","annotation-xml"]),e4=A({},["title","style","font","a","script"]),e9=A({},I);A(e9,F),A(e9,M);var e7=A({},j);A(e7,N);var te=function(e){var t=eo(e);t&&t.tagName||(t={namespaceURI:eJ,tagName:"template"});var r=b(e.tagName),i=b(t.tagName);return!!eZ[e.namespaceURI]&&(e.namespaceURI===eG?t.namespaceURI===eY?"svg"===r:t.namespaceURI===eW?"svg"===r&&("annotation-xml"===i||e6[i]):Boolean(e9[r]):e.namespaceURI===eW?t.namespaceURI===eY?"math"===r:t.namespaceURI===eG?"math"===r&&e8[i]:Boolean(e7[r]):e.namespaceURI===eY?(t.namespaceURI!==eG||!!e8[i])&&(t.namespaceURI!==eW||!!e6[i])&&!e7[r]&&(e4[r]||!e9[r]):"application/xhtml+xml"===n&&!!eZ[e.namespaceURI])},tt=function(e){_(a.removed,{element:e});try{e.parentNode.removeChild(e)}catch(n){try{e.outerHTML=eu}catch(t){e.remove()}}},tn=function(e,t){try{_(a.removed,{attribute:t.getAttributeNode(e),from:t})}catch(n){_(a.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!ew[e]){if(eI||eF)try{tt(t)}catch(r){}else try{t.setAttribute(e,"")}catch(i){}}},tr=function(e){if(eR)e="<remove></remove>"+e;else{var t,r,i=E(e,/^[\r\n\t ]+/);r=i&&i[0]}"application/xhtml+xml"===n&&eJ===eY&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");var o=es?es.createHTML(e):e;if(eJ===eY)try{t=new K().parseFromString(o,n)}catch(a){}if(!t||!t.documentElement){t=el.createDocument(eJ,"template",null);try{t.documentElement.innerHTML=eX?eu:o}catch(s){}}var c=t.body||t.documentElement;return(e&&r&&c.insertBefore(u.createTextNode(r),c.childNodes[0]||null),eJ===eY)?ed.call(t,eD?"html":"body")[0]:eD?t.documentElement:c},ti=function(e){return ef.call(e.ownerDocument||e,e,h.SHOW_ELEMENT|h.SHOW_COMMENT|h.SHOW_TEXT,null,!1)},to=function(t){return"object"===e(p)?t instanceof p:t&&"object"===e(t)&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName},ta=function(e,t,n){ey[e]&&y(ey[e],function(e){e.call(a,t,n,e1)})},ts=function(e){if(ta("beforeSanitizeElements",e,null),e instanceof P&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof m)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)||O(/[\u0080-\uFFFF]/,e.nodeName))return tt(e),!0;var t,n=i(e.nodeName);if(ta("uponSanitizeElement",e,{tagName:n,allowedTags:e_}),e.hasChildNodes()&&!to(e.firstElementChild)&&(!to(e.content)||!to(e.content.firstElementChild))&&O(/<[/\w]/g,e.innerHTML)&&O(/<[/\w]/g,e.textContent)||"select"===n&&O(/<template/i,e.innerHTML))return tt(e),!0;if(!e_[n]||eS[n]){if(!eS[n]&&tc(n)&&(ek.tagNameCheck instanceof RegExp&&O(ek.tagNameCheck,n)||ek.tagNameCheck instanceof Function&&ek.tagNameCheck(n)))return!1;if(eV&&!eB[n]){var r=eo(e)||e.parentNode,o=ei(e)||e.childNodes;if(o&&r)for(var s=o.length,u=s-1;u>=0;--u)r.insertBefore(en(o[u],!0),er(e))}return tt(e),!0}return e instanceof d&&!te(e)||("noscript"===n||"noembed"===n)&&O(/<\/no(script|embed)/i,e.innerHTML)?(tt(e),!0):(eA&&3===e.nodeType&&(t=k(t=e.textContent,Q," "),t=k(t,z," "),t=k(t,$," "),e.textContent!==t&&(_(a.removed,{element:e.cloneNode()}),e.textContent=t)),ta("afterSanitizeElements",e,null),!1)},tu=function(e,t,n){if(ej&&("id"===t||"name"===t)&&(n in u||n in e2))return!1;if(eT&&!ex[t]&&O(H,t));else if(eO&&O(W,t));else if(!ew[t]||ex[t]){if(!(tc(e)&&(ek.tagNameCheck instanceof RegExp&&O(ek.tagNameCheck,e)||ek.tagNameCheck instanceof Function&&ek.tagNameCheck(e))&&(ek.attributeNameCheck instanceof RegExp&&O(ek.attributeNameCheck,t)||ek.attributeNameCheck instanceof Function&&ek.attributeNameCheck(t))||"is"===t&&ek.allowCustomizedBuiltInElements&&(ek.tagNameCheck instanceof RegExp&&O(ek.tagNameCheck,n)||ek.tagNameCheck instanceof Function&&ek.tagNameCheck(n))))return!1}else if(e$[t]);else if(O(eg,k(n,J,"")));else if(("src"===t||"xlink:href"===t||"href"===t)&&"script"!==e&&0===S(n,"data:")&&eQ[e]);else if(eP&&!O(Y,k(n,J,"")));else if(n)return!1;return!0},tc=function(e){return e.indexOf("-")>0},tl=function(t){ta("beforeSanitizeAttributes",t,null);var n,r,o,s,u=t.attributes;if(u){var c={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ew};for(s=u.length;s--;){var l=(n=u[s]).name,f=n.namespaceURI;if(r="value"===l?n.value:x(n.value),o=i(l),c.attrName=o,c.attrValue=r,c.keepAttr=!0,c.forceKeepAttr=void 0,ta("uponSanitizeAttribute",t,c),r=c.attrValue,!c.forceKeepAttr&&(tn(l,t),c.keepAttr)){if(O(/\/>/i,r)){tn(l,t);continue}eA&&(r=k(r,Q," "),r=k(r,z," "),r=k(r,$," "));var p=i(t.nodeName);if(tu(p,o,r)){if(eN&&("id"===o||"name"===o)&&(tn(l,t),r="user-content-"+r),es&&"object"===e(ee)&&"function"==typeof ee.getAttributeType){if(f);else switch(ee.getAttributeType(p,o)){case"TrustedHTML":r=es.createHTML(r);break;case"TrustedScriptURL":r=es.createScriptURL(r)}}try{f?t.setAttributeNS(f,l,r):t.setAttribute(l,r),g(a.removed)}catch(d){}}}}ta("afterSanitizeAttributes",t,null)}},tf=function e(t){var n,r=ti(t);for(ta("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)ta("uponSanitizeShadowNode",n,null),ts(n)||(n.content instanceof c&&e(n.content),tl(n));ta("afterSanitizeShadowDOM",t,null)};return a.sanitize=function(t){var n,r,u,l,f,d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if((eX=!t)&&(t="<!-->"),"string"!=typeof t&&!to(t)){if("function"!=typeof t.toString)throw T("toString is not a function");if("string"!=typeof(t=t.toString()))throw T("dirty is not a string, aborting")}if(!a.isSupported){if("object"===e(o.toStaticHTML)||"function"==typeof o.toStaticHTML){if("string"==typeof t)return o.toStaticHTML(t);if(to(t))return o.toStaticHTML(t.outerHTML)}return t}if(eC||e5(d),a.removed=[],"string"==typeof t&&(eL=!1),eL){if(t.nodeName){var h=i(t.nodeName);if(!e_[h]||eS[h])throw T("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof p)1===(r=(n=tr("<!---->")).ownerDocument.importNode(t,!0)).nodeType&&"BODY"===r.nodeName?n=r:"HTML"===r.nodeName?n=r:n.appendChild(r);else{if(!eI&&!eA&&!eD&&-1===t.indexOf("<"))return es&&eM?es.createHTML(t):t;if(!(n=tr(t)))return eI?null:eM?eu:""}n&&eR&&tt(n.firstChild);for(var v=ti(eL?t:n);u=v.nextNode();)3===u.nodeType&&u===l||ts(u)||(u.content instanceof c&&tf(u.content),tl(u),l=u);if(l=null,eL)return t;if(eI){if(eF)for(f=ep.call(n.ownerDocument);n.firstChild;)f.appendChild(n.firstChild);else f=n;return ew.shadowroot&&(f=eh.call(s,f,!0)),f}var m=eD?n.outerHTML:n.innerHTML;return eD&&e_["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&O(X,n.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+m),eA&&(m=k(m,Q," "),m=k(m,z," "),m=k(m,$," ")),es&&eM?es.createHTML(m):m},a.setConfig=function(e){e5(e),eC=!0},a.clearConfig=function(){e1=null,eC=!1},a.isValidAttribute=function(e,t,n){return e1||e5({}),tu(i(e),i(t),n)},a.addHook=function(e,t){"function"==typeof t&&(ey[e]=ey[e]||[],_(ey[e],t))},a.removeHook=function(e){if(ey[e])return g(ey[e])},a.removeHooks=function(e){ey[e]&&(ey[e]=[])},a.removeAllHooks=function(){ey={}},a}()}()},9238:function(e,t,n){e.exports=window.DOMPurify||(window.DOMPurify=n(7856).default||n(7856))},3454:function(e,t,n){"use strict";var r,i;e.exports=(null==(r=n.g.process)?void 0:r.env)&&"object"==typeof(null==(i=n.g.process)?void 0:i.env)?n.g.process:n(7663)},6840:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return n(4691)}])},448:function(e,t,n){"use strict";n.d(t,{EY:function(){return o},Ji:function(){return i},eu:function(){return r},hC:function(){return a}});let r={initial:{y:60,opacity:0},animate:{y:0,opacity:1,transition:{duration:.5,ease:"easeOut"}}},i={initial:{opacity:0},animate:{opacity:1,transition:{duration:1,delay:.5,ease:"easeOut"}}},o={animate:{transition:{staggerChildren:.1}}},a={initial:{opacity:0},animate:{opacity:1,transition:{duration:1,delay:2,ease:"easeOut"}}};t.ZP=r},4691:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return aD}});var r,i,o,a,s,u,c,l,f,p,d,h,v,m=n(5893);function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach(function(t){k(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _(e){return(_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function b(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function w(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function E(e,t,n){return t&&w(e.prototype,t),n&&w(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function k(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function S(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&O(e,t)}function x(e){return(x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function O(e,t){return(O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function T(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=x(e);if(t){var i=x(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function P(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(e,t)||D(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(e){return function(e){if(Array.isArray(e))return C(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||D(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function D(e,t){if(e){if("string"==typeof e)return C(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?C(e,t):void 0}}function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function R(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=D(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}var I=String.fromCharCode,F="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",M="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",j={};function N(e,t){if(!j[e]){j[e]={};for(var n=0;n<e.length;n++)j[e][e.charAt(n)]=n}return j[e][t]}var V={compressToBase64:function(e){if(null==e)return"";var t=V._compress(e,6,function(e){return F.charAt(e)});switch(t.length%4){default:case 0:return t;case 1:return t+"===";case 2:return t+"==";case 3:return t+"="}},decompressFromBase64:function(e){return null==e?"":""==e?null:V._decompress(e.length,32,function(t){return N(F,e.charAt(t))})},compressToUTF16:function(e){return null==e?"":V._compress(e,15,function(e){return I(e+32)})+" "},decompressFromUTF16:function(e){return null==e?"":""==e?null:V._decompress(e.length,16384,function(t){return e.charCodeAt(t)-32})},compressToUint8Array:function(e){for(var t=V.compress(e),n=new Uint8Array(2*t.length),r=0,i=t.length;r<i;r++){var o=t.charCodeAt(r);n[2*r]=o>>>8,n[2*r+1]=o%256}return n},decompressFromUint8Array:function(e){if(null==e)return V.decompress(e);for(var t=Array(e.length/2),n=0,r=t.length;n<r;n++)t[n]=256*e[2*n]+e[2*n+1];var i=[];return t.forEach(function(e){i.push(I(e))}),V.decompress(i.join(""))},compressToEncodedURIComponent:function(e){return null==e?"":V._compress(e,6,function(e){return M.charAt(e)})},decompressFromEncodedURIComponent:function(e){return null==e?"":""==e?null:(e=e.replace(/ /g,"+"),V._decompress(e.length,32,function(t){return N(M,e.charAt(t))}))},compress:function(e){return V._compress(e,16,function(e){return I(e)})},_compress:function(e,t,n){if(null==e)return"";var r,i,o,a="",s="",u="",c=2,l=3,f=2,p=0,d=0,h={},v={},m=[];for(o=0;o<e.length;o+=1)if(a=e.charAt(o),Object.prototype.hasOwnProperty.call(h,a)||(h[a]=l++,v[a]=!0),s=u+a,Object.prototype.hasOwnProperty.call(h,s))u=s;else{if(Object.prototype.hasOwnProperty.call(v,u)){if(256>u.charCodeAt(0)){for(r=0;r<f;r++)p<<=1,d==t-1?(d=0,m.push(n(p)),p=0):d++;for(i=u.charCodeAt(0),r=0;r<8;r++)p=p<<1|1&i,d==t-1?(d=0,m.push(n(p)),p=0):d++,i>>=1}else{for(i=1,r=0;r<f;r++)p=p<<1|i,d==t-1?(d=0,m.push(n(p)),p=0):d++,i=0;for(i=u.charCodeAt(0),r=0;r<16;r++)p=p<<1|1&i,d==t-1?(d=0,m.push(n(p)),p=0):d++,i>>=1}0==--c&&(c=Math.pow(2,f),f++),delete v[u]}else for(i=h[u],r=0;r<f;r++)p=p<<1|1&i,d==t-1?(d=0,m.push(n(p)),p=0):d++,i>>=1;0==--c&&(c=Math.pow(2,f),f++),h[s]=l++,u=String(a)}if(""!==u){if(Object.prototype.hasOwnProperty.call(v,u)){if(256>u.charCodeAt(0)){for(r=0;r<f;r++)p<<=1,d==t-1?(d=0,m.push(n(p)),p=0):d++;for(i=u.charCodeAt(0),r=0;r<8;r++)p=p<<1|1&i,d==t-1?(d=0,m.push(n(p)),p=0):d++,i>>=1}else{for(i=1,r=0;r<f;r++)p=p<<1|i,d==t-1?(d=0,m.push(n(p)),p=0):d++,i=0;for(i=u.charCodeAt(0),r=0;r<16;r++)p=p<<1|1&i,d==t-1?(d=0,m.push(n(p)),p=0):d++,i>>=1}0==--c&&(c=Math.pow(2,f),f++),delete v[u]}else for(i=h[u],r=0;r<f;r++)p=p<<1|1&i,d==t-1?(d=0,m.push(n(p)),p=0):d++,i>>=1;0==--c&&(c=Math.pow(2,f),f++)}for(i=2,r=0;r<f;r++)p=p<<1|1&i,d==t-1?(d=0,m.push(n(p)),p=0):d++,i>>=1;for(;;){if(p<<=1,d==t-1){m.push(n(p));break}d++}return m.join("")},decompress:function(e){return null==e?"":""==e?null:V._decompress(e.length,32768,function(t){return e.charCodeAt(t)})},_decompress:function(e,t,n){var r,i,o,a,s,u,c,l=[],f=[],p={val:n(0),position:t,index:1},d=4,h=4,v=3,m="";for(r=0;r<3;r+=1)l[r]=r;for(o=0,s=4,u=1;u!=s;)a=p.val&p.position,p.position>>=1,0==p.position&&(p.position=t,p.val=n(p.index++)),o|=(a>0?1:0)*u,u<<=1;switch(o){case 0:for(o=0,s=256,u=1;u!=s;)a=p.val&p.position,p.position>>=1,0==p.position&&(p.position=t,p.val=n(p.index++)),o|=(a>0?1:0)*u,u<<=1;c=I(o);break;case 1:for(o=0,s=65536,u=1;u!=s;)a=p.val&p.position,p.position>>=1,0==p.position&&(p.position=t,p.val=n(p.index++)),o|=(a>0?1:0)*u,u<<=1;c=I(o);break;case 2:return""}for(l[3]=c,i=c,f.push(c);;){if(p.index>e)return"";for(o=0,s=Math.pow(2,v),u=1;u!=s;)a=p.val&p.position,p.position>>=1,0==p.position&&(p.position=t,p.val=n(p.index++)),o|=(a>0?1:0)*u,u<<=1;switch(c=o){case 0:for(o=0,s=256,u=1;u!=s;)a=p.val&p.position,p.position>>=1,0==p.position&&(p.position=t,p.val=n(p.index++)),o|=(a>0?1:0)*u,u<<=1;l[h++]=I(o),c=h-1,d--;break;case 1:for(o=0,s=65536,u=1;u!=s;)a=p.val&p.position,p.position>>=1,0==p.position&&(p.position=t,p.val=n(p.index++)),o|=(a>0?1:0)*u,u<<=1;l[h++]=I(o),c=h-1,d--;break;case 2:return f.join("")}if(0==d&&(d=Math.pow(2,v),v++),l[c])m=l[c];else{if(c!==h)return null;m=i+i.charAt(0)}f.push(m),l[h++]=i+m.charAt(0),i=m,0==--d&&(d=Math.pow(2,v),v++)}}},L={DEBUG:!1,LIB_VERSION:"1.52.0"},q=Array.prototype,B=Object.prototype,U=B.toString,Q=B.hasOwnProperty,z="undefined"!=typeof window?window:{},$=z.navigator||{userAgent:""},H=z.document||{},W=$.userAgent,G=q.forEach,Y=q.indexOf,J={},X={log:function(){if(L.DEBUG&&!ea(window.console)&&window.console){for(var e=("__rrweb_original__"in window.console.log)?window.console.log.__rrweb_original__:window.console.log,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];try{e.apply(window.console,n)}catch(i){ee(n,function(t){e(t)})}}},error:function(){if(L.DEBUG&&!ea(window.console)&&window.console){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=["PostHog error:"].concat(t),i="__rrweb_original__"in window.console.error?window.console.error.__rrweb_original__:window.console.error;try{i.apply(window.console,r)}catch(o){ee(r,function(e){i(e)})}}},critical:function(){if(!ea(window.console)&&window.console){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=["PostHog error:"].concat(t),i="__rrweb_original__"in window.console.error?window.console.error.__rrweb_original__:window.console.error;try{i.apply(window.console,r)}catch(o){ee(r,function(e){i(e)})}}}},Z=function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};function K(e,t,n){if(null!=e){if(G&&Array.isArray(e)&&e.forEach===G)e.forEach(t,n);else if("length"in e&&e.length===+e.length){for(var r=0,i=e.length;r<i;r++)if(r in e&&t.call(n,e[r],r)===J)return}else for(var o in e)if(Q.call(e,o)&&t.call(n,e[o],o)===J)return}}function ee(e,t,n){if(Array.isArray(e)){if(G&&e.forEach===G)e.forEach(t,n);else if("length"in e&&e.length===+e.length){for(var r=0,i=e.length;r<i;r++)if(r in e&&t.call(n,e[r],r)===J)return}}}var et=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return ee(n,function(t){for(var n in t)void 0!==t[n]&&(e[n]=t[n])}),e},en=Array.isArray||function(e){return"[object Array]"===U.call(e)},er=function(e){try{return/^\s*\bfunction\b/.test(e)}catch(t){return!1}};function ei(e,t){return -1!==e.indexOf(t)}var eo=function(e){return e===Object(e)&&!en(e)},ea=function(e){return void 0===e},es=function(e){return"[object String]"==U.call(e)},eu=function(e){function t(e){return e<10?"0"+e:e}return e.getUTCFullYear()+"-"+t(e.getUTCMonth()+1)+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())},ec=function(e){return function(){try{for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.apply(this,n)}catch(i){X.critical("Implementation error. Please turn on debug and contact support@posthog.com."),X.critical(i)}}},el=function(e){var t={};return K(e,function(e,n){es(e)&&e.length>0&&(t[n]=e)}),t},ef=["$performance_raw"];function ep(e,t){var n,r;return n=function(e,n){return n&&ef.indexOf(n)>-1?e:"string"==typeof e&&null!==t?e.slice(0,t):e},r=new Set,function e(t,i){var o;return t!==Object(t)?n?n(t,i):t:r.has(t)?void 0:(r.add(t),en(t)?(o=[],ee(t,function(t){o.push(e(t))})):(o={},K(t,function(t,n){r.has(t)||(o[n]=e(t,n))})),o)}(e)}function ed(e){var t,n,r,i,o,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",s=0,u=0,c="",l=[];if(!e)return e;e=ev(e);do t=(o=e.charCodeAt(s++)<<16|e.charCodeAt(s++)<<8|e.charCodeAt(s++))>>18&63,n=o>>12&63,r=o>>6&63,i=63&o,l[u++]=a.charAt(t)+a.charAt(n)+a.charAt(r)+a.charAt(i);while(s<e.length);switch(c=l.join(""),e.length%3){case 1:c=c.slice(0,-2)+"==";break;case 2:c=c.slice(0,-1)+"="}return c}var eh,ev=function(e){var t,n,r,i,o="";for(t=n=0,r=(e=(e+"").replace(/\r\n/g,"\n").replace(/\r/g,"\n")).length,i=0;i<r;i++){var a=e.charCodeAt(i),s=null;a<128?n++:s=a>127&&a<2048?String.fromCharCode(a>>6|192,63&a|128):String.fromCharCode(a>>12|224,a>>6&63|128,63&a|128),null!==s&&(n>t&&(o+=e.substring(t,n)),o+=s,t=n=i+1)}return n>t&&(o+=e.substring(t,e.length)),o},em=(eh=function(){for(var e=(new Date).valueOf(),t=0;e==(new Date).valueOf();)t++;return e.toString(16)+t.toString(16)},function(){var e="undefined"!=typeof window?(window.screen.height*window.screen.width).toString(16):"0";return eh()+"-"+Math.random().toString(16).replace(".","")+"-"+function(){var e,t,n=0,r=[];function i(e,t){var n,i=0;for(n=0;n<t.length;n++)i|=r[n]<<8*n;return e^i}for(e=0;e<W.length;e++)t=W.charCodeAt(e),r.unshift(255&t),r.length>=4&&(n=i(n,r),r=[]);return r.length>0&&(n=i(n,r)),n.toString(16)}()+"-"+e+"-"+eh()}),ey=function(e,t){var n=RegExp("[\\?&]"+t.replace(/[[]/,"\\[").replace(/[\]]/,"\\]")+"=([^&#]*)").exec(e);if(null===n||n&&"string"!=typeof n[1]&&n[1].length)return"";var r=n[1];try{r=decodeURIComponent(r)}catch(i){X.error("Skipping decoding for malformed query param: "+r)}return r.replace(/\+/g," ")},eg=function(e,t){var n=e.match(RegExp(t+"=([^&]*)"));return n?n[1]:null},e_=function(){function e(t){return t&&(t.preventDefault=e.preventDefault,t.stopPropagation=e.stopPropagation),t}return e.preventDefault=function(){this.returnValue=!1},e.stopPropagation=function(){this.cancelBubble=!0},function(t,n,r,i,o){if(t){if(t.addEventListener&&!i)t.addEventListener(n,r,!!o);else{var a="on"+n,s=t[a];t[a]=function(n){if(n=n||e(window.event)){var i,o=!0;er(s)&&(i=s(n));var a=r.call(t,n);return!1!==i&&!1!==a||(o=!1),o}}}}else X.error("No valid element provided to register_event")}}(),eb={campaignParams:function(){var e={};return K("utm_source utm_medium utm_campaign utm_content utm_term gclid fbclid msclkid".split(" "),function(t){var n=ey(H.URL,t);n.length&&(e[t]=n)}),e},searchEngine:function(){var e=H.referrer;return e?0===e.search("https?://(.*)google.([^/?]*)")?"google":0===e.search("https?://(.*)bing.com")?"bing":0===e.search("https?://(.*)yahoo.com")?"yahoo":0===e.search("https?://(.*)duckduckgo.com")?"duckduckgo":null:null},searchInfo:function(){var e=eb.searchEngine(),t={};if(null!==e){t.$search_engine=e;var n=ey(H.referrer,"yahoo"!=e?"q":"p");n.length&&(t.ph_keyword=n)}return t},browser:function(e,t,n){return t=t||"",n||ei(e," OPR/")?ei(e,"Mini")?"Opera Mini":"Opera":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":ei(e,"IEMobile")||ei(e,"WPDesktop")?"Internet Explorer Mobile":ei(e,"SamsungBrowser/")?"Samsung Internet":ei(e,"Edge")||ei(e,"Edg/")?"Microsoft Edge":ei(e,"FBIOS")?"Facebook Mobile":ei(e,"Chrome")?"Chrome":ei(e,"CriOS")?"Chrome iOS":ei(e,"UCWEB")||ei(e,"UCBrowser")?"UC Browser":ei(e,"FxiOS")?"Firefox iOS":ei(t,"Apple")?ei(e,"Mobile")?"Mobile Safari":"Safari":ei(e,"Android")?"Android Mobile":ei(e,"Konqueror")?"Konqueror":ei(e,"Firefox")?"Firefox":ei(e,"MSIE")||ei(e,"Trident/")?"Internet Explorer":ei(e,"Gecko")?"Mozilla":""},browserVersion:function(e,t,n){var r={"Internet Explorer Mobile":/rv:(\d+(\.\d+)?)/,"Microsoft Edge":/Edge?\/(\d+(\.\d+)?)/,Chrome:/Chrome\/(\d+(\.\d+)?)/,"Chrome iOS":/CriOS\/(\d+(\.\d+)?)/,"UC Browser":/(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/,Safari:/Version\/(\d+(\.\d+)?)/,"Mobile Safari":/Version\/(\d+(\.\d+)?)/,Opera:/(Opera|OPR)\/(\d+(\.\d+)?)/,Firefox:/Firefox\/(\d+(\.\d+)?)/,"Firefox iOS":/FxiOS\/(\d+(\.\d+)?)/,Konqueror:/Konqueror:(\d+(\.\d+)?)/,BlackBerry:/BlackBerry (\d+(\.\d+)?)/,"Android Mobile":/android\s(\d+(\.\d+)?)/,"Samsung Internet":/SamsungBrowser\/(\d+(\.\d+)?)/,"Internet Explorer":/(rv:|MSIE )(\d+(\.\d+)?)/,Mozilla:/rv:(\d+(\.\d+)?)/}[eb.browser(e,t,n)];if(void 0===r)return null;var i=e.match(r);return i?parseFloat(i[i.length-2]):null},browserLanguage:function(){return $.language||$.userLanguage},os:function(){return/Windows/i.test(W)?/Phone/.test(W)||/WPDesktop/.test(W)?"Windows Phone":"Windows":/(iPhone|iPad|iPod)/.test(W)?"iOS":/Android/.test(W)?"Android":/(BlackBerry|PlayBook|BB10)/i.test(W)?"BlackBerry":/Mac/i.test(W)?"Mac OS X":/Linux/.test(W)?"Linux":/CrOS/.test(W)?"Chrome OS":""},device:function(e){return/Windows Phone/i.test(e)||/WPDesktop/.test(e)?"Windows Phone":/iPad/.test(e)?"iPad":/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Android/.test(e)&&!/Mobile/.test(e)?"Android Tablet":/Android/.test(e)?"Android":""},deviceType:function(e){var t=this.device(e);return"iPad"===t||"Android Tablet"===t?"Tablet":t?"Mobile":"Desktop"},referrer:function(){return H.referrer||"$direct"},referringDomain:function(){if(!H.referrer)return"$direct";var e=H.createElement("a");return e.href=H.referrer,e.host},properties:function(){return et(el({$os:eb.os(),$browser:eb.browser(W,$.vendor,z.opera),$device:eb.device(W),$device_type:eb.deviceType(W)}),{$current_url:null==z?void 0:z.location.href,$host:null==z?void 0:z.location.host,$pathname:null==z?void 0:z.location.pathname,$browser_version:eb.browserVersion(W,$.vendor,z.opera),$browser_language:eb.browserLanguage(),$screen_height:null==z?void 0:z.screen.height,$screen_width:null==z?void 0:z.screen.width,$viewport_height:null==z?void 0:z.innerHeight,$viewport_width:null==z?void 0:z.innerWidth,$lib:"web",$lib_version:L.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:(Date.now=Date.now||function(){return+new Date},Date.now()/1e3)})},people_properties:function(){return et(el({$os:eb.os(),$browser:eb.browser(W,$.vendor,z.opera)}),{$browser_version:eb.browserVersion(W,$.vendor,z.opera)})}};function ew(e){switch(_(e.className)){case"string":return e.className;case"object":return("baseVal"in e.className?e.className.baseVal:null)||e.getAttribute("class")||"";default:return""}}function eE(e){var t="";return eP(e)&&!eA(e)&&e.childNodes&&e.childNodes.length&&K(e.childNodes,function(e){ex(e)&&e.textContent&&(t+=Z(e.textContent).split(/(\s+)/).filter(eD).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255))}),Z(t)}function ek(e){return!!e&&1===e.nodeType}function eS(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function ex(e){return!!e&&3===e.nodeType}function eO(e){return!!e&&11===e.nodeType}var eT=["a","button","form","input","select","textarea","label"];function eP(e){for(var t=e;t.parentNode&&!eS(t,"body");t=t.parentNode){var n=ew(t).split(" ");if(ei(n,"ph-sensitive")||ei(n,"ph-no-capture"))return!1}if(ei(ew(e).split(" "),"ph-include"))return!0;var r=e.type||"";if("string"==typeof r)switch(r.toLowerCase()){case"hidden":case"password":return!1}var i=e.name||e.id||"";return!("string"==typeof i&&/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(i.replace(/[^a-zA-Z0-9]/g,"")))}function eA(e){return!!(eS(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||eS(e,"select")||eS(e,"textarea")||"true"===e.getAttribute("contenteditable"))}function eD(e){return!(null===e||ea(e)||"string"==typeof e&&(e=Z(e),/^(?:(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11}))$/.test((e||"").replace(/[- ]/g,""))||/(^\d{3}-?\d{2}-?\d{4}$)/.test(e)))}function eC(e,t){var n=document.createElement("script");n.type="text/javascript",n.src=e,n.onload=t;var r,i=document.querySelectorAll("body > script");i.length>0?null===(r=i[0].parentNode)||void 0===r||r.insertBefore(n,i[0]):document.body.appendChild(n)}function eR(e){var t=eE(e);return eD(t="".concat(t," ").concat(function e(t){var n="";return t&&t.childNodes&&t.childNodes.length&&K(t.childNodes,function(t){var r;if(t&&"span"===(null===(r=t.tagName)||void 0===r?void 0:r.toLowerCase()))try{var i=eE(t);n="".concat(n," ").concat(i).trim(),t.childNodes&&t.childNodes.length&&(n="".concat(n," ").concat(e(t)).trim())}catch(o){console.error(o)}}),n}(e)).trim())?t:""}var eI=function(){function e(t){b(this,e),this.clicks=[],this.enabled=t}return E(e,[{key:"isRageClick",value:function(e,t,n){if(!this.enabled)return!1;var r=this.clicks[this.clicks.length-1];if(r&&Math.abs(e-r.x)+Math.abs(t-r.y)<30&&n-r.timestamp<1e3){if(this.clicks.push({x:e,y:t,timestamp:n}),3===this.clicks.length)return!0}else this.clicks=[{x:e,y:t,timestamp:n}];return!1}}]),e}(),eF=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,eM={is_supported:function(){return!0},error:function(e){X.error("cookieStore error: "+e)},get:function(e){try{for(var t=e+"=",n=document.cookie.split(";"),r=0;r<n.length;r++){for(var i=n[r];" "==i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(t))return decodeURIComponent(i.substring(t.length,i.length))}}catch(o){}return null},parse:function(e){var t;try{t=JSON.parse(eM.get(e))||{}}catch(n){}return t},set:function(e,t,n,r,i){try{var o="",a="",s="";if(r){var u=document.location.hostname.match(eF),c=u?u[0]:"";o=c?"; domain=."+c:""}if(n){var l=new Date;l.setTime(l.getTime()+24*n*36e5),a="; expires="+l.toUTCString()}i&&(s="; secure");var f=e+"="+encodeURIComponent(JSON.stringify(t))+a+"; SameSite=Lax; path=/"+o+s;return document.cookie=f,f}catch(p){return}},remove:function(e,t){try{eM.set(e,"",-1,t)}catch(n){return}}},ej=null,eN={is_supported:function(){if(null!==ej)return ej;var e=!0;if("undefined"!=typeof window)try{var t="__mplssupport__";eN.set(t,"xyz"),'"xyz"'!==eN.get(t)&&(e=!1),eN.remove(t)}catch(n){e=!1}else e=!1;return e||X.error("localStorage unsupported; falling back to cookie store"),ej=e,e},error:function(e){X.error("localStorage error: "+e)},get:function(e){try{return window.localStorage.getItem(e)}catch(t){eN.error(t)}return null},parse:function(e){try{return JSON.parse(eN.get(e))||{}}catch(t){}return null},set:function(e,t){try{window.localStorage.setItem(e,JSON.stringify(t))}catch(n){eN.error(n)}},remove:function(e){try{window.localStorage.removeItem(e)}catch(t){eN.error(t)}}},eV=g(g({},eN),{},{parse:function(e){try{var t={};try{(t=eM.parse(e)||{}).distinct_id&&eM.set(e,{distinct_id:t.distinct_id})}catch(n){}var r=et(t,JSON.parse(eN.get(e)||"{}"));return eN.set(e,r),r}catch(i){}return null},set:function(e,t,n,r,i){try{eN.set(e,t),t.distinct_id&&eM.set(e,{distinct_id:t.distinct_id},n,r,i)}catch(o){eN.error(o)}},remove:function(e,t){try{window.localStorage.removeItem(e),eM.remove(e,t)}catch(n){eN.error(n)}}}),eL={},eq={is_supported:function(){return!0},error:function(e){X.error("memoryStorage error: "+e)},get:function(e){return eL[e]||null},parse:function(e){return eL[e]||null},set:function(e,t){eL[e]=t},remove:function(e){delete eL[e]}},eB=null,eU={is_supported:function(){if(null!==eB)return eB;if(eB=!0,"undefined"!=typeof window)try{var e="__support__";eU.set(e,"xyz"),'"xyz"'!==eU.get(e)&&(eB=!1),eU.remove(e)}catch(t){eB=!1}else eB=!1;return eB},error:function(e){L.DEBUG&&X.error("sessionStorage error: ",e)},get:function(e){try{return window.sessionStorage.getItem(e)}catch(t){eU.error(t)}return null},parse:function(e){try{return JSON.parse(eU.get(e))||null}catch(t){}return null},set:function(e,t){try{window.sessionStorage.setItem(e,JSON.stringify(t))}catch(n){eU.error(n)}},remove:function(e){try{window.sessionStorage.removeItem(e)}catch(t){eU.error(t)}}},eQ="$people_distinct_id",ez="__alias",e$="__timers",eH="$autocapture_disabled_server_side",eW="$session_recording_enabled_server_side",eG="$console_log_recording_enabled_server_side",eY="$session_recording_recorder_version_server_side",eJ="$sesid",eX="$enabled_feature_flags",eZ="$user_state",eK=[eQ,ez,"__cmpns",e$,eW,eJ,eX,eZ],e0=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"],e1=function(){function e(t){b(this,e);var n="";t.token&&(n=t.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),this.props={},this.campaign_params_saved=!1,t.persistence_name?this.name="ph_"+t.persistence_name:this.name="ph_"+n+"_posthog",-1===e0.indexOf(t.persistence.toLowerCase())&&(X.critical("Unknown persistence type "+t.persistence+"; falling back to cookie"),t.persistence="cookie");var r=t.persistence.toLowerCase();"localstorage"===r&&eN.is_supported()?this.storage=eN:"localstorage+cookie"===r&&eV.is_supported()?this.storage=eV:"sessionstorage"===r&&eU.is_supported()?this.storage=eU:this.storage="memory"===r?eq:eM,this.user_state="anonymous",this.load(),this.update_config(t),this.save()}return E(e,[{key:"properties",value:function(){var e={};return K(this.props,function(t,n){if(n===eX&&"object"===_(t))for(var r,i=Object.keys(t),o=0;o<i.length;o++)e["$feature/".concat(i[o])]=t[i[o]];else r=!1,(null===eK?r:Y&&eK.indexOf===Y?-1!=eK.indexOf(n):(K(eK,function(e){if(r||(r=e===n))return J}),r))||(e[n]=t)}),e}},{key:"load",value:function(){if(!this.disabled){var e=this.storage.parse(this.name);e&&(this.props=et({},e))}}},{key:"save",value:function(){this.disabled||this.storage.set(this.name,this.props,this.expire_days,this.cross_subdomain,this.secure)}},{key:"remove",value:function(){this.storage.remove(this.name,!1),this.storage.remove(this.name,!0)}},{key:"clear",value:function(){this.remove(),this.props={}}},{key:"register_once",value:function(e,t,n){var r=this;if(eo(e)){void 0===t&&(t="None"),this.expire_days=void 0===n?this.default_expiry:n;var i=!1;if(K(e,function(e,n){r.props.hasOwnProperty(n)&&r.props[n]!==t||(r.props[n]=e,i=!0)}),i)return this.save(),!0}return!1}},{key:"register",value:function(e,t){var n=this;if(eo(e)){this.expire_days=void 0===t?this.default_expiry:t;var r=!1;if(K(e,function(t,i){e.hasOwnProperty(i)&&n.props[i]!==t&&(n.props[i]=t,r=!0)}),r)return this.save(),!0}return!1}},{key:"unregister",value:function(e){e in this.props&&(delete this.props[e],this.save())}},{key:"update_campaign_params",value:function(){this.campaign_params_saved||(this.register(eb.campaignParams()),this.campaign_params_saved=!0)}},{key:"update_search_keyword",value:function(){this.register(eb.searchInfo())}},{key:"update_referrer_info",value:function(){this.register({$referrer:this.props.$referrer||eb.referrer(),$referring_domain:this.props.$referring_domain||eb.referringDomain()})}},{key:"get_referrer_info",value:function(){return el({$referrer:this.props.$referrer,$referring_domain:this.props.$referring_domain})}},{key:"safe_merge",value:function(e){return K(this.props,function(t,n){n in e||(e[n]=t)}),e}},{key:"update_config",value:function(e){this.default_expiry=this.expire_days=e.cookie_expiration,this.set_disabled(e.disable_persistence),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie)}},{key:"set_disabled",value:function(e){this.disabled=e,this.disabled?this.remove():this.save()}},{key:"set_cross_subdomain",value:function(e){e!==this.cross_subdomain&&(this.cross_subdomain=e,this.remove(),this.save())}},{key:"get_cross_subdomain",value:function(){return!!this.cross_subdomain}},{key:"set_secure",value:function(e){e!==this.secure&&(this.secure=e,this.remove(),this.save())}},{key:"set_event_timer",value:function(e,t){var n=this.props[e$]||{};n[e]=t,this.props[e$]=n,this.save()}},{key:"remove_event_timer",value:function(e){var t=(this.props[e$]||{})[e];return ea(t)||(delete this.props[e$][e],this.save()),t}},{key:"get_user_state",value:function(){return this.props[eZ]||"anonymous"}},{key:"set_user_state",value:function(e){this.props[eZ]=e,this.save()}}]),e}(),e2={_initializedTokens:[],_isAutocaptureEnabled:!1,_setIsAutocaptureEnabled:function(e){var t=!!e.get_property(eH),n=!!e.get_config("autocapture");this._isAutocaptureEnabled=n&&!t},_previousElementSibling:function(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do t=t.previousSibling;while(t&&!ek(t));return t},_getAugmentPropertiesFromElement:function(e){if(!eP(e))return{};var t={};return K(e.attributes,function(e){if(e.name.startsWith("data-ph-capture-attribute")){var n=e.name.replace("data-ph-capture-attribute-",""),r=e.value;n&&r&&eD(r)&&(t[n]=r)}}),t},_getPropertiesFromElement:function(e,t,n){var r=e.tagName.toLowerCase(),i={tag_name:r};eT.indexOf(r)>-1&&!n&&("a"===r.toLowerCase()||"button"===r.toLowerCase()?i.$el_text=eR(e):i.$el_text=eE(e));var o=ew(e);o.length>0&&(i.classes=o.split(" ").filter(function(e){return""!==e})),K(e.attributes,function(n){var r;eA(e)&&-1===["name","id","class"].indexOf(n.name)||!t&&eD(n.value)&&("string"!=typeof(r=n.name)||"_ngcontent"!==r.substring(0,10)&&"_nghost"!==r.substring(0,7))&&(i["attr__"+n.name]=n.value)});for(var a=1,s=1,u=e;u=this._previousElementSibling(u);)a++,u.tagName===e.tagName&&s++;return i.nth_child=a,i.nth_of_type=s,i},_getDefaultProperties:function(e){return{$event_type:e,$ce_version:1}},_extractCustomPropertyValue:function(e){var t=[];return K(document.querySelectorAll(e.css_selector),function(e){var n;["input","select"].indexOf(e.tagName.toLowerCase())>-1?n=e.value:e.textContent&&(n=e.textContent),eD(n)&&t.push(n)}),t.join(", ")},_getCustomProperties:function(e){var t=this,n={};return K(this._customProperties,function(r){K(r.event_selectors,function(i){K(document.querySelectorAll(i),function(i){ei(e,i)&&eP(i)&&(n[r.name]=t._extractCustomPropertyValue(r))})})}),n},_getEventTarget:function(e){var t;return void 0===e.target?e.srcElement||null:null!==(t=e.target)&&void 0!==t&&t.shadowRoot?e.composedPath()[0]||null:e.target||null},_captureEvent:function(e,t){var n,r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"$autocapture",o=this._getEventTarget(e);if(ex(o)&&(o=o.parentNode||null),"$autocapture"===i&&"click"===e.type&&e instanceof MouseEvent&&null!==(n=this.rageclicks)&&void 0!==n&&n.isRageClick(e.clientX,e.clientY,(new Date).getTime())&&this._captureEvent(e,t,"$rageclick"),o&&function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;if(!e||eS(e,"html")||!ek(e))return!1;if(null!=n&&n.url_allowlist){var r=window.location.href,i=n.url_allowlist;if(i&&!i.some(function(e){return r.match(e)}))return!1}if(null!=n&&n.dom_event_allowlist){var o=n.dom_event_allowlist;if(o&&!o.some(function(e){return t.type===e}))return!1}if(null!=n&&n.element_allowlist){var a=n.element_allowlist;if(a&&!a.some(function(t){return e.tagName.toLowerCase()===t}))return!1}if(null!=n&&n.css_selector_allowlist){var s=n.css_selector_allowlist;if(s&&!s.some(function(t){return e.matches(t)}))return!1}for(var u=!1,c=[e],l=!0,f=e;f.parentNode&&!eS(f,"body");)if(eO(f.parentNode))c.push(f.parentNode.host),f=f.parentNode.host;else{if(!(l=f.parentNode||!1))break;if(eT.indexOf(l.tagName.toLowerCase())>-1)u=!0;else{var p=window.getComputedStyle(l);p&&"pointer"===p.getPropertyValue("cursor")&&(u=!0)}c.push(l),f=l}var d=window.getComputedStyle(e);if(d&&"pointer"===d.getPropertyValue("cursor")&&"click"===t.type)return!0;var h=e.tagName.toLowerCase();switch(h){case"html":return!1;case"form":return"submit"===t.type;case"input":case"select":case"textarea":return"change"===t.type||"click"===t.type;default:return u?"click"===t.type:"click"===t.type&&(eT.indexOf(h)>-1||"true"===e.getAttribute("contenteditable"))}}(o,e,this.config)){for(var a=[o],s=o;s.parentNode&&!eS(s,"body");)eO(s.parentNode)?(a.push(s.parentNode.host),s=s.parentNode.host):(a.push(s.parentNode),s=s.parentNode);var u,c=[],l={},f=!1;if(K(a,function(e){var n=eP(e);"a"===e.tagName.toLowerCase()&&(u=e.getAttribute("href"),u=n&&eD(u)&&u),ei(ew(e).split(" "),"ph-no-capture")&&(f=!0),c.push(r._getPropertiesFromElement(e,t.get_config("mask_all_element_attributes"),t.get_config("mask_all_text"))),et(l,r._getAugmentPropertiesFromElement(e))}),t.get_config("mask_all_text")||("a"===o.tagName.toLowerCase()||"button"===o.tagName.toLowerCase()?c[0].$el_text=eR(o):c[0].$el_text=eE(o)),u&&(c[0].attr__href=u),f)return!1;var p=et(this._getDefaultProperties(e.type),{$elements:c},this._getCustomProperties(a),l);return t.capture(i,p),!0}},_navigate:function(e){window.location.href=e},_addDomEventHandlers:function(e){var t=this,n=function(n){n=n||window.event,t._captureEvent(n,e)};e_(document,"submit",n,!1,!0),e_(document,"change",n,!1,!0),e_(document,"click",n,!1,!0)},_customProperties:[],rageclicks:null,config:void 0,init:function(e){var t;"boolean"!=typeof e.__autocapture&&(this.config=e.__autocapture),null!==(t=this.config)&&void 0!==t&&t.url_allowlist&&(this.config.url_allowlist=this.config.url_allowlist.map(function(e){return RegExp(e)})),this.rageclicks=new eI(e.get_config("rageclick"))},afterDecideResponse:function(e,t){this._setIsAutocaptureEnabled(t);var n=t.get_config("token");this._initializedTokens.indexOf(n)>-1?X.log('autocapture already initialized for token "'+n+'"'):(t.persistence&&t.persistence.register(k({},eH,!!e.autocapture_opt_out)),this._initializedTokens.push(n),e&&e.config&&e.config.enable_collect_everything&&this._isAutocaptureEnabled?(e.custom_properties&&(this._customProperties=e.custom_properties),this._addDomEventHandlers(t)):t.__autocapture=!1)},enabledForProject:function(e,t,n){if(!e)return!0;t=ea(t)?10:t,n=ea(n)?10:n;for(var r=0,i=0;i<e.length;i++)r+=e.charCodeAt(i);return r%t<n},isBrowserSupported:function(){return er(document.querySelectorAll)}};function e3(e,t){tt(!0,e,t)}function e5(e,t){tt(!1,e,t)}function e6(e,t){return"1"===te(e,t)}function e8(e,t){return!!function(e){if(e&&e.respectDnt){var t=e&&e.window||z,n=t.navigator||{},r=!1;return K([n.doNotTrack,n.msDoNotTrack,t.doNotTrack],function(e){ei([!0,1,"1","yes"],e)&&(r=!0)}),r}return!1}(t)||"0"===te(e,t)}function e4(e,t){e9(t=t||{}).remove(e7(e,t),!!t.crossSubdomainCookie)}function e9(e){return"localStorage"===(e=e||{}).persistenceType?eN:"localStorage+cookie"===e.persistenceType?eV:eM}function e7(e,t){return((t=t||{}).persistencePrefix||"__ph_opt_in_out_")+e}function te(e,t){return e9(t).get(e7(e,t))}function tt(e,t,n){var r;es(t)&&t.length?(e9(n=n||{}).set(e7(t,n),e?1:0,(r=n.cookieExpiration,"[object Number]"==U.call(r))?n.cookieExpiration:null,n.crossSubdomainCookie,n.secureCookie),n.capture&&e&&n.capture(n.captureEventName||"$opt_in",n.captureProperties||{},{send_instantly:!0})):console.error("gdpr."+(e?"optIn":"optOut")+" called with an invalid token")}function tn(e,t){var n=!1;try{var r=e.get_config("token"),i=e.get_config("respect_dnt"),o=e.get_config("opt_out_capturing_persistence_type"),a=e.get_config("opt_out_capturing_cookie_prefix")||void 0,s=e.get_config("window");r&&(n=e8(r,{respectDnt:i,persistenceType:o,persistencePrefix:a,window:s}))}catch(u){t||console.error("Unexpected error when checking capturing opt-out status: "+u)}return n}function tr(e,t,n){return function(){for(var r=tn(e,n),i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];if(!r)return t.apply(this,o);var s=o[o.length-1];"function"==typeof s&&s(0)}}!function(e){for(var t in e)"function"==typeof e[t]&&(e[t]=e[t].bind(e))}(e2),function(e){for(var t in e)"function"==typeof e[t]&&(e[t]=ec(e[t]))}(e2);var ti="$set",to=function(){function e(t){var n=this;b(this,e),this._posthog=t,this.set=tr(t,function(e,t,r){var i=n.set_action(e,t);return eo(e)&&(r=t),n._get_config("save_referrer")&&n._posthog.sessionPersistence.update_referrer_info(),i[ti]=et({},eb.people_properties(),n._posthog.sessionPersistence.get_referrer_info(),i[ti]),n._send_request(i,r)}),this.set_once=tr(t,function(e,t,r){var i=n.set_once_action(e,t);return eo(e)&&(r=t),n._send_request(i,r)})}return E(e,[{key:"toString",value:function(){return this._posthog.toString()+".people"}},{key:"_send_request",value:function(e,t){e.$token=this._get_config("token"),e.$distinct_id=this._posthog.get_distinct_id();var n=this._posthog.get_property("$device_id"),r=this._posthog.get_property("$user_id"),i=this._posthog.get_property("$had_persisted_distinct_id");n&&(e.$device_id=n),r&&(e.$user_id=r),i&&(e.$had_persisted_distinct_id=i);var o=function e(t){return K(t,function(n,r){"[object Date]"!=U.call(n)?eo(n)&&(t[r]=e(n)):t[r]=eu(n)}),t}(e),a=ep(o,this._get_config("properties_string_max_length")),s=ed(JSON.stringify(o));return this._posthog._send_request(this._get_config("api_host")+"/engage/",{data:s},{},this._posthog._prepare_callback(t,a)),a}},{key:"_get_config",value:function(e){return this._posthog.get_config(e)}},{key:"_is_reserved_property",value:function(e){return"$distinct_id"===e||"$token"===e||"$device_id"===e||"$user_id"===e||"$had_persisted_distinct_id"===e}},{key:"set_action",value:function(e,t){return this.apiActionParser(ti,e,t)}},{key:"set_once_action",value:function(e,t){return this.apiActionParser("$set_once",e,t)}},{key:"apiActionParser",value:function(e,t,n){var r=this,i={},o={};return eo(t)?K(t,function(e,t){r._is_reserved_property(t)||(o[t]=e)}):o[t]=n,i[e]=o,i}}]),e}(),ta="$active_feature_flags",ts="$enabled_feature_flags",tu="$override_feature_flags",tc="$feature_flag_payloads",tl=function(){function e(t){b(this,e),this.instance=t,this._override_warning=!1,this.flagCallReported={},this.featureFlagEventHandlers=[],this.reloadFeatureFlagsQueued=!1,this.reloadFeatureFlagsInAction=!1}return E(e,[{key:"getFlags",value:function(){return Object.keys(this.getFlagVariants())}},{key:"getFlagVariants",value:function(){var e=this.instance.get_property(ts),t=this.instance.get_property(tu);if(!t)return e||{};for(var n=et({},e),r=Object.keys(t),i=0;i<r.length;i++)!1===t[r[i]]?delete n[r[i]]:n[r[i]]=t[r[i]];return this._override_warning||(console.warn("[PostHog] Overriding feature flags!",{enabledFlags:e,overriddenFlags:t,finalFlags:n}),this._override_warning=!0),n}},{key:"getFlagPayloads",value:function(){return this.instance.get_property(tc)||{}}},{key:"reloadFeatureFlags",value:function(){this.reloadFeatureFlagsQueued||(this.reloadFeatureFlagsQueued=!0,this._startReloadTimer())}},{key:"setAnonymousDistinctId",value:function(e){this.$anon_distinct_id=e}},{key:"setReloadingPaused",value:function(e){this.reloadFeatureFlagsInAction=e}},{key:"resetRequestQueue",value:function(){this.reloadFeatureFlagsQueued=!1}},{key:"_startReloadTimer",value:function(){var e=this;this.reloadFeatureFlagsQueued&&!this.reloadFeatureFlagsInAction&&setTimeout(function(){!e.reloadFeatureFlagsInAction&&e.reloadFeatureFlagsQueued&&(e.reloadFeatureFlagsQueued=!1,e._reloadFeatureFlagsRequest())},5)}},{key:"_reloadFeatureFlagsRequest",value:function(){var e=this;this.setReloadingPaused(!0);var t=ed(JSON.stringify({token:this.instance.get_config("token"),distinct_id:this.instance.get_distinct_id(),groups:this.instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id}));this.instance._send_request(this.instance.get_config("api_host")+"/decide/?v=3",{data:t},{method:"POST"},this.instance._prepare_callback(function(t){e.$anon_distinct_id=void 0,e.receivedFeatureFlags(t),e.setReloadingPaused(!1),e._startReloadTimer()}))}},{key:"getFeatureFlag",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.getFlags())return console.warn('getFeatureFlag for key "'+e+"\" failed. Feature flags didn't load in time."),!1;var n=this.getFlagVariants()[e];return!t.send_event&&"send_event"in t||this.flagCallReported[e]||(this.flagCallReported[e]=!0,this.instance.capture("$feature_flag_called",{$feature_flag:e,$feature_flag_response:n})),n}},{key:"getFeatureFlagPayload",value:function(e){return this.getFlagPayloads()[e]}},{key:"isFeatureEnabled",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.getFlags()?!!this.getFeatureFlag(e,t):(console.warn('isFeatureEnabled for key "'+e+"\" failed. Feature flags didn't load in time."),!1)}},{key:"addFeatureFlagsHandler",value:function(e){this.featureFlagEventHandlers.push(e)}},{key:"removeFeatureFlagsHandler",value:function(e){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter(function(t){return t!==e})}},{key:"receivedFeatureFlags",value:function(e){this.instance.decideEndpointWasHit=!0;var t=this.getFlagVariants(),n=this.getFlagPayloads();!function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=e.featureFlags,o=e.featureFlagPayloads;if(i){if(Array.isArray(i)){var a,s={};if(i)for(var u=0;u<i.length;u++)s[i[u]]=!0;t&&t.register((k(a={},ta,i),k(a,ts,s),a))}else{var c,l=i,f=o;e.errorsWhileComputingFlags&&(l=g(g({},n),l),f=g(g({},r),f)),t&&t.register((k(c={},ta,Object.keys(l||{})),k(c,ts,l||{}),k(c,tc,f||{}),c))}}else t&&(t.unregister(ta),t.unregister(ts),t.unregister(tc))}(e,this.instance.persistence,t,n);var r=this._prepareFeatureFlagsForCallbacks(),i=r.flags,o=r.flagVariants;this.featureFlagEventHandlers.forEach(function(e){return e(i,o)})}},{key:"override",value:function(e){if(this._override_warning=!1,!1===e)this.instance.persistence.unregister(tu);else if(Array.isArray(e)){for(var t={},n=0;n<e.length;n++)t[e[n]]=!0;this.instance.persistence.register(k({},tu,t))}else this.instance.persistence.register(k({},tu,e))}},{key:"onFeatureFlags",value:function(e){var t=this;if(this.addFeatureFlagsHandler(e),this.instance.decideEndpointWasHit){var n=this._prepareFeatureFlagsForCallbacks();e(n.flags,n.flagVariants)}return function(){return t.removeFeatureFlagsHandler(e)}}},{key:"_prepareFeatureFlagsForCallbacks",value:function(){var e=this.getFlags(),t=this.getFlagVariants();return{flags:e.filter(function(e){return t[e]}),flagVariants:Object.keys(t).filter(function(e){return t[e]}).reduce(function(e,n){return e[n]=t[n],e},{})}}}]),e}(),tf=function(){function e(t){b(this,e),this.instance=t,this.captureStarted=!1,this.snapshots=[],this.emit=!1,this.endpoint="/e/",this.stopRrweb=void 0,this.windowId=null,this.sessionId=null,this.receivedDecide=!1}return E(e,[{key:"startRecordingIfEnabled",value:function(){this.isRecordingEnabled()?this.startCaptureAndTrySendingQueuedSnapshots():this.stopRecording()}},{key:"started",value:function(){return this.captureStarted}},{key:"stopRecording",value:function(){this.captureStarted&&this.stopRrweb&&(this.stopRrweb(),this.stopRrweb=void 0,this.captureStarted=!1)}},{key:"isRecordingEnabled",value:function(){var e=!!this.instance.get_property(eW),t=!this.instance.get_config("disable_session_recording");return e&&t}},{key:"isConsoleLogCaptureEnabled",value:function(){var e=!!this.instance.get_property(eG),t=this.instance.get_config("enable_recording_console_log");return null!=t?t:e}},{key:"getRecordingVersion",value:function(){var e,t=this.instance.get_property(eY);return(null===(e=this.instance.get_config("session_recording"))||void 0===e?void 0:e.recorderVersion)||t||"v1"}},{key:"afterDecideResponse",value:function(e){var t,n,r,i,o,a;this.receivedDecide=!0,this.instance.persistence&&this.instance.persistence.register((k(o={},eW,!!e.sessionRecording),k(o,eG,null===(r=e.sessionRecording)||void 0===r?void 0:r.consoleLogRecordingEnabled),k(o,eY,null===(i=e.sessionRecording)||void 0===i?void 0:i.recorderVersion),o)),null!==(t=e.sessionRecording)&&void 0!==t&&t.endpoint&&(this.endpoint=null===(a=e.sessionRecording)||void 0===a?void 0:a.endpoint),null!==(n=e.sessionRecording)&&void 0!==n&&n.recorderVersion&&(this.recorderVersion=e.sessionRecording.recorderVersion),this.startRecordingIfEnabled()}},{key:"startCaptureAndTrySendingQueuedSnapshots",value:function(){var e=this;this.receivedDecide&&(this.emit=!0,this.snapshots.forEach(function(t){return e._captureSnapshot(t)})),this._startCapture()}},{key:"_startCapture",value:function(){if(void 0!==Object.assign&&!this.captureStarted&&!this.instance.get_config("disable_session_recording")){this.captureStarted=!0;var e="v2"===this.getRecordingVersion()?"recorder-v2.js":"recorder.js";this.instance.__loaded_recorder_version!==this.getRecordingVersion()?eC(this.instance.get_config("api_host")+"/static/".concat(e,"?v=").concat(L.LIB_VERSION),this._onScriptLoaded.bind(this)):this._onScriptLoaded()}}},{key:"_updateWindowAndSessionIds",value:function(e){var t,n,r=3===e.type&&0===(null===(n=e.data)||void 0===n?void 0:n.source),i=this.instance.sessionManager.checkAndGetSessionAndWindowId(r,e.timestamp),o=i.windowId,a=i.sessionId;if(this.captureStarted&&(this.windowId!==o||this.sessionId!==a)&&-1===[2,4].indexOf(e.type))try{null===(t=this.rrwebRecord)||void 0===t||t.takeFullSnapshot()}catch(s){X.error("Error taking full snapshot.",s)}this.windowId=o,this.sessionId=a}},{key:"_onScriptLoaded",value:function(){var e=this,t={blockClass:"ph-no-capture",blockSelector:void 0,ignoreClass:"ph-ignore-input",maskAllInputs:!0,maskInputOptions:{},maskInputFn:void 0,slimDOMOptions:{},collectFonts:!1,inlineStylesheet:!0};this.rrwebRecord=window.rrweb?window.rrweb.record:window.rrwebRecord;for(var n=this.instance.get_config("session_recording"),r=0,i=Object.entries(n||{});r<i.length;r++){var o=P(i[r],2),a=o[0],s=o[1];a in t&&(t[a]=s)}this.rrwebRecord?(this.stopRrweb=this.rrwebRecord(g({emit:function(t){t=function(e){if(e&&"object"===_(e)&&6===e.type&&"object"===_(e.data)&&"rrweb/console@1"===e.data.plugin){e.data.payload.payload.length>10&&(e.data.payload.payload=e.data.payload.payload.slice(0,10),e.data.payload.payload.push("...[truncated]"));for(var t=[],n=0;n<e.data.payload.payload.length;n++)e.data.payload.payload[n]&&e.data.payload.payload[n].length>2e3?t.push(e.data.payload.payload[n].slice(0,2e3)+"...[truncated]"):t.push(e.data.payload.payload[n]);return e.data.payload.payload=t,e}return e}(function(e){if(e&&"object"===_(e)){var t=JSON.stringify(e);if(t.length>5e6){var n,r=R(t.matchAll(/data:([\w\/\-\.]+);(\w+),([^)"]*)/gim));try{for(r.s();!(n=r.n()).done;){var i=n.value;t="image/"===i[1].toLocaleLowerCase().slice(0,6)?t.replace(i[0],"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiBmaWxsPSJibGFjayIvPgo8cGF0aCBkPSJNOCAwSDE2TDAgMTZWOEw4IDBaIiBmaWxsPSIjMkQyRDJEIi8+CjxwYXRoIGQ9Ik0xNiA4VjE2SDhMMTYgOFoiIGZpbGw9IiMyRDJEMkQiLz4KPC9zdmc+Cg=="):t.replace(i[0],"")}}catch(o){r.e(o)}finally{r.f()}}return JSON.parse(t)}return e}(t)),e._updateWindowAndSessionIds(t);var n={$snapshot_data:t,$session_id:e.sessionId,$window_id:e.windowId};e.instance._captureMetrics.incr("rrweb-record"),e.instance._captureMetrics.incr("rrweb-record-".concat(t.type)),e.emit?e._captureSnapshot(n):e.snapshots.push(n)},plugins:window.rrwebConsoleRecord&&this.isConsoleLogCaptureEnabled()?[window.rrwebConsoleRecord.getRecordConsolePlugin()]:[]},t)),this.instance._addCaptureHook(function(t){try{var n;"$pageview"===t&&(null===(n=e.rrwebRecord)||void 0===n||n.addCustomEvent("$pageview",{href:window.location.href}))}catch(r){X.error("Could not add $pageview to rrweb session",r)}})):X.error("onScriptLoaded was called but rrwebRecord is not available. This indicates something has gone wrong.")}},{key:"_captureSnapshot",value:function(e){this.instance.capture("$snapshot",e,{transport:"XHR",method:"POST",endpoint:this.endpoint,_noTruncate:!0,_batchKey:"sessionRecording",_metrics:{rrweb_full_snapshot:2===e.$snapshot_data.type}})}}]),e}(),tp={entryType:0,timeOrigin:1,name:2,startTime:3,redirectStart:4,redirectEnd:5,workerStart:6,fetchStart:7,domainLookupStart:8,domainLookupEnd:9,connectStart:10,secureConnectionStart:11,connectEnd:12,requestStart:13,responseStart:14,responseEnd:15,decodedBodySize:16,encodedBodySize:17,initiatorType:18,nextHopProtocol:19,renderBlockingStatus:20,responseStatus:21,transferSize:22,element:23,renderTime:24,loadTime:25,size:26,id:27,url:28,domComplete:29,domContentLoadedEvent:30,domInteractive:31,loadEventEnd:32,loadEventStart:33,redirectCount:34,navigationType:35,unloadEventEnd:36,unloadEventStart:37,duration:39,timestamp:40},td=["first-input","navigation","paint","resource"],th=["/s/","/e/"],tv=function(){function e(t){b(this,e),this.instance=t}return E(e,[{key:"startObservingIfEnabled",value:function(){this.isEnabled()?this.startObserving():this.stopObserving()}},{key:"startObserving",value:function(){var e=this;if(!this.observer)try{this.observer=new PerformanceObserver(function(t){t.getEntries().forEach(function(t){e._capturePerformanceEvent(t)})}),PerformanceObserver.supportedEntryTypes.filter(function(e){return td.includes(e)}).forEach(function(t){var n;null===(n=e.observer)||void 0===n||n.observe({type:t,buffered:!0})})}catch(t){console.error("PostHog failed to start performance observer",t),this.stopObserving()}}},{key:"stopObserving",value:function(){this.observer&&(this.observer.disconnect(),this.observer=void 0)}},{key:"isObserving",value:function(){return!!this.observer}},{key:"isEnabled",value:function(){var e,t;return null!==(e=null!==(t=this.instance.get_config("capture_performance"))&&void 0!==t?t:this.remoteEnabled)&&void 0!==e&&e}},{key:"afterDecideResponse",value:function(e){this.remoteEnabled=e.capturePerformance||!1,this.isEnabled()&&this.startObserving()}},{key:"_capturePerformanceEvent",value:function(e){if(e.name.startsWith(this.instance.get_config("api_host"))){var t=e.name.replace(this.instance.get_config("api_host"),"");if(th.find(function(e){return t.startsWith(e)}))return}var n=e.toJSON(),r={},i=Math.floor(Date.now()-performance.now());for(var o in r[tp.timeOrigin]=i,r[tp.timestamp]=Math.floor(i+e.startTime),tp)void 0!==n[o]&&(r[tp[o]]=n[o]);if(this.capturePerformanceEvent(r),tm(e)){var a,s=R(e.serverTiming||[]);try{for(s.s();!(a=s.n()).done;){var u,c=a.value;this.capturePerformanceEvent((k(u={},tp.timeOrigin,i),k(u,tp.timestamp,Math.floor(i+e.startTime)),k(u,tp.name,c.name),k(u,tp.duration,c.duration),k(u,tp.entryType,"serverTiming"),u))}}catch(l){s.e(l)}finally{s.f()}}}},{key:"capturePerformanceEvent",value:function(e){this.instance.capture("$performance_event",e,{transport:"XHR",method:"POST",endpoint:"/e/",_noTruncate:!0,_batchKey:"performanceEvent"})}}]),e}(),tm=function(e){return"navigation"===e.entryType||"resource"===e.entryType},ty=function(){function e(t){b(this,e),this.instance=t,this.instance.decideEndpointWasHit=this.instance._hasBootstrappedFeatureFlags()}return E(e,[{key:"call",value:function(){var e=this,t=ed(JSON.stringify({token:this.instance.get_config("token"),distinct_id:this.instance.get_distinct_id(),groups:this.instance.getGroups()}));this.instance._send_request("".concat(this.instance.get_config("api_host"),"/decide/?v=3"),{data:t,verbose:!0},{method:"POST"},function(t){return e.parseDecideResponse(t)})}},{key:"parseDecideResponse",value:function(e){var t,n,r=this;if(0!==(null==e?void 0:e.status)){if(this.instance.decideEndpointWasHit=!0,!document||!document.body)return console.log("document not ready yet, trying again in 500 milliseconds..."),void setTimeout(function(){r.parseDecideResponse(e)},500);if(this.instance.toolbar.afterDecideResponse(e),null===(t=this.instance.sessionRecording)||void 0===t||t.afterDecideResponse(e),e2.afterDecideResponse(e,this.instance),null===(n=this.instance.webPerformance)||void 0===n||n.afterDecideResponse(e),this.instance.featureFlags.receivedFeatureFlags(e),this.instance.compression={},e.supportedCompression&&!this.instance.get_config("disable_compression")){var i,o={},a=R(e.supportedCompression);try{for(a.s();!(i=a.n()).done;)o[i.value]=!0}catch(s){a.e(s)}finally{a.f()}this.instance.compression=o}if(e.siteApps){if(this.instance.get_config("opt_in_site_apps")){var u,c=this.instance.get_config("api_host"),l=R(e.siteApps);try{for(l.s();!(u=l.n()).done;)(function(){var e=u.value,t=e.id,n=e.url,i=document.createElement("script");i.src=[c,"/"===c[c.length-1]&&"/"===n[0]?n.substring(1):n].join(""),i.onerror=function(e){console.error("Error while initializing PostHog app with config id ".concat(t),e)},window["__$$ph_site_app_".concat(t)]=r.instance,document.body.appendChild(i)})()}catch(f){l.e(f)}finally{l.f()}}else e.siteApps.length>0&&console.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}}else console.error("Failed to fetch feature flags from PostHog.")}}]),e}(),tg=["https://app.posthog.com","https://eu.posthog.com"],t_=["source"],tb=function(){function e(t){b(this,e),this.instance=t}return E(e,[{key:"afterDecideResponse",value:function(e){var t=e.toolbarParams||e.editorParams||(e.toolbarVersion?{toolbarVersion:e.toolbarVersion}:{});e.isAuthenticated&&t.toolbarVersion&&0===t.toolbarVersion.indexOf("toolbar")&&this.loadToolbar(g(g({},t),{},{apiURL:this.instance.get_config("api_host")}))}},{key:"maybeLoadToolbar",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window.history;try{if(!t){try{window.localStorage.setItem("test","test"),window.localStorage.removeItem("test")}catch(r){return!1}t=window.localStorage}var i,o=eg(e.hash,"__posthog")||eg(e.hash,"state"),a=o?JSON.parse(decodeURIComponent(o)):null;return a&&"ph_authorize"===a.action?((i=a).source="url",i&&Object.keys(i).length>0&&(a.desiredHash?e.hash=a.desiredHash:n?n.replaceState("",document.title,e.pathname+e.search):e.hash="")):((i=JSON.parse(t.getItem("_postHogToolbarParams")||"{}")).source="localstorage",delete i.userIntent),i.apiURL||(i.apiURL=this.instance.get_config("api_host")),!(!i.token||this.instance.get_config("token")!==i.token)&&(this.loadToolbar(i),!0)}catch(s){return!1}}},{key:"loadToolbar",value:function(e){var t=this;if(window._postHogToolbarLoaded)return!1;window._postHogToolbarLoaded=!0;var n=(null==e?void 0:e.apiURL)||this.instance.get_config("api_host"),r=3e4*Math.floor(Date.now()/3e4),i="".concat(n).concat(n.endsWith("/")?"":"/","static/toolbar.js?_ts=").concat(r),o=!tg.includes(this.instance.get_config("api_host"))&&this.instance.get_config("advanced_disable_toolbar_metrics"),a=g(g({apiURL:n,jsURL:n,token:this.instance.get_config("token")},e),o?{instrument:!1}:{});a.source;var s=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(a,t_);return window.localStorage.setItem("_postHogToolbarParams",JSON.stringify(s)),eC(i,function(){(window.ph_load_toolbar||window.ph_load_editor)(a,t.instance)}),e_(window,"turbolinks:load",function(){window._postHogToolbarLoaded=!1,t.loadToolbar(a)}),!0}},{key:"_loadEditor",value:function(e){return this.loadToolbar(e)}},{key:"maybeLoadEditor",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window.history;return this.maybeLoadToolbar(e,t,n)}}]),e}(),tw=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3e3;b(this,e),this.isPolling=!0,this._event_queue=[],this._empty_queue_count=0,this._poller=void 0,this._pollInterval=t}return E(e,[{key:"setPollInterval",value:function(e){this._pollInterval=e,this.isPolling&&this.poll()}},{key:"poll",value:function(){}},{key:"unload",value:function(){}},{key:"getTime",value:function(){return(new Date).getTime()}}]),e}(),tE=function(e){S(n,tw);var t=T(n);function n(e,r){var i,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3e3;return b(this,n),(i=t.call(this,o)).handlePollRequest=r,i.captureMetrics=e,i}return E(n,[{key:"enqueue",value:function(e,t,n){this.captureMetrics.incr("batch-enqueue"),this._event_queue.push({url:e,data:t,options:n}),this.isPolling||(this.isPolling=!0,this.poll())}},{key:"poll",value:function(){var e=this;clearTimeout(this._poller),this._poller=setTimeout(function(){if(e._event_queue.length>0){var t=e.formatQueue();for(var n in t)(function(n){var r=t[n],i=r.url,o=r.data,a=r.options;K(o,function(t,n){o[n].offset=Math.abs(o[n].timestamp-e.getTime()),delete o[n].timestamp}),e.handlePollRequest(i,o,a),e.captureMetrics.incr("batch-requests"),e.captureMetrics.incr("batch-requests-".concat(i.slice(i.length-2))),e.captureMetrics.incr("batch-handle",o.length),e.captureMetrics.incr("batch-handle-".concat(i.slice(i.length-2)),o.length)})(n);e._event_queue.length=0,e._empty_queue_count=0}else e._empty_queue_count++;e._empty_queue_count>4&&(e.isPolling=!1,e._empty_queue_count=0),e.isPolling&&e.poll()},this._pollInterval)}},{key:"updateUnloadMetrics",value:function(){var e=this.formatQueue();for(var t in e){var n=e[t],r=n.url,i=n.data;this.captureMetrics.incr("batch-unload-requests"),this.captureMetrics.incr("batch-unload-requests-".concat(r.slice(r.length-2))),this.captureMetrics.incr("batch-unload",i.length),this.captureMetrics.incr("batch-unload-".concat(r.slice(r.length-2)),i.length)}}},{key:"unload",value:function(){var e=this;clearTimeout(this._poller);var t=this._event_queue.length>0?this.formatQueue():{};this._event_queue.length=0;var n=Object.values(t);[].concat(A(n.filter(function(e){return 0===e.url.indexOf("/e")})),A(n.filter(function(e){return 0!==e.url.indexOf("/e")}))).map(function(t){var n=t.url,r=t.data,i=t.options;e.handlePollRequest(n,r,g(g({},i),{},{transport:"sendBeacon"}))})}},{key:"formatQueue",value:function(){var e={};return K(this._event_queue,function(t){var n=t.url,r=t.data,i=t.options,o=(i?i._batchKey:null)||n;void 0===e[o]&&(e[o]={data:[],url:n,options:i}),i&&e[o].options&&e[o].options._metrics&&!e[o].options._metrics.rrweb_full_snapshot&&(e[o].options._metrics.rrweb_full_snapshot=i._metrics.rrweb_full_snapshot),e[o].data.push(r)}),e}}]),n}(),tk=function(){function e(t){b(this,e),this.enabled=t,this.metrics={}}return E(e,[{key:"incr",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.enabled&&(e="phjs-".concat(e),this.metrics[e]=(this.metrics[e]||0)+t)}},{key:"decr",value:function(e){this.enabled&&(e="phjs-".concat(e),this.metrics[e]=(this.metrics[e]||0)-1)}}]),e}(),tS=Uint8Array,tx=Uint16Array,tO=Uint32Array,tT=new tS([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),tP=new tS([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),tA=new tS([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),tD=function(e,t){for(var n=new tx(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];var i=new tO(n[30]);for(r=1;r<30;++r)for(var o=n[r];o<n[r+1];++o)i[o]=o-n[r]<<5|r;return[n,i]},tC=tD(tT,2),tR=tC[0],tI=tC[1];tR[28]=258,tI[258]=28;for(var tF=tD(tP,0)[1],tM=new tx(32768),tj=0;tj<32768;++tj){var tN=(43690&tj)>>>1|(21845&tj)<<1;tN=(61680&(tN=(52428&tN)>>>2|(13107&tN)<<2))>>>4|(3855&tN)<<4,tM[tj]=((65280&tN)>>>8|(255&tN)<<8)>>>1}var tV=function(e,t,n){for(var r=e.length,i=0,o=new tx(t);i<r;++i)++o[e[i]-1];var a,s=new tx(t);for(i=0;i<t;++i)s[i]=s[i-1]+o[i-1]<<1;if(n){a=new tx(1<<t);var u=15-t;for(i=0;i<r;++i)if(e[i])for(var c=i<<4|e[i],l=t-e[i],f=s[e[i]-1]++<<l,p=f|(1<<l)-1;f<=p;++f)a[tM[f]>>>u]=c}else for(a=new tx(r),i=0;i<r;++i)a[i]=tM[s[e[i]-1]++]>>>15-e[i];return a},tL=new tS(288);for(tj=0;tj<144;++tj)tL[tj]=8;for(tj=144;tj<256;++tj)tL[tj]=9;for(tj=256;tj<280;++tj)tL[tj]=7;for(tj=280;tj<288;++tj)tL[tj]=8;var tq=new tS(32);for(tj=0;tj<32;++tj)tq[tj]=5;var tB,tU=tV(tL,9,0),tQ=tV(tq,5,0),tz=function(e){return(e/8>>0)+(7&e&&1)},t$=function(e,t,n){(null==t||t<0)&&(t=0),(null==n||n>e.length)&&(n=e.length);var r=new(e instanceof tx?tx:e instanceof tO?tO:tS)(n-t);return r.set(e.subarray(t,n)),r},tH=function(e,t,n){n<<=7&t;var r=t/8>>0;e[r]|=n,e[r+1]|=n>>>8},tW=function(e,t,n){n<<=7&t;var r=t/8>>0;e[r]|=n,e[r+1]|=n>>>8,e[r+2]|=n>>>16},tG=function(e,t){for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var i=n.length,o=n.slice();if(!i)return[new tS(0),0];if(1==i){var a=new tS(n[0].s+1);return a[n[0].s]=1,[a,1]}n.sort(function(e,t){return e.f-t.f}),n.push({s:-1,f:25001});var s=n[0],u=n[1],c=0,l=1,f=2;for(n[0]={s:-1,f:s.f+u.f,l:s,r:u};l!=i-1;)s=n[n[c].f<n[f].f?c++:f++],u=n[c!=l&&n[c].f<n[f].f?c++:f++],n[l++]={s:-1,f:s.f+u.f,l:s,r:u};var p=o[0].s;for(r=1;r<i;++r)o[r].s>p&&(p=o[r].s);var d=new tx(p+1),h=tY(n[l-1],d,0);if(h>t){r=0;var v=0,m=h-t,y=1<<m;for(o.sort(function(e,t){return d[t.s]-d[e.s]||e.f-t.f});r<i;++r){var g=o[r].s;if(!(d[g]>t))break;v+=y-(1<<h-d[g]),d[g]=t}for(v>>>=m;v>0;){var _=o[r].s;d[_]<t?v-=1<<t-d[_]++-1:++r}for(;r>=0&&v;--r){var b=o[r].s;d[b]==t&&(--d[b],++v)}h=t}return[new tS(d),h]},tY=function e(t,n,r){return -1==t.s?Math.max(e(t.l,n,r+1),e(t.r,n,r+1)):n[t.s]=r},tJ=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new tx(++t),r=0,i=e[0],o=1,a=function(e){n[r++]=e},s=1;s<=t;++s)if(e[s]==i&&s!=t)++o;else{if(!i&&o>2){for(;o>138;o-=138)a(32754);o>2&&(a(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(a(i),--o;o>6;o-=6)a(8304);o>2&&(a(o-3<<5|8208),o=0)}for(;o--;)a(i);o=1,i=e[s]}return[n.subarray(0,r),t]},tX=function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},tZ=function(e,t,n){var r=n.length,i=tz(t+2);e[i]=255&r,e[i+1]=r>>>8,e[i+2]=255^e[i],e[i+3]=255^e[i+1];for(var o=0;o<r;++o)e[i+o+4]=n[o];return 8*(i+4+r)},tK=function(e,t,n,r,i,o,a,s,u,c,l){tH(t,l++,n),++i[256];for(var f=tG(i,15),p=f[0],d=f[1],h=tG(o,15),v=h[0],m=h[1],y=tJ(p),g=y[0],_=y[1],b=tJ(v),w=b[0],E=b[1],k=new tx(19),S=0;S<g.length;++S)k[31&g[S]]++;for(S=0;S<w.length;++S)k[31&w[S]]++;for(var x=tG(k,7),O=x[0],T=x[1],P=19;P>4&&!O[tA[P-1]];--P);var A,D,C,R,I=c+5<<3,F=tX(i,tL)+tX(o,tq)+a,M=tX(i,p)+tX(o,v)+a+14+3*P+tX(k,O)+(2*k[16]+3*k[17]+7*k[18]);if(I<=F&&I<=M)return tZ(t,l,e.subarray(u,u+c));if(tH(t,l,1+(M<F)),l+=2,M<F){A=tV(p,d,0),D=p,C=tV(v,m,0),R=v;var j=tV(O,T,0);for(tH(t,l,_-257),tH(t,l+5,E-1),tH(t,l+10,P-4),l+=14,S=0;S<P;++S)tH(t,l+3*S,O[tA[S]]);l+=3*P;for(var N=[g,w],V=0;V<2;++V){var L=N[V];for(S=0;S<L.length;++S){var q=31&L[S];tH(t,l,j[q]),l+=O[q],q>15&&(tH(t,l,L[S]>>>5&127),l+=L[S]>>>12)}}}else A=tU,D=tL,C=tQ,R=tq;for(S=0;S<s;++S)if(r[S]>255){tW(t,l,A[(q=r[S]>>>18&31)+257]),l+=D[q+257],q>7&&(tH(t,l,r[S]>>>23&31),l+=tT[q]);var B=31&r[S];tW(t,l,C[B]),l+=R[B],B>3&&(tW(t,l,r[S]>>>5&8191),l+=tP[B])}else tW(t,l,A[r[S]]),l+=D[r[S]];return tW(t,l,A[256]),l+D[256]},t0=new tO([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),t1=new tS(0),t2=function(){for(var e=new tO(256),t=0;t<256;++t){for(var n=t,r=9;--r;)n=(1&n&&3988292384)^n>>>1;e[t]=n}return e}(),t3=function(){var e=4294967295;return{p:function(t){for(var n=e,r=0;r<t.length;++r)n=t2[255&n^t[r]]^n>>>8;e=n},d:function(){return 4294967295^e}}},t5=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8},t6=function(e,t){var n=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:9==t.level?2:0,e[9]=3,0!=t.mtime&&t5(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),n){e[3]=8;for(var r=0;r<=n.length;++r)e[r+10]=n.charCodeAt(r)}};(t8=tB||(tB={})).GZipJS="gzip-js",t8.LZ64="lz64",t8.Base64="base64";var t8,t4,t9,t7,ne=function(e,t,n){var r=t||{};r.ip=n.ip?1:0,r._=(new Date).getTime().toString(),r.ver=L.LIB_VERSION;var i=e.split("?");if(i.length>1){var o,a=R(i[1].split("&"));try{for(a.s();!(o=a.n()).done;){var s=o.value.split("=")[0];r[s]&&delete r[s]}}catch(u){a.e(u)}finally{a.f()}}var c=e.indexOf("?")>-1?"&":"?";return e+c+function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"&",i=[];return K(e,function(e,r){t=encodeURIComponent(e.toString()),n=encodeURIComponent(r),i[i.length]=n+"="+t}),i.join(r)}(r)},nt=function e(t,n){if(n.blob&&t.buffer)return new Blob([t.buffer],{type:"text/plain"});if(n.sendBeacon||n.blob){var r,i=e(t,{method:"POST"});return new Blob([i],{type:"application/x-www-form-urlencoded"})}return"POST"!==n.method?null:(r=Array.isArray(t)||"[object Uint8Array]"===Object.prototype.toString.call(t)?"data="+encodeURIComponent(t):"data="+encodeURIComponent(t.data),"compression"in t&&t.compression&&(r+="&compression="+t.compression),r)},nn=function(e){var t=e.url,n=e.data,r=e.headers,i=e.options,o=e.captureMetrics,a=e.callback,s=e.retriesPerformedSoFar,u=e.retryQueue,c=e.onXHRError,l=e.timeout,f=new XMLHttpRequest;f.open(i.method||"GET",t,!0);var p=nt(n,i);o.incr("_send_request"),o.incr("_send_request_inflight"),K(r,function(e,t){f.setRequestHeader(t,e)}),"POST"!==i.method||i.blob||f.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),f.timeout=void 0===l?1e4:l,f.withCredentials=!0,f.onreadystatechange=function(){if(4===f.readyState){if(o.incr("xhr-response"),o.incr("xhr-response-".concat(f.status)),o.decr("_send_request_inflight"),200===f.status){if(a){var e;try{e=JSON.parse(f.responseText)}catch(l){return void X.error(l)}a(e)}}else"function"==typeof c&&c(f),0>[401,403,404,500].indexOf(f.status)&&u.enqueue({url:t,data:n,options:i,headers:r,retriesPerformedSoFar:(s||0)+1,callback:a}),a&&a({status:0})}},f.send(p)},nr=function(e){S(n,tw);var t=T(n);function n(e,r){var i;return b(this,n),(i=t.call(this)).captureMetrics=e,i.isPolling=!1,i.queue=[],i.areWeOnline=!0,i.onXHRError=r,"undefined"!=typeof window&&"onLine"in window.navigator&&(i.areWeOnline=window.navigator.onLine,window.addEventListener("online",function(){i._handleWeAreNowOnline()}),window.addEventListener("offline",function(){i.areWeOnline=!1})),i}return E(n,[{key:"enqueue",value:function(e){var t=e.retriesPerformedSoFar||0;if(!(t>=10)){var n=3e3*Math.pow(2,t),r=new Date(Date.now()+n);console.warn("Enqueued failed request for retry in ".concat(n)),this.queue.push({retryAt:r,requestData:e}),this.isPolling||(this.isPolling=!0,this.poll())}}},{key:"poll",value:function(){var e=this;this._poller&&clearTimeout(this._poller),this._poller=setTimeout(function(){e.areWeOnline&&e.queue.length>0&&e.flush(),e.poll()},this._pollInterval)}},{key:"flush",value:function(){var e=new Date(Date.now()),t=this.queue.filter(function(t){return t.retryAt<e});if(t.length>0){this.queue=this.queue.filter(function(t){return t.retryAt>=e});var n,r=R(t);try{for(r.s();!(n=r.n()).done;){var i=n.value.requestData;this._executeXhrRequest(i)}}catch(o){r.e(o)}finally{r.f()}}}},{key:"unload",value:function(){this._poller&&(clearTimeout(this._poller),this._poller=void 0);var e,t=R(this.queue);try{for(t.s();!(e=t.n()).done;){var n=e.value.requestData,r=n.url,i=n.data,o=n.options;try{window.navigator.sendBeacon(r,nt(i,g(g({},o),{},{sendBeacon:!0})))}catch(a){L.DEBUG&&console.error(a)}}}catch(s){t.e(s)}finally{t.f()}this.queue=[]}},{key:"_executeXhrRequest",value:function(e){var t=e.url,n=e.data,r=e.options,i=e.headers,o=e.callback;nn({url:t,data:n||{},options:r||{},headers:i||{},retriesPerformedSoFar:e.retriesPerformedSoFar||0,callback:o,captureMetrics:this.captureMetrics,retryQueue:this,onXHRError:this.onXHRError})}},{key:"_handleWeAreNowOnline",value:function(){this.areWeOnline=!0,this.flush()}}]),n}(),ni=function(){function e(t,n){b(this,e),this.persistence=n,this._windowId=void 0,this._sessionId=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null;var r=t.persistence_name||t.token;if(this.window_id_storage_key="ph_"+r+"_window_id",this.primary_window_exists_storage_key="ph_"+r+"_primary_window_exists",!this.persistence.disabled&&eU.is_supported()){var i=eU.parse(this.window_id_storage_key),o=eU.parse(this.primary_window_exists_storage_key);i&&!o?this._windowId=i:eU.remove(this.window_id_storage_key),eU.set(this.primary_window_exists_storage_key,!0)}this._listenToReloadWindow()}return E(e,[{key:"_setWindowId",value:function(e){e!==this._windowId&&(this._windowId=e,!this.persistence.disabled&&eU.is_supported()&&eU.set(this.window_id_storage_key,e))}},{key:"_getWindowId",value:function(){return this._windowId?this._windowId:!this.persistence.disabled&&eU.is_supported()?eU.parse(this.window_id_storage_key):null}},{key:"_setSessionId",value:function(e,t,n){e===this._sessionId&&t===this._sessionActivityTimestamp&&n===this._sessionStartTimestamp||(this._sessionStartTimestamp=n,this._sessionActivityTimestamp=t,this._sessionId=e,this.persistence.register(k({},eJ,[t,e,n])))}},{key:"_getSessionId",value:function(){if(this._sessionId&&this._sessionActivityTimestamp&&this._sessionStartTimestamp)return[this._sessionActivityTimestamp,this._sessionId,this._sessionStartTimestamp];var e=this.persistence.props[eJ];return Array.isArray(e)&&2===e.length&&e.push(e[0]),e||[0,null,0]}},{key:"resetSessionId",value:function(){this._setSessionId(null,null,null)}},{key:"_listenToReloadWindow",value:function(){var e=this;window.addEventListener("beforeunload",function(){!e.persistence.disabled&&eU.is_supported()&&eU.remove(e.primary_window_exists_storage_key)})}},{key:"checkAndGetSessionAndWindowId",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:null)||(new Date).getTime(),n=P(this._getSessionId(),3),r=n[0],i=n[1],o=n[2],a=this._getWindowId(),s=o&&o>0&&Math.abs(t-o)>864e5;!i||!e&&Math.abs(t-r)>18e5||s?(i=em(),a=em(),o=t):a||(a=em());var u=0===o?(new Date).getTime():o;return this._setWindowId(a),this._setSessionId(i,0===r||!e||s?t:r,u),{sessionId:i,windowId:a}}}]),e}(),no=E(function e(t,n,r,i){b(this,e),this.name="posthog-js",this.setupOnce=function(e){e(function(e){if("error"!==e.level||!t.__loaded)return e;e.tags||(e.tags={});var o,a,s,u=t.config.ui_host||t.config.api_host;e.tags["PostHog Person URL"]=u+"/person/"+t.get_distinct_id(),t.sessionRecordingStarted()&&(e.tags["PostHog Recording URL"]=u+"/recordings/"+t.sessionManager.checkAndGetSessionAndWindowId(!0).sessionId);var c=(null===(o=e.exception)||void 0===o?void 0:o.values)||[],l={$sentry_event_id:e.event_id,$sentry_exception:e.exception,$sentry_exception_message:null===(a=c[0])||void 0===a?void 0:a.value,$sentry_exception_type:null===(s=c[0])||void 0===s?void 0:s.type,$sentry_tags:e.tags};return n&&r&&(l.$sentry_url=(i||"https://sentry.io/organizations/")+n+"/issues/?project="+r+"&query="+e.event_id),t.capture("$exception",l),e})}}),na=function(e){var t=function(t,n){t.event.userId||t.event.anonymousId===e.get_distinct_id()||e.reset(),t.event.userId&&t.event.userId!==e.get_distinct_id()&&(e.register({distinct_id:t.event.userId}),e.reloadFeatureFlags());var r=e._calculate_event_properties(n,t.event.properties);return t.event.properties=Object.assign({},r,t.event.properties),t};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:function(e){return t(e,e.event.event)},page:function(e){return t(e,"$pageview")},identify:function(e){return t(e,"$identify")},screen:function(e){return t(e,"$screen")}}},ns=function(){function e(){b(this,e),k(this,"_seenFirstPageView",!1)}return E(e,[{key:"onPageview",value:function(){this._seenFirstPageView&&(this._pageViewId=em()),this._seenFirstPageView=!0}},{key:"getPageViewId",value:function(){return this._pageViewId||(this._pageViewId=em()),this._pageViewId}}]),e}();(r=t4||(t4={}))[r.INIT_MODULE=0]="INIT_MODULE",r[r.INIT_SNIPPET=1]="INIT_SNIPPET";var nu=function(){},nc={},nl="posthog",nf=z.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,np=!nf&&-1===W.indexOf("MSIE")&&-1===W.indexOf("Mozilla"),nd=function(){var e,t,n;return{api_host:"https://app.posthog.com",api_method:"POST",api_transport:"XHR",ui_host:null,token:"",autocapture:!0,rageclick:!0,cross_subdomain_cookie:-1===(null==H||null===(e=H.location)||void 0===e||null===(t=e.hostname)||void 0===t?void 0:t.indexOf("herokuapp.com")),persistence:"cookie",persistence_name:"",cookie_name:"",loaded:nu,store_google:!0,save_referrer:!0,test:!1,verbose:!1,img:!1,capture_pageview:!0,capture_pageleave:!0,debug:!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_cookie:!1,enable_recording_console_log:void 0,secure_cookie:"https:"===(null==z||null===(n=z.location)||void 0===n?void 0:n.protocol),ip:!0,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_capturing_persistence_type:"localStorage",opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_blacklist:[],respect_dnt:!1,sanitize_properties:null,xhr_headers:{},inapp_protocol:"//",inapp_link_new_window:!1,request_batching:!0,properties_string_max_length:65535,session_recording:{blockClass:"ph-no-capture",blockSelector:null,ignoreClass:"ph-ignore-input",maskAllInputs:!0,maskInputOptions:{},maskInputFn:null,slimDOMOptions:{},collectFonts:!1,inlineStylesheet:!0},mask_all_element_attributes:!1,mask_all_text:!1,advanced_disable_decide:!1,advanced_disable_toolbar_metrics:!1,on_xhr_error:function(e){console.error("Bad HTTP status: "+e.status+" "+e.statusText)},get_device_id:function(e){return e},_onCapture:nu,_capture_metrics:!1,capture_performance:void 0,name:"posthog",callback_fn:"posthog._jsc",bootstrap:{},disable_compression:!1}},nh=function(e,t,n,r){var i,o=n!==nl&&t7?n?t7[n]:void 0:t7,a={initComplete:!1,syncCode:!1},s=function(e){return function(t){a[e]||(a[e]=!0,a.initComplete&&a.syncCode&&(null==r||r(t)))}};if(o&&t9===t4.INIT_MODULE)i=o;else{if(o&&!en(o))return void console.error("You have already initialized "+n);i=new nv}return i._init(e,t,n,s("initComplete")),i.toolbar.maybeLoadToolbar(),i.sessionRecording=new tf(i),i.sessionRecording.startRecordingIfEnabled(),i.webPerformance=new tv(i),i.webPerformance.startObservingIfEnabled(),i.__autocapture=i.get_config("autocapture"),e2._setIsAutocaptureEnabled(i),e2._isAutocaptureEnabled&&(i.__autocapture=i.get_config("autocapture"),e2.enabledForProject(i.get_config("token"),100,100)?e2.isBrowserSupported()?e2.init(i):(i.__autocapture=!1,X.log("Disabling Automatic Event Collection because this browser is not supported")):(i.__autocapture=!1,X.log("Not in active bucket: disabling Automatic Event Collection."))),L.DEBUG=L.DEBUG||i.get_config("debug"),void 0!==o&&en(o)&&(i._execute_array.call(i.people,o.people),i._execute_array(o)),s("syncCode")(i),i},nv=function(){function e(){var t=this;b(this,e),this.config=nd(),this.compression={},this.decideEndpointWasHit=!1,this.SentryIntegration=no,this.segmentIntegration=function(){return na(t)},this.__captureHooks=[],this.__request_queue=[],this.__loaded=!1,this.__loaded_recorder_version=void 0,this.__autocapture=void 0,this._jsc=function(){},this.people=new to(this),this.featureFlags=new tl(this),this.feature_flags=this.featureFlags,this.toolbar=new tb(this),this.pageViewIdManager=new ns,this._captureMetrics=void 0,this._requestQueue=void 0,this._retryQueue=void 0,this.persistence=void 0,this.sessionPersistence=void 0,this.sessionManager=void 0}return E(e,[{key:"init",value:function(e,t,n){if(ea(n))console.error("You must name your new library: init(token, config, name)");else{if(n!==nl){var r=nh(e,t,n,function(e){t7[n]=e,e._loaded()});return t7[n]=r,r}console.error("You must initialize the main posthog object right after you include the PostHog js snippet")}}},{key:"_init",value:function(e){var t,n,r=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0;this.__loaded=!0,this.config={},this._triggered_notifs=[];var s,u={segmentRegister:!1,syncCode:!1},c=function(e){return function(){u[e]||(u[e]=!0,u.segmentRegister&&u.syncCode&&(null==a||a(r)))}};if(this.set_config(et({},nd(),i,{name:o,token:e,callback_fn:(o===nl?o:nl+"."+o)+"._jsc"})),this._jsc=function(){},(null!=z&&null!==(t=z.rrweb)&&void 0!==t&&t.record||null!=z&&z.rrwebRecord)&&(this.__loaded_recorder_version=null==z||null===(s=z.rrweb)||void 0===s?void 0:s.version),this._captureMetrics=new tk(this.get_config("_capture_metrics")),this._requestQueue=new tE(this._captureMetrics,this._handle_queued_event.bind(this)),this._retryQueue=new nr(this._captureMetrics,this.get_config("on_xhr_error")),this.__captureHooks=[],this.__request_queue=[],this.persistence=new e1(this.config),this.sessionManager=new ni(this.config,this.persistence),this.sessionPersistence="sessionStorage"===this.config.persistence?this.persistence:new e1(g(g({},this.config),{},{persistence:"sessionStorage"})),this._gdpr_init(),i.segment?(this.config.get_device_id=function(){return i.segment.user().anonymousId()},i.segment.user().id()&&(this.register({distinct_id:i.segment.user().id()}),this.persistence.set_user_state("identified")),i.segment.register(this.segmentIntegration()).then(c("segmentRegister"))):c("segmentRegister")(),void 0!==(null===(n=i.bootstrap)||void 0===n?void 0:n.distinctID)){var l,f,p=this.get_config("get_device_id")(em()),d=null!==(l=i.bootstrap)&&void 0!==l&&l.isIdentifiedID?p:i.bootstrap.distinctID;this.persistence.set_user_state(null!==(f=i.bootstrap)&&void 0!==f&&f.isIdentifiedID?"identified":"anonymous"),this.register({distinct_id:i.bootstrap.distinctID,$device_id:d})}if(this._hasBootstrappedFeatureFlags()){var h,v,m=Object.keys((null===(h=i.bootstrap)||void 0===h?void 0:h.featureFlags)||{}).filter(function(e){var t,n;return!(null===(t=i.bootstrap)||void 0===t||null===(n=t.featureFlags)||void 0===n||!n[e])}).reduce(function(e,t){var n,r;return e[t]=(null===(n=i.bootstrap)||void 0===n||null===(r=n.featureFlags)||void 0===r?void 0:r[t])||!1,e},{}),y=Object.keys((null===(v=i.bootstrap)||void 0===v?void 0:v.featureFlagPayloads)||{}).filter(function(e){return m[e]}).reduce(function(e,t){var n,r,o,a;return null!==(n=i.bootstrap)&&void 0!==n&&null!==(r=n.featureFlagPayloads)&&void 0!==r&&r[t]&&(e[t]=null===(o=i.bootstrap)||void 0===o||null===(a=o.featureFlagPayloads)||void 0===a?void 0:a[t]),e},{});this.featureFlags.receivedFeatureFlags({featureFlags:m,featureFlagPayloads:y})}if(!this.get_distinct_id()){var _=this.get_config("get_device_id")(em());this.register_once({distinct_id:_,$device_id:_},""),this.persistence.set_user_state("anonymous")}z.addEventListener&&z.addEventListener("onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this)),c("syncCode")()}},{key:"_loaded",value:function(){this.featureFlags.setReloadingPaused(!0);try{this.get_config("loaded")(this)}catch(e){console.error("`loaded` function failed",e)}this._start_queue_if_opted_in(),this.get_config("capture_pageview")&&this.capture("$pageview",{},{send_instantly:!0}),this.get_config("advanced_disable_decide")||new ty(this).call(),this.featureFlags.resetRequestQueue(),this.featureFlags.setReloadingPaused(!1)}},{key:"_start_queue_if_opted_in",value:function(){this.has_opted_out_capturing()||this.get_config("request_batching")&&this._requestQueue.poll()}},{key:"_dom_loaded",value:function(){var e=this;this.has_opted_out_capturing()||ee(this.__request_queue,function(t){e._send_request.apply(e,A(t))}),this.__request_queue=[],this._start_queue_if_opted_in()}},{key:"_prepare_callback",value:function(e,t){if(ea(e))return null;if(nf)return function(n){e(n,t)};var n=this._jsc,r=""+Math.floor(1e8*Math.random()),i=this.get_config("callback_fn")+"["+r+"]";return n[r]=function(i){delete n[r],e(i,t)},i}},{key:"_handle_unload",value:function(){this.get_config("request_batching")?(this.get_config("capture_pageview")&&this.get_config("capture_pageleave")&&this.capture("$pageleave"),this.get_config("_capture_metrics")&&(this._requestQueue.updateUnloadMetrics(),this.capture("$capture_metrics",this._captureMetrics.metrics)),this._requestQueue.unload(),this._retryQueue.unload()):this.get_config("capture_pageview")&&this.get_config("capture_pageleave")&&this.capture("$pageleave",null,{transport:"sendBeacon"})}},{key:"_handle_queued_event",value:function(e,t,n){var r=JSON.stringify(t);this.__compress_and_send_json_request(e,r,n||nc,nu)}},{key:"__compress_and_send_json_request",value:function(e,t,n,r){var i,o,a,s,u,c,l,f,p,d=P((i=(p=this.compression)[tB.GZipJS]?tB.GZipJS:p[tB.LZ64]?tB.LZ64:tB.Base64)===tB.LZ64?[{data:V.compressToBase64(t),compression:tB.LZ64},n]:i===tB.GZipJS?[(o=function(e,t){var n=e.length;if(!t&&"undefined"!=typeof TextEncoder)return(new TextEncoder).encode(e);for(var r=new tS(e.length+(e.length>>>1)),i=0,o=function(e){r[i++]=e},a=0;a<n;++a){if(i+5>r.length){var s=new tS(i+8+(n-a<<1));s.set(r),r=s}var u=e.charCodeAt(a);u<128||t?o(u):u<2048?(o(192|u>>>6),o(128|63&u)):u>55295&&u<57344?(o(240|(u=65536+(1047552&u)|1023&e.charCodeAt(++a))>>>18),o(128|u>>>12&63),o(128|u>>>6&63),o(128|63&u)):(o(224|u>>>12),o(128|u>>>6&63),o(128|63&u))}return t$(r,0,i)}(t),a={mtime:0},s=t3(),u=o.length,s.p(o),f=(c=10+(a.filename&&a.filename.length+1||0),l=function(e,t,n,r,i,o){var a=e.length,s=new tS(r+a+5*(1+Math.floor(a/7e3))+i),u=s.subarray(r,s.length-i),c=0;if(!t||a<8)for(var l=0;l<=a;l+=65535){var f=l+65535;f<a?c=tZ(u,c,e.subarray(l,f)):(u[l]=o,c=tZ(u,c,e.subarray(l,a)))}else{for(var p=t0[t-1],d=p>>>13,h=8191&p,v=(1<<n)-1,m=new tx(32768),y=new tx(v+1),g=Math.ceil(n/3),_=2*g,b=function(t){return(e[t]^e[t+1]<<g^e[t+2]<<_)&v},w=new tO(25e3),E=new tx(288),k=new tx(32),S=0,x=0,O=(l=0,0),T=0,P=0;l<a;++l){var A=b(l),D=32767&l,C=y[A];if(m[D]=C,y[A]=D,T<=l){var R=a-l;if((S>7e3||O>24576)&&R>423){c=tK(e,u,0,w,E,k,x,O,P,l-P,c),O=S=x=0,P=l;for(var I=0;I<286;++I)E[I]=0;for(I=0;I<30;++I)k[I]=0}var F=2,M=0,j=h,N=D-C&32767;if(R>2&&A==b(l-N))for(var V=Math.min(d,R)-1,L=Math.min(32767,l),q=Math.min(258,R);N<=L&&--j&&D!=C;){if(e[l+F]==e[l+F-N]){for(var B=0;B<q&&e[l+B]==e[l+B-N];++B);if(B>F){if(F=B,M=N,B>V)break;var U=Math.min(N,B-2),Q=0;for(I=0;I<U;++I){var z=l-N+I+32768&32767,$=z-m[z]+32768&32767;$>Q&&(Q=$,C=z)}}}N+=(D=C)-(C=m[D])+32768&32767}if(M){w[O++]=268435456|tI[F]<<18|tF[M];var H=31&tI[F],W=31&tF[M];x+=tT[H]+tP[W],++E[257+H],++k[W],T=l+F,++S}else w[O++]=e[l],++E[e[l]]}}c=tK(e,u,o,w,E,k,x,O,P,l-P,c),o||(c=tZ(u,c,t1))}return t$(s,0,r+tz(c)+i)}(o,null==a.level?6:a.level,null==a.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(o.length)))):12+a.mem,c,8,!0)).length,t6(l,a),t5(l,f-8,s.d()),t5(l,f-4,u),l),g(g({},n),{},{blob:!0,urlQueryArgs:{compression:tB.GZipJS}})]:[{data:ed(t)},n],2),h=d[0],v=d[1];this._send_request(e,h,v,r)}},{key:"_send_request",value:function(e,t,n,r){if(np)this.__request_queue.push([e,t,n,r]);else{n=et({method:this.get_config("api_method"),transport:this.get_config("api_transport"),verbose:this.get_config("verbose")},n||{}),nf||(n.method="GET");var i="sendBeacon"in z.navigator&&"sendBeacon"===n.transport;if(e=ne(e,n.urlQueryArgs||{},{ip:this.get_config("ip")}),eo(t)&&this.get_config("img")){var o=H.createElement("img");o.src=e,H.body.appendChild(o)}else if(i)try{z.navigator.sendBeacon(e,nt(t,g(g({},n),{},{sendBeacon:!0})))}catch(a){this.get_config("debug")&&console.error(a)}else if(nf)try{nn({url:e,data:t,headers:this.get_config("xhr_headers"),options:n,captureMetrics:this._captureMetrics,callback:r,retriesPerformedSoFar:0,retryQueue:this._retryQueue,onXHRError:this.get_config("on_xhr_error")})}catch(s){console.error(s)}else{var u,c=H.createElement("script");c.type="text/javascript",c.async=!0,c.defer=!0,c.src=e;var l=H.getElementsByTagName("script")[0];null===(u=l.parentNode)||void 0===u||u.insertBefore(c,l)}}}},{key:"_execute_array",value:function(e){var t,n=this,r=[],i=[],o=[];ee(e,function(e){e&&(en(t=e[0])?o.push(e):"function"==typeof e?e.call(n):en(e)&&"alias"===t?r.push(e):en(e)&&-1!==t.indexOf("capture")&&"function"==typeof n[t]?o.push(e):i.push(e))});var a=function(e,t){ee(e,function(e){if(en(e[0])){var n=t;K(e,function(e){n=n[e[0]].apply(n,e.slice(1))})}else this[e[0]].apply(this,e.slice(1))},t)};a(r,this),a(i,this),a(o,this)}},{key:"_hasBootstrappedFeatureFlags",value:function(){var e,t;return(null===(e=this.config.bootstrap)||void 0===e?void 0:e.featureFlags)&&Object.keys(null===(t=this.config.bootstrap)||void 0===t?void 0:t.featureFlags).length>0||!1}},{key:"push",value:function(e){this._execute_array([e])}},{key:"capture",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:nc;if(this.__loaded&&!tn(this,!1)){this._captureMetrics.incr("capture"),"$snapshot"===e&&this._captureMetrics.incr("snapshot");var r=(n=n||nc).transport;if(r&&(n.transport=r),ea(e)||"string"!=typeof e)console.error("No event name provided to posthog.capture");else if(!/(google web preview|baiduspider|yandexbot|bingbot|googlebot|yahoo! slurp|ahrefsbot|facebookexternalhit|facebookcatalog|applebot|semrushbot|duckduckbot|twitterbot|rogerbot|linkedinbot|mj12bot|sitebulb|bot.htm|bot.php|hubspot|crawler)/i.test(W)){this.sessionPersistence.update_search_keyword(),this.get_config("store_google")&&this.sessionPersistence.update_campaign_params(),this.get_config("save_referrer")&&this.sessionPersistence.update_referrer_info();var i={event:e,properties:this._calculate_event_properties(e,t||{})};"$identify"===e&&n.$set&&(i.$set=n.$set),(i=ep(i,n._noTruncate?null:this.get_config("properties_string_max_length"))).timestamp=n.timestamp||new Date,this.get_config("debug")&&X.log("PostHog.js send",i);var o=JSON.stringify(i),a=this.get_config("api_host")+(n.endpoint||"/e/"),s=n!==nc;return!this.get_config("request_batching")||s&&!n._batchKey||n.send_instantly?this.__compress_and_send_json_request(a,o,n):this._requestQueue.enqueue(a,i,n),this._invokeCaptureHooks(e,i),i}}}},{key:"_addCaptureHook",value:function(e){this.__captureHooks.push(e)}},{key:"_invokeCaptureHooks",value:function(e,t){this.config._onCapture(e,t),K(this.__captureHooks,function(t){return t(e)})}},{key:"_calculate_event_properties",value:function(e,t){var n,r=this.persistence.remove_event_timer(e),i=g({},t);if(i.token=this.get_config("token"),"$snapshot"===e){var o=g(g({},this.persistence.properties()),this.sessionPersistence.properties());return i.distinct_id=o.distinct_id,i}var a=eb.properties();if(this.sessionManager){var s=this.sessionManager.checkAndGetSessionAndWindowId(),u=s.sessionId,c=s.windowId;i.$session_id=u,i.$window_id=c}if(null!==(n=this.webPerformance)&&void 0!==n&&n.isEnabled&&("$pageview"===e&&this.pageViewIdManager.onPageview(),i=et(i,{$pageview_id:this.pageViewIdManager.getPageViewId()})),"$performance_event"===e){var l=this.persistence.properties();return i.distinct_id=l.distinct_id,i.$current_url=a.$current_url,i}if(void 0!==r){var f=(new Date).getTime()-r;i.$duration=parseFloat((f/1e3).toFixed(3))}i=et({},eb.properties(),this.persistence.properties(),this.sessionPersistence.properties(),i);var p=this.get_config("property_blacklist");en(p)?K(p,function(e){delete i[e]}):console.error("Invalid value for property_blacklist config: "+p);var d=this.get_config("sanitize_properties");return d&&(i=d(i,e)),i}},{key:"register",value:function(e,t){this.persistence.register(e,t)}},{key:"register_once",value:function(e,t,n){this.persistence.register_once(e,t,n)}},{key:"register_for_session",value:function(e){this.sessionPersistence.register(e)}},{key:"unregister",value:function(e){this.persistence.unregister(e)}},{key:"unregister_for_session",value:function(e){this.sessionPersistence.unregister(e)}},{key:"_register_single",value:function(e,t){this.register(k({},e,t))}},{key:"getFeatureFlag",value:function(e,t){return this.featureFlags.getFeatureFlag(e,t)}},{key:"getFeatureFlagPayload",value:function(e){var t=this.featureFlags.getFeatureFlagPayload(e);try{return JSON.parse(t)}catch(n){return t}}},{key:"isFeatureEnabled",value:function(e,t){return this.featureFlags.isFeatureEnabled(e,t)}},{key:"reloadFeatureFlags",value:function(){this.featureFlags.reloadFeatureFlags()}},{key:"onFeatureFlags",value:function(e){return this.featureFlags.onFeatureFlags(e)}},{key:"identify",value:function(e,t,n){if(e){this._captureMetrics.incr("identify");var r=this.get_distinct_id();this.register({$user_id:e}),this.get_property("$device_id")||this.register_once({$had_persisted_distinct_id:!0,$device_id:r},""),e!==r&&e!==this.get_property(ez)&&(this.unregister(ez),this.register({distinct_id:e}));var i="anonymous"===this.persistence.get_user_state();e!==r&&i?(this.persistence.set_user_state("identified"),this.capture("$identify",{distinct_id:e,$anon_distinct_id:r},{$set:t||{},$set_once:n||{}}),this.featureFlags.setAnonymousDistinctId(r)):(t&&this.people.set(t),n&&this.people.set_once(n)),e!==r&&this.reloadFeatureFlags()}else console.error("Unique user id has not been set in posthog.identify")}},{key:"group",value:function(e,t,n){if(e&&t){this._captureMetrics.incr("group");var r=this.getGroups();this.register({$groups:g(g({},r),{},k({},e,t))}),n&&this.capture("$groupidentify",{$group_type:e,$group_key:t,$group_set:n}),r[e]!==t&&this.reloadFeatureFlags()}else console.error("posthog.group requires a group type and group key")}},{key:"resetGroups",value:function(){this.register({$groups:{}}),this.reloadFeatureFlags()}},{key:"reset",value:function(e){var t=this.get_property("$device_id");this.persistence.clear(),this.sessionPersistence.clear(),this.persistence.set_user_state("anonymous"),this.sessionManager.resetSessionId();var n=this.get_config("get_device_id")(em());this.register_once({distinct_id:n,$device_id:e?n:t},"")}},{key:"get_distinct_id",value:function(){return this.get_property("distinct_id")}},{key:"getGroups",value:function(){return this.get_property("$groups")||{}}},{key:"alias",value:function(e,t){return e===this.get_property(eQ)?(X.critical("Attempting to create alias for existing People user - aborting."),-2):(ea(t)&&(t=this.get_distinct_id()),e!==t?(this._register_single(ez,e),this.capture("$create_alias",{alias:e,distinct_id:t})):(console.error("alias matches current distinct_id - skipping api call."),this.identify(e),-1))}},{key:"set_config",value:function(e){var t=g({},this.config);eo(e)&&(et(this.config,e),this.get_config("persistence_name")||(this.config.persistence_name=this.config.cookie_name),this.get_config("disable_persistence")||(this.config.disable_persistence=this.config.disable_cookie),this.persistence&&this.persistence.update_config(this.config),this.sessionPersistence&&this.sessionPersistence.update_config(this.config),eN.is_supported()&&"true"===eN.get("ph_debug")&&(this.config.debug=!0),this.get_config("debug")&&(L.DEBUG=!0),this.sessionRecording&&void 0!==e.disable_session_recording&&t.disable_session_recording!==e.disable_session_recording&&(e.disable_session_recording?this.sessionRecording.stopRecording():this.sessionRecording.startRecordingIfEnabled()))}},{key:"startSessionRecording",value:function(){this.set_config({disable_session_recording:!1})}},{key:"stopSessionRecording",value:function(){this.set_config({disable_session_recording:!0})}},{key:"sessionRecordingStarted",value:function(){var e;return!(null===(e=this.sessionRecording)||void 0===e||!e.started())}},{key:"loadToolbar",value:function(e){return this.toolbar.loadToolbar(e)}},{key:"get_config",value:function(e){var t;return null===(t=this.config)||void 0===t?void 0:t[e]}},{key:"get_property",value:function(e){return this.persistence.props[e]}},{key:"getSessionProperty",value:function(e){return this.sessionPersistence.props[e]}},{key:"toString",value:function(){var e,t=null!==(e=this.get_config("name"))&&void 0!==e?e:nl;return t!==nl&&(t=nl+"."+t),t}},{key:"_gdpr_init",value:function(){"localStorage"===this.get_config("opt_out_capturing_persistence_type")&&eN.is_supported()&&(!this.has_opted_in_capturing()&&this.has_opted_in_capturing({persistence_type:"cookie"})&&this.opt_in_capturing({enable_persistence:!1}),!this.has_opted_out_capturing()&&this.has_opted_out_capturing({persistence_type:"cookie"})&&this.opt_out_capturing({clear_persistence:!1}),this.clear_opt_in_out_capturing({persistence_type:"cookie",enable_persistence:!1})),this.has_opted_out_capturing()?this._gdpr_update_persistence({clear_persistence:!0}):!this.has_opted_in_capturing()&&(this.get_config("opt_out_capturing_by_default")||eM.get("ph_optout"))&&(eM.remove("ph_optout"),this.opt_out_capturing({clear_persistence:this.get_config("opt_out_persistence_by_default")}))}},{key:"_gdpr_update_persistence",value:function(e){var t;if(e&&e.clear_persistence)t=!0;else{if(!e||!e.enable_persistence)return;t=!1}this.get_config("disable_persistence")||this.persistence.disabled===t||this.persistence.set_disabled(t),this.get_config("disable_persistence")||this.sessionPersistence.disabled===t||this.sessionPersistence.set_disabled(t)}},{key:"_gdpr_call_func",value:function(e,t){return t=et({capture:this.capture.bind(this),persistence_type:this.get_config("opt_out_capturing_persistence_type"),cookie_prefix:this.get_config("opt_out_capturing_cookie_prefix"),cookie_expiration:this.get_config("cookie_expiration"),cross_subdomain_cookie:this.get_config("cross_subdomain_cookie"),secure_cookie:this.get_config("secure_cookie")},t||{}),eN.is_supported()||"localStorage"!==t.persistence_type||(t.persistence_type="cookie"),e(this.get_config("token"),{capture:t.capture,captureEventName:t.capture_event_name,captureProperties:t.capture_properties,persistenceType:t.persistence_type,persistencePrefix:t.cookie_prefix,cookieExpiration:t.cookie_expiration,crossSubdomainCookie:t.cross_subdomain_cookie,secureCookie:t.secure_cookie})}},{key:"opt_in_capturing",value:function(e){e=et({enable_persistence:!0},e||{}),this._gdpr_call_func(e3,e),this._gdpr_update_persistence(e)}},{key:"opt_out_capturing",value:function(e){var t=et({clear_persistence:!0},e||{});this._gdpr_call_func(e5,t),this._gdpr_update_persistence(t)}},{key:"has_opted_in_capturing",value:function(e){return this._gdpr_call_func(e6,e)}},{key:"has_opted_out_capturing",value:function(e){return this._gdpr_call_func(e8,e)}},{key:"clear_opt_in_out_capturing",value:function(e){var t=et({enable_persistence:!0},null!=e?e:{});this._gdpr_call_func(e4,t),this._gdpr_update_persistence(t)}},{key:"debug",value:function(e){!1===e?(z.console.log("You've disabled debug mode."),localStorage&&localStorage.removeItem("ph_debug"),this.set_config({debug:!1})):(z.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),localStorage&&localStorage.setItem("ph_debug","true"),this.set_config({debug:!0}))}},{key:"decodeLZ64",value:function(e){return V.decompressFromBase64(e||null)}}]),e}();!function(e,t){for(var n=0;n<t.length;n++)e.prototype[t[n]]=ec(e.prototype[t[n]])}(nv,["identify"]);var nm={},ny=(t9=t4.INIT_MODULE,(t7=new nv).init=function(e,t,n){if(n)return t7[n]||(t7[n]=nm[n]=nh(e||"",t||{},n,function(e){t7[n]=nm[n]=e,e._loaded()})),t7[n];var r=t7;return nm[nl]?r=nm[nl]:e&&(r=nh(e,t||{},nl,function(e){nm[nl]=e,e._loaded()}),nm[nl]=r),t7=r,t9===t4.INIT_SNIPPET&&(z[nl]=t7),K(nm,function(e,t){t!==nl&&(t7[t]=e)}),r},t7.init(),function(){function e(){e.done||(e.done=!0,np=!1,K(nm,function(e){e._dom_loaded()}))}H.addEventListener&&("complete"===H.readyState?e():H.addEventListener("DOMContentLoaded",e,!1)),e_(z,"load",e,!0)}(),t7),ng=n(655),n_="Invariant Violation",nb=Object.setPrototypeOf,nw=void 0===nb?function(e,t){return e.__proto__=t,e}:nb,nE=function(e){function t(n){void 0===n&&(n=n_);var r=e.call(this,"number"==typeof n?n_+": "+n+" (see https://github.com/apollographql/invariant-packages)":n)||this;return r.framesToPop=1,r.name=n_,nw(r,t.prototype),r}return(0,ng.ZT)(t,e),t}(Error);function nk(e,t){if(!e)throw new nE(t)}var nS=["debug","log","warn","error","silent"],nx=nS.indexOf("log");function nO(e){return function(){if(nS.indexOf(e)>=nx)return(console[e]||console.log).apply(console,arguments)}}function nT(e){try{return e()}catch(t){}}(i=nk||(nk={})).debug=nO("debug"),i.log=nO("log"),i.warn=nO("warn"),i.error=nO("error");var nP=nT(function(){return globalThis})||nT(function(){return window})||nT(function(){return self})||nT(function(){return global})||nT(function(){return nT.constructor("return this")()}),nA="__DEV__",nD=function(){try{return Boolean(__DEV__)}catch(e){return Object.defineProperty(nP,nA,{value:"production"!==nT(function(){return"production"}),enumerable:!1,configurable:!0,writable:!0}),nP[nA]}}(),nC=n(3454);function nR(e){try{return e()}catch(t){}}var nI=nR(function(){return globalThis})||nR(function(){return window})||nR(function(){return self})||nR(function(){return global})||nR(function(){return nR.constructor("return this")()}),nF=!1;!nI||nR(function(){return"production"})||nR(function(){return nC})||(Object.defineProperty(nI,"process",{value:{env:{NODE_ENV:"production"}},configurable:!0,enumerable:!1,writable:!0}),nF=!0);function nM(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function nj(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function nN(e,t,n){return t&&nj(e.prototype,t),n&&nj(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}nF&&(delete nI.process,nF=!1),__DEV__?nk("boolean"==typeof nD,nD):nk("boolean"==typeof nD,38);var nV=function(){return"function"==typeof Symbol},nL=function(e){return nV()&&Boolean(Symbol[e])},nq=function(e){return nL(e)?Symbol[e]:"@@"+e};nV()&&!nL("observable")&&(Symbol.observable=Symbol("observable"));var nB=nq("iterator"),nU=nq("observable"),nQ=nq("species");function nz(e,t){var n=e[t];if(null!=n){if("function"!=typeof n)throw TypeError(n+" is not a function");return n}}function n$(e){var t=e.constructor;return void 0!==t&&null===(t=t[nQ])&&(t=void 0),void 0!==t?t:n0}function nH(e){nH.log?nH.log(e):setTimeout(function(){throw e})}function nW(e){Promise.resolve().then(function(){try{e()}catch(t){nH(t)}})}function nG(e){var t=e._cleanup;if(void 0!==t){if(e._cleanup=void 0,!t)return;try{if("function"==typeof t)t();else{var n=nz(t,"unsubscribe");n&&n.call(t)}}catch(r){nH(r)}}}function nY(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function nJ(e,t,n){e._state="running";var r=e._observer;try{var i=nz(r,t);switch(t){case"next":i&&i.call(r,n);break;case"error":if(nY(e),i)i.call(r,n);else throw n;break;case"complete":nY(e),i&&i.call(r)}}catch(o){nH(o)}"closed"===e._state?nG(e):"running"===e._state&&(e._state="ready")}function nX(e,t,n){if("closed"!==e._state){if("buffering"===e._state){e._queue.push({type:t,value:n});return}if("ready"!==e._state){e._state="buffering",e._queue=[{type:t,value:n}],nW(function(){return function(e){var t=e._queue;if(t){e._queue=void 0,e._state="ready";for(var n=0;n<t.length&&(nJ(e,t[n].type,t[n].value),"closed"!==e._state);++n);}}(e)});return}nJ(e,t,n)}}var nZ=function(){function e(e,t){this._cleanup=void 0,this._observer=e,this._queue=void 0,this._state="initializing";var n=new nK(this);try{this._cleanup=t.call(void 0,n)}catch(r){n.error(r)}"initializing"===this._state&&(this._state="ready")}return e.prototype.unsubscribe=function(){"closed"!==this._state&&(nY(this),nG(this))},nN(e,[{key:"closed",get:function(){return"closed"===this._state}}]),e}(),nK=function(){function e(e){this._subscription=e}var t=e.prototype;return t.next=function(e){nX(this._subscription,"next",e)},t.error=function(e){nX(this._subscription,"error",e)},t.complete=function(){nX(this._subscription,"complete")},nN(e,[{key:"closed",get:function(){return"closed"===this._subscription._state}}]),e}(),n0=function(){function e(t){if(!(this instanceof e))throw TypeError("Observable cannot be called as a function");if("function"!=typeof t)throw TypeError("Observable initializer must be a function");this._subscriber=t}var t=e.prototype;return t.subscribe=function(e){return("object"!=typeof e||null===e)&&(e={next:e,error:arguments[1],complete:arguments[2]}),new nZ(e,this._subscriber)},t.forEach=function(e){var t=this;return new Promise(function(n,r){if("function"!=typeof e){r(TypeError(e+" is not a function"));return}function i(){o.unsubscribe(),n()}var o=t.subscribe({next:function(t){try{e(t,i)}catch(n){r(n),o.unsubscribe()}},error:r,complete:n})})},t.map=function(e){var t=this;if("function"!=typeof e)throw TypeError(e+" is not a function");return new(n$(this))(function(n){return t.subscribe({next:function(t){try{t=e(t)}catch(r){return n.error(r)}n.next(t)},error:function(e){n.error(e)},complete:function(){n.complete()}})})},t.filter=function(e){var t=this;if("function"!=typeof e)throw TypeError(e+" is not a function");return new(n$(this))(function(n){return t.subscribe({next:function(t){try{if(!e(t))return}catch(r){return n.error(r)}n.next(t)},error:function(e){n.error(e)},complete:function(){n.complete()}})})},t.reduce=function(e){var t=this;if("function"!=typeof e)throw TypeError(e+" is not a function");var n=n$(this),r=arguments.length>1,i=!1,o=arguments[1],a=o;return new n(function(n){return t.subscribe({next:function(t){var o=!i;if(i=!0,!o||r)try{a=e(a,t)}catch(s){return n.error(s)}else a=t},error:function(e){n.error(e)},complete:function(){if(!i&&!r)return n.error(TypeError("Cannot reduce an empty sequence"));n.next(a),n.complete()}})})},t.concat=function(){for(var e=this,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n$(this);return new i(function(t){var r,o=0;return function e(a){r=a.subscribe({next:function(e){t.next(e)},error:function(e){t.error(e)},complete:function(){o===n.length?(r=void 0,t.complete()):e(i.from(n[o++]))}})}(e),function(){r&&(r.unsubscribe(),r=void 0)}})},t.flatMap=function(e){var t=this;if("function"!=typeof e)throw TypeError(e+" is not a function");var n=n$(this);return new n(function(r){var i=[],o=t.subscribe({next:function(t){if(e)try{t=e(t)}catch(o){return r.error(o)}var s=n.from(t).subscribe({next:function(e){r.next(e)},error:function(e){r.error(e)},complete:function(){var e=i.indexOf(s);e>=0&&i.splice(e,1),a()}});i.push(s)},error:function(e){r.error(e)},complete:function(){a()}});function a(){o.closed&&0===i.length&&r.complete()}return function(){i.forEach(function(e){return e.unsubscribe()}),o.unsubscribe()}})},t[nU]=function(){return this},e.from=function(t){var n="function"==typeof this?this:e;if(null==t)throw TypeError(t+" is not an object");var r=nz(t,nU);if(r){var i=r.call(t);if(Object(i)!==i)throw TypeError(i+" is not an object");return i instanceof n0&&i.constructor===n?i:new n(function(e){return i.subscribe(e)})}if(nL("iterator")&&(r=nz(t,nB)))return new n(function(e){nW(function(){if(!e.closed){for(var n,i=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return nM(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nM(e,t)}}(e))){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(r.call(t));!(n=i()).done;){var o=n.value;if(e.next(o),e.closed)return}e.complete()}})});if(Array.isArray(t))return new n(function(e){nW(function(){if(!e.closed){for(var n=0;n<t.length;++n)if(e.next(t[n]),e.closed)return;e.complete()}})});throw TypeError(t+" is not observable")},e.of=function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return new("function"==typeof this?this:e)(function(e){nW(function(){if(!e.closed){for(var t=0;t<n.length;++t)if(e.next(n[t]),e.closed)return;e.complete()}})})},nN(e,null,[{key:nQ,get:function(){return this}}]),e}();function n1(e){return null!==e&&"object"==typeof e}function n2(e,t){var n=t,r=[];return e.definitions.forEach(function(e){if("OperationDefinition"===e.kind)throw __DEV__?new nE("Found a ".concat(e.operation," operation").concat(e.name?" named '".concat(e.name.value,"'"):"",". ")+"No operations are allowed when using a fragment as a query. Only fragments are allowed."):new nE(43);"FragmentDefinition"===e.kind&&r.push(e)}),void 0===n&&(__DEV__?nk(1===r.length,"Found ".concat(r.length," fragments. `fragmentName` must be provided when there is not exactly 1 fragment.")):nk(1===r.length,44),n=r[0].name.value),(0,ng.pi)((0,ng.pi)({},e),{definitions:(0,ng.ev)([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:n}}]}}],e.definitions,!0)})}function n3(e){void 0===e&&(e=[]);var t={};return e.forEach(function(e){t[e.name.value]=e}),t}function n5(e,t){switch(e.kind){case"InlineFragment":return e;case"FragmentSpread":var n=e.name.value;if("function"==typeof t)return t(n);var r=t&&t[n];return __DEV__?nk(r,"No fragment named ".concat(n)):nk(r,45),r||null;default:return null}}function n6(e){return{__ref:String(e)}}function n8(e){return Boolean(e&&"object"==typeof e&&"string"==typeof e.__ref)}function n4(e,t,n,r){if("IntValue"===n.kind||"FloatValue"===n.kind)e[t.value]=Number(n.value);else if("BooleanValue"===n.kind||"StringValue"===n.kind)e[t.value]=n.value;else if("ObjectValue"===n.kind){var i={};n.fields.map(function(e){return n4(i,e.name,e.value,r)}),e[t.value]=i}else if("Variable"===n.kind){var o=(r||{})[n.name.value];e[t.value]=o}else if("ListValue"===n.kind)e[t.value]=n.values.map(function(e){var n={};return n4(n,t,e,r),n[t.value]});else if("EnumValue"===n.kind)e[t.value]=n.value;else if("NullValue"===n.kind)e[t.value]=null;else throw __DEV__?new nE('The inline argument "'.concat(t.value,'" of kind "').concat(n.kind,'"')+"is not supported. Use variables instead of inline arguments to overcome this limitation."):new nE(54)}nV()&&Object.defineProperty(n0,Symbol("extensions"),{value:{symbol:nU,hostReportError:nH},configurable:!0});var n9=["connection","include","skip","client","rest","export"],n7=Object.assign(function(e,t,n){if(t&&n&&n.connection&&n.connection.key){if(!n.connection.filter||!(n.connection.filter.length>0))return n.connection.key;var r=n.connection.filter?n.connection.filter:[];r.sort();var i={};return r.forEach(function(e){i[e]=t[e]}),"".concat(n.connection.key,"(").concat(re(i),")")}var o=e;if(t){var a=re(t);o+="(".concat(a,")")}return n&&Object.keys(n).forEach(function(e){-1===n9.indexOf(e)&&(n[e]&&Object.keys(n[e]).length?o+="@".concat(e,"(").concat(re(n[e]),")"):o+="@".concat(e))}),o},{setStringify:function(e){var t=re;return re=e,t}}),re=function(e){return JSON.stringify(e,rt)};function rt(e,t){return n1(t)&&!Array.isArray(t)&&(t=Object.keys(t).sort().reduce(function(e,n){return e[n]=t[n],e},{})),t}function rn(e,t){if(e.arguments&&e.arguments.length){var n={};return e.arguments.forEach(function(e){return n4(n,e.name,e.value,t)}),n}return null}function rr(e){return e.alias?e.alias.value:e.name.value}function ri(e,t,n){if("string"==typeof e.__typename)return e.__typename;for(var r=0,i=t.selections;r<i.length;r++){var o=i[r];if(ro(o)){if("__typename"===o.name.value)return e[rr(o)]}else{var a=ri(e,n5(o,n).selectionSet,n);if("string"==typeof a)return a}}}function ro(e){return"Field"===e.kind}function ra(e){return"InlineFragment"===e.kind}function rs(e){__DEV__?nk(e&&"Document"===e.kind,'Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a "gql" tag? http://docs.apollostack.com/apollo-client/core.html#gql'):nk(e&&"Document"===e.kind,46);var t=e.definitions.filter(function(e){return"FragmentDefinition"!==e.kind}).map(function(e){if("OperationDefinition"!==e.kind)throw __DEV__?new nE('Schema type definitions not allowed in queries. Found: "'.concat(e.kind,'"')):new nE(47);return e});return __DEV__?nk(t.length<=1,"Ambiguous GraphQL document: contains ".concat(t.length," operations")):nk(t.length<=1,48),e}function ru(e){return rs(e),e.definitions.filter(function(e){return"OperationDefinition"===e.kind})[0]}function rc(e){return e.definitions.filter(function(e){return"OperationDefinition"===e.kind&&e.name}).map(function(e){return e.name.value})[0]||null}function rl(e){return e.definitions.filter(function(e){return"FragmentDefinition"===e.kind})}function rf(e){var t=ru(e);return __DEV__?nk(t&&"query"===t.operation,"Must contain a query definition."):nk(t&&"query"===t.operation,49),t}function rp(e){rs(e);for(var t,n=0,r=e.definitions;n<r.length;n++){var i=r[n];if("OperationDefinition"===i.kind){var o=i.operation;if("query"===o||"mutation"===o||"subscription"===o)return i}"FragmentDefinition"!==i.kind||t||(t=i)}if(t)return t;throw __DEV__?new nE("Expected a parsed GraphQL query with a query, mutation, subscription, or a fragment."):new nE(53)}function rd(e){var t=Object.create(null),n=e&&e.variableDefinitions;return n&&n.length&&n.forEach(function(e){e.defaultValue&&n4(t,e.variable.name,e.defaultValue)}),t}function rh(e,t){return t?t(e):n0.of()}function rv(e){return"function"==typeof e?new rg(e):e}function rm(e){return e.request.length<=1}var ry=function(e){function t(t,n){var r=e.call(this,t)||this;return r.link=n,r}return(0,ng.ZT)(t,e),t}(Error),rg=function(){function e(e){e&&(this.request=e)}return e.empty=function(){return new e(function(){return n0.of()})},e.from=function(t){return 0===t.length?e.empty():t.map(rv).reduce(function(e,t){return e.concat(t)})},e.split=function(t,n,r){var i=rv(n),o=rv(r||new e(rh));return new e(rm(i)&&rm(o)?function(e){return t(e)?i.request(e)||n0.of():o.request(e)||n0.of()}:function(e,n){return t(e)?i.request(e,n)||n0.of():o.request(e,n)||n0.of()})},e.execute=function(e,t){var n,r,i,o;return e.request((i=t.context,(r={variables:(n=function(e){for(var t=["query","operationName","variables","extensions","context"],n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];if(0>t.indexOf(i))throw __DEV__?new nE("illegal argument: ".concat(i)):new nE(26)}return e}(t)).variables||{},extensions:n.extensions||{},operationName:n.operationName,query:n.query}).operationName||(r.operationName="string"!=typeof r.query?rc(r.query)||void 0:""),o=(0,ng.pi)({},i),Object.defineProperty(r,"setContext",{enumerable:!1,value:function(e){o="function"==typeof e?(0,ng.pi)((0,ng.pi)({},o),e(o)):(0,ng.pi)((0,ng.pi)({},o),e)}}),Object.defineProperty(r,"getContext",{enumerable:!1,value:function(){return(0,ng.pi)({},o)}}),r))||n0.of()},e.concat=function(t,n){var r=rv(t);if(rm(r))return __DEV__&&nk.warn(new ry("You are calling concat on a terminating link, which will have no effect",r)),r;var i=rv(n);return new e(rm(i)?function(e){return r.request(e,function(e){return i.request(e)||n0.of()})||n0.of()}:function(e,t){return r.request(e,function(e){return i.request(e,t)||n0.of()})||n0.of()})},e.prototype.split=function(t,n,r){return this.concat(e.split(t,n,r||new e(rh)))},e.prototype.concat=function(t){return e.concat(this,t)},e.prototype.request=function(e,t){throw __DEV__?new nE("request is not implemented"):new nE(21)},e.prototype.onError=function(e,t){if(t&&t.error)return t.error(e),!1;throw e},e.prototype.setOnError=function(e){return this.onError=e,this},e}(),r_=rg.execute;let rb={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},rw=new Set(Object.keys(rb));function rE(e){let t=null==e?void 0:e.kind;return"string"==typeof t&&rw.has(t)}(o=l||(l={})).QUERY="query",o.MUTATION="mutation",o.SUBSCRIPTION="subscription",(a=f||(f={})).NAME="Name",a.DOCUMENT="Document",a.OPERATION_DEFINITION="OperationDefinition",a.VARIABLE_DEFINITION="VariableDefinition",a.SELECTION_SET="SelectionSet",a.FIELD="Field",a.ARGUMENT="Argument",a.FRAGMENT_SPREAD="FragmentSpread",a.INLINE_FRAGMENT="InlineFragment",a.FRAGMENT_DEFINITION="FragmentDefinition",a.VARIABLE="Variable",a.INT="IntValue",a.FLOAT="FloatValue",a.STRING="StringValue",a.BOOLEAN="BooleanValue",a.NULL="NullValue",a.ENUM="EnumValue",a.LIST="ListValue",a.OBJECT="ObjectValue",a.OBJECT_FIELD="ObjectField",a.DIRECTIVE="Directive",a.NAMED_TYPE="NamedType",a.LIST_TYPE="ListType",a.NON_NULL_TYPE="NonNullType",a.SCHEMA_DEFINITION="SchemaDefinition",a.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",a.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",a.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",a.FIELD_DEFINITION="FieldDefinition",a.INPUT_VALUE_DEFINITION="InputValueDefinition",a.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",a.UNION_TYPE_DEFINITION="UnionTypeDefinition",a.ENUM_TYPE_DEFINITION="EnumTypeDefinition",a.ENUM_VALUE_DEFINITION="EnumValueDefinition",a.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",a.DIRECTIVE_DEFINITION="DirectiveDefinition",a.SCHEMA_EXTENSION="SchemaExtension",a.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",a.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",a.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",a.UNION_TYPE_EXTENSION="UnionTypeExtension",a.ENUM_TYPE_EXTENSION="EnumTypeExtension",a.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension";let rk=Object.freeze({});function rS(e,t,n=rb){let r,i,o;let a=new Map;for(let s of Object.values(f))a.set(s,function(e,t){let n=e[t];return"object"==typeof n?n:"function"==typeof n?{enter:n,leave:void 0}:{enter:e.enter,leave:e.leave}}(t,s));let u=Array.isArray(e),c=[e],l=-1,p=[],d=e,h=[],v=[];do{var m,y,g;let _;l++;let b=l===c.length,w=b&&0!==p.length;if(b){if(i=0===v.length?void 0:h[h.length-1],d=o,o=v.pop(),w){if(u){d=d.slice();let E=0;for(let[k,S]of p){let x=k-E;null===S?(d.splice(x,1),E++):d[x]=S}}else for(let[O,T]of(d=Object.defineProperties({},Object.getOwnPropertyDescriptors(d)),p))d[O]=T}l=r.index,c=r.keys,p=r.edits,u=r.inArray,r=r.prev}else if(o){if(null==(d=o[i=u?l:c[l]]))continue;h.push(i)}if(!Array.isArray(d)){rE(d)||function(e,t){let n=Boolean(e);if(!n)throw Error(t)}(!1,`Invalid AST Node: ${function e(t,n){switch(typeof t){case"string":return JSON.stringify(t);case"function":return t.name?`[function ${t.name}]`:"[function]";case"object":return function(t,n){if(null===t)return"null";if(n.includes(t))return"[Circular]";let r=[...n,t];if("function"==typeof t.toJSON){let i=t.toJSON();if(i!==t)return"string"==typeof i?i:e(i,r)}else if(Array.isArray(t))return function(t,n){if(0===t.length)return"[]";if(n.length>2)return"[Array]";let r=Math.min(10,t.length),i=t.length-r,o=[];for(let a=0;a<r;++a)o.push(e(t[a],n));return 1===i?o.push("... 1 more item"):i>1&&o.push(`... ${i} more items`),"["+o.join(", ")+"]"}(t,r);return function(t,n){let r=Object.entries(t);if(0===r.length)return"{}";if(n.length>2)return"["+function(e){let t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){let n=e.constructor.name;if("string"==typeof n&&""!==n)return n}return t}(t)+"]";let i=r.map(([t,r])=>t+": "+e(r,n));return"{ "+i.join(", ")+" }"}(t,r)}(t,n);default:return String(t)}}(d,[])}.`);let P=b?null===(m=a.get(d.kind))||void 0===m?void 0:m.leave:null===(y=a.get(d.kind))||void 0===y?void 0:y.enter;if((_=null==P?void 0:P.call(t,d,i,o,h,v))===rk)break;if(!1===_){if(!b){h.pop();continue}}else if(void 0!==_&&(p.push([i,_]),!b)){if(rE(_))d=_;else{h.pop();continue}}}void 0===_&&w&&p.push([i,d]),b?h.pop():(r={inArray:u,index:l,keys:c,edits:p,prev:r},c=(u=Array.isArray(d))?d:null!==(g=n[d.kind])&&void 0!==g?g:[],l=-1,p=[],o&&v.push(o),o=d)}while(void 0!==r);return 0!==p.length?p[p.length-1][1]:e}function rx(e,t){var n,r=e.directives;return!r||!r.length||(n=[],r&&r.length&&r.forEach(function(e){var t;if(!("skip"!==(t=e.name.value)&&"include"!==t)){var r=e.arguments,i=e.name.value;__DEV__?nk(r&&1===r.length,"Incorrect number of arguments for the @".concat(i," directive.")):nk(r&&1===r.length,40);var o=r[0];__DEV__?nk(o.name&&"if"===o.name.value,"Invalid argument for the @".concat(i," directive.")):nk(o.name&&"if"===o.name.value,41);var a=o.value;__DEV__?nk(a&&("Variable"===a.kind||"BooleanValue"===a.kind),"Argument for the @".concat(i," directive must be a variable or a boolean value.")):nk(a&&("Variable"===a.kind||"BooleanValue"===a.kind),42),n.push({directive:e,ifArgument:o})}}),n).every(function(e){var n=e.directive,r=e.ifArgument,i=!1;return"Variable"===r.value.kind?(i=t&&t[r.value.name.value],__DEV__?nk(void 0!==i,"Invalid variable referenced in @".concat(n.name.value," directive.")):nk(void 0!==i,39)):i=r.value.value,"skip"===n.name.value?!i:i})}function rO(e,t,n){var r=new Set(e),i=r.size;return rS(t,{Directive:function(e){if(r.delete(e.name.value)&&(!n||!r.size))return rk}}),n?!r.size:r.size<i}var rT=function(e,t){var n;try{n=JSON.stringify(e)}catch(i){var r=__DEV__?new nE("Network request failed. ".concat(t," is not serializable: ").concat(i.message)):new nE(23);throw r.parseError=i,r}return n},rP="function"==typeof WeakMap&&"ReactNative"!==nT(function(){return navigator.product}),rA="function"==typeof WeakSet,rD="function"==typeof Symbol&&"function"==typeof Symbol.for,rC=rD&&Symbol.asyncIterator;function rR(e){var t={next:function(){return e.read()}};return rC&&(t[Symbol.asyncIterator]=function(){return this}),t}nT(function(){return window.document.createElement}),nT(function(){return navigator.userAgent.indexOf("jsdom")>=0});var rI=function(e,t,n){var r=Error(n);throw r.name="ServerError",r.response=e,r.statusCode=e.status,r.result=t,r},rF=Object.prototype.hasOwnProperty;function rM(e,t){e.status>=300&&rI(e,function(){try{return JSON.parse(t)}catch(e){return t}}(),"Response not successful: Received status code ".concat(e.status));try{return JSON.parse(t)}catch(r){var n=r;throw n.name="ServerParseError",n.response=e,n.statusCode=e.status,n.bodyText=t,n}}function rj(e,t){var n,r;"AbortError"!==e.name&&(e.result&&e.result.errors&&e.result.data&&(null===(n=t.next)||void 0===n||n.call(t,e.result)),null===(r=t.error)||void 0===r||r.call(t,e))}var rN=function(e){if(!e&&"undefined"==typeof fetch)throw __DEV__?new nE("\n\"fetch\" has not been found globally and no fetcher has been configured. To fix this, install a fetch package (like https://www.npmjs.com/package/cross-fetch), instantiate the fetcher, and pass it into your HttpLink constructor. For example:\n\nimport fetch from 'cross-fetch';\nimport { ApolloClient, HttpLink } from '@apollo/client';\nconst client = new ApolloClient({\n  link: new HttpLink({ uri: '/graphql', fetch })\n});\n    "):new nE(22)};function rV(e){return 9===e||32===e}let rL=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function rq(e){return rB[e.charCodeAt(0)]}let rB=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"];function rU(e){return rS(e,rQ)}let rQ={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>rz(e.definitions,"\n\n")},OperationDefinition:{leave(e){let t=rH("(",rz(e.variableDefinitions,", "),")"),n=rz([e.operation,rz([e.name,t]),rz(e.directives," ")]," ");return("query"===n?"":n+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:n,directives:r})=>e+": "+t+rH(" = ",n)+rH(" ",rz(r," "))},SelectionSet:{leave:({selections:e})=>r$(e)},Field:{leave({alias:e,name:t,arguments:n,directives:r,selectionSet:i}){let o=rH("",e,": ")+t,a=o+rH("(",rz(n,", "),")");return a.length>80&&(a=o+rH("(\n",rW(rz(n,"\n")),"\n)")),rz([a,rz(r," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+rH(" ",rz(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>rz(["...",rH("on ",e),rz(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:i})=>`fragment ${e}${rH("(",rz(n,", "),")")} on ${t} ${rH("",rz(r," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?function(e,t){let n=e.replace(/"""/g,'\\"""'),r=n.split(/\r\n|[\n\r]/g),i=1===r.length,o=r.length>1&&r.slice(1).every(e=>0===e.length||rV(e.charCodeAt(0))),a=n.endsWith('\\"""'),s=e.endsWith('"')&&!a,u=e.endsWith("\\"),c=s||u,l=!(null!=t&&t.minimize)&&(!i||e.length>70||c||o||a),f="",p=i&&rV(e.charCodeAt(0));return(l&&!p||o)&&(f+="\n"),f+=n,(l||c)&&(f+="\n"),'"""'+f+'"""'}(e):`"${e.replace(rL,rq)}"`},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+rz(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+rz(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+rH("(",rz(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:n})=>rH("",e,"\n")+rz(["schema",rz(t," "),r$(n)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:n})=>rH("",e,"\n")+rz(["scalar",t,rz(n," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>rH("",e,"\n")+rz(["type",t,rH("implements ",rz(n," & ")),rz(r," "),r$(i)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:n,type:r,directives:i})=>rH("",e,"\n")+t+(rG(n)?rH("(\n",rW(rz(n,"\n")),"\n)"):rH("(",rz(n,", "),")"))+": "+r+rH(" ",rz(i," "))},InputValueDefinition:{leave:({description:e,name:t,type:n,defaultValue:r,directives:i})=>rH("",e,"\n")+rz([t+": "+n,rH("= ",r),rz(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>rH("",e,"\n")+rz(["interface",t,rH("implements ",rz(n," & ")),rz(r," "),r$(i)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:n,types:r})=>rH("",e,"\n")+rz(["union",t,rz(n," "),rH("= ",rz(r," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:n,values:r})=>rH("",e,"\n")+rz(["enum",t,rz(n," "),r$(r)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:n})=>rH("",e,"\n")+rz([t,rz(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:n,fields:r})=>rH("",e,"\n")+rz(["input",t,rz(n," "),r$(r)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:n,repeatable:r,locations:i})=>rH("",e,"\n")+"directive @"+t+(rG(n)?rH("(\n",rW(rz(n,"\n")),"\n)"):rH("(",rz(n,", "),")"))+(r?" repeatable":"")+" on "+rz(i," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>rz(["extend schema",rz(e," "),r$(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>rz(["extend scalar",e,rz(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>rz(["extend type",e,rH("implements ",rz(t," & ")),rz(n," "),r$(r)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>rz(["extend interface",e,rH("implements ",rz(t," & ")),rz(n," "),r$(r)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>rz(["extend union",e,rz(t," "),rH("= ",rz(n," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>rz(["extend enum",e,rz(t," "),r$(n)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>rz(["extend input",e,rz(t," "),r$(n)]," ")}};function rz(e,t=""){var n;return null!==(n=null==e?void 0:e.filter(e=>e).join(t))&&void 0!==n?n:""}function r$(e){return rH("{\n",rW(rz(e,"\n")),"\n}")}function rH(e,t,n=""){return null!=t&&""!==t?e+t+n:""}function rW(e){return rH("  ",e.replace(/\n/g,"\n  "))}function rG(e){var t;return null!==(t=null==e?void 0:e.some(e=>e.includes("\n")))&&void 0!==t&&t}var rY={http:{includeQuery:!0,includeExtensions:!1,preserveHeaderCase:!1},headers:{accept:"*/*","content-type":"application/json"},options:{method:"POST"}},rJ=function(e,t){return t(e)},rX=function(){if("undefined"==typeof AbortController)return{controller:!1,signal:!1};var e=new AbortController,t=e.signal;return{controller:e,signal:t}};function rZ(e){return new n0(function(t){t.error(e)})}var rK=nT(function(){return fetch}),r0=function(e){void 0===e&&(e={});var t=e.uri,n=void 0===t?"/graphql":t,r=e.fetch,i=e.print,o=void 0===i?rJ:i,a=e.includeExtensions,s=e.preserveHeaderCase,u=e.useGETForQueries,c=e.includeUnusedVariables,l=void 0!==c&&c,f=(0,ng._T)(e,["uri","fetch","print","includeExtensions","preserveHeaderCase","useGETForQueries","includeUnusedVariables"]);__DEV__&&rN(r||rK);var p={http:{includeExtensions:a,preserveHeaderCase:s},options:f.fetchOptions,credentials:f.credentials,headers:f.headers};return new rg(function(e){var t,i,a,s=(t=e,i=n,t.getContext().uri||("function"==typeof i?i(t):i||"/graphql")),c=e.getContext(),f={};if(c.clientAwareness){var d=c.clientAwareness,h=d.name,v=d.version;h&&(f["apollographql-client-name"]=h),v&&(f["apollographql-client-version"]=v)}var m=(0,ng.pi)((0,ng.pi)({},f),c.headers),y=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i={},o={};n.forEach(function(e){i=(0,ng.pi)((0,ng.pi)((0,ng.pi)({},i),e.options),{headers:(0,ng.pi)((0,ng.pi)({},i.headers),e.headers)}),e.credentials&&(i.credentials=e.credentials),o=(0,ng.pi)((0,ng.pi)({},o),e.http)}),i.headers=function(e,t){if(!t){var n=Object.create(null);return Object.keys(Object(e)).forEach(function(t){n[t.toLowerCase()]=e[t]}),n}var r=Object.create(null);Object.keys(Object(e)).forEach(function(t){r[t.toLowerCase()]={originalName:t,value:e[t]}});var i=Object.create(null);return Object.keys(r).forEach(function(e){i[r[e].originalName]=r[e].value}),i}(i.headers,o.preserveHeaderCase);var a=e.operationName,s=e.extensions,u=e.variables,c=e.query,l={operationName:a,variables:u};return o.includeExtensions&&(l.extensions=s),o.includeQuery&&(l.query=t(c,rU)),{options:i,body:l}}(e,o,rY,p,{http:c.http,options:c.fetchOptions,credentials:c.credentials,headers:m}),g=y.options,_=y.body;if(_.variables&&!l){var b=new Set(Object.keys(_.variables));rS(e.query,{Variable:function(e,t,n){n&&"VariableDefinition"!==n.kind&&b.delete(e.name.value)}}),b.size&&(_.variables=(0,ng.pi)({},_.variables),b.forEach(function(e){delete _.variables[e]}))}if(!g.signal){var w=rX(),E=w.controller,k=w.signal;(a=E)&&(g.signal=k)}if(u&&!e.query.definitions.some(function(e){return"OperationDefinition"===e.kind&&"mutation"===e.operation})&&(g.method="GET"),rO(["defer"],e.query)&&(g.headers.accept="multipart/mixed; deferSpec=20220824, application/json"),"GET"===g.method){var S=function(e,t){var n=[],r=function(e,t){n.push("".concat(e,"=").concat(encodeURIComponent(t)))};if("query"in t&&r("query",t.query),t.operationName&&r("operationName",t.operationName),t.variables){var i=void 0;try{i=rT(t.variables,"Variables map")}catch(o){return{parseError:o}}r("variables",i)}if(t.extensions){var a=void 0;try{a=rT(t.extensions,"Extensions map")}catch(s){return{parseError:s}}r("extensions",a)}var u="",c=e,l=e.indexOf("#");-1!==l&&(u=e.substr(l),c=e.substr(0,l));var f=-1===c.indexOf("?")?"?":"&";return{newURI:c+f+n.join("&")+u}}(s,_),x=S.newURI,O=S.parseError;if(O)return rZ(O);s=x}else try{g.body=rT(_,"Payload")}catch(T){return rZ(T)}return new n0(function(t){return(r||nT(function(){return fetch})||rK)(s,g).then(function(n){e.setContext({response:n});var r,i=null===(r=n.headers)||void 0===r?void 0:r.get("content-type");return null!==i&&/^multipart\/mixed/i.test(i)?function(e,t){var n,r,i;return(0,ng.mG)(this,void 0,void 0,function(){var o,a,s,u,c,l,f,p,d,h,v,m,y,g,_,b,w,E,k;return(0,ng.Jh)(this,function(S){switch(S.label){case 0:if(void 0===TextDecoder)throw Error("TextDecoder must be defined in the environment: please import a polyfill.");o=new TextDecoder("utf-8"),a=null===(n=e.headers)||void 0===n?void 0:n.get("content-type"),s="boundary=",u=(null==a?void 0:a.includes(s))?null==a?void 0:a.substring((null==a?void 0:a.indexOf(s))+s.length).replace(/['"]/g,"").replace(/\;(.*)/gm,"").trim():"-",c="--".concat(u),l="",f=function(e){var t,n,r,i,o,a,s=e;if(e.body&&(s=e.body),t=s,rC&&t[Symbol.asyncIterator])return r=s[Symbol.asyncIterator](),(n={next:function(){return r.next()}})[Symbol.asyncIterator]=function(){return this},n;if(s.getReader)return rR(s.getReader());if(s.stream)return rR(s.stream().getReader());if(s.arrayBuffer)return i=s.arrayBuffer(),o=!1,a={next:function(){return o?Promise.resolve({value:void 0,done:!0}):(o=!0,new Promise(function(e,t){i.then(function(t){e({value:t,done:!1})}).catch(t)}))}},rC&&(a[Symbol.asyncIterator]=function(){return this}),a;if(s.pipe)return function(e){var t=null,n=null,r=!1,i=[],o=[];function a(e){if(!n){if(o.length){var t=o.shift();if(Array.isArray(t)&&t[0])return t[0]({value:e,done:!1})}i.push(e)}}function s(e){n=e,o.slice().forEach(function(t){t[1](e)}),t&&t()}function u(){r=!0,o.slice().forEach(function(e){e[0]({value:void 0,done:!0})}),t&&t()}t=function(){t=null,e.removeListener("data",a),e.removeListener("error",s),e.removeListener("end",u),e.removeListener("finish",u),e.removeListener("close",u)},e.on("data",a),e.on("error",s),e.on("end",u),e.on("finish",u),e.on("close",u);var c={next:function(){return new Promise(function(e,t){return n?t(n):i.length?e({value:i.shift(),done:!1}):r?e({value:void 0,done:!0}):void o.push([e,t])})}};return rC&&(c[Symbol.asyncIterator]=function(){return this}),c}(s);throw Error("Unknown body type for responseIterator. Please pass a streamable response.")}(e),p=!0,S.label=1;case 1:if(!p)return[3,3];return[4,f.next()];case 2:for(h=(d=S.sent()).value,v=d.done,m="string"==typeof h?h:o.decode(h),p=!v,l+=m,y=l.indexOf(c);y>-1;){if(g=void 0,g=(k=[l.slice(0,y),l.slice(y+c.length)])[0],l=k[1],g.trim()){if(_=g.indexOf("\r\n\r\n"),(b=function(e){var t={};return e.split("\n").forEach(function(e){var n=e.indexOf(":");if(n>-1){var r=e.slice(0,n).trim().toLowerCase(),i=e.slice(n+1).trim();t[r]=i}}),t}(g.slice(0,_))["content-type"])&&-1===b.toLowerCase().indexOf("application/json"))throw Error("Unsupported patch content type: application/json is required.");w=g.slice(_);try{E=rM(e,w.replace("\r\n","")),(Object.keys(E).length>1||"data"in E||"incremental"in E||"errors"in E)&&(null===(r=t.next)||void 0===r||r.call(t,E))}catch(x){rj(x,t)}}y=l.indexOf(c)}return[3,1];case 3:return null===(i=t.complete)||void 0===i||i.call(t),[2]}})})}(n,t):function(e,t,n){var r;(r=e).text().then(function(e){return rM(r,e)}).then(function(e){return r.status>=300&&rI(r,e,"Response not successful: Received status code ".concat(r.status)),Array.isArray(e)||rF.call(e,"data")||rF.call(e,"errors")||rI(r,e,"Server response was missing for query '".concat(Array.isArray(t)?t.map(function(e){return e.operationName}):t.operationName,"'.")),e}).then(function(e){var t,r;null===(t=n.next)||void 0===t||t.call(n,e),null===(r=n.complete)||void 0===r||r.call(n)}).catch(function(e){return rj(e,n)})}(n,e,t)}).catch(function(e){return rj(e,t)}),function(){a&&a.abort()}})})},r1=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,r0(t).request)||this;return n.options=t,n}return(0,ng.ZT)(t,e),t}(rg),r2=Object.prototype,r3=r2.toString,r5=r2.hasOwnProperty,r6=Function.prototype.toString,r8=new Map;function r4(e,t){try{return function e(t,n){if(t===n)return!0;var r=r3.call(t);if(r!==r3.call(n))return!1;switch(r){case"[object Array]":if(t.length!==n.length)break;case"[object Object]":if(it(t,n))return!0;var i=r9(t),o=r9(n),a=i.length;if(a!==o.length)break;for(var s=0;s<a;++s)if(!r5.call(n,i[s]))return!1;for(var s=0;s<a;++s){var u=i[s];if(!e(t[u],n[u]))return!1}return!0;case"[object Error]":return t.name===n.name&&t.message===n.message;case"[object Number]":if(t!=t)return n!=n;case"[object Boolean]":case"[object Date]":return+t==+n;case"[object RegExp]":case"[object String]":return t=="".concat(n);case"[object Map]":case"[object Set]":if(t.size!==n.size)break;if(it(t,n))return!0;for(var c=t.entries(),l="[object Map]"===r;;){var f=c.next();if(f.done)break;var p=f.value,d=p[0],h=p[1];if(!n.has(d)||l&&!e(h,n.get(d)))return!1}return!0;case"[object Uint16Array]":case"[object Uint8Array]":case"[object Uint32Array]":case"[object Int32Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object ArrayBuffer]":t=new Uint8Array(t),n=new Uint8Array(n);case"[object DataView]":var v=t.byteLength;if(v===n.byteLength)for(;v--&&t[v]===n[v];);return -1===v;case"[object AsyncFunction]":case"[object GeneratorFunction]":case"[object AsyncGeneratorFunction]":case"[object Function]":var m,y=r6.call(t);if(y!==r6.call(n))break;return!((m=y.length-ie.length)>=0)||y.indexOf(ie,m)!==m}return!1}(e,t)}finally{r8.clear()}}function r9(e){return Object.keys(e).filter(r7,e)}function r7(e){return void 0!==this[e]}var ie="{ [native code] }";function it(e,t){var n=r8.get(e);if(n){if(n.has(t))return!0}else r8.set(e,n=new Set);return n.add(t),!1}function ir(e){return Array.isArray(e)&&e.length>0}var ii=Object.prototype.hasOwnProperty;function io(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return ia(e)}function ia(e){var t=e[0]||{},n=e.length;if(n>1)for(var r=new iu,i=1;i<n;++i)t=r.merge(t,e[i]);return t}var is=function(e,t,n){return this.merge(e[n],t[n])},iu=function(){function e(e){void 0===e&&(e=is),this.reconciler=e,this.isObject=n1,this.pastCopies=new Set}return e.prototype.merge=function(e,t){for(var n=this,r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];return n1(t)&&n1(e)?(Object.keys(t).forEach(function(i){if(ii.call(e,i)){var o=e[i];if(t[i]!==o){var a=n.reconciler.apply(n,(0,ng.ev)([e,t,i],r,!1));a!==o&&((e=n.shallowCopyForMerge(e))[i]=a)}}else(e=n.shallowCopyForMerge(e))[i]=t[i]}),e):t},e.prototype.shallowCopyForMerge=function(e){return n1(e)&&!this.pastCopies.has(e)&&(e=Array.isArray(e)?e.slice(0):(0,ng.pi)({__proto__:Object.getPrototypeOf(e)},e),this.pastCopies.add(e)),e},e}();function ic(e){return"incremental"in e}function il(e,t){var n=e,r=new iu;return ic(t)&&ir(t.incremental)&&t.incremental.forEach(function(e){for(var t=e.data,i=e.path,o=i.length-1;o>=0;--o){var a=i[o],s=isNaN(+a)?{}:[];s[a]=t,t=s}n=r.merge(n,t)}),n}var ip=function(){return Object.create(null)},id=Array.prototype,ih=id.forEach,iv=id.slice,im=function(){function e(e,t){void 0===e&&(e=!0),void 0===t&&(t=ip),this.weakness=e,this.makeData=t}return e.prototype.lookup=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.lookupArray(e)},e.prototype.lookupArray=function(e){var t=this;return ih.call(e,function(e){return t=t.getChildTrie(e)}),t.data||(t.data=this.makeData(iv.call(e)))},e.prototype.getChildTrie=function(t){var n=this.weakness&&function(e){switch(typeof e){case"object":if(null===e)break;case"function":return!0}return!1}(t)?this.weak||(this.weak=new WeakMap):this.strong||(this.strong=new Map),r=n.get(t);return r||n.set(t,r=new e(this.weakness,this.makeData)),r},e}();function iy(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Object.create(null);return e.forEach(function(e){e&&Object.keys(e).forEach(function(t){var r=e[t];void 0!==r&&(n[t]=r)})}),n}var ig=Object.prototype.hasOwnProperty;function i_(e){return null==e}var ib=Array.isArray;function iw(e,t){var n=e.__typename,r=e.id,i=e._id;if("string"==typeof n&&(t&&(t.keyObject=i_(r)?i_(i)?void 0:{_id:i}:{id:r}),i_(r)&&!i_(i)&&(r=i),!i_(r)))return"".concat(n,":").concat("number"==typeof r||"string"==typeof r?r:JSON.stringify(r))}var iE={dataIdFromObject:iw,addTypename:!0,resultCaching:!0,canonizeResults:!1};function ik(e){var t=e.canonizeResults;return void 0===t?iE.canonizeResults:t}var iS=/^[_a-z][_0-9a-z]*/i;function ix(e){var t=e.match(iS);return t?t[0]:e}function iO(e){return n1(e)&&!n8(e)&&!ib(e)}function iT(e,t){var n=n3(rl(e));return{fragmentMap:n,lookupFragment:function(e){var r=n[e];return!r&&t&&(r=t.lookup(e)),r||null}}}var iP=function(){function e(){this.known=new(rA?WeakSet:Set),this.pool=new im(rP),this.passes=new WeakMap,this.keysByJSON=new Map,this.empty=this.admit({})}return e.prototype.isKnown=function(e){return n1(e)&&this.known.has(e)},e.prototype.pass=function(e){if(n1(e)){var t=n1(e)?ib(e)?e.slice(0):(0,ng.pi)({__proto__:Object.getPrototypeOf(e)},e):e;return this.passes.set(t,e),t}return e},e.prototype.admit=function(e){var t=this;if(n1(e)){var n=this.passes.get(e);if(n)return n;switch(Object.getPrototypeOf(e)){case Array.prototype:if(this.known.has(e))break;var r=e.map(this.admit,this),i=this.pool.lookupArray(r);return!i.array&&(this.known.add(i.array=r),__DEV__&&Object.freeze(r)),i.array;case null:case Object.prototype:if(this.known.has(e))break;var o=Object.getPrototypeOf(e),a=[o],s=this.sortedKeys(e);a.push(s.json);var u=a.length;s.sorted.forEach(function(n){a.push(t.admit(e[n]))});var i=this.pool.lookupArray(a);if(!i.object){var c=i.object=Object.create(o);this.known.add(c),s.sorted.forEach(function(e,t){c[e]=a[u+t]}),__DEV__&&Object.freeze(c)}return i.object}}return e},e.prototype.sortedKeys=function(e){var t=Object.keys(e),n=this.pool.lookupArray(t);if(!n.keys){t.sort();var r=JSON.stringify(t);(n.keys=this.keysByJSON.get(r))||this.keysByJSON.set(r,n.keys={sorted:t,json:r})}return n.keys},e}(),iA=Object.assign(function(e){if(n1(e)){void 0===p&&iD();var t=p.admit(e),n=d.get(t);return void 0===n&&d.set(t,n=JSON.stringify(t)),n}return JSON.stringify(e)},{reset:iD});function iD(){p=new iP,d=new(rP?WeakMap:Map)}function iC(e,t,n){return new n0(function(r){var i=r.next,o=r.error,a=r.complete,s=0,u=!1,c={then:function(e){return new Promise(function(t){return t(e())})}};function l(e,t){return e?function(t){++s;var n=function(){return e(t)};c=c.then(n,n).then(function(e){--s,i&&i.call(r,e),u&&f.complete()},function(e){throw--s,e}).catch(function(e){o&&o.call(r,e)})}:function(e){return t&&t.call(r,e)}}var f={next:l(t,i),error:l(n,o),complete:function(){u=!0,!s&&a&&a.call(r)}},p=e.subscribe(f);return function(){return p.unsubscribe()}})}function iR(e){var t=ir(e.errors)?e.errors.slice(0):[];return ic(e)&&ir(e.incremental)&&e.incremental.forEach(function(e){e.errors&&t.push.apply(t,e.errors)}),t}function iI(e,t,n){var r=0;return e.forEach(function(n,i){t.call(this,n,i,e)&&(e[r++]=n)},n),e.length=r,e}var iF={kind:"Field",name:{kind:"Name",value:"__typename"}};function iM(e){var t;return!function e(t,n){return!t||t.selectionSet.selections.every(function(t){return"FragmentSpread"===t.kind&&e(n[t.name.value],n)})}(ru(e)||(__DEV__?nk("Document"===e.kind,'Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a "gql" tag? http://docs.apollostack.com/apollo-client/core.html#gql'):nk("Document"===e.kind,50),__DEV__?nk(e.definitions.length<=1,"Fragment must have exactly one definition."):nk(e.definitions.length<=1,51),t=e.definitions[0],__DEV__?nk("FragmentDefinition"===t.kind,"Must be a fragment definition."):nk("FragmentDefinition"===t.kind,52),t),n3(rl(e)))?e:null}function ij(e){return function(t){return e.some(function(e){return e.name&&e.name===t.name.value||e.test&&e.test(t)})}}function iN(e,t){var n,r,i,o=Object.create(null),a=[],s=Object.create(null),u=[],c=iM(rS(t,{Variable:{enter:function(e,t,n){"VariableDefinition"!==n.kind&&(o[e.name.value]=!0)}},Field:{enter:function(t){if(e&&t.directives&&e.some(function(e){return e.remove})&&t.directives&&t.directives.some(ij(e)))return t.arguments&&t.arguments.forEach(function(e){"Variable"===e.value.kind&&a.push({name:e.value.name.value})}),t.selectionSet&&(function e(t){var n=[];return t.selections.forEach(function(t){(ro(t)||ra(t))&&t.selectionSet?e(t.selectionSet).forEach(function(e){return n.push(e)}):"FragmentSpread"===t.kind&&n.push(t)}),n})(t.selectionSet).forEach(function(e){u.push({name:e.name.value})}),null}},FragmentSpread:{enter:function(e){s[e.name.value]=!0}},Directive:{enter:function(t){if(ij(e)(t))return null}}}));return c&&iI(a,function(e){return!!e.name&&!o[e.name]}).length&&(n=a,r=c,i=function(e){return n.some(function(t){return e.value&&"Variable"===e.value.kind&&e.value.name&&(t.name===e.value.name.value||t.test&&t.test(e))})},c=iM(rS(r,{OperationDefinition:{enter:function(e){return(0,ng.pi)((0,ng.pi)({},e),{variableDefinitions:e.variableDefinitions?e.variableDefinitions.filter(function(e){return!n.some(function(t){return t.name===e.variable.name.value})}):[]})}},Field:{enter:function(e){if(n.some(function(e){return e.remove})){var t=0;if(e.arguments&&e.arguments.forEach(function(e){i(e)&&(t+=1)}),1===t)return null}}},Argument:{enter:function(e){if(i(e))return null}}}))),c&&iI(u,function(e){return!!e.name&&!s[e.name]}).length&&(c=function(e,t){function n(t){if(e.some(function(e){return e.name===t.name.value}))return null}return iM(rS(t,{FragmentSpread:{enter:n},FragmentDefinition:{enter:n}}))}(u,c)),c}var iV=Object.assign(function(e){return rS(e,{SelectionSet:{enter:function(e,t,n){if(!n||"OperationDefinition"!==n.kind){var r=e.selections;if(!(!r||r.some(function(e){return ro(e)&&("__typename"===e.name.value||0===e.name.value.lastIndexOf("__",0))}))&&!(ro(n)&&n.directives&&n.directives.some(function(e){return"export"===e.name.value})))return(0,ng.pi)((0,ng.pi)({},e),{selections:(0,ng.ev)((0,ng.ev)([],r,!0),[iF],!1)})}}}})},{added:function(e){return e===iF}}),iL={test:function(e){var t="connection"===e.name.value;return t&&(!e.arguments||!e.arguments.some(function(e){return"key"===e.name.value}))&&__DEV__&&nk.warn("Removing an @connection directive even though it does not have a key. You may want to use the key parameter to specify a store key."),t}},iq=new Map;function iB(e){var t=iq.get(e)||1;return iq.set(e,t+1),"".concat(e,":").concat(t,":").concat(Math.random().toString(36).slice(2))}function iU(e,t,n){var r=[];e.forEach(function(e){return e[t]&&r.push(e)}),r.forEach(function(e){return e[t](n)})}function iQ(e){function t(t){Object.defineProperty(e,t,{value:n0})}return rD&&Symbol.species&&t(Symbol.species),t("@@species"),e}function iz(e){return e&&"function"==typeof e.then}var i$=function(e){function t(t){var n=e.call(this,function(e){return n.addObserver(e),function(){return n.removeObserver(e)}})||this;return n.observers=new Set,n.promise=new Promise(function(e,t){n.resolve=e,n.reject=t}),n.handlers={next:function(e){null!==n.sub&&(n.latest=["next",e],n.notify("next",e),iU(n.observers,"next",e))},error:function(e){var t=n.sub;null!==t&&(t&&setTimeout(function(){return t.unsubscribe()}),n.sub=null,n.latest=["error",e],n.reject(e),n.notify("error",e),iU(n.observers,"error",e))},complete:function(){var e=n.sub;if(null!==e){var t=n.sources.shift();t?iz(t)?t.then(function(e){return n.sub=e.subscribe(n.handlers)}):n.sub=t.subscribe(n.handlers):(e&&setTimeout(function(){return e.unsubscribe()}),n.sub=null,n.latest&&"next"===n.latest[0]?n.resolve(n.latest[1]):n.resolve(),n.notify("complete"),iU(n.observers,"complete"))}}},n.nextResultListeners=new Set,n.cancel=function(e){n.reject(e),n.sources=[],n.handlers.complete()},n.promise.catch(function(e){}),"function"==typeof t&&(t=[new n0(t)]),iz(t)?t.then(function(e){return n.start(e)},n.handlers.error):n.start(t),n}return(0,ng.ZT)(t,e),t.prototype.start=function(e){void 0===this.sub&&(this.sources=Array.from(e),this.handlers.complete())},t.prototype.deliverLastMessage=function(e){if(this.latest){var t=this.latest[0],n=e[t];n&&n.call(e,this.latest[1]),null===this.sub&&"next"===t&&e.complete&&e.complete()}},t.prototype.addObserver=function(e){this.observers.has(e)||(this.deliverLastMessage(e),this.observers.add(e))},t.prototype.removeObserver=function(e){this.observers.delete(e)&&this.observers.size<1&&this.handlers.complete()},t.prototype.notify=function(e,t){var n=this.nextResultListeners;n.size&&(this.nextResultListeners=new Set,n.forEach(function(n){return n(e,t)}))},t.prototype.beforeNext=function(e){var t=!1;this.nextResultListeners.add(function(n,r){t||(t=!0,e(n,r))})},t}(n0);iQ(i$);var iH=function(e){var t="";return(ir(e.graphQLErrors)||ir(e.clientErrors))&&(e.graphQLErrors||[]).concat(e.clientErrors||[]).forEach(function(e){var n=e?e.message:"Error message not found.";t+="".concat(n,"\n")}),e.networkError&&(t+="".concat(e.networkError.message,"\n")),t=t.replace(/\n$/,"")},iW=function(e){function t(n){var r=n.graphQLErrors,i=n.clientErrors,o=n.networkError,a=n.errorMessage,s=n.extraInfo,u=e.call(this,a)||this;return u.name="ApolloError",u.graphQLErrors=r||[],u.clientErrors=i||[],u.networkError=o||null,u.message=a||iH(u),u.extraInfo=s,u.__proto__=t.prototype,u}return(0,ng.ZT)(t,e),t}(Error);function iG(e){return!!e&&e<7}(s=h||(h={}))[s.loading=1]="loading",s[s.setVariables=2]="setVariables",s[s.fetchMore=3]="fetchMore",s[s.refetch=4]="refetch",s[s.poll=6]="poll",s[s.ready=7]="ready",s[s.error=8]="error";var iY=Object.prototype.toString;function iJ(e,t){switch(iY.call(e)){case"[object Array]":if((t=t||new Map).has(e))return t.get(e);var n=e.slice(0);return t.set(e,n),n.forEach(function(e,r){n[r]=iJ(e,t)}),n;case"[object Object]":if((t=t||new Map).has(e))return t.get(e);var r=Object.create(Object.getPrototypeOf(e));return t.set(e,r),Object.keys(e).forEach(function(n){r[n]=iJ(e[n],t)}),r;default:return e}}var iX=Object.assign,iZ=Object.hasOwnProperty,iK=function(e){function t(t){var n=t.queryManager,r=t.queryInfo,i=t.options,o=e.call(this,function(e){try{var t=e._subscription._observer;t&&!t.error&&(t.error=i1)}catch(n){}var r=!o.observers.size;o.observers.add(e);var i=o.last;return i&&i.error?e.error&&e.error(i.error):i&&i.result&&e.next&&e.next(i.result),r&&o.reobserve().catch(function(){}),function(){o.observers.delete(e)&&!o.observers.size&&o.tearDownQuery()}})||this;o.observers=new Set,o.subscriptions=new Set,o.queryInfo=r,o.queryManager=n,o.isTornDown=!1;var a=n.defaultOptions.watchQuery,s=(void 0===a?{}:a).fetchPolicy,u=void 0===s?"cache-first":s,c=i.fetchPolicy,l=void 0===c?u:c,f=i.initialFetchPolicy;o.options=(0,ng.pi)((0,ng.pi)({},i),{initialFetchPolicy:void 0===f?"standby"===l?u:l:f,fetchPolicy:l}),o.queryId=r.queryId||n.generateQueryId();var p=ru(o.query);return o.queryName=p&&p.name&&p.name.value,o}return(0,ng.ZT)(t,e),Object.defineProperty(t.prototype,"query",{get:function(){return this.queryManager.transform(this.options.query).document},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"variables",{get:function(){return this.options.variables},enumerable:!1,configurable:!0}),t.prototype.result=function(){var e=this;return new Promise(function(t,n){var r={next:function(n){t(n),e.observers.delete(r),e.observers.size||e.queryManager.removeQuery(e.queryId),setTimeout(function(){i.unsubscribe()},0)},error:n},i=e.subscribe(r)})},t.prototype.getCurrentResult=function(e){void 0===e&&(e=!0);var t=this.getLastResult(!0),n=this.queryInfo.networkStatus||t&&t.networkStatus||h.ready,r=(0,ng.pi)((0,ng.pi)({},t),{loading:iG(n),networkStatus:n}),i=this.options.fetchPolicy,o=void 0===i?"cache-first":i;if("network-only"===o||"no-cache"===o||"standby"===o||this.queryManager.transform(this.options.query).hasForcedResolvers);else{var a=this.queryInfo.getDiff();(a.complete||this.options.returnPartialData)&&(r.data=a.result),r4(r.data,{})&&(r.data=void 0),a.complete?(delete r.partial,a.complete&&r.networkStatus===h.loading&&("cache-first"===o||"cache-only"===o)&&(r.networkStatus=h.ready,r.loading=!1)):r.partial=!0,!__DEV__||a.complete||this.options.partialRefetch||r.loading||r.data||r.error||i2(a.missing)}return e&&this.updateLastResult(r),r},t.prototype.isDifferentFromLastResult=function(e,t){return!this.last||!r4(this.last.result,e)||t&&!r4(this.last.variables,t)},t.prototype.getLast=function(e,t){var n=this.last;if(n&&n[e]&&(!t||r4(n.variables,this.variables)))return n[e]},t.prototype.getLastResult=function(e){return this.getLast("result",e)},t.prototype.getLastError=function(e){return this.getLast("error",e)},t.prototype.resetLastResults=function(){delete this.last,this.isTornDown=!1},t.prototype.resetQueryStoreErrors=function(){this.queryManager.resetErrors(this.queryId)},t.prototype.refetch=function(e){var t,n={pollInterval:0},r=this.options.fetchPolicy;if("cache-and-network"===r?n.fetchPolicy=r:"no-cache"===r?n.fetchPolicy="no-cache":n.fetchPolicy="network-only",__DEV__&&e&&iZ.call(e,"variables")){var i=rf(this.query),o=i.variableDefinitions;(!o||!o.some(function(e){return"variables"===e.variable.name.value}))&&__DEV__&&nk.warn("Called refetch(".concat(JSON.stringify(e),") for query ").concat((null===(t=i.name)||void 0===t?void 0:t.value)||JSON.stringify(i),", which does not declare a $variables variable.\nDid you mean to call refetch(variables) instead of refetch({ variables })?"))}return e&&!r4(this.options.variables,e)&&(n.variables=this.options.variables=(0,ng.pi)((0,ng.pi)({},this.options.variables),e)),this.queryInfo.resetLastWrite(),this.reobserve(n,h.refetch)},t.prototype.fetchMore=function(e){var t=this,n=(0,ng.pi)((0,ng.pi)({},e.query?e:(0,ng.pi)((0,ng.pi)((0,ng.pi)((0,ng.pi)({},this.options),{query:this.query}),e),{variables:(0,ng.pi)((0,ng.pi)({},this.options.variables),e.variables)})),{fetchPolicy:"no-cache"}),r=this.queryManager.generateQueryId(),i=this.queryInfo,o=i.networkStatus;i.networkStatus=h.fetchMore,n.notifyOnNetworkStatusChange&&this.observe();var a=new Set;return this.queryManager.fetchQuery(r,n,h.fetchMore).then(function(s){return t.queryManager.removeQuery(r),i.networkStatus===h.fetchMore&&(i.networkStatus=o),t.queryManager.cache.batch({update:function(r){var i=e.updateQuery;i?r.updateQuery({query:t.query,variables:t.variables,returnPartialData:!0,optimistic:!1},function(e){return i(e,{fetchMoreResult:s.data,variables:n.variables})}):r.writeQuery({query:n.query,variables:n.variables,data:s.data})},onWatchUpdated:function(e){a.add(e.query)}}),s}).finally(function(){a.has(t.query)||i0(t)})},t.prototype.subscribeToMore=function(e){var t=this,n=this.queryManager.startGraphQLSubscription({query:e.document,variables:e.variables,context:e.context}).subscribe({next:function(n){var r=e.updateQuery;r&&t.updateQuery(function(e,t){return r(e,{subscriptionData:n,variables:t.variables})})},error:function(t){if(e.onError){e.onError(t);return}__DEV__&&nk.error("Unhandled GraphQL subscription error",t)}});return this.subscriptions.add(n),function(){t.subscriptions.delete(n)&&n.unsubscribe()}},t.prototype.setOptions=function(e){return this.reobserve(e)},t.prototype.setVariables=function(e){return r4(this.variables,e)?this.observers.size?this.result():Promise.resolve():(this.options.variables=e,this.observers.size)?this.reobserve({fetchPolicy:this.options.initialFetchPolicy,variables:e},h.setVariables):Promise.resolve()},t.prototype.updateQuery=function(e){var t=this.queryManager,n=e(t.cache.diff({query:this.options.query,variables:this.variables,returnPartialData:!0,optimistic:!1}).result,{variables:this.variables});n&&(t.cache.writeQuery({query:this.options.query,data:n,variables:this.variables}),t.broadcastQueries())},t.prototype.startPolling=function(e){this.options.pollInterval=e,this.updatePolling()},t.prototype.stopPolling=function(){this.options.pollInterval=0,this.updatePolling()},t.prototype.applyNextFetchPolicy=function(e,t){if(t.nextFetchPolicy){var n=t.fetchPolicy,r=void 0===n?"cache-first":n,i=t.initialFetchPolicy,o=void 0===i?r:i;"standby"===r||("function"==typeof t.nextFetchPolicy?t.fetchPolicy=t.nextFetchPolicy(r,{reason:e,options:t,observable:this,initialFetchPolicy:o}):"variables-changed"===e?t.fetchPolicy=o:t.fetchPolicy=t.nextFetchPolicy)}return t.fetchPolicy},t.prototype.fetch=function(e,t){return this.queryManager.setObservableQuery(this),this.queryManager.fetchQueryObservable(this.queryId,e,t)},t.prototype.updatePolling=function(){var e=this;if(!this.queryManager.ssrMode){var t=this.pollingInfo,n=this.options.pollInterval;if(!n){t&&(clearTimeout(t.timeout),delete this.pollingInfo);return}if(!t||t.interval!==n){__DEV__?nk(n,"Attempted to start a polling query without a polling interval."):nk(n,12),(t||(this.pollingInfo={})).interval=n;var r=function(){e.pollingInfo&&(iG(e.queryInfo.networkStatus)?i():e.reobserve({fetchPolicy:"no-cache"===e.options.initialFetchPolicy?"no-cache":"network-only"},h.poll).then(i,i))},i=function(){var t=e.pollingInfo;t&&(clearTimeout(t.timeout),t.timeout=setTimeout(r,t.interval))};i()}}},t.prototype.updateLastResult=function(e,t){return void 0===t&&(t=this.variables),this.last=(0,ng.pi)((0,ng.pi)({},this.last),{result:this.queryManager.assumeImmutableResults?e:iJ(e),variables:t}),ir(e.errors)||delete this.last.error,this.last},t.prototype.reobserve=function(e,t){var n=this;this.isTornDown=!1;var r=t===h.refetch||t===h.fetchMore||t===h.poll,i=this.options.variables,o=this.options.fetchPolicy,a=iy(this.options,e||{}),s=r?a:iX(this.options,a);!r&&(this.updatePolling(),e&&e.variables&&!r4(e.variables,i)&&"standby"!==s.fetchPolicy&&s.fetchPolicy===o&&(this.applyNextFetchPolicy("variables-changed",s),void 0===t&&(t=h.setVariables)));var u=s.variables&&(0,ng.pi)({},s.variables),c=this.fetch(s,t),l={next:function(e){n.reportResult(e,u)},error:function(e){n.reportError(e,u)}};return r||(this.concast&&this.observer&&this.concast.removeObserver(this.observer),this.concast=c,this.observer=l),c.addObserver(l),c.promise},t.prototype.observe=function(){this.reportResult(this.getCurrentResult(!1),this.variables)},t.prototype.reportResult=function(e,t){var n=this.getLastError();(n||this.isDifferentFromLastResult(e,t))&&((n||!e.partial||this.options.returnPartialData)&&this.updateLastResult(e,t),iU(this.observers,"next",e))},t.prototype.reportError=function(e,t){var n=(0,ng.pi)((0,ng.pi)({},this.getLastResult()),{error:e,errors:e.graphQLErrors,networkStatus:h.error,loading:!1});this.updateLastResult(n,t),iU(this.observers,"error",this.last.error=e)},t.prototype.hasObservers=function(){return this.observers.size>0},t.prototype.tearDownQuery=function(){this.isTornDown||(this.concast&&this.observer&&(this.concast.removeObserver(this.observer),delete this.concast,delete this.observer),this.stopPolling(),this.subscriptions.forEach(function(e){return e.unsubscribe()}),this.subscriptions.clear(),this.queryManager.stopQuery(this.queryId),this.observers.clear(),this.isTornDown=!0)},t}(n0);function i0(e){var t=e.options,n=t.fetchPolicy,r=t.nextFetchPolicy;return"cache-and-network"===n||"network-only"===n?e.reobserve({fetchPolicy:"cache-first",nextFetchPolicy:function(){return(this.nextFetchPolicy=r,"function"==typeof r)?r.apply(this,arguments):n}}):e.reobserve()}function i1(e){__DEV__&&nk.error("Unhandled error",e.message,e.stack)}function i2(e){__DEV__&&e&&__DEV__&&nk.debug("Missing cache result fields: ".concat(JSON.stringify(e)),e)}iQ(iK);var i3=null,i5={},i6=1;function i8(e){try{return e()}catch(t){}}var i4="@wry/context:Slot",i9=i8(function(){return globalThis})||i8(function(){return n.g})||Object.create(null),i7=i9[i4]||Array[i4]||function(e){try{Object.defineProperty(i9,i4,{value:e,enumerable:!1,writable:!1,configurable:!0})}finally{return e}}(function(){function e(){this.id=["slot",i6++,Date.now(),Math.random().toString(36).slice(2)].join(":")}return e.prototype.hasValue=function(){for(var e=i3;e;e=e.parent)if(this.id in e.slots){var t=e.slots[this.id];if(t===i5)break;return e!==i3&&(i3.slots[this.id]=t),!0}return i3&&(i3.slots[this.id]=i5),!1},e.prototype.getValue=function(){if(this.hasValue())return i3.slots[this.id]},e.prototype.withValue=function(e,t,n,r){var i,o=((i={__proto__:null})[this.id]=e,i),a=i3;i3={parent:a,slots:o};try{return t.apply(r,n)}finally{i3=a}},e.bind=function(e){var t=i3;return function(){var n=i3;try{return i3=t,e.apply(this,arguments)}finally{i3=n}}},e.noContext=function(e,t,n){if(!i3)return e.apply(n,t);var r=i3;try{return i3=null,e.apply(n,t)}finally{i3=r}},e}());function oe(){}i7.bind,i7.noContext;var ot=function(){function e(e,t){void 0===e&&(e=1/0),void 0===t&&(t=oe),this.max=e,this.dispose=t,this.map=new Map,this.newest=null,this.oldest=null}return e.prototype.has=function(e){return this.map.has(e)},e.prototype.get=function(e){var t=this.getNode(e);return t&&t.value},e.prototype.getNode=function(e){var t=this.map.get(e);if(t&&t!==this.newest){var n=t.older,r=t.newer;r&&(r.older=n),n&&(n.newer=r),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=r)}return t},e.prototype.set=function(e,t){var n=this.getNode(e);return n?n.value=t:(n={key:e,value:t,newer:null,older:this.newest},this.newest&&(this.newest.newer=n),this.newest=n,this.oldest=this.oldest||n,this.map.set(e,n),n.value)},e.prototype.clean=function(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)},e.prototype.delete=function(e){var t=this.map.get(e);return!!t&&(t===this.newest&&(this.newest=t.older),t===this.oldest&&(this.oldest=t.newer),t.newer&&(t.newer.older=t.older),t.older&&(t.older.newer=t.newer),this.map.delete(e),this.dispose(t.value,e),!0)},e}(),on=new i7,or=Object.prototype.hasOwnProperty,oi=void 0===(v=Array.from)?function(e){var t=[];return e.forEach(function(e){return t.push(e)}),t}:v;function oo(e){var t=e.unsubscribe;"function"==typeof t&&(e.unsubscribe=void 0,t())}var oa=[];function os(e,t){if(!e)throw Error(t||"assertion failure")}function ou(e){switch(e.length){case 0:throw Error("unknown value");case 1:return e[0];case 2:throw e[1]}}var oc=function(){function e(t){this.fn=t,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],this.deps=null,++e.count}return e.prototype.peek=function(){if(1===this.value.length&&!op(this))return ol(this),this.value[0]},e.prototype.recompute=function(e){var t;return os(!this.recomputing,"already recomputing"),ol(this),op(this)&&(oy(this),on.withValue(this,of,[this,e]),function(e,t){if("function"==typeof e.subscribe)try{oo(e),e.unsubscribe=e.subscribe.apply(null,t)}catch(n){return e.setDirty(),!1}return!0}(this,e)&&(this.dirty=!1,op(this)||(t=this,od(t,ov)))),ou(this.value)},e.prototype.setDirty=function(){this.dirty||(this.dirty=!0,this.value.length=0,od(this,oh),oo(this))},e.prototype.dispose=function(){var e=this;this.setDirty(),oy(this),od(this,function(t,n){t.setDirty(),og(t,e)})},e.prototype.forget=function(){this.dispose()},e.prototype.dependOn=function(e){e.add(this),this.deps||(this.deps=oa.pop()||new Set),this.deps.add(e)},e.prototype.forgetDeps=function(){var e=this;this.deps&&(oi(this.deps).forEach(function(t){return t.delete(e)}),this.deps.clear(),oa.push(this.deps),this.deps=null)},e.count=0,e}();function ol(e){var t=on.getValue();if(t)return e.parents.add(t),t.childValues.has(e)||t.childValues.set(e,[]),op(e)?oh(t,e):ov(t,e),t}function of(e,t){e.recomputing=!0,e.value.length=0;try{e.value[0]=e.fn.apply(null,t)}catch(n){e.value[1]=n}e.recomputing=!1}function op(e){return e.dirty||!!(e.dirtyChildren&&e.dirtyChildren.size)}function od(e,t){var n=e.parents.size;if(n)for(var r=oi(e.parents),i=0;i<n;++i)t(r[i],e)}function oh(e,t){os(e.childValues.has(t)),os(op(t));var n=!op(e);if(e.dirtyChildren){if(e.dirtyChildren.has(t))return}else e.dirtyChildren=oa.pop()||new Set;e.dirtyChildren.add(t),n&&od(e,oh)}function ov(e,t){os(e.childValues.has(t)),os(!op(t));var n,r,i=e.childValues.get(t);0===i.length?e.childValues.set(t,t.value.slice(0)):(n=t.value,(r=i.length)>0&&r===n.length&&i[r-1]===n[r-1]||e.setDirty()),om(e,t),op(e)||od(e,ov)}function om(e,t){var n=e.dirtyChildren;n&&(n.delete(t),0===n.size&&(oa.length<100&&oa.push(n),e.dirtyChildren=null))}function oy(e){e.childValues.size>0&&e.childValues.forEach(function(t,n){og(e,n)}),e.forgetDeps(),os(null===e.dirtyChildren)}function og(e,t){t.parents.delete(e),e.childValues.delete(t),om(e,t)}var o_={setDirty:!0,dispose:!0,forget:!0};function ob(e){var t=new Map,n=e&&e.subscribe;function r(e){var r=on.getValue();if(r){var i=t.get(e);i||t.set(e,i=new Set),r.dependOn(i),"function"==typeof n&&(oo(i),i.unsubscribe=n(e))}}return r.dirty=function(e,n){var r=t.get(e);if(r){var i=n&&or.call(o_,n)?n:"setDirty";oi(r).forEach(function(e){return e[i]()}),t.delete(e),oo(r)}},r}function ow(){var e=new im("function"==typeof WeakMap);return function(){return e.lookupArray(arguments)}}ow();var oE=new Set;function ok(e,t){void 0===t&&(t=Object.create(null));var n=new ot(t.max||65536,function(e){return e.dispose()}),r=t.keyArgs,i=t.makeCacheKey||ow(),o=function(){var o=i.apply(null,r?r.apply(null,arguments):arguments);if(void 0===o)return e.apply(null,arguments);var a=n.get(o);a||(n.set(o,a=new oc(e)),a.subscribe=t.subscribe,a.forget=function(){return n.delete(o)});var s=a.recompute(Array.prototype.slice.call(arguments));return n.set(o,a),oE.add(n),on.hasValue()||(oE.forEach(function(e){return e.clean()}),oE.clear()),s};function a(e){var t=n.get(e);t&&t.setDirty()}function s(e){var t=n.get(e);if(t)return t.peek()}function u(e){return n.delete(e)}return Object.defineProperty(o,"size",{get:function(){return n.map.size},configurable:!1,enumerable:!1}),o.dirtyKey=a,o.dirty=function(){a(i.apply(null,arguments))},o.peekKey=s,o.peek=function(){return s(i.apply(null,arguments))},o.forgetKey=u,o.forget=function(){return u(i.apply(null,arguments))},o.makeCacheKey=i,o.getKey=r?function(){return i.apply(null,r.apply(null,arguments))}:i,Object.freeze(o)}var oS=new i7,ox=new WeakMap;function oO(e){var t=ox.get(e);return t||ox.set(e,t={vars:new Set,dep:ob()}),t}function oT(e){oO(e).vars.forEach(function(t){return t.forgetCache(e)})}function oP(e){var t=new Set,n=new Set,r=function(o){if(arguments.length>0){if(e!==o){e=o,t.forEach(function(e){oO(e).dep.dirty(r),e.broadcastWatches&&e.broadcastWatches()});var a=Array.from(n);n.clear(),a.forEach(function(t){return t(e)})}}else{var s=oS.getValue();s&&(i(s),oO(s).dep(r))}return e};r.onNextChange=function(e){return n.add(e),function(){n.delete(e)}};var i=r.attachCache=function(e){return t.add(e),oO(e).vars.add(r),r};return r.forgetCache=function(e){return t.delete(e)},r}var oA=function(){function e(e){var t=e.cache,n=e.client,r=e.resolvers,i=e.fragmentMatcher;this.cache=t,n&&(this.client=n),r&&this.addResolvers(r),i&&this.setFragmentMatcher(i)}return e.prototype.addResolvers=function(e){var t=this;this.resolvers=this.resolvers||{},Array.isArray(e)?e.forEach(function(e){t.resolvers=io(t.resolvers,e)}):this.resolvers=io(this.resolvers,e)},e.prototype.setResolvers=function(e){this.resolvers={},this.addResolvers(e)},e.prototype.getResolvers=function(){return this.resolvers||{}},e.prototype.runResolvers=function(e){var t=e.document,n=e.remoteResult,r=e.context,i=e.variables,o=e.onlyRunForcedResolvers,a=void 0!==o&&o;return(0,ng.mG)(this,void 0,void 0,function(){return(0,ng.Jh)(this,function(e){return t?[2,this.resolveDocument(t,n.data,r,i,this.fragmentMatcher,a).then(function(e){return(0,ng.pi)((0,ng.pi)({},n),{data:e.result})})]:[2,n]})})},e.prototype.setFragmentMatcher=function(e){this.fragmentMatcher=e},e.prototype.getFragmentMatcher=function(){return this.fragmentMatcher},e.prototype.clientQuery=function(e){return rO(["client"],e)&&this.resolvers?e:null},e.prototype.serverQuery=function(e){var t;return rs(e),(t=iN([{test:function(e){return"client"===e.name.value},remove:!0}],e))&&(t=rS(t,{FragmentDefinition:{enter:function(e){if(e.selectionSet&&e.selectionSet.selections.every(function(e){return ro(e)&&"__typename"===e.name.value}))return null}}})),t},e.prototype.prepareContext=function(e){var t=this.cache;return(0,ng.pi)((0,ng.pi)({},e),{cache:t,getCacheKey:function(e){return t.identify(e)}})},e.prototype.addExportedVariables=function(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),(0,ng.mG)(this,void 0,void 0,function(){return(0,ng.Jh)(this,function(r){return e?[2,this.resolveDocument(e,this.buildRootValueFromCache(e,t)||{},this.prepareContext(n),t).then(function(e){return(0,ng.pi)((0,ng.pi)({},t),e.exportedVariables)})]:[2,(0,ng.pi)({},t)]})})},e.prototype.shouldForceResolvers=function(e){var t=!1;return rS(e,{Directive:{enter:function(e){if("client"===e.name.value&&e.arguments&&(t=e.arguments.some(function(e){return"always"===e.name.value&&"BooleanValue"===e.value.kind&&!0===e.value.value})))return rk}}}),t},e.prototype.buildRootValueFromCache=function(e,t){return this.cache.diff({query:"query"===rp(e).operation?e:rS(e,{OperationDefinition:{enter:function(e){return(0,ng.pi)((0,ng.pi)({},e),{operation:"query"})}}}),variables:t,returnPartialData:!0,optimistic:!1}).result},e.prototype.resolveDocument=function(e,t,n,r,i,o){return void 0===n&&(n={}),void 0===r&&(r={}),void 0===i&&(i=function(){return!0}),void 0===o&&(o=!1),(0,ng.mG)(this,void 0,void 0,function(){var a,s,u,c,l,f,p,d;return(0,ng.Jh)(this,function(h){return a=rp(e),s=n3(rl(e)),c=(u=a.operation)?u.charAt(0).toUpperCase()+u.slice(1):"Query",l=this,f=l.cache,p=l.client,d={fragmentMap:s,context:(0,ng.pi)((0,ng.pi)({},n),{cache:f,client:p}),variables:r,fragmentMatcher:i,defaultOperationType:c,exportedVariables:{},onlyRunForcedResolvers:o},[2,this.resolveSelectionSet(a.selectionSet,t,d).then(function(e){return{result:e,exportedVariables:d.exportedVariables}})]})})},e.prototype.resolveSelectionSet=function(e,t,n){return(0,ng.mG)(this,void 0,void 0,function(){var r,i,o,a,s,u=this;return(0,ng.Jh)(this,function(c){return r=n.fragmentMap,i=n.context,o=n.variables,a=[t],s=function(e){return(0,ng.mG)(u,void 0,void 0,function(){var s,u;return(0,ng.Jh)(this,function(c){return rx(e,o)?ro(e)?[2,this.resolveField(e,t,n).then(function(t){var n;void 0!==t&&a.push(((n={})[rr(e)]=t,n))})]:(ra(e)?s=e:(s=r[e.name.value],__DEV__?nk(s,"No fragment named ".concat(e.name.value)):nk(s,11)),s&&s.typeCondition&&(u=s.typeCondition.name.value,n.fragmentMatcher(t,u,i)))?[2,this.resolveSelectionSet(s.selectionSet,t,n).then(function(e){a.push(e)})]:[2]:[2]})})},[2,Promise.all(e.selections.map(s)).then(function(){return ia(a)})]})})},e.prototype.resolveField=function(e,t,n){return(0,ng.mG)(this,void 0,void 0,function(){var r,i,o,a,s,u,c,l,f,p=this;return(0,ng.Jh)(this,function(d){return r=n.variables,a=(i=e.name.value)!==(o=rr(e)),u=Promise.resolve(s=t[o]||t[i]),(!n.onlyRunForcedResolvers||this.shouldForceResolvers(e))&&(c=t.__typename||n.defaultOperationType,(l=this.resolvers&&this.resolvers[c])&&(f=l[a?i:o])&&(u=Promise.resolve(oS.withValue(this.cache,f,[t,rn(e,r),n.context,{field:e,fragmentMap:n.fragmentMap}])))),[2,u.then(function(t){return(void 0===t&&(t=s),e.directives&&e.directives.forEach(function(e){"export"===e.name.value&&e.arguments&&e.arguments.forEach(function(e){"as"===e.name.value&&"StringValue"===e.value.kind&&(n.exportedVariables[e.value.value]=t)})}),e.selectionSet&&null!=t)?Array.isArray(t)?p.resolveSubSelectedArray(e,t,n):e.selectionSet?p.resolveSelectionSet(e.selectionSet,t,n):void 0:t})]})})},e.prototype.resolveSubSelectedArray=function(e,t,n){var r=this;return Promise.all(t.map(function(t){return null===t?null:Array.isArray(t)?r.resolveSubSelectedArray(e,t,n):e.selectionSet?r.resolveSelectionSet(e.selectionSet,t,n):void 0}))},e}(),oD=new(rP?WeakMap:Map);function oC(e,t){var n=e[t];"function"==typeof n&&(e[t]=function(){return oD.set(e,(oD.get(e)+1)%1e15),n.apply(this,arguments)})}function oR(e){e.notifyTimeout&&(clearTimeout(e.notifyTimeout),e.notifyTimeout=void 0)}var oI=function(){function e(e,t){void 0===t&&(t=e.generateQueryId()),this.queryId=t,this.listeners=new Set,this.document=null,this.lastRequestId=1,this.subscriptions=new Set,this.stopped=!1,this.dirty=!1,this.observableQuery=null;var n=this.cache=e.cache;oD.has(n)||(oD.set(n,0),oC(n,"evict"),oC(n,"modify"),oC(n,"reset"))}return e.prototype.init=function(e){var t=e.networkStatus||h.loading;return this.variables&&this.networkStatus!==h.loading&&!r4(this.variables,e.variables)&&(t=h.setVariables),r4(e.variables,this.variables)||(this.lastDiff=void 0),Object.assign(this,{document:e.document,variables:e.variables,networkError:null,graphQLErrors:this.graphQLErrors||[],networkStatus:t}),e.observableQuery&&this.setObservableQuery(e.observableQuery),e.lastRequestId&&(this.lastRequestId=e.lastRequestId),this},e.prototype.reset=function(){oR(this),this.dirty=!1},e.prototype.getDiff=function(e){void 0===e&&(e=this.variables);var t=this.getDiffOptions(e);if(this.lastDiff&&r4(t,this.lastDiff.options))return this.lastDiff.diff;this.updateWatch(this.variables=e);var n=this.observableQuery;if(n&&"no-cache"===n.options.fetchPolicy)return{complete:!1};var r=this.cache.diff(t);return this.updateLastDiff(r,t),r},e.prototype.updateLastDiff=function(e,t){this.lastDiff=e?{diff:e,options:t||this.getDiffOptions()}:void 0},e.prototype.getDiffOptions=function(e){var t;return void 0===e&&(e=this.variables),{query:this.document,variables:e,returnPartialData:!0,optimistic:!0,canonizeResults:null===(t=this.observableQuery)||void 0===t?void 0:t.options.canonizeResults}},e.prototype.setDiff=function(e){var t=this,n=this.lastDiff&&this.lastDiff.diff;this.updateLastDiff(e),this.dirty||r4(n&&n.result,e&&e.result)||(this.dirty=!0,this.notifyTimeout||(this.notifyTimeout=setTimeout(function(){return t.notify()},0)))},e.prototype.setObservableQuery=function(e){var t=this;e!==this.observableQuery&&(this.oqListener&&this.listeners.delete(this.oqListener),this.observableQuery=e,e?(e.queryInfo=this,this.listeners.add(this.oqListener=function(){t.getDiff().fromOptimisticTransaction?e.observe():i0(e)})):delete this.oqListener)},e.prototype.notify=function(){var e=this;oR(this),this.shouldNotify()&&this.listeners.forEach(function(t){return t(e)}),this.dirty=!1},e.prototype.shouldNotify=function(){if(!this.dirty||!this.listeners.size)return!1;if(iG(this.networkStatus)&&this.observableQuery){var e=this.observableQuery.options.fetchPolicy;if("cache-only"!==e&&"cache-and-network"!==e)return!1}return!0},e.prototype.stop=function(){if(!this.stopped){this.stopped=!0,this.reset(),this.cancel(),this.cancel=e.prototype.cancel,this.subscriptions.forEach(function(e){return e.unsubscribe()});var t=this.observableQuery;t&&t.stopPolling()}},e.prototype.cancel=function(){},e.prototype.updateWatch=function(e){var t=this;void 0===e&&(e=this.variables);var n=this.observableQuery;if(!n||"no-cache"!==n.options.fetchPolicy){var r=(0,ng.pi)((0,ng.pi)({},this.getDiffOptions(e)),{watcher:this,callback:function(e){return t.setDiff(e)}});this.lastWatch&&r4(r,this.lastWatch)||(this.cancel(),this.cancel=this.cache.watch(this.lastWatch=r))}},e.prototype.resetLastWrite=function(){this.lastWrite=void 0},e.prototype.shouldWrite=function(e,t){var n=this.lastWrite;return!(n&&n.dmCount===oD.get(this.cache)&&r4(t,n.variables)&&r4(e.data,n.result.data))},e.prototype.markResult=function(e,t,n,r){var i=this,o=new iu,a=ir(e.errors)?e.errors.slice(0):[];if(this.reset(),"incremental"in e&&ir(e.incremental)){var s=il(this.getDiff().result,e);e.data=s}else if("hasNext"in e&&e.hasNext){var u=this.getDiff();e.data=o.merge(u.result,e.data)}this.graphQLErrors=a,"no-cache"===n.fetchPolicy?this.updateLastDiff({result:e.data,complete:!0},this.getDiffOptions(n.variables)):0!==r&&(oF(e,n.errorPolicy)?this.cache.performTransaction(function(o){if(i.shouldWrite(e,n.variables))o.writeQuery({query:t,data:e.data,variables:n.variables,overwrite:1===r}),i.lastWrite={result:e,variables:n.variables,dmCount:oD.get(i.cache)};else if(i.lastDiff&&i.lastDiff.diff.complete){e.data=i.lastDiff.diff.result;return}var a=i.getDiffOptions(n.variables),s=o.diff(a);i.stopped||i.updateWatch(n.variables),i.updateLastDiff(s,a),s.complete&&(e.data=s.result)}):this.lastWrite=void 0)},e.prototype.markReady=function(){return this.networkError=null,this.networkStatus=h.ready},e.prototype.markError=function(e){return this.networkStatus=h.error,this.lastWrite=void 0,this.reset(),e.graphQLErrors&&(this.graphQLErrors=e.graphQLErrors),e.networkError&&(this.networkError=e.networkError),e},e}();function oF(e,t){void 0===t&&(t="none");var n="ignore"===t||"all"===t,r=!ir(iR(e));return!r&&n&&e.data&&(r=!0),r}var oM=Object.prototype.hasOwnProperty,oj=function(){function e(e){var t=e.cache,n=e.link,r=e.defaultOptions,i=e.queryDeduplication,o=e.onBroadcast,a=e.ssrMode,s=e.clientAwareness,u=e.localState,c=e.assumeImmutableResults;this.clientAwareness={},this.queries=new Map,this.fetchCancelFns=new Map,this.transformCache=new(rP?WeakMap:Map),this.queryIdCounter=1,this.requestIdCounter=1,this.mutationIdCounter=1,this.inFlightLinkObservables=new Map,this.cache=t,this.link=n,this.defaultOptions=r||Object.create(null),this.queryDeduplication=void 0!==i&&i,this.clientAwareness=void 0===s?{}:s,this.localState=u||new oA({cache:t}),this.ssrMode=void 0!==a&&a,this.assumeImmutableResults=!!c,(this.onBroadcast=o)&&(this.mutationStore=Object.create(null))}return e.prototype.stop=function(){var e=this;this.queries.forEach(function(t,n){e.stopQueryNoBroadcast(n)}),this.cancelPendingFetches(__DEV__?new nE("QueryManager stopped while query was in flight"):new nE(13))},e.prototype.cancelPendingFetches=function(e){this.fetchCancelFns.forEach(function(t){return t(e)}),this.fetchCancelFns.clear()},e.prototype.mutate=function(e){var t,n,r=e.mutation,i=e.variables,o=e.optimisticResponse,a=e.updateQueries,s=e.refetchQueries,u=void 0===s?[]:s,c=e.awaitRefetchQueries,l=void 0!==c&&c,f=e.update,p=e.onQueryUpdated,d=e.fetchPolicy,h=void 0===d?(null===(t=this.defaultOptions.mutate)||void 0===t?void 0:t.fetchPolicy)||"network-only":d,v=e.errorPolicy,m=void 0===v?(null===(n=this.defaultOptions.mutate)||void 0===n?void 0:n.errorPolicy)||"none":v,y=e.keepRootFields,g=e.context;return(0,ng.mG)(this,void 0,void 0,function(){var e,t,n,s,c,d;return(0,ng.Jh)(this,function(v){switch(v.label){case 0:if(__DEV__?nk(r,"mutation option is required. You must specify your GraphQL document in the mutation option."):nk(r,14),__DEV__?nk("network-only"===h||"no-cache"===h,"Mutations support only 'network-only' or 'no-cache' fetchPolicy strings. The default `network-only` behavior automatically writes mutation results to the cache. Passing `no-cache` skips the cache write."):nk("network-only"===h||"no-cache"===h,15),e=this.generateMutationId(),n=(t=this.transform(r)).document,s=t.hasClientExports,r=this.cache.transformForLink(n),i=this.getVariables(r,i),!s)return[3,2];return[4,this.localState.addExportedVariables(r,i,g)];case 1:i=v.sent(),v.label=2;case 2:return c=this.mutationStore&&(this.mutationStore[e]={mutation:r,variables:i,loading:!0,error:null}),o&&this.markMutationOptimistic(o,{mutationId:e,document:r,variables:i,fetchPolicy:h,errorPolicy:m,context:g,updateQueries:a,update:f,keepRootFields:y}),this.broadcastQueries(),d=this,[2,new Promise(function(t,n){return iC(d.getObservableFromLink(r,(0,ng.pi)((0,ng.pi)({},g),{optimisticResponse:o}),i,!1),function(t){if(ir(iR(t))&&"none"===m)throw new iW({graphQLErrors:iR(t)});c&&(c.loading=!1,c.error=null);var n=(0,ng.pi)({},t);return"function"==typeof u&&(u=u(n)),"ignore"===m&&ir(iR(n))&&delete n.errors,d.markMutationResult({mutationId:e,result:n,document:r,variables:i,fetchPolicy:h,errorPolicy:m,context:g,update:f,updateQueries:a,awaitRefetchQueries:l,refetchQueries:u,removeOptimistic:o?e:void 0,onQueryUpdated:p,keepRootFields:y})}).subscribe({next:function(e){d.broadcastQueries(),"hasNext"in e&&!1!==e.hasNext||t(e)},error:function(t){c&&(c.loading=!1,c.error=t),o&&d.cache.removeOptimistic(e),d.broadcastQueries(),n(t instanceof iW?t:new iW({networkError:t}))}})})]}})})},e.prototype.markMutationResult=function(e,t){var n=this;void 0===t&&(t=this.cache);var r=e.result,i=[],o="no-cache"===e.fetchPolicy;if(!o&&oF(r,e.errorPolicy)){if(ic(r)||i.push({result:r.data,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}),ic(r)&&ir(r.incremental)){var a=il(t.diff({id:"ROOT_MUTATION",query:this.transform(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0}).result,r);void 0!==a&&(r.data=a,i.push({result:a,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}))}var s=e.updateQueries;s&&this.queries.forEach(function(e,o){var a=e.observableQuery,u=a&&a.queryName;if(u&&oM.call(s,u)){var c=s[u],l=n.queries.get(o),f=l.document,p=l.variables,d=t.diff({query:f,variables:p,returnPartialData:!0,optimistic:!1}),h=d.result;if(d.complete&&h){var v=c(h,{mutationResult:r,queryName:f&&rc(f)||void 0,queryVariables:p});v&&i.push({result:v,dataId:"ROOT_QUERY",query:f,variables:p})}}})}if(i.length>0||e.refetchQueries||e.update||e.onQueryUpdated||e.removeOptimistic){var u=[];if(this.refetchQueries({updateCache:function(t){o||i.forEach(function(e){return t.write(e)});var a,s=e.update,u=!(ic(a=r)||"hasNext"in a&&"data"in a)||ic(r)&&!r.hasNext;if(s){if(!o){var c=t.diff({id:"ROOT_MUTATION",query:n.transform(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0});c.complete&&("incremental"in(r=(0,ng.pi)((0,ng.pi)({},r),{data:c.result}))&&delete r.incremental,"hasNext"in r&&delete r.hasNext)}u&&s(t,r,{context:e.context,variables:e.variables})}o||e.keepRootFields||!u||t.modify({id:"ROOT_MUTATION",fields:function(e,t){var n=t.fieldName,r=t.DELETE;return"__typename"===n?e:r}})},include:e.refetchQueries,optimistic:!1,removeOptimistic:e.removeOptimistic,onQueryUpdated:e.onQueryUpdated||null}).forEach(function(e){return u.push(e)}),e.awaitRefetchQueries||e.onQueryUpdated)return Promise.all(u).then(function(){return r})}return Promise.resolve(r)},e.prototype.markMutationOptimistic=function(e,t){var n=this,r="function"==typeof e?e(t.variables):e;return this.cache.recordOptimisticTransaction(function(e){try{n.markMutationResult((0,ng.pi)((0,ng.pi)({},t),{result:{data:r}}),e)}catch(i){__DEV__&&nk.error(i)}},t.mutationId)},e.prototype.fetchQuery=function(e,t,n){return this.fetchQueryObservable(e,t,n).promise},e.prototype.getQueryStore=function(){var e=Object.create(null);return this.queries.forEach(function(t,n){e[n]={variables:t.variables,networkStatus:t.networkStatus,networkError:t.networkError,graphQLErrors:t.graphQLErrors}}),e},e.prototype.resetErrors=function(e){var t=this.queries.get(e);t&&(t.networkError=void 0,t.graphQLErrors=[])},e.prototype.transform=function(e){var t=this.transformCache;if(!t.has(e)){var n=this.cache.transformDocument(e),r=iN([iL],rs(n)),i=this.localState.clientQuery(n),o=r&&this.localState.serverQuery(r),a={document:n,hasClientExports:n&&rO(["client","export"],n,!0),hasForcedResolvers:this.localState.shouldForceResolvers(n),clientQuery:i,serverQuery:o,defaultVars:rd(ru(n)),asQuery:(0,ng.pi)((0,ng.pi)({},n),{definitions:n.definitions.map(function(e){return"OperationDefinition"===e.kind&&"query"!==e.operation?(0,ng.pi)((0,ng.pi)({},e),{operation:"query"}):e})})},s=function(e){e&&!t.has(e)&&t.set(e,a)};s(e),s(n),s(i),s(o)}return t.get(e)},e.prototype.getVariables=function(e,t){return(0,ng.pi)((0,ng.pi)({},this.transform(e).defaultVars),t)},e.prototype.watchQuery=function(e){void 0===(e=(0,ng.pi)((0,ng.pi)({},e),{variables:this.getVariables(e.query,e.variables)})).notifyOnNetworkStatusChange&&(e.notifyOnNetworkStatusChange=!1);var t=new oI(this),n=new iK({queryManager:this,queryInfo:t,options:e});return this.queries.set(n.queryId,t),t.init({document:n.query,observableQuery:n,variables:n.variables}),n},e.prototype.query=function(e,t){var n=this;return void 0===t&&(t=this.generateQueryId()),__DEV__?nk(e.query,"query option is required. You must specify your GraphQL document in the query option."):nk(e.query,16),__DEV__?nk("Document"===e.query.kind,'You must wrap the query string in a "gql" tag.'):nk("Document"===e.query.kind,17),__DEV__?nk(!e.returnPartialData,"returnPartialData option only supported on watchQuery."):nk(!e.returnPartialData,18),__DEV__?nk(!e.pollInterval,"pollInterval option only supported on watchQuery."):nk(!e.pollInterval,19),this.fetchQuery(t,e).finally(function(){return n.stopQuery(t)})},e.prototype.generateQueryId=function(){return String(this.queryIdCounter++)},e.prototype.generateRequestId=function(){return this.requestIdCounter++},e.prototype.generateMutationId=function(){return String(this.mutationIdCounter++)},e.prototype.stopQueryInStore=function(e){this.stopQueryInStoreNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryInStoreNoBroadcast=function(e){var t=this.queries.get(e);t&&t.stop()},e.prototype.clearStore=function(e){return void 0===e&&(e={discardWatches:!0}),this.cancelPendingFetches(__DEV__?new nE("Store reset while query was in flight (not completed in link chain)"):new nE(20)),this.queries.forEach(function(e){e.observableQuery?e.networkStatus=h.loading:e.stop()}),this.mutationStore&&(this.mutationStore=Object.create(null)),this.cache.reset(e)},e.prototype.getObservableQueries=function(e){var t=this;void 0===e&&(e="active");var n=new Map,r=new Map,i=new Set;return Array.isArray(e)&&e.forEach(function(e){"string"==typeof e?r.set(e,!1):n1(e)&&"Document"===e.kind&&Array.isArray(e.definitions)?r.set(t.transform(e).document,!1):n1(e)&&e.query&&i.add(e)}),this.queries.forEach(function(t,i){var o=t.observableQuery,a=t.document;if(o){if("all"===e){n.set(i,o);return}var s=o.queryName;if("standby"===o.options.fetchPolicy||"active"===e&&!o.hasObservers())return;("active"===e||s&&r.has(s)||a&&r.has(a))&&(n.set(i,o),s&&r.set(s,!0),a&&r.set(a,!0))}}),i.size&&i.forEach(function(e){var r=iB("legacyOneTimeQuery"),i=t.getQuery(r).init({document:e.query,variables:e.variables}),o=new iK({queryManager:t,queryInfo:i,options:(0,ng.pi)((0,ng.pi)({},e),{fetchPolicy:"network-only"})});nk(o.queryId===r),i.setObservableQuery(o),n.set(r,o)}),__DEV__&&r.size&&r.forEach(function(e,t){!e&&__DEV__&&nk.warn("Unknown query ".concat("string"==typeof t?"named ":"").concat(JSON.stringify(t,null,2)," requested in refetchQueries options.include array"))}),n},e.prototype.reFetchObservableQueries=function(e){var t=this;void 0===e&&(e=!1);var n=[];return this.getObservableQueries(e?"all":"active").forEach(function(r,i){var o=r.options.fetchPolicy;r.resetLastResults(),(e||"standby"!==o&&"cache-only"!==o)&&n.push(r.refetch()),t.getQuery(i).setDiff(null)}),this.broadcastQueries(),Promise.all(n)},e.prototype.setObservableQuery=function(e){this.getQuery(e.queryId).setObservableQuery(e)},e.prototype.startGraphQLSubscription=function(e){var t=this,n=e.query,r=e.fetchPolicy,i=e.errorPolicy,o=e.variables,a=e.context,s=void 0===a?{}:a;n=this.transform(n).document,o=this.getVariables(n,o);var u=function(e){return t.getObservableFromLink(n,s,e).map(function(o){if("no-cache"!==r&&(oF(o,i)&&t.cache.write({query:n,result:o.data,dataId:"ROOT_SUBSCRIPTION",variables:e}),t.broadcastQueries()),ir(iR(o)))throw new iW({graphQLErrors:o.errors});return o})};if(this.transform(n).hasClientExports){var c=this.localState.addExportedVariables(n,o,s).then(u);return new n0(function(e){var t=null;return c.then(function(n){return t=n.subscribe(e)},e.error),function(){return t&&t.unsubscribe()}})}return u(o)},e.prototype.stopQuery=function(e){this.stopQueryNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryNoBroadcast=function(e){this.stopQueryInStoreNoBroadcast(e),this.removeQuery(e)},e.prototype.removeQuery=function(e){this.fetchCancelFns.delete(e),this.queries.has(e)&&(this.getQuery(e).stop(),this.queries.delete(e))},e.prototype.broadcastQueries=function(){this.onBroadcast&&this.onBroadcast(),this.queries.forEach(function(e){return e.notify()})},e.prototype.getLocalState=function(){return this.localState},e.prototype.getObservableFromLink=function(e,t,n,r){var i,o,a=this;void 0===r&&(r=null!==(i=null==t?void 0:t.queryDeduplication)&&void 0!==i?i:this.queryDeduplication);var s=this.transform(e).serverQuery;if(s){var u=this.inFlightLinkObservables,c=this.link,l={query:s,variables:n,operationName:rc(s)||void 0,context:this.prepareContext((0,ng.pi)((0,ng.pi)({},t),{forceFetch:!r}))};if(t=l.context,r){var f=u.get(s)||new Map;u.set(s,f);var p=iA(n);if(!(o=f.get(p))){var d=new i$([r_(c,l)]);f.set(p,o=d),d.beforeNext(function(){f.delete(p)&&f.size<1&&u.delete(s)})}}else o=new i$([r_(c,l)])}else o=new i$([n0.of({data:{}})]),t=this.prepareContext(t);var h=this.transform(e).clientQuery;return h&&(o=iC(o,function(e){return a.localState.runResolvers({document:h,remoteResult:e,context:t,variables:n})})),o},e.prototype.getResultsFromLink=function(e,t,n){var r=e.lastRequestId=this.generateRequestId(),i=this.cache.transformForLink(this.transform(e.document).document);return iC(this.getObservableFromLink(i,n.context,n.variables),function(o){var a=iR(o),s=a.length>0;if(r>=e.lastRequestId){if(s&&"none"===n.errorPolicy)throw e.markError(new iW({graphQLErrors:a}));e.markResult(o,i,n,t),e.markReady()}var u={data:o.data,loading:!1,networkStatus:h.ready};return s&&"ignore"!==n.errorPolicy&&(u.errors=a,u.networkStatus=h.error),u},function(t){var n=t.hasOwnProperty("graphQLErrors")?t:new iW({networkError:t});throw r>=e.lastRequestId&&e.markError(n),n})},e.prototype.fetchQueryObservable=function(e,t,n){var r=this;void 0===n&&(n=h.loading);var i=this.transform(t.query).document,o=this.getVariables(i,t.variables),a=this.getQuery(e),s=this.defaultOptions.watchQuery,u=t.fetchPolicy,c=void 0===u?s&&s.fetchPolicy||"cache-first":u,l=t.errorPolicy,f=void 0===l?s&&s.errorPolicy||"none":l,p=t.returnPartialData,d=t.notifyOnNetworkStatusChange,v=t.context,m=Object.assign({},t,{query:i,variables:o,fetchPolicy:c,errorPolicy:f,returnPartialData:void 0!==p&&p,notifyOnNetworkStatusChange:void 0!==d&&d,context:void 0===v?{}:v}),y=function(e){m.variables=e;var i=r.fetchQueryByPolicy(a,m,n);return"standby"!==m.fetchPolicy&&i.length>0&&a.observableQuery&&a.observableQuery.applyNextFetchPolicy("after-fetch",t),i},g=function(){return r.fetchCancelFns.delete(e)};this.fetchCancelFns.set(e,function(e){g(),setTimeout(function(){return _.cancel(e)})});var _=new i$(this.transform(m.query).hasClientExports?this.localState.addExportedVariables(m.query,m.variables,m.context).then(y):y(m.variables));return _.promise.then(g,g),_},e.prototype.refetchQueries=function(e){var t=this,n=e.updateCache,r=e.include,i=e.optimistic,o=void 0!==i&&i,a=e.removeOptimistic,s=void 0===a?o?iB("refetchQueries"):void 0:a,u=e.onQueryUpdated,c=new Map;r&&this.getObservableQueries(r).forEach(function(e,n){c.set(n,{oq:e,lastDiff:t.getQuery(n).getDiff()})});var l=new Map;return n&&this.cache.batch({update:n,optimistic:o&&s||!1,removeOptimistic:s,onWatchUpdated:function(e,t,n){var r=e.watcher instanceof oI&&e.watcher.observableQuery;if(r){if(u){c.delete(r.queryId);var i=u(r,t,n);return!0===i&&(i=r.refetch()),!1!==i&&l.set(r,i),i}null!==u&&c.set(r.queryId,{oq:r,lastDiff:n,diff:t})}}}),c.size&&c.forEach(function(e,n){var r,i=e.oq,o=e.lastDiff,a=e.diff;if(u){if(!a){var s=i.queryInfo;s.reset(),a=s.getDiff()}r=u(i,a,o)}u&&!0!==r||(r=i.refetch()),!1!==r&&l.set(i,r),n.indexOf("legacyOneTimeQuery")>=0&&t.stopQueryNoBroadcast(n)}),s&&this.cache.removeOptimistic(s),l},e.prototype.fetchQueryByPolicy=function(e,t,n){var r=this,i=t.query,o=t.variables,a=t.fetchPolicy,s=t.refetchWritePolicy,u=t.errorPolicy,c=t.returnPartialData,l=t.context,f=t.notifyOnNetworkStatusChange,p=e.networkStatus;e.init({document:this.transform(i).document,variables:o,networkStatus:n});var d=function(){return e.getDiff(o)},v=function(t,n){void 0===n&&(n=e.networkStatus||h.loading);var a=t.result;!__DEV__||c||r4(a,{})||i2(t.missing);var s=function(e){return n0.of((0,ng.pi)({data:e,loading:iG(n),networkStatus:n},t.complete?null:{partial:!0}))};return a&&r.transform(i).hasForcedResolvers?r.localState.runResolvers({document:i,remoteResult:{data:a},context:l,variables:o,onlyRunForcedResolvers:!0}).then(function(e){return s(e.data||void 0)}):s(a)},m="no-cache"===a?0:n===h.refetch&&"merge"!==s?1:2,y=function(){return r.getResultsFromLink(e,m,{variables:o,context:l,fetchPolicy:a,errorPolicy:u})},g=f&&"number"==typeof p&&p!==n&&iG(n);switch(a){default:case"cache-first":var _=d();if(_.complete)return[v(_,e.markReady())];if(c||g)return[v(_),y()];return[y()];case"cache-and-network":var _=d();if(_.complete||c||g)return[v(_),y()];return[y()];case"cache-only":return[v(d(),e.markReady())];case"network-only":if(g)return[v(d()),y()];return[y()];case"no-cache":if(g)return[v(e.getDiff()),y()];return[y()];case"standby":return[]}},e.prototype.getQuery=function(e){return e&&!this.queries.has(e)&&this.queries.set(e,new oI(this,e)),this.queries.get(e)},e.prototype.prepareContext=function(e){void 0===e&&(e={});var t=this.localState.prepareContext(e);return(0,ng.pi)((0,ng.pi)({},t),{clientAwareness:this.clientAwareness})},e}();function oN(e,t){return iy(e,t,t.variables&&{variables:(0,ng.pi)((0,ng.pi)({},e&&e.variables),t.variables)})}var oV=!1,oL=function(){function e(e){var t=this;this.resetStoreCallbacks=[],this.clearStoreCallbacks=[];var n=e.uri,r=e.credentials,i=e.headers,o=e.cache,a=e.ssrMode,s=void 0!==a&&a,u=e.ssrForceFetchDelay,c=void 0===u?0:u,l=e.connectToDevTools,f=void 0===l?"object"==typeof window&&!window.__APOLLO_CLIENT__&&__DEV__:l,p=e.queryDeduplication,d=void 0===p||p,h=e.defaultOptions,v=e.assumeImmutableResults,m=e.resolvers,y=e.typeDefs,g=e.fragmentMatcher,_=e.name,b=e.version,w=e.link;if(w||(w=n?new r1({uri:n,credentials:r,headers:i}):rg.empty()),!o)throw __DEV__?new nE("To initialize Apollo Client, you must specify a 'cache' property in the options object. \nFor more information, please visit: https://go.apollo.dev/c/docs"):new nE(9);if(this.link=w,this.cache=o,this.disableNetworkFetches=s||c>0,this.queryDeduplication=d,this.defaultOptions=h||Object.create(null),this.typeDefs=y,c&&setTimeout(function(){return t.disableNetworkFetches=!1},c),this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.reFetchObservableQueries.bind(this),f&&"object"==typeof window&&(window.__APOLLO_CLIENT__=this),!oV&&f&&__DEV__&&(oV=!0,"undefined"!=typeof window&&window.document&&window.top===window.self&&!window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__)){var E=window.navigator,k=E&&E.userAgent,S=void 0;"string"==typeof k&&(k.indexOf("Chrome/")>-1?S="https://chrome.google.com/webstore/detail/apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm":k.indexOf("Firefox/")>-1&&(S="https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/")),S&&__DEV__&&nk.log("Download the Apollo DevTools for a better development experience: "+S)}this.version="3.7.3",this.localState=new oA({cache:o,client:this,resolvers:m,fragmentMatcher:g}),this.queryManager=new oj({cache:this.cache,link:this.link,defaultOptions:this.defaultOptions,queryDeduplication:d,ssrMode:s,clientAwareness:{name:_,version:b},localState:this.localState,assumeImmutableResults:void 0!==v&&v,onBroadcast:f?function(){t.devToolsHookCb&&t.devToolsHookCb({action:{},state:{queries:t.queryManager.getQueryStore(),mutations:t.queryManager.mutationStore||{}},dataWithOptimisticResults:t.cache.extract(!0)})}:void 0})}return e.prototype.stop=function(){this.queryManager.stop()},e.prototype.watchQuery=function(e){return this.defaultOptions.watchQuery&&(e=oN(this.defaultOptions.watchQuery,e)),this.disableNetworkFetches&&("network-only"===e.fetchPolicy||"cache-and-network"===e.fetchPolicy)&&(e=(0,ng.pi)((0,ng.pi)({},e),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(e)},e.prototype.query=function(e){return this.defaultOptions.query&&(e=oN(this.defaultOptions.query,e)),__DEV__?nk("cache-and-network"!==e.fetchPolicy,"The cache-and-network fetchPolicy does not work with client.query, because client.query can only return a single result. Please use client.watchQuery to receive multiple results from the cache and the network, or consider using a different fetchPolicy, such as cache-first or network-only."):nk("cache-and-network"!==e.fetchPolicy,10),this.disableNetworkFetches&&"network-only"===e.fetchPolicy&&(e=(0,ng.pi)((0,ng.pi)({},e),{fetchPolicy:"cache-first"})),this.queryManager.query(e)},e.prototype.mutate=function(e){return this.defaultOptions.mutate&&(e=oN(this.defaultOptions.mutate,e)),this.queryManager.mutate(e)},e.prototype.subscribe=function(e){return this.queryManager.startGraphQLSubscription(e)},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!1),this.cache.readQuery(e,t)},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!1),this.cache.readFragment(e,t)},e.prototype.writeQuery=function(e){this.cache.writeQuery(e),this.queryManager.broadcastQueries()},e.prototype.writeFragment=function(e){this.cache.writeFragment(e),this.queryManager.broadcastQueries()},e.prototype.__actionHookForDevTools=function(e){this.devToolsHookCb=e},e.prototype.__requestRaw=function(e){return r_(this.link,e)},e.prototype.resetStore=function(){var e=this;return Promise.resolve().then(function(){return e.queryManager.clearStore({discardWatches:!1})}).then(function(){return Promise.all(e.resetStoreCallbacks.map(function(e){return e()}))}).then(function(){return e.reFetchObservableQueries()})},e.prototype.clearStore=function(){var e=this;return Promise.resolve().then(function(){return e.queryManager.clearStore({discardWatches:!0})}).then(function(){return Promise.all(e.clearStoreCallbacks.map(function(e){return e()}))})},e.prototype.onResetStore=function(e){var t=this;return this.resetStoreCallbacks.push(e),function(){t.resetStoreCallbacks=t.resetStoreCallbacks.filter(function(t){return t!==e})}},e.prototype.onClearStore=function(e){var t=this;return this.clearStoreCallbacks.push(e),function(){t.clearStoreCallbacks=t.clearStoreCallbacks.filter(function(t){return t!==e})}},e.prototype.reFetchObservableQueries=function(e){return this.queryManager.reFetchObservableQueries(e)},e.prototype.refetchQueries=function(e){var t=this.queryManager.refetchQueries(e),n=[],r=[];t.forEach(function(e,t){n.push(t),r.push(e)});var i=Promise.all(r);return i.queries=n,i.results=r,i.catch(function(e){__DEV__&&nk.debug("In client.refetchQueries, Promise.all promise rejected with error ".concat(e))}),i},e.prototype.getObservableQueries=function(e){return void 0===e&&(e="active"),this.queryManager.getObservableQueries(e)},e.prototype.extract=function(e){return this.cache.extract(e)},e.prototype.restore=function(e){return this.cache.restore(e)},e.prototype.addResolvers=function(e){this.localState.addResolvers(e)},e.prototype.setResolvers=function(e){this.localState.setResolvers(e)},e.prototype.getResolvers=function(){return this.localState.getResolvers()},e.prototype.setLocalStateFragmentMatcher=function(e){this.localState.setFragmentMatcher(e)},e.prototype.setLink=function(e){this.link=this.queryManager.link=e},e}(),oq=function(){function e(){this.getFragmentDoc=ok(n2)}return e.prototype.batch=function(e){var t,n=this,r="string"==typeof e.optimistic?e.optimistic:!1===e.optimistic?null:void 0;return this.performTransaction(function(){return t=e.update(n)},r),t},e.prototype.recordOptimisticTransaction=function(e,t){this.performTransaction(e,t)},e.prototype.transformDocument=function(e){return e},e.prototype.transformForLink=function(e){return e},e.prototype.identify=function(e){},e.prototype.gc=function(){return[]},e.prototype.modify=function(e){return!1},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read((0,ng.pi)((0,ng.pi)({},e),{rootId:e.id||"ROOT_QUERY",optimistic:t}))},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read((0,ng.pi)((0,ng.pi)({},e),{query:this.getFragmentDoc(e.fragment,e.fragmentName),rootId:e.id,optimistic:t}))},e.prototype.writeQuery=function(e){var t=e.id,n=e.data,r=(0,ng._T)(e,["id","data"]);return this.write(Object.assign(r,{dataId:t||"ROOT_QUERY",result:n}))},e.prototype.writeFragment=function(e){var t=e.id,n=e.data,r=e.fragment,i=e.fragmentName,o=(0,ng._T)(e,["id","data","fragment","fragmentName"]);return this.write(Object.assign(o,{query:this.getFragmentDoc(r,i),dataId:t,result:n}))},e.prototype.updateQuery=function(e,t){return this.batch({update:function(n){var r=n.readQuery(e),i=t(r);return null==i?r:(n.writeQuery((0,ng.pi)((0,ng.pi)({},e),{data:i})),i)}})},e.prototype.updateFragment=function(e,t){return this.batch({update:function(n){var r=n.readFragment(e),i=t(r);return null==i?r:(n.writeFragment((0,ng.pi)((0,ng.pi)({},e),{data:i})),i)}})},e}(),oB=function(e){function t(n,r,i,o){var a,s=e.call(this,n)||this;if(s.message=n,s.path=r,s.query=i,s.variables=o,Array.isArray(s.path)){s.missing=s.message;for(var u=s.path.length-1;u>=0;--u)s.missing=((a={})[s.path[u]]=s.missing,a)}else s.missing=s.path;return s.__proto__=t.prototype,s}return(0,ng.ZT)(t,e),t}(Error);function oU(e){if(__DEV__){var t;(t=new Set([e])).forEach(function(e){n1(e)&&function(e){if(__DEV__&&!Object.isFrozen(e))try{Object.freeze(e)}catch(t){if(t instanceof TypeError)return null;throw t}return e}(e)===e&&Object.getOwnPropertyNames(e).forEach(function(n){n1(e[n])&&t.add(e[n])})})}return e}var oQ=Object.create(null),oz=function(){return oQ},o$=Object.create(null),oH=function(){function e(e,t){var n=this;this.policies=e,this.group=t,this.data=Object.create(null),this.rootIds=Object.create(null),this.refs=Object.create(null),this.getFieldValue=function(e,t){return oU(n8(e)?n.get(e.__ref,t):e&&e[t])},this.canRead=function(e){return n8(e)?n.has(e.__ref):"object"==typeof e},this.toReference=function(e,t){if("string"==typeof e)return n6(e);if(n8(e))return e;var r=n.policies.identify(e)[0];if(r){var i=n6(r);return t&&n.merge(r,e),i}}}return e.prototype.toObject=function(){return(0,ng.pi)({},this.data)},e.prototype.has=function(e){return void 0!==this.lookup(e,!0)},e.prototype.get=function(e,t){if(this.group.depend(e,t),ig.call(this.data,e)){var n=this.data[e];if(n&&ig.call(n,t))return n[t]}return"__typename"===t&&ig.call(this.policies.rootTypenamesById,e)?this.policies.rootTypenamesById[e]:this instanceof oY?this.parent.get(e,t):void 0},e.prototype.lookup=function(e,t){return(t&&this.group.depend(e,"__exists"),ig.call(this.data,e))?this.data[e]:this instanceof oY?this.parent.lookup(e,t):this.policies.rootTypenamesById[e]?Object.create(null):void 0},e.prototype.merge=function(e,t){var n,r=this;n8(e)&&(e=e.__ref),n8(t)&&(t=t.__ref);var i="string"==typeof e?this.lookup(n=e):e,o="string"==typeof t?this.lookup(n=t):t;if(o){__DEV__?nk("string"==typeof n,"store.merge expects a string ID"):nk("string"==typeof n,1);var a=new iu(oX).merge(i,o);if(this.data[n]=a,a!==i&&(delete this.refs[n],this.group.caching)){var s=Object.create(null);i||(s.__exists=1),Object.keys(o).forEach(function(e){if(!i||i[e]!==a[e]){s[e]=1;var t=ix(e);t===e||r.policies.hasKeyArgs(a.__typename,t)||(s[t]=1),void 0!==a[e]||r instanceof oY||delete a[e]}}),s.__typename&&!(i&&i.__typename)&&this.policies.rootTypenamesById[n]===a.__typename&&delete s.__typename,Object.keys(s).forEach(function(e){return r.group.dirty(n,e)})}}},e.prototype.modify=function(e,t){var n=this,r=this.lookup(e);if(r){var i=Object.create(null),o=!1,a=!0,s={DELETE:oQ,INVALIDATE:o$,isReference:n8,toReference:this.toReference,canRead:this.canRead,readField:function(t,r){return n.policies.readField("string"==typeof t?{fieldName:t,from:r||n6(e)}:t,{store:n})}};if(Object.keys(r).forEach(function(u){var c=ix(u),l=r[u];if(void 0!==l){var f="function"==typeof t?t:t[u]||t[c];if(f){var p=f===oz?oQ:f(oU(l),(0,ng.pi)((0,ng.pi)({},s),{fieldName:c,storeFieldName:u,storage:n.getStorage(e,u)}));p===o$?n.group.dirty(e,u):(p===oQ&&(p=void 0),p!==l&&(i[u]=p,o=!0,l=p))}void 0!==l&&(a=!1)}}),o)return this.merge(e,i),a&&(this instanceof oY?this.data[e]=void 0:delete this.data[e],this.group.dirty(e,"__exists")),!0}return!1},e.prototype.delete=function(e,t,n){var r,i=this.lookup(e);if(i){var o=this.getFieldValue(i,"__typename"),a=t&&n?this.policies.getStoreFieldName({typename:o,fieldName:t,args:n}):t;return this.modify(e,a?((r={})[a]=oz,r):oz)}return!1},e.prototype.evict=function(e,t){var n=!1;return e.id&&(ig.call(this.data,e.id)&&(n=this.delete(e.id,e.fieldName,e.args)),this instanceof oY&&this!==t&&(n=this.parent.evict(e,t)||n),(e.fieldName||n)&&this.group.dirty(e.id,e.fieldName||"__exists")),n},e.prototype.clear=function(){this.replace(null)},e.prototype.extract=function(){var e=this,t=this.toObject(),n=[];return this.getRootIdSet().forEach(function(t){ig.call(e.policies.rootTypenamesById,t)||n.push(t)}),n.length&&(t.__META={extraRootIds:n.sort()}),t},e.prototype.replace=function(e){var t=this;if(Object.keys(this.data).forEach(function(n){e&&ig.call(e,n)||t.delete(n)}),e){var n=e.__META,r=(0,ng._T)(e,["__META"]);Object.keys(r).forEach(function(e){t.merge(e,r[e])}),n&&n.extraRootIds.forEach(this.retain,this)}},e.prototype.retain=function(e){return this.rootIds[e]=(this.rootIds[e]||0)+1},e.prototype.release=function(e){if(this.rootIds[e]>0){var t=--this.rootIds[e];return t||delete this.rootIds[e],t}return 0},e.prototype.getRootIdSet=function(e){return void 0===e&&(e=new Set),Object.keys(this.rootIds).forEach(e.add,e),this instanceof oY?this.parent.getRootIdSet(e):Object.keys(this.policies.rootTypenamesById).forEach(e.add,e),e},e.prototype.gc=function(){var e=this,t=this.getRootIdSet(),n=this.toObject();t.forEach(function(r){ig.call(n,r)&&(Object.keys(e.findChildRefIds(r)).forEach(t.add,t),delete n[r])});var r=Object.keys(n);if(r.length){for(var i=this;i instanceof oY;)i=i.parent;r.forEach(function(e){return i.delete(e)})}return r},e.prototype.findChildRefIds=function(e){if(!ig.call(this.refs,e)){var t=this.refs[e]=Object.create(null),n=this.data[e];if(!n)return t;var r=new Set([n]);r.forEach(function(e){n8(e)&&(t[e.__ref]=!0),n1(e)&&Object.keys(e).forEach(function(t){var n=e[t];n1(n)&&r.add(n)})})}return this.refs[e]},e.prototype.makeCacheKey=function(){return this.group.keyMaker.lookupArray(arguments)},e}(),oW=function(){function e(e,t){void 0===t&&(t=null),this.caching=e,this.parent=t,this.d=null,this.resetCaching()}return e.prototype.resetCaching=function(){this.d=this.caching?ob():null,this.keyMaker=new im(rP)},e.prototype.depend=function(e,t){if(this.d){this.d(t+"#"+e);var n=ix(t);n!==t&&this.d(n+"#"+e),this.parent&&this.parent.depend(e,t)}},e.prototype.dirty=function(e,t){this.d&&this.d.dirty(t+"#"+e,"__exists"===t?"forget":"setDirty")},e}();function oG(e,t){oZ(e)&&e.group.depend(t,"__exists")}c=function(e){function t(t){var n=t.policies,r=t.resultCaching,i=t.seed,o=e.call(this,n,new oW(void 0===r||r))||this;return o.stump=new oJ(o),o.storageTrie=new im(rP),i&&o.replace(i),o}return(0,ng.ZT)(t,e),t.prototype.addLayer=function(e,t){return this.stump.addLayer(e,t)},t.prototype.removeLayer=function(){return this},t.prototype.getStorage=function(){return this.storageTrie.lookupArray(arguments)},t}(u=oH||(oH={})),u.Root=c;var oY=function(e){function t(t,n,r,i){var o=e.call(this,n.policies,i)||this;return o.id=t,o.parent=n,o.replay=r,o.group=i,r(o),o}return(0,ng.ZT)(t,e),t.prototype.addLayer=function(e,n){return new t(e,this,n,this.group)},t.prototype.removeLayer=function(e){var t=this,n=this.parent.removeLayer(e);return e===this.id?(this.group.caching&&Object.keys(this.data).forEach(function(e){var r=t.data[e],i=n.lookup(e);i?r?r!==i&&Object.keys(r).forEach(function(n){r4(r[n],i[n])||t.group.dirty(e,n)}):(t.group.dirty(e,"__exists"),Object.keys(i).forEach(function(n){t.group.dirty(e,n)})):t.delete(e)}),n):n===this.parent?this:n.addLayer(this.id,this.replay)},t.prototype.toObject=function(){return(0,ng.pi)((0,ng.pi)({},this.parent.toObject()),this.data)},t.prototype.findChildRefIds=function(t){var n=this.parent.findChildRefIds(t);return ig.call(this.data,t)?(0,ng.pi)((0,ng.pi)({},n),e.prototype.findChildRefIds.call(this,t)):n},t.prototype.getStorage=function(){for(var e=this.parent;e.parent;)e=e.parent;return e.getStorage.apply(e,arguments)},t}(oH),oJ=function(e){function t(t){return e.call(this,"EntityStore.Stump",t,function(){},new oW(t.group.caching,t.group))||this}return(0,ng.ZT)(t,e),t.prototype.removeLayer=function(){return this},t.prototype.merge=function(){return this.parent.merge.apply(this.parent,arguments)},t}(oY);function oX(e,t,n){var r=e[n],i=t[n];return r4(r,i)?r:i}function oZ(e){return!!(e instanceof oH&&e.group.caching)}function oK(e){return[e.selectionSet,e.objectOrReference,e.context,e.context.canonizeResults]}var o0=function(){function e(e){var t=this;this.knownResults=new(rP?WeakMap:Map),this.config=iy(e,{addTypename:!1!==e.addTypename,canonizeResults:ik(e)}),this.canon=e.canon||new iP,this.executeSelectionSet=ok(function(e){var n,r=e.context.canonizeResults,i=oK(e);i[3]=!r;var o=(n=t.executeSelectionSet).peek.apply(n,i);return o?r?(0,ng.pi)((0,ng.pi)({},o),{result:t.canon.admit(o.result)}):o:(oG(e.context.store,e.enclosingRef.__ref),t.execSelectionSetImpl(e))},{max:this.config.resultCacheMaxSize,keyArgs:oK,makeCacheKey:function(e,t,n,r){if(oZ(n.store))return n.store.makeCacheKey(e,n8(t)?t.__ref:t,n.varString,r)}}),this.executeSubSelectedArray=ok(function(e){return oG(e.context.store,e.enclosingRef.__ref),t.execSubSelectedArrayImpl(e)},{max:this.config.resultCacheMaxSize,makeCacheKey:function(e){var t=e.field,n=e.array,r=e.context;if(oZ(r.store))return r.store.makeCacheKey(t,n,r.varString)}})}return e.prototype.resetCanon=function(){this.canon=new iP},e.prototype.diffQueryAgainstStore=function(e){var t,n=e.store,r=e.query,i=e.rootId,o=e.variables,a=e.returnPartialData,s=e.canonizeResults,u=void 0===s?this.config.canonizeResults:s,c=this.config.cache.policies;o=(0,ng.pi)((0,ng.pi)({},rd(rf(r))),o);var l=n6(void 0===i?"ROOT_QUERY":i),f=this.executeSelectionSet({selectionSet:rp(r).selectionSet,objectOrReference:l,enclosingRef:l,context:(0,ng.pi)({store:n,query:r,policies:c,variables:o,varString:iA(o),canonizeResults:u},iT(r,this.config.fragments))});if(f.missing&&(t=[new oB(function(e){try{JSON.stringify(e,function(e,t){if("string"==typeof t)throw t;return t})}catch(t){return t}}(f.missing),f.missing,r,o)],!(void 0===a||a)))throw t[0];return{result:f.result,complete:!t,missing:t}},e.prototype.isFresh=function(e,t,n,r){if(oZ(r.store)&&this.knownResults.get(e)===n){var i=this.executeSelectionSet.peek(n,t,r,this.canon.isKnown(e));if(i&&e===i.result)return!0}return!1},e.prototype.execSelectionSetImpl=function(e){var t,n=this,r=e.selectionSet,i=e.objectOrReference,o=e.enclosingRef,a=e.context;if(n8(i)&&!a.policies.rootTypenamesById[i.__ref]&&!a.store.has(i.__ref))return{result:this.canon.empty,missing:"Dangling reference to missing ".concat(i.__ref," object")};var s=a.variables,u=a.policies,c=a.store.getFieldValue(i,"__typename"),l=[],p=new iu;function d(e,n){var r;return e.missing&&(t=p.merge(t,((r={})[n]=e.missing,r))),e.result}this.config.addTypename&&"string"==typeof c&&!u.rootIdsByTypename[c]&&l.push({__typename:c});var h=new Set(r.selections);h.forEach(function(e){var r,v;if(rx(e,s)){if(ro(e)){var m=u.readField({fieldName:e.name.value,field:e,variables:a.variables,from:i},a),y=rr(e);void 0===m?iV.added(e)||(t=p.merge(t,((r={})[y]="Can't find field '".concat(e.name.value,"' on ").concat(n8(i)?i.__ref+" object":"object "+JSON.stringify(i,null,2)),r))):ib(m)?m=d(n.executeSubSelectedArray({field:e,array:m,enclosingRef:o,context:a}),y):e.selectionSet?null!=m&&(m=d(n.executeSelectionSet({selectionSet:e.selectionSet,objectOrReference:m,enclosingRef:n8(m)?m:o,context:a}),y)):a.canonizeResults&&(m=n.canon.pass(m)),void 0!==m&&l.push(((v={})[y]=m,v))}else{var g=n5(e,a.lookupFragment);if(!g&&e.kind===f.FRAGMENT_SPREAD)throw __DEV__?new nE("No fragment named ".concat(e.name.value)):new nE(5);g&&u.fragmentMatches(g,c)&&g.selectionSet.selections.forEach(h.add,h)}}});var v={result:ia(l),missing:t},m=a.canonizeResults?this.canon.admit(v):oU(v);return m.result&&this.knownResults.set(m.result,r),m},e.prototype.execSubSelectedArrayImpl=function(e){var t,n=this,r=e.field,i=e.array,o=e.enclosingRef,a=e.context,s=new iu;function u(e,n){var r;return e.missing&&(t=s.merge(t,((r={})[n]=e.missing,r))),e.result}return r.selectionSet&&(i=i.filter(a.store.canRead)),i=i.map(function(e,t){return null===e?null:ib(e)?u(n.executeSubSelectedArray({field:r,array:e,enclosingRef:o,context:a}),t):r.selectionSet?u(n.executeSelectionSet({selectionSet:r.selectionSet,objectOrReference:e,enclosingRef:n8(e)?e:o,context:a}),t):(__DEV__&&function(e,t,n){if(!t.selectionSet){var r=new Set([n]);r.forEach(function(n){n1(n)&&(__DEV__?nk(!n8(n),"Missing selection set for object of type ".concat(n8(n)?e.get(n.__ref,"__typename"):n&&n.__typename," returned for query field ").concat(t.name.value)):nk(!n8(n),6),Object.values(n).forEach(r.add,r))})}}(a.store,r,e),e)}),{result:a.canonizeResults?this.canon.admit(i):i,missing:t}},e}(),o1=Object.create(null);function o2(e){var t=JSON.stringify(e);return o1[t]||(o1[t]=Object.create(null))}function o3(e){var t=o2(e);return t.keyFieldsFn||(t.keyFieldsFn=function(t,n){var r=function(e,t){return n.readField(t,e)},i=n.keyObject=o6(e,function(e){var i=o4(n.storeObject,e,r);return void 0===i&&t!==n.storeObject&&ig.call(t,e[0])&&(i=o4(t,e,o8)),__DEV__?nk(void 0!==i,"Missing field '".concat(e.join("."),"' while extracting keyFields from ").concat(JSON.stringify(t))):nk(void 0!==i,2),i});return"".concat(n.typename,":").concat(JSON.stringify(i))})}function o5(e){var t=o2(e);return t.keyArgsFn||(t.keyArgsFn=function(t,n){var r=n.field,i=n.variables,o=n.fieldName,a=JSON.stringify(o6(e,function(e){var n=e[0],o=n.charAt(0);if("@"===o){if(r&&ir(r.directives)){var a=n.slice(1),s=r.directives.find(function(e){return e.name.value===a}),u=s&&rn(s,i);return u&&o4(u,e.slice(1))}return}if("$"===o){var c=n.slice(1);if(i&&ig.call(i,c)){var l=e.slice(0);return l[0]=c,o4(i,l)}return}if(t)return o4(t,e)}));return(t||"{}"!==a)&&(o+=":"+a),o})}function o6(e,t){var n=new iu;return(function e(t){var n=o2(t);if(!n.paths){var r=n.paths=[],i=[];t.forEach(function(n,o){ib(n)?(e(n).forEach(function(e){return r.push(i.concat(e))}),i.length=0):(i.push(n),ib(t[o+1])||(r.push(i.slice(0)),i.length=0))})}return n.paths})(e).reduce(function(e,r){var i,o=t(r);if(void 0!==o){for(var a=r.length-1;a>=0;--a)(i={})[r[a]]=o,o=i;e=n.merge(e,o)}return e},Object.create(null))}function o8(e,t){return e[t]}function o4(e,t,n){return n=n||o8,function e(t){return n1(t)?ib(t)?t.map(e):o6(Object.keys(t).sort(),function(e){return o4(t,e)}):t}(t.reduce(function e(t,r){return ib(t)?t.map(function(t){return e(t,r)}):t&&n(t,r)},e))}function o9(e){return void 0!==e.args?e.args:e.field?rn(e.field,e.variables):null}n7.setStringify(iA);var o7=function(){},ae=function(e,t){return t.fieldName},at=function(e,t,n){return(0,n.mergeObjects)(e,t)},an=function(e,t){return t},ar=function(){function e(e){this.config=e,this.typePolicies=Object.create(null),this.toBeAdded=Object.create(null),this.supertypeMap=new Map,this.fuzzySubtypes=new Map,this.rootIdsByTypename=Object.create(null),this.rootTypenamesById=Object.create(null),this.usingPossibleTypes=!1,this.config=(0,ng.pi)({dataIdFromObject:iw},e),this.cache=this.config.cache,this.setRootTypename("Query"),this.setRootTypename("Mutation"),this.setRootTypename("Subscription"),e.possibleTypes&&this.addPossibleTypes(e.possibleTypes),e.typePolicies&&this.addTypePolicies(e.typePolicies)}return e.prototype.identify=function(e,t){var n,r,i=this,o=t&&(t.typename||(null===(n=t.storeObject)||void 0===n?void 0:n.__typename))||e.__typename;if(o===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];for(var a=t&&t.storeObject||e,s=(0,ng.pi)((0,ng.pi)({},t),{typename:o,storeObject:a,readField:t&&t.readField||function(){var e=ao(arguments,a);return i.readField(e,{store:i.cache.data,variables:e.variables})}}),u=o&&this.getTypePolicy(o),c=u&&u.keyFn||this.config.dataIdFromObject;c;){var l=c(e,s);if(ib(l))c=o3(l);else{r=l;break}}return r=r?String(r):void 0,s.keyObject?[r,s.keyObject]:[r]},e.prototype.addTypePolicies=function(e){var t=this;Object.keys(e).forEach(function(n){var r=e[n],i=r.queryType,o=r.mutationType,a=r.subscriptionType,s=(0,ng._T)(r,["queryType","mutationType","subscriptionType"]);i&&t.setRootTypename("Query",n),o&&t.setRootTypename("Mutation",n),a&&t.setRootTypename("Subscription",n),ig.call(t.toBeAdded,n)?t.toBeAdded[n].push(s):t.toBeAdded[n]=[s]})},e.prototype.updateTypePolicy=function(e,t){var n=this,r=this.getTypePolicy(e),i=t.keyFields,o=t.fields;function a(e,t){e.merge="function"==typeof t?t:!0===t?at:!1===t?an:e.merge}a(r,t.merge),r.keyFn=!1===i?o7:ib(i)?o3(i):"function"==typeof i?i:r.keyFn,o&&Object.keys(o).forEach(function(t){var r=n.getFieldPolicy(e,t,!0),i=o[t];if("function"==typeof i)r.read=i;else{var s=i.keyArgs,u=i.read,c=i.merge;r.keyFn=!1===s?ae:ib(s)?o5(s):"function"==typeof s?s:r.keyFn,"function"==typeof u&&(r.read=u),a(r,c)}r.read&&r.merge&&(r.keyFn=r.keyFn||ae)})},e.prototype.setRootTypename=function(e,t){void 0===t&&(t=e);var n="ROOT_"+e.toUpperCase(),r=this.rootTypenamesById[n];t!==r&&(__DEV__?nk(!r||r===e,"Cannot change root ".concat(e," __typename more than once")):nk(!r||r===e,3),r&&delete this.rootIdsByTypename[r],this.rootIdsByTypename[t]=n,this.rootTypenamesById[n]=t)},e.prototype.addPossibleTypes=function(e){var t=this;this.usingPossibleTypes=!0,Object.keys(e).forEach(function(n){t.getSupertypeSet(n,!0),e[n].forEach(function(e){t.getSupertypeSet(e,!0).add(n);var r=e.match(iS);r&&r[0]===e||t.fuzzySubtypes.set(e,RegExp(e))})})},e.prototype.getTypePolicy=function(e){var t=this;if(!ig.call(this.typePolicies,e)){var n=this.typePolicies[e]=Object.create(null);n.fields=Object.create(null);var r=this.supertypeMap.get(e);r&&r.size&&r.forEach(function(e){var r=t.getTypePolicy(e),i=r.fields;Object.assign(n,(0,ng._T)(r,["fields"])),Object.assign(n.fields,i)})}var i=this.toBeAdded[e];return i&&i.length&&i.splice(0).forEach(function(n){t.updateTypePolicy(e,n)}),this.typePolicies[e]},e.prototype.getFieldPolicy=function(e,t,n){if(e){var r=this.getTypePolicy(e).fields;return r[t]||n&&(r[t]=Object.create(null))}},e.prototype.getSupertypeSet=function(e,t){var n=this.supertypeMap.get(e);return!n&&t&&this.supertypeMap.set(e,n=new Set),n},e.prototype.fragmentMatches=function(e,t,n,r){var i=this;if(!e.typeCondition)return!0;if(!t)return!1;var o=e.typeCondition.name.value;if(t===o)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(o))for(var a=this.getSupertypeSet(t,!0),s=[a],u=function(e){var t=i.getSupertypeSet(e,!1);t&&t.size&&0>s.indexOf(t)&&s.push(t)},c=!!(n&&this.fuzzySubtypes.size),l=!1,f=0;f<s.length;++f){var p=s[f];if(p.has(o))return a.has(o)||(l&&__DEV__&&nk.warn("Inferring subtype ".concat(t," of supertype ").concat(o)),a.add(o)),!0;p.forEach(u),c&&f===s.length-1&&function e(t,n,r){return!!n1(n)&&(ib(n)?n.every(function(n){return e(t,n,r)}):t.selections.every(function(t){if(ro(t)&&rx(t,r)){var i=rr(t);return ig.call(n,i)&&(!t.selectionSet||e(t.selectionSet,n[i],r))}return!0}))}(e.selectionSet,n,r)&&(c=!1,l=!0,this.fuzzySubtypes.forEach(function(e,n){var r=t.match(e);r&&r[0]===t&&u(n)}))}return!1},e.prototype.hasKeyArgs=function(e,t){var n=this.getFieldPolicy(e,t,!1);return!!(n&&n.keyFn)},e.prototype.getStoreFieldName=function(e){var t,n,r,i,o,a=e.typename,s=e.fieldName,u=this.getFieldPolicy(a,s,!1),c=u&&u.keyFn;if(c&&a)for(var l={typename:a,fieldName:s,field:e.field||null,variables:e.variables},f=o9(e);c;){var p=c(f,l);if(ib(p))c=o5(p);else{o=p||s;break}}return void 0===o&&(o=e.field?(t=e.field,n=e.variables,r=null,t.directives&&(r={},t.directives.forEach(function(e){r[e.name.value]={},e.arguments&&e.arguments.forEach(function(t){var i=t.name,o=t.value;return n4(r[e.name.value],i,o,n)})})),i=null,t.arguments&&t.arguments.length&&(i={},t.arguments.forEach(function(e){return n4(i,e.name,e.value,n)})),n7(t.name.value,i,r)):n7(s,o9(e))),!1===o?s:s===ix(o)?o:s+":"+o},e.prototype.readField=function(e,t){var n=e.from;if(n&&(e.field||e.fieldName)){if(void 0===e.typename){var r=t.store.getFieldValue(n,"__typename");r&&(e.typename=r)}var i=this.getStoreFieldName(e),o=ix(i),a=t.store.getFieldValue(n,i),s=this.getFieldPolicy(e.typename,o,!1),u=s&&s.read;if(u){var c=ai(this,n,e,t,t.store.getStorage(n8(n)?n.__ref:n,i));return oS.withValue(this.cache,u,[a,c])}return a}},e.prototype.getReadFunction=function(e,t){var n=this.getFieldPolicy(e,t,!1);return n&&n.read},e.prototype.getMergeFunction=function(e,t,n){var r=this.getFieldPolicy(e,t,!1),i=r&&r.merge;return!i&&n&&(i=(r=this.getTypePolicy(n))&&r.merge),i},e.prototype.runMergeFunction=function(e,t,n,r,i){var o=n.field,a=n.typename,s=n.merge;return s===at?aa(r.store)(e,t):s===an?t:(r.overwrite&&(e=void 0),s(e,t,ai(this,void 0,{typename:a,fieldName:o.name.value,field:o,variables:r.variables},r,i||Object.create(null))))},e}();function ai(e,t,n,r,i){var o=e.getStoreFieldName(n),a=ix(o),s=n.variables||r.variables,u=r.store,c=u.toReference,l=u.canRead;return{args:o9(n),field:n.field||null,fieldName:a,storeFieldName:o,variables:s,isReference:n8,toReference:c,storage:i,cache:e.cache,canRead:l,readField:function(){return e.readField(ao(arguments,t,s),r)},mergeObjects:aa(r.store)}}function ao(e,t,n){var r,i,o,a=e[0],s=e[1],u=e.length;return"string"==typeof a?o={fieldName:a,from:u>1?s:t}:(o=(0,ng.pi)({},a),ig.call(o,"from")||(o.from=t)),__DEV__&&void 0===o.from&&__DEV__&&nk.warn("Undefined 'from' passed to readField with arguments ".concat((r=Array.from(e),i=iB("stringifyForDisplay"),JSON.stringify(r,function(e,t){return void 0===t?i:t}).split(JSON.stringify(i)).join("<undefined>")))),void 0===o.variables&&(o.variables=n),o}function aa(e){return function(t,n){if(ib(t)||ib(n))throw __DEV__?new nE("Cannot automatically merge arrays"):new nE(4);if(n1(t)&&n1(n)){var r=e.getFieldValue(t,"__typename"),i=e.getFieldValue(n,"__typename");if(r&&i&&r!==i)return n;if(n8(t)&&iO(n))return e.merge(t.__ref,n),t;if(iO(t)&&n8(n))return e.merge(t,n.__ref),n;if(iO(t)&&iO(n))return(0,ng.pi)((0,ng.pi)({},t),n)}return n}}function as(e,t,n){var r="".concat(t).concat(n),i=e.flavors.get(r);return i||e.flavors.set(r,i=e.clientOnly===t&&e.deferred===n?e:(0,ng.pi)((0,ng.pi)({},e),{clientOnly:t,deferred:n})),i}var au=function(){function e(e,t,n){this.cache=e,this.reader=t,this.fragments=n}return e.prototype.writeToStore=function(e,t){var n=this,r=t.query,i=t.result,o=t.dataId,a=t.variables,s=t.overwrite,u=ru(r),c=new iu;a=(0,ng.pi)((0,ng.pi)({},rd(u)),a);var l=(0,ng.pi)((0,ng.pi)({store:e,written:Object.create(null),merge:function(e,t){return c.merge(e,t)},variables:a,varString:iA(a)},iT(r,this.fragments)),{overwrite:!!s,incomingById:new Map,clientOnly:!1,deferred:!1,flavors:new Map}),f=this.processSelectionSet({result:i||Object.create(null),dataId:o,selectionSet:u.selectionSet,mergeTree:{map:new Map},context:l});if(!n8(f))throw __DEV__?new nE("Could not identify object ".concat(JSON.stringify(i))):new nE(7);return l.incomingById.forEach(function(t,r){var i=t.storeObject,o=t.mergeTree,a=t.fieldNodeSet,s=n6(r);if(o&&o.map.size){var u=n.applyMerges(o,s,i,l);if(n8(u))return;i=u}if(__DEV__&&!l.overwrite){var c=Object.create(null);a.forEach(function(e){e.selectionSet&&(c[e.name.value]=!0)});var f=function(e){var t=o&&o.map.get(e);return Boolean(t&&t.info&&t.info.merge)};Object.keys(i).forEach(function(e){!0!==c[ix(e)]||f(e)||function(e,t,n,r){var i=function(e){var t=r.getFieldValue(e,n);return"object"==typeof t&&t},o=i(e);if(o){var a=i(t);if(!(!a||n8(o)||r4(o,a)||Object.keys(o).every(function(e){return void 0!==r.getFieldValue(a,e)}))){var s=r.getFieldValue(e,"__typename")||r.getFieldValue(t,"__typename"),u=ix(n),c="".concat(s,".").concat(u);if(!ad.has(c)){ad.add(c);var l=[];ib(o)||ib(a)||[o,a].forEach(function(e){var t=r.getFieldValue(e,"__typename");"string"!=typeof t||l.includes(t)||l.push(t)}),__DEV__&&nk.warn("Cache data may be lost when replacing the ".concat(u," field of a ").concat(s," object.\n\nTo address this problem (which is not a bug in Apollo Client), ").concat(l.length?"either ensure all objects of type "+l.join(" and ")+" have an ID or a custom merge function, or ":"","define a custom merge function for the ").concat(c," field, so InMemoryCache can safely merge these objects:\n\n  existing: ").concat(JSON.stringify(o).slice(0,1e3),"\n  incoming: ").concat(JSON.stringify(a).slice(0,1e3),"\n\nFor more information about these options, please refer to the documentation:\n\n  * Ensuring entity objects have IDs: https://go.apollo.dev/c/generating-unique-identifiers\n  * Defining custom merge functions: https://go.apollo.dev/c/merging-non-normalized-objects\n"))}}}}(s,i,e,l.store)})}e.merge(r,i)}),e.retain(f.__ref),f},e.prototype.processSelectionSet=function(e){var t=this,n=e.dataId,r=e.result,i=e.selectionSet,o=e.context,a=e.mergeTree,s=this.cache.policies,u=Object.create(null),c=n&&s.rootTypenamesById[n]||ri(r,i,o.fragmentMap)||n&&o.store.get(n,"__typename");"string"==typeof c&&(u.__typename=c);var l=function(){var e=ao(arguments,u,o.variables);if(n8(e.from)){var t=o.incomingById.get(e.from.__ref);if(t){var n=s.readField((0,ng.pi)((0,ng.pi)({},e),{from:t.storeObject}),o);if(void 0!==n)return n}}return s.readField(e,o)},f=new Set;this.flattenFields(i,r,o,c).forEach(function(e,n){var i,o=r[rr(n)];if(f.add(n),void 0!==o){var p=s.getStoreFieldName({typename:c,fieldName:n.name.value,field:n,variables:e.variables}),d=al(a,p),h=t.processFieldValue(o,n,n.selectionSet?as(e,!1,!1):e,d),v=void 0;n.selectionSet&&(n8(h)||iO(h))&&(v=l("__typename",h));var m=s.getMergeFunction(c,n.name.value,v);m?d.info={field:n,typename:c,merge:m}:ap(a,p),u=e.merge(u,((i={})[p]=h,i))}else __DEV__&&!e.clientOnly&&!e.deferred&&!iV.added(n)&&!s.getReadFunction(c,n.name.value)&&__DEV__&&nk.error("Missing field '".concat(rr(n),"' while writing result ").concat(JSON.stringify(r,null,2)).substring(0,1e3))});try{var p=s.identify(r,{typename:c,selectionSet:i,fragmentMap:o.fragmentMap,storeObject:u,readField:l}),d=p[0],h=p[1];n=n||d,h&&(u=o.merge(u,h))}catch(v){if(!n)throw v}if("string"==typeof n){var m=n6(n),y=o.written[n]||(o.written[n]=[]);if(y.indexOf(i)>=0||(y.push(i),this.reader&&this.reader.isFresh(r,m,i,o)))return m;var g=o.incomingById.get(n);return g?(g.storeObject=o.merge(g.storeObject,u),g.mergeTree=function e(t,n){if(t===n||!n||af(n))return t;if(!t||af(t))return n;var r=t.info&&n.info?(0,ng.pi)((0,ng.pi)({},t.info),n.info):t.info||n.info,i=t.map.size&&n.map.size,o={info:r,map:i?new Map:t.map.size?t.map:n.map};if(i){var a=new Set(n.map.keys());t.map.forEach(function(t,r){o.map.set(r,e(t,n.map.get(r))),a.delete(r)}),a.forEach(function(r){o.map.set(r,e(n.map.get(r),t.map.get(r)))})}return o}(g.mergeTree,a),f.forEach(function(e){return g.fieldNodeSet.add(e)})):o.incomingById.set(n,{storeObject:u,mergeTree:af(a)?void 0:a,fieldNodeSet:f}),m}return u},e.prototype.processFieldValue=function(e,t,n,r){var i=this;return t.selectionSet&&null!==e?ib(e)?e.map(function(e,o){var a=i.processFieldValue(e,t,n,al(r,o));return ap(r,o),a}):this.processSelectionSet({result:e,selectionSet:t.selectionSet,context:n,mergeTree:r}):__DEV__?iJ(e):e},e.prototype.flattenFields=function(e,t,n,r){void 0===r&&(r=ri(t,e,n.fragmentMap));var i=new Map,o=this.cache.policies,a=new im(!1);return function e(s,u){var c=a.lookup(s,u.clientOnly,u.deferred);c.visited||(c.visited=!0,s.selections.forEach(function(a){if(rx(a,n.variables)){var s=u.clientOnly,c=u.deferred;if(!(s&&c)&&ir(a.directives)&&a.directives.forEach(function(e){var t=e.name.value;if("client"===t&&(s=!0),"defer"===t){var r=rn(e,n.variables);r&&!1===r.if||(c=!0)}}),ro(a)){var l=i.get(a);l&&(s=s&&l.clientOnly,c=c&&l.deferred),i.set(a,as(n,s,c))}else{var p=n5(a,n.lookupFragment);if(!p&&a.kind===f.FRAGMENT_SPREAD)throw __DEV__?new nE("No fragment named ".concat(a.name.value)):new nE(8);p&&o.fragmentMatches(p,r,t,n.variables)&&e(p.selectionSet,as(n,s,c))}}}))}(e,n),i},e.prototype.applyMerges=function(e,t,n,r,i){var o=this;if(e.map.size&&!n8(n)){var a,s,u=!ib(n)&&(n8(t)||iO(t))?t:void 0,c=n;u&&!i&&(i=[n8(u)?u.__ref:u]);var l=function(e,t){return ib(e)?"number"==typeof t?e[t]:void 0:r.store.getFieldValue(e,String(t))};e.map.forEach(function(e,t){var n=l(u,t),a=l(c,t);if(void 0!==a){i&&i.push(t);var f=o.applyMerges(e,n,a,r,i);f!==a&&(s=s||new Map).set(t,f),i&&nk(i.pop()===t)}}),s&&(n=ib(c)?c.slice(0):(0,ng.pi)({},c),s.forEach(function(e,t){n[t]=e}))}return e.info?this.cache.policies.runMergeFunction(t,n,e.info,r,i&&(a=r.store).getStorage.apply(a,i)):n},e}(),ac=[];function al(e,t){var n=e.map;return n.has(t)||n.set(t,ac.pop()||{map:new Map}),n.get(t)}function af(e){return!e||!(e.info||e.map.size)}function ap(e,t){var n=e.map,r=n.get(t);r&&af(r)&&(ac.push(r),n.delete(t))}var ad=new Set,ah=function(e){function t(t){void 0===t&&(t={});var n=e.call(this)||this;return n.watches=new Set,n.typenameDocumentCache=new Map,n.makeVar=oP,n.txCount=0,n.config=iy(iE,t),n.addTypename=!!n.config.addTypename,n.policies=new ar({cache:n,dataIdFromObject:n.config.dataIdFromObject,possibleTypes:n.config.possibleTypes,typePolicies:n.config.typePolicies}),n.init(),n}return(0,ng.ZT)(t,e),t.prototype.init=function(){var e=this.data=new oH.Root({policies:this.policies,resultCaching:this.config.resultCaching});this.optimisticData=e.stump,this.resetResultCache()},t.prototype.resetResultCache=function(e){var t=this,n=this.storeReader,r=this.config.fragments;this.storeWriter=new au(this,this.storeReader=new o0({cache:this,addTypename:this.addTypename,resultCacheMaxSize:this.config.resultCacheMaxSize,canonizeResults:ik(this.config),canon:e?void 0:n&&n.canon,fragments:r}),r),this.maybeBroadcastWatch=ok(function(e,n){return t.broadcastWatch(e,n)},{max:this.config.resultCacheMaxSize,makeCacheKey:function(e){var n=e.optimistic?t.optimisticData:t.data;if(oZ(n)){var r=e.optimistic,i=e.id,o=e.variables;return n.makeCacheKey(e.query,e.callback,iA({optimistic:r,id:i,variables:o}))}}}),new Set([this.data.group,this.optimisticData.group]).forEach(function(e){return e.resetCaching()})},t.prototype.restore=function(e){return this.init(),e&&this.data.replace(e),this},t.prototype.extract=function(e){return void 0===e&&(e=!1),(e?this.optimisticData:this.data).extract()},t.prototype.read=function(e){var t=e.returnPartialData;try{return this.storeReader.diffQueryAgainstStore((0,ng.pi)((0,ng.pi)({},e),{store:e.optimistic?this.optimisticData:this.data,config:this.config,returnPartialData:void 0!==t&&t})).result||null}catch(n){if(n instanceof oB)return null;throw n}},t.prototype.write=function(e){try{return++this.txCount,this.storeWriter.writeToStore(this.data,e)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.modify=function(e){if(ig.call(e,"id")&&!e.id)return!1;var t=e.optimistic?this.optimisticData:this.data;try{return++this.txCount,t.modify(e.id||"ROOT_QUERY",e.fields)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.diff=function(e){return this.storeReader.diffQueryAgainstStore((0,ng.pi)((0,ng.pi)({},e),{store:e.optimistic?this.optimisticData:this.data,rootId:e.id||"ROOT_QUERY",config:this.config}))},t.prototype.watch=function(e){var t=this;return this.watches.size||function(e){oO(e).vars.forEach(function(t){return t.attachCache(e)})}(this),this.watches.add(e),e.immediate&&this.maybeBroadcastWatch(e),function(){t.watches.delete(e)&&!t.watches.size&&oT(t),t.maybeBroadcastWatch.forget(e)}},t.prototype.gc=function(e){iA.reset();var t=this.optimisticData.gc();return e&&!this.txCount&&(e.resetResultCache?this.resetResultCache(e.resetResultIdentities):e.resetResultIdentities&&this.storeReader.resetCanon()),t},t.prototype.retain=function(e,t){return(t?this.optimisticData:this.data).retain(e)},t.prototype.release=function(e,t){return(t?this.optimisticData:this.data).release(e)},t.prototype.identify=function(e){if(n8(e))return e.__ref;try{return this.policies.identify(e)[0]}catch(t){__DEV__&&nk.warn(t)}},t.prototype.evict=function(e){if(!e.id){if(ig.call(e,"id"))return!1;e=(0,ng.pi)((0,ng.pi)({},e),{id:"ROOT_QUERY"})}try{return++this.txCount,this.optimisticData.evict(e,this.data)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.reset=function(e){var t=this;return this.init(),iA.reset(),e&&e.discardWatches?(this.watches.forEach(function(e){return t.maybeBroadcastWatch.forget(e)}),this.watches.clear(),oT(this)):this.broadcastWatches(),Promise.resolve()},t.prototype.removeOptimistic=function(e){var t=this.optimisticData.removeLayer(e);t!==this.optimisticData&&(this.optimisticData=t,this.broadcastWatches())},t.prototype.batch=function(e){var t,n=this,r=e.update,i=e.optimistic,o=void 0===i||i,a=e.removeOptimistic,s=e.onWatchUpdated,u=function(e){var i=n.data,o=n.optimisticData;++n.txCount,e&&(n.data=n.optimisticData=e);try{return t=r(n)}finally{--n.txCount,n.data=i,n.optimisticData=o}},c=new Set;return s&&!this.txCount&&this.broadcastWatches((0,ng.pi)((0,ng.pi)({},e),{onWatchUpdated:function(e){return c.add(e),!1}})),"string"==typeof o?this.optimisticData=this.optimisticData.addLayer(o,u):!1===o?u(this.data):u(),"string"==typeof a&&(this.optimisticData=this.optimisticData.removeLayer(a)),s&&c.size?(this.broadcastWatches((0,ng.pi)((0,ng.pi)({},e),{onWatchUpdated:function(e,t){var n=s.call(this,e,t);return!1!==n&&c.delete(e),n}})),c.size&&c.forEach(function(e){return n.maybeBroadcastWatch.dirty(e)})):this.broadcastWatches(e),t},t.prototype.performTransaction=function(e,t){return this.batch({update:e,optimistic:t||null!==t})},t.prototype.transformDocument=function(e){if(this.addTypename){var t=this.typenameDocumentCache.get(e);return t||(t=iV(e),this.typenameDocumentCache.set(e,t),this.typenameDocumentCache.set(t,t)),t}return e},t.prototype.transformForLink=function(e){var t=this.config.fragments;return t?t.transform(e):e},t.prototype.broadcastWatches=function(e){var t=this;this.txCount||this.watches.forEach(function(n){return t.maybeBroadcastWatch(n,e)})},t.prototype.broadcastWatch=function(e,t){var n=e.lastDiff,r=this.diff(e);(!t||(e.optimistic&&"string"==typeof t.optimistic&&(r.fromOptimisticTransaction=!0),!t.onWatchUpdated||!1!==t.onWatchUpdated.call(this,e,r,n)))&&(n&&r4(n.result,r.result)||e.callback(e.lastDiff=r,n))},t}(oq),av=n(3454);let am=new oL({uri:"".concat(av.env.WORDPRESS_API_URL),cache:new ah});var ay=n(1163),ag=n(7294),a_=(0,ag.createContext)({client:void 0});function ab(e){var t=e.children,n=e.client,r=e.apiKey,i=e.options,o=(0,ag.useState)(n),a=o[0],s=o[1];return(0,ag.useEffect)(function(){n&&r&&console.warn("You have provided both a client and an apiKey to PostHogProvider. The apiKey will be ignored in favour of the client."),n&&i&&console.warn("You have provided both a client and options to PostHogProvider. The options will be ignored in favour of the client."),!a&&(n?s(n):r&&(ny.init(r,i),s(ny)))},[a,n,r,i]),ag.createElement(a_.Provider,{value:{client:a}},t)}var aw=rD?Symbol.for("__APOLLO_CONTEXT__"):"__APOLLO_CONTEXT__",aE=function(e){var t,n=e.client,r=e.children,i=((t=ag.createContext[aw])||(Object.defineProperty(ag.createContext,aw,{value:t=ag.createContext({}),enumerable:!1,writable:!1,configurable:!0}),t.displayName="ApolloContext"),t);return ag.createElement(i.Consumer,null,function(e){return void 0===e&&(e={}),n&&e.client!==n&&(e=Object.assign({},e,{client:n})),__DEV__?nk(e.client,'ApolloProvider was not passed a client instance. Make sure you pass in your client via the "client" prop.'):nk(e.client,28),ag.createElement(i.Provider,{value:e},r)})},ak=n(1664),aS=n(9238),ax=n.n(aS),aO=n(448);let aT=()=>{let[e,t]=(0,ag.useState)(!0),n=()=>{ny.opt_in_capturing(),t(!1)},r=()=>{ny.opt_out_capturing(),t(!1)},i="<p>\n							We use cookies to personalize content, to provide social media\n							features and to analyze our traffic. We also share information\n							about your use of our site with our partners.\n						</p>";return(0,m.jsx)("div",{className:e?"fixed bottom-0 right-0 z-50 max-w-6xl px-4 md:max-w-md z-[999]":"hidden",children:(0,m.jsxs)(ak.E.div,{variants:aO.EY,className:"px-6 pt-4 pb-6 mb-8 text-white rounded-lg bg-pink",children:[(0,m.jsx)(ak.E.h3,{variants:aO.eu,className:"font-bold",children:"Cookie Policy"}),(0,m.jsx)("p",{className:"mt-3 mb-6 text-sm text-left"}),(0,m.jsx)("div",{className:i?"mt-3 mb-6 text-sm text-left":"hidden",dangerouslySetInnerHTML:{__html:ax().sanitize(i)}}),(0,m.jsxs)(ak.E.div,{variants:aO.EY,className:"flex items-center justify-center gap-4",children:[(0,m.jsx)(ak.E.button,{onClick:n,variants:aO.eu,className:"inline-block px-6 py-3 mr-2 text-xs leading-none rounded bg-fadedPinkThree hover:bg-yellow",children:"Accept Cookies"}),(0,m.jsx)(ak.E.button,{onClick:r,variants:aO.eu,className:"inline-block px-6 py-3 text-xs leading-none text-white border rounded border-fadedPinkThree hover:border-darkPink hover:bg-darkPink",children:"Refuse Cookies"})]})]})})},aP=e=>{let{children:t}=e;return(0,m.jsxs)("div",{children:[(0,m.jsx)("div",{children:t}),ny.has_opted_in_capturing()||ny.has_opted_out_capturing()?null:(0,m.jsx)(aT,{})]})};n(8339);var aA=n(3454);ny.init("".concat(aA.env.POSTHOG_KEY),{api_host:"".concat(aA.env.POSTHOG_HOST)||"https://app.posthog.com",loaded:e=>{}});var aD=function(e){let{Component:t,pageProps:n}=e,r=(0,ay.useRouter)();function i(){let e=(0,ay.useRouter)(),[t,n]=(0,ag.useState)(!1);return(0,ag.useEffect)(()=>{let t=t=>t!==e.asPath&&n(!0),r=t=>t===e.asPath&&setTimeout(()=>{n(!1)},2e3);return e.events.on("routeChangeStart",t),e.events.on("routeChangeComplete",r),e.events.on("routeChangeError",r),()=>{e.events.off("routeChangeStart",t),e.events.off("routeChangeComplete",r),e.events.off("routeChangeError",r)}}),t&&(0,m.jsx)("div",{className:"spinner-wrapper",children:(0,m.jsx)("div",{className:"spinner"})})}return((0,ag.useEffect)(()=>{let e=()=>null==ny?void 0:ny.capture("$pageview");return r.events.on("routeChangeComplete",e),()=>{r.events.off("routeChangeComplete",e)}}),t.getLayout)?t.getLayout((0,m.jsx)(aE,{client:am,children:(0,m.jsx)(ab,{client:ny,children:(0,m.jsxs)(aP,{children:[(0,m.jsx)(i,{}),(0,m.jsx)(t,{...n})]})})})):(0,m.jsx)(aE,{client:am,children:(0,m.jsx)(ab,{client:ny,children:(0,m.jsxs)(aP,{children:[(0,m.jsx)(i,{}),(0,m.jsx)(t,{...n})]})})})}},8339:function(){},7663:function(e){!function(){var t={229:function(e){var t,n,r,i=e.exports={};function o(){throw Error("setTimeout has not been defined")}function a(){throw Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(r){n=a}}();var u=[],c=!1,l=-1;function f(){c&&r&&(c=!1,r.length?u=r.concat(u):l=-1,u.length&&p())}function p(){if(!c){var e=s(f);c=!0;for(var t=u.length;t;){for(r=u,u=[];++l<t;)r&&r[l].run();l=-1,t=u.length}r=null,c=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(r){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function d(e,t){this.fun=e,this.array=t}function h(){}i.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new d(e,t)),1!==u.length||c||s(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=h,i.addListener=h,i.once=h,i.off=h,i.removeListener=h,i.removeAllListeners=h,i.emit=h,i.prependListener=h,i.prependOnceListener=h,i.listeners=function(e){return[]},i.binding=function(e){throw Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw Error("process.chdir is not supported")},i.umask=function(){return 0}}},n={};function r(e){var i=n[e];if(void 0!==i)return i.exports;var o=n[e]={exports:{}},a=!0;try{t[e](o,o.exports,r),a=!1}finally{a&&delete n[e]}return o.exports}r.ab="//";var i=r(229);e.exports=i}()},1163:function(e,t,n){e.exports=n(880)},655:function(e,t,n){"use strict";n.d(t,{CR:function(){return c},Jh:function(){return u},ZT:function(){return i},_T:function(){return a},ev:function(){return l},mG:function(){return s},pi:function(){return o}});var r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)0>t.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function s(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{u(r.next(e))}catch(t){o(t)}}function s(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}u((r=r.apply(e,t||[])).next())})}function u(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[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(s){return function(u){return function(s){if(n)throw TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(u){s=[6,u],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}function c(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function l(e,t,n){if(n||2==arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}},1664:function(e,t,n){"use strict";n.d(t,{E:function(){return oe}});var r,i,o,a,s,u=n(655),c=n(7294),l=function(e){return{isEnabled:function(t){return e.some(function(e){return!!t[e]})}}},f={measureLayout:l(["layout","layoutId","drag"]),animation:l(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:l(["exit"]),drag:l(["drag","dragControls"]),focus:l(["whileFocus"]),hover:l(["whileHover","onHoverStart","onHoverEnd"]),tap:l(["whileTap","onTap","onTapStart","onTapCancel"]),pan:l(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:l(["whileInView","onViewportEnter","onViewportLeave"])},p=(0,c.createContext)({strict:!1}),d=Object.keys(f),h=d.length,v=(0,c.createContext)({transformPagePoint:function(e){return e},isStatic:!1}),m=(0,c.createContext)({}),y=(0,c.createContext)(null),g="undefined"!=typeof window,_=g?c.useLayoutEffect:c.useEffect;function b(e){return"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function w(e){return Array.isArray(e)}function E(e){return"string"==typeof e||w(e)}function k(e,t,n,r,i){var o;return void 0===r&&(r={}),void 0===i&&(i={}),"function"==typeof t&&(t=t(null!=n?n:e.custom,r,i)),"string"==typeof t&&(t=null===(o=e.variants)||void 0===o?void 0:o[t]),"function"==typeof t&&(t=t(null!=n?n:e.custom,r,i)),t}function S(e,t,n){var r,i,o=e.getProps();return k(o,t,null!=n?n:o.custom,(r={},e.forEachValue(function(e,t){return r[t]=e.get()}),r),(i={},e.forEachValue(function(e,t){return i[t]=e.getVelocity()}),i))}function x(e){var t;return"function"==typeof(null===(t=e.animate)||void 0===t?void 0:t.start)||E(e.initial)||E(e.animate)||E(e.whileHover)||E(e.whileDrag)||E(e.whileTap)||E(e.whileFocus)||E(e.exit)}function O(e){return Boolean(x(e)||e.variants)}function T(e){return Array.isArray(e)?e.join(" "):e}function P(e){var t=(0,c.useRef)(null);return null===t.current&&(t.current=e()),t.current}let A=1/60*1e3,D="undefined"!=typeof performance?()=>performance.now():()=>Date.now(),C="undefined"!=typeof window?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(D()),A),R=!0,I=!1,F=!1,M={delta:0,timestamp:0},j=["read","update","preRender","render","postRender"],N=j.reduce((e,t)=>(e[t]=function(e){let t=[],n=[],r=0,i=!1,o=!1,a=new WeakSet,s={schedule:(e,o=!1,s=!1)=>{let u=s&&i,c=u?t:n;return o&&a.add(e),-1===c.indexOf(e)&&(c.push(e),u&&i&&(r=t.length)),e},cancel:e=>{let t=n.indexOf(e);-1!==t&&n.splice(t,1),a.delete(e)},process:u=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length)for(let c=0;c<r;c++){let l=t[c];l(u),a.has(l)&&(s.schedule(l),e())}i=!1,o&&(o=!1,s.process(u))}};return s}(()=>I=!0),e),{}),V=j.reduce((e,t)=>{let n=N[t];return e[t]=(e,t=!1,r=!1)=>(I||Q(),n.schedule(e,t,r)),e},{}),L=j.reduce((e,t)=>(e[t]=N[t].cancel,e),{}),q=j.reduce((e,t)=>(e[t]=()=>N[t].process(M),e),{}),B=e=>N[e].process(M),U=e=>{I=!1,M.delta=R?A:Math.max(Math.min(e-M.timestamp,40),1),M.timestamp=e,F=!0,j.forEach(B),F=!1,I&&(R=!1,C(U))},Q=()=>{I=!0,R=!0,F||C(U)},z=()=>M,$=(e,t,n)=>-n*e+n*t+e;function H(e,t){-1===e.indexOf(t)&&e.push(t)}function W(e,t){var n=e.indexOf(t);n>-1&&e.splice(n,1)}var G=function(){function e(){this.subscriptions=[]}return e.prototype.add=function(e){var t=this;return H(this.subscriptions,e),function(){return W(t.subscriptions,e)}},e.prototype.notify=function(e,t,n){var r=this.subscriptions.length;if(r){if(1===r)this.subscriptions[0](e,t,n);else for(var i=0;i<r;i++){var o=this.subscriptions[i];o&&o(e,t,n)}}},e.prototype.getSize=function(){return this.subscriptions.length},e.prototype.clear=function(){this.subscriptions.length=0},e}(),Y=function(){function e(e){var t=this;this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new G,this.velocityUpdateSubscribers=new G,this.renderSubscribers=new G,this.canTrackVelocity=!1,this.updateAndNotify=function(e,n){void 0===n&&(n=!0),t.prev=t.current,t.current=e;var r=z(),i=r.delta,o=r.timestamp;t.lastUpdated!==o&&(t.timeDelta=i,t.lastUpdated=o,V.postRender(t.scheduleVelocityCheck)),t.prev!==t.current&&t.updateSubscribers.notify(t.current),t.velocityUpdateSubscribers.getSize()&&t.velocityUpdateSubscribers.notify(t.getVelocity()),n&&t.renderSubscribers.notify(t.current)},this.scheduleVelocityCheck=function(){return V.postRender(t.velocityCheck)},this.velocityCheck=function(e){e.timestamp!==t.lastUpdated&&(t.prev=t.current,t.velocityUpdateSubscribers.notify(t.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=!isNaN(parseFloat(this.current))}return e.prototype.onChange=function(e){return this.updateSubscribers.add(e)},e.prototype.clearListeners=function(){this.updateSubscribers.clear()},e.prototype.onRenderRequest=function(e){return e(this.get()),this.renderSubscribers.add(e)},e.prototype.attach=function(e){this.passiveEffect=e},e.prototype.set=function(e,t){void 0===t&&(t=!0),t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)},e.prototype.get=function(){return this.current},e.prototype.getPrevious=function(){return this.prev},e.prototype.getVelocity=function(){var e,t;return this.canTrackVelocity?(e=parseFloat(this.current)-parseFloat(this.prev),(t=this.timeDelta)?e*(1e3/t):0):0},e.prototype.start=function(e){var t=this;return this.stop(),new Promise(function(n){t.hasAnimated=!0,t.stopAnimation=e(n)}).then(function(){return t.clearAnimation()})},e.prototype.stop=function(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()},e.prototype.isAnimating=function(){return!!this.stopAnimation},e.prototype.clearAnimation=function(){this.stopAnimation=null},e.prototype.destroy=function(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()},e}();function J(e){return new Y(e)}var X=function(e){return Boolean(null!==e&&"object"==typeof e&&e.getVelocity)},Z=function(){},K=function(){};let ee=(e,t,n)=>Math.min(Math.max(n,e),t);function et(e,t){return e*Math.sqrt(1-t*t)}let en=["duration","bounce"],er=["stiffness","damping","mass"];function ei(e,t){return t.some(t=>void 0!==e[t])}function eo(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:i}=e,o=(0,u._T)(e,["from","to","restSpeed","restDelta"]);let a={done:!1,value:t},{stiffness:s,damping:c,mass:l,velocity:f,duration:p,isResolvedFromDuration:d}=function(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!ei(e,er)&&ei(e,en)){let n=function({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;Z(e<=1e4,"Spring duration must be 10 seconds or less");let a=1-t;a=ee(.05,1,a),e=ee(.01,10,e/1e3),a<1?(i=t=>{let r=t*a,i=r*e,o=et(t,a);return .001-(r-n)/o*Math.exp(-i)},o=t=>{let r=t*a,o=r*e,s=Math.pow(a,2)*Math.pow(t,2)*e,u=et(Math.pow(t,2),a),c=-i(t)+.001>0?-1:1;return c*((o*n+n-s)*Math.exp(-o))/u}):(i=t=>{let r=Math.exp(-t*e),i=(t-n)*e+1;return -.001+r*i},o=t=>{let r=Math.exp(-t*e),i=(n-t)*(e*e);return r*i});let s=5/e,u=function(e,t,n){let r=n;for(let i=1;i<12;i++)r-=e(r)/t(r);return r}(i,o,s);if(e*=1e3,isNaN(u))return{stiffness:100,damping:10,duration:e};{let c=Math.pow(u,2)*r;return{stiffness:c,damping:2*a*Math.sqrt(r*c),duration:e}}}(e);(t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1})).isResolvedFromDuration=!0}return t}(o),h=ea,v=ea;function m(){let e=f?-(f/1e3):0,r=n-t,o=c/(2*Math.sqrt(s*l)),a=Math.sqrt(s/l)/1e3;if(void 0===i&&(i=Math.min(Math.abs(n-t)/100,.4)),o<1){let u=et(a,o);h=t=>n-Math.exp(-o*a*t)*((e+o*a*r)/u*Math.sin(u*t)+r*Math.cos(u*t)),v=t=>{let n=Math.exp(-o*a*t);return o*a*n*(Math.sin(u*t)*(e+o*a*r)/u+r*Math.cos(u*t))-n*(Math.cos(u*t)*(e+o*a*r)-u*r*Math.sin(u*t))}}else if(1===o)h=t=>n-Math.exp(-a*t)*(r+(e+a*r)*t);else{let p=a*Math.sqrt(o*o-1);h=t=>{let i=Math.min(p*t,300);return n-Math.exp(-o*a*t)*((e+o*a*r)*Math.sinh(i)+p*r*Math.cosh(i))/p}}}return m(),{next:e=>{let t=h(e);if(d)a.done=e>=p;else{let o=1e3*v(e),s=Math.abs(n-t)<=i;a.done=Math.abs(o)<=r&&s}return a.value=a.done?n:t,a},flipTarget:()=>{f=-f,[t,n]=[n,t],m()}}}eo.needsInterpolation=(e,t)=>"string"==typeof e||"string"==typeof t;let ea=e=>0,es=(e,t,n)=>{let r=t-e;return 0===r?1:(n-e)/r},eu=(e,t)=>n=>Math.max(Math.min(n,t),e),ec=e=>e%1?Number(e.toFixed(5)):e,el=/(-)?([\d]*\.?[\d])+/g,ef=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi,ep=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;function ed(e){return"string"==typeof e}let eh={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},ev=Object.assign(Object.assign({},eh),{transform:eu(0,1)}),em=Object.assign(Object.assign({},eh),{default:1}),ey=(e,t)=>n=>Boolean(ed(n)&&ep.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),eg=(e,t,n)=>r=>{if(!ed(r))return r;let[i,o,a,s]=r.match(el);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:void 0!==s?parseFloat(s):1}},e_=eu(0,255),eb=Object.assign(Object.assign({},eh),{transform:e=>Math.round(e_(e))}),ew={test:ey("rgb","red"),parse:eg("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+eb.transform(e)+", "+eb.transform(t)+", "+eb.transform(n)+", "+ec(ev.transform(r))+")"},eE={test:ey("#"),parse:function(e){let t="",n="",r="",i="";return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),i=e.substr(4,1),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}},transform:ew.transform},ek=e=>({test:t=>ed(t)&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),eS=ek("deg"),ex=ek("%"),eO=ek("px"),eT=ek("vh"),eP=ek("vw"),eA=Object.assign(Object.assign({},ex),{parse:e=>ex.parse(e)/100,transform:e=>ex.transform(100*e)}),eD={test:ey("hsl","hue"),parse:eg("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+ex.transform(ec(t))+", "+ex.transform(ec(n))+", "+ec(ev.transform(r))+")"};function eC(e,t,n){return(n<0&&(n+=1),n>1&&(n-=1),n<1/6)?e+(t-e)*6*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function eR({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let i=0,o=0,a=0;if(t/=100){let s=n<.5?n*(1+t):n+t-n*t,u=2*n-s;i=eC(u,s,e+1/3),o=eC(u,s,e),a=eC(u,s,e-1/3)}else i=o=a=n;return{red:Math.round(255*i),green:Math.round(255*o),blue:Math.round(255*a),alpha:r}}let eI=(e,t,n)=>{let r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},eF=[eE,ew,eD],eM=e=>eF.find(t=>t.test(e)),ej=e=>`'${e}' is not an animatable color. Use the equivalent color code instead.`,eN=(e,t)=>{let n=eM(e),r=eM(t);K(!!n,ej(e)),K(!!r,ej(t));let i=n.parse(e),o=r.parse(t);n===eD&&(i=eR(i),n=ew),r===eD&&(o=eR(o),r=ew);let a=Object.assign({},i);return e=>{for(let t in a)"alpha"!==t&&(a[t]=eI(i[t],o[t],e));return a.alpha=$(i.alpha,o.alpha,e),n.transform(a)}},eV={test:e=>ew.test(e)||eE.test(e)||eD.test(e),parse:e=>ew.test(e)?ew.parse(e):eD.test(e)?eD.parse(e):eE.parse(e),transform:e=>ed(e)?e:e.hasOwnProperty("red")?ew.transform(e):eD.transform(e)},eL="${c}",eq="${n}";function eB(e){"number"==typeof e&&(e=`${e}`);let t=[],n=0,r=e.match(ef);r&&(n=r.length,e=e.replace(ef,eL),t.push(...r.map(eV.parse)));let i=e.match(el);return i&&(e=e.replace(el,eq),t.push(...i.map(eh.parse))),{values:t,numColors:n,tokenised:e}}function eU(e){return eB(e).values}function eQ(e){let{values:t,numColors:n,tokenised:r}=eB(e),i=t.length;return e=>{let t=r;for(let o=0;o<i;o++)t=t.replace(o<n?eL:eq,o<n?eV.transform(e[o]):ec(e[o]));return t}}let ez=e=>"number"==typeof e?0:e,e$={test:function(e){var t,n,r,i;return isNaN(e)&&ed(e)&&(null!==(n=null===(t=e.match(el))||void 0===t?void 0:t.length)&&void 0!==n?n:0)+(null!==(i=null===(r=e.match(ef))||void 0===r?void 0:r.length)&&void 0!==i?i:0)>0},parse:eU,createTransformer:eQ,getAnimatableNone:function(e){let t=eU(e),n=eQ(e);return n(t.map(ez))}},eH=e=>"number"==typeof e,eW=(e,t)=>n=>t(e(n)),eG=(...e)=>e.reduce(eW);function eY(e,t){return eH(e)?n=>$(e,t,n):eV.test(e)?eN(e,t):eK(e,t)}let eJ=(e,t)=>{let n=[...e],r=n.length,i=e.map((e,n)=>eY(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}},eX=(e,t)=>{let n=Object.assign(Object.assign({},e),t),r={};for(let i in n)void 0!==e[i]&&void 0!==t[i]&&(r[i]=eY(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}};function eZ(e){let t=e$.parse(e),n=t.length,r=0,i=0,o=0;for(let a=0;a<n;a++)r||"number"==typeof t[a]?r++:void 0!==t[a].hue?o++:i++;return{parsed:t,numNumbers:r,numRGB:i,numHSL:o}}let eK=(e,t)=>{let n=e$.createTransformer(t),r=eZ(e),i=eZ(t),o=r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers;return o?eG(eJ(r.parsed,i.parsed),n):(Z(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),n=>`${n>0?t:e}`)},e0=(e,t)=>n=>$(e,t,n);function e1(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let o=e.length;K(o===t.length,"Both input and output ranges must be the same length"),K(!r||!Array.isArray(r)||r.length===o-1,"Array of easing functions must be of length `input.length - 1`, as it applies to the transitions **between** the defined values."),e[0]>e[o-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());let a=function(e,t,n){var r;let i=[],o=n||("number"==typeof(r=e[0])?e0:"string"==typeof r?eV.test(r)?eN:eK:Array.isArray(r)?eJ:"object"==typeof r?eX:void 0),a=e.length-1;for(let s=0;s<a;s++){let u=o(e[s],e[s+1]);if(t){let c=Array.isArray(t)?t[s]:t;u=eG(c,u)}i.push(u)}return i}(t,r,i),s=2===o?function([e,t],[n]){return r=>n(es(e,t,r))}(e,a):function(e,t){let n=e.length,r=n-1;return i=>{let o=0,a=!1;if(i<=e[0]?a=!0:i>=e[r]&&(o=r-1,a=!0),!a){let s=1;for(;s<n&&!(e[s]>i)&&s!==r;s++);o=s-1}let u=es(e[o],e[o+1],i);return t[o](u)}}(e,a);return n?t=>s(ee(e[0],e[o-1],t)):s}let e2=e=>t=>1-e(1-t),e3=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,e5=e=>t=>t*t*((e+1)*t-e),e6=4/11,e8=8/11,e4=e=>e,e9=e=>Math.pow(e,2),e7=e2(e9),te=e3(e9),tt=e=>1-Math.sin(Math.acos(e)),tn=e2(tt),tr=e3(tn),ti=e5(1.525),to=e2(ti),ta=e3(ti),ts=(e=>{let t=e5(1.525);return e=>(e*=2)<1?.5*t(e):.5*(2-Math.pow(2,-10*(e-1)))})(0),tu=4356/361,tc=35442/1805,tl=16061/1805,tf=e=>{if(1===e||0===e)return e;let t=e*e;return e<e6?7.5625*t:e<e8?9.075*t-9.9*e+3.4:e<.9?tu*t-tc*e+tl:10.8*e*e-20.52*e+10.72},tp=e2(tf),td=e=>e<.5?.5*(1-tf(1-2*e)):.5*tf(2*e-1)+.5;function th({from:e=0,to:t=1,ease:n,offset:r,duration:i=300}){let o={done:!1,value:e},a=Array.isArray(t)?t:[e,t],s=(r&&r.length===a.length?r:function(e){let t=e.length;return e.map((e,n)=>0!==n?n/(t-1):0)}(a)).map(e=>e*i);function u(){return e1(s,a,{ease:Array.isArray(n)?n:a.map(()=>n||te).splice(0,a.length-1)})}let c=u();return{next:e=>(o.value=c(e),o.done=e>=i,o),flipTarget:()=>{a.reverse(),c=u()}}}let tv={keyframes:th,spring:eo,decay:function({velocity:e=0,from:t=0,power:n=.8,timeConstant:r=350,restDelta:i=.5,modifyTarget:o}){let a={done:!1,value:t},s=n*e,u=t+s,c=void 0===o?u:o(u);return c!==u&&(s=c-t),{next:e=>{let t=-s*Math.exp(-e/r);return a.done=!(t>i||t<-i),a.value=a.done?c:c+t,a},flipTarget:()=>{}}}};function tm(e,t,n=0){return e-t-n}let ty=e=>{let t=({delta:t})=>e(t);return{start:()=>V.update(t,!0),stop:()=>L.update(t)}};function tg(e){let t,n,r;var i,{from:o,autoplay:a=!0,driver:s=ty,elapsed:c=0,repeat:l=0,repeatType:f="loop",repeatDelay:p=0,onPlay:d,onStop:h,onComplete:v,onRepeat:m,onUpdate:y}=e,g=(0,u._T)(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:_}=g,b=0,w=g.duration,E=!1,k=!0,S=function(e){if(Array.isArray(e.to))return th;if(tv[e.type])return tv[e.type];let t=new Set(Object.keys(e));if(t.has("ease")||t.has("duration")&&!t.has("dampingRatio"));else if(t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta"))return eo;return th}(g);(null===(i=S.needsInterpolation)||void 0===i?void 0:i.call(S,o,_))&&(r=e1([0,100],[o,_],{clamp:!1}),o=0,_=100);let x=S(Object.assign(Object.assign({},g),{from:o,to:_}));return a&&(null==d||d(),(t=s(function(e){if(k||(e=-e),c+=e,!E){let i=x.next(Math.max(0,c));n=i.value,r&&(n=r(n)),E=k?i.done:c<=0}if(null==y||y(n),E){if(0===b&&(null!=w||(w=c)),b<l){var o,a;o=c,a=w,(k?o>=a+p:o<=-p)&&(b++,"reverse"===f?c=function(e,t,n=0,r=!0){return r?tm(t+-e,t,n):t-(e-t)+n}(c,w,p,k=b%2==0):(c=tm(c,w,p),"mirror"===f&&x.flipTarget()),E=!1,m&&m())}else t.stop(),v&&v()}})).start()),{stop:()=>{null==h||h(),t.stop()}}}var t_=function(e){return 1e3*e};let tb=(e,t)=>1-3*t+3*e,tw=(e,t)=>3*t-6*e,tE=e=>3*e,tk=(e,t,n)=>((tb(t,n)*e+tw(t,n))*e+tE(t))*e,tS=(e,t,n)=>3*tb(t,n)*e*e+2*tw(t,n)*e+tE(t);var tx={linear:e4,easeIn:e9,easeInOut:te,easeOut:e7,circIn:tt,circInOut:tr,circOut:tn,backIn:ti,backInOut:ta,backOut:to,anticipate:ts,bounceIn:tp,bounceInOut:td,bounceOut:tf},tO=function(e){if(Array.isArray(e)){K(4===e.length,"Cubic bezier arrays must contain four numerical values.");var t=(0,u.CR)(e,4);return function(e,t,n,r){if(e===t&&n===r)return e4;let i=new Float32Array(11);for(let o=0;o<11;++o)i[o]=tk(.1*o,e,n);return o=>0===o||1===o?o:tk(function(t){let r=0,o=1;for(;10!==o&&i[o]<=t;++o)r+=.1;--o;let a=(t-i[o])/(i[o+1]-i[o]),s=r+.1*a,u=tS(s,e,n);return u>=.001?function(e,t,n,r){for(let i=0;i<8;++i){let o=tS(t,n,r);if(0===o)break;let a=tk(t,n,r)-e;t-=a/o}return t}(t,s,e,n):0===u?s:function(e,t,n,r,i){let o,a;let s=0;do(o=tk(a=t+(n-t)/2,r,i)-e)>0?n=a:t=a;while(Math.abs(o)>1e-7&&++s<10);return a}(t,r,r+.1,e,n)}(o),t,r)}(t[0],t[1],t[2],t[3])}return"string"==typeof e?(K(void 0!==tx[e],"Invalid easing type '".concat(e,"'")),tx[e]):e},tT=function(e,t){return"zIndex"!==e&&!!("number"==typeof t||Array.isArray(t)||"string"==typeof t&&e$.test(t)&&!t.startsWith("url("))},tP=function(e){return Array.isArray(e)},tA=function(){return{type:"spring",stiffness:500,damping:25,restSpeed:10}},tD=function(e){return{type:"spring",stiffness:550,damping:0===e?2*Math.sqrt(550):30,restSpeed:10}},tC=function(){return{type:"keyframes",ease:"linear",duration:.3}},tR=function(e){return{type:"keyframes",duration:.8,values:e}},tI={x:tA,y:tA,z:tA,rotate:tA,rotateX:tA,rotateY:tA,rotateZ:tA,scaleX:tD,scaleY:tD,scale:tD,opacity:tC,backgroundColor:tC,color:tC,default:tD},tF=function(e,t){var n;return n=tP(t)?tR:tI[e]||tI.default,(0,u.pi)({to:t},n(t))};let tM=new Set(["brightness","contrast","saturate","opacity"]);function tj(e){let[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;let[r]=n.match(el)||[];if(!r)return e;let i=n.replace(r,""),o=tM.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}let tN=/([a-z-]*)\(.*?\)/g,tV=Object.assign(Object.assign({},e$),{getAnimatableNone:e=>{let t=e.match(tN);return t?t.map(tj).join(" "):e}});var tL=(0,u.pi)((0,u.pi)({},eh),{transform:Math.round}),tq={borderWidth:eO,borderTopWidth:eO,borderRightWidth:eO,borderBottomWidth:eO,borderLeftWidth:eO,borderRadius:eO,radius:eO,borderTopLeftRadius:eO,borderTopRightRadius:eO,borderBottomRightRadius:eO,borderBottomLeftRadius:eO,width:eO,maxWidth:eO,height:eO,maxHeight:eO,size:eO,top:eO,right:eO,bottom:eO,left:eO,padding:eO,paddingTop:eO,paddingRight:eO,paddingBottom:eO,paddingLeft:eO,margin:eO,marginTop:eO,marginRight:eO,marginBottom:eO,marginLeft:eO,rotate:eS,rotateX:eS,rotateY:eS,rotateZ:eS,scale:em,scaleX:em,scaleY:em,scaleZ:em,skew:eS,skewX:eS,skewY:eS,distance:eO,translateX:eO,translateY:eO,translateZ:eO,x:eO,y:eO,z:eO,perspective:eO,transformPerspective:eO,opacity:ev,originX:eA,originY:eA,originZ:eO,zIndex:tL,fillOpacity:ev,strokeOpacity:ev,numOctaves:tL},tB=(0,u.pi)((0,u.pi)({},tq),{color:eV,backgroundColor:eV,outlineColor:eV,fill:eV,stroke:eV,borderColor:eV,borderTopColor:eV,borderRightColor:eV,borderBottomColor:eV,borderLeftColor:eV,filter:tV,WebkitFilter:tV}),tU=function(e){return tB[e]};function tQ(e,t){var n,r=tU(e);return r!==tV&&(r=e$),null===(n=r.getAnimatableNone)||void 0===n?void 0:n.call(r,t)}var tz={current:!1},t$=function(e){return tP(e)?e[e.length-1]||0:e},tH=!1;function tW(e){return 0===e||"string"==typeof e&&0===parseFloat(e)&&-1===e.indexOf(" ")}function tG(e){return"number"==typeof e?0:tQ("",e)}function tY(e,t){return e[t]||e.default||e}function tJ(e,t,n,r){return void 0===r&&(r={}),tz.current&&(r={type:!1}),t.start(function(i){var o,a,s,c,l,f,p,d,h,v,m,y=(c=n,p=null!==(l=(f=tY(r,e)).from)&&void 0!==l?l:t.get(),d=tT(e,c),"none"===p&&d&&"string"==typeof c?p=tQ(e,c):tW(p)&&"string"==typeof c?p=tG(c):!Array.isArray(c)&&tW(c)&&"string"==typeof p&&(c=tG(p)),Z((h=tT(e,p))===d,"You are trying to animate ".concat(e,' from "').concat(p,'" to "').concat(c,'". ').concat(p," is not an animatable value - to enable this animation set ").concat(p," to a value animatable to ").concat(c," via the `style` property.")),h&&d&&!1!==f.type?function(){var n,r,o,a,s,l,d,h,v,m,y,g,_={from:p,to:c,velocity:t.getVelocity(),onComplete:i,onUpdate:function(e){return t.set(e)}};return"inertia"===f.type||"decay"===f.type?function({from:e=0,velocity:t=0,min:n,max:r,power:i=.8,timeConstant:o=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:u=1,modifyTarget:c,driver:l,onUpdate:f,onComplete:p,onStop:d}){let h;function v(e){return void 0!==n&&e<n||void 0!==r&&e>r}function m(e){return void 0===n?r:void 0===r?n:Math.abs(n-e)<Math.abs(r-e)?n:r}function y(e){null==h||h.stop(),h=tg(Object.assign(Object.assign({},e),{driver:l,onUpdate:t=>{var n;null==f||f(t),null===(n=e.onUpdate)||void 0===n||n.call(e,t)},onComplete:p,onStop:d}))}function g(e){y(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:u},e))}if(v(e))g({from:e,velocity:t,to:m(e)});else{let _,b,w=i*t+e;void 0!==c&&(w=c(w));let E=m(w),k=E===n?-1:1,S=e=>{var n;_=b,b=e,t=(n=z().delta)?(e-_)*(1e3/n):0,(1===k&&e>E||-1===k&&e<E)&&g({from:e,to:E,velocity:t})};y({type:"decay",from:e,velocity:t,timeConstant:o,power:i,restDelta:u,modifyTarget:c,onUpdate:v(w)?S:void 0})}return{stop:()=>null==h?void 0:h.stop()}}((0,u.pi)((0,u.pi)({},_),f)):tg((0,u.pi)((0,u.pi)({},(v=f,Array.isArray(_.to)&&(null!==(m=v.duration)&&void 0!==m||(v.duration=.8)),Array.isArray((y=_).to)&&null===y.to[0]&&(y.to=(0,u.ev)([],(0,u.CR)(y.to),!1),y.to[0]=y.from),(g=v).when,g.delay,g.delayChildren,g.staggerChildren,g.staggerDirection,g.repeat,g.repeatType,g.repeatDelay,g.from,Object.keys((0,u._T)(g,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from"])).length||(v=(0,u.pi)((0,u.pi)({},v),tF(e,_.to))),(0,u.pi)((0,u.pi)({},_),(r=(n=v).ease,o=n.times,a=n.yoyo,s=n.flip,l=n.loop,d=(0,u._T)(n,["ease","times","yoyo","flip","loop"]),h=(0,u.pi)({},d),o&&(h.offset=o),d.duration&&(h.duration=t_(d.duration)),d.repeatDelay&&(h.repeatDelay=t_(d.repeatDelay)),r&&(h.ease=Array.isArray(r)&&"number"!=typeof r[0]?r.map(tO):tO(r)),"tween"===d.type&&(h.type="keyframes"),(a||l||s)&&(Z(!tH,"yoyo, loop and flip have been removed from the API. Replace with repeat and repeatType options."),tH=!0,a?h.repeatType="reverse":l?h.repeatType="loop":s&&(h.repeatType="mirror"),h.repeat=l||a||s||d.repeat),"spring"!==d.type&&(h.type="keyframes"),h)))),{onUpdate:function(e){var t;_.onUpdate(e),null===(t=f.onUpdate)||void 0===t||t.call(f,e)},onComplete:function(){var e;_.onComplete(),null===(e=f.onComplete)||void 0===e||e.call(f)}}))}:function(){var e,n,r=t$(c);return t.set(r),i(),null===(e=null==f?void 0:f.onUpdate)||void 0===e||e.call(f,r),null===(n=null==f?void 0:f.onComplete)||void 0===n||n.call(f),{stop:function(){}}}),g=null!==(s=null!==(a=(tY(o=r,e)||{}).delay)&&void 0!==a?a:o.delay)&&void 0!==s?s:0,_=function(){return m=y()};return g?v=setTimeout(_,t_(g)):_(),function(){clearTimeout(v),null==m||m.stop()}})}var tX=["TopLeft","TopRight","BottomLeft","BottomRight"],tZ=tX.length,tK=function(e){return"string"==typeof e?parseFloat(e):e},t0=function(e){return"number"==typeof e||eO.test(e)};function t1(e,t){var n;return null!==(n=e[t])&&void 0!==n?n:e.borderRadius}var t2=t5(0,.5,tn),t3=t5(.5,.95,e4);function t5(e,t,n){return function(r){return r<e?0:r>t?1:n(es(e,t,r))}}function t6(e,t){e.min=t.min,e.max=t.max}function t8(e,t){t6(e.x,t.x),t6(e.y,t.y)}function t4(e){return void 0===e||1===e}function t9(e){var t=e.scale,n=e.scaleX,r=e.scaleY;return!t4(t)||!t4(n)||!t4(r)}function t7(e){var t,n;return t9(e)||(t=e.x)&&"0%"!==t||(n=e.y)&&"0%"!==n||e.z||e.rotate||e.rotateX||e.rotateY}function ne(e,t,n,r,i){return void 0!==i&&(e=r+i*(e-r)),r+n*(e-r)+t}function nt(e,t,n,r,i){void 0===t&&(t=0),void 0===n&&(n=1),e.min=ne(e.min,t,n,r,i),e.max=ne(e.max,t,n,r,i)}function nn(e,t){var n=t.x,r=t.y;nt(e.x,n.translate,n.scale,n.originPoint),nt(e.y,r.translate,r.scale,r.originPoint)}function nr(e,t){e.min=e.min+t,e.max=e.max+t}function ni(e,t,n){var r=(0,u.CR)(n,3),i=r[0],o=r[1],a=r[2],s=void 0!==t[a]?t[a]:.5,c=$(e.min,e.max,s);nt(e,t[i],t[o],c,t.scale)}var no=["x","scaleX","originX"],na=["y","scaleY","originY"];function ns(e,t){ni(e.x,t,no),ni(e.y,t,na)}let nu=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),nc=e=>nu(e)&&e.hasOwnProperty("z"),nl=(e,t)=>Math.abs(e-t);function nf(e,t){if(eH(e)&&eH(t))return nl(e,t);if(nu(e)&&nu(t)){let n=nl(e.x,t.x),r=nl(e.y,t.y),i=nc(e)&&nc(t)?nl(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}function np(e){return e.max-e.min}function nd(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=.01),nf(e,t)<n}function nh(e,t,n,r){void 0===r&&(r=.5),e.origin=r,e.originPoint=$(t.min,t.max,e.origin),e.scale=np(n)/np(t),(nd(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=$(n.min,n.max,e.origin)-e.originPoint,(nd(e.translate)||isNaN(e.translate))&&(e.translate=0)}function nv(e,t,n,r){nh(e.x,t.x,n.x,null==r?void 0:r.originX),nh(e.y,t.y,n.y,null==r?void 0:r.originY)}function nm(e,t,n){e.min=n.min+t.min,e.max=e.min+np(t)}function ny(e,t,n){e.min=t.min-n.min,e.max=e.min+np(t)}function ng(e,t,n){ny(e.x,t.x,n.x),ny(e.y,t.y,n.y)}function n_(e,t,n,r,i){return e-=t,e=r+1/n*(e-r),void 0!==i&&(e=r+1/i*(e-r)),e}function nb(e,t,n,r,i){var o=(0,u.CR)(n,3),a=o[0],s=o[1],c=o[2];!function(e,t,n,r,i,o,a){if(void 0===t&&(t=0),void 0===n&&(n=1),void 0===r&&(r=.5),void 0===o&&(o=e),void 0===a&&(a=e),ex.test(t)&&(t=parseFloat(t),t=$(a.min,a.max,t/100)-a.min),"number"==typeof t){var s=$(o.min,o.max,r);e===o&&(s-=t),e.min=n_(e.min,t,n,s,i),e.max=n_(e.max,t,n,s,i)}}(e,t[a],t[s],t[c],t.scale,r,i)}var nw=["x","scaleX","originX"],nE=["y","scaleY","originY"];function nk(e,t,n,r){nb(e.x,t,nw,null==n?void 0:n.x,null==r?void 0:r.x),nb(e.y,t,nE,null==n?void 0:n.y,null==r?void 0:r.y)}var nS=function(){return{translate:0,scale:1,origin:0,originPoint:0}},nx=function(){return{x:nS(),y:nS()}},nO=function(){return{min:0,max:0}},nT=function(){return{x:nO(),y:nO()}};function nP(e){return 0===e.translate&&1===e.scale}function nA(e){return nP(e.x)&&nP(e.y)}function nD(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}var nC=function(){function e(){this.members=[]}return e.prototype.add=function(e){H(this.members,e),e.scheduleRender()},e.prototype.remove=function(e){if(W(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){var t=this.members[this.members.length-1];t&&this.promote(t)}},e.prototype.relegate=function(e){var t,n=this.members.findIndex(function(t){return e===t});if(0===n)return!1;for(var r=n;r>=0;r--){var i=this.members[r];if(!1!==i.isPresent){t=i;break}}return!!t&&(this.promote(t),!0)},e.prototype.promote=function(e,t){var n,r=this.lead;e!==r&&(this.prevLead=r,this.lead=e,e.show(),r&&(r.instance&&r.scheduleRender(),e.scheduleRender(),e.resumeFrom=r,t&&(e.resumeFrom.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues,e.snapshot.isShared=!0),(null===(n=e.root)||void 0===n?void 0:n.isUpdating)&&(e.isLayoutDirty=!0),!1===e.options.crossfade&&r.hide()))},e.prototype.exitAnimationComplete=function(){this.members.forEach(function(e){var t,n,r,i,o;null===(n=(t=e.options).onExitComplete)||void 0===n||n.call(t),null===(o=null===(r=e.resumingFrom)||void 0===r?void 0:(i=r.options).onExitComplete)||void 0===o||o.call(i)})},e.prototype.scheduleRender=function(){this.members.forEach(function(e){e.instance&&e.scheduleRender(!1)})},e.prototype.removeLeadSnapshot=function(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)},e}(),nR={};function nI(e,t,n){var r=e.x.translate/t.x,i=e.y.translate/t.y,o="translate3d(".concat(r,"px, ").concat(i,"px, 0) ");if(n){var a=n.rotate,s=n.rotateX,u=n.rotateY;a&&(o+="rotate(".concat(a,"deg) ")),s&&(o+="rotateX(".concat(s,"deg) ")),u&&(o+="rotateY(".concat(u,"deg) "))}return"translate3d(0px, 0px, 0) scale(1, 1)"===(o+="scale(".concat(e.x.scale,", ").concat(e.y.scale,")"))?"none":o}function nF(e){return[e("x"),e("y")]}var nM=["","X","Y","Z"],nj=["transformPerspective","x","y","z"];function nN(e,t){return nj.indexOf(e)-nj.indexOf(t)}["translate","scale","rotate","skew"].forEach(function(e){return nM.forEach(function(t){return nj.push(e+t)})});var nV=new Set(nj);function nL(e){return nV.has(e)}var nq=new Set(["originX","originY","originZ"]),nB=function(e,t){return e.depth-t.depth},nU=function(){function e(){this.children=[],this.isDirty=!1}return e.prototype.add=function(e){H(this.children,e),this.isDirty=!0},e.prototype.remove=function(e){W(this.children,e),this.isDirty=!0},e.prototype.forEach=function(e){this.isDirty&&this.children.sort(nB),this.isDirty=!1,this.children.forEach(e)},e}();function nQ(e){var t=X(e)?e.get():e;return Boolean(t&&"object"==typeof t&&t.mix&&t.toValue)?t.toValue():t}var nz={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function n$(e){var t=e.attachResizeListener,n=e.defaultParent,r=e.measureScroll,i=e.resetTransform;return function(){function e(e,t,r){var i=this;void 0===t&&(t={}),void 0===r&&(r=null==n?void 0:n()),this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=function(){i.isUpdating&&(i.isUpdating=!1,i.clearAllSnapshots())},this.updateProjection=function(){i.nodes.forEach(nZ),i.nodes.forEach(nK)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=e,this.latestValues=t,this.root=r?r.root||r:this,this.path=r?(0,u.ev)((0,u.ev)([],(0,u.CR)(r.path),!1),[r],!1):[],this.parent=r,this.depth=r?r.depth+1:0,e&&this.root.registerPotentialNode(e,this);for(var o=0;o<this.path.length;o++)this.path[o].shouldResetTransform=!0;this.root===this&&(this.nodes=new nU)}return e.prototype.addEventListener=function(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new G),this.eventHandlers.get(e).add(t)},e.prototype.notifyListeners=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=this.eventHandlers.get(e);null==r||r.notify.apply(r,(0,u.ev)([],(0,u.CR)(t),!1))},e.prototype.hasListeners=function(e){return this.eventHandlers.has(e)},e.prototype.registerPotentialNode=function(e,t){this.potentialNodes.set(e,t)},e.prototype.mount=function(e,n){var r=this;if(void 0===n&&(n=!1),!this.instance){this.isSVG=e instanceof SVGElement&&"svg"!==e.tagName,this.instance=e;var i=this.options,o=i.layoutId,a=i.layout,s=i.visualElement;if(s&&!s.getInstance()&&s.mount(e),this.root.nodes.add(this),null===(c=this.parent)||void 0===c||c.children.add(this),this.id&&this.root.potentialNodes.delete(this.id),n&&(a||o)&&(this.isLayoutDirty=!0),t){var c,l,f=function(){return r.root.updateBlockedByResize=!1};t(e,function(){r.root.updateBlockedByResize=!0,clearTimeout(l),l=setTimeout(f,250),nz.hasAnimatedSinceResize&&(nz.hasAnimatedSinceResize=!1,r.nodes.forEach(nX))})}o&&this.root.registerSharedNode(o,this),!1!==this.options.animate&&s&&(o||a)&&this.addEventListener("didUpdate",function(e){var t,n,i,o,a,c=e.delta,l=e.hasLayoutChanged,f=e.hasRelativeTargetChanged,p=e.layout;if(r.isTreeAnimationBlocked()){r.target=void 0,r.relativeTarget=void 0;return}var d=null!==(n=null!==(t=r.options.transition)&&void 0!==t?t:s.getDefaultTransition())&&void 0!==n?n:n6,h=s.getProps().onLayoutAnimationComplete,v=!r.targetLayout||!nD(r.targetLayout,p)||f,m=!l&&f;(null===(i=r.resumeFrom)||void 0===i?void 0:i.instance)||m||l&&(v||!r.currentAnimation)?(r.resumeFrom&&(r.resumingFrom=r.resumeFrom,r.resumingFrom.resumingFrom=void 0),r.setAnimationOrigin(c,m),r.startAnimation((0,u.pi)((0,u.pi)({},tY(d,"layout")),{onComplete:h}))):r.isLead()&&(null===(a=(o=r.options).onExitComplete)||void 0===a||a.call(o)),r.targetLayout=p})}},e.prototype.unmount=function(){var e,t;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),null===(e=this.getStack())||void 0===e||e.remove(this),null===(t=this.parent)||void 0===t||t.children.delete(this),this.instance=void 0,L.preRender(this.updateProjection)},e.prototype.blockUpdate=function(){this.updateManuallyBlocked=!0},e.prototype.unblockUpdate=function(){this.updateManuallyBlocked=!1},e.prototype.isUpdateBlocked=function(){return this.updateManuallyBlocked||this.updateBlockedByResize},e.prototype.isTreeAnimationBlocked=function(){var e;return this.isAnimationBlocked||(null===(e=this.parent)||void 0===e?void 0:e.isTreeAnimationBlocked())||!1},e.prototype.startUpdate=function(){var e;this.isUpdateBlocked()||(this.isUpdating=!0,null===(e=this.nodes)||void 0===e||e.forEach(n0))},e.prototype.willUpdate=function(e){if(void 0===e&&(e=!0),this.root.isUpdateBlocked()){null===(n=(t=this.options).onExitComplete)||void 0===n||n.call(t);return}if(this.root.isUpdating||this.root.startUpdate(),!this.isLayoutDirty){this.isLayoutDirty=!0;for(var t,n,r,i=0;i<this.path.length;i++){var o=this.path[i];o.shouldResetTransform=!0,o.updateScroll()}var a=this.options,s=a.layoutId,u=a.layout;if(void 0!==s||u){var c=null===(r=this.options.visualElement)||void 0===r?void 0:r.getProps().transformTemplate;this.prevTransformTemplateValue=null==c?void 0:c(this.latestValues,""),this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}}},e.prototype.didUpdate=function(){if(this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(nY);return}this.isUpdating&&(this.isUpdating=!1,this.potentialNodes.size&&(this.potentialNodes.forEach(n8),this.potentialNodes.clear()),this.nodes.forEach(nJ),this.nodes.forEach(nH),this.nodes.forEach(nW),this.clearAllSnapshots(),q.update(),q.preRender(),q.render())},e.prototype.clearAllSnapshots=function(){this.nodes.forEach(nG),this.sharedNodes.forEach(n1)},e.prototype.scheduleUpdateProjection=function(){V.preRender(this.updateProjection,!1,!0)},e.prototype.scheduleCheckAfterUnmount=function(){var e=this;V.postRender(function(){e.isLayoutDirty?e.root.didUpdate():e.root.checkUpdateFailed()})},e.prototype.updateSnapshot=function(){if(!this.snapshot&&this.instance){var e=this.measure(),t=this.removeTransform(this.removeElementScroll(e));n9(t),this.snapshot={measured:e,layout:t,latestValues:{}}}},e.prototype.updateLayout=function(){if(this.instance&&(this.updateScroll(),this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty)){if(this.resumeFrom&&!this.resumeFrom.instance)for(var e,t=0;t<this.path.length;t++)this.path[t].updateScroll();var n=this.measure();n9(n);var r=this.layout;this.layout={measured:n,actual:this.removeElementScroll(n)},this.layoutCorrected=nT(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.actual),null===(e=this.options.visualElement)||void 0===e||e.notifyLayoutMeasure(this.layout.actual,null==r?void 0:r.actual)}},e.prototype.updateScroll=function(){this.options.layoutScroll&&this.instance&&(this.scroll=r(this.instance))},e.prototype.resetTransform=function(){if(i){var e,t=this.isLayoutDirty||this.shouldResetTransform,n=this.projectionDelta&&!nA(this.projectionDelta),r=null===(e=this.options.visualElement)||void 0===e?void 0:e.getProps().transformTemplate,o=null==r?void 0:r(this.latestValues,""),a=o!==this.prevTransformTemplateValue;t&&(n||t7(this.latestValues)||a)&&(i(this.instance,o),this.shouldResetTransform=!1,this.scheduleRender())}},e.prototype.measure=function(){var e=this.options.visualElement;if(!e)return nT();var t=e.measureViewportBox(),n=this.root.scroll;return n&&(nr(t.x,n.x),nr(t.y,n.y)),t},e.prototype.removeElementScroll=function(e){var t=nT();t8(t,e);for(var n=0;n<this.path.length;n++){var r=this.path[n],i=r.scroll,o=r.options;r!==this.root&&i&&o.layoutScroll&&(nr(t.x,i.x),nr(t.y,i.y))}return t},e.prototype.applyTransform=function(e,t){void 0===t&&(t=!1);var n=nT();t8(n,e);for(var r=0;r<this.path.length;r++){var i=this.path[r];!t&&i.options.layoutScroll&&i.scroll&&i!==i.root&&ns(n,{x:-i.scroll.x,y:-i.scroll.y}),t7(i.latestValues)&&ns(n,i.latestValues)}return t7(this.latestValues)&&ns(n,this.latestValues),n},e.prototype.removeTransform=function(e){var t,n=nT();t8(n,e);for(var r=0;r<this.path.length;r++){var i=this.path[r];if(i.instance&&t7(i.latestValues)){t9(i.latestValues)&&i.updateSnapshot();var o=nT();t8(o,i.measure()),nk(n,i.latestValues,null===(t=i.snapshot)||void 0===t?void 0:t.layout,o)}}return t7(this.latestValues)&&nk(n,this.latestValues),n},e.prototype.setTargetDelta=function(e){this.targetDelta=e,this.root.scheduleUpdateProjection()},e.prototype.setOptions=function(e){var t;this.options=(0,u.pi)((0,u.pi)((0,u.pi)({},this.options),e),{crossfade:null===(t=e.crossfade)||void 0===t||t})},e.prototype.clearMeasurements=function(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1},e.prototype.resolveTargetDelta=function(){var e,t,n,r,i=this.options,o=i.layout,a=i.layoutId;this.layout&&(o||a)&&(!this.targetDelta&&!this.relativeTarget&&(this.relativeParent=this.getClosestProjectingParent(),this.relativeParent&&this.relativeParent.layout&&(this.relativeTarget=nT(),this.relativeTargetOrigin=nT(),ng(this.relativeTargetOrigin,this.layout.actual,this.relativeParent.layout.actual),t8(this.relativeTarget,this.relativeTargetOrigin))),(this.relativeTarget||this.targetDelta)&&((this.target||(this.target=nT(),this.targetWithTransforms=nT()),this.relativeTarget&&this.relativeTargetOrigin&&(null===(r=this.relativeParent)||void 0===r?void 0:r.target))?(e=this.target,t=this.relativeTarget,n=this.relativeParent.target,nm(e.x,t.x,n.x),nm(e.y,t.y,n.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.actual):t8(this.target,this.layout.actual),nn(this.target,this.targetDelta)):t8(this.target,this.layout.actual),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.relativeParent=this.getClosestProjectingParent(),this.relativeParent&&Boolean(this.relativeParent.resumingFrom)===Boolean(this.resumingFrom)&&!this.relativeParent.options.layoutScroll&&this.relativeParent.target&&(this.relativeTarget=nT(),this.relativeTargetOrigin=nT(),ng(this.relativeTargetOrigin,this.target,this.relativeParent.target),t8(this.relativeTarget,this.relativeTargetOrigin)))))},e.prototype.getClosestProjectingParent=function(){if(!(!this.parent||t7(this.parent.latestValues)))return(this.parent.relativeTarget||this.parent.targetDelta)&&this.parent.layout?this.parent:this.parent.getClosestProjectingParent()},e.prototype.calcProjection=function(){var e,t=this.options,n=t.layout,r=t.layoutId;if(this.isTreeAnimating=Boolean((null===(e=this.parent)||void 0===e?void 0:e.isTreeAnimating)||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),this.layout&&(n||r)){var i=this.getLead();t8(this.layoutCorrected,this.layout.actual),function(e,t,n,r){void 0===r&&(r=!1);var i,o,a,s,u=n.length;if(u){t.x=t.y=1;for(var c=0;c<u;c++)s=(a=n[c]).projectionDelta,(null===(o=null===(i=a.instance)||void 0===i?void 0:i.style)||void 0===o?void 0:o.display)!=="contents"&&(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&ns(e,{x:-a.scroll.x,y:-a.scroll.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,nn(e,s)),r&&t7(a.latestValues)&&ns(e,a.latestValues))}}(this.layoutCorrected,this.treeScale,this.path,Boolean(this.resumingFrom)||this!==i);var o=i.target;if(o){this.projectionDelta||(this.projectionDelta=nx(),this.projectionDeltaWithTransform=nx());var a=this.treeScale.x,s=this.treeScale.y,u=this.projectionTransform;nv(this.projectionDelta,this.layoutCorrected,o,this.latestValues),this.projectionTransform=nI(this.projectionDelta,this.treeScale),(this.projectionTransform!==u||this.treeScale.x!==a||this.treeScale.y!==s)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",o))}}},e.prototype.hide=function(){this.isVisible=!1},e.prototype.show=function(){this.isVisible=!0},e.prototype.scheduleRender=function(e){var t,n,r;void 0===e&&(e=!0),null===(n=(t=this.options).scheduleRender)||void 0===n||n.call(t),e&&(null===(r=this.getStack())||void 0===r||r.scheduleRender()),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)},e.prototype.setAnimationOrigin=function(e,t){var n,r=this;void 0===t&&(t=!1);var i=this.snapshot,o=(null==i?void 0:i.latestValues)||{},a=(0,u.pi)({},this.latestValues),s=nx();this.relativeTarget=this.relativeTargetOrigin=void 0,this.attemptToResolveRelativeTarget=!t;var c=nT(),l=null==i?void 0:i.isShared,f=1>=((null===(n=this.getStack())||void 0===n?void 0:n.members.length)||0),p=Boolean(l&&!f&&!0===this.options.crossfade&&!this.path.some(n5));this.mixTargetDelta=function(t){var n,i,u,d=t/1e3;n2(s.x,e.x,d),n2(s.y,e.y,d),r.setTargetDelta(s),r.relativeTarget&&r.relativeTargetOrigin&&r.layout&&(null===(u=r.relativeParent)||void 0===u?void 0:u.layout)&&(ng(c,r.layout.actual,r.relativeParent.layout.actual),n=r.relativeTarget,i=r.relativeTargetOrigin,n3(n.x,i.x,c.x,d),n3(n.y,i.y,c.y,d)),l&&(r.animationValues=a,function(e,t,n,r,i,o){var a,s,u,c;i?(e.opacity=$(0,null!==(a=n.opacity)&&void 0!==a?a:1,t2(r)),e.opacityExit=$(null!==(s=t.opacity)&&void 0!==s?s:1,0,t3(r))):o&&(e.opacity=$(null!==(u=t.opacity)&&void 0!==u?u:1,null!==(c=n.opacity)&&void 0!==c?c:1,r));for(var l=0;l<tZ;l++){var f="border".concat(tX[l],"Radius"),p=t1(t,f),d=t1(n,f);(void 0!==p||void 0!==d)&&(p||(p=0),d||(d=0),0===p||0===d||t0(p)===t0(d)?(e[f]=Math.max($(tK(p),tK(d),r),0),(ex.test(d)||ex.test(p))&&(e[f]+="%")):e[f]=d)}(t.rotate||n.rotate)&&(e.rotate=$(t.rotate||0,n.rotate||0,r))}(a,o,r.latestValues,d,p,f)),r.root.scheduleUpdateProjection(),r.scheduleRender()},this.mixTargetDelta(0)},e.prototype.startAnimation=function(e){var t,n,r=this;null===(t=this.currentAnimation)||void 0===t||t.stop(),this.resumingFrom&&(null===(n=this.resumingFrom.currentAnimation)||void 0===n||n.stop()),this.pendingAnimation&&(L.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=V.update(function(){var t,n;nz.hasAnimatedSinceResize=!0,r.currentAnimation=(void 0===(t=(0,u.pi)((0,u.pi)({},e),{onUpdate:function(t){var n;r.mixTargetDelta(t),null===(n=e.onUpdate)||void 0===n||n.call(e,t)},onComplete:function(){var t;null===(t=e.onComplete)||void 0===t||t.call(e),r.completeAnimation()}}))&&(t={}),tJ("",n=X(0)?0:J(0),1e3,t),{stop:function(){return n.stop()},isAnimating:function(){return n.isAnimating()}}),r.resumingFrom&&(r.resumingFrom.currentAnimation=r.currentAnimation),r.pendingAnimation=void 0})},e.prototype.completeAnimation=function(){var e;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),null===(e=this.getStack())||void 0===e||e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")},e.prototype.finishAnimation=function(){var e;this.currentAnimation&&(null===(e=this.mixTargetDelta)||void 0===e||e.call(this,1e3),this.currentAnimation.stop()),this.completeAnimation()},e.prototype.applyTransformsToTarget=function(){var e=this.getLead(),t=e.targetWithTransforms,n=e.target,r=e.layout,i=e.latestValues;t&&n&&r&&(t8(t,n),ns(t,i),nv(this.projectionDeltaWithTransform,this.layoutCorrected,t,i))},e.prototype.registerSharedNode=function(e,t){var n,r,i;this.sharedNodes.has(e)||this.sharedNodes.set(e,new nC),this.sharedNodes.get(e).add(t),t.promote({transition:null===(n=t.options.initialPromotionConfig)||void 0===n?void 0:n.transition,preserveFollowOpacity:null===(i=null===(r=t.options.initialPromotionConfig)||void 0===r?void 0:r.shouldPreserveFollowOpacity)||void 0===i?void 0:i.call(r,t)})},e.prototype.isLead=function(){var e=this.getStack();return!e||e.lead===this},e.prototype.getLead=function(){var e;return this.options.layoutId&&(null===(e=this.getStack())||void 0===e?void 0:e.lead)||this},e.prototype.getPrevLead=function(){var e;return this.options.layoutId?null===(e=this.getStack())||void 0===e?void 0:e.prevLead:void 0},e.prototype.getStack=function(){var e=this.options.layoutId;if(e)return this.root.sharedNodes.get(e)},e.prototype.promote=function(e){var t=void 0===e?{}:e,n=t.needsReset,r=t.transition,i=t.preserveFollowOpacity,o=this.getStack();o&&o.promote(this,i),n&&(this.projectionDelta=void 0,this.needsReset=!0),r&&this.setOptions({transition:r})},e.prototype.relegate=function(){var e=this.getStack();return!!e&&e.relegate(this)},e.prototype.resetRotation=function(){var e=this.options.visualElement;if(e){for(var t=!1,n={},r=0;r<nM.length;r++){var i="rotate"+nM[r];e.getStaticValue(i)&&(t=!0,n[i]=e.getStaticValue(i),e.setStaticValue(i,0))}if(t){for(var i in null==e||e.syncRender(),n)e.setStaticValue(i,n[i]);e.scheduleRender()}}},e.prototype.getProjectionStyles=function(e){void 0===e&&(e={});var t,n,r,i,o,a,s={};if(!this.instance||this.isSVG)return s;if(!this.isVisible)return{visibility:"hidden"};s.visibility="";var u=null===(t=this.options.visualElement)||void 0===t?void 0:t.getProps().transformTemplate;if(this.needsReset)return this.needsReset=!1,s.opacity="",s.pointerEvents=nQ(e.pointerEvents)||"",s.transform=u?u(this.latestValues,""):"none",s;var c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){var l={};return this.options.layoutId&&(l.opacity=null!==(n=this.latestValues.opacity)&&void 0!==n?n:1,l.pointerEvents=nQ(e.pointerEvents)||""),this.hasProjected&&!t7(this.latestValues)&&(l.transform=u?u({},""):"none",this.hasProjected=!1),l}var f=c.animationValues||c.latestValues;this.applyTransformsToTarget(),s.transform=nI(this.projectionDeltaWithTransform,this.treeScale,f),u&&(s.transform=u(f,s.transform));var p=this.projectionDelta,d=p.x,h=p.y;for(var v in s.transformOrigin="".concat(100*d.origin,"% ").concat(100*h.origin,"% 0"),c.animationValues?s.opacity=c===this?null!==(i=null!==(r=f.opacity)&&void 0!==r?r:this.latestValues.opacity)&&void 0!==i?i:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:s.opacity=c===this?null!==(o=f.opacity)&&void 0!==o?o:"":null!==(a=f.opacityExit)&&void 0!==a?a:0,nR)if(void 0!==f[v]){var m=nR[v],y=m.correct,g=m.applyTo,_=y(f[v],c);if(g)for(var b=g.length,w=0;w<b;w++)s[g[w]]=_;else s[v]=_}return this.options.layoutId&&(s.pointerEvents=c===this?nQ(e.pointerEvents)||"":"none"),s},e.prototype.clearSnapshot=function(){this.resumeFrom=this.snapshot=void 0},e.prototype.resetTree=function(){this.root.nodes.forEach(function(e){var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()}),this.root.nodes.forEach(nY),this.root.sharedNodes.clear()},e}()}function nH(e){e.updateLayout()}function nW(e){var t,n,r,i,o=null!==(n=null===(t=e.resumeFrom)||void 0===t?void 0:t.snapshot)&&void 0!==n?n:e.snapshot;if(e.isLead()&&e.layout&&o&&e.hasListeners("didUpdate")){var a=e.layout,s=a.actual,u=a.measured;"size"===e.options.animationType?nF(function(e){var t=o.isShared?o.measured[e]:o.layout[e],n=np(t);t.min=s[e].min,t.max=t.min+n}):"position"===e.options.animationType&&nF(function(e){var t=o.isShared?o.measured[e]:o.layout[e],n=np(s[e]);t.max=t.min+n});var c=nx();nv(c,s,o.layout);var l=nx();o.isShared?nv(l,e.applyTransform(u,!0),o.measured):nv(l,s,o.layout);var f=!nA(c),p=!1;if(!e.resumeFrom&&(e.relativeParent=e.getClosestProjectingParent(),e.relativeParent&&!e.relativeParent.resumeFrom)){var d=e.relativeParent,h=d.snapshot,v=d.layout;if(h&&v){var m=nT();ng(m,o.layout,h.layout);var y=nT();ng(y,s,v.actual),nD(m,y)||(p=!0)}}e.notifyListeners("didUpdate",{layout:s,snapshot:o,delta:l,layoutDelta:c,hasLayoutChanged:f,hasRelativeTargetChanged:p})}else e.isLead()&&(null===(i=(r=e.options).onExitComplete)||void 0===i||i.call(r));e.options.transition=void 0}function nG(e){e.clearSnapshot()}function nY(e){e.clearMeasurements()}function nJ(e){e.resetTransform()}function nX(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function nZ(e){e.resolveTargetDelta()}function nK(e){e.calcProjection()}function n0(e){e.resetRotation()}function n1(e){e.removeLeadSnapshot()}function n2(e,t,n){e.translate=$(t.translate,0,n),e.scale=$(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function n3(e,t,n,r){e.min=$(t.min,n.min,r),e.max=$(t.max,n.max,r)}function n5(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}var n6={duration:.45,ease:[.4,0,.1,1]};function n8(e,t){for(var n=e.root,r=e.path.length-1;r>=0;r--)if(Boolean(e.path[r].instance)){n=e.path[r];break}var i=(n&&n!==e.root?n.instance:document).querySelector('[data-projection-id="'.concat(t,'"]'));i&&e.mount(i,!0)}function n4(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function n9(e){n4(e.x),n4(e.y)}var n7=1,re=(0,c.createContext)({}),rt=(0,c.createContext)({}),rn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,u.ZT)(t,e),t.prototype.getSnapshotBeforeUpdate=function(){return this.updateProps(),null},t.prototype.componentDidUpdate=function(){},t.prototype.updateProps=function(){var e=this.props,t=e.visualElement,n=e.props;t&&t.setProps(n)},t.prototype.render=function(){return this.props.children},t}(c.Component),rr=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function ri(e){if("string"!=typeof e||e.includes("-"));else if(rr.indexOf(e)>-1||/[A-Z]/.test(e))return!0;return!1}function ro(e,t){var n=t.layout,r=t.layoutId;return nL(e)||nq.has(e)||(n||void 0!==r)&&(!!nR[e]||"opacity"===e)}var ra={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function rs(e){return e.startsWith("--")}function ru(e,t,n,r){var i,o,a,s,u=e.style,c=e.vars,l=e.transform,f=e.transformKeys,p=e.transformOrigin;f.length=0;var d=!1,h=!1,v=!0;for(var m in t){var y,g=t[m];if(rs(m)){c[m]=g;continue}var _=tq[m],b=_&&"number"==typeof g?_.transform(g):g;if(nL(m)){if(d=!0,l[m]=b,f.push(m),!v)continue;g!==(null!==(s=_.default)&&void 0!==s?s:0)&&(v=!1)}else(y=m,nq.has(y))?(p[m]=b,h=!0):u[m]=b}d?u.transform=function(e,t,n,r){var i=e.transform,o=e.transformKeys,a=t.enableHardwareAcceleration,s=t.allowTransformNone,u="";o.sort(nN);for(var c=!1,l=o.length,f=0;f<l;f++){var p=o[f];u+="".concat(ra[p]||p,"(").concat(i[p],") "),"z"===p&&(c=!0)}return!c&&(void 0===a||a)?u+="translateZ(0)":u=u.trim(),r?u=r(i,n?"":u):(void 0===s||s)&&n&&(u="none"),u}(e,n,v,r):r?u.transform=r({},""):!t.transform&&u.transform&&(u.transform="none"),h&&(u.transformOrigin=(i=p.originX,o=p.originY,a=p.originZ,"".concat(void 0===i?"50%":i," ").concat(void 0===o?"50%":o," ").concat(void 0===a?0:a)))}var rc=function(){return{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}};function rl(e,t,n){for(var r in t)X(t[r])||ro(r,n)||(e[r]=t[r])}function rf(e,t,n){var r,i,o={},a=(rl(r={},e.style||{},e),Object.assign(r,(i=e.transformTemplate,(0,c.useMemo)(function(){var e=rc();ru(e,t,{enableHardwareAcceleration:!n},i);var r=e.vars,o=e.style;return(0,u.pi)((0,u.pi)({},r),o)},[t]))),e.transformValues&&(r=e.transformValues(r)),r);return Boolean(e.drag)&&!1!==e.dragListener&&(o.draggable=!1,a.userSelect=a.WebkitUserSelect=a.WebkitTouchCallout="none",a.touchAction=!0===e.drag?"none":"pan-".concat("x"===e.drag?"y":"x")),o.style=a,o}var rp=new Set(["initial","animate","exit","style","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","whileDrag","onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","onHoverStart","onHoverEnd","whileFocus","whileTap","whileHover","whileInView","onViewportEnter","onViewportLeave","viewport","layoutScroll"]);function rd(e){return rp.has(e)}var rh=function(e){return!rd(e)};try{(r=require("@emotion/is-prop-valid").default)&&(rh=function(e){return e.startsWith("on")?!rd(e):r(e)})}catch(rv){}function rm(e,t,n){return"string"==typeof e?e:eO.transform(t+n*e)}var ry={offset:"stroke-dashoffset",array:"stroke-dasharray"},rg={offset:"strokeDashoffset",array:"strokeDasharray"};function r_(e,t,n,r){var i,o,a,s,c,l,f,p,d,h=t.attrX,v=t.attrY,m=t.originX,y=t.originY,g=t.pathLength,_=t.pathSpacing,b=t.pathOffset;ru(e,(0,u._T)(t,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]),n,r),e.attrs=e.style,e.style={};var w=e.attrs,E=e.style,k=e.dimensions;w.transform&&(k&&(E.transform=w.transform),delete w.transform),k&&(void 0!==m||void 0!==y||E.transform)&&(E.transformOrigin=(i=rm(void 0!==m?m:.5,k.x,k.width),o=rm(void 0!==y?y:.5,k.y,k.height),"".concat(i," ").concat(o))),void 0!==h&&(w.x=h),void 0!==v&&(w.y=v),void 0!==g&&(a=w,l=!1,void 0===(s=void 0===_?1:_)&&(s=1),void 0===(c=void 0===b?0:b)&&(c=0),void 0===l&&(l=!0),a.pathLength=1,a[(f=l?ry:rg).offset]=eO.transform(-c),p=eO.transform(g),d=eO.transform(s),a[f.array]="".concat(p," ").concat(d))}var rb=function(){return(0,u.pi)((0,u.pi)({},rc()),{attrs:{}})};function rw(e,t){var n=(0,c.useMemo)(function(){var n=rb();return r_(n,t,{enableHardwareAcceleration:!1},e.transformTemplate),(0,u.pi)((0,u.pi)({},n.attrs),{style:(0,u.pi)({},n.style)})},[t]);if(e.style){var r={};rl(r,e.style,e),n.style=(0,u.pi)((0,u.pi)({},r),n.style)}return n}var rE=/([a-z])([A-Z])/g,rk=function(e){return e.replace(rE,"$1-$2").toLowerCase()};function rS(e,t,n,r){var i=t.style,o=t.vars;for(var a in Object.assign(e.style,i,r&&r.getProjectionStyles(n)),o)e.style.setProperty(a,o[a])}var rx=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function rO(e,t){for(var n in rS(e,t),t.attrs)e.setAttribute(rx.has(n)?n:rk(n),t.attrs[n])}function rT(e){var t=e.style,n={};for(var r in t)(X(t[r])||ro(r,e))&&(n[r]=t[r]);return n}function rP(e){var t=rT(e);for(var n in e)X(e[n])&&(t["x"===n||"y"===n?"attr"+n.toUpperCase():n]=e[n]);return t}function rA(e){return"object"==typeof e&&"function"==typeof e.start}function rD(e,t,n,r){var i=e.scrapeMotionValuesFromProps,o=e.createRenderState,a=e.onMount,s={latestValues:function(e,t,n,r){var i={},o=(null==n?void 0:n.initial)===!1,a=r(e);for(var s in a)i[s]=nQ(a[s]);var c=e.initial,l=e.animate,f=x(e),p=O(e);t&&p&&!f&&!1!==e.inherit&&(null!=c||(c=t.initial),null!=l||(l=t.animate));var d=o||!1===c,h=d?l:c;return h&&"boolean"!=typeof h&&!rA(h)&&(Array.isArray(h)?h:[h]).forEach(function(t){var n=k(e,t);if(n){var r=n.transitionEnd;n.transition;var o=(0,u._T)(n,["transitionEnd","transition"]);for(var a in o){var s=o[a];if(Array.isArray(s)){var c=d?s.length-1:0;s=s[c]}null!==s&&(i[a]=s)}for(var a in r)i[a]=r[a]}}),i}(t,n,r,i),renderState:o()};return a&&(s.mount=function(e){return a(t,e,s)}),s}var rC=function(e){return function(t,n){var r=(0,c.useContext)(m),i=(0,c.useContext)(y);return n?rD(e,t,r,i):P(function(){return rD(e,t,r,i)})}},rR={useVisualState:rC({scrapeMotionValuesFromProps:rP,createRenderState:rb,onMount:function(e,t,n){var r=n.renderState,i=n.latestValues;try{r.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(o){r.dimensions={x:0,y:0,width:0,height:0}}r_(r,i,{enableHardwareAcceleration:!1},e.transformTemplate),rO(t,r)}})},rI={useVisualState:rC({scrapeMotionValuesFromProps:rT,createRenderState:rc})};function rF(e,t,n,r){return e.addEventListener(t,n,r),function(){return e.removeEventListener(t,n,r)}}function rM(e,t,n,r){(0,c.useEffect)(function(){var i=e.current;if(n&&i)return rF(i,t,n,r)},[e,t,n,r])}function rj(e){return"undefined"!=typeof PointerEvent&&e instanceof PointerEvent?!("mouse"!==e.pointerType):e instanceof MouseEvent}(i=a||(a={})).Animate="animate",i.Hover="whileHover",i.Tap="whileTap",i.Drag="whileDrag",i.Focus="whileFocus",i.InView="whileInView",i.Exit="exit";var rN={pageX:0,pageY:0};function rV(e,t){var n,r,i;return void 0===t&&(t="page"),{point:e.touches?(void 0===(n=t)&&(n="page"),{x:(r=e.touches[0]||e.changedTouches[0]||rN)[n+"X"],y:r[n+"Y"]}):(void 0===(i=t)&&(i="page"),{x:e[i+"X"],y:e[i+"Y"]})}}var rL=function(e,t){void 0===t&&(t=!1);var n=function(t){return e(t,rV(t))};return t?function(e){var t=e instanceof MouseEvent;(!t||t&&0===e.button)&&n(e)}:n},rq={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},rB={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function rU(e){if(g&&null===window.onpointerdown);else if(g&&null===window.ontouchstart)return rB[e];else if(g&&null===window.onmousedown)return rq[e];return e}function rQ(e,t,n,r){return rF(e,rU(t),rL(n,"pointerdown"===t),r)}function rz(e,t,n,r){return rM(e,rU(t),n&&rL(n,"pointerdown"===t),r)}function r$(e){var t=null;return function(){return null===t&&(t=e,function(){t=null})}}var rH=r$("dragHorizontal"),rW=r$("dragVertical");function rG(e){var t=!1;if("y"===e)t=rW();else if("x"===e)t=rH();else{var n=rH(),r=rW();n&&r?t=function(){n(),r()}:(n&&n(),r&&r())}return t}function rY(){var e=rG(!0);return!e||(e(),!1)}function rJ(e,t,n){return function(r,i){var o;!rj(r)||rY()||(null===(o=e.animationState)||void 0===o||o.setActive(a.Hover,t),null==n||n(r,i))}}var rX=function(e,t){return!!t&&(e===t||rX(e,t.parentElement))};function rZ(e){return(0,c.useEffect)(function(){return function(){return e()}},[])}var rK=new WeakMap,r0=new WeakMap,r1=function(e){var t;null===(t=rK.get(e.target))||void 0===t||t(e)},r2=function(e){e.forEach(r1)},r3={some:0,all:1};function r5(e,t,n,r){var i=r.root,o=r.margin,s=r.amount,l=void 0===s?"some":s,f=r.once;(0,c.useEffect)(function(){if(e){var r,s,c,p,d,h,v,m={root:null==i?void 0:i.current,rootMargin:o,threshold:"number"==typeof l?l:r3[l]};return r=n.getInstance(),s=m.root,c=(0,u._T)(m,["root"]),p=s||document,r0.has(p)||r0.set(p,{}),(d=r0.get(p))[h=JSON.stringify(c)]||(d[h]=new IntersectionObserver(r2,(0,u.pi)({root:s},c))),v=d[h],rK.set(r,function(e){var r,i=e.isIntersecting;if(t.isInView!==i){if(t.isInView=i,f&&!i&&t.hasEnteredView)return;i&&(t.hasEnteredView=!0),null===(r=n.animationState)||void 0===r||r.setActive(a.InView,i);var o=n.getProps(),s=i?o.onViewportEnter:o.onViewportLeave;null==s||s(e)}}),v.observe(r),function(){rK.delete(r),v.unobserve(r)}}},[e,i,o,l])}function r6(e,t,n){(0,c.useEffect)(function(){e&&requestAnimationFrame(function(){t.hasEnteredView=!0;var e,r=n.getProps().onViewportEnter;null==r||r(null),null===(e=n.animationState)||void 0===e||e.setActive(a.InView,!0)})},[e])}var r8=function(e){return function(t){return e(t),null}},r4={inView:r8(function(e){var t=e.visualElement,n=e.whileInView,r=e.onViewportEnter,i=e.onViewportLeave,o=e.viewport,a=void 0===o?{}:o,s=(0,c.useRef)({hasEnteredView:!1,isInView:!1}),u=Boolean(n||r||i);a.once&&s.current.hasEnteredView&&(u=!1),("undefined"==typeof IntersectionObserver?r6:r5)(u,s.current,t,a)}),tap:r8(function(e){var t=e.onTap,n=e.onTapStart,r=e.onTapCancel,i=e.whileTap,o=e.visualElement,s=(0,c.useRef)(!1),u=(0,c.useRef)(null);function l(){var e;null===(e=u.current)||void 0===e||e.call(u),u.current=null}function f(){var e;return l(),s.current=!1,null===(e=o.animationState)||void 0===e||e.setActive(a.Tap,!1),!rY()}function p(e,n){f()&&(rX(o.getInstance(),e.target)?null==t||t(e,n):null==r||r(e,n))}function d(e,t){f()&&(null==r||r(e,t))}rz(o,"pointerdown",t||n||r||i?function(e,t){var r;l(),s.current||(s.current=!0,u.current=eG(rQ(window,"pointerup",p),rQ(window,"pointercancel",d)),null===(r=o.animationState)||void 0===r||r.setActive(a.Tap,!0),null==n||n(e,t))}:void 0),rZ(l)}),focus:r8(function(e){var t=e.whileFocus,n=e.visualElement;rM(n,"focus",t?function(){var e;null===(e=n.animationState)||void 0===e||e.setActive(a.Focus,!0)}:void 0),rM(n,"blur",t?function(){var e;null===(e=n.animationState)||void 0===e||e.setActive(a.Focus,!1)}:void 0)}),hover:r8(function(e){var t=e.onHoverStart,n=e.onHoverEnd,r=e.whileHover,i=e.visualElement;rz(i,"pointerenter",t||r?rJ(i,!0,t):void 0),rz(i,"pointerleave",n||r?rJ(i,!1,n):void 0)})};function r9(){var e=(0,c.useContext)(y);if(null===e)return[!0,null];var t=e.isPresent,n=e.onExitComplete,r=e.register,i=it();return(0,c.useEffect)(function(){return r(i)},[]),!t&&n?[!1,function(){return null==n?void 0:n(i)}]:[!0]}var r7=0,ie=function(){return r7++},it=function(){return P(ie)};function ir(e,t){if(!Array.isArray(t))return!1;var n=t.length;if(n!==e.length)return!1;for(var r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var ii=function(e){return function(t){return t.test(e)}},io=[eh,eO,ex,eS,eP,eT,{test:function(e){return"auto"===e},parse:function(e){return e}}],ia=function(e){return io.find(ii(e))},is=(0,u.ev)((0,u.ev)([],(0,u.CR)(io),!1),[eV,e$],!1);function iu(e,t,n){void 0===n&&(n={});var r,i=S(e,t,n.custom),o=(i||{}).transition,a=void 0===o?e.getDefaultTransition()||{}:o;n.transitionOverride&&(a=n.transitionOverride);var s=i?function(){return ic(e,i,n)}:function(){return Promise.resolve()},c=(null===(r=e.variantChildren)||void 0===r?void 0:r.size)?function(r){void 0===r&&(r=0);var i,o,s,c,l,f,p,d=a.delayChildren,h=a.staggerChildren,v=a.staggerDirection;return i=(void 0===d?0:d)+r,o=h,s=v,c=n,void 0===i&&(i=0),void 0===o&&(o=0),void 0===s&&(s=1),l=[],f=(e.variantChildren.size-1)*o,p=1===s?function(e){return void 0===e&&(e=0),e*o}:function(e){return void 0===e&&(e=0),f-e*o},Array.from(e.variantChildren).sort(il).forEach(function(e,n){l.push(iu(e,t,(0,u.pi)((0,u.pi)({},c),{delay:i+p(n)})).then(function(){return e.notifyAnimationComplete(t)}))}),Promise.all(l)}:function(){return Promise.resolve()},l=a.when;if(!l)return Promise.all([s(),c(n.delay)]);var f=(0,u.CR)("beforeChildren"===l?[s,c]:[c,s],2),p=f[0],d=f[1];return p().then(d)}function ic(e,t,n){var r,i=void 0===n?{}:n,o=i.delay,a=void 0===o?0:o,s=i.transitionOverride,c=i.type,l=e.makeTargetAnimatable(t),f=l.transition,p=void 0===f?e.getDefaultTransition():f,d=l.transitionEnd,h=(0,u._T)(l,["transition","transitionEnd"]);s&&(p=s);var v=[],m=c&&(null===(r=e.animationState)||void 0===r?void 0:r.getState()[c]);for(var y in h){var g=e.getValue(y),_=h[y];if(!(!g||void 0===_||m&&function(e,t){var n=e.protectedKeys,r=e.needsAnimating,i=n.hasOwnProperty(t)&&!0!==r[t];return r[t]=!1,i}(m,y))){var b=tJ(y,g,_,(0,u.pi)({delay:a},p));v.push(b)}}return Promise.all(v).then(function(){d&&function(e,t){var n=S(e,t),r=n?e.makeTargetAnimatable(n,!1):{},i=r.transitionEnd;r.transition;var o=(0,u._T)(r,["transitionEnd","transition"]);for(var a in o=(0,u.pi)((0,u.pi)({},o),void 0===i?{}:i)){var s,c=t$(o[a]);s=a,e.hasValue(s)?e.getValue(s).set(c):e.addValue(s,J(c))}}(e,d)})}function il(e,t){return e.sortNodePosition(t)}var ip=[a.Animate,a.InView,a.Focus,a.Hover,a.Tap,a.Drag,a.Exit],id=(0,u.ev)([],(0,u.CR)(ip),!1).reverse(),ih=ip.length;function iv(e){return void 0===e&&(e=!1),{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}var im={animation:r8(function(e){var t=e.visualElement,n=e.animate;t.animationState||(t.animationState=function(e){var t,n=function(t){return Promise.all(t.map(function(t){return function(e,t,n){if(void 0===n&&(n={}),e.notifyAnimationStart(t),Array.isArray(t)){var r;r=Promise.all(t.map(function(t){return iu(e,t,n)}))}else if("string"==typeof t)r=iu(e,t,n);else{var i="function"==typeof t?S(e,t,n.custom):t;r=ic(e,i,n)}return r.then(function(){return e.notifyAnimationComplete(t)})}(e,t.animation,t.options)}))},r=((t={})[a.Animate]=iv(!0),t[a.InView]=iv(),t[a.Hover]=iv(),t[a.Tap]=iv(),t[a.Drag]=iv(),t[a.Focus]=iv(),t[a.Exit]=iv(),t),i={},o=!0,s=function(t,n){var r=S(e,n);if(r){r.transition;var i=r.transitionEnd,o=(0,u._T)(r,["transition","transitionEnd"]);t=(0,u.pi)((0,u.pi)((0,u.pi)({},t),o),i)}return t};function c(t,a){for(var c,l=e.getProps(),f=e.getVariantContext(!0)||{},p=[],d=new Set,h={},v=1/0,m=0;m<ih;m++)!function(n){var i,m=id[n],y=r[m],g=null!==(c=l[m])&&void 0!==c?c:f[m],_=E(g),b=m===a?y.isActive:null;!1===b&&(v=n);var k=g===f[m]&&g!==l[m]&&_;if(k&&o&&e.manuallyAnimateOnMount&&(k=!1),y.protectedKeys=(0,u.pi)({},h),!(!y.isActive&&null===b||!g&&!y.prevProp||rA(g))&&"boolean"!=typeof g){var S=(i=y.prevProp,"string"==typeof g?g!==i:!!w(g)&&!ir(g,i)),x=S||m===a&&y.isActive&&!k&&_||n>v&&_,O=Array.isArray(g)?g:[g],T=O.reduce(s,{});!1===b&&(T={});var P=y.prevResolvedValues,A=void 0===P?{}:P,D=(0,u.pi)((0,u.pi)({},A),T),C=function(e){x=!0,d.delete(e),y.needsAnimating[e]=!0};for(var R in D){var I=T[R],F=A[R];h.hasOwnProperty(R)||(I!==F?tP(I)&&tP(F)?!ir(I,F)||S?C(R):y.protectedKeys[R]=!0:void 0!==I?C(R):d.add(R):void 0!==I&&d.has(R)?C(R):y.protectedKeys[R]=!0)}y.prevProp=g,y.prevResolvedValues=T,y.isActive&&(h=(0,u.pi)((0,u.pi)({},h),T)),o&&e.blockInitialAnimation&&(x=!1),x&&!k&&p.push.apply(p,(0,u.ev)([],(0,u.CR)(O.map(function(e){return{animation:e,options:(0,u.pi)({type:m},t)}})),!1))}}(m);if(i=(0,u.pi)({},h),d.size){var y={};d.forEach(function(t){var n=e.getBaseTarget(t);void 0!==n&&(y[t]=n)}),p.push({animation:y})}var g=Boolean(p.length);return o&&!1===l.initial&&!e.manuallyAnimateOnMount&&(g=!1),o=!1,g?n(p):Promise.resolve()}return{isAnimated:function(e){return void 0!==i[e]},animateChanges:c,setActive:function(t,n,i){var o;return r[t].isActive===n?Promise.resolve():(null===(o=e.variantChildren)||void 0===o||o.forEach(function(e){var r;return null===(r=e.animationState)||void 0===r?void 0:r.setActive(t,n)}),r[t].isActive=n,c(i,t))},setAnimateFunction:function(t){n=t(e)},getState:function(){return r}}}(t)),rA(n)&&(0,c.useEffect)(function(){return n.subscribe(t)},[n])}),exit:r8(function(e){var t=e.custom,n=e.visualElement,r=(0,u.CR)(r9(),2),i=r[0],o=r[1],s=(0,c.useContext)(y);(0,c.useEffect)(function(){n.isPresent=i;var e,r,u=null===(e=n.animationState)||void 0===e?void 0:e.setActive(a.Exit,!i,{custom:null!==(r=null==s?void 0:s.custom)&&void 0!==r?r:t});i||null==u||u.then(o)},[i])})},iy=function(){function e(e,t,n){var r=this,i=(void 0===n?{}:n).transformPagePoint;if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=function(){if(r.lastMoveEvent&&r.lastMoveEventInfo){var e=ib(r.lastMoveEventInfo,r.history),t=null!==r.startEvent,n=nf(e.offset,{x:0,y:0})>=3;if(t||n){var i=e.point,o=z().timestamp;r.history.push((0,u.pi)((0,u.pi)({},i),{timestamp:o}));var a=r.handlers,s=a.onStart,c=a.onMove;t||(s&&s(r.lastMoveEvent,e),r.startEvent=r.lastMoveEvent),c&&c(r.lastMoveEvent,e)}}},this.handlePointerMove=function(e,t){if(r.lastMoveEvent=e,r.lastMoveEventInfo=ig(t,r.transformPagePoint),rj(e)&&0===e.buttons){r.handlePointerUp(e,t);return}V.update(r.updatePoint,!0)},this.handlePointerUp=function(e,t){r.end();var n=r.handlers,i=n.onEnd,o=n.onSessionEnd,a=ib(ig(t,r.transformPagePoint),r.history);r.startEvent&&i&&i(e,a),o&&o(e,a)},!e.touches||!(e.touches.length>1)){this.handlers=t,this.transformPagePoint=i;var o=ig(rV(e),this.transformPagePoint),a=o.point,s=z().timestamp;this.history=[(0,u.pi)((0,u.pi)({},a),{timestamp:s})];var c=t.onSessionStart;c&&c(e,ib(o,this.history)),this.removeListeners=eG(rQ(window,"pointermove",this.handlePointerMove),rQ(window,"pointerup",this.handlePointerUp),rQ(window,"pointercancel",this.handlePointerUp))}}return e.prototype.updateHandlers=function(e){this.handlers=e},e.prototype.end=function(){this.removeListeners&&this.removeListeners(),L.update(this.updatePoint)},e}();function ig(e,t){return t?{point:t(e.point)}:e}function i_(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ib(e,t){var n=e.point;return{point:n,delta:i_(n,iw(t)),offset:i_(n,t[0]),velocity:function(e,t){if(e.length<2)return{x:0,y:0};for(var n=e.length-1,r=null,i=iw(e);n>=0&&(r=e[n],!(i.timestamp-r.timestamp>t_(.1)));)n--;if(!r)return{x:0,y:0};var o=(i.timestamp-r.timestamp)/1e3;if(0===o)return{x:0,y:0};var a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}(t,0)}}function iw(e){return e[e.length-1]}function iE(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function ik(e,t){var n,r=t.min-e.min,i=t.max-e.max;return t.max-t.min<e.max-e.min&&(r=(n=(0,u.CR)([i,r],2))[0],i=n[1]),{min:r,max:i}}function iS(e,t,n){return{min:ix(e,t),max:ix(e,n)}}function ix(e,t){var n;return"number"==typeof e?e:null!==(n=e[t])&&void 0!==n?n:0}function iO(e){var t=e.top;return{x:{min:e.left,max:e.right},y:{min:t,max:e.bottom}}}function iT(e,t){return iO(function(e,t){if(!t)return e;var n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}var iP=new WeakMap,iA=function(){function e(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=nT(),this.visualElement=e}return e.prototype.start=function(e,t){var n=this,r=(void 0===t?{}:t).snapToCursor,i=void 0!==r&&r;!1!==this.visualElement.isPresent&&(this.panSession=new iy(e,{onSessionStart:function(e){n.stopAnimation(),i&&n.snapToCursor(rV(e,"page").point)},onStart:function(e,t){var r,i=n.getProps(),o=i.drag,s=i.dragPropagation,u=i.onDragStart;(!o||s||(n.openGlobalLock&&n.openGlobalLock(),n.openGlobalLock=rG(o),n.openGlobalLock))&&(n.isDragging=!0,n.currentDirection=null,n.resolveConstraints(),n.visualElement.projection&&(n.visualElement.projection.isAnimationBlocked=!0,n.visualElement.projection.target=void 0),nF(function(e){var t,r,i=n.getAxisMotionValue(e).get()||0;if(ex.test(i)){var o=null===(r=null===(t=n.visualElement.projection)||void 0===t?void 0:t.layout)||void 0===r?void 0:r.actual[e];o&&(i=np(o)*(parseFloat(i)/100))}n.originPoint[e]=i}),null==u||u(e,t),null===(r=n.visualElement.animationState)||void 0===r||r.setActive(a.Drag,!0))},onMove:function(e,t){var r=n.getProps(),i=r.dragPropagation,o=r.dragDirectionLock,a=r.onDirectionLock,s=r.onDrag;if(i||n.openGlobalLock){var u,c,l=t.offset;if(o&&null===n.currentDirection){n.currentDirection=(void 0===u&&(u=10),c=null,Math.abs(l.y)>u?c="y":Math.abs(l.x)>u&&(c="x"),c),null!==n.currentDirection&&(null==a||a(n.currentDirection));return}n.updateAxis("x",t.point,l),n.updateAxis("y",t.point,l),n.visualElement.syncRender(),null==s||s(e,t)}},onSessionEnd:function(e,t){return n.stop(e,t)}},{transformPagePoint:this.visualElement.getTransformPagePoint()}))},e.prototype.stop=function(e,t){var n=this.isDragging;if(this.cancel(),n){var r=t.velocity;this.startAnimation(r);var i=this.getProps().onDragEnd;null==i||i(e,t)}},e.prototype.cancel=function(){var e,t;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),null===(e=this.panSession)||void 0===e||e.end(),this.panSession=void 0,!this.getProps().dragPropagation&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),null===(t=this.visualElement.animationState)||void 0===t||t.setActive(a.Drag,!1)},e.prototype.updateAxis=function(e,t,n){var r=this.getProps().drag;if(n&&iD(e,r,this.currentDirection)){var i,o,a,s,u,c=this.getAxisMotionValue(e),l=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(i=l,o=this.constraints[e],a=this.elastic[e],s=o.min,u=o.max,void 0!==s&&i<s?i=a?$(s,i,a.min):Math.max(i,s):void 0!==u&&i>u&&(i=a?$(u,i,a.max):Math.min(i,u)),l=i),c.set(l)}},e.prototype.resolveConstraints=function(){var e,t,n,r,i,o,a=this,s=this.getProps(),u=s.dragConstraints,c=s.dragElastic,l=(this.visualElement.projection||{}).layout,f=this.constraints;u&&b(u)?this.constraints||(this.constraints=this.resolveRefConstraints()):u&&l?this.constraints=(e=l.actual,t=u.top,n=u.left,r=u.bottom,i=u.right,{x:iE(e.x,n,i),y:iE(e.y,t,r)}):this.constraints=!1,this.elastic=(void 0===(o=c)&&(o=.35),!1===o?o=0:!0===o&&(o=.35),{x:iS(o,"left","right"),y:iS(o,"top","bottom")}),f!==this.constraints&&l&&this.constraints&&!this.hasMutatedConstraints&&nF(function(e){if(a.getAxisMotionValue(e)){var t,n,r;a.constraints[e]=(t=l.actual[e],n=a.constraints[e],r={},void 0!==n.min&&(r.min=n.min-t.min),void 0!==n.max&&(r.max=n.max-t.min),r)}})},e.prototype.resolveRefConstraints=function(){var e=this.getProps(),t=e.dragConstraints,n=e.onMeasureDragConstraints;if(!t||!b(t))return!1;var r=t.current;K(null!==r,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");var i=this.visualElement.projection;if(!i||!i.layout)return!1;var o=(s=i.root,u=iT(r,this.visualElement.getTransformPagePoint()),(c=s.scroll)&&(nr(u.x,c.x),nr(u.y,c.y)),u),a={x:ik((l=i.layout.actual).x,o.x),y:ik(l.y,o.y)};if(n){var s,u,c,l,f,p,d,h=n((p=(f=a).x,{top:(d=f.y).min,right:p.max,bottom:d.max,left:p.min}));this.hasMutatedConstraints=!!h,h&&(a=iO(h))}return a},e.prototype.startAnimation=function(e){var t=this,n=this.getProps(),r=n.drag,i=n.dragMomentum,o=n.dragElastic,a=n.dragTransition,s=n.dragSnapToOrigin,c=n.onDragTransitionEnd,l=this.constraints||{};return Promise.all(nF(function(n){if(iD(n,r,t.currentDirection)){var c,f=null!==(c=null==l?void 0:l[n])&&void 0!==c?c:{};s&&(f={min:0,max:0});var p=(0,u.pi)((0,u.pi)({type:"inertia",velocity:i?e[n]:0,bounceStiffness:o?200:1e6,bounceDamping:o?40:1e7,timeConstant:750,restDelta:1,restSpeed:10},a),f);return t.startAxisValueAnimation(n,p)}})).then(c)},e.prototype.startAxisValueAnimation=function(e,t){var n=this.getAxisMotionValue(e);return tJ(e,n,0,t)},e.prototype.stopAnimation=function(){var e=this;nF(function(t){return e.getAxisMotionValue(t).stop()})},e.prototype.getAxisMotionValue=function(e){var t,n,r="_drag"+e.toUpperCase();return this.visualElement.getProps()[r]||this.visualElement.getValue(e,null!==(n=null===(t=this.visualElement.getProps().initial)||void 0===t?void 0:t[e])&&void 0!==n?n:0)},e.prototype.snapToCursor=function(e){var t=this;nF(function(n){if(iD(n,t.getProps().drag,t.currentDirection)){var r=t.visualElement.projection,i=t.getAxisMotionValue(n);if(r&&r.layout){var o=r.layout.actual[n],a=o.min,s=o.max;i.set(e[n]-$(a,s,.5))}}})},e.prototype.scalePositionWithinConstraints=function(){var e,t=this,n=this.getProps(),r=n.drag,i=n.dragConstraints,o=this.visualElement.projection;if(b(i)&&o&&this.constraints){this.stopAnimation();var a={x:0,y:0};nF(function(e){var n=t.getAxisMotionValue(e);if(n){var r,i,o,s,u,c=n.get();a[e]=(r={min:c,max:c},i=t.constraints[e],o=.5,s=np(r),(u=np(i))>s?o=es(i.min,i.max-s,r.min):s>u&&(o=es(r.min,r.max-u,i.min)),ee(0,1,o))}});var s=this.visualElement.getProps().transformTemplate;this.visualElement.getInstance().style.transform=s?s({},""):"none",null===(e=o.root)||void 0===e||e.updateScroll(),o.updateLayout(),this.resolveConstraints(),nF(function(e){if(iD(e,r,null)){var n=t.getAxisMotionValue(e),i=t.constraints[e],o=i.min,s=i.max;n.set($(o,s,a[e]))}})}},e.prototype.addListeners=function(){var e,t=this;iP.set(this.visualElement,this);var n=rQ(this.visualElement.getInstance(),"pointerdown",function(e){var n=t.getProps(),r=n.drag,i=n.dragListener;r&&(void 0===i||i)&&t.start(e)}),r=function(){b(t.getProps().dragConstraints)&&(t.constraints=t.resolveRefConstraints())},i=this.visualElement.projection,o=i.addEventListener("measure",r);i&&!i.layout&&(null===(e=i.root)||void 0===e||e.updateScroll(),i.updateLayout()),r();var a=rF(window,"resize",function(){t.scalePositionWithinConstraints()});return i.addEventListener("didUpdate",function(e){var n=e.delta,r=e.hasLayoutChanged;t.isDragging&&r&&(nF(function(e){var r=t.getAxisMotionValue(e);r&&(t.originPoint[e]+=n[e].translate,r.set(r.get()+n[e].translate))}),t.visualElement.syncRender())}),function(){a(),n(),o()}},e.prototype.getProps=function(){var e=this.visualElement.getProps(),t=e.drag,n=e.dragDirectionLock,r=e.dragPropagation,i=e.dragConstraints,o=e.dragElastic,a=e.dragMomentum;return(0,u.pi)((0,u.pi)({},e),{drag:void 0!==t&&t,dragDirectionLock:void 0!==n&&n,dragPropagation:void 0!==r&&r,dragConstraints:void 0!==i&&i,dragElastic:void 0===o?.35:o,dragMomentum:void 0===a||a})},e}();function iD(e,t,n){return(!0===t||t===e)&&(null===n||n===e)}var iC={pan:r8(function(e){var t=e.onPan,n=e.onPanStart,r=e.onPanEnd,i=e.onPanSessionStart,o=e.visualElement,a=(0,c.useRef)(null),s=(0,c.useContext)(v).transformPagePoint,u={onSessionStart:i,onStart:n,onMove:t,onEnd:function(e,t){a.current=null,r&&r(e,t)}};(0,c.useEffect)(function(){null!==a.current&&a.current.updateHandlers(u)}),rz(o,"pointerdown",(t||n||r||i)&&function(e){a.current=new iy(e,u,{transformPagePoint:s})}),rZ(function(){return a.current&&a.current.end()})}),drag:r8(function(e){var t=e.dragControls,n=e.visualElement,r=P(function(){return new iA(n)});(0,c.useEffect)(function(){return t&&t.subscribe(r)},[r,t]),(0,c.useEffect)(function(){return r.addListeners()},[r])})},iR=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","SetAxisTarget","Unmount"],iI=function(e){var t=e.treeType,n=void 0===t?"":t,r=e.build,i=e.getBaseTarget,o=e.makeTargetAnimatable,a=e.measureViewportBox,s=e.render,c=e.readValueFromInstance,l=e.removeValueFromRenderState,f=e.sortNodePosition,p=e.scrapeMotionValuesFromProps;return function(e,t){var d,h,v,m,y,g=e.parent,_=e.props,b=e.presenceId,w=e.blockInitialAnimation,k=e.visualState;void 0===t&&(t={});var S=!1,T=k.latestValues,P=k.renderState,A=(d=iR.map(function(){return new G}),h={},v={clearAllListeners:function(){return d.forEach(function(e){return e.clear()})},updatePropListeners:function(e){iR.forEach(function(t){var n,r="on"+t,i=e[r];null===(n=h[t])||void 0===n||n.call(h),i&&(h[t]=v[r](i))})}},d.forEach(function(e,t){v["on"+iR[t]]=function(t){return e.add(t)},v["notify"+iR[t]]=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];e.notify.apply(e,(0,u.ev)([],(0,u.CR)(t),!1))}}),v),D=new Map,C=new Map,R={},I=(0,u.pi)({},T);function F(){m&&S&&(M(),s(m,P,_.style,z.projection))}function M(){r(z,P,T,t,_)}function j(){A.notifyUpdate(T)}var N=p(_);for(var q in N){var B=N[q];void 0!==T[q]&&X(B)&&B.set(T[q],!1)}var U=x(_),Q=O(_),z=(0,u.pi)((0,u.pi)({treeType:n,current:null,depth:g?g.depth+1:0,parent:g,children:new Set,presenceId:b,variantChildren:Q?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(null==g?void 0:g.isMounted()),blockInitialAnimation:w,isMounted:function(){return Boolean(m)},mount:function(e){S=!0,m=z.current=e,z.projection&&z.projection.mount(e),Q&&g&&!U&&(y=null==g?void 0:g.addVariantChild(z)),null==g||g.children.add(z),z.setProps(_)},unmount:function(){var e;null===(e=z.projection)||void 0===e||e.unmount(),L.update(j),L.render(F),C.forEach(function(e){return e()}),null==y||y(),null==g||g.children.delete(z),A.clearAllListeners(),m=void 0,S=!1},addVariantChild:function(e){var t,n=z.getClosestVariantNode();if(n)return null===(t=n.variantChildren)||void 0===t||t.add(e),function(){return n.variantChildren.delete(e)}},sortNodePosition:function(e){return f&&n===e.treeType?f(z.getInstance(),e.getInstance()):0},getClosestVariantNode:function(){return Q?z:null==g?void 0:g.getClosestVariantNode()},getLayoutId:function(){return _.layoutId},getInstance:function(){return m},getStaticValue:function(e){return T[e]},setStaticValue:function(e,t){return T[e]=t},getLatestValues:function(){return T},setVisibility:function(e){z.isVisible!==e&&(z.isVisible=e,z.scheduleRender())},makeTargetAnimatable:function(e,t){return void 0===t&&(t=!0),o(z,e,_,t)},measureViewportBox:function(){return a(m,_)},addValue:function(e,t){var n,r;z.hasValue(e)&&z.removeValue(e),D.set(e,t),T[e]=t.get(),n=t.onChange(function(t){T[e]=t,_.onUpdate&&V.update(j,!1,!0)}),r=t.onRenderRequest(z.scheduleRender),C.set(e,function(){n(),r()})},removeValue:function(e){var t;D.delete(e),null===(t=C.get(e))||void 0===t||t(),C.delete(e),delete T[e],l(e,P)},hasValue:function(e){return D.has(e)},getValue:function(e,t){var n=D.get(e);return void 0===n&&void 0!==t&&(n=J(t),z.addValue(e,n)),n},forEachValue:function(e){return D.forEach(e)},readValue:function(e){var n;return null!==(n=T[e])&&void 0!==n?n:c(m,e,t)},setBaseTarget:function(e,t){I[e]=t},getBaseTarget:function(e){if(i){var t=i(_,e);if(void 0!==t&&!X(t))return t}return I[e]}},A),{build:function(){return M(),P},scheduleRender:function(){V.render(F,!1,!0)},syncRender:F,setProps:function(e){(e.transformTemplate||_.transformTemplate)&&z.scheduleRender(),_=e,A.updatePropListeners(e),R=function(e,t,n){var r;for(var i in t){var o=t[i],a=n[i];if(X(o))e.addValue(i,o);else if(X(a))e.addValue(i,J(o));else if(a!==o){if(e.hasValue(i)){var s=e.getValue(i);s.hasAnimated||s.set(o)}else e.addValue(i,J(null!==(r=e.getStaticValue(i))&&void 0!==r?r:o))}}for(var i in n)void 0===t[i]&&e.removeValue(i);return t}(z,p(_),R)},getProps:function(){return _},getVariant:function(e){var t;return null===(t=_.variants)||void 0===t?void 0:t[e]},getDefaultTransition:function(){return _.transition},getTransformPagePoint:function(){return _.transformPagePoint},getVariantContext:function(e){if(void 0===e&&(e=!1),e)return null==g?void 0:g.getVariantContext();if(!U){var t=(null==g?void 0:g.getVariantContext())||{};return void 0!==_.initial&&(t.initial=_.initial),t}for(var n={},r=0;r<iM;r++){var i=iF[r],o=_[i];(E(o)||!1===o)&&(n[i]=o)}return n}});return z}},iF=(0,u.ev)(["initial"],(0,u.CR)(ip),!1),iM=iF.length;function ij(e){return"string"==typeof e&&e.startsWith("var(--")}var iN=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function iV(e,t,n){void 0===n&&(n=1),K(n<=4,'Max CSS variable fallback depth detected in property "'.concat(e,'". This may indicate a circular fallback dependency.'));var r=(0,u.CR)(function(e){var t=iN.exec(e);if(!t)return[,];var n=(0,u.CR)(t,3);return[n[1],n[2]]}(e),2),i=r[0],o=r[1];if(i){var a=window.getComputedStyle(t).getPropertyValue(i);return a?a.trim():ij(o)?iV(o,t,n+1):o}}var iL=new Set(["width","height","top","left","right","bottom","x","y"]),iq=function(e){return iL.has(e)},iB=function(e,t){e.set(t,!1),e.set(t)},iU=function(e){return e===eh||e===eO};(o=s||(s={})).width="width",o.height="height",o.left="left",o.right="right",o.top="top",o.bottom="bottom";var iQ=function(e,t){return parseFloat(e.split(", ")[t])},iz=function(e,t){return function(n,r){var i=r.transform;if("none"===i||!i)return 0;var o=i.match(/^matrix3d\((.+)\)$/);if(o)return iQ(o[1],t);var a=i.match(/^matrix\((.+)\)$/);return a?iQ(a[1],e):0}},i$=new Set(["x","y","z"]),iH=nj.filter(function(e){return!i$.has(e)}),iW={width:function(e,t){var n=e.x,r=t.paddingLeft,i=t.paddingRight;return n.max-n.min-parseFloat(void 0===r?"0":r)-parseFloat(void 0===i?"0":i)},height:function(e,t){var n=e.y,r=t.paddingTop,i=t.paddingBottom;return n.max-n.min-parseFloat(void 0===r?"0":r)-parseFloat(void 0===i?"0":i)},top:function(e,t){return parseFloat(t.top)},left:function(e,t){return parseFloat(t.left)},bottom:function(e,t){var n=e.y;return parseFloat(t.top)+(n.max-n.min)},right:function(e,t){var n=e.x;return parseFloat(t.left)+(n.max-n.min)},x:iz(4,13),y:iz(5,14)},iG=function(e,t,n){var r=t.measureViewportBox(),i=t.getInstance(),o=getComputedStyle(i),a=o.display,s={};"none"===a&&t.setStaticValue("display",e.display||"block"),n.forEach(function(e){s[e]=iW[e](r,o)}),t.syncRender();var u=t.measureViewportBox();return n.forEach(function(n){iB(t.getValue(n),s[n]),e[n]=iW[n](u,o)}),e},iY=function(e,t,n,r){void 0===n&&(n={}),void 0===r&&(r={}),t=(0,u.pi)({},t),r=(0,u.pi)({},r);var i=Object.keys(t).filter(iq),o=[],a=!1,s=[];if(i.forEach(function(i){var u,c=e.getValue(i);if(e.hasValue(i)){var l=n[i],f=ia(l),p=t[i];if(tP(p)){var d=p.length,h=null===p[0]?1:0;f=ia(l=p[h]);for(var v=h;v<d;v++)u?K(ia(p[v])===u,"All keyframes must be of the same type"):K((u=ia(p[v]))===f||iU(f)&&iU(u),"Keyframes must be of the same dimension as the current value")}else u=ia(p);if(f!==u){if(iU(f)&&iU(u)){var m,y=c.get();"string"==typeof y&&c.set(parseFloat(y)),"string"==typeof p?t[i]=parseFloat(p):Array.isArray(p)&&u===eO&&(t[i]=p.map(parseFloat))}else(null==f?void 0:f.transform)&&(null==u?void 0:u.transform)&&(0===l||0===p)?0===l?c.set(u.transform(l)):t[i]=f.transform(p):(a||(m=[],iH.forEach(function(t){var n=e.getValue(t);void 0!==n&&(m.push([t,n.get()]),n.set(t.startsWith("scale")?1:0))}),m.length&&e.syncRender(),o=m,a=!0),s.push(i),r[i]=void 0!==r[i]?r[i]:t[i],iB(c,p))}}}),!s.length)return{target:t,transitionEnd:r};var c=iG(t,e,s);return o.length&&o.forEach(function(t){var n=(0,u.CR)(t,2),r=n[0],i=n[1];e.getValue(r).set(i)}),e.syncRender(),{target:c,transitionEnd:r}},iJ=function(e,t,n,r){var i,o,a=function(e,t,n){var r,i=(0,u._T)(t,[]),o=e.getInstance();if(!(o instanceof Element))return{target:i,transitionEnd:n};for(var a in n&&(n=(0,u.pi)({},n)),e.forEachValue(function(e){var t=e.get();if(ij(t)){var n=iV(t,o);n&&e.set(n)}}),i){var s=i[a];if(ij(s)){var c=iV(s,o);c&&(i[a]=c,n&&(null!==(r=n[a])&&void 0!==r||(n[a]=s)))}}return{target:i,transitionEnd:n}}(e,t,r);return t=a.target,r=a.transitionEnd,i=t,o=r,Object.keys(i).some(iq)?iY(e,i,n,o):{target:i,transitionEnd:o}},iX={treeType:"dom",readValueFromInstance:function(e,t){if(nL(t)){var n=tU(t);return n&&n.default||0}var r=window.getComputedStyle(e);return(rs(t)?r.getPropertyValue(t):r[t])||0},sortNodePosition:function(e,t){return 2&e.compareDocumentPosition(t)?1:-1},getBaseTarget:function(e,t){var n;return null===(n=e.style)||void 0===n?void 0:n[t]},measureViewportBox:function(e,t){return iT(e,t.transformPagePoint)},resetTransform:function(e,t,n){var r=n.transformTemplate;t.style.transform=r?r({},""):"none",e.scheduleRender()},restoreTransform:function(e,t){e.style.transform=t.style.transform},removeValueFromRenderState:function(e,t){var n=t.vars,r=t.style;delete n[e],delete r[e]},makeTargetAnimatable:function(e,t,n,r){var i=n.transformValues;void 0===r&&(r=!0);var o=t.transition,a=t.transitionEnd,s=(0,u._T)(t,["transition","transitionEnd"]),c=function(e,t,n){var r,i,o={};for(var a in e)o[a]=null!==(r=function(e,t){if(t)return(t[e]||t.default||t).from}(a,t))&&void 0!==r?r:null===(i=n.getValue(a))||void 0===i?void 0:i.get();return o}(s,o||{},e);if(i&&(a&&(a=i(a)),s&&(s=i(s)),c&&(c=i(c))),r){!function(e,t,n){var r,i,o,a,s=Object.keys(t).filter(function(t){return!e.hasValue(t)}),u=s.length;if(u)for(var c=0;c<u;c++){var l,f,p,d=s[c],h=t[d],v=null;Array.isArray(h)&&(v=h[0]),null===v&&(v=null!==(i=null!==(r=n[d])&&void 0!==r?r:e.readValue(d))&&void 0!==i?i:t[d]),null!=v&&("string"==typeof v&&(l=v,/^\-?\d*\.?\d+$/.test(l)||(f=v,/^0[^.\s]+$/.test(f)))?v=parseFloat(v):(p=v,!is.find(ii(p))&&e$.test(h)&&(v=tQ(d,h))),e.addValue(d,J(v)),null!==(o=(a=n)[d])&&void 0!==o||(a[d]=v),e.setBaseTarget(d,v))}}(e,s,c);var l=iJ(e,s,c,a);a=l.transitionEnd,s=l.target}return(0,u.pi)({transition:o,transitionEnd:a},s)},scrapeMotionValuesFromProps:rT,build:function(e,t,n,r,i){void 0!==e.isVisible&&(t.style.visibility=e.isVisible?"visible":"hidden"),ru(t,n,r,i.transformTemplate)},render:rS},iZ=iI(iX),iK=iI((0,u.pi)((0,u.pi)({},iX),{getBaseTarget:function(e,t){return e[t]},readValueFromInstance:function(e,t){var n;return nL(t)?(null===(n=tU(t))||void 0===n?void 0:n.default)||0:(t=rx.has(t)?t:rk(t),e.getAttribute(t))},scrapeMotionValuesFromProps:rP,build:function(e,t,n,r,i){r_(t,n,r,i.transformTemplate)},render:rO})),i0=function(e,t){return ri(e)?iK(t,{enableHardwareAcceleration:!1}):iZ(t,{enableHardwareAcceleration:!0})};function i1(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var i2={correct:function(e,t){if(!t.target)return e;if("string"==typeof e){if(!eO.test(e))return e;e=parseFloat(e)}var n=i1(e,t.target.x),r=i1(e,t.target.y);return"".concat(n,"% ").concat(r,"%")}},i3="_$css",i5=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,u.ZT)(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.visualElement,r=t.layoutGroup,i=t.switchLayoutGroup,o=t.layoutId,a=n.projection;Object.assign(nR,i6),a&&((null==r?void 0:r.group)&&r.group.add(a),(null==i?void 0:i.register)&&o&&i.register(a),a.root.didUpdate(),a.addEventListener("animationComplete",function(){e.safeToRemove()}),a.setOptions((0,u.pi)((0,u.pi)({},a.options),{onExitComplete:function(){return e.safeToRemove()}}))),nz.hasEverUpdated=!0},t.prototype.getSnapshotBeforeUpdate=function(e){var t=this,n=this.props,r=n.layoutDependency,i=n.visualElement,o=n.drag,a=n.isPresent,s=i.projection;return s&&(s.isPresent=a,o||e.layoutDependency!==r||void 0===r?s.willUpdate():this.safeToRemove(),e.isPresent===a||(a?s.promote():s.relegate()||V.postRender(function(){var e;(null===(e=s.getStack())||void 0===e?void 0:e.members.length)||t.safeToRemove()}))),null},t.prototype.componentDidUpdate=function(){var e=this.props.visualElement.projection;e&&(e.root.didUpdate(),!e.currentAnimation&&e.isLead()&&this.safeToRemove())},t.prototype.componentWillUnmount=function(){var e=this.props,t=e.visualElement,n=e.layoutGroup,r=e.switchLayoutGroup,i=t.projection;i&&(i.scheduleCheckAfterUnmount(),(null==n?void 0:n.group)&&n.group.remove(i),(null==r?void 0:r.deregister)&&r.deregister(i))},t.prototype.safeToRemove=function(){var e=this.props.safeToRemove;null==e||e()},t.prototype.render=function(){return null},t}(c.Component),i6={borderRadius:(0,u.pi)((0,u.pi)({},i2),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:i2,borderTopRightRadius:i2,borderBottomLeftRadius:i2,borderBottomRightRadius:i2,boxShadow:{correct:function(e,t){var n=t.treeScale,r=t.projectionDelta,i=e,o=e.includes("var("),a=[];o&&(e=e.replace(iN,function(e){return a.push(e),i3}));var s=e$.parse(e);if(s.length>5)return i;var u=e$.createTransformer(e),c="number"!=typeof s[0]?1:0,l=r.x.scale*n.x,f=r.y.scale*n.y;s[0+c]/=l,s[1+c]/=f;var p=$(l,f,.5);"number"==typeof s[2+c]&&(s[2+c]/=p),"number"==typeof s[3+c]&&(s[3+c]/=p);var d=u(s);if(o){var h=0;d=d.replace(i3,function(){var e=a[h];return h++,e})}return d}}},i8=n$({attachResizeListener:function(e,t){return e.addEventListener("resize",t,{passive:!0}),function(){return e.removeEventListener("resize",t)}},measureScroll:function(){return{x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}}}),i4={current:void 0},i9=n$({measureScroll:function(e){return{x:e.scrollLeft,y:e.scrollTop}},defaultParent:function(){if(!i4.current){var e=new i8(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),i4.current=e}return i4.current},resetTransform:function(e,t){e.style.transform=null!=t?t:"none"}}),i7=(0,u.pi)((0,u.pi)((0,u.pi)((0,u.pi)({},im),r4),iC),{measureLayout:function(e){var t=(0,u.CR)(r9(),2),n=t[0],r=t[1],i=(0,c.useContext)(re);return c.createElement(i5,(0,u.pi)({},e,{layoutGroup:i,switchLayoutGroup:(0,c.useContext)(rt),isPresent:n,safeToRemove:r}))}}),oe=function(e){function t(t,n){var r,i,o,a,s,l,w;return void 0===n&&(n={}),i=(r=e(t,n)).preloadedFeatures,o=r.createVisualElement,a=r.projectionNodeConstructor,s=r.useRender,l=r.useVisualState,w=r.Component,i&&function(e){for(var t in e)null!==e[t]&&("projectionNodeConstructor"===t?f.projectionNodeConstructor=e[t]:f[t].Component=e[t])}(i),(0,c.forwardRef)(function(e,t){var n,r,i,k,S,O,A,D,C,R,I,F,M,j,N,V,L,q,B,U,Q,z,$,H,W,G=(F=e.layoutId,(M=null===(I=(0,c.useContext)(re))||void 0===I?void 0:I.id)&&void 0!==F?M+"-"+F:F);e=(0,u.pi)((0,u.pi)({},e),{layoutId:G});var Y=(0,c.useContext)(v),J=null,X=(N=(j=function(e,t){if(x(e)){var n=e.initial,r=e.animate;return{initial:!1===n||E(n)?n:void 0,animate:E(r)?r:void 0}}return!1!==e.inherit?t:{}}(e,(0,c.useContext)(m))).initial,V=j.animate,(0,c.useMemo)(function(){return{initial:N,animate:V}},[T(N),T(V)])),Z=Y.isStatic?void 0:P(function(){if(nz.hasEverUpdated)return n7++}),K=l(e,Y.isStatic);return!Y.isStatic&&g&&(X.visualElement=(L=(0,u.pi)((0,u.pi)({},Y),e),q=o,B=(0,c.useContext)(p),U=(0,c.useContext)(m).visualElement,Q=(0,c.useContext)(y),z=(0,c.useRef)(void 0),q||(q=B.renderer),!z.current&&q&&(z.current=q(w,{visualState:K,parent:U,props:L,presenceId:null==Q?void 0:Q.id,blockInitialAnimation:(null==Q?void 0:Q.initial)===!1})),$=z.current,_(function(){null==$||$.syncRender()}),(0,c.useEffect)(function(){var e;null===(e=null==$?void 0:$.animationState)||void 0===e||e.animateChanges()}),_(function(){return function(){return null==$?void 0:$.notifyUnmount()}},[]),$),n=e,r=X.visualElement,i=a||f.projectionNodeConstructor,S=n.layoutId,O=n.layout,A=n.drag,D=n.dragConstraints,C=n.layoutScroll,R=(0,c.useContext)(rt),!i||!r||(null==r?void 0:r.projection)||(r.projection=new i(Z,r.getLatestValues(),null===(k=r.parent)||void 0===k?void 0:k.projection),r.projection.setOptions({layoutId:S,layout:O,alwaysMeasureLayout:Boolean(A)||D&&b(D),visualElement:r,scheduleRender:function(){return r.scheduleRender()},animationType:"string"==typeof O?O:"both",initialPromotionConfig:R,layoutScroll:C})),J=function(e,t,n){var r=[];if((0,c.useContext)(p),!t)return null;for(var i=0;i<h;i++){var o=d[i],a=f[o],s=a.isEnabled,l=a.Component;s(e)&&l&&r.push(c.createElement(l,(0,u.pi)({key:o},e,{visualElement:t})))}return r}(e,X.visualElement,0)),c.createElement(rn,{visualElement:X.visualElement,props:(0,u.pi)((0,u.pi)({},Y),e)},J,c.createElement(m.Provider,{value:X},s(w,e,Z,(H=X.visualElement,W=t,(0,c.useCallback)(function(e){var t;e&&(null===(t=K.mount)||void 0===t||t.call(K,e)),H&&(e?H.mount(e):H.unmount()),W&&("function"==typeof W?W(e):b(W)&&(W.current=e))},[H])),K,Y.isStatic,X.visualElement)))})}if("undefined"==typeof Proxy)return t;var n=new Map;return new Proxy(t,{get:function(e,r){return n.has(r)||n.set(r,t(r)),n.get(r)}})}(function(e,t){var n,r,i;return n=t.forwardMotionProps,r=ri(e)?rR:rI,(0,u.pi)((0,u.pi)({},r),{preloadedFeatures:i7,useRender:(void 0===(i=void 0!==n&&n)&&(i=!1),function(e,t,n,r,o,a){var s=o.latestValues,l=(ri(e)?rw:rf)(t,s,a),f=function(e,t,n){var r={};for(var i in e)(rh(i)||!0===n&&rd(i)||!t&&!rd(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}(t,"string"==typeof e,i),p=(0,u.pi)((0,u.pi)((0,u.pi)({},f),l),{ref:r});return n&&(p["data-projection-id"]=n),(0,c.createElement)(e,p)}),createVisualElement:i0,projectionNodeConstructor:i9,Component:e})})}},function(e){var t=function(t){return e(e.s=t)};e.O(0,[774,179],function(){return t(6840),t(880)}),_N_E=e.O()}]);