@tryghost/portal 2.53.0 → 2.53.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/umd/portal.min.js +19 -19
- package/umd/portal.min.js.map +1 -1
package/umd/portal.min.js
CHANGED
|
@@ -23,7 +23,7 @@ object-assign
|
|
|
23
23
|
*
|
|
24
24
|
* This source code is licensed under the MIT license found in the
|
|
25
25
|
* LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/(function(e){var t,a,n,i;if(typeof performance=="object"&&typeof performance.now=="function"){var r=performance;e.unstable_now=function(){return r.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}if(typeof window>"u"||typeof MessageChannel!="function"){var l=null,c=null,d=function(){if(l!==null)try{var T=e.unstable_now();l(!0,T),l=null}catch(F){throw setTimeout(d,0),F}};t=function(T){l!==null?setTimeout(t,0,T):(l=T,setTimeout(d,0))},a=function(T,F){c=setTimeout(T,F)},n=function(){clearTimeout(c)},e.unstable_shouldYield=function(){return!1},i=e.unstable_forceFrameRate=function(){}}else{var p=window.setTimeout,m=window.clearTimeout;if(typeof console<"u"){var
|
|
26
|
+
*/(function(e){var t,a,n,i;if(typeof performance=="object"&&typeof performance.now=="function"){var r=performance;e.unstable_now=function(){return r.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}if(typeof window>"u"||typeof MessageChannel!="function"){var l=null,c=null,d=function(){if(l!==null)try{var T=e.unstable_now();l(!0,T),l=null}catch(F){throw setTimeout(d,0),F}};t=function(T){l!==null?setTimeout(t,0,T):(l=T,setTimeout(d,0))},a=function(T,F){c=setTimeout(T,F)},n=function(){clearTimeout(c)},e.unstable_shouldYield=function(){return!1},i=e.unstable_forceFrameRate=function(){}}else{var p=window.setTimeout,m=window.clearTimeout;if(typeof console<"u"){var g=window.cancelAnimationFrame;typeof window.requestAnimationFrame!="function"&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),typeof g!="function"&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var b=!1,v=null,f=-1,h=5,y=0;e.unstable_shouldYield=function(){return e.unstable_now()>=y},i=function(){},e.unstable_forceFrameRate=function(T){0>T||125<T?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):h=0<T?Math.floor(1e3/T):5};var w=new MessageChannel,S=w.port2;w.port1.onmessage=function(){if(v!==null){var T=e.unstable_now();y=T+h;try{v(!0,T)?S.postMessage(null):(b=!1,v=null)}catch(F){throw S.postMessage(null),F}}else b=!1},t=function(T){v=T,b||(b=!0,S.postMessage(null))},a=function(T,F){f=p(function(){T(e.unstable_now())},F)},n=function(){m(f),f=-1}}function j(T,F){var _=T.length;T.push(F);e:for(;;){var te=_-1>>>1,be=T[te];if(be!==void 0&&0<z(be,F))T[te]=F,T[_]=be,_=te;else break e}}function x(T){return T=T[0],T===void 0?null:T}function C(T){var F=T[0];if(F!==void 0){var _=T.pop();if(_!==F){T[0]=_;e:for(var te=0,be=T.length;te<be;){var Ca=2*(te+1)-1,ja=T[Ca],Vi=Ca+1,En=T[Vi];if(ja!==void 0&&0>z(ja,_))En!==void 0&&0>z(En,ja)?(T[te]=En,T[Vi]=_,te=Vi):(T[te]=ja,T[Ca]=_,te=Ca);else if(En!==void 0&&0>z(En,_))T[te]=En,T[Vi]=_,te=Vi;else break e}}return F}return null}function z(T,F){var _=T.sortIndex-F.sortIndex;return _!==0?_:T.id-F.id}var E=[],M=[],K=1,ge=null,ne=3,mt=!1,_e=!1,pt=!1;function xn(T){for(var F=x(M);F!==null;){if(F.callback===null)C(M);else if(F.startTime<=T)C(M),F.sortIndex=F.expirationTime,j(E,F);else break;F=x(M)}}function fe(T){if(pt=!1,xn(T),!_e)if(x(E)!==null)_e=!0,t(Qe);else{var F=x(M);F!==null&&a(fe,F.startTime-T)}}function Qe(T,F){_e=!1,pt&&(pt=!1,n()),mt=!0;var _=ne;try{for(xn(F),ge=x(E);ge!==null&&(!(ge.expirationTime>F)||T&&!e.unstable_shouldYield());){var te=ge.callback;if(typeof te=="function"){ge.callback=null,ne=ge.priorityLevel;var be=te(ge.expirationTime<=F);F=e.unstable_now(),typeof be=="function"?ge.callback=be:ge===x(E)&&C(E),xn(F)}else C(E);ge=x(E)}if(ge!==null)var Ca=!0;else{var ja=x(M);ja!==null&&a(fe,ja.startTime-F),Ca=!1}return Ca}finally{ge=null,ne=_,mt=!1}}var Ea=i;e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(T){T.callback=null},e.unstable_continueExecution=function(){_e||mt||(_e=!0,t(Qe))},e.unstable_getCurrentPriorityLevel=function(){return ne},e.unstable_getFirstCallbackNode=function(){return x(E)},e.unstable_next=function(T){switch(ne){case 1:case 2:case 3:var F=3;break;default:F=ne}var _=ne;ne=F;try{return T()}finally{ne=_}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=Ea,e.unstable_runWithPriority=function(T,F){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var _=ne;ne=T;try{return F()}finally{ne=_}},e.unstable_scheduleCallback=function(T,F,_){var te=e.unstable_now();switch(typeof _=="object"&&_!==null?(_=_.delay,_=typeof _=="number"&&0<_?te+_:te):_=te,T){case 1:var be=-1;break;case 2:be=250;break;case 5:be=1073741823;break;case 4:be=1e4;break;default:be=5e3}return be=_+be,T={id:K++,callback:F,priorityLevel:T,startTime:_,expirationTime:be,sortIndex:-1},_>te?(T.sortIndex=_,j(M,T),x(E)===null&&T===x(M)&&(pt?n():pt=!0,a(fe,_-te))):(T.sortIndex=be,j(E,T),_e||mt||(_e=!0,t(Qe))),T},e.unstable_wrapCallback=function(T){var F=ne;return function(){var _=ne;ne=F;try{return T.apply(this,arguments)}finally{ne=_}}}})(Hc),Vc.exports=Hc;var nb=Vc.exports;/** @license React v17.0.2
|
|
27
27
|
* react-dom.production.min.js
|
|
28
28
|
*
|
|
29
29
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -34,22 +34,22 @@ object-assign
|
|
|
34
34
|
`+bs+e}var ys=!1;function Zi(e,t){if(!e||ys)return"";ys=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(l){var n=l}Reflect.construct(e,[],t)}else{try{t.call()}catch(l){n=l}e.call(t.prototype)}else{try{throw Error()}catch(l){n=l}e()}}catch(l){if(l&&n&&typeof l.stack=="string"){for(var i=l.stack.split(`
|
|
35
35
|
`),r=n.stack.split(`
|
|
36
36
|
`),o=i.length-1,s=r.length-1;1<=o&&0<=s&&i[o]!==r[s];)s--;for(;1<=o&&0<=s;o--,s--)if(i[o]!==r[s]){if(o!==1||s!==1)do if(o--,s--,0>s||i[o]!==r[s])return`
|
|
37
|
-
`+i[o].replace(" at new "," at ");while(1<=o&&0<=s);break}}}finally{ys=!1,Error.prepareStackTrace=a}return(e=e?e.displayName||e.name:"")?Nn(e):""}function lb(e){switch(e.tag){case 5:return Nn(e.type);case 16:return Nn("Lazy");case 13:return Nn("Suspense");case 19:return Nn("SuspenseList");case 0:case 2:case 15:return e=Zi(e.type,!1),e;case 11:return e=Zi(e.type.render,!1),e;case 22:return e=Zi(e.type._render,!1),e;case 1:return e=Zi(e.type,!0),e;default:return""}}function za(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Tt:return"Fragment";case ta:return"Portal";case Tn:return"Profiler";case us:return"StrictMode";case Pn:return"Suspense";case qi:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ds:return(e.displayName||"Context")+".Consumer";case cs:return(e._context.displayName||"Context")+".Provider";case Gi:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case Ji:return za(e.type);case ps:return za(e._render);case ms:t=e._payload,e=e._init;try{return za(e(t))}catch{}}return null}function Pt(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function Qc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ub(e){var t=Qc(e)?"checked":"value",a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var i=a.get,r=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){n=""+o,r.call(this,o)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Qi(e){e._valueTracker||(e._valueTracker=ub(e))}function Xc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),n="";return e&&(n=Qc(e)?e.checked?"true":"false":e.value),e=n,e!==a?(t.setValue(e),!0):!1}function Xi(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function ks(e,t){var a=t.checked;return G({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:a??e._wrapperState.initialChecked})}function ed(e,t){var a=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;a=Pt(t.value!=null?t.value:a),e._wrapperState={initialChecked:n,initialValue:a,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function td(e,t){t=t.checked,t!=null&&ls(e,"checked",t,!1)}function vs(e,t){td(e,t);var a=Pt(t.value),n=t.type;if(a!=null)n==="number"?(a===0&&e.value===""||e.value!=a)&&(e.value=""+a):e.value!==""+a&&(e.value=""+a);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ws(e,t.type,a):t.hasOwnProperty("defaultValue")&&ws(e,t.type,Pt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function ad(e,t,a){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,a||t===e.value||(e.value=t),e.defaultValue=t}a=e.name,a!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,a!==""&&(e.name=a)}function ws(e,t,a){(t!=="number"||Xi(e.ownerDocument)!==e)&&(a==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+a&&(e.defaultValue=""+a))}function cb(e){var t="";return Ki.Children.forEach(e,function(a){a!=null&&(t+=a)}),t}function Ss(e,t){return e=G({children:void 0},t),(t=cb(t.children))&&(e.children=t),e}function Na(e,t,a,n){if(e=e.options,t){t={};for(var i=0;i<a.length;i++)t["$"+a[i]]=!0;for(a=0;a<e.length;a++)i=t.hasOwnProperty("$"+e[a].value),e[a].selected!==i&&(e[a].selected=i),i&&n&&(e[a].defaultSelected=!0)}else{for(a=""+Pt(a),t=null,i=0;i<e.length;i++){if(e[i].value===a){e[i].selected=!0,n&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function xs(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error($(91));return G({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function nd(e,t){var a=t.value;if(a==null){if(a=t.children,t=t.defaultValue,a!=null){if(t!=null)throw Error($(92));if(Array.isArray(a)){if(!(1>=a.length))throw Error($(93));a=a[0]}t=a}t==null&&(t=""),a=t}e._wrapperState={initialValue:Pt(a)}}function id(e,t){var a=Pt(t.value),n=Pt(t.defaultValue);a!=null&&(a=""+a,a!==e.value&&(e.value=a),t.defaultValue==null&&e.defaultValue!==a&&(e.defaultValue=a)),n!=null&&(e.defaultValue=""+n)}function rd(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}var Es={html:"http://www.w3.org/1999/xhtml",svg:"http://www.w3.org/2000/svg"};function od(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Cs(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?od(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var er,sd=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,a,n,i){MSApp.execUnsafeLocalFunction(function(){return e(t,a,n,i)})}:e}(function(e,t){if(e.namespaceURI!==Es.svg||"innerHTML"in e)e.innerHTML=t;else{for(er=er||document.createElement("div"),er.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=er.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function An(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var In={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},db=["Webkit","ms","Moz","O"];Object.keys(In).forEach(function(e){db.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),In[t]=In[e]})});function ld(e,t,a){return t==null||typeof t=="boolean"||t===""?"":a||typeof t!="number"||t===0||In.hasOwnProperty(e)&&In[e]?(""+t).trim():t+"px"}function ud(e,t){e=e.style;for(var a in t)if(t.hasOwnProperty(a)){var n=a.indexOf("--")===0,i=ld(a,t[a],n);a==="float"&&(a="cssFloat"),n?e.setProperty(a,i):e[a]=i}}var mb=G({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function js(e,t){if(t){if(mb[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error($(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error($(60));if(!(typeof t.dangerouslySetInnerHTML=="object"&&"__html"in t.dangerouslySetInnerHTML))throw Error($(61))}if(t.style!=null&&typeof t.style!="object")throw Error($(62))}}function $s(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function Ts(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ps=null,Aa=null,Ia=null;function cd(e){if(e=Qn(e)){if(typeof Ps!="function")throw Error($(280));var t=e.stateNode;t&&(t=yr(t),Ps(e.stateNode,e.type,t))}}function dd(e){Aa?Ia?Ia.push(e):Ia=[e]:Aa=e}function md(){if(Aa){var e=Aa,t=Ia;if(Ia=Aa=null,cd(e),t)for(e=0;e<t.length;e++)cd(t[e])}}function zs(e,t){return e(t)}function pd(e,t,a,n,i){return e(t,a,n,i)}function Ns(){}var hd=zs,aa=!1,As=!1;function Is(){(Aa!==null||Ia!==null)&&(Ns(),md())}function pb(e,t,a){if(As)return e(t,a);As=!0;try{return hd(e,t,a)}finally{As=!1,Is()}}function Dn(e,t){var a=e.stateNode;if(a===null)return null;var n=yr(a);if(n===null)return null;a=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error($(231,t,typeof a));return a}var Ds=!1;if(gt)try{var Fn={};Object.defineProperty(Fn,"passive",{get:function(){Ds=!0}}),window.addEventListener("test",Fn,Fn),window.removeEventListener("test",Fn,Fn)}catch{Ds=!1}function hb(e,t,a,n,i,r,o,s,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(a,c)}catch(d){this.onError(d)}}var Mn=!1,tr=null,ar=!1,Fs=null,gb={onError:function(e){Mn=!0,tr=e}};function fb(e,t,a,n,i,r,o,s,l){Mn=!1,tr=null,hb.apply(gb,arguments)}function bb(e,t,a,n,i,r,o,s,l){if(fb.apply(this,arguments),Mn){if(Mn){var c=tr;Mn=!1,tr=null}else throw Error($(198));ar||(ar=!0,Fs=c)}}function na(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&1026&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function gd(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function fd(e){if(na(e)!==e)throw Error($(188))}function yb(e){var t=e.alternate;if(!t){if(t=na(e),t===null)throw Error($(188));return t!==e?null:e}for(var a=e,n=t;;){var i=a.return;if(i===null)break;var r=i.alternate;if(r===null){if(n=i.return,n!==null){a=n;continue}break}if(i.child===r.child){for(r=i.child;r;){if(r===a)return fd(i),e;if(r===n)return fd(i),t;r=r.sibling}throw Error($(188))}if(a.return!==n.return)a=i,n=r;else{for(var o=!1,s=i.child;s;){if(s===a){o=!0,a=i,n=r;break}if(s===n){o=!0,n=i,a=r;break}s=s.sibling}if(!o){for(s=r.child;s;){if(s===a){o=!0,a=r,n=i;break}if(s===n){o=!0,n=r,a=i;break}s=s.sibling}if(!o)throw Error($(189))}}if(a.alternate!==n)throw Error($(190))}if(a.tag!==3)throw Error($(188));return a.stateNode.current===a?e:t}function bd(e){if(e=yb(e),!e)return null;for(var t=e;;){if(t.tag===5||t.tag===6)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function yd(e,t){for(var a=e.alternate;t!==null;){if(t===e||t===a)return!0;t=t.return}return!1}var kd,Ms,vd,wd,_s=!1,tt=[],zt=null,Nt=null,At=null,_n=new Map,Yn=new Map,Rn=[],Sd="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Ys(e,t,a,n,i){return{blockedOn:e,domEventName:t,eventSystemFlags:a|16,nativeEvent:i,targetContainers:[n]}}function xd(e,t){switch(e){case"focusin":case"focusout":zt=null;break;case"dragenter":case"dragleave":Nt=null;break;case"mouseover":case"mouseout":At=null;break;case"pointerover":case"pointerout":_n.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Yn.delete(t.pointerId)}}function Un(e,t,a,n,i,r){return e===null||e.nativeEvent!==r?(e=Ys(t,a,n,i,r),t!==null&&(t=Qn(t),t!==null&&Ms(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function kb(e,t,a,n,i){switch(t){case"focusin":return zt=Un(zt,e,t,a,n,i),!0;case"dragenter":return Nt=Un(Nt,e,t,a,n,i),!0;case"mouseover":return At=Un(At,e,t,a,n,i),!0;case"pointerover":var r=i.pointerId;return _n.set(r,Un(_n.get(r)||null,e,t,a,n,i)),!0;case"gotpointercapture":return r=i.pointerId,Yn.set(r,Un(Yn.get(r)||null,e,t,a,n,i)),!0}return!1}function vb(e){var t=ia(e.target);if(t!==null){var a=na(t);if(a!==null){if(t=a.tag,t===13){if(t=gd(a),t!==null){e.blockedOn=t,wd(e.lanePriority,function(){oe.unstable_runWithPriority(e.priority,function(){vd(a)})});return}}else if(t===3&&a.stateNode.hydrate){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function nr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=Vs(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(a!==null)return t=Qn(a),t!==null&&Ms(t),e.blockedOn=a,!1;t.shift()}return!0}function Ed(e,t,a){nr(e)&&a.delete(t)}function wb(){for(_s=!1;0<tt.length;){var e=tt[0];if(e.blockedOn!==null){e=Qn(e.blockedOn),e!==null&&kd(e);break}for(var t=e.targetContainers;0<t.length;){var a=Vs(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(a!==null){e.blockedOn=a;break}t.shift()}e.blockedOn===null&&tt.shift()}zt!==null&&nr(zt)&&(zt=null),Nt!==null&&nr(Nt)&&(Nt=null),At!==null&&nr(At)&&(At=null),_n.forEach(Ed),Yn.forEach(Ed)}function Ln(e,t){e.blockedOn===t&&(e.blockedOn=null,_s||(_s=!0,oe.unstable_scheduleCallback(oe.unstable_NormalPriority,wb)))}function Cd(e){function t(i){return Ln(i,e)}if(0<tt.length){Ln(tt[0],e);for(var a=1;a<tt.length;a++){var n=tt[a];n.blockedOn===e&&(n.blockedOn=null)}}for(zt!==null&&Ln(zt,e),Nt!==null&&Ln(Nt,e),At!==null&&Ln(At,e),_n.forEach(t),Yn.forEach(t),a=0;a<Rn.length;a++)n=Rn[a],n.blockedOn===e&&(n.blockedOn=null);for(;0<Rn.length&&(a=Rn[0],a.blockedOn===null);)vb(a),a.blockedOn===null&&Rn.shift()}function ir(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var Da={animationend:ir("Animation","AnimationEnd"),animationiteration:ir("Animation","AnimationIteration"),animationstart:ir("Animation","AnimationStart"),transitionend:ir("Transition","TransitionEnd")},Rs={},jd={};gt&&(jd=document.createElement("div").style,"AnimationEvent"in window||(delete Da.animationend.animation,delete Da.animationiteration.animation,delete Da.animationstart.animation),"TransitionEvent"in window||delete Da.transitionend.transition);function rr(e){if(Rs[e])return Rs[e];if(!Da[e])return e;var t=Da[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in jd)return Rs[e]=t[a];return e}var $d=rr("animationend"),Td=rr("animationiteration"),Pd=rr("animationstart"),zd=rr("transitionend"),Nd=new Map,Us=new Map,Sb=["abort","abort",$d,"animationEnd",Td,"animationIteration",Pd,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",zd,"transitionEnd","waiting","waiting"];function Ls(e,t){for(var a=0;a<e.length;a+=2){var n=e[a],i=e[a+1];i="on"+(i[0].toUpperCase()+i.slice(1)),Us.set(n,t),Nd.set(n,i),Xt(i,[n])}}var xb=oe.unstable_now;xb();var O=8;function Fa(e){if(1&e)return O=15,1;if(2&e)return O=14,2;if(4&e)return O=13,4;var t=24&e;return t!==0?(O=12,t):e&32?(O=11,32):(t=192&e,t!==0?(O=10,t):e&256?(O=9,256):(t=3584&e,t!==0?(O=8,t):e&4096?(O=7,4096):(t=4186112&e,t!==0?(O=6,t):(t=62914560&e,t!==0?(O=5,t):e&67108864?(O=4,67108864):e&134217728?(O=3,134217728):(t=805306368&e,t!==0?(O=2,t):1073741824&e?(O=1,1073741824):(O=8,e))))))}function Eb(e){switch(e){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}function Cb(e){switch(e){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error($(358,e))}}function Bn(e,t){var a=e.pendingLanes;if(a===0)return O=0;var n=0,i=0,r=e.expiredLanes,o=e.suspendedLanes,s=e.pingedLanes;if(r!==0)n=r,i=O=15;else if(r=a&134217727,r!==0){var l=r&~o;l!==0?(n=Fa(l),i=O):(s&=r,s!==0&&(n=Fa(s),i=O))}else r=a&~o,r!==0?(n=Fa(r),i=O):s!==0&&(n=Fa(s),i=O);if(n===0)return 0;if(n=31-It(n),n=a&((0>n?0:1<<n)<<1)-1,t!==0&&t!==n&&!(t&o)){if(Fa(t),i<=O)return t;O=i}if(t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)a=31-It(t),i=1<<a,n|=e[a],t&=~i;return n}function Ad(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function or(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return e=Ma(24&~t),e===0?or(10,t):e;case 10:return e=Ma(192&~t),e===0?or(8,t):e;case 8:return e=Ma(3584&~t),e===0&&(e=Ma(4186112&~t),e===0&&(e=512)),e;case 2:return t=Ma(805306368&~t),t===0&&(t=268435456),t}throw Error($(358,e))}function Ma(e){return e&-e}function Bs(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function sr(e,t,a){e.pendingLanes|=t;var n=t-1;e.suspendedLanes&=n,e.pingedLanes&=n,e=e.eventTimes,t=31-It(t),e[t]=a}var It=Math.clz32?Math.clz32:Tb,jb=Math.log,$b=Math.LN2;function Tb(e){return e===0?32:31-(jb(e)/$b|0)|0}var Pb=oe.unstable_UserBlockingPriority,zb=oe.unstable_runWithPriority,lr=!0;function Nb(e,t,a,n){aa||Ns();var i=Os,r=aa;aa=!0;try{pd(i,e,t,a,n)}finally{(aa=r)||Is()}}function Ab(e,t,a,n){zb(Pb,Os.bind(null,e,t,a,n))}function Os(e,t,a,n){if(lr){var i;if((i=(t&4)===0)&&0<tt.length&&-1<Sd.indexOf(e))e=Ys(null,e,t,a,n),tt.push(e);else{var r=Vs(e,t,a,n);if(r===null)i&&xd(e,n);else{if(i){if(-1<Sd.indexOf(e)){e=Ys(r,e,t,a,n),tt.push(e);return}if(kb(r,e,t,a,n))return;xd(e,n)}sm(e,t,n,null,a)}}}}function Vs(e,t,a,n){var i=Ts(n);if(i=ia(i),i!==null){var r=na(i);if(r===null)i=null;else{var o=r.tag;if(o===13){if(i=gd(r),i!==null)return i;i=null}else if(o===3){if(r.stateNode.hydrate)return r.tag===3?r.stateNode.containerInfo:null;i=null}else r!==i&&(i=null)}}return sm(e,t,n,i,a),null}var Dt=null,Hs=null,ur=null;function Id(){if(ur)return ur;var e,t=Hs,a=t.length,n,i="value"in Dt?Dt.value:Dt.textContent,r=i.length;for(e=0;e<a&&t[e]===i[e];e++);var o=a-e;for(n=1;n<=o&&t[a-n]===i[r-n];n++);return ur=i.slice(e,1<n?1-n:void 0)}function cr(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function dr(){return!0}function Dd(){return!1}function Ae(e){function t(a,n,i,r,o){this._reactName=a,this._targetInst=i,this.type=n,this.nativeEvent=r,this.target=o,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(a=e[s],this[s]=a?a(r):r[s]);return this.isDefaultPrevented=(r.defaultPrevented!=null?r.defaultPrevented:r.returnValue===!1)?dr:Dd,this.isPropagationStopped=Dd,this}return G(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=dr)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=dr)},persist:function(){},isPersistent:dr}),t}var _a={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ws=Ae(_a),On=G({},_a,{view:0,detail:0}),Ib=Ae(On),Ks,Gs,Vn,mr=G({},On,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Js,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Vn&&(Vn&&e.type==="mousemove"?(Ks=e.screenX-Vn.screenX,Gs=e.screenY-Vn.screenY):Gs=Ks=0,Vn=e),Ks)},movementY:function(e){return"movementY"in e?e.movementY:Gs}}),Fd=Ae(mr),Db=G({},mr,{dataTransfer:0}),Fb=Ae(Db),Mb=G({},On,{relatedTarget:0}),qs=Ae(Mb),_b=G({},_a,{animationName:0,elapsedTime:0,pseudoElement:0}),Yb=Ae(_b),Rb=G({},_a,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Ub=Ae(Rb),Lb=G({},_a,{data:0}),Md=Ae(Lb),Bb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ob={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Vb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Hb(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Vb[e])?!!t[e]:!1}function Js(){return Hb}var Wb=G({},On,{key:function(e){if(e.key){var t=Bb[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=cr(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Ob[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Js,charCode:function(e){return e.type==="keypress"?cr(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?cr(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Kb=Ae(Wb),Gb=G({},mr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),_d=Ae(Gb),qb=G({},On,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Js}),Jb=Ae(qb),Zb=G({},_a,{propertyName:0,elapsedTime:0,pseudoElement:0}),Qb=Ae(Zb),Xb=G({},mr,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),ey=Ae(Xb),ty=[9,13,27,32],Zs=gt&&"CompositionEvent"in window,Hn=null;gt&&"documentMode"in document&&(Hn=document.documentMode);var ay=gt&&"TextEvent"in window&&!Hn,Yd=gt&&(!Zs||Hn&&8<Hn&&11>=Hn),Rd=" ",Ud=!1;function Ld(e,t){switch(e){case"keyup":return ty.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Bd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ya=!1;function ny(e,t){switch(e){case"compositionend":return Bd(t);case"keypress":return t.which!==32?null:(Ud=!0,Rd);case"textInput":return e=t.data,e===Rd&&Ud?null:e;default:return null}}function iy(e,t){if(Ya)return e==="compositionend"||!Zs&&Ld(e,t)?(e=Id(),ur=Hs=Dt=null,Ya=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Yd&&t.locale!=="ko"?null:t.data;default:return null}}var ry={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Od(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!ry[e.type]:t==="textarea"}function Vd(e,t,a,n){dd(n),t=hr(t,"onChange"),0<t.length&&(a=new Ws("onChange","change",null,a,n),e.push({event:a,listeners:t}))}var Wn=null,Kn=null;function oy(e){am(e,0)}function pr(e){var t=Oa(e);if(Xc(t))return e}function sy(e,t){if(e==="change")return t}var Hd=!1;if(gt){var Qs;if(gt){var Xs="oninput"in document;if(!Xs){var Wd=document.createElement("div");Wd.setAttribute("oninput","return;"),Xs=typeof Wd.oninput=="function"}Qs=Xs}else Qs=!1;Hd=Qs&&(!document.documentMode||9<document.documentMode)}function Kd(){Wn&&(Wn.detachEvent("onpropertychange",Gd),Kn=Wn=null)}function Gd(e){if(e.propertyName==="value"&&pr(Kn)){var t=[];if(Vd(t,Kn,e,Ts(e)),e=oy,aa)e(t);else{aa=!0;try{zs(e,t)}finally{aa=!1,Is()}}}}function ly(e,t,a){e==="focusin"?(Kd(),Wn=t,Kn=a,Wn.attachEvent("onpropertychange",Gd)):e==="focusout"&&Kd()}function uy(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return pr(Kn)}function cy(e,t){if(e==="click")return pr(t)}function dy(e,t){if(e==="input"||e==="change")return pr(t)}function my(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Re=typeof Object.is=="function"?Object.is:my,py=Object.prototype.hasOwnProperty;function Gn(e,t){if(Re(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),n=Object.keys(t);if(a.length!==n.length)return!1;for(n=0;n<a.length;n++)if(!py.call(t,a[n])||!Re(e[a[n]],t[a[n]]))return!1;return!0}function qd(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Jd(e,t){var a=qd(e);e=0;for(var n;a;){if(a.nodeType===3){if(n=e+a.textContent.length,e<=t&&n>=t)return{node:a,offset:t-e};e=n}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=qd(a)}}function Zd(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Zd(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Qd(){for(var e=window,t=Xi();t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=Xi(e.document)}return t}function el(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var hy=gt&&"documentMode"in document&&11>=document.documentMode,Ra=null,tl=null,qn=null,al=!1;function Xd(e,t,a){var n=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;al||Ra==null||Ra!==Xi(n)||(n=Ra,"selectionStart"in n&&el(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),qn&&Gn(qn,n)||(qn=n,n=hr(tl,"onSelect"),0<n.length&&(t=new Ws("onSelect","select",null,t,a),e.push({event:t,listeners:n}),t.target=Ra)))}Ls("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),Ls("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),Ls(Sb,2);for(var em="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),nl=0;nl<em.length;nl++)Us.set(em[nl],0);Pa("onMouseEnter",["mouseout","mouseover"]),Pa("onMouseLeave",["mouseout","mouseover"]),Pa("onPointerEnter",["pointerout","pointerover"]),Pa("onPointerLeave",["pointerout","pointerover"]),Xt("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Xt("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Xt("onBeforeInput",["compositionend","keypress","textInput","paste"]),Xt("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Xt("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Xt("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Jn="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),gy=new Set("cancel close invalid load scroll toggle".split(" ").concat(Jn));function tm(e,t,a){var n=e.type||"unknown-event";e.currentTarget=a,bb(n,t,void 0,e),e.currentTarget=null}function am(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var n=e[a],i=n.event;n=n.listeners;e:{var r=void 0;if(t)for(var o=n.length-1;0<=o;o--){var s=n[o],l=s.instance,c=s.currentTarget;if(s=s.listener,l!==r&&i.isPropagationStopped())break e;tm(i,s,c),r=l}else for(o=0;o<n.length;o++){if(s=n[o],l=s.instance,c=s.currentTarget,s=s.listener,l!==r&&i.isPropagationStopped())break e;tm(i,s,c),r=l}}}if(ar)throw e=Fs,ar=!1,Fs=null,e}function H(e,t){var a=pm(t),n=e+"__bubble";a.has(n)||(om(t,e,2,!1),a.add(n))}var nm="_reactListening"+Math.random().toString(36).slice(2);function im(e){e[nm]||(e[nm]=!0,Wc.forEach(function(t){gy.has(t)||rm(t,!1,e,null),rm(t,!0,e,null)}))}function rm(e,t,a,n){var i=4<arguments.length&&arguments[4]!==void 0?arguments[4]:0,r=a;e==="selectionchange"&&a.nodeType!==9&&(r=a.ownerDocument);var o=pm(r),s=e+"__"+(t?"capture":"bubble");o.has(s)||(t&&(i|=4),om(r,e,i,t),o.add(s))}function om(e,t,a,n){var i=Us.get(t);switch(i===void 0?2:i){case 0:i=Nb;break;case 1:i=Ab;break;default:i=Os}a=i.bind(null,t,a,e),i=void 0,!Ds||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),n?i!==void 0?e.addEventListener(t,a,{capture:!0,passive:i}):e.addEventListener(t,a,!0):i!==void 0?e.addEventListener(t,a,{passive:i}):e.addEventListener(t,a,!1)}function sm(e,t,a,n,i){var r=n;if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var o=n.tag;if(o===3||o===4){var s=n.stateNode.containerInfo;if(s===i||s.nodeType===8&&s.parentNode===i)break;if(o===4)for(o=n.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;o=o.return}for(;s!==null;){if(o=ia(s),o===null)return;if(l=o.tag,l===5||l===6){n=r=o;continue e}s=s.parentNode}}n=n.return}pb(function(){var c=r,d=Ts(a),p=[];e:{var m=Nd.get(e);if(m!==void 0){var h=Ws,b=e;switch(e){case"keypress":if(cr(a)===0)break e;case"keydown":case"keyup":h=Kb;break;case"focusin":b="focus",h=qs;break;case"focusout":b="blur",h=qs;break;case"beforeblur":case"afterblur":h=qs;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=Fd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=Fb;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=Jb;break;case $d:case Td:case Pd:h=Yb;break;case zd:h=Qb;break;case"scroll":h=Ib;break;case"wheel":h=ey;break;case"copy":case"cut":case"paste":h=Ub;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=_d}var v=(t&4)!==0,f=!v&&e==="scroll",g=v?m!==null?m+"Capture":null:m;v=[];for(var y=c,w;y!==null;){w=y;var S=w.stateNode;if(w.tag===5&&S!==null&&(w=S,g!==null&&(S=Dn(y,g),S!=null&&v.push(Zn(y,S,w)))),f)break;y=y.return}0<v.length&&(m=new h(m,b,null,a,d),p.push({event:m,listeners:v}))}}if(!(t&7)){e:{if(m=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",m&&!(t&16)&&(b=a.relatedTarget||a.fromElement)&&(ia(b)||b[Ba]))break e;if((h||m)&&(m=d.window===d?d:(m=d.ownerDocument)?m.defaultView||m.parentWindow:window,h?(b=a.relatedTarget||a.toElement,h=c,b=b?ia(b):null,b!==null&&(f=na(b),b!==f||b.tag!==5&&b.tag!==6)&&(b=null)):(h=null,b=c),h!==b)){if(v=Fd,S="onMouseLeave",g="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(v=_d,S="onPointerLeave",g="onPointerEnter",y="pointer"),f=h==null?m:Oa(h),w=b==null?m:Oa(b),m=new v(S,y+"leave",h,a,d),m.target=f,m.relatedTarget=w,S=null,ia(d)===c&&(v=new v(g,y+"enter",b,a,d),v.target=w,v.relatedTarget=f,S=v),f=S,h&&b)t:{for(v=h,g=b,y=0,w=v;w;w=Ua(w))y++;for(w=0,S=g;S;S=Ua(S))w++;for(;0<y-w;)v=Ua(v),y--;for(;0<w-y;)g=Ua(g),w--;for(;y--;){if(v===g||g!==null&&v===g.alternate)break t;v=Ua(v),g=Ua(g)}v=null}else v=null;h!==null&&lm(p,m,h,v,!1),b!==null&&f!==null&&lm(p,f,b,v,!0)}}e:{if(m=c?Oa(c):window,h=m.nodeName&&m.nodeName.toLowerCase(),h==="select"||h==="input"&&m.type==="file")var j=sy;else if(Od(m))if(Hd)j=dy;else{j=uy;var x=ly}else(h=m.nodeName)&&h.toLowerCase()==="input"&&(m.type==="checkbox"||m.type==="radio")&&(j=cy);if(j&&(j=j(e,c))){Vd(p,j,a,d);break e}x&&x(e,m,c),e==="focusout"&&(x=m._wrapperState)&&x.controlled&&m.type==="number"&&ws(m,"number",m.value)}switch(x=c?Oa(c):window,e){case"focusin":(Od(x)||x.contentEditable==="true")&&(Ra=x,tl=c,qn=null);break;case"focusout":qn=tl=Ra=null;break;case"mousedown":al=!0;break;case"contextmenu":case"mouseup":case"dragend":al=!1,Xd(p,a,d);break;case"selectionchange":if(hy)break;case"keydown":case"keyup":Xd(p,a,d)}var C;if(Zs)e:{switch(e){case"compositionstart":var z="onCompositionStart";break e;case"compositionend":z="onCompositionEnd";break e;case"compositionupdate":z="onCompositionUpdate";break e}z=void 0}else Ya?Ld(e,a)&&(z="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(z="onCompositionStart");z&&(Yd&&a.locale!=="ko"&&(Ya||z!=="onCompositionStart"?z==="onCompositionEnd"&&Ya&&(C=Id()):(Dt=d,Hs="value"in Dt?Dt.value:Dt.textContent,Ya=!0)),x=hr(c,z),0<x.length&&(z=new Md(z,e,null,a,d),p.push({event:z,listeners:x}),C?z.data=C:(C=Bd(a),C!==null&&(z.data=C)))),(C=ay?ny(e,a):iy(e,a))&&(c=hr(c,"onBeforeInput"),0<c.length&&(d=new Md("onBeforeInput","beforeinput",null,a,d),p.push({event:d,listeners:c}),d.data=C))}am(p,t)})}function Zn(e,t,a){return{instance:e,listener:t,currentTarget:a}}function hr(e,t){for(var a=t+"Capture",n=[];e!==null;){var i=e,r=i.stateNode;i.tag===5&&r!==null&&(i=r,r=Dn(e,a),r!=null&&n.unshift(Zn(e,r,i)),r=Dn(e,t),r!=null&&n.push(Zn(e,r,i))),e=e.return}return n}function Ua(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function lm(e,t,a,n,i){for(var r=t._reactName,o=[];a!==null&&a!==n;){var s=a,l=s.alternate,c=s.stateNode;if(l!==null&&l===n)break;s.tag===5&&c!==null&&(s=c,i?(l=Dn(a,r),l!=null&&o.unshift(Zn(a,l,s))):i||(l=Dn(a,r),l!=null&&o.push(Zn(a,l,s)))),a=a.return}o.length!==0&&e.push({event:t,listeners:o})}function gr(){}var il=null,rl=null;function um(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function ol(e,t){return e==="textarea"||e==="option"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var cm=typeof setTimeout=="function"?setTimeout:void 0,fy=typeof clearTimeout=="function"?clearTimeout:void 0;function sl(e){e.nodeType===1?e.textContent="":e.nodeType===9&&(e=e.body,e!=null&&(e.textContent=""))}function La(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break}return e}function dm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"){if(t===0)return e;t--}else a==="/$"&&t++}e=e.previousSibling}return null}var ll=0;function by(e){return{$$typeof:hs,toString:e,valueOf:e}}var fr=Math.random().toString(36).slice(2),Ft="__reactFiber$"+fr,br="__reactProps$"+fr,Ba="__reactContainer$"+fr,mm="__reactEvents$"+fr;function ia(e){var t=e[Ft];if(t)return t;for(var a=e.parentNode;a;){if(t=a[Ba]||a[Ft]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=dm(e);e!==null;){if(a=e[Ft])return a;e=dm(e)}return t}e=a,a=e.parentNode}return null}function Qn(e){return e=e[Ft]||e[Ba],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Oa(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error($(33))}function yr(e){return e[br]||null}function pm(e){var t=e[mm];return t===void 0&&(t=e[mm]=new Set),t}var ul=[],Va=-1;function Mt(e){return{current:e}}function W(e){0>Va||(e.current=ul[Va],ul[Va]=null,Va--)}function Z(e,t){Va++,ul[Va]=e.current,e.current=t}var _t={},ye=Mt(_t),$e=Mt(!1),ra=_t;function Ha(e,t){var a=e.type.contextTypes;if(!a)return _t;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var i={},r;for(r in a)i[r]=t[r];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Te(e){return e=e.childContextTypes,e!=null}function kr(){W($e),W(ye)}function hm(e,t,a){if(ye.current!==_t)throw Error($(168));Z(ye,t),Z($e,a)}function gm(e,t,a){var n=e.stateNode;if(e=t.childContextTypes,typeof n.getChildContext!="function")return a;n=n.getChildContext();for(var i in n)if(!(i in e))throw Error($(108,za(t)||"Unknown",i));return G({},a,n)}function vr(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||_t,ra=ye.current,Z(ye,e),Z($e,$e.current),!0}function fm(e,t,a){var n=e.stateNode;if(!n)throw Error($(169));a?(e=gm(e,t,ra),n.__reactInternalMemoizedMergedChildContext=e,W($e),W(ye),Z(ye,e)):W($e),Z($e,a)}var cl=null,oa=null,yy=oe.unstable_runWithPriority,dl=oe.unstable_scheduleCallback,ml=oe.unstable_cancelCallback,ky=oe.unstable_shouldYield,bm=oe.unstable_requestPaint,pl=oe.unstable_now,vy=oe.unstable_getCurrentPriorityLevel,wr=oe.unstable_ImmediatePriority,ym=oe.unstable_UserBlockingPriority,km=oe.unstable_NormalPriority,vm=oe.unstable_LowPriority,wm=oe.unstable_IdlePriority,hl={},wy=bm!==void 0?bm:function(){},ft=null,Sr=null,gl=!1,Sm=pl(),ke=1e4>Sm?pl:function(){return pl()-Sm};function Wa(){switch(vy()){case wr:return 99;case ym:return 98;case km:return 97;case vm:return 96;case wm:return 95;default:throw Error($(332))}}function xm(e){switch(e){case 99:return wr;case 98:return ym;case 97:return km;case 96:return vm;case 95:return wm;default:throw Error($(332))}}function sa(e,t){return e=xm(e),yy(e,t)}function Xn(e,t,a){return e=xm(e),dl(e,t,a)}function at(){if(Sr!==null){var e=Sr;Sr=null,ml(e)}Em()}function Em(){if(!gl&&ft!==null){gl=!0;var e=0;try{var t=ft;sa(99,function(){for(;e<t.length;e++){var a=t[e];do a=a(!0);while(a!==null)}}),ft=null}catch(a){throw ft!==null&&(ft=ft.slice(e+1)),dl(wr,at),a}finally{gl=!1}}}var Sy=ea.ReactCurrentBatchConfig;function Ge(e,t){if(e&&e.defaultProps){t=G({},t),e=e.defaultProps;for(var a in e)t[a]===void 0&&(t[a]=e[a]);return t}return t}var xr=Mt(null),Er=null,Ka=null,Cr=null;function fl(){Cr=Ka=Er=null}function bl(e){var t=xr.current;W(xr),e.type._context._currentValue=t}function Cm(e,t){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)===t){if(a===null||(a.childLanes&t)===t)break;a.childLanes|=t}else e.childLanes|=t,a!==null&&(a.childLanes|=t);e=e.return}}function Ga(e,t){Er=e,Cr=Ka=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(qe=!0),e.firstContext=null)}function Ue(e,t){if(Cr!==e&&t!==!1&&t!==0)if((typeof t!="number"||t===1073741823)&&(Cr=e,t=1073741823),t={context:e,observedBits:t,next:null},Ka===null){if(Er===null)throw Error($(308));Ka=t,Er.dependencies={lanes:0,firstContext:t,responders:null}}else Ka=Ka.next=t;return e._currentValue}var Yt=!1;function yl(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function jm(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Rt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ut(e,t){if(e=e.updateQueue,e!==null){e=e.shared;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}}function $m(e,t){var a=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,a===n)){var i=null,r=null;if(a=a.firstBaseUpdate,a!==null){do{var o={eventTime:a.eventTime,lane:a.lane,tag:a.tag,payload:a.payload,callback:a.callback,next:null};r===null?i=r=o:r=r.next=o,a=a.next}while(a!==null);r===null?i=r=t:r=r.next=t}else i=r=t;a={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:r,shared:n.shared,effects:n.effects},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}function ei(e,t,a,n){var i=e.updateQueue;Yt=!1;var r=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var l=s,c=l.next;l.next=null,o===null?r=c:o.next=c,o=l;var d=e.alternate;if(d!==null){d=d.updateQueue;var p=d.lastBaseUpdate;p!==o&&(p===null?d.firstBaseUpdate=c:p.next=c,d.lastBaseUpdate=l)}}if(r!==null){p=i.baseState,o=0,d=c=l=null;do{s=r.lane;var m=r.eventTime;if((n&s)===s){d!==null&&(d=d.next={eventTime:m,lane:0,tag:r.tag,payload:r.payload,callback:r.callback,next:null});e:{var h=e,b=r;switch(s=t,m=a,b.tag){case 1:if(h=b.payload,typeof h=="function"){p=h.call(m,p,s);break e}p=h;break e;case 3:h.flags=h.flags&-4097|64;case 0:if(h=b.payload,s=typeof h=="function"?h.call(m,p,s):h,s==null)break e;p=G({},p,s);break e;case 2:Yt=!0}}r.callback!==null&&(e.flags|=32,s=i.effects,s===null?i.effects=[r]:s.push(r))}else m={eventTime:m,lane:s,tag:r.tag,payload:r.payload,callback:r.callback,next:null},d===null?(c=d=m,l=p):d=d.next=m,o|=s;if(r=r.next,r===null){if(s=i.shared.pending,s===null)break;r=s.next,s.next=null,i.lastBaseUpdate=s,i.shared.pending=null}}while(!0);d===null&&(l=p),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=d,mi|=o,e.lanes=o,e.memoizedState=p}}function Tm(e,t,a){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],i=n.callback;if(i!==null){if(n.callback=null,n=a,typeof i!="function")throw Error($(191,i));i.call(n)}}}var Pm=new Ki.Component().refs;function jr(e,t,a,n){t=e.memoizedState,a=a(n,t),a=a==null?t:G({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var $r={isMounted:function(e){return(e=e._reactInternals)?na(e)===e:!1},enqueueSetState:function(e,t,a){e=e._reactInternals;var n=Ie(),i=Ot(e),r=Rt(n,i);r.payload=t,a!=null&&(r.callback=a),Ut(e,r),Vt(e,i,n)},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var n=Ie(),i=Ot(e),r=Rt(n,i);r.tag=1,r.payload=t,a!=null&&(r.callback=a),Ut(e,r),Vt(e,i,n)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=Ie(),n=Ot(e),i=Rt(a,n);i.tag=2,t!=null&&(i.callback=t),Ut(e,i),Vt(e,n,a)}};function zm(e,t,a,n,i,r,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,r,o):t.prototype&&t.prototype.isPureReactComponent?!Gn(a,n)||!Gn(i,r):!0}function Nm(e,t,a){var n=!1,i=_t,r=t.contextType;return typeof r=="object"&&r!==null?r=Ue(r):(i=Te(t)?ra:ye.current,n=t.contextTypes,r=(n=n!=null)?Ha(e,i):_t),t=new t(a,r),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=$r,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=r),t}function Am(e,t,a,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,n),t.state!==e&&$r.enqueueReplaceState(t,t.state,null)}function kl(e,t,a,n){var i=e.stateNode;i.props=a,i.state=e.memoizedState,i.refs=Pm,yl(e);var r=t.contextType;typeof r=="object"&&r!==null?i.context=Ue(r):(r=Te(t)?ra:ye.current,i.context=Ha(e,r)),ei(e,a,i,n),i.state=e.memoizedState,r=t.getDerivedStateFromProps,typeof r=="function"&&(jr(e,t,r,a),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&$r.enqueueReplaceState(i,i.state,null),ei(e,a,i,n),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4)}var Tr=Array.isArray;function ti(e,t,a){if(e=a.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(a._owner){if(a=a._owner,a){if(a.tag!==1)throw Error($(309));var n=a.stateNode}if(!n)throw Error($(147,e));var i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(r){var o=n.refs;o===Pm&&(o=n.refs={}),r===null?delete o[i]:o[i]=r},t._stringRef=i,t)}if(typeof e!="string")throw Error($(284));if(!a._owner)throw Error($(290,e))}return e}function Pr(e,t){if(e.type!=="textarea")throw Error($(31,Object.prototype.toString.call(t)==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":t))}function Im(e){function t(f,g){if(e){var y=f.lastEffect;y!==null?(y.nextEffect=g,f.lastEffect=g):f.firstEffect=f.lastEffect=g,g.nextEffect=null,g.flags=8}}function a(f,g){if(!e)return null;for(;g!==null;)t(f,g),g=g.sibling;return null}function n(f,g){for(f=new Map;g!==null;)g.key!==null?f.set(g.key,g):f.set(g.index,g),g=g.sibling;return f}function i(f,g){return f=Kt(f,g),f.index=0,f.sibling=null,f}function r(f,g,y){return f.index=y,e?(y=f.alternate,y!==null?(y=y.index,y<g?(f.flags=2,g):y):(f.flags=2,g)):g}function o(f){return e&&f.alternate===null&&(f.flags=2),f}function s(f,g,y,w){return g===null||g.tag!==6?(g=tu(y,f.mode,w),g.return=f,g):(g=i(g,y),g.return=f,g)}function l(f,g,y,w){return g!==null&&g.elementType===y.type?(w=i(g,y.props),w.ref=ti(f,g,y),w.return=f,w):(w=Kr(y.type,y.key,y.props,null,f.mode,w),w.ref=ti(f,g,y),w.return=f,w)}function c(f,g,y,w){return g===null||g.tag!==4||g.stateNode.containerInfo!==y.containerInfo||g.stateNode.implementation!==y.implementation?(g=au(y,f.mode,w),g.return=f,g):(g=i(g,y.children||[]),g.return=f,g)}function d(f,g,y,w,S){return g===null||g.tag!==7?(g=an(y,f.mode,w,S),g.return=f,g):(g=i(g,y),g.return=f,g)}function p(f,g,y){if(typeof g=="string"||typeof g=="number")return g=tu(""+g,f.mode,y),g.return=f,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case $n:return y=Kr(g.type,g.key,g.props,null,f.mode,y),y.ref=ti(f,null,g),y.return=f,y;case ta:return g=au(g,f.mode,y),g.return=f,g}if(Tr(g)||zn(g))return g=an(g,f.mode,y,null),g.return=f,g;Pr(f,g)}return null}function m(f,g,y,w){var S=g!==null?g.key:null;if(typeof y=="string"||typeof y=="number")return S!==null?null:s(f,g,""+y,w);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case $n:return y.key===S?y.type===Tt?d(f,g,y.props.children,w,S):l(f,g,y,w):null;case ta:return y.key===S?c(f,g,y,w):null}if(Tr(y)||zn(y))return S!==null?null:d(f,g,y,w,null);Pr(f,y)}return null}function h(f,g,y,w,S){if(typeof w=="string"||typeof w=="number")return f=f.get(y)||null,s(g,f,""+w,S);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case $n:return f=f.get(w.key===null?y:w.key)||null,w.type===Tt?d(g,f,w.props.children,S,w.key):l(g,f,w,S);case ta:return f=f.get(w.key===null?y:w.key)||null,c(g,f,w,S)}if(Tr(w)||zn(w))return f=f.get(y)||null,d(g,f,w,S,null);Pr(g,w)}return null}function b(f,g,y,w){for(var S=null,j=null,x=g,C=g=0,z=null;x!==null&&C<y.length;C++){x.index>C?(z=x,x=null):z=x.sibling;var E=m(f,x,y[C],w);if(E===null){x===null&&(x=z);break}e&&x&&E.alternate===null&&t(f,x),g=r(E,g,C),j===null?S=E:j.sibling=E,j=E,x=z}if(C===y.length)return a(f,x),S;if(x===null){for(;C<y.length;C++)x=p(f,y[C],w),x!==null&&(g=r(x,g,C),j===null?S=x:j.sibling=x,j=x);return S}for(x=n(f,x);C<y.length;C++)z=h(x,f,C,y[C],w),z!==null&&(e&&z.alternate!==null&&x.delete(z.key===null?C:z.key),g=r(z,g,C),j===null?S=z:j.sibling=z,j=z);return e&&x.forEach(function(M){return t(f,M)}),S}function v(f,g,y,w){var S=zn(y);if(typeof S!="function")throw Error($(150));if(y=S.call(y),y==null)throw Error($(151));for(var j=S=null,x=g,C=g=0,z=null,E=y.next();x!==null&&!E.done;C++,E=y.next()){x.index>C?(z=x,x=null):z=x.sibling;var M=m(f,x,E.value,w);if(M===null){x===null&&(x=z);break}e&&x&&M.alternate===null&&t(f,x),g=r(M,g,C),j===null?S=M:j.sibling=M,j=M,x=z}if(E.done)return a(f,x),S;if(x===null){for(;!E.done;C++,E=y.next())E=p(f,E.value,w),E!==null&&(g=r(E,g,C),j===null?S=E:j.sibling=E,j=E);return S}for(x=n(f,x);!E.done;C++,E=y.next())E=h(x,f,C,E.value,w),E!==null&&(e&&E.alternate!==null&&x.delete(E.key===null?C:E.key),g=r(E,g,C),j===null?S=E:j.sibling=E,j=E);return e&&x.forEach(function(K){return t(f,K)}),S}return function(f,g,y,w){var S=typeof y=="object"&&y!==null&&y.type===Tt&&y.key===null;S&&(y=y.props.children);var j=typeof y=="object"&&y!==null;if(j)switch(y.$$typeof){case $n:e:{for(j=y.key,S=g;S!==null;){if(S.key===j){switch(S.tag){case 7:if(y.type===Tt){a(f,S.sibling),g=i(S,y.props.children),g.return=f,f=g;break e}break;default:if(S.elementType===y.type){a(f,S.sibling),g=i(S,y.props),g.ref=ti(f,S,y),g.return=f,f=g;break e}}a(f,S);break}else t(f,S);S=S.sibling}y.type===Tt?(g=an(y.props.children,f.mode,w,y.key),g.return=f,f=g):(w=Kr(y.type,y.key,y.props,null,f.mode,w),w.ref=ti(f,g,y),w.return=f,f=w)}return o(f);case ta:e:{for(S=y.key;g!==null;){if(g.key===S)if(g.tag===4&&g.stateNode.containerInfo===y.containerInfo&&g.stateNode.implementation===y.implementation){a(f,g.sibling),g=i(g,y.children||[]),g.return=f,f=g;break e}else{a(f,g);break}else t(f,g);g=g.sibling}g=au(y,f.mode,w),g.return=f,f=g}return o(f)}if(typeof y=="string"||typeof y=="number")return y=""+y,g!==null&&g.tag===6?(a(f,g.sibling),g=i(g,y),g.return=f,f=g):(a(f,g),g=tu(y,f.mode,w),g.return=f,f=g),o(f);if(Tr(y))return b(f,g,y,w);if(zn(y))return v(f,g,y,w);if(j&&Pr(f,y),typeof y>"u"&&!S)switch(f.tag){case 1:case 22:case 0:case 11:case 15:throw Error($(152,za(f.type)||"Component"))}return a(f,g)}}var zr=Im(!0),Dm=Im(!1),ai={},nt=Mt(ai),ni=Mt(ai),ii=Mt(ai);function la(e){if(e===ai)throw Error($(174));return e}function vl(e,t){switch(Z(ii,t),Z(ni,e),Z(nt,ai),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Cs(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Cs(t,e)}W(nt),Z(nt,t)}function qa(){W(nt),W(ni),W(ii)}function Fm(e){la(ii.current);var t=la(nt.current),a=Cs(t,e.type);t!==a&&(Z(ni,e),Z(nt,a))}function wl(e){ni.current===e&&(W(nt),W(ni))}var Q=Mt(0);function Nr(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||a.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&64)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var bt=null,Lt=null,it=!1;function Mm(e,t){var a=Oe(5,null,null,0);a.elementType="DELETED",a.type="DELETED",a.stateNode=t,a.return=e,a.flags=8,e.lastEffect!==null?(e.lastEffect.nextEffect=a,e.lastEffect=a):e.firstEffect=e.lastEffect=a}function _m(e,t){switch(e.tag){case 5:var a=e.type;return t=t.nodeType!==1||a.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,!0):!1;case 13:return!1;default:return!1}}function Sl(e){if(it){var t=Lt;if(t){var a=t;if(!_m(e,t)){if(t=La(a.nextSibling),!t||!_m(e,t)){e.flags=e.flags&-1025|2,it=!1,bt=e;return}Mm(bt,a)}bt=e,Lt=La(t.firstChild)}else e.flags=e.flags&-1025|2,it=!1,bt=e}}function Ym(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;bt=e}function Ar(e){if(e!==bt)return!1;if(!it)return Ym(e),it=!0,!1;var t=e.type;if(e.tag!==5||t!=="head"&&t!=="body"&&!ol(t,e.memoizedProps))for(t=Lt;t;)Mm(e,t),t=La(t.nextSibling);if(Ym(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error($(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"){if(t===0){Lt=La(e.nextSibling);break e}t--}else a!=="$"&&a!=="$!"&&a!=="$?"||t++}e=e.nextSibling}Lt=null}}else Lt=bt?La(e.stateNode.nextSibling):null;return!0}function xl(){Lt=bt=null,it=!1}var Ja=[];function El(){for(var e=0;e<Ja.length;e++)Ja[e]._workInProgressVersionPrimary=null;Ja.length=0}var ri=ea.ReactCurrentDispatcher,Le=ea.ReactCurrentBatchConfig,oi=0,ee=null,ve=null,ce=null,Ir=!1,si=!1;function Pe(){throw Error($(321))}function Cl(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!Re(e[a],t[a]))return!1;return!0}function jl(e,t,a,n,i,r){if(oi=r,ee=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ri.current=e===null||e.memoizedState===null?Ey:Cy,e=a(n,i),si){r=0;do{if(si=!1,!(25>r))throw Error($(301));r+=1,ce=ve=null,t.updateQueue=null,ri.current=jy,e=a(n,i)}while(si)}if(ri.current=_r,t=ve!==null&&ve.next!==null,oi=0,ce=ve=ee=null,Ir=!1,t)throw Error($(300));return e}function ua(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ce===null?ee.memoizedState=ce=e:ce=ce.next=e,ce}function ca(){if(ve===null){var e=ee.alternate;e=e!==null?e.memoizedState:null}else e=ve.next;var t=ce===null?ee.memoizedState:ce.next;if(t!==null)ce=t,ve=e;else{if(e===null)throw Error($(310));ve=e,e={memoizedState:ve.memoizedState,baseState:ve.baseState,baseQueue:ve.baseQueue,queue:ve.queue,next:null},ce===null?ee.memoizedState=ce=e:ce=ce.next=e}return ce}function rt(e,t){return typeof t=="function"?t(e):t}function li(e){var t=ca(),a=t.queue;if(a===null)throw Error($(311));a.lastRenderedReducer=e;var n=ve,i=n.baseQueue,r=a.pending;if(r!==null){if(i!==null){var o=i.next;i.next=r.next,r.next=o}n.baseQueue=i=r,a.pending=null}if(i!==null){i=i.next,n=n.baseState;var s=o=r=null,l=i;do{var c=l.lane;if((oi&c)===c)s!==null&&(s=s.next={lane:0,action:l.action,eagerReducer:l.eagerReducer,eagerState:l.eagerState,next:null}),n=l.eagerReducer===e?l.eagerState:e(n,l.action);else{var d={lane:c,action:l.action,eagerReducer:l.eagerReducer,eagerState:l.eagerState,next:null};s===null?(o=s=d,r=n):s=s.next=d,ee.lanes|=c,mi|=c}l=l.next}while(l!==null&&l!==i);s===null?r=n:s.next=o,Re(n,t.memoizedState)||(qe=!0),t.memoizedState=n,t.baseState=r,t.baseQueue=s,a.lastRenderedState=n}return[t.memoizedState,a.dispatch]}function ui(e){var t=ca(),a=t.queue;if(a===null)throw Error($(311));a.lastRenderedReducer=e;var n=a.dispatch,i=a.pending,r=t.memoizedState;if(i!==null){a.pending=null;var o=i=i.next;do r=e(r,o.action),o=o.next;while(o!==i);Re(r,t.memoizedState)||(qe=!0),t.memoizedState=r,t.baseQueue===null&&(t.baseState=r),a.lastRenderedState=r}return[r,n]}function Rm(e,t,a){var n=t._getVersion;n=n(t._source);var i=t._workInProgressVersionPrimary;if(i!==null?e=i===n:(e=e.mutableReadLanes,(e=(oi&e)===e)&&(t._workInProgressVersionPrimary=n,Ja.push(t))),e)return a(t._source);throw Ja.push(t),Error($(350))}function Um(e,t,a,n){var i=xe;if(i===null)throw Error($(349));var r=t._getVersion,o=r(t._source),s=ri.current,l=s.useState(function(){return Rm(i,t,a)}),c=l[1],d=l[0];l=ce;var p=e.memoizedState,m=p.refs,h=m.getSnapshot,b=p.source;p=p.subscribe;var v=ee;return e.memoizedState={refs:m,source:t,subscribe:n},s.useEffect(function(){m.getSnapshot=a,m.setSnapshot=c;var f=r(t._source);if(!Re(o,f)){f=a(t._source),Re(d,f)||(c(f),f=Ot(v),i.mutableReadLanes|=f&i.pendingLanes),f=i.mutableReadLanes,i.entangledLanes|=f;for(var g=i.entanglements,y=f;0<y;){var w=31-It(y),S=1<<w;g[w]|=f,y&=~S}}},[a,t,n]),s.useEffect(function(){return n(t._source,function(){var f=m.getSnapshot,g=m.setSnapshot;try{g(f(t._source));var y=Ot(v);i.mutableReadLanes|=y&i.pendingLanes}catch(w){g(function(){throw w})}})},[t,n]),Re(h,a)&&Re(b,t)&&Re(p,n)||(e={pending:null,dispatch:null,lastRenderedReducer:rt,lastRenderedState:d},e.dispatch=c=zl.bind(null,ee,e),l.queue=e,l.baseQueue=null,d=Rm(i,t,a),l.memoizedState=l.baseState=d),d}function Lm(e,t,a){var n=ca();return Um(n,e,t,a)}function ci(e){var t=ua();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e=t.queue={pending:null,dispatch:null,lastRenderedReducer:rt,lastRenderedState:e},e=e.dispatch=zl.bind(null,ee,e),[t.memoizedState,e]}function Dr(e,t,a,n){return e={tag:e,create:t,destroy:a,deps:n,next:null},t=ee.updateQueue,t===null?(t={lastEffect:null},ee.updateQueue=t,t.lastEffect=e.next=e):(a=t.lastEffect,a===null?t.lastEffect=e.next=e:(n=a.next,a.next=e,e.next=n,t.lastEffect=e)),e}function Bm(e){var t=ua();return e={current:e},t.memoizedState=e}function Fr(){return ca().memoizedState}function $l(e,t,a,n){var i=ua();ee.flags|=e,i.memoizedState=Dr(1|t,a,void 0,n===void 0?null:n)}function Tl(e,t,a,n){var i=ca();n=n===void 0?null:n;var r=void 0;if(ve!==null){var o=ve.memoizedState;if(r=o.destroy,n!==null&&Cl(n,o.deps)){Dr(t,a,r,n);return}}ee.flags|=e,i.memoizedState=Dr(1|t,a,r,n)}function Om(e,t){return $l(516,4,e,t)}function Mr(e,t){return Tl(516,4,e,t)}function Vm(e,t){return Tl(4,2,e,t)}function Hm(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Wm(e,t,a){return a=a!=null?a.concat([e]):null,Tl(4,2,Hm.bind(null,t,e),a)}function Pl(){}function Km(e,t){var a=ca();t=t===void 0?null:t;var n=a.memoizedState;return n!==null&&t!==null&&Cl(t,n[1])?n[0]:(a.memoizedState=[e,t],e)}function Gm(e,t){var a=ca();t=t===void 0?null:t;var n=a.memoizedState;return n!==null&&t!==null&&Cl(t,n[1])?n[0]:(e=e(),a.memoizedState=[e,t],e)}function xy(e,t){var a=Wa();sa(98>a?98:a,function(){e(!0)}),sa(97<a?97:a,function(){var n=Le.transition;Le.transition=1;try{e(!1),t()}finally{Le.transition=n}})}function zl(e,t,a){var n=Ie(),i=Ot(e),r={lane:i,action:a,eagerReducer:null,eagerState:null,next:null},o=t.pending;if(o===null?r.next=r:(r.next=o.next,o.next=r),t.pending=r,o=e.alternate,e===ee||o!==null&&o===ee)si=Ir=!0;else{if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,l=o(s,a);if(r.eagerReducer=o,r.eagerState=l,Re(l,s))return}catch{}finally{}Vt(e,i,n)}}var _r={readContext:Ue,useCallback:Pe,useContext:Pe,useEffect:Pe,useImperativeHandle:Pe,useLayoutEffect:Pe,useMemo:Pe,useReducer:Pe,useRef:Pe,useState:Pe,useDebugValue:Pe,useDeferredValue:Pe,useTransition:Pe,useMutableSource:Pe,useOpaqueIdentifier:Pe,unstable_isNewReconciler:!1},Ey={readContext:Ue,useCallback:function(e,t){return ua().memoizedState=[e,t===void 0?null:t],e},useContext:Ue,useEffect:Om,useImperativeHandle:function(e,t,a){return a=a!=null?a.concat([e]):null,$l(4,2,Hm.bind(null,t,e),a)},useLayoutEffect:function(e,t){return $l(4,2,e,t)},useMemo:function(e,t){var a=ua();return t=t===void 0?null:t,e=e(),a.memoizedState=[e,t],e},useReducer:function(e,t,a){var n=ua();return t=a!==void 0?a(t):t,n.memoizedState=n.baseState=t,e=n.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},e=e.dispatch=zl.bind(null,ee,e),[n.memoizedState,e]},useRef:Bm,useState:ci,useDebugValue:Pl,useDeferredValue:function(e){var t=ci(e),a=t[0],n=t[1];return Om(function(){var i=Le.transition;Le.transition=1;try{n(e)}finally{Le.transition=i}},[e]),a},useTransition:function(){var e=ci(!1),t=e[0];return e=xy.bind(null,e[1]),Bm(e),[e,t]},useMutableSource:function(e,t,a){var n=ua();return n.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:a},Um(n,e,t,a)},useOpaqueIdentifier:function(){if(it){var e=!1,t=by(function(){throw e||(e=!0,a("r:"+(ll++).toString(36))),Error($(355))}),a=ci(t)[1];return!(ee.mode&2)&&(ee.flags|=516,Dr(5,function(){a("r:"+(ll++).toString(36))},void 0,null)),t}return t="r:"+(ll++).toString(36),ci(t),t},unstable_isNewReconciler:!1},Cy={readContext:Ue,useCallback:Km,useContext:Ue,useEffect:Mr,useImperativeHandle:Wm,useLayoutEffect:Vm,useMemo:Gm,useReducer:li,useRef:Fr,useState:function(){return li(rt)},useDebugValue:Pl,useDeferredValue:function(e){var t=li(rt),a=t[0],n=t[1];return Mr(function(){var i=Le.transition;Le.transition=1;try{n(e)}finally{Le.transition=i}},[e]),a},useTransition:function(){var e=li(rt)[0];return[Fr().current,e]},useMutableSource:Lm,useOpaqueIdentifier:function(){return li(rt)[0]},unstable_isNewReconciler:!1},jy={readContext:Ue,useCallback:Km,useContext:Ue,useEffect:Mr,useImperativeHandle:Wm,useLayoutEffect:Vm,useMemo:Gm,useReducer:ui,useRef:Fr,useState:function(){return ui(rt)},useDebugValue:Pl,useDeferredValue:function(e){var t=ui(rt),a=t[0],n=t[1];return Mr(function(){var i=Le.transition;Le.transition=1;try{n(e)}finally{Le.transition=i}},[e]),a},useTransition:function(){var e=ui(rt)[0];return[Fr().current,e]},useMutableSource:Lm,useOpaqueIdentifier:function(){return ui(rt)[0]},unstable_isNewReconciler:!1},$y=ea.ReactCurrentOwner,qe=!1;function ze(e,t,a,n){t.child=e===null?Dm(t,null,a,n):zr(t,e.child,a,n)}function qm(e,t,a,n,i){a=a.render;var r=t.ref;return Ga(t,i),n=jl(e,t,a,n,r,i),e!==null&&!qe?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~i,yt(e,t,i)):(t.flags|=1,ze(e,t,n,i),t.child)}function Jm(e,t,a,n,i,r){if(e===null){var o=a.type;return typeof o=="function"&&!Xl(o)&&o.defaultProps===void 0&&a.compare===null&&a.defaultProps===void 0?(t.tag=15,t.type=o,Zm(e,t,o,n,i,r)):(e=Kr(a.type,null,n,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}return o=e.child,!(i&r)&&(i=o.memoizedProps,a=a.compare,a=a!==null?a:Gn,a(i,n)&&e.ref===t.ref)?yt(e,t,r):(t.flags|=1,e=Kt(o,n),e.ref=t.ref,e.return=t,t.child=e)}function Zm(e,t,a,n,i,r){if(e!==null&&Gn(e.memoizedProps,n)&&e.ref===t.ref)if(qe=!1,(r&i)!==0)e.flags&16384&&(qe=!0);else return t.lanes=e.lanes,yt(e,t,r);return Al(e,t,a,n,r)}function Nl(e,t,a){var n=t.pendingProps,i=n.children,r=e!==null?e.memoizedState:null;if(n.mode==="hidden"||n.mode==="unstable-defer-without-hiding")if(!(t.mode&4))t.memoizedState={baseLanes:0},Wr(t,a);else if(a&1073741824)t.memoizedState={baseLanes:0},Wr(t,r!==null?r.baseLanes:a);else return e=r!==null?r.baseLanes|a:a,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},Wr(t,e),null;else r!==null?(n=r.baseLanes|a,t.memoizedState=null):n=a,Wr(t,n);return ze(e,t,i,a),t.child}function Qm(e,t){var a=t.ref;(e===null&&a!==null||e!==null&&e.ref!==a)&&(t.flags|=128)}function Al(e,t,a,n,i){var r=Te(a)?ra:ye.current;return r=Ha(t,r),Ga(t,i),a=jl(e,t,a,n,r,i),e!==null&&!qe?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~i,yt(e,t,i)):(t.flags|=1,ze(e,t,a,i),t.child)}function Xm(e,t,a,n,i){if(Te(a)){var r=!0;vr(t)}else r=!1;if(Ga(t,i),t.stateNode===null)e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),Nm(t,a,n),kl(t,a,n,i),n=!0;else if(e===null){var o=t.stateNode,s=t.memoizedProps;o.props=s;var l=o.context,c=a.contextType;typeof c=="object"&&c!==null?c=Ue(c):(c=Te(a)?ra:ye.current,c=Ha(t,c));var d=a.getDerivedStateFromProps,p=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function";p||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(s!==n||l!==c)&&Am(t,o,n,c),Yt=!1;var m=t.memoizedState;o.state=m,ei(t,n,o,i),l=t.memoizedState,s!==n||m!==l||$e.current||Yt?(typeof d=="function"&&(jr(t,a,d,n),l=t.memoizedState),(s=Yt||zm(t,a,s,n,m,l,c))?(p||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4)):(typeof o.componentDidMount=="function"&&(t.flags|=4),t.memoizedProps=n,t.memoizedState=l),o.props=n,o.state=l,o.context=c,n=s):(typeof o.componentDidMount=="function"&&(t.flags|=4),n=!1)}else{o=t.stateNode,jm(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:Ge(t.type,s),o.props=c,p=t.pendingProps,m=o.context,l=a.contextType,typeof l=="object"&&l!==null?l=Ue(l):(l=Te(a)?ra:ye.current,l=Ha(t,l));var h=a.getDerivedStateFromProps;(d=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(s!==p||m!==l)&&Am(t,o,n,l),Yt=!1,m=t.memoizedState,o.state=m,ei(t,n,o,i);var b=t.memoizedState;s!==p||m!==b||$e.current||Yt?(typeof h=="function"&&(jr(t,a,h,n),b=t.memoizedState),(c=Yt||zm(t,a,c,n,m,b,l))?(d||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,b,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,b,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=256)):(typeof o.componentDidUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=256),t.memoizedProps=n,t.memoizedState=b),o.props=n,o.state=b,o.context=l,n=c):(typeof o.componentDidUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=256),n=!1)}return Il(e,t,a,n,r,i)}function Il(e,t,a,n,i,r){Qm(e,t);var o=(t.flags&64)!==0;if(!n&&!o)return i&&fm(t,a,!1),yt(e,t,r);n=t.stateNode,$y.current=t;var s=o&&typeof a.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&o?(t.child=zr(t,e.child,null,r),t.child=zr(t,null,s,r)):ze(e,t,s,r),t.memoizedState=n.state,i&&fm(t,a,!0),t.child}function ep(e){var t=e.stateNode;t.pendingContext?hm(e,t.pendingContext,t.pendingContext!==t.context):t.context&&hm(e,t.context,!1),vl(e,t.containerInfo)}var Yr={dehydrated:null,retryLane:0};function tp(e,t,a){var n=t.pendingProps,i=Q.current,r=!1,o;return(o=(t.flags&64)!==0)||(o=e!==null&&e.memoizedState===null?!1:(i&2)!==0),o?(r=!0,t.flags&=-65):e!==null&&e.memoizedState===null||n.fallback===void 0||n.unstable_avoidThisFallback===!0||(i|=1),Z(Q,i&1),e===null?(n.fallback!==void 0&&Sl(t),e=n.children,i=n.fallback,r?(e=ap(t,e,i,a),t.child.memoizedState={baseLanes:a},t.memoizedState=Yr,e):typeof n.unstable_expectedLoadTime=="number"?(e=ap(t,e,i,a),t.child.memoizedState={baseLanes:a},t.memoizedState=Yr,t.lanes=33554432,e):(a=eu({mode:"visible",children:e},t.mode,a,null),a.return=t,t.child=a)):e.memoizedState!==null?r?(n=ip(e,t,n.children,n.fallback,a),r=t.child,i=e.child.memoizedState,r.memoizedState=i===null?{baseLanes:a}:{baseLanes:i.baseLanes|a},r.childLanes=e.childLanes&~a,t.memoizedState=Yr,n):(a=np(e,t,n.children,a),t.memoizedState=null,a):r?(n=ip(e,t,n.children,n.fallback,a),r=t.child,i=e.child.memoizedState,r.memoizedState=i===null?{baseLanes:a}:{baseLanes:i.baseLanes|a},r.childLanes=e.childLanes&~a,t.memoizedState=Yr,n):(a=np(e,t,n.children,a),t.memoizedState=null,a)}function ap(e,t,a,n){var i=e.mode,r=e.child;return t={mode:"hidden",children:t},!(i&2)&&r!==null?(r.childLanes=0,r.pendingProps=t):r=eu(t,i,0,null),a=an(a,i,n,null),r.return=e,a.return=e,r.sibling=a,e.child=r,a}function np(e,t,a,n){var i=e.child;return e=i.sibling,a=Kt(i,{mode:"visible",children:a}),!(t.mode&2)&&(a.lanes=n),a.return=t,a.sibling=null,e!==null&&(e.nextEffect=null,e.flags=8,t.firstEffect=t.lastEffect=e),t.child=a}function ip(e,t,a,n,i){var r=t.mode,o=e.child;e=o.sibling;var s={mode:"hidden",children:a};return!(r&2)&&t.child!==o?(a=t.child,a.childLanes=0,a.pendingProps=s,o=a.lastEffect,o!==null?(t.firstEffect=a.firstEffect,t.lastEffect=o,o.nextEffect=null):t.firstEffect=t.lastEffect=null):a=Kt(o,s),e!==null?n=Kt(e,n):(n=an(n,r,i,null),n.flags|=2),n.return=t,a.return=t,a.sibling=n,t.child=a,n}function rp(e,t){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),Cm(e.return,t)}function Dl(e,t,a,n,i,r){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:a,tailMode:i,lastEffect:r}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=n,o.tail=a,o.tailMode=i,o.lastEffect=r)}function op(e,t,a){var n=t.pendingProps,i=n.revealOrder,r=n.tail;if(ze(e,t,n.children,a),n=Q.current,n&2)n=n&1|2,t.flags|=64;else{if(e!==null&&e.flags&64)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&rp(e,a);else if(e.tag===19)rp(e,a);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(Z(Q,n),!(t.mode&2))t.memoizedState=null;else switch(i){case"forwards":for(a=t.child,i=null;a!==null;)e=a.alternate,e!==null&&Nr(e)===null&&(i=a),a=a.sibling;a=i,a===null?(i=t.child,t.child=null):(i=a.sibling,a.sibling=null),Dl(t,!1,i,a,r,t.lastEffect);break;case"backwards":for(a=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Nr(e)===null){t.child=i;break}e=i.sibling,i.sibling=a,a=i,i=e}Dl(t,!0,a,null,r,t.lastEffect);break;case"together":Dl(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function yt(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),mi|=t.lanes,a&t.childLanes){if(e!==null&&t.child!==e.child)throw Error($(153));if(t.child!==null){for(e=t.child,a=Kt(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Kt(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}return null}var sp,Fl,lp,up;sp=function(e,t){for(var a=t.child;a!==null;){if(a.tag===5||a.tag===6)e.appendChild(a.stateNode);else if(a.tag!==4&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===t)break;for(;a.sibling===null;){if(a.return===null||a.return===t)return;a=a.return}a.sibling.return=a.return,a=a.sibling}},Fl=function(){},lp=function(e,t,a,n){var i=e.memoizedProps;if(i!==n){e=t.stateNode,la(nt.current);var r=null;switch(a){case"input":i=ks(e,i),n=ks(e,n),r=[];break;case"option":i=Ss(e,i),n=Ss(e,n),r=[];break;case"select":i=G({},i,{value:void 0}),n=G({},n,{value:void 0}),r=[];break;case"textarea":i=xs(e,i),n=xs(e,n),r=[];break;default:typeof i.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=gr)}js(a,n);var o;a=null;for(c in i)if(!n.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var s=i[c];for(o in s)s.hasOwnProperty(o)&&(a||(a={}),a[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(jn.hasOwnProperty(c)?r||(r=[]):(r=r||[]).push(c,null));for(c in n){var l=n[c];if(s=i!=null?i[c]:void 0,n.hasOwnProperty(c)&&l!==s&&(l!=null||s!=null))if(c==="style")if(s){for(o in s)!s.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(a||(a={}),a[o]="");for(o in l)l.hasOwnProperty(o)&&s[o]!==l[o]&&(a||(a={}),a[o]=l[o])}else a||(r||(r=[]),r.push(c,a)),a=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,s=s?s.__html:void 0,l!=null&&s!==l&&(r=r||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(r=r||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(jn.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&H("scroll",e),r||s===l||(r=[])):typeof l=="object"&&l!==null&&l.$$typeof===hs?l.toString():(r=r||[]).push(c,l))}a&&(r=r||[]).push("style",a);var c=r;(t.updateQueue=c)&&(t.flags|=4)}},up=function(e,t,a,n){a!==n&&(t.flags|=4)};function di(e,t){if(!it)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var n=null;a!==null;)a.alternate!==null&&(n=a),a=a.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function Ty(e,t,a){var n=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return Te(t.type)&&kr(),null;case 3:return qa(),W($e),W(ye),El(),n=t.stateNode,n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ar(t)?t.flags|=4:n.hydrate||(t.flags|=256)),Fl(t),null;case 5:wl(t);var i=la(ii.current);if(a=t.type,e!==null&&t.stateNode!=null)lp(e,t,a,n,i),e.ref!==t.ref&&(t.flags|=128);else{if(!n){if(t.stateNode===null)throw Error($(166));return null}if(e=la(nt.current),Ar(t)){n=t.stateNode,a=t.type;var r=t.memoizedProps;switch(n[Ft]=t,n[br]=r,a){case"dialog":H("cancel",n),H("close",n);break;case"iframe":case"object":case"embed":H("load",n);break;case"video":case"audio":for(e=0;e<Jn.length;e++)H(Jn[e],n);break;case"source":H("error",n);break;case"img":case"image":case"link":H("error",n),H("load",n);break;case"details":H("toggle",n);break;case"input":ed(n,r),H("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!r.multiple},H("invalid",n);break;case"textarea":nd(n,r),H("invalid",n)}js(a,r),e=null;for(var o in r)r.hasOwnProperty(o)&&(i=r[o],o==="children"?typeof i=="string"?n.textContent!==i&&(e=["children",i]):typeof i=="number"&&n.textContent!==""+i&&(e=["children",""+i]):jn.hasOwnProperty(o)&&i!=null&&o==="onScroll"&&H("scroll",n));switch(a){case"input":Qi(n),ad(n,r,!0);break;case"textarea":Qi(n),rd(n);break;case"select":case"option":break;default:typeof r.onClick=="function"&&(n.onclick=gr)}n=e,t.updateQueue=n,n!==null&&(t.flags|=4)}else{switch(o=i.nodeType===9?i:i.ownerDocument,e===Es.html&&(e=od(a)),e===Es.html?a==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=o.createElement(a,{is:n.is}):(e=o.createElement(a),a==="select"&&(o=e,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):e=o.createElementNS(e,a),e[Ft]=t,e[br]=n,sp(e,t,!1,!1),t.stateNode=e,o=$s(a,n),a){case"dialog":H("cancel",e),H("close",e),i=n;break;case"iframe":case"object":case"embed":H("load",e),i=n;break;case"video":case"audio":for(i=0;i<Jn.length;i++)H(Jn[i],e);i=n;break;case"source":H("error",e),i=n;break;case"img":case"image":case"link":H("error",e),H("load",e),i=n;break;case"details":H("toggle",e),i=n;break;case"input":ed(e,n),i=ks(e,n),H("invalid",e);break;case"option":i=Ss(e,n);break;case"select":e._wrapperState={wasMultiple:!!n.multiple},i=G({},n,{value:void 0}),H("invalid",e);break;case"textarea":nd(e,n),i=xs(e,n),H("invalid",e);break;default:i=n}js(a,i);var s=i;for(r in s)if(s.hasOwnProperty(r)){var l=s[r];r==="style"?ud(e,l):r==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&sd(e,l)):r==="children"?typeof l=="string"?(a!=="textarea"||l!=="")&&An(e,l):typeof l=="number"&&An(e,""+l):r!=="suppressContentEditableWarning"&&r!=="suppressHydrationWarning"&&r!=="autoFocus"&&(jn.hasOwnProperty(r)?l!=null&&r==="onScroll"&&H("scroll",e):l!=null&&ls(e,r,l,o))}switch(a){case"input":Qi(e),ad(e,n,!1);break;case"textarea":Qi(e),rd(e);break;case"option":n.value!=null&&e.setAttribute("value",""+Pt(n.value));break;case"select":e.multiple=!!n.multiple,r=n.value,r!=null?Na(e,!!n.multiple,r,!1):n.defaultValue!=null&&Na(e,!!n.multiple,n.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=gr)}um(a,n)&&(t.flags|=4)}t.ref!==null&&(t.flags|=128)}return null;case 6:if(e&&t.stateNode!=null)up(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error($(166));a=la(ii.current),la(nt.current),Ar(t)?(n=t.stateNode,a=t.memoizedProps,n[Ft]=t,n.nodeValue!==a&&(t.flags|=4)):(n=(a.nodeType===9?a:a.ownerDocument).createTextNode(n),n[Ft]=t,t.stateNode=n)}return null;case 13:return W(Q),n=t.memoizedState,t.flags&64?(t.lanes=a,t):(n=n!==null,a=!1,e===null?t.memoizedProps.fallback!==void 0&&Ar(t):a=e.memoizedState!==null,n&&!a&&t.mode&2&&(e===null&&t.memoizedProps.unstable_avoidThisFallback!==!0||Q.current&1?de===0&&(de=3):((de===0||de===3)&&(de=4),xe===null||!(mi&134217727)&&!(Qa&134217727)||en(xe,we))),(n||a)&&(t.flags|=4),null);case 4:return qa(),Fl(t),e===null&&im(t.stateNode.containerInfo),null;case 10:return bl(t),null;case 17:return Te(t.type)&&kr(),null;case 19:if(W(Q),n=t.memoizedState,n===null)return null;if(r=(t.flags&64)!==0,o=n.rendering,o===null)if(r)di(n,!1);else{if(de!==0||e!==null&&e.flags&64)for(e=t.child;e!==null;){if(o=Nr(e),o!==null){for(t.flags|=64,di(n,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),n.lastEffect===null&&(t.firstEffect=null),t.lastEffect=n.lastEffect,n=a,a=t.child;a!==null;)r=a,e=n,r.flags&=2,r.nextEffect=null,r.firstEffect=null,r.lastEffect=null,o=r.alternate,o===null?(r.childLanes=0,r.lanes=e,r.child=null,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null):(r.childLanes=o.childLanes,r.lanes=o.lanes,r.child=o.child,r.memoizedProps=o.memoizedProps,r.memoizedState=o.memoizedState,r.updateQueue=o.updateQueue,r.type=o.type,e=o.dependencies,r.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),a=a.sibling;return Z(Q,Q.current&1|2),t.child}e=e.sibling}n.tail!==null&&ke()>Wl&&(t.flags|=64,r=!0,di(n,!1),t.lanes=33554432)}else{if(!r)if(e=Nr(o),e!==null){if(t.flags|=64,r=!0,a=e.updateQueue,a!==null&&(t.updateQueue=a,t.flags|=4),di(n,!0),n.tail===null&&n.tailMode==="hidden"&&!o.alternate&&!it)return t=t.lastEffect=n.lastEffect,t!==null&&(t.nextEffect=null),null}else 2*ke()-n.renderingStartTime>Wl&&a!==1073741824&&(t.flags|=64,r=!0,di(n,!1),t.lanes=33554432);n.isBackwards?(o.sibling=t.child,t.child=o):(a=n.last,a!==null?a.sibling=o:t.child=o,n.last=o)}return n.tail!==null?(a=n.tail,n.rendering=a,n.tail=a.sibling,n.lastEffect=t.lastEffect,n.renderingStartTime=ke(),a.sibling=null,t=Q.current,Z(Q,r?t&1|2:t&1),a):null;case 23:case 24:return Ql(),e!==null&&e.memoizedState!==null!=(t.memoizedState!==null)&&n.mode!=="unstable-defer-without-hiding"&&(t.flags|=4),null}throw Error($(156,t.tag))}function Py(e){switch(e.tag){case 1:Te(e.type)&&kr();var t=e.flags;return t&4096?(e.flags=t&-4097|64,e):null;case 3:if(qa(),W($e),W(ye),El(),t=e.flags,t&64)throw Error($(285));return e.flags=t&-4097|64,e;case 5:return wl(e),null;case 13:return W(Q),t=e.flags,t&4096?(e.flags=t&-4097|64,e):null;case 19:return W(Q),null;case 4:return qa(),null;case 10:return bl(e),null;case 23:case 24:return Ql(),null;default:return null}}function Ml(e,t){try{var a="",n=t;do a+=lb(n),n=n.return;while(n);var i=a}catch(r){i=`
|
|
37
|
+
`+i[o].replace(" at new "," at ");while(1<=o&&0<=s);break}}}finally{ys=!1,Error.prepareStackTrace=a}return(e=e?e.displayName||e.name:"")?Nn(e):""}function lb(e){switch(e.tag){case 5:return Nn(e.type);case 16:return Nn("Lazy");case 13:return Nn("Suspense");case 19:return Nn("SuspenseList");case 0:case 2:case 15:return e=Zi(e.type,!1),e;case 11:return e=Zi(e.type.render,!1),e;case 22:return e=Zi(e.type._render,!1),e;case 1:return e=Zi(e.type,!0),e;default:return""}}function za(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Tt:return"Fragment";case ta:return"Portal";case Tn:return"Profiler";case us:return"StrictMode";case Pn:return"Suspense";case qi:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ds:return(e.displayName||"Context")+".Consumer";case cs:return(e._context.displayName||"Context")+".Provider";case Gi:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case Ji:return za(e.type);case ps:return za(e._render);case ms:t=e._payload,e=e._init;try{return za(e(t))}catch{}}return null}function Pt(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function Qc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ub(e){var t=Qc(e)?"checked":"value",a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var i=a.get,r=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){n=""+o,r.call(this,o)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Qi(e){e._valueTracker||(e._valueTracker=ub(e))}function Xc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),n="";return e&&(n=Qc(e)?e.checked?"true":"false":e.value),e=n,e!==a?(t.setValue(e),!0):!1}function Xi(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function ks(e,t){var a=t.checked;return G({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:a??e._wrapperState.initialChecked})}function ed(e,t){var a=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;a=Pt(t.value!=null?t.value:a),e._wrapperState={initialChecked:n,initialValue:a,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function td(e,t){t=t.checked,t!=null&&ls(e,"checked",t,!1)}function vs(e,t){td(e,t);var a=Pt(t.value),n=t.type;if(a!=null)n==="number"?(a===0&&e.value===""||e.value!=a)&&(e.value=""+a):e.value!==""+a&&(e.value=""+a);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ws(e,t.type,a):t.hasOwnProperty("defaultValue")&&ws(e,t.type,Pt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function ad(e,t,a){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,a||t===e.value||(e.value=t),e.defaultValue=t}a=e.name,a!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,a!==""&&(e.name=a)}function ws(e,t,a){(t!=="number"||Xi(e.ownerDocument)!==e)&&(a==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+a&&(e.defaultValue=""+a))}function cb(e){var t="";return Ki.Children.forEach(e,function(a){a!=null&&(t+=a)}),t}function Ss(e,t){return e=G({children:void 0},t),(t=cb(t.children))&&(e.children=t),e}function Na(e,t,a,n){if(e=e.options,t){t={};for(var i=0;i<a.length;i++)t["$"+a[i]]=!0;for(a=0;a<e.length;a++)i=t.hasOwnProperty("$"+e[a].value),e[a].selected!==i&&(e[a].selected=i),i&&n&&(e[a].defaultSelected=!0)}else{for(a=""+Pt(a),t=null,i=0;i<e.length;i++){if(e[i].value===a){e[i].selected=!0,n&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function xs(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error($(91));return G({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function nd(e,t){var a=t.value;if(a==null){if(a=t.children,t=t.defaultValue,a!=null){if(t!=null)throw Error($(92));if(Array.isArray(a)){if(!(1>=a.length))throw Error($(93));a=a[0]}t=a}t==null&&(t=""),a=t}e._wrapperState={initialValue:Pt(a)}}function id(e,t){var a=Pt(t.value),n=Pt(t.defaultValue);a!=null&&(a=""+a,a!==e.value&&(e.value=a),t.defaultValue==null&&e.defaultValue!==a&&(e.defaultValue=a)),n!=null&&(e.defaultValue=""+n)}function rd(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}var Es={html:"http://www.w3.org/1999/xhtml",svg:"http://www.w3.org/2000/svg"};function od(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Cs(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?od(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var er,sd=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,a,n,i){MSApp.execUnsafeLocalFunction(function(){return e(t,a,n,i)})}:e}(function(e,t){if(e.namespaceURI!==Es.svg||"innerHTML"in e)e.innerHTML=t;else{for(er=er||document.createElement("div"),er.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=er.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function An(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var In={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},db=["Webkit","ms","Moz","O"];Object.keys(In).forEach(function(e){db.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),In[t]=In[e]})});function ld(e,t,a){return t==null||typeof t=="boolean"||t===""?"":a||typeof t!="number"||t===0||In.hasOwnProperty(e)&&In[e]?(""+t).trim():t+"px"}function ud(e,t){e=e.style;for(var a in t)if(t.hasOwnProperty(a)){var n=a.indexOf("--")===0,i=ld(a,t[a],n);a==="float"&&(a="cssFloat"),n?e.setProperty(a,i):e[a]=i}}var mb=G({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function js(e,t){if(t){if(mb[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error($(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error($(60));if(!(typeof t.dangerouslySetInnerHTML=="object"&&"__html"in t.dangerouslySetInnerHTML))throw Error($(61))}if(t.style!=null&&typeof t.style!="object")throw Error($(62))}}function $s(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function Ts(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ps=null,Aa=null,Ia=null;function cd(e){if(e=Qn(e)){if(typeof Ps!="function")throw Error($(280));var t=e.stateNode;t&&(t=yr(t),Ps(e.stateNode,e.type,t))}}function dd(e){Aa?Ia?Ia.push(e):Ia=[e]:Aa=e}function md(){if(Aa){var e=Aa,t=Ia;if(Ia=Aa=null,cd(e),t)for(e=0;e<t.length;e++)cd(t[e])}}function zs(e,t){return e(t)}function pd(e,t,a,n,i){return e(t,a,n,i)}function Ns(){}var hd=zs,aa=!1,As=!1;function Is(){(Aa!==null||Ia!==null)&&(Ns(),md())}function pb(e,t,a){if(As)return e(t,a);As=!0;try{return hd(e,t,a)}finally{As=!1,Is()}}function Dn(e,t){var a=e.stateNode;if(a===null)return null;var n=yr(a);if(n===null)return null;a=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error($(231,t,typeof a));return a}var Ds=!1;if(gt)try{var Fn={};Object.defineProperty(Fn,"passive",{get:function(){Ds=!0}}),window.addEventListener("test",Fn,Fn),window.removeEventListener("test",Fn,Fn)}catch{Ds=!1}function hb(e,t,a,n,i,r,o,s,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(a,c)}catch(d){this.onError(d)}}var Mn=!1,tr=null,ar=!1,Fs=null,gb={onError:function(e){Mn=!0,tr=e}};function fb(e,t,a,n,i,r,o,s,l){Mn=!1,tr=null,hb.apply(gb,arguments)}function bb(e,t,a,n,i,r,o,s,l){if(fb.apply(this,arguments),Mn){if(Mn){var c=tr;Mn=!1,tr=null}else throw Error($(198));ar||(ar=!0,Fs=c)}}function na(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&1026&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function gd(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function fd(e){if(na(e)!==e)throw Error($(188))}function yb(e){var t=e.alternate;if(!t){if(t=na(e),t===null)throw Error($(188));return t!==e?null:e}for(var a=e,n=t;;){var i=a.return;if(i===null)break;var r=i.alternate;if(r===null){if(n=i.return,n!==null){a=n;continue}break}if(i.child===r.child){for(r=i.child;r;){if(r===a)return fd(i),e;if(r===n)return fd(i),t;r=r.sibling}throw Error($(188))}if(a.return!==n.return)a=i,n=r;else{for(var o=!1,s=i.child;s;){if(s===a){o=!0,a=i,n=r;break}if(s===n){o=!0,n=i,a=r;break}s=s.sibling}if(!o){for(s=r.child;s;){if(s===a){o=!0,a=r,n=i;break}if(s===n){o=!0,n=r,a=i;break}s=s.sibling}if(!o)throw Error($(189))}}if(a.alternate!==n)throw Error($(190))}if(a.tag!==3)throw Error($(188));return a.stateNode.current===a?e:t}function bd(e){if(e=yb(e),!e)return null;for(var t=e;;){if(t.tag===5||t.tag===6)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function yd(e,t){for(var a=e.alternate;t!==null;){if(t===e||t===a)return!0;t=t.return}return!1}var kd,Ms,vd,wd,_s=!1,tt=[],zt=null,Nt=null,At=null,_n=new Map,Yn=new Map,Rn=[],Sd="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Ys(e,t,a,n,i){return{blockedOn:e,domEventName:t,eventSystemFlags:a|16,nativeEvent:i,targetContainers:[n]}}function xd(e,t){switch(e){case"focusin":case"focusout":zt=null;break;case"dragenter":case"dragleave":Nt=null;break;case"mouseover":case"mouseout":At=null;break;case"pointerover":case"pointerout":_n.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Yn.delete(t.pointerId)}}function Un(e,t,a,n,i,r){return e===null||e.nativeEvent!==r?(e=Ys(t,a,n,i,r),t!==null&&(t=Qn(t),t!==null&&Ms(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function kb(e,t,a,n,i){switch(t){case"focusin":return zt=Un(zt,e,t,a,n,i),!0;case"dragenter":return Nt=Un(Nt,e,t,a,n,i),!0;case"mouseover":return At=Un(At,e,t,a,n,i),!0;case"pointerover":var r=i.pointerId;return _n.set(r,Un(_n.get(r)||null,e,t,a,n,i)),!0;case"gotpointercapture":return r=i.pointerId,Yn.set(r,Un(Yn.get(r)||null,e,t,a,n,i)),!0}return!1}function vb(e){var t=ia(e.target);if(t!==null){var a=na(t);if(a!==null){if(t=a.tag,t===13){if(t=gd(a),t!==null){e.blockedOn=t,wd(e.lanePriority,function(){oe.unstable_runWithPriority(e.priority,function(){vd(a)})});return}}else if(t===3&&a.stateNode.hydrate){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function nr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=Vs(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(a!==null)return t=Qn(a),t!==null&&Ms(t),e.blockedOn=a,!1;t.shift()}return!0}function Ed(e,t,a){nr(e)&&a.delete(t)}function wb(){for(_s=!1;0<tt.length;){var e=tt[0];if(e.blockedOn!==null){e=Qn(e.blockedOn),e!==null&&kd(e);break}for(var t=e.targetContainers;0<t.length;){var a=Vs(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(a!==null){e.blockedOn=a;break}t.shift()}e.blockedOn===null&&tt.shift()}zt!==null&&nr(zt)&&(zt=null),Nt!==null&&nr(Nt)&&(Nt=null),At!==null&&nr(At)&&(At=null),_n.forEach(Ed),Yn.forEach(Ed)}function Ln(e,t){e.blockedOn===t&&(e.blockedOn=null,_s||(_s=!0,oe.unstable_scheduleCallback(oe.unstable_NormalPriority,wb)))}function Cd(e){function t(i){return Ln(i,e)}if(0<tt.length){Ln(tt[0],e);for(var a=1;a<tt.length;a++){var n=tt[a];n.blockedOn===e&&(n.blockedOn=null)}}for(zt!==null&&Ln(zt,e),Nt!==null&&Ln(Nt,e),At!==null&&Ln(At,e),_n.forEach(t),Yn.forEach(t),a=0;a<Rn.length;a++)n=Rn[a],n.blockedOn===e&&(n.blockedOn=null);for(;0<Rn.length&&(a=Rn[0],a.blockedOn===null);)vb(a),a.blockedOn===null&&Rn.shift()}function ir(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var Da={animationend:ir("Animation","AnimationEnd"),animationiteration:ir("Animation","AnimationIteration"),animationstart:ir("Animation","AnimationStart"),transitionend:ir("Transition","TransitionEnd")},Rs={},jd={};gt&&(jd=document.createElement("div").style,"AnimationEvent"in window||(delete Da.animationend.animation,delete Da.animationiteration.animation,delete Da.animationstart.animation),"TransitionEvent"in window||delete Da.transitionend.transition);function rr(e){if(Rs[e])return Rs[e];if(!Da[e])return e;var t=Da[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in jd)return Rs[e]=t[a];return e}var $d=rr("animationend"),Td=rr("animationiteration"),Pd=rr("animationstart"),zd=rr("transitionend"),Nd=new Map,Us=new Map,Sb=["abort","abort",$d,"animationEnd",Td,"animationIteration",Pd,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",zd,"transitionEnd","waiting","waiting"];function Ls(e,t){for(var a=0;a<e.length;a+=2){var n=e[a],i=e[a+1];i="on"+(i[0].toUpperCase()+i.slice(1)),Us.set(n,t),Nd.set(n,i),Xt(i,[n])}}var xb=oe.unstable_now;xb();var O=8;function Fa(e){if(1&e)return O=15,1;if(2&e)return O=14,2;if(4&e)return O=13,4;var t=24&e;return t!==0?(O=12,t):e&32?(O=11,32):(t=192&e,t!==0?(O=10,t):e&256?(O=9,256):(t=3584&e,t!==0?(O=8,t):e&4096?(O=7,4096):(t=4186112&e,t!==0?(O=6,t):(t=62914560&e,t!==0?(O=5,t):e&67108864?(O=4,67108864):e&134217728?(O=3,134217728):(t=805306368&e,t!==0?(O=2,t):1073741824&e?(O=1,1073741824):(O=8,e))))))}function Eb(e){switch(e){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}function Cb(e){switch(e){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error($(358,e))}}function Bn(e,t){var a=e.pendingLanes;if(a===0)return O=0;var n=0,i=0,r=e.expiredLanes,o=e.suspendedLanes,s=e.pingedLanes;if(r!==0)n=r,i=O=15;else if(r=a&134217727,r!==0){var l=r&~o;l!==0?(n=Fa(l),i=O):(s&=r,s!==0&&(n=Fa(s),i=O))}else r=a&~o,r!==0?(n=Fa(r),i=O):s!==0&&(n=Fa(s),i=O);if(n===0)return 0;if(n=31-It(n),n=a&((0>n?0:1<<n)<<1)-1,t!==0&&t!==n&&!(t&o)){if(Fa(t),i<=O)return t;O=i}if(t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)a=31-It(t),i=1<<a,n|=e[a],t&=~i;return n}function Ad(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function or(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return e=Ma(24&~t),e===0?or(10,t):e;case 10:return e=Ma(192&~t),e===0?or(8,t):e;case 8:return e=Ma(3584&~t),e===0&&(e=Ma(4186112&~t),e===0&&(e=512)),e;case 2:return t=Ma(805306368&~t),t===0&&(t=268435456),t}throw Error($(358,e))}function Ma(e){return e&-e}function Bs(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function sr(e,t,a){e.pendingLanes|=t;var n=t-1;e.suspendedLanes&=n,e.pingedLanes&=n,e=e.eventTimes,t=31-It(t),e[t]=a}var It=Math.clz32?Math.clz32:Tb,jb=Math.log,$b=Math.LN2;function Tb(e){return e===0?32:31-(jb(e)/$b|0)|0}var Pb=oe.unstable_UserBlockingPriority,zb=oe.unstable_runWithPriority,lr=!0;function Nb(e,t,a,n){aa||Ns();var i=Os,r=aa;aa=!0;try{pd(i,e,t,a,n)}finally{(aa=r)||Is()}}function Ab(e,t,a,n){zb(Pb,Os.bind(null,e,t,a,n))}function Os(e,t,a,n){if(lr){var i;if((i=(t&4)===0)&&0<tt.length&&-1<Sd.indexOf(e))e=Ys(null,e,t,a,n),tt.push(e);else{var r=Vs(e,t,a,n);if(r===null)i&&xd(e,n);else{if(i){if(-1<Sd.indexOf(e)){e=Ys(r,e,t,a,n),tt.push(e);return}if(kb(r,e,t,a,n))return;xd(e,n)}sm(e,t,n,null,a)}}}}function Vs(e,t,a,n){var i=Ts(n);if(i=ia(i),i!==null){var r=na(i);if(r===null)i=null;else{var o=r.tag;if(o===13){if(i=gd(r),i!==null)return i;i=null}else if(o===3){if(r.stateNode.hydrate)return r.tag===3?r.stateNode.containerInfo:null;i=null}else r!==i&&(i=null)}}return sm(e,t,n,i,a),null}var Dt=null,Hs=null,ur=null;function Id(){if(ur)return ur;var e,t=Hs,a=t.length,n,i="value"in Dt?Dt.value:Dt.textContent,r=i.length;for(e=0;e<a&&t[e]===i[e];e++);var o=a-e;for(n=1;n<=o&&t[a-n]===i[r-n];n++);return ur=i.slice(e,1<n?1-n:void 0)}function cr(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function dr(){return!0}function Dd(){return!1}function Ae(e){function t(a,n,i,r,o){this._reactName=a,this._targetInst=i,this.type=n,this.nativeEvent=r,this.target=o,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(a=e[s],this[s]=a?a(r):r[s]);return this.isDefaultPrevented=(r.defaultPrevented!=null?r.defaultPrevented:r.returnValue===!1)?dr:Dd,this.isPropagationStopped=Dd,this}return G(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=dr)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=dr)},persist:function(){},isPersistent:dr}),t}var _a={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ws=Ae(_a),On=G({},_a,{view:0,detail:0}),Ib=Ae(On),Ks,Gs,Vn,mr=G({},On,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Js,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Vn&&(Vn&&e.type==="mousemove"?(Ks=e.screenX-Vn.screenX,Gs=e.screenY-Vn.screenY):Gs=Ks=0,Vn=e),Ks)},movementY:function(e){return"movementY"in e?e.movementY:Gs}}),Fd=Ae(mr),Db=G({},mr,{dataTransfer:0}),Fb=Ae(Db),Mb=G({},On,{relatedTarget:0}),qs=Ae(Mb),_b=G({},_a,{animationName:0,elapsedTime:0,pseudoElement:0}),Yb=Ae(_b),Rb=G({},_a,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Ub=Ae(Rb),Lb=G({},_a,{data:0}),Md=Ae(Lb),Bb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ob={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Vb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Hb(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Vb[e])?!!t[e]:!1}function Js(){return Hb}var Wb=G({},On,{key:function(e){if(e.key){var t=Bb[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=cr(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Ob[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Js,charCode:function(e){return e.type==="keypress"?cr(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?cr(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Kb=Ae(Wb),Gb=G({},mr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),_d=Ae(Gb),qb=G({},On,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Js}),Jb=Ae(qb),Zb=G({},_a,{propertyName:0,elapsedTime:0,pseudoElement:0}),Qb=Ae(Zb),Xb=G({},mr,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),ey=Ae(Xb),ty=[9,13,27,32],Zs=gt&&"CompositionEvent"in window,Hn=null;gt&&"documentMode"in document&&(Hn=document.documentMode);var ay=gt&&"TextEvent"in window&&!Hn,Yd=gt&&(!Zs||Hn&&8<Hn&&11>=Hn),Rd=" ",Ud=!1;function Ld(e,t){switch(e){case"keyup":return ty.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Bd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ya=!1;function ny(e,t){switch(e){case"compositionend":return Bd(t);case"keypress":return t.which!==32?null:(Ud=!0,Rd);case"textInput":return e=t.data,e===Rd&&Ud?null:e;default:return null}}function iy(e,t){if(Ya)return e==="compositionend"||!Zs&&Ld(e,t)?(e=Id(),ur=Hs=Dt=null,Ya=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Yd&&t.locale!=="ko"?null:t.data;default:return null}}var ry={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Od(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!ry[e.type]:t==="textarea"}function Vd(e,t,a,n){dd(n),t=hr(t,"onChange"),0<t.length&&(a=new Ws("onChange","change",null,a,n),e.push({event:a,listeners:t}))}var Wn=null,Kn=null;function oy(e){am(e,0)}function pr(e){var t=Oa(e);if(Xc(t))return e}function sy(e,t){if(e==="change")return t}var Hd=!1;if(gt){var Qs;if(gt){var Xs="oninput"in document;if(!Xs){var Wd=document.createElement("div");Wd.setAttribute("oninput","return;"),Xs=typeof Wd.oninput=="function"}Qs=Xs}else Qs=!1;Hd=Qs&&(!document.documentMode||9<document.documentMode)}function Kd(){Wn&&(Wn.detachEvent("onpropertychange",Gd),Kn=Wn=null)}function Gd(e){if(e.propertyName==="value"&&pr(Kn)){var t=[];if(Vd(t,Kn,e,Ts(e)),e=oy,aa)e(t);else{aa=!0;try{zs(e,t)}finally{aa=!1,Is()}}}}function ly(e,t,a){e==="focusin"?(Kd(),Wn=t,Kn=a,Wn.attachEvent("onpropertychange",Gd)):e==="focusout"&&Kd()}function uy(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return pr(Kn)}function cy(e,t){if(e==="click")return pr(t)}function dy(e,t){if(e==="input"||e==="change")return pr(t)}function my(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Re=typeof Object.is=="function"?Object.is:my,py=Object.prototype.hasOwnProperty;function Gn(e,t){if(Re(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),n=Object.keys(t);if(a.length!==n.length)return!1;for(n=0;n<a.length;n++)if(!py.call(t,a[n])||!Re(e[a[n]],t[a[n]]))return!1;return!0}function qd(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Jd(e,t){var a=qd(e);e=0;for(var n;a;){if(a.nodeType===3){if(n=e+a.textContent.length,e<=t&&n>=t)return{node:a,offset:t-e};e=n}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=qd(a)}}function Zd(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Zd(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Qd(){for(var e=window,t=Xi();t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=Xi(e.document)}return t}function el(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var hy=gt&&"documentMode"in document&&11>=document.documentMode,Ra=null,tl=null,qn=null,al=!1;function Xd(e,t,a){var n=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;al||Ra==null||Ra!==Xi(n)||(n=Ra,"selectionStart"in n&&el(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),qn&&Gn(qn,n)||(qn=n,n=hr(tl,"onSelect"),0<n.length&&(t=new Ws("onSelect","select",null,t,a),e.push({event:t,listeners:n}),t.target=Ra)))}Ls("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),Ls("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),Ls(Sb,2);for(var em="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),nl=0;nl<em.length;nl++)Us.set(em[nl],0);Pa("onMouseEnter",["mouseout","mouseover"]),Pa("onMouseLeave",["mouseout","mouseover"]),Pa("onPointerEnter",["pointerout","pointerover"]),Pa("onPointerLeave",["pointerout","pointerover"]),Xt("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Xt("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Xt("onBeforeInput",["compositionend","keypress","textInput","paste"]),Xt("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Xt("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Xt("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Jn="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),gy=new Set("cancel close invalid load scroll toggle".split(" ").concat(Jn));function tm(e,t,a){var n=e.type||"unknown-event";e.currentTarget=a,bb(n,t,void 0,e),e.currentTarget=null}function am(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var n=e[a],i=n.event;n=n.listeners;e:{var r=void 0;if(t)for(var o=n.length-1;0<=o;o--){var s=n[o],l=s.instance,c=s.currentTarget;if(s=s.listener,l!==r&&i.isPropagationStopped())break e;tm(i,s,c),r=l}else for(o=0;o<n.length;o++){if(s=n[o],l=s.instance,c=s.currentTarget,s=s.listener,l!==r&&i.isPropagationStopped())break e;tm(i,s,c),r=l}}}if(ar)throw e=Fs,ar=!1,Fs=null,e}function H(e,t){var a=pm(t),n=e+"__bubble";a.has(n)||(om(t,e,2,!1),a.add(n))}var nm="_reactListening"+Math.random().toString(36).slice(2);function im(e){e[nm]||(e[nm]=!0,Wc.forEach(function(t){gy.has(t)||rm(t,!1,e,null),rm(t,!0,e,null)}))}function rm(e,t,a,n){var i=4<arguments.length&&arguments[4]!==void 0?arguments[4]:0,r=a;e==="selectionchange"&&a.nodeType!==9&&(r=a.ownerDocument);var o=pm(r),s=e+"__"+(t?"capture":"bubble");o.has(s)||(t&&(i|=4),om(r,e,i,t),o.add(s))}function om(e,t,a,n){var i=Us.get(t);switch(i===void 0?2:i){case 0:i=Nb;break;case 1:i=Ab;break;default:i=Os}a=i.bind(null,t,a,e),i=void 0,!Ds||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),n?i!==void 0?e.addEventListener(t,a,{capture:!0,passive:i}):e.addEventListener(t,a,!0):i!==void 0?e.addEventListener(t,a,{passive:i}):e.addEventListener(t,a,!1)}function sm(e,t,a,n,i){var r=n;if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var o=n.tag;if(o===3||o===4){var s=n.stateNode.containerInfo;if(s===i||s.nodeType===8&&s.parentNode===i)break;if(o===4)for(o=n.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;o=o.return}for(;s!==null;){if(o=ia(s),o===null)return;if(l=o.tag,l===5||l===6){n=r=o;continue e}s=s.parentNode}}n=n.return}pb(function(){var c=r,d=Ts(a),p=[];e:{var m=Nd.get(e);if(m!==void 0){var g=Ws,b=e;switch(e){case"keypress":if(cr(a)===0)break e;case"keydown":case"keyup":g=Kb;break;case"focusin":b="focus",g=qs;break;case"focusout":b="blur",g=qs;break;case"beforeblur":case"afterblur":g=qs;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":g=Fd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":g=Fb;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":g=Jb;break;case $d:case Td:case Pd:g=Yb;break;case zd:g=Qb;break;case"scroll":g=Ib;break;case"wheel":g=ey;break;case"copy":case"cut":case"paste":g=Ub;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":g=_d}var v=(t&4)!==0,f=!v&&e==="scroll",h=v?m!==null?m+"Capture":null:m;v=[];for(var y=c,w;y!==null;){w=y;var S=w.stateNode;if(w.tag===5&&S!==null&&(w=S,h!==null&&(S=Dn(y,h),S!=null&&v.push(Zn(y,S,w)))),f)break;y=y.return}0<v.length&&(m=new g(m,b,null,a,d),p.push({event:m,listeners:v}))}}if(!(t&7)){e:{if(m=e==="mouseover"||e==="pointerover",g=e==="mouseout"||e==="pointerout",m&&!(t&16)&&(b=a.relatedTarget||a.fromElement)&&(ia(b)||b[Ba]))break e;if((g||m)&&(m=d.window===d?d:(m=d.ownerDocument)?m.defaultView||m.parentWindow:window,g?(b=a.relatedTarget||a.toElement,g=c,b=b?ia(b):null,b!==null&&(f=na(b),b!==f||b.tag!==5&&b.tag!==6)&&(b=null)):(g=null,b=c),g!==b)){if(v=Fd,S="onMouseLeave",h="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(v=_d,S="onPointerLeave",h="onPointerEnter",y="pointer"),f=g==null?m:Oa(g),w=b==null?m:Oa(b),m=new v(S,y+"leave",g,a,d),m.target=f,m.relatedTarget=w,S=null,ia(d)===c&&(v=new v(h,y+"enter",b,a,d),v.target=w,v.relatedTarget=f,S=v),f=S,g&&b)t:{for(v=g,h=b,y=0,w=v;w;w=Ua(w))y++;for(w=0,S=h;S;S=Ua(S))w++;for(;0<y-w;)v=Ua(v),y--;for(;0<w-y;)h=Ua(h),w--;for(;y--;){if(v===h||h!==null&&v===h.alternate)break t;v=Ua(v),h=Ua(h)}v=null}else v=null;g!==null&&lm(p,m,g,v,!1),b!==null&&f!==null&&lm(p,f,b,v,!0)}}e:{if(m=c?Oa(c):window,g=m.nodeName&&m.nodeName.toLowerCase(),g==="select"||g==="input"&&m.type==="file")var j=sy;else if(Od(m))if(Hd)j=dy;else{j=uy;var x=ly}else(g=m.nodeName)&&g.toLowerCase()==="input"&&(m.type==="checkbox"||m.type==="radio")&&(j=cy);if(j&&(j=j(e,c))){Vd(p,j,a,d);break e}x&&x(e,m,c),e==="focusout"&&(x=m._wrapperState)&&x.controlled&&m.type==="number"&&ws(m,"number",m.value)}switch(x=c?Oa(c):window,e){case"focusin":(Od(x)||x.contentEditable==="true")&&(Ra=x,tl=c,qn=null);break;case"focusout":qn=tl=Ra=null;break;case"mousedown":al=!0;break;case"contextmenu":case"mouseup":case"dragend":al=!1,Xd(p,a,d);break;case"selectionchange":if(hy)break;case"keydown":case"keyup":Xd(p,a,d)}var C;if(Zs)e:{switch(e){case"compositionstart":var z="onCompositionStart";break e;case"compositionend":z="onCompositionEnd";break e;case"compositionupdate":z="onCompositionUpdate";break e}z=void 0}else Ya?Ld(e,a)&&(z="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(z="onCompositionStart");z&&(Yd&&a.locale!=="ko"&&(Ya||z!=="onCompositionStart"?z==="onCompositionEnd"&&Ya&&(C=Id()):(Dt=d,Hs="value"in Dt?Dt.value:Dt.textContent,Ya=!0)),x=hr(c,z),0<x.length&&(z=new Md(z,e,null,a,d),p.push({event:z,listeners:x}),C?z.data=C:(C=Bd(a),C!==null&&(z.data=C)))),(C=ay?ny(e,a):iy(e,a))&&(c=hr(c,"onBeforeInput"),0<c.length&&(d=new Md("onBeforeInput","beforeinput",null,a,d),p.push({event:d,listeners:c}),d.data=C))}am(p,t)})}function Zn(e,t,a){return{instance:e,listener:t,currentTarget:a}}function hr(e,t){for(var a=t+"Capture",n=[];e!==null;){var i=e,r=i.stateNode;i.tag===5&&r!==null&&(i=r,r=Dn(e,a),r!=null&&n.unshift(Zn(e,r,i)),r=Dn(e,t),r!=null&&n.push(Zn(e,r,i))),e=e.return}return n}function Ua(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function lm(e,t,a,n,i){for(var r=t._reactName,o=[];a!==null&&a!==n;){var s=a,l=s.alternate,c=s.stateNode;if(l!==null&&l===n)break;s.tag===5&&c!==null&&(s=c,i?(l=Dn(a,r),l!=null&&o.unshift(Zn(a,l,s))):i||(l=Dn(a,r),l!=null&&o.push(Zn(a,l,s)))),a=a.return}o.length!==0&&e.push({event:t,listeners:o})}function gr(){}var il=null,rl=null;function um(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function ol(e,t){return e==="textarea"||e==="option"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var cm=typeof setTimeout=="function"?setTimeout:void 0,fy=typeof clearTimeout=="function"?clearTimeout:void 0;function sl(e){e.nodeType===1?e.textContent="":e.nodeType===9&&(e=e.body,e!=null&&(e.textContent=""))}function La(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break}return e}function dm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"){if(t===0)return e;t--}else a==="/$"&&t++}e=e.previousSibling}return null}var ll=0;function by(e){return{$$typeof:hs,toString:e,valueOf:e}}var fr=Math.random().toString(36).slice(2),Ft="__reactFiber$"+fr,br="__reactProps$"+fr,Ba="__reactContainer$"+fr,mm="__reactEvents$"+fr;function ia(e){var t=e[Ft];if(t)return t;for(var a=e.parentNode;a;){if(t=a[Ba]||a[Ft]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=dm(e);e!==null;){if(a=e[Ft])return a;e=dm(e)}return t}e=a,a=e.parentNode}return null}function Qn(e){return e=e[Ft]||e[Ba],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Oa(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error($(33))}function yr(e){return e[br]||null}function pm(e){var t=e[mm];return t===void 0&&(t=e[mm]=new Set),t}var ul=[],Va=-1;function Mt(e){return{current:e}}function W(e){0>Va||(e.current=ul[Va],ul[Va]=null,Va--)}function Z(e,t){Va++,ul[Va]=e.current,e.current=t}var _t={},ye=Mt(_t),$e=Mt(!1),ra=_t;function Ha(e,t){var a=e.type.contextTypes;if(!a)return _t;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var i={},r;for(r in a)i[r]=t[r];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Te(e){return e=e.childContextTypes,e!=null}function kr(){W($e),W(ye)}function hm(e,t,a){if(ye.current!==_t)throw Error($(168));Z(ye,t),Z($e,a)}function gm(e,t,a){var n=e.stateNode;if(e=t.childContextTypes,typeof n.getChildContext!="function")return a;n=n.getChildContext();for(var i in n)if(!(i in e))throw Error($(108,za(t)||"Unknown",i));return G({},a,n)}function vr(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||_t,ra=ye.current,Z(ye,e),Z($e,$e.current),!0}function fm(e,t,a){var n=e.stateNode;if(!n)throw Error($(169));a?(e=gm(e,t,ra),n.__reactInternalMemoizedMergedChildContext=e,W($e),W(ye),Z(ye,e)):W($e),Z($e,a)}var cl=null,oa=null,yy=oe.unstable_runWithPriority,dl=oe.unstable_scheduleCallback,ml=oe.unstable_cancelCallback,ky=oe.unstable_shouldYield,bm=oe.unstable_requestPaint,pl=oe.unstable_now,vy=oe.unstable_getCurrentPriorityLevel,wr=oe.unstable_ImmediatePriority,ym=oe.unstable_UserBlockingPriority,km=oe.unstable_NormalPriority,vm=oe.unstable_LowPriority,wm=oe.unstable_IdlePriority,hl={},wy=bm!==void 0?bm:function(){},ft=null,Sr=null,gl=!1,Sm=pl(),ke=1e4>Sm?pl:function(){return pl()-Sm};function Wa(){switch(vy()){case wr:return 99;case ym:return 98;case km:return 97;case vm:return 96;case wm:return 95;default:throw Error($(332))}}function xm(e){switch(e){case 99:return wr;case 98:return ym;case 97:return km;case 96:return vm;case 95:return wm;default:throw Error($(332))}}function sa(e,t){return e=xm(e),yy(e,t)}function Xn(e,t,a){return e=xm(e),dl(e,t,a)}function at(){if(Sr!==null){var e=Sr;Sr=null,ml(e)}Em()}function Em(){if(!gl&&ft!==null){gl=!0;var e=0;try{var t=ft;sa(99,function(){for(;e<t.length;e++){var a=t[e];do a=a(!0);while(a!==null)}}),ft=null}catch(a){throw ft!==null&&(ft=ft.slice(e+1)),dl(wr,at),a}finally{gl=!1}}}var Sy=ea.ReactCurrentBatchConfig;function Ge(e,t){if(e&&e.defaultProps){t=G({},t),e=e.defaultProps;for(var a in e)t[a]===void 0&&(t[a]=e[a]);return t}return t}var xr=Mt(null),Er=null,Ka=null,Cr=null;function fl(){Cr=Ka=Er=null}function bl(e){var t=xr.current;W(xr),e.type._context._currentValue=t}function Cm(e,t){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)===t){if(a===null||(a.childLanes&t)===t)break;a.childLanes|=t}else e.childLanes|=t,a!==null&&(a.childLanes|=t);e=e.return}}function Ga(e,t){Er=e,Cr=Ka=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(qe=!0),e.firstContext=null)}function Ue(e,t){if(Cr!==e&&t!==!1&&t!==0)if((typeof t!="number"||t===1073741823)&&(Cr=e,t=1073741823),t={context:e,observedBits:t,next:null},Ka===null){if(Er===null)throw Error($(308));Ka=t,Er.dependencies={lanes:0,firstContext:t,responders:null}}else Ka=Ka.next=t;return e._currentValue}var Yt=!1;function yl(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function jm(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Rt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ut(e,t){if(e=e.updateQueue,e!==null){e=e.shared;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}}function $m(e,t){var a=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,a===n)){var i=null,r=null;if(a=a.firstBaseUpdate,a!==null){do{var o={eventTime:a.eventTime,lane:a.lane,tag:a.tag,payload:a.payload,callback:a.callback,next:null};r===null?i=r=o:r=r.next=o,a=a.next}while(a!==null);r===null?i=r=t:r=r.next=t}else i=r=t;a={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:r,shared:n.shared,effects:n.effects},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}function ei(e,t,a,n){var i=e.updateQueue;Yt=!1;var r=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var l=s,c=l.next;l.next=null,o===null?r=c:o.next=c,o=l;var d=e.alternate;if(d!==null){d=d.updateQueue;var p=d.lastBaseUpdate;p!==o&&(p===null?d.firstBaseUpdate=c:p.next=c,d.lastBaseUpdate=l)}}if(r!==null){p=i.baseState,o=0,d=c=l=null;do{s=r.lane;var m=r.eventTime;if((n&s)===s){d!==null&&(d=d.next={eventTime:m,lane:0,tag:r.tag,payload:r.payload,callback:r.callback,next:null});e:{var g=e,b=r;switch(s=t,m=a,b.tag){case 1:if(g=b.payload,typeof g=="function"){p=g.call(m,p,s);break e}p=g;break e;case 3:g.flags=g.flags&-4097|64;case 0:if(g=b.payload,s=typeof g=="function"?g.call(m,p,s):g,s==null)break e;p=G({},p,s);break e;case 2:Yt=!0}}r.callback!==null&&(e.flags|=32,s=i.effects,s===null?i.effects=[r]:s.push(r))}else m={eventTime:m,lane:s,tag:r.tag,payload:r.payload,callback:r.callback,next:null},d===null?(c=d=m,l=p):d=d.next=m,o|=s;if(r=r.next,r===null){if(s=i.shared.pending,s===null)break;r=s.next,s.next=null,i.lastBaseUpdate=s,i.shared.pending=null}}while(!0);d===null&&(l=p),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=d,mi|=o,e.lanes=o,e.memoizedState=p}}function Tm(e,t,a){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],i=n.callback;if(i!==null){if(n.callback=null,n=a,typeof i!="function")throw Error($(191,i));i.call(n)}}}var Pm=new Ki.Component().refs;function jr(e,t,a,n){t=e.memoizedState,a=a(n,t),a=a==null?t:G({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var $r={isMounted:function(e){return(e=e._reactInternals)?na(e)===e:!1},enqueueSetState:function(e,t,a){e=e._reactInternals;var n=Ie(),i=Ot(e),r=Rt(n,i);r.payload=t,a!=null&&(r.callback=a),Ut(e,r),Vt(e,i,n)},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var n=Ie(),i=Ot(e),r=Rt(n,i);r.tag=1,r.payload=t,a!=null&&(r.callback=a),Ut(e,r),Vt(e,i,n)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=Ie(),n=Ot(e),i=Rt(a,n);i.tag=2,t!=null&&(i.callback=t),Ut(e,i),Vt(e,n,a)}};function zm(e,t,a,n,i,r,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,r,o):t.prototype&&t.prototype.isPureReactComponent?!Gn(a,n)||!Gn(i,r):!0}function Nm(e,t,a){var n=!1,i=_t,r=t.contextType;return typeof r=="object"&&r!==null?r=Ue(r):(i=Te(t)?ra:ye.current,n=t.contextTypes,r=(n=n!=null)?Ha(e,i):_t),t=new t(a,r),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=$r,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=r),t}function Am(e,t,a,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,n),t.state!==e&&$r.enqueueReplaceState(t,t.state,null)}function kl(e,t,a,n){var i=e.stateNode;i.props=a,i.state=e.memoizedState,i.refs=Pm,yl(e);var r=t.contextType;typeof r=="object"&&r!==null?i.context=Ue(r):(r=Te(t)?ra:ye.current,i.context=Ha(e,r)),ei(e,a,i,n),i.state=e.memoizedState,r=t.getDerivedStateFromProps,typeof r=="function"&&(jr(e,t,r,a),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&$r.enqueueReplaceState(i,i.state,null),ei(e,a,i,n),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4)}var Tr=Array.isArray;function ti(e,t,a){if(e=a.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(a._owner){if(a=a._owner,a){if(a.tag!==1)throw Error($(309));var n=a.stateNode}if(!n)throw Error($(147,e));var i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(r){var o=n.refs;o===Pm&&(o=n.refs={}),r===null?delete o[i]:o[i]=r},t._stringRef=i,t)}if(typeof e!="string")throw Error($(284));if(!a._owner)throw Error($(290,e))}return e}function Pr(e,t){if(e.type!=="textarea")throw Error($(31,Object.prototype.toString.call(t)==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":t))}function Im(e){function t(f,h){if(e){var y=f.lastEffect;y!==null?(y.nextEffect=h,f.lastEffect=h):f.firstEffect=f.lastEffect=h,h.nextEffect=null,h.flags=8}}function a(f,h){if(!e)return null;for(;h!==null;)t(f,h),h=h.sibling;return null}function n(f,h){for(f=new Map;h!==null;)h.key!==null?f.set(h.key,h):f.set(h.index,h),h=h.sibling;return f}function i(f,h){return f=Kt(f,h),f.index=0,f.sibling=null,f}function r(f,h,y){return f.index=y,e?(y=f.alternate,y!==null?(y=y.index,y<h?(f.flags=2,h):y):(f.flags=2,h)):h}function o(f){return e&&f.alternate===null&&(f.flags=2),f}function s(f,h,y,w){return h===null||h.tag!==6?(h=tu(y,f.mode,w),h.return=f,h):(h=i(h,y),h.return=f,h)}function l(f,h,y,w){return h!==null&&h.elementType===y.type?(w=i(h,y.props),w.ref=ti(f,h,y),w.return=f,w):(w=Kr(y.type,y.key,y.props,null,f.mode,w),w.ref=ti(f,h,y),w.return=f,w)}function c(f,h,y,w){return h===null||h.tag!==4||h.stateNode.containerInfo!==y.containerInfo||h.stateNode.implementation!==y.implementation?(h=au(y,f.mode,w),h.return=f,h):(h=i(h,y.children||[]),h.return=f,h)}function d(f,h,y,w,S){return h===null||h.tag!==7?(h=an(y,f.mode,w,S),h.return=f,h):(h=i(h,y),h.return=f,h)}function p(f,h,y){if(typeof h=="string"||typeof h=="number")return h=tu(""+h,f.mode,y),h.return=f,h;if(typeof h=="object"&&h!==null){switch(h.$$typeof){case $n:return y=Kr(h.type,h.key,h.props,null,f.mode,y),y.ref=ti(f,null,h),y.return=f,y;case ta:return h=au(h,f.mode,y),h.return=f,h}if(Tr(h)||zn(h))return h=an(h,f.mode,y,null),h.return=f,h;Pr(f,h)}return null}function m(f,h,y,w){var S=h!==null?h.key:null;if(typeof y=="string"||typeof y=="number")return S!==null?null:s(f,h,""+y,w);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case $n:return y.key===S?y.type===Tt?d(f,h,y.props.children,w,S):l(f,h,y,w):null;case ta:return y.key===S?c(f,h,y,w):null}if(Tr(y)||zn(y))return S!==null?null:d(f,h,y,w,null);Pr(f,y)}return null}function g(f,h,y,w,S){if(typeof w=="string"||typeof w=="number")return f=f.get(y)||null,s(h,f,""+w,S);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case $n:return f=f.get(w.key===null?y:w.key)||null,w.type===Tt?d(h,f,w.props.children,S,w.key):l(h,f,w,S);case ta:return f=f.get(w.key===null?y:w.key)||null,c(h,f,w,S)}if(Tr(w)||zn(w))return f=f.get(y)||null,d(h,f,w,S,null);Pr(h,w)}return null}function b(f,h,y,w){for(var S=null,j=null,x=h,C=h=0,z=null;x!==null&&C<y.length;C++){x.index>C?(z=x,x=null):z=x.sibling;var E=m(f,x,y[C],w);if(E===null){x===null&&(x=z);break}e&&x&&E.alternate===null&&t(f,x),h=r(E,h,C),j===null?S=E:j.sibling=E,j=E,x=z}if(C===y.length)return a(f,x),S;if(x===null){for(;C<y.length;C++)x=p(f,y[C],w),x!==null&&(h=r(x,h,C),j===null?S=x:j.sibling=x,j=x);return S}for(x=n(f,x);C<y.length;C++)z=g(x,f,C,y[C],w),z!==null&&(e&&z.alternate!==null&&x.delete(z.key===null?C:z.key),h=r(z,h,C),j===null?S=z:j.sibling=z,j=z);return e&&x.forEach(function(M){return t(f,M)}),S}function v(f,h,y,w){var S=zn(y);if(typeof S!="function")throw Error($(150));if(y=S.call(y),y==null)throw Error($(151));for(var j=S=null,x=h,C=h=0,z=null,E=y.next();x!==null&&!E.done;C++,E=y.next()){x.index>C?(z=x,x=null):z=x.sibling;var M=m(f,x,E.value,w);if(M===null){x===null&&(x=z);break}e&&x&&M.alternate===null&&t(f,x),h=r(M,h,C),j===null?S=M:j.sibling=M,j=M,x=z}if(E.done)return a(f,x),S;if(x===null){for(;!E.done;C++,E=y.next())E=p(f,E.value,w),E!==null&&(h=r(E,h,C),j===null?S=E:j.sibling=E,j=E);return S}for(x=n(f,x);!E.done;C++,E=y.next())E=g(x,f,C,E.value,w),E!==null&&(e&&E.alternate!==null&&x.delete(E.key===null?C:E.key),h=r(E,h,C),j===null?S=E:j.sibling=E,j=E);return e&&x.forEach(function(K){return t(f,K)}),S}return function(f,h,y,w){var S=typeof y=="object"&&y!==null&&y.type===Tt&&y.key===null;S&&(y=y.props.children);var j=typeof y=="object"&&y!==null;if(j)switch(y.$$typeof){case $n:e:{for(j=y.key,S=h;S!==null;){if(S.key===j){switch(S.tag){case 7:if(y.type===Tt){a(f,S.sibling),h=i(S,y.props.children),h.return=f,f=h;break e}break;default:if(S.elementType===y.type){a(f,S.sibling),h=i(S,y.props),h.ref=ti(f,S,y),h.return=f,f=h;break e}}a(f,S);break}else t(f,S);S=S.sibling}y.type===Tt?(h=an(y.props.children,f.mode,w,y.key),h.return=f,f=h):(w=Kr(y.type,y.key,y.props,null,f.mode,w),w.ref=ti(f,h,y),w.return=f,f=w)}return o(f);case ta:e:{for(S=y.key;h!==null;){if(h.key===S)if(h.tag===4&&h.stateNode.containerInfo===y.containerInfo&&h.stateNode.implementation===y.implementation){a(f,h.sibling),h=i(h,y.children||[]),h.return=f,f=h;break e}else{a(f,h);break}else t(f,h);h=h.sibling}h=au(y,f.mode,w),h.return=f,f=h}return o(f)}if(typeof y=="string"||typeof y=="number")return y=""+y,h!==null&&h.tag===6?(a(f,h.sibling),h=i(h,y),h.return=f,f=h):(a(f,h),h=tu(y,f.mode,w),h.return=f,f=h),o(f);if(Tr(y))return b(f,h,y,w);if(zn(y))return v(f,h,y,w);if(j&&Pr(f,y),typeof y>"u"&&!S)switch(f.tag){case 1:case 22:case 0:case 11:case 15:throw Error($(152,za(f.type)||"Component"))}return a(f,h)}}var zr=Im(!0),Dm=Im(!1),ai={},nt=Mt(ai),ni=Mt(ai),ii=Mt(ai);function la(e){if(e===ai)throw Error($(174));return e}function vl(e,t){switch(Z(ii,t),Z(ni,e),Z(nt,ai),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Cs(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Cs(t,e)}W(nt),Z(nt,t)}function qa(){W(nt),W(ni),W(ii)}function Fm(e){la(ii.current);var t=la(nt.current),a=Cs(t,e.type);t!==a&&(Z(ni,e),Z(nt,a))}function wl(e){ni.current===e&&(W(nt),W(ni))}var Q=Mt(0);function Nr(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||a.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&64)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var bt=null,Lt=null,it=!1;function Mm(e,t){var a=Oe(5,null,null,0);a.elementType="DELETED",a.type="DELETED",a.stateNode=t,a.return=e,a.flags=8,e.lastEffect!==null?(e.lastEffect.nextEffect=a,e.lastEffect=a):e.firstEffect=e.lastEffect=a}function _m(e,t){switch(e.tag){case 5:var a=e.type;return t=t.nodeType!==1||a.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,!0):!1;case 13:return!1;default:return!1}}function Sl(e){if(it){var t=Lt;if(t){var a=t;if(!_m(e,t)){if(t=La(a.nextSibling),!t||!_m(e,t)){e.flags=e.flags&-1025|2,it=!1,bt=e;return}Mm(bt,a)}bt=e,Lt=La(t.firstChild)}else e.flags=e.flags&-1025|2,it=!1,bt=e}}function Ym(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;bt=e}function Ar(e){if(e!==bt)return!1;if(!it)return Ym(e),it=!0,!1;var t=e.type;if(e.tag!==5||t!=="head"&&t!=="body"&&!ol(t,e.memoizedProps))for(t=Lt;t;)Mm(e,t),t=La(t.nextSibling);if(Ym(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error($(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"){if(t===0){Lt=La(e.nextSibling);break e}t--}else a!=="$"&&a!=="$!"&&a!=="$?"||t++}e=e.nextSibling}Lt=null}}else Lt=bt?La(e.stateNode.nextSibling):null;return!0}function xl(){Lt=bt=null,it=!1}var Ja=[];function El(){for(var e=0;e<Ja.length;e++)Ja[e]._workInProgressVersionPrimary=null;Ja.length=0}var ri=ea.ReactCurrentDispatcher,Le=ea.ReactCurrentBatchConfig,oi=0,ee=null,ve=null,ce=null,Ir=!1,si=!1;function Pe(){throw Error($(321))}function Cl(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!Re(e[a],t[a]))return!1;return!0}function jl(e,t,a,n,i,r){if(oi=r,ee=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ri.current=e===null||e.memoizedState===null?Ey:Cy,e=a(n,i),si){r=0;do{if(si=!1,!(25>r))throw Error($(301));r+=1,ce=ve=null,t.updateQueue=null,ri.current=jy,e=a(n,i)}while(si)}if(ri.current=_r,t=ve!==null&&ve.next!==null,oi=0,ce=ve=ee=null,Ir=!1,t)throw Error($(300));return e}function ua(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ce===null?ee.memoizedState=ce=e:ce=ce.next=e,ce}function ca(){if(ve===null){var e=ee.alternate;e=e!==null?e.memoizedState:null}else e=ve.next;var t=ce===null?ee.memoizedState:ce.next;if(t!==null)ce=t,ve=e;else{if(e===null)throw Error($(310));ve=e,e={memoizedState:ve.memoizedState,baseState:ve.baseState,baseQueue:ve.baseQueue,queue:ve.queue,next:null},ce===null?ee.memoizedState=ce=e:ce=ce.next=e}return ce}function rt(e,t){return typeof t=="function"?t(e):t}function li(e){var t=ca(),a=t.queue;if(a===null)throw Error($(311));a.lastRenderedReducer=e;var n=ve,i=n.baseQueue,r=a.pending;if(r!==null){if(i!==null){var o=i.next;i.next=r.next,r.next=o}n.baseQueue=i=r,a.pending=null}if(i!==null){i=i.next,n=n.baseState;var s=o=r=null,l=i;do{var c=l.lane;if((oi&c)===c)s!==null&&(s=s.next={lane:0,action:l.action,eagerReducer:l.eagerReducer,eagerState:l.eagerState,next:null}),n=l.eagerReducer===e?l.eagerState:e(n,l.action);else{var d={lane:c,action:l.action,eagerReducer:l.eagerReducer,eagerState:l.eagerState,next:null};s===null?(o=s=d,r=n):s=s.next=d,ee.lanes|=c,mi|=c}l=l.next}while(l!==null&&l!==i);s===null?r=n:s.next=o,Re(n,t.memoizedState)||(qe=!0),t.memoizedState=n,t.baseState=r,t.baseQueue=s,a.lastRenderedState=n}return[t.memoizedState,a.dispatch]}function ui(e){var t=ca(),a=t.queue;if(a===null)throw Error($(311));a.lastRenderedReducer=e;var n=a.dispatch,i=a.pending,r=t.memoizedState;if(i!==null){a.pending=null;var o=i=i.next;do r=e(r,o.action),o=o.next;while(o!==i);Re(r,t.memoizedState)||(qe=!0),t.memoizedState=r,t.baseQueue===null&&(t.baseState=r),a.lastRenderedState=r}return[r,n]}function Rm(e,t,a){var n=t._getVersion;n=n(t._source);var i=t._workInProgressVersionPrimary;if(i!==null?e=i===n:(e=e.mutableReadLanes,(e=(oi&e)===e)&&(t._workInProgressVersionPrimary=n,Ja.push(t))),e)return a(t._source);throw Ja.push(t),Error($(350))}function Um(e,t,a,n){var i=xe;if(i===null)throw Error($(349));var r=t._getVersion,o=r(t._source),s=ri.current,l=s.useState(function(){return Rm(i,t,a)}),c=l[1],d=l[0];l=ce;var p=e.memoizedState,m=p.refs,g=m.getSnapshot,b=p.source;p=p.subscribe;var v=ee;return e.memoizedState={refs:m,source:t,subscribe:n},s.useEffect(function(){m.getSnapshot=a,m.setSnapshot=c;var f=r(t._source);if(!Re(o,f)){f=a(t._source),Re(d,f)||(c(f),f=Ot(v),i.mutableReadLanes|=f&i.pendingLanes),f=i.mutableReadLanes,i.entangledLanes|=f;for(var h=i.entanglements,y=f;0<y;){var w=31-It(y),S=1<<w;h[w]|=f,y&=~S}}},[a,t,n]),s.useEffect(function(){return n(t._source,function(){var f=m.getSnapshot,h=m.setSnapshot;try{h(f(t._source));var y=Ot(v);i.mutableReadLanes|=y&i.pendingLanes}catch(w){h(function(){throw w})}})},[t,n]),Re(g,a)&&Re(b,t)&&Re(p,n)||(e={pending:null,dispatch:null,lastRenderedReducer:rt,lastRenderedState:d},e.dispatch=c=zl.bind(null,ee,e),l.queue=e,l.baseQueue=null,d=Rm(i,t,a),l.memoizedState=l.baseState=d),d}function Lm(e,t,a){var n=ca();return Um(n,e,t,a)}function ci(e){var t=ua();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e=t.queue={pending:null,dispatch:null,lastRenderedReducer:rt,lastRenderedState:e},e=e.dispatch=zl.bind(null,ee,e),[t.memoizedState,e]}function Dr(e,t,a,n){return e={tag:e,create:t,destroy:a,deps:n,next:null},t=ee.updateQueue,t===null?(t={lastEffect:null},ee.updateQueue=t,t.lastEffect=e.next=e):(a=t.lastEffect,a===null?t.lastEffect=e.next=e:(n=a.next,a.next=e,e.next=n,t.lastEffect=e)),e}function Bm(e){var t=ua();return e={current:e},t.memoizedState=e}function Fr(){return ca().memoizedState}function $l(e,t,a,n){var i=ua();ee.flags|=e,i.memoizedState=Dr(1|t,a,void 0,n===void 0?null:n)}function Tl(e,t,a,n){var i=ca();n=n===void 0?null:n;var r=void 0;if(ve!==null){var o=ve.memoizedState;if(r=o.destroy,n!==null&&Cl(n,o.deps)){Dr(t,a,r,n);return}}ee.flags|=e,i.memoizedState=Dr(1|t,a,r,n)}function Om(e,t){return $l(516,4,e,t)}function Mr(e,t){return Tl(516,4,e,t)}function Vm(e,t){return Tl(4,2,e,t)}function Hm(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Wm(e,t,a){return a=a!=null?a.concat([e]):null,Tl(4,2,Hm.bind(null,t,e),a)}function Pl(){}function Km(e,t){var a=ca();t=t===void 0?null:t;var n=a.memoizedState;return n!==null&&t!==null&&Cl(t,n[1])?n[0]:(a.memoizedState=[e,t],e)}function Gm(e,t){var a=ca();t=t===void 0?null:t;var n=a.memoizedState;return n!==null&&t!==null&&Cl(t,n[1])?n[0]:(e=e(),a.memoizedState=[e,t],e)}function xy(e,t){var a=Wa();sa(98>a?98:a,function(){e(!0)}),sa(97<a?97:a,function(){var n=Le.transition;Le.transition=1;try{e(!1),t()}finally{Le.transition=n}})}function zl(e,t,a){var n=Ie(),i=Ot(e),r={lane:i,action:a,eagerReducer:null,eagerState:null,next:null},o=t.pending;if(o===null?r.next=r:(r.next=o.next,o.next=r),t.pending=r,o=e.alternate,e===ee||o!==null&&o===ee)si=Ir=!0;else{if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,l=o(s,a);if(r.eagerReducer=o,r.eagerState=l,Re(l,s))return}catch{}finally{}Vt(e,i,n)}}var _r={readContext:Ue,useCallback:Pe,useContext:Pe,useEffect:Pe,useImperativeHandle:Pe,useLayoutEffect:Pe,useMemo:Pe,useReducer:Pe,useRef:Pe,useState:Pe,useDebugValue:Pe,useDeferredValue:Pe,useTransition:Pe,useMutableSource:Pe,useOpaqueIdentifier:Pe,unstable_isNewReconciler:!1},Ey={readContext:Ue,useCallback:function(e,t){return ua().memoizedState=[e,t===void 0?null:t],e},useContext:Ue,useEffect:Om,useImperativeHandle:function(e,t,a){return a=a!=null?a.concat([e]):null,$l(4,2,Hm.bind(null,t,e),a)},useLayoutEffect:function(e,t){return $l(4,2,e,t)},useMemo:function(e,t){var a=ua();return t=t===void 0?null:t,e=e(),a.memoizedState=[e,t],e},useReducer:function(e,t,a){var n=ua();return t=a!==void 0?a(t):t,n.memoizedState=n.baseState=t,e=n.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},e=e.dispatch=zl.bind(null,ee,e),[n.memoizedState,e]},useRef:Bm,useState:ci,useDebugValue:Pl,useDeferredValue:function(e){var t=ci(e),a=t[0],n=t[1];return Om(function(){var i=Le.transition;Le.transition=1;try{n(e)}finally{Le.transition=i}},[e]),a},useTransition:function(){var e=ci(!1),t=e[0];return e=xy.bind(null,e[1]),Bm(e),[e,t]},useMutableSource:function(e,t,a){var n=ua();return n.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:a},Um(n,e,t,a)},useOpaqueIdentifier:function(){if(it){var e=!1,t=by(function(){throw e||(e=!0,a("r:"+(ll++).toString(36))),Error($(355))}),a=ci(t)[1];return!(ee.mode&2)&&(ee.flags|=516,Dr(5,function(){a("r:"+(ll++).toString(36))},void 0,null)),t}return t="r:"+(ll++).toString(36),ci(t),t},unstable_isNewReconciler:!1},Cy={readContext:Ue,useCallback:Km,useContext:Ue,useEffect:Mr,useImperativeHandle:Wm,useLayoutEffect:Vm,useMemo:Gm,useReducer:li,useRef:Fr,useState:function(){return li(rt)},useDebugValue:Pl,useDeferredValue:function(e){var t=li(rt),a=t[0],n=t[1];return Mr(function(){var i=Le.transition;Le.transition=1;try{n(e)}finally{Le.transition=i}},[e]),a},useTransition:function(){var e=li(rt)[0];return[Fr().current,e]},useMutableSource:Lm,useOpaqueIdentifier:function(){return li(rt)[0]},unstable_isNewReconciler:!1},jy={readContext:Ue,useCallback:Km,useContext:Ue,useEffect:Mr,useImperativeHandle:Wm,useLayoutEffect:Vm,useMemo:Gm,useReducer:ui,useRef:Fr,useState:function(){return ui(rt)},useDebugValue:Pl,useDeferredValue:function(e){var t=ui(rt),a=t[0],n=t[1];return Mr(function(){var i=Le.transition;Le.transition=1;try{n(e)}finally{Le.transition=i}},[e]),a},useTransition:function(){var e=ui(rt)[0];return[Fr().current,e]},useMutableSource:Lm,useOpaqueIdentifier:function(){return ui(rt)[0]},unstable_isNewReconciler:!1},$y=ea.ReactCurrentOwner,qe=!1;function ze(e,t,a,n){t.child=e===null?Dm(t,null,a,n):zr(t,e.child,a,n)}function qm(e,t,a,n,i){a=a.render;var r=t.ref;return Ga(t,i),n=jl(e,t,a,n,r,i),e!==null&&!qe?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~i,yt(e,t,i)):(t.flags|=1,ze(e,t,n,i),t.child)}function Jm(e,t,a,n,i,r){if(e===null){var o=a.type;return typeof o=="function"&&!Xl(o)&&o.defaultProps===void 0&&a.compare===null&&a.defaultProps===void 0?(t.tag=15,t.type=o,Zm(e,t,o,n,i,r)):(e=Kr(a.type,null,n,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}return o=e.child,!(i&r)&&(i=o.memoizedProps,a=a.compare,a=a!==null?a:Gn,a(i,n)&&e.ref===t.ref)?yt(e,t,r):(t.flags|=1,e=Kt(o,n),e.ref=t.ref,e.return=t,t.child=e)}function Zm(e,t,a,n,i,r){if(e!==null&&Gn(e.memoizedProps,n)&&e.ref===t.ref)if(qe=!1,(r&i)!==0)e.flags&16384&&(qe=!0);else return t.lanes=e.lanes,yt(e,t,r);return Al(e,t,a,n,r)}function Nl(e,t,a){var n=t.pendingProps,i=n.children,r=e!==null?e.memoizedState:null;if(n.mode==="hidden"||n.mode==="unstable-defer-without-hiding")if(!(t.mode&4))t.memoizedState={baseLanes:0},Wr(t,a);else if(a&1073741824)t.memoizedState={baseLanes:0},Wr(t,r!==null?r.baseLanes:a);else return e=r!==null?r.baseLanes|a:a,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},Wr(t,e),null;else r!==null?(n=r.baseLanes|a,t.memoizedState=null):n=a,Wr(t,n);return ze(e,t,i,a),t.child}function Qm(e,t){var a=t.ref;(e===null&&a!==null||e!==null&&e.ref!==a)&&(t.flags|=128)}function Al(e,t,a,n,i){var r=Te(a)?ra:ye.current;return r=Ha(t,r),Ga(t,i),a=jl(e,t,a,n,r,i),e!==null&&!qe?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~i,yt(e,t,i)):(t.flags|=1,ze(e,t,a,i),t.child)}function Xm(e,t,a,n,i){if(Te(a)){var r=!0;vr(t)}else r=!1;if(Ga(t,i),t.stateNode===null)e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),Nm(t,a,n),kl(t,a,n,i),n=!0;else if(e===null){var o=t.stateNode,s=t.memoizedProps;o.props=s;var l=o.context,c=a.contextType;typeof c=="object"&&c!==null?c=Ue(c):(c=Te(a)?ra:ye.current,c=Ha(t,c));var d=a.getDerivedStateFromProps,p=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function";p||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(s!==n||l!==c)&&Am(t,o,n,c),Yt=!1;var m=t.memoizedState;o.state=m,ei(t,n,o,i),l=t.memoizedState,s!==n||m!==l||$e.current||Yt?(typeof d=="function"&&(jr(t,a,d,n),l=t.memoizedState),(s=Yt||zm(t,a,s,n,m,l,c))?(p||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4)):(typeof o.componentDidMount=="function"&&(t.flags|=4),t.memoizedProps=n,t.memoizedState=l),o.props=n,o.state=l,o.context=c,n=s):(typeof o.componentDidMount=="function"&&(t.flags|=4),n=!1)}else{o=t.stateNode,jm(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:Ge(t.type,s),o.props=c,p=t.pendingProps,m=o.context,l=a.contextType,typeof l=="object"&&l!==null?l=Ue(l):(l=Te(a)?ra:ye.current,l=Ha(t,l));var g=a.getDerivedStateFromProps;(d=typeof g=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(s!==p||m!==l)&&Am(t,o,n,l),Yt=!1,m=t.memoizedState,o.state=m,ei(t,n,o,i);var b=t.memoizedState;s!==p||m!==b||$e.current||Yt?(typeof g=="function"&&(jr(t,a,g,n),b=t.memoizedState),(c=Yt||zm(t,a,c,n,m,b,l))?(d||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,b,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,b,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=256)):(typeof o.componentDidUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=256),t.memoizedProps=n,t.memoizedState=b),o.props=n,o.state=b,o.context=l,n=c):(typeof o.componentDidUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=256),n=!1)}return Il(e,t,a,n,r,i)}function Il(e,t,a,n,i,r){Qm(e,t);var o=(t.flags&64)!==0;if(!n&&!o)return i&&fm(t,a,!1),yt(e,t,r);n=t.stateNode,$y.current=t;var s=o&&typeof a.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&o?(t.child=zr(t,e.child,null,r),t.child=zr(t,null,s,r)):ze(e,t,s,r),t.memoizedState=n.state,i&&fm(t,a,!0),t.child}function ep(e){var t=e.stateNode;t.pendingContext?hm(e,t.pendingContext,t.pendingContext!==t.context):t.context&&hm(e,t.context,!1),vl(e,t.containerInfo)}var Yr={dehydrated:null,retryLane:0};function tp(e,t,a){var n=t.pendingProps,i=Q.current,r=!1,o;return(o=(t.flags&64)!==0)||(o=e!==null&&e.memoizedState===null?!1:(i&2)!==0),o?(r=!0,t.flags&=-65):e!==null&&e.memoizedState===null||n.fallback===void 0||n.unstable_avoidThisFallback===!0||(i|=1),Z(Q,i&1),e===null?(n.fallback!==void 0&&Sl(t),e=n.children,i=n.fallback,r?(e=ap(t,e,i,a),t.child.memoizedState={baseLanes:a},t.memoizedState=Yr,e):typeof n.unstable_expectedLoadTime=="number"?(e=ap(t,e,i,a),t.child.memoizedState={baseLanes:a},t.memoizedState=Yr,t.lanes=33554432,e):(a=eu({mode:"visible",children:e},t.mode,a,null),a.return=t,t.child=a)):e.memoizedState!==null?r?(n=ip(e,t,n.children,n.fallback,a),r=t.child,i=e.child.memoizedState,r.memoizedState=i===null?{baseLanes:a}:{baseLanes:i.baseLanes|a},r.childLanes=e.childLanes&~a,t.memoizedState=Yr,n):(a=np(e,t,n.children,a),t.memoizedState=null,a):r?(n=ip(e,t,n.children,n.fallback,a),r=t.child,i=e.child.memoizedState,r.memoizedState=i===null?{baseLanes:a}:{baseLanes:i.baseLanes|a},r.childLanes=e.childLanes&~a,t.memoizedState=Yr,n):(a=np(e,t,n.children,a),t.memoizedState=null,a)}function ap(e,t,a,n){var i=e.mode,r=e.child;return t={mode:"hidden",children:t},!(i&2)&&r!==null?(r.childLanes=0,r.pendingProps=t):r=eu(t,i,0,null),a=an(a,i,n,null),r.return=e,a.return=e,r.sibling=a,e.child=r,a}function np(e,t,a,n){var i=e.child;return e=i.sibling,a=Kt(i,{mode:"visible",children:a}),!(t.mode&2)&&(a.lanes=n),a.return=t,a.sibling=null,e!==null&&(e.nextEffect=null,e.flags=8,t.firstEffect=t.lastEffect=e),t.child=a}function ip(e,t,a,n,i){var r=t.mode,o=e.child;e=o.sibling;var s={mode:"hidden",children:a};return!(r&2)&&t.child!==o?(a=t.child,a.childLanes=0,a.pendingProps=s,o=a.lastEffect,o!==null?(t.firstEffect=a.firstEffect,t.lastEffect=o,o.nextEffect=null):t.firstEffect=t.lastEffect=null):a=Kt(o,s),e!==null?n=Kt(e,n):(n=an(n,r,i,null),n.flags|=2),n.return=t,a.return=t,a.sibling=n,t.child=a,n}function rp(e,t){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),Cm(e.return,t)}function Dl(e,t,a,n,i,r){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:a,tailMode:i,lastEffect:r}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=n,o.tail=a,o.tailMode=i,o.lastEffect=r)}function op(e,t,a){var n=t.pendingProps,i=n.revealOrder,r=n.tail;if(ze(e,t,n.children,a),n=Q.current,n&2)n=n&1|2,t.flags|=64;else{if(e!==null&&e.flags&64)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&rp(e,a);else if(e.tag===19)rp(e,a);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(Z(Q,n),!(t.mode&2))t.memoizedState=null;else switch(i){case"forwards":for(a=t.child,i=null;a!==null;)e=a.alternate,e!==null&&Nr(e)===null&&(i=a),a=a.sibling;a=i,a===null?(i=t.child,t.child=null):(i=a.sibling,a.sibling=null),Dl(t,!1,i,a,r,t.lastEffect);break;case"backwards":for(a=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Nr(e)===null){t.child=i;break}e=i.sibling,i.sibling=a,a=i,i=e}Dl(t,!0,a,null,r,t.lastEffect);break;case"together":Dl(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function yt(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),mi|=t.lanes,a&t.childLanes){if(e!==null&&t.child!==e.child)throw Error($(153));if(t.child!==null){for(e=t.child,a=Kt(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Kt(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}return null}var sp,Fl,lp,up;sp=function(e,t){for(var a=t.child;a!==null;){if(a.tag===5||a.tag===6)e.appendChild(a.stateNode);else if(a.tag!==4&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===t)break;for(;a.sibling===null;){if(a.return===null||a.return===t)return;a=a.return}a.sibling.return=a.return,a=a.sibling}},Fl=function(){},lp=function(e,t,a,n){var i=e.memoizedProps;if(i!==n){e=t.stateNode,la(nt.current);var r=null;switch(a){case"input":i=ks(e,i),n=ks(e,n),r=[];break;case"option":i=Ss(e,i),n=Ss(e,n),r=[];break;case"select":i=G({},i,{value:void 0}),n=G({},n,{value:void 0}),r=[];break;case"textarea":i=xs(e,i),n=xs(e,n),r=[];break;default:typeof i.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=gr)}js(a,n);var o;a=null;for(c in i)if(!n.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var s=i[c];for(o in s)s.hasOwnProperty(o)&&(a||(a={}),a[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(jn.hasOwnProperty(c)?r||(r=[]):(r=r||[]).push(c,null));for(c in n){var l=n[c];if(s=i!=null?i[c]:void 0,n.hasOwnProperty(c)&&l!==s&&(l!=null||s!=null))if(c==="style")if(s){for(o in s)!s.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(a||(a={}),a[o]="");for(o in l)l.hasOwnProperty(o)&&s[o]!==l[o]&&(a||(a={}),a[o]=l[o])}else a||(r||(r=[]),r.push(c,a)),a=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,s=s?s.__html:void 0,l!=null&&s!==l&&(r=r||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(r=r||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(jn.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&H("scroll",e),r||s===l||(r=[])):typeof l=="object"&&l!==null&&l.$$typeof===hs?l.toString():(r=r||[]).push(c,l))}a&&(r=r||[]).push("style",a);var c=r;(t.updateQueue=c)&&(t.flags|=4)}},up=function(e,t,a,n){a!==n&&(t.flags|=4)};function di(e,t){if(!it)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var n=null;a!==null;)a.alternate!==null&&(n=a),a=a.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function Ty(e,t,a){var n=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return Te(t.type)&&kr(),null;case 3:return qa(),W($e),W(ye),El(),n=t.stateNode,n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ar(t)?t.flags|=4:n.hydrate||(t.flags|=256)),Fl(t),null;case 5:wl(t);var i=la(ii.current);if(a=t.type,e!==null&&t.stateNode!=null)lp(e,t,a,n,i),e.ref!==t.ref&&(t.flags|=128);else{if(!n){if(t.stateNode===null)throw Error($(166));return null}if(e=la(nt.current),Ar(t)){n=t.stateNode,a=t.type;var r=t.memoizedProps;switch(n[Ft]=t,n[br]=r,a){case"dialog":H("cancel",n),H("close",n);break;case"iframe":case"object":case"embed":H("load",n);break;case"video":case"audio":for(e=0;e<Jn.length;e++)H(Jn[e],n);break;case"source":H("error",n);break;case"img":case"image":case"link":H("error",n),H("load",n);break;case"details":H("toggle",n);break;case"input":ed(n,r),H("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!r.multiple},H("invalid",n);break;case"textarea":nd(n,r),H("invalid",n)}js(a,r),e=null;for(var o in r)r.hasOwnProperty(o)&&(i=r[o],o==="children"?typeof i=="string"?n.textContent!==i&&(e=["children",i]):typeof i=="number"&&n.textContent!==""+i&&(e=["children",""+i]):jn.hasOwnProperty(o)&&i!=null&&o==="onScroll"&&H("scroll",n));switch(a){case"input":Qi(n),ad(n,r,!0);break;case"textarea":Qi(n),rd(n);break;case"select":case"option":break;default:typeof r.onClick=="function"&&(n.onclick=gr)}n=e,t.updateQueue=n,n!==null&&(t.flags|=4)}else{switch(o=i.nodeType===9?i:i.ownerDocument,e===Es.html&&(e=od(a)),e===Es.html?a==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=o.createElement(a,{is:n.is}):(e=o.createElement(a),a==="select"&&(o=e,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):e=o.createElementNS(e,a),e[Ft]=t,e[br]=n,sp(e,t,!1,!1),t.stateNode=e,o=$s(a,n),a){case"dialog":H("cancel",e),H("close",e),i=n;break;case"iframe":case"object":case"embed":H("load",e),i=n;break;case"video":case"audio":for(i=0;i<Jn.length;i++)H(Jn[i],e);i=n;break;case"source":H("error",e),i=n;break;case"img":case"image":case"link":H("error",e),H("load",e),i=n;break;case"details":H("toggle",e),i=n;break;case"input":ed(e,n),i=ks(e,n),H("invalid",e);break;case"option":i=Ss(e,n);break;case"select":e._wrapperState={wasMultiple:!!n.multiple},i=G({},n,{value:void 0}),H("invalid",e);break;case"textarea":nd(e,n),i=xs(e,n),H("invalid",e);break;default:i=n}js(a,i);var s=i;for(r in s)if(s.hasOwnProperty(r)){var l=s[r];r==="style"?ud(e,l):r==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&sd(e,l)):r==="children"?typeof l=="string"?(a!=="textarea"||l!=="")&&An(e,l):typeof l=="number"&&An(e,""+l):r!=="suppressContentEditableWarning"&&r!=="suppressHydrationWarning"&&r!=="autoFocus"&&(jn.hasOwnProperty(r)?l!=null&&r==="onScroll"&&H("scroll",e):l!=null&&ls(e,r,l,o))}switch(a){case"input":Qi(e),ad(e,n,!1);break;case"textarea":Qi(e),rd(e);break;case"option":n.value!=null&&e.setAttribute("value",""+Pt(n.value));break;case"select":e.multiple=!!n.multiple,r=n.value,r!=null?Na(e,!!n.multiple,r,!1):n.defaultValue!=null&&Na(e,!!n.multiple,n.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=gr)}um(a,n)&&(t.flags|=4)}t.ref!==null&&(t.flags|=128)}return null;case 6:if(e&&t.stateNode!=null)up(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error($(166));a=la(ii.current),la(nt.current),Ar(t)?(n=t.stateNode,a=t.memoizedProps,n[Ft]=t,n.nodeValue!==a&&(t.flags|=4)):(n=(a.nodeType===9?a:a.ownerDocument).createTextNode(n),n[Ft]=t,t.stateNode=n)}return null;case 13:return W(Q),n=t.memoizedState,t.flags&64?(t.lanes=a,t):(n=n!==null,a=!1,e===null?t.memoizedProps.fallback!==void 0&&Ar(t):a=e.memoizedState!==null,n&&!a&&t.mode&2&&(e===null&&t.memoizedProps.unstable_avoidThisFallback!==!0||Q.current&1?de===0&&(de=3):((de===0||de===3)&&(de=4),xe===null||!(mi&134217727)&&!(Qa&134217727)||en(xe,we))),(n||a)&&(t.flags|=4),null);case 4:return qa(),Fl(t),e===null&&im(t.stateNode.containerInfo),null;case 10:return bl(t),null;case 17:return Te(t.type)&&kr(),null;case 19:if(W(Q),n=t.memoizedState,n===null)return null;if(r=(t.flags&64)!==0,o=n.rendering,o===null)if(r)di(n,!1);else{if(de!==0||e!==null&&e.flags&64)for(e=t.child;e!==null;){if(o=Nr(e),o!==null){for(t.flags|=64,di(n,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),n.lastEffect===null&&(t.firstEffect=null),t.lastEffect=n.lastEffect,n=a,a=t.child;a!==null;)r=a,e=n,r.flags&=2,r.nextEffect=null,r.firstEffect=null,r.lastEffect=null,o=r.alternate,o===null?(r.childLanes=0,r.lanes=e,r.child=null,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null):(r.childLanes=o.childLanes,r.lanes=o.lanes,r.child=o.child,r.memoizedProps=o.memoizedProps,r.memoizedState=o.memoizedState,r.updateQueue=o.updateQueue,r.type=o.type,e=o.dependencies,r.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),a=a.sibling;return Z(Q,Q.current&1|2),t.child}e=e.sibling}n.tail!==null&&ke()>Wl&&(t.flags|=64,r=!0,di(n,!1),t.lanes=33554432)}else{if(!r)if(e=Nr(o),e!==null){if(t.flags|=64,r=!0,a=e.updateQueue,a!==null&&(t.updateQueue=a,t.flags|=4),di(n,!0),n.tail===null&&n.tailMode==="hidden"&&!o.alternate&&!it)return t=t.lastEffect=n.lastEffect,t!==null&&(t.nextEffect=null),null}else 2*ke()-n.renderingStartTime>Wl&&a!==1073741824&&(t.flags|=64,r=!0,di(n,!1),t.lanes=33554432);n.isBackwards?(o.sibling=t.child,t.child=o):(a=n.last,a!==null?a.sibling=o:t.child=o,n.last=o)}return n.tail!==null?(a=n.tail,n.rendering=a,n.tail=a.sibling,n.lastEffect=t.lastEffect,n.renderingStartTime=ke(),a.sibling=null,t=Q.current,Z(Q,r?t&1|2:t&1),a):null;case 23:case 24:return Ql(),e!==null&&e.memoizedState!==null!=(t.memoizedState!==null)&&n.mode!=="unstable-defer-without-hiding"&&(t.flags|=4),null}throw Error($(156,t.tag))}function Py(e){switch(e.tag){case 1:Te(e.type)&&kr();var t=e.flags;return t&4096?(e.flags=t&-4097|64,e):null;case 3:if(qa(),W($e),W(ye),El(),t=e.flags,t&64)throw Error($(285));return e.flags=t&-4097|64,e;case 5:return wl(e),null;case 13:return W(Q),t=e.flags,t&4096?(e.flags=t&-4097|64,e):null;case 19:return W(Q),null;case 4:return qa(),null;case 10:return bl(e),null;case 23:case 24:return Ql(),null;default:return null}}function Ml(e,t){try{var a="",n=t;do a+=lb(n),n=n.return;while(n);var i=a}catch(r){i=`
|
|
38
38
|
Error generating stack: `+r.message+`
|
|
39
|
-
`+r.stack}return{value:e,source:t,stack:i}}function _l(e,t){try{console.error(t.value)}catch(a){setTimeout(function(){throw a})}}var zy=typeof WeakMap=="function"?WeakMap:Map;function cp(e,t,a){a=Rt(-1,a),a.tag=3,a.payload={element:null};var n=t.value;return a.callback=function(){Lr||(Lr=!0,Kl=n),_l(e,t)},a}function dp(e,t,a){a=Rt(-1,a),a.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var i=t.value;a.payload=function(){return _l(e,t),n(i)}}var r=e.stateNode;return r!==null&&typeof r.componentDidCatch=="function"&&(a.callback=function(){typeof n!="function"&&(ot===null?ot=new Set([this]):ot.add(this),_l(e,t));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),a}var Ny=typeof WeakSet=="function"?WeakSet:Set;function mp(e){var t=e.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(a){Wt(e,a)}else t.current=null}function Ay(e,t){switch(t.tag){case 0:case 11:case 15:case 22:return;case 1:if(t.flags&256&&e!==null){var a=e.memoizedProps,n=e.memoizedState;e=t.stateNode,t=e.getSnapshotBeforeUpdate(t.elementType===t.type?a:Ge(t.type,a),n),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:t.flags&256&&sl(t.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error($(163))}function Iy(e,t,a){switch(a.tag){case 0:case 11:case 15:case 22:if(t=a.updateQueue,t=t!==null?t.lastEffect:null,t!==null){e=t=t.next;do{if((e.tag&3)===3){var n=e.create;e.destroy=n()}e=e.next}while(e!==t)}if(t=a.updateQueue,t=t!==null?t.lastEffect:null,t!==null){e=t=t.next;do{var i=e;n=i.next,i=i.tag,i&4&&i&1&&($p(a,e),Ly(a,e)),e=n}while(e!==t)}return;case 1:e=a.stateNode,a.flags&4&&(t===null?e.componentDidMount():(n=a.elementType===a.type?t.memoizedProps:Ge(a.type,t.memoizedProps),e.componentDidUpdate(n,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),t=a.updateQueue,t!==null&&Tm(a,t,e);return;case 3:if(t=a.updateQueue,t!==null){if(e=null,a.child!==null)switch(a.child.tag){case 5:e=a.child.stateNode;break;case 1:e=a.child.stateNode}Tm(a,t,e)}return;case 5:e=a.stateNode,t===null&&a.flags&4&&um(a.type,a.memoizedProps)&&e.focus();return;case 6:return;case 4:return;case 12:return;case 13:a.memoizedState===null&&(a=a.alternate,a!==null&&(a=a.memoizedState,a!==null&&(a=a.dehydrated,a!==null&&Cd(a))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error($(163))}function pp(e,t){for(var a=e;;){if(a.tag===5){var n=a.stateNode;if(t)n=n.style,typeof n.setProperty=="function"?n.setProperty("display","none","important"):n.display="none";else{n=a.stateNode;var i=a.memoizedProps.style;i=i!=null&&i.hasOwnProperty("display")?i.display:null,n.style.display=ld("display",i)}}else if(a.tag===6)a.stateNode.nodeValue=t?"":a.memoizedProps;else if((a.tag!==23&&a.tag!==24||a.memoizedState===null||a===e)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===e)break;for(;a.sibling===null;){if(a.return===null||a.return===e)return;a=a.return}a.sibling.return=a.return,a=a.sibling}}function hp(e,t){if(oa&&typeof oa.onCommitFiberUnmount=="function")try{oa.onCommitFiberUnmount(cl,t)}catch{}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(e=t.updateQueue,e!==null&&(e=e.lastEffect,e!==null)){var a=e=e.next;do{var n=a,i=n.destroy;if(n=n.tag,i!==void 0)if(n&4)$p(t,a);else{n=t;try{i()}catch(r){Wt(n,r)}}a=a.next}while(a!==e)}break;case 1:if(mp(t),e=t.stateNode,typeof e.componentWillUnmount=="function")try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(r){Wt(t,r)}break;case 5:mp(t);break;case 4:yp(e,t)}}function gp(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function fp(e){return e.tag===5||e.tag===3||e.tag===4}function bp(e){e:{for(var t=e.return;t!==null;){if(fp(t))break e;t=t.return}throw Error($(160))}var a=t;switch(t=a.stateNode,a.tag){case 5:var n=!1;break;case 3:t=t.containerInfo,n=!0;break;case 4:t=t.containerInfo,n=!0;break;default:throw Error($(161))}a.flags&16&&(An(t,""),a.flags&=-17);e:t:for(a=e;;){for(;a.sibling===null;){if(a.return===null||fp(a.return)){a=null;break e}a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.flags&2||a.child===null||a.tag===4)continue t;a.child.return=a,a=a.child}if(!(a.flags&2)){a=a.stateNode;break e}}n?Yl(e,a,t):Rl(e,a,t)}function Yl(e,t,a){var n=e.tag,i=n===5||n===6;if(i)e=i?e.stateNode:e.stateNode.instance,t?a.nodeType===8?a.parentNode.insertBefore(e,t):a.insertBefore(e,t):(a.nodeType===8?(t=a.parentNode,t.insertBefore(e,a)):(t=a,t.appendChild(e)),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=gr));else if(n!==4&&(e=e.child,e!==null))for(Yl(e,t,a),e=e.sibling;e!==null;)Yl(e,t,a),e=e.sibling}function Rl(e,t,a){var n=e.tag,i=n===5||n===6;if(i)e=i?e.stateNode:e.stateNode.instance,t?a.insertBefore(e,t):a.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(Rl(e,t,a),e=e.sibling;e!==null;)Rl(e,t,a),e=e.sibling}function yp(e,t){for(var a=t,n=!1,i,r;;){if(!n){n=a.return;e:for(;;){if(n===null)throw Error($(160));switch(i=n.stateNode,n.tag){case 5:r=!1;break e;case 3:i=i.containerInfo,r=!0;break e;case 4:i=i.containerInfo,r=!0;break e}n=n.return}n=!0}if(a.tag===5||a.tag===6){e:for(var o=e,s=a,l=s;;)if(hp(o,l),l.child!==null&&l.tag!==4)l.child.return=l,l=l.child;else{if(l===s)break e;for(;l.sibling===null;){if(l.return===null||l.return===s)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}r?(o=i,s=a.stateNode,o.nodeType===8?o.parentNode.removeChild(s):o.removeChild(s)):i.removeChild(a.stateNode)}else if(a.tag===4){if(a.child!==null){i=a.stateNode.containerInfo,r=!0,a.child.return=a,a=a.child;continue}}else if(hp(e,a),a.child!==null){a.child.return=a,a=a.child;continue}if(a===t)break;for(;a.sibling===null;){if(a.return===null||a.return===t)return;a=a.return,a.tag===4&&(n=!1)}a.sibling.return=a.return,a=a.sibling}}function Ul(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var a=t.updateQueue;if(a=a!==null?a.lastEffect:null,a!==null){var n=a=a.next;do(n.tag&3)===3&&(e=n.destroy,n.destroy=void 0,e!==void 0&&e()),n=n.next;while(n!==a)}return;case 1:return;case 5:if(a=t.stateNode,a!=null){n=t.memoizedProps;var i=e!==null?e.memoizedProps:n;e=t.type;var r=t.updateQueue;if(t.updateQueue=null,r!==null){for(a[br]=n,e==="input"&&n.type==="radio"&&n.name!=null&&td(a,n),$s(e,i),t=$s(e,n),i=0;i<r.length;i+=2){var o=r[i],s=r[i+1];o==="style"?ud(a,s):o==="dangerouslySetInnerHTML"?sd(a,s):o==="children"?An(a,s):ls(a,o,s,t)}switch(e){case"input":vs(a,n);break;case"textarea":id(a,n);break;case"select":e=a._wrapperState.wasMultiple,a._wrapperState.wasMultiple=!!n.multiple,r=n.value,r!=null?Na(a,!!n.multiple,r,!1):e!==!!n.multiple&&(n.defaultValue!=null?Na(a,!!n.multiple,n.defaultValue,!0):Na(a,!!n.multiple,n.multiple?[]:"",!1))}}}return;case 6:if(t.stateNode===null)throw Error($(162));t.stateNode.nodeValue=t.memoizedProps;return;case 3:a=t.stateNode,a.hydrate&&(a.hydrate=!1,Cd(a.containerInfo));return;case 12:return;case 13:t.memoizedState!==null&&(Hl=ke(),pp(t.child,!0)),kp(t);return;case 19:kp(t);return;case 17:return;case 23:case 24:pp(t,t.memoizedState!==null);return}throw Error($(163))}function kp(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var a=e.stateNode;a===null&&(a=e.stateNode=new Ny),t.forEach(function(n){var i=Vy.bind(null,e,n);a.has(n)||(a.add(n),n.then(i,i))})}}function Dy(e,t){return e!==null&&(e=e.memoizedState,e===null||e.dehydrated!==null)?(t=t.memoizedState,t!==null&&t.dehydrated===null):!1}var Fy=Math.ceil,Rr=ea.ReactCurrentDispatcher,Ll=ea.ReactCurrentOwner,I=0,xe=null,ie=null,we=0,da=0,Bl=Mt(0),de=0,Ur=null,Za=0,mi=0,Qa=0,Ol=0,Vl=null,Hl=0,Wl=1/0;function Xa(){Wl=ke()+500}var N=null,Lr=!1,Kl=null,ot=null,Bt=!1,pi=null,hi=90,Gl=[],ql=[],kt=null,gi=0,Jl=null,Br=-1,vt=0,Or=0,fi=null,Vr=!1;function Ie(){return I&48?ke():Br!==-1?Br:Br=ke()}function Ot(e){if(e=e.mode,!(e&2))return 1;if(!(e&4))return Wa()===99?1:2;if(vt===0&&(vt=Za),Sy.transition!==0){Or!==0&&(Or=Vl!==null?Vl.pendingLanes:0),e=vt;var t=4186112&~Or;return t&=-t,t===0&&(e=4186112&~e,t=e&-e,t===0&&(t=8192)),t}return e=Wa(),I&4&&e===98?e=or(12,vt):(e=Eb(e),e=or(e,vt)),e}function Vt(e,t,a){if(50<gi)throw gi=0,Jl=null,Error($(185));if(e=Hr(e,t),e===null)return null;sr(e,t,a),e===xe&&(Qa|=t,de===4&&en(e,we));var n=Wa();t===1?I&8&&!(I&48)?Zl(e):(Be(e,a),I===0&&(Xa(),at())):(!(I&4)||n!==98&&n!==99||(kt===null?kt=new Set([e]):kt.add(e)),Be(e,a)),Vl=e}function Hr(e,t){e.lanes|=t;var a=e.alternate;for(a!==null&&(a.lanes|=t),a=e,e=e.return;e!==null;)e.childLanes|=t,a=e.alternate,a!==null&&(a.childLanes|=t),a=e,e=e.return;return a.tag===3?a.stateNode:null}function Be(e,t){for(var a=e.callbackNode,n=e.suspendedLanes,i=e.pingedLanes,r=e.expirationTimes,o=e.pendingLanes;0<o;){var s=31-It(o),l=1<<s,c=r[s];if(c===-1){if(!(l&n)||l&i){c=t,Fa(l);var d=O;r[s]=10<=d?c+250:6<=d?c+5e3:-1}}else c<=t&&(e.expiredLanes|=l);o&=~l}if(n=Bn(e,e===xe?we:0),t=O,n===0)a!==null&&(a!==hl&&ml(a),e.callbackNode=null,e.callbackPriority=0);else{if(a!==null){if(e.callbackPriority===t)return;a!==hl&&ml(a)}t===15?(a=Zl.bind(null,e),ft===null?(ft=[a],Sr=dl(wr,Em)):ft.push(a),a=hl):t===14?a=Xn(99,Zl.bind(null,e)):(a=Cb(t),a=Xn(a,vp.bind(null,e))),e.callbackPriority=t,e.callbackNode=a}}function vp(e){if(Br=-1,Or=vt=0,I&48)throw Error($(327));var t=e.callbackNode;if(Ht()&&e.callbackNode!==t)return null;var a=Bn(e,e===xe?we:0);if(a===0)return null;var n=a,i=I;I|=16;var r=Ep();(xe!==e||we!==n)&&(Xa(),tn(e,n));do try{Yy();break}catch(s){xp(e,s)}while(!0);if(fl(),Rr.current=r,I=i,ie!==null?n=0:(xe=null,we=0,n=de),Za&Qa)tn(e,0);else if(n!==0){if(n===2&&(I|=64,e.hydrate&&(e.hydrate=!1,sl(e.containerInfo)),a=Ad(e),a!==0&&(n=bi(e,a))),n===1)throw t=Ur,tn(e,0),en(e,a),Be(e,ke()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=a,n){case 0:case 1:throw Error($(345));case 2:ma(e);break;case 3:if(en(e,a),(a&62914560)===a&&(n=Hl+500-ke(),10<n)){if(Bn(e,0)!==0)break;if(i=e.suspendedLanes,(i&a)!==a){Ie(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=cm(ma.bind(null,e),n);break}ma(e);break;case 4:if(en(e,a),(a&4186112)===a)break;for(n=e.eventTimes,i=-1;0<a;){var o=31-It(a);r=1<<o,o=n[o],o>i&&(i=o),a&=~r}if(a=i,a=ke()-a,a=(120>a?120:480>a?480:1080>a?1080:1920>a?1920:3e3>a?3e3:4320>a?4320:1960*Fy(a/1960))-a,10<a){e.timeoutHandle=cm(ma.bind(null,e),a);break}ma(e);break;case 5:ma(e);break;default:throw Error($(329))}}return Be(e,ke()),e.callbackNode===t?vp.bind(null,e):null}function en(e,t){for(t&=~Ol,t&=~Qa,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var a=31-It(t),n=1<<a;e[a]=-1,t&=~n}}function Zl(e){if(I&48)throw Error($(327));if(Ht(),e===xe&&e.expiredLanes&we){var t=we,a=bi(e,t);Za&Qa&&(t=Bn(e,t),a=bi(e,t))}else t=Bn(e,0),a=bi(e,t);if(e.tag!==0&&a===2&&(I|=64,e.hydrate&&(e.hydrate=!1,sl(e.containerInfo)),t=Ad(e),t!==0&&(a=bi(e,t))),a===1)throw a=Ur,tn(e,0),en(e,t),Be(e,ke()),a;return e.finishedWork=e.current.alternate,e.finishedLanes=t,ma(e),Be(e,ke()),null}function My(){if(kt!==null){var e=kt;kt=null,e.forEach(function(t){t.expiredLanes|=24&t.pendingLanes,Be(t,ke())})}at()}function wp(e,t){var a=I;I|=1;try{return e(t)}finally{I=a,I===0&&(Xa(),at())}}function Sp(e,t){var a=I;I&=-2,I|=8;try{return e(t)}finally{I=a,I===0&&(Xa(),at())}}function Wr(e,t){Z(Bl,da),da|=t,Za|=t}function Ql(){da=Bl.current,W(Bl)}function tn(e,t){e.finishedWork=null,e.finishedLanes=0;var a=e.timeoutHandle;if(a!==-1&&(e.timeoutHandle=-1,fy(a)),ie!==null)for(a=ie.return;a!==null;){var n=a;switch(n.tag){case 1:n=n.type.childContextTypes,n!=null&&kr();break;case 3:qa(),W($e),W(ye),El();break;case 5:wl(n);break;case 4:qa();break;case 13:W(Q);break;case 19:W(Q);break;case 10:bl(n);break;case 23:case 24:Ql()}a=a.return}xe=e,ie=Kt(e.current,null),we=da=Za=t,de=0,Ur=null,Ol=Qa=mi=0}function xp(e,t){do{var a=ie;try{if(fl(),ri.current=_r,Ir){for(var n=ee.memoizedState;n!==null;){var i=n.queue;i!==null&&(i.pending=null),n=n.next}Ir=!1}if(oi=0,ce=ve=ee=null,si=!1,Ll.current=null,a===null||a.return===null){de=1,Ur=t,ie=null;break}e:{var r=e,o=a.return,s=a,l=t;if(t=we,s.flags|=2048,s.firstEffect=s.lastEffect=null,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l;if(!(s.mode&2)){var d=s.alternate;d?(s.updateQueue=d.updateQueue,s.memoizedState=d.memoizedState,s.lanes=d.lanes):(s.updateQueue=null,s.memoizedState=null)}var p=(Q.current&1)!==0,m=o;do{var h;if(h=m.tag===13){var b=m.memoizedState;if(b!==null)h=b.dehydrated!==null;else{var v=m.memoizedProps;h=v.fallback===void 0?!1:v.unstable_avoidThisFallback!==!0?!0:!p}}if(h){var f=m.updateQueue;if(f===null){var g=new Set;g.add(c),m.updateQueue=g}else f.add(c);if(!(m.mode&2)){if(m.flags|=64,s.flags|=16384,s.flags&=-2981,s.tag===1)if(s.alternate===null)s.tag=17;else{var y=Rt(-1,1);y.tag=2,Ut(s,y)}s.lanes|=1;break e}l=void 0,s=t;var w=r.pingCache;if(w===null?(w=r.pingCache=new zy,l=new Set,w.set(c,l)):(l=w.get(c),l===void 0&&(l=new Set,w.set(c,l))),!l.has(s)){l.add(s);var S=Oy.bind(null,r,c,s);c.then(S,S)}m.flags|=4096,m.lanes=t;break e}m=m.return}while(m!==null);l=Error((za(s.type)||"A React component")+` suspended while rendering, but no fallback UI was specified.
|
|
39
|
+
`+r.stack}return{value:e,source:t,stack:i}}function _l(e,t){try{console.error(t.value)}catch(a){setTimeout(function(){throw a})}}var zy=typeof WeakMap=="function"?WeakMap:Map;function cp(e,t,a){a=Rt(-1,a),a.tag=3,a.payload={element:null};var n=t.value;return a.callback=function(){Lr||(Lr=!0,Kl=n),_l(e,t)},a}function dp(e,t,a){a=Rt(-1,a),a.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var i=t.value;a.payload=function(){return _l(e,t),n(i)}}var r=e.stateNode;return r!==null&&typeof r.componentDidCatch=="function"&&(a.callback=function(){typeof n!="function"&&(ot===null?ot=new Set([this]):ot.add(this),_l(e,t));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),a}var Ny=typeof WeakSet=="function"?WeakSet:Set;function mp(e){var t=e.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(a){Wt(e,a)}else t.current=null}function Ay(e,t){switch(t.tag){case 0:case 11:case 15:case 22:return;case 1:if(t.flags&256&&e!==null){var a=e.memoizedProps,n=e.memoizedState;e=t.stateNode,t=e.getSnapshotBeforeUpdate(t.elementType===t.type?a:Ge(t.type,a),n),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:t.flags&256&&sl(t.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error($(163))}function Iy(e,t,a){switch(a.tag){case 0:case 11:case 15:case 22:if(t=a.updateQueue,t=t!==null?t.lastEffect:null,t!==null){e=t=t.next;do{if((e.tag&3)===3){var n=e.create;e.destroy=n()}e=e.next}while(e!==t)}if(t=a.updateQueue,t=t!==null?t.lastEffect:null,t!==null){e=t=t.next;do{var i=e;n=i.next,i=i.tag,i&4&&i&1&&($p(a,e),Ly(a,e)),e=n}while(e!==t)}return;case 1:e=a.stateNode,a.flags&4&&(t===null?e.componentDidMount():(n=a.elementType===a.type?t.memoizedProps:Ge(a.type,t.memoizedProps),e.componentDidUpdate(n,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),t=a.updateQueue,t!==null&&Tm(a,t,e);return;case 3:if(t=a.updateQueue,t!==null){if(e=null,a.child!==null)switch(a.child.tag){case 5:e=a.child.stateNode;break;case 1:e=a.child.stateNode}Tm(a,t,e)}return;case 5:e=a.stateNode,t===null&&a.flags&4&&um(a.type,a.memoizedProps)&&e.focus();return;case 6:return;case 4:return;case 12:return;case 13:a.memoizedState===null&&(a=a.alternate,a!==null&&(a=a.memoizedState,a!==null&&(a=a.dehydrated,a!==null&&Cd(a))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error($(163))}function pp(e,t){for(var a=e;;){if(a.tag===5){var n=a.stateNode;if(t)n=n.style,typeof n.setProperty=="function"?n.setProperty("display","none","important"):n.display="none";else{n=a.stateNode;var i=a.memoizedProps.style;i=i!=null&&i.hasOwnProperty("display")?i.display:null,n.style.display=ld("display",i)}}else if(a.tag===6)a.stateNode.nodeValue=t?"":a.memoizedProps;else if((a.tag!==23&&a.tag!==24||a.memoizedState===null||a===e)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===e)break;for(;a.sibling===null;){if(a.return===null||a.return===e)return;a=a.return}a.sibling.return=a.return,a=a.sibling}}function hp(e,t){if(oa&&typeof oa.onCommitFiberUnmount=="function")try{oa.onCommitFiberUnmount(cl,t)}catch{}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(e=t.updateQueue,e!==null&&(e=e.lastEffect,e!==null)){var a=e=e.next;do{var n=a,i=n.destroy;if(n=n.tag,i!==void 0)if(n&4)$p(t,a);else{n=t;try{i()}catch(r){Wt(n,r)}}a=a.next}while(a!==e)}break;case 1:if(mp(t),e=t.stateNode,typeof e.componentWillUnmount=="function")try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(r){Wt(t,r)}break;case 5:mp(t);break;case 4:yp(e,t)}}function gp(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function fp(e){return e.tag===5||e.tag===3||e.tag===4}function bp(e){e:{for(var t=e.return;t!==null;){if(fp(t))break e;t=t.return}throw Error($(160))}var a=t;switch(t=a.stateNode,a.tag){case 5:var n=!1;break;case 3:t=t.containerInfo,n=!0;break;case 4:t=t.containerInfo,n=!0;break;default:throw Error($(161))}a.flags&16&&(An(t,""),a.flags&=-17);e:t:for(a=e;;){for(;a.sibling===null;){if(a.return===null||fp(a.return)){a=null;break e}a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.flags&2||a.child===null||a.tag===4)continue t;a.child.return=a,a=a.child}if(!(a.flags&2)){a=a.stateNode;break e}}n?Yl(e,a,t):Rl(e,a,t)}function Yl(e,t,a){var n=e.tag,i=n===5||n===6;if(i)e=i?e.stateNode:e.stateNode.instance,t?a.nodeType===8?a.parentNode.insertBefore(e,t):a.insertBefore(e,t):(a.nodeType===8?(t=a.parentNode,t.insertBefore(e,a)):(t=a,t.appendChild(e)),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=gr));else if(n!==4&&(e=e.child,e!==null))for(Yl(e,t,a),e=e.sibling;e!==null;)Yl(e,t,a),e=e.sibling}function Rl(e,t,a){var n=e.tag,i=n===5||n===6;if(i)e=i?e.stateNode:e.stateNode.instance,t?a.insertBefore(e,t):a.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(Rl(e,t,a),e=e.sibling;e!==null;)Rl(e,t,a),e=e.sibling}function yp(e,t){for(var a=t,n=!1,i,r;;){if(!n){n=a.return;e:for(;;){if(n===null)throw Error($(160));switch(i=n.stateNode,n.tag){case 5:r=!1;break e;case 3:i=i.containerInfo,r=!0;break e;case 4:i=i.containerInfo,r=!0;break e}n=n.return}n=!0}if(a.tag===5||a.tag===6){e:for(var o=e,s=a,l=s;;)if(hp(o,l),l.child!==null&&l.tag!==4)l.child.return=l,l=l.child;else{if(l===s)break e;for(;l.sibling===null;){if(l.return===null||l.return===s)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}r?(o=i,s=a.stateNode,o.nodeType===8?o.parentNode.removeChild(s):o.removeChild(s)):i.removeChild(a.stateNode)}else if(a.tag===4){if(a.child!==null){i=a.stateNode.containerInfo,r=!0,a.child.return=a,a=a.child;continue}}else if(hp(e,a),a.child!==null){a.child.return=a,a=a.child;continue}if(a===t)break;for(;a.sibling===null;){if(a.return===null||a.return===t)return;a=a.return,a.tag===4&&(n=!1)}a.sibling.return=a.return,a=a.sibling}}function Ul(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var a=t.updateQueue;if(a=a!==null?a.lastEffect:null,a!==null){var n=a=a.next;do(n.tag&3)===3&&(e=n.destroy,n.destroy=void 0,e!==void 0&&e()),n=n.next;while(n!==a)}return;case 1:return;case 5:if(a=t.stateNode,a!=null){n=t.memoizedProps;var i=e!==null?e.memoizedProps:n;e=t.type;var r=t.updateQueue;if(t.updateQueue=null,r!==null){for(a[br]=n,e==="input"&&n.type==="radio"&&n.name!=null&&td(a,n),$s(e,i),t=$s(e,n),i=0;i<r.length;i+=2){var o=r[i],s=r[i+1];o==="style"?ud(a,s):o==="dangerouslySetInnerHTML"?sd(a,s):o==="children"?An(a,s):ls(a,o,s,t)}switch(e){case"input":vs(a,n);break;case"textarea":id(a,n);break;case"select":e=a._wrapperState.wasMultiple,a._wrapperState.wasMultiple=!!n.multiple,r=n.value,r!=null?Na(a,!!n.multiple,r,!1):e!==!!n.multiple&&(n.defaultValue!=null?Na(a,!!n.multiple,n.defaultValue,!0):Na(a,!!n.multiple,n.multiple?[]:"",!1))}}}return;case 6:if(t.stateNode===null)throw Error($(162));t.stateNode.nodeValue=t.memoizedProps;return;case 3:a=t.stateNode,a.hydrate&&(a.hydrate=!1,Cd(a.containerInfo));return;case 12:return;case 13:t.memoizedState!==null&&(Hl=ke(),pp(t.child,!0)),kp(t);return;case 19:kp(t);return;case 17:return;case 23:case 24:pp(t,t.memoizedState!==null);return}throw Error($(163))}function kp(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var a=e.stateNode;a===null&&(a=e.stateNode=new Ny),t.forEach(function(n){var i=Vy.bind(null,e,n);a.has(n)||(a.add(n),n.then(i,i))})}}function Dy(e,t){return e!==null&&(e=e.memoizedState,e===null||e.dehydrated!==null)?(t=t.memoizedState,t!==null&&t.dehydrated===null):!1}var Fy=Math.ceil,Rr=ea.ReactCurrentDispatcher,Ll=ea.ReactCurrentOwner,I=0,xe=null,ie=null,we=0,da=0,Bl=Mt(0),de=0,Ur=null,Za=0,mi=0,Qa=0,Ol=0,Vl=null,Hl=0,Wl=1/0;function Xa(){Wl=ke()+500}var N=null,Lr=!1,Kl=null,ot=null,Bt=!1,pi=null,hi=90,Gl=[],ql=[],kt=null,gi=0,Jl=null,Br=-1,vt=0,Or=0,fi=null,Vr=!1;function Ie(){return I&48?ke():Br!==-1?Br:Br=ke()}function Ot(e){if(e=e.mode,!(e&2))return 1;if(!(e&4))return Wa()===99?1:2;if(vt===0&&(vt=Za),Sy.transition!==0){Or!==0&&(Or=Vl!==null?Vl.pendingLanes:0),e=vt;var t=4186112&~Or;return t&=-t,t===0&&(e=4186112&~e,t=e&-e,t===0&&(t=8192)),t}return e=Wa(),I&4&&e===98?e=or(12,vt):(e=Eb(e),e=or(e,vt)),e}function Vt(e,t,a){if(50<gi)throw gi=0,Jl=null,Error($(185));if(e=Hr(e,t),e===null)return null;sr(e,t,a),e===xe&&(Qa|=t,de===4&&en(e,we));var n=Wa();t===1?I&8&&!(I&48)?Zl(e):(Be(e,a),I===0&&(Xa(),at())):(!(I&4)||n!==98&&n!==99||(kt===null?kt=new Set([e]):kt.add(e)),Be(e,a)),Vl=e}function Hr(e,t){e.lanes|=t;var a=e.alternate;for(a!==null&&(a.lanes|=t),a=e,e=e.return;e!==null;)e.childLanes|=t,a=e.alternate,a!==null&&(a.childLanes|=t),a=e,e=e.return;return a.tag===3?a.stateNode:null}function Be(e,t){for(var a=e.callbackNode,n=e.suspendedLanes,i=e.pingedLanes,r=e.expirationTimes,o=e.pendingLanes;0<o;){var s=31-It(o),l=1<<s,c=r[s];if(c===-1){if(!(l&n)||l&i){c=t,Fa(l);var d=O;r[s]=10<=d?c+250:6<=d?c+5e3:-1}}else c<=t&&(e.expiredLanes|=l);o&=~l}if(n=Bn(e,e===xe?we:0),t=O,n===0)a!==null&&(a!==hl&&ml(a),e.callbackNode=null,e.callbackPriority=0);else{if(a!==null){if(e.callbackPriority===t)return;a!==hl&&ml(a)}t===15?(a=Zl.bind(null,e),ft===null?(ft=[a],Sr=dl(wr,Em)):ft.push(a),a=hl):t===14?a=Xn(99,Zl.bind(null,e)):(a=Cb(t),a=Xn(a,vp.bind(null,e))),e.callbackPriority=t,e.callbackNode=a}}function vp(e){if(Br=-1,Or=vt=0,I&48)throw Error($(327));var t=e.callbackNode;if(Ht()&&e.callbackNode!==t)return null;var a=Bn(e,e===xe?we:0);if(a===0)return null;var n=a,i=I;I|=16;var r=Ep();(xe!==e||we!==n)&&(Xa(),tn(e,n));do try{Yy();break}catch(s){xp(e,s)}while(!0);if(fl(),Rr.current=r,I=i,ie!==null?n=0:(xe=null,we=0,n=de),Za&Qa)tn(e,0);else if(n!==0){if(n===2&&(I|=64,e.hydrate&&(e.hydrate=!1,sl(e.containerInfo)),a=Ad(e),a!==0&&(n=bi(e,a))),n===1)throw t=Ur,tn(e,0),en(e,a),Be(e,ke()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=a,n){case 0:case 1:throw Error($(345));case 2:ma(e);break;case 3:if(en(e,a),(a&62914560)===a&&(n=Hl+500-ke(),10<n)){if(Bn(e,0)!==0)break;if(i=e.suspendedLanes,(i&a)!==a){Ie(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=cm(ma.bind(null,e),n);break}ma(e);break;case 4:if(en(e,a),(a&4186112)===a)break;for(n=e.eventTimes,i=-1;0<a;){var o=31-It(a);r=1<<o,o=n[o],o>i&&(i=o),a&=~r}if(a=i,a=ke()-a,a=(120>a?120:480>a?480:1080>a?1080:1920>a?1920:3e3>a?3e3:4320>a?4320:1960*Fy(a/1960))-a,10<a){e.timeoutHandle=cm(ma.bind(null,e),a);break}ma(e);break;case 5:ma(e);break;default:throw Error($(329))}}return Be(e,ke()),e.callbackNode===t?vp.bind(null,e):null}function en(e,t){for(t&=~Ol,t&=~Qa,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var a=31-It(t),n=1<<a;e[a]=-1,t&=~n}}function Zl(e){if(I&48)throw Error($(327));if(Ht(),e===xe&&e.expiredLanes&we){var t=we,a=bi(e,t);Za&Qa&&(t=Bn(e,t),a=bi(e,t))}else t=Bn(e,0),a=bi(e,t);if(e.tag!==0&&a===2&&(I|=64,e.hydrate&&(e.hydrate=!1,sl(e.containerInfo)),t=Ad(e),t!==0&&(a=bi(e,t))),a===1)throw a=Ur,tn(e,0),en(e,t),Be(e,ke()),a;return e.finishedWork=e.current.alternate,e.finishedLanes=t,ma(e),Be(e,ke()),null}function My(){if(kt!==null){var e=kt;kt=null,e.forEach(function(t){t.expiredLanes|=24&t.pendingLanes,Be(t,ke())})}at()}function wp(e,t){var a=I;I|=1;try{return e(t)}finally{I=a,I===0&&(Xa(),at())}}function Sp(e,t){var a=I;I&=-2,I|=8;try{return e(t)}finally{I=a,I===0&&(Xa(),at())}}function Wr(e,t){Z(Bl,da),da|=t,Za|=t}function Ql(){da=Bl.current,W(Bl)}function tn(e,t){e.finishedWork=null,e.finishedLanes=0;var a=e.timeoutHandle;if(a!==-1&&(e.timeoutHandle=-1,fy(a)),ie!==null)for(a=ie.return;a!==null;){var n=a;switch(n.tag){case 1:n=n.type.childContextTypes,n!=null&&kr();break;case 3:qa(),W($e),W(ye),El();break;case 5:wl(n);break;case 4:qa();break;case 13:W(Q);break;case 19:W(Q);break;case 10:bl(n);break;case 23:case 24:Ql()}a=a.return}xe=e,ie=Kt(e.current,null),we=da=Za=t,de=0,Ur=null,Ol=Qa=mi=0}function xp(e,t){do{var a=ie;try{if(fl(),ri.current=_r,Ir){for(var n=ee.memoizedState;n!==null;){var i=n.queue;i!==null&&(i.pending=null),n=n.next}Ir=!1}if(oi=0,ce=ve=ee=null,si=!1,Ll.current=null,a===null||a.return===null){de=1,Ur=t,ie=null;break}e:{var r=e,o=a.return,s=a,l=t;if(t=we,s.flags|=2048,s.firstEffect=s.lastEffect=null,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l;if(!(s.mode&2)){var d=s.alternate;d?(s.updateQueue=d.updateQueue,s.memoizedState=d.memoizedState,s.lanes=d.lanes):(s.updateQueue=null,s.memoizedState=null)}var p=(Q.current&1)!==0,m=o;do{var g;if(g=m.tag===13){var b=m.memoizedState;if(b!==null)g=b.dehydrated!==null;else{var v=m.memoizedProps;g=v.fallback===void 0?!1:v.unstable_avoidThisFallback!==!0?!0:!p}}if(g){var f=m.updateQueue;if(f===null){var h=new Set;h.add(c),m.updateQueue=h}else f.add(c);if(!(m.mode&2)){if(m.flags|=64,s.flags|=16384,s.flags&=-2981,s.tag===1)if(s.alternate===null)s.tag=17;else{var y=Rt(-1,1);y.tag=2,Ut(s,y)}s.lanes|=1;break e}l=void 0,s=t;var w=r.pingCache;if(w===null?(w=r.pingCache=new zy,l=new Set,w.set(c,l)):(l=w.get(c),l===void 0&&(l=new Set,w.set(c,l))),!l.has(s)){l.add(s);var S=Oy.bind(null,r,c,s);c.then(S,S)}m.flags|=4096,m.lanes=t;break e}m=m.return}while(m!==null);l=Error((za(s.type)||"A React component")+` suspended while rendering, but no fallback UI was specified.
|
|
40
40
|
|
|
41
|
-
Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`)}de!==5&&(de=2),l=Ml(l,s),m=o;do{switch(m.tag){case 3:r=l,m.flags|=4096,t&=-t,m.lanes|=t;var j=cp(m,r,t);$m(m,j);break e;case 1:r=l;var x=m.type,C=m.stateNode;if(!(m.flags&64)&&(typeof x.getDerivedStateFromError=="function"||C!==null&&typeof C.componentDidCatch=="function"&&(ot===null||!ot.has(C)))){m.flags|=4096,t&=-t,m.lanes|=t;var z=dp(m,r,t);$m(m,z);break e}}m=m.return}while(m!==null)}jp(a)}catch(E){t=E,ie===a&&a!==null&&(ie=a=a.return);continue}break}while(!0)}function Ep(){var e=Rr.current;return Rr.current=_r,e===null?_r:e}function bi(e,t){var a=I;I|=16;var n=Ep();xe===e&&we===t||tn(e,t);do try{_y();break}catch(i){xp(e,i)}while(!0);if(fl(),I=a,Rr.current=n,ie!==null)throw Error($(261));return xe=null,we=0,de}function _y(){for(;ie!==null;)Cp(ie)}function Yy(){for(;ie!==null&&!ky();)Cp(ie)}function Cp(e){var t=Pp(e.alternate,e,da);e.memoizedProps=e.pendingProps,t===null?jp(e):ie=t,Ll.current=null}function jp(e){var t=e;do{var a=t.alternate;if(e=t.return,t.flags&2048){if(a=Py(t),a!==null){a.flags&=2047,ie=a;return}e!==null&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}else{if(a=Ty(a,t,da),a!==null){ie=a;return}if(a=t,a.tag!==24&&a.tag!==23||a.memoizedState===null||da&1073741824||!(a.mode&4)){for(var n=0,i=a.child;i!==null;)n|=i.lanes|i.childLanes,i=i.sibling;a.childLanes=n}e!==null&&!(e.flags&2048)&&(e.firstEffect===null&&(e.firstEffect=t.firstEffect),t.lastEffect!==null&&(e.lastEffect!==null&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1<t.flags&&(e.lastEffect!==null?e.lastEffect.nextEffect=t:e.firstEffect=t,e.lastEffect=t))}if(t=t.sibling,t!==null){ie=t;return}ie=t=e}while(t!==null);de===0&&(de=5)}function ma(e){var t=Wa();return sa(99,Ry.bind(null,e,t)),null}function Ry(e,t){do Ht();while(pi!==null);if(I&48)throw Error($(327));var a=e.finishedWork;if(a===null)return null;if(e.finishedWork=null,e.finishedLanes=0,a===e.current)throw Error($(177));e.callbackNode=null;var n=a.lanes|a.childLanes,i=n,r=e.pendingLanes&~i;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=i,e.mutableReadLanes&=i,e.entangledLanes&=i,i=e.entanglements;for(var o=e.eventTimes,s=e.expirationTimes;0<r;){var l=31-It(r),c=1<<l;i[l]=0,o[l]=-1,s[l]=-1,r&=~c}if(kt!==null&&!(n&24)&&kt.has(e)&&kt.delete(e),e===xe&&(ie=xe=null,we=0),1<a.flags?a.lastEffect!==null?(a.lastEffect.nextEffect=a,n=a.firstEffect):n=a:n=a.firstEffect,n!==null){if(i=I,I|=32,Ll.current=null,il=lr,o=Qd(),el(o)){if("selectionStart"in o)s={start:o.selectionStart,end:o.selectionEnd};else e:if(s=(s=o.ownerDocument)&&s.defaultView||window,(c=s.getSelection&&s.getSelection())&&c.rangeCount!==0){s=c.anchorNode,r=c.anchorOffset,l=c.focusNode,c=c.focusOffset;try{s.nodeType,l.nodeType}catch{s=null;break e}var d=0,p=-1,m=-1,h=0,b=0,v=o,f=null;t:for(;;){for(var g;v!==s||r!==0&&v.nodeType!==3||(p=d+r),v!==l||c!==0&&v.nodeType!==3||(m=d+c),v.nodeType===3&&(d+=v.nodeValue.length),(g=v.firstChild)!==null;)f=v,v=g;for(;;){if(v===o)break t;if(f===s&&++h===r&&(p=d),f===l&&++b===c&&(m=d),(g=v.nextSibling)!==null)break;v=f,f=v.parentNode}v=g}s=p===-1||m===-1?null:{start:p,end:m}}else s=null;s=s||{start:0,end:0}}else s=null;rl={focusedElem:o,selectionRange:s},lr=!1,fi=null,Vr=!1,N=n;do try{Uy()}catch(E){if(N===null)throw Error($(330));Wt(N,E),N=N.nextEffect}while(N!==null);fi=null,N=n;do try{for(o=e;N!==null;){var y=N.flags;if(y&16&&An(N.stateNode,""),y&128){var w=N.alternate;if(w!==null){var S=w.ref;S!==null&&(typeof S=="function"?S(null):S.current=null)}}switch(y&1038){case 2:bp(N),N.flags&=-3;break;case 6:bp(N),N.flags&=-3,Ul(N.alternate,N);break;case 1024:N.flags&=-1025;break;case 1028:N.flags&=-1025,Ul(N.alternate,N);break;case 4:Ul(N.alternate,N);break;case 8:s=N,yp(o,s);var j=s.alternate;gp(s),j!==null&&gp(j)}N=N.nextEffect}}catch(E){if(N===null)throw Error($(330));Wt(N,E),N=N.nextEffect}while(N!==null);if(S=rl,w=Qd(),y=S.focusedElem,o=S.selectionRange,w!==y&&y&&y.ownerDocument&&Zd(y.ownerDocument.documentElement,y)){for(o!==null&&el(y)&&(w=o.start,S=o.end,S===void 0&&(S=w),"selectionStart"in y?(y.selectionStart=w,y.selectionEnd=Math.min(S,y.value.length)):(S=(w=y.ownerDocument||document)&&w.defaultView||window,S.getSelection&&(S=S.getSelection(),s=y.textContent.length,j=Math.min(o.start,s),o=o.end===void 0?j:Math.min(o.end,s),!S.extend&&j>o&&(s=o,o=j,j=s),s=Jd(y,j),r=Jd(y,o),s&&r&&(S.rangeCount!==1||S.anchorNode!==s.node||S.anchorOffset!==s.offset||S.focusNode!==r.node||S.focusOffset!==r.offset)&&(w=w.createRange(),w.setStart(s.node,s.offset),S.removeAllRanges(),j>o?(S.addRange(w),S.extend(r.node,r.offset)):(w.setEnd(r.node,r.offset),S.addRange(w)))))),w=[],S=y;S=S.parentNode;)S.nodeType===1&&w.push({element:S,left:S.scrollLeft,top:S.scrollTop});for(typeof y.focus=="function"&&y.focus(),y=0;y<w.length;y++)S=w[y],S.element.scrollLeft=S.left,S.element.scrollTop=S.top}lr=!!il,rl=il=null,e.current=a,N=n;do try{for(y=e;N!==null;){var x=N.flags;if(x&36&&Iy(y,N.alternate,N),x&128){w=void 0;var C=N.ref;if(C!==null){var z=N.stateNode;switch(N.tag){case 5:w=z;break;default:w=z}typeof C=="function"?C(w):C.current=w}}N=N.nextEffect}}catch(E){if(N===null)throw Error($(330));Wt(N,E),N=N.nextEffect}while(N!==null);N=null,wy(),I=i}else e.current=a;if(Bt)Bt=!1,pi=e,hi=t;else for(N=n;N!==null;)t=N.nextEffect,N.nextEffect=null,N.flags&8&&(x=N,x.sibling=null,x.stateNode=null),N=t;if(n=e.pendingLanes,n===0&&(ot=null),n===1?e===Jl?gi++:(gi=0,Jl=e):gi=0,a=a.stateNode,oa&&typeof oa.onCommitFiberRoot=="function")try{oa.onCommitFiberRoot(cl,a,void 0,(a.current.flags&64)===64)}catch{}if(Be(e,ke()),Lr)throw Lr=!1,e=Kl,Kl=null,e;return I&8||at(),null}function Uy(){for(;N!==null;){var e=N.alternate;Vr||fi===null||(N.flags&8?yd(N,fi)&&(Vr=!0):N.tag===13&&Dy(e,N)&&yd(N,fi)&&(Vr=!0));var t=N.flags;t&256&&Ay(e,N),!(t&512)||Bt||(Bt=!0,Xn(97,function(){return Ht(),null})),N=N.nextEffect}}function Ht(){if(hi!==90){var e=97<hi?97:hi;return hi=90,sa(e,By)}return!1}function Ly(e,t){Gl.push(t,e),Bt||(Bt=!0,Xn(97,function(){return Ht(),null}))}function $p(e,t){ql.push(t,e),Bt||(Bt=!0,Xn(97,function(){return Ht(),null}))}function By(){if(pi===null)return!1;var e=pi;if(pi=null,I&48)throw Error($(331));var t=I;I|=32;var a=ql;ql=[];for(var n=0;n<a.length;n+=2){var i=a[n],r=a[n+1],o=i.destroy;if(i.destroy=void 0,typeof o=="function")try{o()}catch(l){if(r===null)throw Error($(330));Wt(r,l)}}for(a=Gl,Gl=[],n=0;n<a.length;n+=2){i=a[n],r=a[n+1];try{var s=i.create;i.destroy=s()}catch(l){if(r===null)throw Error($(330));Wt(r,l)}}for(s=e.current.firstEffect;s!==null;)e=s.nextEffect,s.nextEffect=null,s.flags&8&&(s.sibling=null,s.stateNode=null),s=e;return I=t,at(),!0}function Tp(e,t,a){t=Ml(a,t),t=cp(e,t,1),Ut(e,t),t=Ie(),e=Hr(e,1),e!==null&&(sr(e,1,t),Be(e,t))}function Wt(e,t){if(e.tag===3)Tp(e,e,t);else for(var a=e.return;a!==null;){if(a.tag===3){Tp(a,e,t);break}else if(a.tag===1){var n=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(ot===null||!ot.has(n))){e=Ml(t,e);var i=dp(a,e,1);if(Ut(a,i),i=Ie(),a=Hr(a,1),a!==null)sr(a,1,i),Be(a,i);else if(typeof n.componentDidCatch=="function"&&(ot===null||!ot.has(n)))try{n.componentDidCatch(t,e)}catch{}break}}a=a.return}}function Oy(e,t,a){var n=e.pingCache;n!==null&&n.delete(t),t=Ie(),e.pingedLanes|=e.suspendedLanes&a,xe===e&&(we&a)===a&&(de===4||de===3&&(we&62914560)===we&&500>ke()-Hl?tn(e,0):Ol|=a),Be(e,t)}function Vy(e,t){var a=e.stateNode;a!==null&&a.delete(t),t=0,t===0&&(t=e.mode,t&2?t&4?(vt===0&&(vt=Za),t=Ma(62914560&~vt),t===0&&(t=4194304)):t=Wa()===99?1:2:t=1),a=Ie(),e=Hr(e,t),e!==null&&(sr(e,t,a),Be(e,a))}var Pp;Pp=function(e,t,a){var n=t.lanes;if(e!==null)if(e.memoizedProps!==t.pendingProps||$e.current)qe=!0;else if(a&n)qe=!!(e.flags&16384);else{switch(qe=!1,t.tag){case 3:ep(t),xl();break;case 5:Fm(t);break;case 1:Te(t.type)&&vr(t);break;case 4:vl(t,t.stateNode.containerInfo);break;case 10:n=t.memoizedProps.value;var i=t.type._context;Z(xr,i._currentValue),i._currentValue=n;break;case 13:if(t.memoizedState!==null)return a&t.child.childLanes?tp(e,t,a):(Z(Q,Q.current&1),t=yt(e,t,a),t!==null?t.sibling:null);Z(Q,Q.current&1);break;case 19:if(n=(a&t.childLanes)!==0,e.flags&64){if(n)return op(e,t,a);t.flags|=64}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Z(Q,Q.current),n)break;return null;case 23:case 24:return t.lanes=0,Nl(e,t,a)}return yt(e,t,a)}else qe=!1;switch(t.lanes=0,t.tag){case 2:if(n=t.type,e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,i=Ha(t,ye.current),Ga(t,a),i=jl(null,t,n,e,i,a),t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,Te(n)){var r=!0;vr(t)}else r=!1;t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,yl(t);var o=n.getDerivedStateFromProps;typeof o=="function"&&jr(t,n,o,e),i.updater=$r,t.stateNode=i,i._reactInternals=t,kl(t,n,e,a),t=Il(null,t,n,!0,r,a)}else t.tag=0,ze(null,t,i,a),t=t.child;return t;case 16:i=t.elementType;e:{switch(e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,r=i._init,i=r(i._payload),t.type=i,r=t.tag=Wy(i),e=Ge(i,e),r){case 0:t=Al(null,t,i,e,a);break e;case 1:t=Xm(null,t,i,e,a);break e;case 11:t=qm(null,t,i,e,a);break e;case 14:t=Jm(null,t,i,Ge(i.type,e),n,a);break e}throw Error($(306,i,""))}return t;case 0:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Ge(n,i),Al(e,t,n,i,a);case 1:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Ge(n,i),Xm(e,t,n,i,a);case 3:if(ep(t),n=t.updateQueue,e===null||n===null)throw Error($(282));if(n=t.pendingProps,i=t.memoizedState,i=i!==null?i.element:null,jm(e,t),ei(t,n,null,a),n=t.memoizedState.element,n===i)xl(),t=yt(e,t,a);else{if(i=t.stateNode,(r=i.hydrate)&&(Lt=La(t.stateNode.containerInfo.firstChild),bt=t,r=it=!0),r){if(e=i.mutableSourceEagerHydrationData,e!=null)for(i=0;i<e.length;i+=2)r=e[i],r._workInProgressVersionPrimary=e[i+1],Ja.push(r);for(a=Dm(t,null,n,a),t.child=a;a;)a.flags=a.flags&-3|1024,a=a.sibling}else ze(e,t,n,a),xl();t=t.child}return t;case 5:return Fm(t),e===null&&Sl(t),n=t.type,i=t.pendingProps,r=e!==null?e.memoizedProps:null,o=i.children,ol(n,i)?o=null:r!==null&&ol(n,r)&&(t.flags|=16),Qm(e,t),ze(e,t,o,a),t.child;case 6:return e===null&&Sl(t),null;case 13:return tp(e,t,a);case 4:return vl(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=zr(t,null,n,a):ze(e,t,n,a),t.child;case 11:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Ge(n,i),qm(e,t,n,i,a);case 7:return ze(e,t,t.pendingProps,a),t.child;case 8:return ze(e,t,t.pendingProps.children,a),t.child;case 12:return ze(e,t,t.pendingProps.children,a),t.child;case 10:e:{n=t.type._context,i=t.pendingProps,o=t.memoizedProps,r=i.value;var s=t.type._context;if(Z(xr,s._currentValue),s._currentValue=r,o!==null)if(s=o.value,r=Re(s,r)?0:(typeof n._calculateChangedBits=="function"?n._calculateChangedBits(s,r):1073741823)|0,r===0){if(o.children===i.children&&!$e.current){t=yt(e,t,a);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var l=s.dependencies;if(l!==null){o=s.child;for(var c=l.firstContext;c!==null;){if(c.context===n&&c.observedBits&r){s.tag===1&&(c=Rt(-1,a&-a),c.tag=2,Ut(s,c)),s.lanes|=a,c=s.alternate,c!==null&&(c.lanes|=a),Cm(s.return,a),l.lanes|=a;break}c=c.next}}else o=s.tag===10&&s.type===t.type?null:s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===t){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}ze(e,t,i.children,a),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps,n=r.children,Ga(t,a),i=Ue(i,r.unstable_observedBits),n=n(i),t.flags|=1,ze(e,t,n,a),t.child;case 14:return i=t.type,r=Ge(i,t.pendingProps),r=Ge(i.type,r),Jm(e,t,i,r,n,a);case 15:return Zm(e,t,t.type,t.pendingProps,n,a);case 17:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Ge(n,i),e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,Te(n)?(e=!0,vr(t)):e=!1,Ga(t,a),Nm(t,n,i),kl(t,n,i,a),Il(null,t,n,!0,e,a);case 19:return op(e,t,a);case 23:return Nl(e,t,a);case 24:return Nl(e,t,a)}throw Error($(156,t.tag))};function Hy(e,t,a,n){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function Oe(e,t,a,n){return new Hy(e,t,a,n)}function Xl(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Wy(e){if(typeof e=="function")return Xl(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Gi)return 11;if(e===Ji)return 14}return 2}function Kt(e,t){var a=e.alternate;return a===null?(a=Oe(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.nextEffect=null,a.firstEffect=null,a.lastEffect=null),a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a}function Kr(e,t,a,n,i,r){var o=2;if(n=e,typeof e=="function")Xl(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Tt:return an(a.children,i,r,t);case Jc:o=8,i|=16;break;case us:o=8,i|=1;break;case Tn:return e=Oe(12,a,t,i|8),e.elementType=Tn,e.type=Tn,e.lanes=r,e;case Pn:return e=Oe(13,a,t,i),e.type=Pn,e.elementType=Pn,e.lanes=r,e;case qi:return e=Oe(19,a,t,i),e.elementType=qi,e.lanes=r,e;case gs:return eu(a,i,r,t);case fs:return e=Oe(24,a,t,i),e.elementType=fs,e.lanes=r,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case cs:o=10;break e;case ds:o=9;break e;case Gi:o=11;break e;case Ji:o=14;break e;case ms:o=16,n=null;break e;case ps:o=22;break e}throw Error($(130,e==null?e:typeof e,""))}return t=Oe(o,a,t,i),t.elementType=e,t.type=n,t.lanes=r,t}function an(e,t,a,n){return e=Oe(7,e,n,t),e.lanes=a,e}function eu(e,t,a,n){return e=Oe(23,e,n,t),e.elementType=gs,e.lanes=a,e}function tu(e,t,a){return e=Oe(6,e,null,t),e.lanes=a,e}function au(e,t,a){return t=Oe(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Ky(e,t,a){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=a,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=Bs(0),this.expirationTimes=Bs(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Bs(0),this.mutableSourceEagerHydrationData=null}function Gy(e,t,a){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ta,key:n==null?null:""+n,children:e,containerInfo:t,implementation:a}}function Gr(e,t,a,n){var i=t.current,r=Ie(),o=Ot(i);e:if(a){a=a._reactInternals;t:{if(na(a)!==a||a.tag!==1)throw Error($(170));var s=a;do{switch(s.tag){case 3:s=s.stateNode.context;break t;case 1:if(Te(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break t}}s=s.return}while(s!==null);throw Error($(171))}if(a.tag===1){var l=a.type;if(Te(l)){a=gm(a,l,s);break e}}a=s}else a=_t;return t.context===null?t.context=a:t.pendingContext=a,t=Rt(r,o),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),Ut(i,t),Vt(i,o,r),o}function nu(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function zp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function iu(e,t){zp(e,t),(e=e.alternate)&&zp(e,t)}function qy(){return null}function ru(e,t,a){var n=a!=null&&a.hydrationOptions!=null&&a.hydrationOptions.mutableSources||null;if(a=new Ky(e,t,a!=null&&a.hydrate===!0),t=Oe(3,null,null,t===2?7:t===1?3:0),a.current=t,t.stateNode=a,yl(t),e[Ba]=a.current,im(e.nodeType===8?e.parentNode:e),n)for(e=0;e<n.length;e++){t=n[e];var i=t._getVersion;i=i(t._source),a.mutableSourceEagerHydrationData==null?a.mutableSourceEagerHydrationData=[t,i]:a.mutableSourceEagerHydrationData.push(t,i)}this._internalRoot=a}ru.prototype.render=function(e){Gr(e,this._internalRoot,null,null)},ru.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;Gr(null,e,null,function(){t[Ba]=null})};function yi(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Jy(e,t){if(t||(t=e?e.nodeType===9?e.documentElement:e.firstChild:null,t=!(!t||t.nodeType!==1||!t.hasAttribute("data-reactroot"))),!t)for(var a;a=e.lastChild;)e.removeChild(a);return new ru(e,0,t?{hydrate:!0}:void 0)}function qr(e,t,a,n,i){var r=a._reactRootContainer;if(r){var o=r._internalRoot;if(typeof i=="function"){var s=i;i=function(){var c=nu(o);s.call(c)}}Gr(t,o,e,i)}else{if(r=a._reactRootContainer=Jy(a,n),o=r._internalRoot,typeof i=="function"){var l=i;i=function(){var c=nu(o);l.call(c)}}Sp(function(){Gr(t,o,e,i)})}return nu(o)}kd=function(e){if(e.tag===13){var t=Ie();Vt(e,4,t),iu(e,4)}},Ms=function(e){if(e.tag===13){var t=Ie();Vt(e,67108864,t),iu(e,67108864)}},vd=function(e){if(e.tag===13){var t=Ie(),a=Ot(e);Vt(e,a,t),iu(e,a)}},wd=function(e,t){return t()},Ps=function(e,t,a){switch(t){case"input":if(vs(e,a),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<a.length;t++){var n=a[t];if(n!==e&&n.form===e.form){var i=yr(n);if(!i)throw Error($(90));Xc(n),vs(n,i)}}}break;case"textarea":id(e,a);break;case"select":t=a.value,t!=null&&Na(e,!!a.multiple,t,!1)}},zs=wp,pd=function(e,t,a,n,i){var r=I;I|=4;try{return sa(98,e.bind(null,t,a,n,i))}finally{I=r,I===0&&(Xa(),at())}},Ns=function(){!(I&49)&&(My(),Ht())},hd=function(e,t){var a=I;I|=2;try{return e(t)}finally{I=a,I===0&&(Xa(),at())}};function Np(e,t){var a=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!yi(t))throw Error($(200));return Gy(e,t,null,a)}var Zy={Events:[Qn,Oa,yr,dd,md,Ht,{current:!1}]},ki={findFiberByHostInstance:ia,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},Qy={bundleType:ki.bundleType,version:ki.version,rendererPackageName:ki.rendererPackageName,rendererConfig:ki.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ea.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=bd(e),e===null?null:e.stateNode},findFiberByHostInstance:ki.findFiberByHostInstance||qy,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Jr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Jr.isDisabled&&Jr.supportsFiber)try{cl=Jr.inject(Qy),oa=Jr}catch{}}Ye.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Zy,Ye.createPortal=Np,Ye.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error($(188)):Error($(268,Object.keys(e)));return e=bd(t),e=e===null?null:e.stateNode,e},Ye.flushSync=function(e,t){var a=I;if(a&48)return e(t);I|=1;try{if(e)return sa(99,e.bind(null,t))}finally{I=a,at()}},Ye.hydrate=function(e,t,a){if(!yi(t))throw Error($(200));return qr(null,e,t,!0,a)},Ye.render=function(e,t,a){if(!yi(t))throw Error($(200));return qr(null,e,t,!1,a)},Ye.unmountComponentAtNode=function(e){if(!yi(e))throw Error($(40));return e._reactRootContainer?(Sp(function(){qr(null,null,e,!1,function(){e._reactRootContainer=null,e[Ba]=null})}),!0):!1},Ye.unstable_batchedUpdates=wp,Ye.unstable_createPortal=function(e,t){return Np(e,t,2<arguments.length&&arguments[2]!==void 0?arguments[2]:null)},Ye.unstable_renderSubtreeIntoContainer=function(e,t,a,n){if(!yi(a))throw Error($(200));if(e==null||e._reactInternals===void 0)throw Error($(38));return qr(e,t,a,!1,n)},Ye.version="17.0.2";function Ap(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Ap)}catch(e){console.error(e)}}Ap(),Oc.exports=Ye;var ou=Oc.exports;const Xy=Ne(ou),Ip=Object.prototype.toString;function su(e){switch(Ip.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return pa(e,Error)}}function nn(e,t){return Ip.call(e)===`[object ${t}]`}function lu(e){return nn(e,"ErrorEvent")}function Dp(e){return nn(e,"DOMError")}function ek(e){return nn(e,"DOMException")}function wt(e){return nn(e,"String")}function uu(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function cu(e){return e===null||uu(e)||typeof e!="object"&&typeof e!="function"}function rn(e){return nn(e,"Object")}function Zr(e){return typeof Event<"u"&&pa(e,Event)}function tk(e){return typeof Element<"u"&&pa(e,Element)}function ak(e){return nn(e,"RegExp")}function Qr(e){return!!(e&&e.then&&typeof e.then=="function")}function nk(e){return rn(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function ik(e){return typeof e=="number"&&e!==e}function pa(e,t){try{return e instanceof t}catch{return!1}}function Fp(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}function on(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function Mp(e,t){if(!Array.isArray(e))return"";const a=[];for(let n=0;n<e.length;n++){const i=e[n];try{Fp(i)?a.push("[VueViewModel]"):a.push(String(i))}catch{a.push("[value cannot be serialized]")}}return a.join(t)}function rk(e,t,a=!1){return wt(e)?ak(t)?t.test(e):wt(t)?a?e===t:e.includes(t):!1:!1}function Xr(e,t=[],a=!1){return t.some(n=>rk(e,n,a))}function ok(e,t,a=250,n,i,r,o){if(!r.exception||!r.exception.values||!o||!pa(o.originalException,Error))return;const s=r.exception.values.length>0?r.exception.values[r.exception.values.length-1]:void 0;s&&(r.exception.values=sk(du(e,t,i,o.originalException,n,r.exception.values,s,0),a))}function du(e,t,a,n,i,r,o,s){if(r.length>=a+1)return r;let l=[...r];if(pa(n[i],Error)){_p(o,s);const c=e(t,n[i]),d=l.length;Yp(c,i,d,s),l=du(e,t,a,n[i],i,[c,...l],c,d)}return Array.isArray(n.errors)&&n.errors.forEach((c,d)=>{if(pa(c,Error)){_p(o,s);const p=e(t,c),m=l.length;Yp(p,`errors[${d}]`,m,s),l=du(e,t,a,c,i,[p,...l],p,m)}}),l}function _p(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,...e.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function Yp(e,t,a,n){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:a,parent_id:n}}function sk(e,t){return e.map(a=>(a.value&&(a.value=on(a.value,t)),a))}function eo(e){return e&&e.Math==Math?e:void 0}const L=typeof globalThis=="object"&&eo(globalThis)||typeof window=="object"&&eo(window)||typeof self=="object"&&eo(self)||typeof global=="object"&&eo(global)||function(){return this}()||{};function mu(){return L}function Rp(e,t,a){const n=a||L,i=n.__SENTRY__=n.__SENTRY__||{};return i[e]||(i[e]=t())}const pu=mu(),lk=80;function Up(e,t={}){if(!e)return"<unknown>";try{let a=e;const n=5,i=[];let r=0,o=0;const s=" > ",l=s.length;let c;const d=Array.isArray(t)?t:t.keyAttrs,p=!Array.isArray(t)&&t.maxStringLength||lk;for(;a&&r++<n&&(c=uk(a,d),!(c==="html"||r>1&&o+i.length*l+c.length>=p));)i.push(c),o+=c.length,a=a.parentNode;return i.reverse().join(s)}catch{return"<unknown>"}}function uk(e,t){const a=e,n=[];let i,r,o,s,l;if(!a||!a.tagName)return"";if(pu.HTMLElement&&a instanceof HTMLElement&&a.dataset&&a.dataset.sentryComponent)return a.dataset.sentryComponent;n.push(a.tagName.toLowerCase());const c=t&&t.length?t.filter(p=>a.getAttribute(p)).map(p=>[p,a.getAttribute(p)]):null;if(c&&c.length)c.forEach(p=>{n.push(`[${p[0]}="${p[1]}"]`)});else if(a.id&&n.push(`#${a.id}`),i=a.className,i&&wt(i))for(r=i.split(/\s+/),l=0;l<r.length;l++)n.push(`.${r[l]}`);const d=["aria-label","type","name","title","alt"];for(l=0;l<d.length;l++)o=d[l],s=a.getAttribute(o),s&&n.push(`[${o}="${s}"]`);return n.join("")}function ck(){try{return pu.document.location.href}catch{return""}}function dk(e){if(!pu.HTMLElement)return null;let t=e;const a=5;for(let n=0;n<a;n++){if(!t)return null;if(t instanceof HTMLElement&&t.dataset.sentryComponent)return t.dataset.sentryComponent;t=t.parentNode}return null}const vi=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,mk="Sentry Logger ",hu=["debug","info","warn","error","log","assert","trace"],to={};function ao(e){if(!("console"in L))return e();const t=L.console,a={},n=Object.keys(to);n.forEach(i=>{const r=to[i];a[i]=t[i],t[i]=r});try{return e()}finally{n.forEach(i=>{t[i]=a[i]})}}function pk(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return vi?hu.forEach(a=>{t[a]=(...n)=>{e&&ao(()=>{L.console[a](`${mk}[${a}]:`,...n)})}}):hu.forEach(a=>{t[a]=()=>{}}),t}const A=pk(),hk=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function gk(e){return e==="http"||e==="https"}function sn(e,t=!1){const{host:a,path:n,pass:i,port:r,projectId:o,protocol:s,publicKey:l}=e;return`${s}://${l}${t&&i?`:${i}`:""}@${a}${r?`:${r}`:""}/${n&&`${n}/`}${o}`}function fk(e){const t=hk.exec(e);if(!t){ao(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[a,n,i="",r,o="",s]=t.slice(1);let l="",c=s;const d=c.split("/");if(d.length>1&&(l=d.slice(0,-1).join("/"),c=d.pop()),c){const p=c.match(/^\d+/);p&&(c=p[0])}return Lp({host:r,pass:i,path:l,projectId:c,port:o,protocol:a,publicKey:n})}function Lp(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function bk(e){if(!vi)return!0;const{port:t,projectId:a,protocol:n}=e;return["protocol","publicKey","host","projectId"].find(o=>e[o]?!1:(A.error(`Invalid Sentry Dsn: ${o} missing`),!0))?!1:a.match(/^\d+$/)?gk(n)?t&&isNaN(parseInt(t,10))?(A.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(A.error(`Invalid Sentry Dsn: Invalid protocol ${n}`),!1):(A.error(`Invalid Sentry Dsn: Invalid projectId ${a}`),!1)}function Bp(e){const t=typeof e=="string"?fk(e):Lp(e);if(!(!t||!bk(t)))return t}class st extends Error{constructor(t,a="warn"){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=a}}function me(e,t,a){if(!(t in e))return;const n=e[t],i=a(n);typeof i=="function"&&Op(i,n),e[t]=i}function wi(e,t,a){try{Object.defineProperty(e,t,{value:a,writable:!0,configurable:!0})}catch{vi&&A.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function Op(e,t){try{const a=t.prototype||{};e.prototype=t.prototype=a,wi(e,"__sentry_original__",t)}catch{}}function gu(e){return e.__sentry_original__}function yk(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}function Vp(e){if(su(e))return{message:e.message,name:e.name,stack:e.stack,...Wp(e)};if(Zr(e)){const t={type:e.type,target:Hp(e.target),currentTarget:Hp(e.currentTarget),...Wp(e)};return typeof CustomEvent<"u"&&pa(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function Hp(e){try{return tk(e)?Up(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function Wp(e){if(typeof e=="object"&&e!==null){const t={};for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t}else return{}}function kk(e,t=40){const a=Object.keys(Vp(e));if(a.sort(),!a.length)return"[object has no keys]";if(a[0].length>=t)return on(a[0],t);for(let n=a.length;n>0;n--){const i=a.slice(0,n).join(", ");if(!(i.length>t))return n===a.length?i:on(i,t)}return""}function St(e){return fu(e,new Map)}function fu(e,t){if(vk(e)){const a=t.get(e);if(a!==void 0)return a;const n={};t.set(e,n);for(const i of Object.keys(e))typeof e[i]<"u"&&(n[i]=fu(e[i],t));return n}if(Array.isArray(e)){const a=t.get(e);if(a!==void 0)return a;const n=[];return t.set(e,n),e.forEach(i=>{n.push(fu(i,t))}),n}return e}function vk(e){if(!rn(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||t==="Object"}catch{return!0}}const Kp=50,Gp=/\(error: (.*)\)/,qp=/captureMessage|captureException/;function Jp(...e){const t=e.sort((a,n)=>a[0]-n[0]).map(a=>a[1]);return(a,n=0)=>{const i=[],r=a.split(`
|
|
41
|
+
Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`)}de!==5&&(de=2),l=Ml(l,s),m=o;do{switch(m.tag){case 3:r=l,m.flags|=4096,t&=-t,m.lanes|=t;var j=cp(m,r,t);$m(m,j);break e;case 1:r=l;var x=m.type,C=m.stateNode;if(!(m.flags&64)&&(typeof x.getDerivedStateFromError=="function"||C!==null&&typeof C.componentDidCatch=="function"&&(ot===null||!ot.has(C)))){m.flags|=4096,t&=-t,m.lanes|=t;var z=dp(m,r,t);$m(m,z);break e}}m=m.return}while(m!==null)}jp(a)}catch(E){t=E,ie===a&&a!==null&&(ie=a=a.return);continue}break}while(!0)}function Ep(){var e=Rr.current;return Rr.current=_r,e===null?_r:e}function bi(e,t){var a=I;I|=16;var n=Ep();xe===e&&we===t||tn(e,t);do try{_y();break}catch(i){xp(e,i)}while(!0);if(fl(),I=a,Rr.current=n,ie!==null)throw Error($(261));return xe=null,we=0,de}function _y(){for(;ie!==null;)Cp(ie)}function Yy(){for(;ie!==null&&!ky();)Cp(ie)}function Cp(e){var t=Pp(e.alternate,e,da);e.memoizedProps=e.pendingProps,t===null?jp(e):ie=t,Ll.current=null}function jp(e){var t=e;do{var a=t.alternate;if(e=t.return,t.flags&2048){if(a=Py(t),a!==null){a.flags&=2047,ie=a;return}e!==null&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}else{if(a=Ty(a,t,da),a!==null){ie=a;return}if(a=t,a.tag!==24&&a.tag!==23||a.memoizedState===null||da&1073741824||!(a.mode&4)){for(var n=0,i=a.child;i!==null;)n|=i.lanes|i.childLanes,i=i.sibling;a.childLanes=n}e!==null&&!(e.flags&2048)&&(e.firstEffect===null&&(e.firstEffect=t.firstEffect),t.lastEffect!==null&&(e.lastEffect!==null&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1<t.flags&&(e.lastEffect!==null?e.lastEffect.nextEffect=t:e.firstEffect=t,e.lastEffect=t))}if(t=t.sibling,t!==null){ie=t;return}ie=t=e}while(t!==null);de===0&&(de=5)}function ma(e){var t=Wa();return sa(99,Ry.bind(null,e,t)),null}function Ry(e,t){do Ht();while(pi!==null);if(I&48)throw Error($(327));var a=e.finishedWork;if(a===null)return null;if(e.finishedWork=null,e.finishedLanes=0,a===e.current)throw Error($(177));e.callbackNode=null;var n=a.lanes|a.childLanes,i=n,r=e.pendingLanes&~i;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=i,e.mutableReadLanes&=i,e.entangledLanes&=i,i=e.entanglements;for(var o=e.eventTimes,s=e.expirationTimes;0<r;){var l=31-It(r),c=1<<l;i[l]=0,o[l]=-1,s[l]=-1,r&=~c}if(kt!==null&&!(n&24)&&kt.has(e)&&kt.delete(e),e===xe&&(ie=xe=null,we=0),1<a.flags?a.lastEffect!==null?(a.lastEffect.nextEffect=a,n=a.firstEffect):n=a:n=a.firstEffect,n!==null){if(i=I,I|=32,Ll.current=null,il=lr,o=Qd(),el(o)){if("selectionStart"in o)s={start:o.selectionStart,end:o.selectionEnd};else e:if(s=(s=o.ownerDocument)&&s.defaultView||window,(c=s.getSelection&&s.getSelection())&&c.rangeCount!==0){s=c.anchorNode,r=c.anchorOffset,l=c.focusNode,c=c.focusOffset;try{s.nodeType,l.nodeType}catch{s=null;break e}var d=0,p=-1,m=-1,g=0,b=0,v=o,f=null;t:for(;;){for(var h;v!==s||r!==0&&v.nodeType!==3||(p=d+r),v!==l||c!==0&&v.nodeType!==3||(m=d+c),v.nodeType===3&&(d+=v.nodeValue.length),(h=v.firstChild)!==null;)f=v,v=h;for(;;){if(v===o)break t;if(f===s&&++g===r&&(p=d),f===l&&++b===c&&(m=d),(h=v.nextSibling)!==null)break;v=f,f=v.parentNode}v=h}s=p===-1||m===-1?null:{start:p,end:m}}else s=null;s=s||{start:0,end:0}}else s=null;rl={focusedElem:o,selectionRange:s},lr=!1,fi=null,Vr=!1,N=n;do try{Uy()}catch(E){if(N===null)throw Error($(330));Wt(N,E),N=N.nextEffect}while(N!==null);fi=null,N=n;do try{for(o=e;N!==null;){var y=N.flags;if(y&16&&An(N.stateNode,""),y&128){var w=N.alternate;if(w!==null){var S=w.ref;S!==null&&(typeof S=="function"?S(null):S.current=null)}}switch(y&1038){case 2:bp(N),N.flags&=-3;break;case 6:bp(N),N.flags&=-3,Ul(N.alternate,N);break;case 1024:N.flags&=-1025;break;case 1028:N.flags&=-1025,Ul(N.alternate,N);break;case 4:Ul(N.alternate,N);break;case 8:s=N,yp(o,s);var j=s.alternate;gp(s),j!==null&&gp(j)}N=N.nextEffect}}catch(E){if(N===null)throw Error($(330));Wt(N,E),N=N.nextEffect}while(N!==null);if(S=rl,w=Qd(),y=S.focusedElem,o=S.selectionRange,w!==y&&y&&y.ownerDocument&&Zd(y.ownerDocument.documentElement,y)){for(o!==null&&el(y)&&(w=o.start,S=o.end,S===void 0&&(S=w),"selectionStart"in y?(y.selectionStart=w,y.selectionEnd=Math.min(S,y.value.length)):(S=(w=y.ownerDocument||document)&&w.defaultView||window,S.getSelection&&(S=S.getSelection(),s=y.textContent.length,j=Math.min(o.start,s),o=o.end===void 0?j:Math.min(o.end,s),!S.extend&&j>o&&(s=o,o=j,j=s),s=Jd(y,j),r=Jd(y,o),s&&r&&(S.rangeCount!==1||S.anchorNode!==s.node||S.anchorOffset!==s.offset||S.focusNode!==r.node||S.focusOffset!==r.offset)&&(w=w.createRange(),w.setStart(s.node,s.offset),S.removeAllRanges(),j>o?(S.addRange(w),S.extend(r.node,r.offset)):(w.setEnd(r.node,r.offset),S.addRange(w)))))),w=[],S=y;S=S.parentNode;)S.nodeType===1&&w.push({element:S,left:S.scrollLeft,top:S.scrollTop});for(typeof y.focus=="function"&&y.focus(),y=0;y<w.length;y++)S=w[y],S.element.scrollLeft=S.left,S.element.scrollTop=S.top}lr=!!il,rl=il=null,e.current=a,N=n;do try{for(y=e;N!==null;){var x=N.flags;if(x&36&&Iy(y,N.alternate,N),x&128){w=void 0;var C=N.ref;if(C!==null){var z=N.stateNode;switch(N.tag){case 5:w=z;break;default:w=z}typeof C=="function"?C(w):C.current=w}}N=N.nextEffect}}catch(E){if(N===null)throw Error($(330));Wt(N,E),N=N.nextEffect}while(N!==null);N=null,wy(),I=i}else e.current=a;if(Bt)Bt=!1,pi=e,hi=t;else for(N=n;N!==null;)t=N.nextEffect,N.nextEffect=null,N.flags&8&&(x=N,x.sibling=null,x.stateNode=null),N=t;if(n=e.pendingLanes,n===0&&(ot=null),n===1?e===Jl?gi++:(gi=0,Jl=e):gi=0,a=a.stateNode,oa&&typeof oa.onCommitFiberRoot=="function")try{oa.onCommitFiberRoot(cl,a,void 0,(a.current.flags&64)===64)}catch{}if(Be(e,ke()),Lr)throw Lr=!1,e=Kl,Kl=null,e;return I&8||at(),null}function Uy(){for(;N!==null;){var e=N.alternate;Vr||fi===null||(N.flags&8?yd(N,fi)&&(Vr=!0):N.tag===13&&Dy(e,N)&&yd(N,fi)&&(Vr=!0));var t=N.flags;t&256&&Ay(e,N),!(t&512)||Bt||(Bt=!0,Xn(97,function(){return Ht(),null})),N=N.nextEffect}}function Ht(){if(hi!==90){var e=97<hi?97:hi;return hi=90,sa(e,By)}return!1}function Ly(e,t){Gl.push(t,e),Bt||(Bt=!0,Xn(97,function(){return Ht(),null}))}function $p(e,t){ql.push(t,e),Bt||(Bt=!0,Xn(97,function(){return Ht(),null}))}function By(){if(pi===null)return!1;var e=pi;if(pi=null,I&48)throw Error($(331));var t=I;I|=32;var a=ql;ql=[];for(var n=0;n<a.length;n+=2){var i=a[n],r=a[n+1],o=i.destroy;if(i.destroy=void 0,typeof o=="function")try{o()}catch(l){if(r===null)throw Error($(330));Wt(r,l)}}for(a=Gl,Gl=[],n=0;n<a.length;n+=2){i=a[n],r=a[n+1];try{var s=i.create;i.destroy=s()}catch(l){if(r===null)throw Error($(330));Wt(r,l)}}for(s=e.current.firstEffect;s!==null;)e=s.nextEffect,s.nextEffect=null,s.flags&8&&(s.sibling=null,s.stateNode=null),s=e;return I=t,at(),!0}function Tp(e,t,a){t=Ml(a,t),t=cp(e,t,1),Ut(e,t),t=Ie(),e=Hr(e,1),e!==null&&(sr(e,1,t),Be(e,t))}function Wt(e,t){if(e.tag===3)Tp(e,e,t);else for(var a=e.return;a!==null;){if(a.tag===3){Tp(a,e,t);break}else if(a.tag===1){var n=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(ot===null||!ot.has(n))){e=Ml(t,e);var i=dp(a,e,1);if(Ut(a,i),i=Ie(),a=Hr(a,1),a!==null)sr(a,1,i),Be(a,i);else if(typeof n.componentDidCatch=="function"&&(ot===null||!ot.has(n)))try{n.componentDidCatch(t,e)}catch{}break}}a=a.return}}function Oy(e,t,a){var n=e.pingCache;n!==null&&n.delete(t),t=Ie(),e.pingedLanes|=e.suspendedLanes&a,xe===e&&(we&a)===a&&(de===4||de===3&&(we&62914560)===we&&500>ke()-Hl?tn(e,0):Ol|=a),Be(e,t)}function Vy(e,t){var a=e.stateNode;a!==null&&a.delete(t),t=0,t===0&&(t=e.mode,t&2?t&4?(vt===0&&(vt=Za),t=Ma(62914560&~vt),t===0&&(t=4194304)):t=Wa()===99?1:2:t=1),a=Ie(),e=Hr(e,t),e!==null&&(sr(e,t,a),Be(e,a))}var Pp;Pp=function(e,t,a){var n=t.lanes;if(e!==null)if(e.memoizedProps!==t.pendingProps||$e.current)qe=!0;else if(a&n)qe=!!(e.flags&16384);else{switch(qe=!1,t.tag){case 3:ep(t),xl();break;case 5:Fm(t);break;case 1:Te(t.type)&&vr(t);break;case 4:vl(t,t.stateNode.containerInfo);break;case 10:n=t.memoizedProps.value;var i=t.type._context;Z(xr,i._currentValue),i._currentValue=n;break;case 13:if(t.memoizedState!==null)return a&t.child.childLanes?tp(e,t,a):(Z(Q,Q.current&1),t=yt(e,t,a),t!==null?t.sibling:null);Z(Q,Q.current&1);break;case 19:if(n=(a&t.childLanes)!==0,e.flags&64){if(n)return op(e,t,a);t.flags|=64}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Z(Q,Q.current),n)break;return null;case 23:case 24:return t.lanes=0,Nl(e,t,a)}return yt(e,t,a)}else qe=!1;switch(t.lanes=0,t.tag){case 2:if(n=t.type,e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,i=Ha(t,ye.current),Ga(t,a),i=jl(null,t,n,e,i,a),t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,Te(n)){var r=!0;vr(t)}else r=!1;t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,yl(t);var o=n.getDerivedStateFromProps;typeof o=="function"&&jr(t,n,o,e),i.updater=$r,t.stateNode=i,i._reactInternals=t,kl(t,n,e,a),t=Il(null,t,n,!0,r,a)}else t.tag=0,ze(null,t,i,a),t=t.child;return t;case 16:i=t.elementType;e:{switch(e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,r=i._init,i=r(i._payload),t.type=i,r=t.tag=Wy(i),e=Ge(i,e),r){case 0:t=Al(null,t,i,e,a);break e;case 1:t=Xm(null,t,i,e,a);break e;case 11:t=qm(null,t,i,e,a);break e;case 14:t=Jm(null,t,i,Ge(i.type,e),n,a);break e}throw Error($(306,i,""))}return t;case 0:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Ge(n,i),Al(e,t,n,i,a);case 1:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Ge(n,i),Xm(e,t,n,i,a);case 3:if(ep(t),n=t.updateQueue,e===null||n===null)throw Error($(282));if(n=t.pendingProps,i=t.memoizedState,i=i!==null?i.element:null,jm(e,t),ei(t,n,null,a),n=t.memoizedState.element,n===i)xl(),t=yt(e,t,a);else{if(i=t.stateNode,(r=i.hydrate)&&(Lt=La(t.stateNode.containerInfo.firstChild),bt=t,r=it=!0),r){if(e=i.mutableSourceEagerHydrationData,e!=null)for(i=0;i<e.length;i+=2)r=e[i],r._workInProgressVersionPrimary=e[i+1],Ja.push(r);for(a=Dm(t,null,n,a),t.child=a;a;)a.flags=a.flags&-3|1024,a=a.sibling}else ze(e,t,n,a),xl();t=t.child}return t;case 5:return Fm(t),e===null&&Sl(t),n=t.type,i=t.pendingProps,r=e!==null?e.memoizedProps:null,o=i.children,ol(n,i)?o=null:r!==null&&ol(n,r)&&(t.flags|=16),Qm(e,t),ze(e,t,o,a),t.child;case 6:return e===null&&Sl(t),null;case 13:return tp(e,t,a);case 4:return vl(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=zr(t,null,n,a):ze(e,t,n,a),t.child;case 11:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Ge(n,i),qm(e,t,n,i,a);case 7:return ze(e,t,t.pendingProps,a),t.child;case 8:return ze(e,t,t.pendingProps.children,a),t.child;case 12:return ze(e,t,t.pendingProps.children,a),t.child;case 10:e:{n=t.type._context,i=t.pendingProps,o=t.memoizedProps,r=i.value;var s=t.type._context;if(Z(xr,s._currentValue),s._currentValue=r,o!==null)if(s=o.value,r=Re(s,r)?0:(typeof n._calculateChangedBits=="function"?n._calculateChangedBits(s,r):1073741823)|0,r===0){if(o.children===i.children&&!$e.current){t=yt(e,t,a);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var l=s.dependencies;if(l!==null){o=s.child;for(var c=l.firstContext;c!==null;){if(c.context===n&&c.observedBits&r){s.tag===1&&(c=Rt(-1,a&-a),c.tag=2,Ut(s,c)),s.lanes|=a,c=s.alternate,c!==null&&(c.lanes|=a),Cm(s.return,a),l.lanes|=a;break}c=c.next}}else o=s.tag===10&&s.type===t.type?null:s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===t){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}ze(e,t,i.children,a),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps,n=r.children,Ga(t,a),i=Ue(i,r.unstable_observedBits),n=n(i),t.flags|=1,ze(e,t,n,a),t.child;case 14:return i=t.type,r=Ge(i,t.pendingProps),r=Ge(i.type,r),Jm(e,t,i,r,n,a);case 15:return Zm(e,t,t.type,t.pendingProps,n,a);case 17:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Ge(n,i),e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,Te(n)?(e=!0,vr(t)):e=!1,Ga(t,a),Nm(t,n,i),kl(t,n,i,a),Il(null,t,n,!0,e,a);case 19:return op(e,t,a);case 23:return Nl(e,t,a);case 24:return Nl(e,t,a)}throw Error($(156,t.tag))};function Hy(e,t,a,n){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function Oe(e,t,a,n){return new Hy(e,t,a,n)}function Xl(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Wy(e){if(typeof e=="function")return Xl(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Gi)return 11;if(e===Ji)return 14}return 2}function Kt(e,t){var a=e.alternate;return a===null?(a=Oe(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.nextEffect=null,a.firstEffect=null,a.lastEffect=null),a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a}function Kr(e,t,a,n,i,r){var o=2;if(n=e,typeof e=="function")Xl(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Tt:return an(a.children,i,r,t);case Jc:o=8,i|=16;break;case us:o=8,i|=1;break;case Tn:return e=Oe(12,a,t,i|8),e.elementType=Tn,e.type=Tn,e.lanes=r,e;case Pn:return e=Oe(13,a,t,i),e.type=Pn,e.elementType=Pn,e.lanes=r,e;case qi:return e=Oe(19,a,t,i),e.elementType=qi,e.lanes=r,e;case gs:return eu(a,i,r,t);case fs:return e=Oe(24,a,t,i),e.elementType=fs,e.lanes=r,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case cs:o=10;break e;case ds:o=9;break e;case Gi:o=11;break e;case Ji:o=14;break e;case ms:o=16,n=null;break e;case ps:o=22;break e}throw Error($(130,e==null?e:typeof e,""))}return t=Oe(o,a,t,i),t.elementType=e,t.type=n,t.lanes=r,t}function an(e,t,a,n){return e=Oe(7,e,n,t),e.lanes=a,e}function eu(e,t,a,n){return e=Oe(23,e,n,t),e.elementType=gs,e.lanes=a,e}function tu(e,t,a){return e=Oe(6,e,null,t),e.lanes=a,e}function au(e,t,a){return t=Oe(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Ky(e,t,a){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=a,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=Bs(0),this.expirationTimes=Bs(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Bs(0),this.mutableSourceEagerHydrationData=null}function Gy(e,t,a){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ta,key:n==null?null:""+n,children:e,containerInfo:t,implementation:a}}function Gr(e,t,a,n){var i=t.current,r=Ie(),o=Ot(i);e:if(a){a=a._reactInternals;t:{if(na(a)!==a||a.tag!==1)throw Error($(170));var s=a;do{switch(s.tag){case 3:s=s.stateNode.context;break t;case 1:if(Te(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break t}}s=s.return}while(s!==null);throw Error($(171))}if(a.tag===1){var l=a.type;if(Te(l)){a=gm(a,l,s);break e}}a=s}else a=_t;return t.context===null?t.context=a:t.pendingContext=a,t=Rt(r,o),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),Ut(i,t),Vt(i,o,r),o}function nu(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function zp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function iu(e,t){zp(e,t),(e=e.alternate)&&zp(e,t)}function qy(){return null}function ru(e,t,a){var n=a!=null&&a.hydrationOptions!=null&&a.hydrationOptions.mutableSources||null;if(a=new Ky(e,t,a!=null&&a.hydrate===!0),t=Oe(3,null,null,t===2?7:t===1?3:0),a.current=t,t.stateNode=a,yl(t),e[Ba]=a.current,im(e.nodeType===8?e.parentNode:e),n)for(e=0;e<n.length;e++){t=n[e];var i=t._getVersion;i=i(t._source),a.mutableSourceEagerHydrationData==null?a.mutableSourceEagerHydrationData=[t,i]:a.mutableSourceEagerHydrationData.push(t,i)}this._internalRoot=a}ru.prototype.render=function(e){Gr(e,this._internalRoot,null,null)},ru.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;Gr(null,e,null,function(){t[Ba]=null})};function yi(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Jy(e,t){if(t||(t=e?e.nodeType===9?e.documentElement:e.firstChild:null,t=!(!t||t.nodeType!==1||!t.hasAttribute("data-reactroot"))),!t)for(var a;a=e.lastChild;)e.removeChild(a);return new ru(e,0,t?{hydrate:!0}:void 0)}function qr(e,t,a,n,i){var r=a._reactRootContainer;if(r){var o=r._internalRoot;if(typeof i=="function"){var s=i;i=function(){var c=nu(o);s.call(c)}}Gr(t,o,e,i)}else{if(r=a._reactRootContainer=Jy(a,n),o=r._internalRoot,typeof i=="function"){var l=i;i=function(){var c=nu(o);l.call(c)}}Sp(function(){Gr(t,o,e,i)})}return nu(o)}kd=function(e){if(e.tag===13){var t=Ie();Vt(e,4,t),iu(e,4)}},Ms=function(e){if(e.tag===13){var t=Ie();Vt(e,67108864,t),iu(e,67108864)}},vd=function(e){if(e.tag===13){var t=Ie(),a=Ot(e);Vt(e,a,t),iu(e,a)}},wd=function(e,t){return t()},Ps=function(e,t,a){switch(t){case"input":if(vs(e,a),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<a.length;t++){var n=a[t];if(n!==e&&n.form===e.form){var i=yr(n);if(!i)throw Error($(90));Xc(n),vs(n,i)}}}break;case"textarea":id(e,a);break;case"select":t=a.value,t!=null&&Na(e,!!a.multiple,t,!1)}},zs=wp,pd=function(e,t,a,n,i){var r=I;I|=4;try{return sa(98,e.bind(null,t,a,n,i))}finally{I=r,I===0&&(Xa(),at())}},Ns=function(){!(I&49)&&(My(),Ht())},hd=function(e,t){var a=I;I|=2;try{return e(t)}finally{I=a,I===0&&(Xa(),at())}};function Np(e,t){var a=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!yi(t))throw Error($(200));return Gy(e,t,null,a)}var Zy={Events:[Qn,Oa,yr,dd,md,Ht,{current:!1}]},ki={findFiberByHostInstance:ia,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},Qy={bundleType:ki.bundleType,version:ki.version,rendererPackageName:ki.rendererPackageName,rendererConfig:ki.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ea.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=bd(e),e===null?null:e.stateNode},findFiberByHostInstance:ki.findFiberByHostInstance||qy,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Jr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Jr.isDisabled&&Jr.supportsFiber)try{cl=Jr.inject(Qy),oa=Jr}catch{}}Ye.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Zy,Ye.createPortal=Np,Ye.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error($(188)):Error($(268,Object.keys(e)));return e=bd(t),e=e===null?null:e.stateNode,e},Ye.flushSync=function(e,t){var a=I;if(a&48)return e(t);I|=1;try{if(e)return sa(99,e.bind(null,t))}finally{I=a,at()}},Ye.hydrate=function(e,t,a){if(!yi(t))throw Error($(200));return qr(null,e,t,!0,a)},Ye.render=function(e,t,a){if(!yi(t))throw Error($(200));return qr(null,e,t,!1,a)},Ye.unmountComponentAtNode=function(e){if(!yi(e))throw Error($(40));return e._reactRootContainer?(Sp(function(){qr(null,null,e,!1,function(){e._reactRootContainer=null,e[Ba]=null})}),!0):!1},Ye.unstable_batchedUpdates=wp,Ye.unstable_createPortal=function(e,t){return Np(e,t,2<arguments.length&&arguments[2]!==void 0?arguments[2]:null)},Ye.unstable_renderSubtreeIntoContainer=function(e,t,a,n){if(!yi(a))throw Error($(200));if(e==null||e._reactInternals===void 0)throw Error($(38));return qr(e,t,a,!1,n)},Ye.version="17.0.2";function Ap(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Ap)}catch(e){console.error(e)}}Ap(),Oc.exports=Ye;var ou=Oc.exports;const Xy=Ne(ou),Ip=Object.prototype.toString;function su(e){switch(Ip.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return pa(e,Error)}}function nn(e,t){return Ip.call(e)===`[object ${t}]`}function lu(e){return nn(e,"ErrorEvent")}function Dp(e){return nn(e,"DOMError")}function ek(e){return nn(e,"DOMException")}function wt(e){return nn(e,"String")}function uu(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function cu(e){return e===null||uu(e)||typeof e!="object"&&typeof e!="function"}function rn(e){return nn(e,"Object")}function Zr(e){return typeof Event<"u"&&pa(e,Event)}function tk(e){return typeof Element<"u"&&pa(e,Element)}function ak(e){return nn(e,"RegExp")}function Qr(e){return!!(e&&e.then&&typeof e.then=="function")}function nk(e){return rn(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function ik(e){return typeof e=="number"&&e!==e}function pa(e,t){try{return e instanceof t}catch{return!1}}function Fp(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}function on(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function Mp(e,t){if(!Array.isArray(e))return"";const a=[];for(let n=0;n<e.length;n++){const i=e[n];try{Fp(i)?a.push("[VueViewModel]"):a.push(String(i))}catch{a.push("[value cannot be serialized]")}}return a.join(t)}function rk(e,t,a=!1){return wt(e)?ak(t)?t.test(e):wt(t)?a?e===t:e.includes(t):!1:!1}function Xr(e,t=[],a=!1){return t.some(n=>rk(e,n,a))}function ok(e,t,a=250,n,i,r,o){if(!r.exception||!r.exception.values||!o||!pa(o.originalException,Error))return;const s=r.exception.values.length>0?r.exception.values[r.exception.values.length-1]:void 0;s&&(r.exception.values=sk(du(e,t,i,o.originalException,n,r.exception.values,s,0),a))}function du(e,t,a,n,i,r,o,s){if(r.length>=a+1)return r;let l=[...r];if(pa(n[i],Error)){_p(o,s);const c=e(t,n[i]),d=l.length;Yp(c,i,d,s),l=du(e,t,a,n[i],i,[c,...l],c,d)}return Array.isArray(n.errors)&&n.errors.forEach((c,d)=>{if(pa(c,Error)){_p(o,s);const p=e(t,c),m=l.length;Yp(p,`errors[${d}]`,m,s),l=du(e,t,a,c,i,[p,...l],p,m)}}),l}function _p(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,...e.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function Yp(e,t,a,n){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:a,parent_id:n}}function sk(e,t){return e.map(a=>(a.value&&(a.value=on(a.value,t)),a))}function eo(e){return e&&e.Math==Math?e:void 0}const L=typeof globalThis=="object"&&eo(globalThis)||typeof window=="object"&&eo(window)||typeof self=="object"&&eo(self)||typeof global=="object"&&eo(global)||function(){return this}()||{};function mu(){return L}function Rp(e,t,a){const n=a||L,i=n.__SENTRY__=n.__SENTRY__||{};return i[e]||(i[e]=t())}const pu=mu(),lk=80;function Up(e,t={}){if(!e)return"<unknown>";try{let a=e;const n=5,i=[];let r=0,o=0;const s=" > ",l=s.length;let c;const d=Array.isArray(t)?t:t.keyAttrs,p=!Array.isArray(t)&&t.maxStringLength||lk;for(;a&&r++<n&&(c=uk(a,d),!(c==="html"||r>1&&o+i.length*l+c.length>=p));)i.push(c),o+=c.length,a=a.parentNode;return i.reverse().join(s)}catch{return"<unknown>"}}function uk(e,t){const a=e,n=[];let i,r,o,s,l;if(!a||!a.tagName)return"";if(pu.HTMLElement&&a instanceof HTMLElement&&a.dataset&&a.dataset.sentryComponent)return a.dataset.sentryComponent;n.push(a.tagName.toLowerCase());const c=t&&t.length?t.filter(p=>a.getAttribute(p)).map(p=>[p,a.getAttribute(p)]):null;if(c&&c.length)c.forEach(p=>{n.push(`[${p[0]}="${p[1]}"]`)});else if(a.id&&n.push(`#${a.id}`),i=a.className,i&&wt(i))for(r=i.split(/\s+/),l=0;l<r.length;l++)n.push(`.${r[l]}`);const d=["aria-label","type","name","title","alt"];for(l=0;l<d.length;l++)o=d[l],s=a.getAttribute(o),s&&n.push(`[${o}="${s}"]`);return n.join("")}function ck(){try{return pu.document.location.href}catch{return""}}function dk(e){if(!pu.HTMLElement)return null;let t=e;const a=5;for(let n=0;n<a;n++){if(!t)return null;if(t instanceof HTMLElement&&t.dataset.sentryComponent)return t.dataset.sentryComponent;t=t.parentNode}return null}const vi=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,mk="Sentry Logger ",hu=["debug","info","warn","error","log","assert","trace"],to={};function ao(e){if(!("console"in L))return e();const t=L.console,a={},n=Object.keys(to);n.forEach(i=>{const r=to[i];a[i]=t[i],t[i]=r});try{return e()}finally{n.forEach(i=>{t[i]=a[i]})}}function pk(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return vi?hu.forEach(a=>{t[a]=(...n)=>{e&&ao(()=>{L.console[a](`${mk}[${a}]:`,...n)})}}):hu.forEach(a=>{t[a]=()=>{}}),t}const A=pk(),hk=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function gk(e){return e==="http"||e==="https"}function sn(e,t=!1){const{host:a,path:n,pass:i,port:r,projectId:o,protocol:s,publicKey:l}=e;return`${s}://${l}${t&&i?`:${i}`:""}@${a}${r?`:${r}`:""}/${n&&`${n}/`}${o}`}function fk(e){const t=hk.exec(e);if(!t){ao(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[a,n,i="",r,o="",s]=t.slice(1);let l="",c=s;const d=c.split("/");if(d.length>1&&(l=d.slice(0,-1).join("/"),c=d.pop()),c){const p=c.match(/^\d+/);p&&(c=p[0])}return Lp({host:r,pass:i,path:l,projectId:c,port:o,protocol:a,publicKey:n})}function Lp(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function bk(e){if(!vi)return!0;const{port:t,projectId:a,protocol:n}=e;return["protocol","publicKey","host","projectId"].find(o=>e[o]?!1:(A.error(`Invalid Sentry Dsn: ${o} missing`),!0))?!1:a.match(/^\d+$/)?gk(n)?t&&isNaN(parseInt(t,10))?(A.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(A.error(`Invalid Sentry Dsn: Invalid protocol ${n}`),!1):(A.error(`Invalid Sentry Dsn: Invalid projectId ${a}`),!1)}function Bp(e){const t=typeof e=="string"?fk(e):Lp(e);if(!(!t||!bk(t)))return t}class st extends Error{constructor(t,a="warn"){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=a}}function me(e,t,a){if(!(t in e))return;const n=e[t],i=a(n);typeof i=="function"&&Op(i,n),e[t]=i}function wi(e,t,a){try{Object.defineProperty(e,t,{value:a,writable:!0,configurable:!0})}catch{vi&&A.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function Op(e,t){try{const a=t.prototype||{};e.prototype=t.prototype=a,wi(e,"__sentry_original__",t)}catch{}}function gu(e){return e.__sentry_original__}function yk(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}function Vp(e){if(su(e))return{message:e.message,name:e.name,stack:e.stack,...Wp(e)};if(Zr(e)){const t={type:e.type,target:Hp(e.target),currentTarget:Hp(e.currentTarget),...Wp(e)};return typeof CustomEvent<"u"&&pa(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function Hp(e){try{return tk(e)?Up(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function Wp(e){if(typeof e=="object"&&e!==null){const t={};for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t}else return{}}function kk(e,t=40){const a=Object.keys(Vp(e));if(a.sort(),!a.length)return"[object has no keys]";if(a[0].length>=t)return on(a[0],t);for(let n=a.length;n>0;n--){const i=a.slice(0,n).join(", ");if(!(i.length>t))return n===a.length?i:on(i,t)}return""}function St(e){return fu(e,new Map)}function fu(e,t){if(vk(e)){const a=t.get(e);if(a!==void 0)return a;const n={};t.set(e,n);for(const i of Object.keys(e))typeof e[i]<"u"&&(n[i]=fu(e[i],t));return n}if(Array.isArray(e)){const a=t.get(e);if(a!==void 0)return a;const n=[];return t.set(e,n),e.forEach(i=>{n.push(fu(i,t))}),n}return e}function vk(e){if(!rn(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||t==="Object"}catch{return!0}}const Kp=50,Gp=/\(error: (.*)\)/,qp=/captureMessage|captureException/;function Jp(...e){const t=e.sort((a,n)=>a[0]-n[0]).map(a=>a[1]);return(a,n=0)=>{const i=[],r=a.split(`
|
|
42
42
|
`);for(let o=n;o<r.length;o++){const s=r[o];if(s.length>1024)continue;const l=Gp.test(s)?s.replace(Gp,"$1"):s;if(!l.match(/\S*Error: /)){for(const c of t){const d=c(l);if(d){i.push(d);break}}if(i.length>=Kp)break}}return Sk(i)}}function wk(e){return Array.isArray(e)?Jp(...e):e}function Sk(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(t[t.length-1].function||"")&&t.pop(),t.reverse(),qp.test(t[t.length-1].function||"")&&(t.pop(),qp.test(t[t.length-1].function||"")&&t.pop()),t.slice(0,Kp).map(a=>({...a,filename:a.filename||t[t.length-1].filename,function:a.function||"?"}))}const bu="<anonymous>";function Gt(e){try{return!e||typeof e!="function"?bu:e.name||bu}catch{return bu}}const no={},Zp={};function ha(e,t){no[e]=no[e]||[],no[e].push(t)}function ga(e,t){Zp[e]||(t(),Zp[e]=!0)}function Je(e,t){const a=e&&no[e];if(a)for(const n of a)try{n(t)}catch(i){vi&&A.error(`Error while triggering instrumentation handler.
|
|
43
43
|
Type: ${e}
|
|
44
44
|
Name: ${Gt(n)}
|
|
45
|
-
Error:`,i)}}function xk(e){const t="console";ha(t,e),ga(t,Ek)}function Ek(){"console"in L&&hu.forEach(function(e){e in L.console&&me(L.console,e,function(t){return to[e]=t,function(...a){Je("console",{args:a,level:e});const i=to[e];i&&i.apply(L.console,a)}})})}function Ve(){const e=L,t=e.crypto||e.msCrypto;let a=()=>Math.random()*16;try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(a=()=>{const n=new Uint8Array(1);return t.getRandomValues(n),n[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,n=>(n^(a()&15)>>n/4).toString(16))}function Qp(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function qt(e){const{message:t,event_id:a}=e;if(t)return t;const n=Qp(e);return n?n.type&&n.value?`${n.type}: ${n.value}`:n.type||n.value||a||"<unknown>":a||"<unknown>"}function yu(e,t,a){const n=e.exception=e.exception||{},i=n.values=n.values||[],r=i[0]=i[0]||{};r.value||(r.value=t||""),r.type||(r.type="Error")}function Si(e,t){const a=Qp(e);if(!a)return;const n={type:"generic",handled:!0},i=a.mechanism;if(a.mechanism={...n,...i,...t},t&&"data"in t){const r={...i&&i.data,...t.data};a.mechanism.data=r}}function Xp(e){if(e&&e.__sentry_captured__)return!0;try{wi(e,"__sentry_captured__",!0)}catch{}return!1}function eh(e){return Array.isArray(e)?e:[e]}const ln=L,Ck=1e3;let th,ku,vu;function jk(e){const t="dom";ha(t,e),ga(t,$k)}function $k(){if(!ln.document)return;const e=Je.bind(null,"dom"),t=ah(e,!0);ln.document.addEventListener("click",t,!1),ln.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(a=>{const n=ln[a]&&ln[a].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(me(n,"addEventListener",function(i){return function(r,o,s){if(r==="click"||r=="keypress")try{const l=this,c=l.__sentry_instrumentation_handlers__=l.__sentry_instrumentation_handlers__||{},d=c[r]=c[r]||{refCount:0};if(!d.handler){const p=ah(e);d.handler=p,i.call(this,r,p,s)}d.refCount++}catch{}return i.call(this,r,o,s)}}),me(n,"removeEventListener",function(i){return function(r,o,s){if(r==="click"||r=="keypress")try{const l=this,c=l.__sentry_instrumentation_handlers__||{},d=c[r];d&&(d.refCount--,d.refCount<=0&&(i.call(this,r,d.handler,s),d.handler=void 0,delete c[r]),Object.keys(c).length===0&&delete l.__sentry_instrumentation_handlers__)}catch{}return i.call(this,r,o,s)}}))})}function Tk(e){if(e.type!==ku)return!1;try{if(!e.target||e.target._sentryId!==vu)return!1}catch{}return!0}function Pk(e,t){return e!=="keypress"?!1:!t||!t.tagName?!0:!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable)}function ah(e,t=!1){return a=>{if(!a||a._sentryCaptured)return;const n=zk(a);if(Pk(a.type,n))return;wi(a,"_sentryCaptured",!0),n&&!n._sentryId&&wi(n,"_sentryId",Ve());const i=a.type==="keypress"?"input":a.type;Tk(a)||(e({event:a,name:i,global:t}),ku=a.type,vu=n?n._sentryId:void 0),clearTimeout(th),th=ln.setTimeout(()=>{vu=void 0,ku=void 0},Ck)}}function zk(e){try{return e.target}catch{return null}}const wu=mu();function nh(){if(!("fetch"in wu))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function Su(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Nk(){if(typeof EdgeRuntime=="string")return!0;if(!nh())return!1;if(Su(wu.fetch))return!0;let e=!1;const t=wu.document;if(t&&typeof t.createElement=="function")try{const a=t.createElement("iframe");a.hidden=!0,t.head.appendChild(a),a.contentWindow&&a.contentWindow.fetch&&(e=Su(a.contentWindow.fetch)),t.head.removeChild(a)}catch(a){vi&&A.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",a)}return e}function Ak(e){const t="fetch";ha(t,e),ga(t,Ik)}function Ik(){Nk()&&me(L,"fetch",function(e){return function(...t){const{method:a,url:n}=Dk(t),i={args:t,fetchData:{method:a,url:n},startTimestamp:Date.now()};return Je("fetch",{...i}),e.apply(L,t).then(r=>{const o={...i,endTimestamp:Date.now(),response:r};return Je("fetch",o),r},r=>{const o={...i,endTimestamp:Date.now(),error:r};throw Je("fetch",o),r})}})}function xu(e,t){return!!e&&typeof e=="object"&&!!e[t]}function ih(e){return typeof e=="string"?e:e?xu(e,"url")?e.url:e.toString?e.toString():"":""}function Dk(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[a,n]=e;return{url:ih(a),method:xu(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:ih(t),method:xu(t,"method")?String(t.method).toUpperCase():"GET"}}let io=null;function Fk(e){const t="error";ha(t,e),ga(t,Mk)}function Mk(){io=L.onerror,L.onerror=function(e,t,a,n,i){return Je("error",{column:n,error:i,line:a,msg:e,url:t}),io&&!io.__SENTRY_LOADER__?io.apply(this,arguments):!1},L.onerror.__SENTRY_INSTRUMENTED__=!0}let ro=null;function _k(e){const t="unhandledrejection";ha(t,e),ga(t,Yk)}function Yk(){ro=L.onunhandledrejection,L.onunhandledrejection=function(e){return Je("unhandledrejection",e),ro&&!ro.__SENTRY_LOADER__?ro.apply(this,arguments):!0},L.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const oo=mu();function Rk(){const e=oo.chrome,t=e&&e.app&&e.app.runtime,a="history"in oo&&!!oo.history.pushState&&!!oo.history.replaceState;return!t&&a}const xi=L;let so;function rh(e){const t="history";ha(t,e),ga(t,Uk)}function Uk(){if(!Rk())return;const e=xi.onpopstate;xi.onpopstate=function(...a){const n=xi.location.href,i=so;if(so=n,Je("history",{from:i,to:n}),e)try{return e.apply(this,a)}catch{}};function t(a){return function(...n){const i=n.length>2?n[2]:void 0;if(i){const r=so,o=String(i);so=o,Je("history",{from:r,to:o})}return a.apply(this,n)}}me(xi.history,"pushState",t),me(xi.history,"replaceState",t)}const Lk=L,Ei="__sentry_xhr_v3__";function Bk(e){const t="xhr";ha(t,e),ga(t,Ok)}function Ok(){if(!Lk.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;me(e,"open",function(t){return function(...a){const n=Date.now(),i=wt(a[0])?a[0].toUpperCase():void 0,r=Vk(a[1]);if(!i||!r)return t.apply(this,a);this[Ei]={method:i,url:r,request_headers:{}},i==="POST"&&r.match(/sentry_key/)&&(this.__sentry_own_request__=!0);const o=()=>{const s=this[Ei];if(s&&this.readyState===4){try{s.status_code=this.status}catch{}const l={args:[i,r],endTimestamp:Date.now(),startTimestamp:n,xhr:this};Je("xhr",l)}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?me(this,"onreadystatechange",function(s){return function(...l){return o(),s.apply(this,l)}}):this.addEventListener("readystatechange",o),me(this,"setRequestHeader",function(s){return function(...l){const[c,d]=l,p=this[Ei];return p&&wt(c)&&wt(d)&&(p.request_headers[c.toLowerCase()]=d),s.apply(this,l)}}),t.apply(this,a)}}),me(e,"send",function(t){return function(...a){const n=this[Ei];if(!n)return t.apply(this,a);a[0]!==void 0&&(n.body=a[0]);const i={args:[n.method,n.url],startTimestamp:Date.now(),xhr:this};return Je("xhr",i),t.apply(this,a)}})}function Vk(e){if(wt(e))return e;try{return e.toString()}catch{}}function Hk(){return"npm"}function Wk(){const e=typeof WeakSet=="function",t=e?new WeakSet:[];function a(i){if(e)return t.has(i)?!0:(t.add(i),!1);for(let r=0;r<t.length;r++)if(t[r]===i)return!0;return t.push(i),!1}function n(i){if(e)t.delete(i);else for(let r=0;r<t.length;r++)if(t[r]===i){t.splice(r,1);break}}return[a,n]}function Jt(e,t=100,a=1/0){try{return Eu("",e,t,a)}catch(n){return{ERROR:`**non-serializable** (${n})`}}}function oh(e,t=3,a=100*1024){const n=Jt(e,t);return Jk(n)>a?oh(e,t-1,a):n}function Eu(e,t,a=1/0,n=1/0,i=Wk()){const[r,o]=i;if(t==null||["number","boolean","string"].includes(typeof t)&&!ik(t))return t;const s=Kk(e,t);if(!s.startsWith("[object "))return s;if(t.__sentry_skip_normalization__)return t;const l=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:a;if(l===0)return s.replace("object ","");if(r(t))return"[Circular ~]";const c=t;if(c&&typeof c.toJSON=="function")try{const h=c.toJSON();return Eu("",h,l-1,n,i)}catch{}const d=Array.isArray(t)?[]:{};let p=0;const m=Vp(t);for(const h in m){if(!Object.prototype.hasOwnProperty.call(m,h))continue;if(p>=n){d[h]="[MaxProperties ~]";break}const b=m[h];d[h]=Eu(h,b,l-1,n,i),p++}return o(t),d}function Kk(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(Fp(t))return"[VueViewModel]";if(nk(t))return"[SyntheticEvent]";if(typeof t=="number"&&t!==t)return"[NaN]";if(typeof t=="function")return`[Function: ${Gt(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const a=Gk(t);return/^HTML(\w*)Element$/.test(a)?`[HTMLElement: ${a}]`:`[object ${a}]`}catch(a){return`**non-serializable** (${a})`}}function Gk(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function qk(e){return~-encodeURI(e).split(/%..|./).length}function Jk(e){return qk(JSON.stringify(e))}var xt;(function(e){e[e.PENDING=0]="PENDING";const a=1;e[e.RESOLVED=a]="RESOLVED";const n=2;e[e.REJECTED=n]="REJECTED"})(xt||(xt={}));function un(e){return new De(t=>{t(e)})}function Cu(e){return new De((t,a)=>{a(e)})}class De{constructor(t){De.prototype.__init.call(this),De.prototype.__init2.call(this),De.prototype.__init3.call(this),De.prototype.__init4.call(this),this._state=xt.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(a){this._reject(a)}}then(t,a){return new De((n,i)=>{this._handlers.push([!1,r=>{if(!t)n(r);else try{n(t(r))}catch(o){i(o)}},r=>{if(!a)i(r);else try{n(a(r))}catch(o){i(o)}}]),this._executeHandlers()})}catch(t){return this.then(a=>a,t)}finally(t){return new De((a,n)=>{let i,r;return this.then(o=>{r=!1,i=o,t&&t()},o=>{r=!0,i=o,t&&t()}).then(()=>{if(r){n(i);return}a(i)})})}__init(){this._resolve=t=>{this._setResult(xt.RESOLVED,t)}}__init2(){this._reject=t=>{this._setResult(xt.REJECTED,t)}}__init3(){this._setResult=(t,a)=>{if(this._state===xt.PENDING){if(Qr(a)){a.then(this._resolve,this._reject);return}this._state=t,this._value=a,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===xt.PENDING)return;const t=this._handlers.slice();this._handlers=[],t.forEach(a=>{a[0]||(this._state===xt.RESOLVED&&a[1](this._value),this._state===xt.REJECTED&&a[2](this._value),a[0]=!0)})}}}function Zk(e){const t=[];function a(){return e===void 0||t.length<e}function n(o){return t.splice(t.indexOf(o),1)[0]}function i(o){if(!a())return Cu(new st("Not adding Promise because buffer limit was reached."));const s=o();return t.indexOf(s)===-1&&t.push(s),s.then(()=>n(s)).then(null,()=>n(s).then(null,()=>{})),s}function r(o){return new De((s,l)=>{let c=t.length;if(!c)return s(!0);const d=setTimeout(()=>{o&&o>0&&s(!1)},o);t.forEach(p=>{un(p).then(()=>{--c||(clearTimeout(d),s(!0))},l)})})}return{$:t,add:i,drain:r}}function ju(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const a=t[6]||"",n=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:a,hash:n,relative:t[5]+a+n}}const Qk=["fatal","error","warning","log","info","debug"];function Xk(e){return e==="warn"?"warning":Qk.includes(e)?e:"log"}const sh=1e3;function Ci(){return Date.now()/sh}function ev(){const{performance:e}=L;if(!e||!e.now)return Ci;const t=Date.now()-e.now(),a=e.timeOrigin==null?t:e.timeOrigin;return()=>(a+e.now())/sh}const lh=ev();(()=>{const{performance:e}=L;if(!e||!e.now)return;const t=3600*1e3,a=e.now(),n=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+a-n):t,r=i<t,o=e.timing&&e.timing.navigationStart,l=typeof o=="number"?Math.abs(o+a-n):t,c=l<t;return r||c?i<=l?e.timeOrigin:o:n})();function cn(e,t=[]){return[e,t]}function tv(e,t){const[a,n]=e;return[a,[...n,t]]}function uh(e,t){const a=e[1];for(const n of a){const i=n[0].type;if(t(n,i))return!0}return!1}function $u(e,t){return(t||new TextEncoder).encode(e)}function av(e,t){const[a,n]=e;let i=JSON.stringify(a);function r(o){typeof i=="string"?i=typeof o=="string"?i+o:[$u(i,t),o]:i.push(typeof o=="string"?$u(o,t):o)}for(const o of n){const[s,l]=o;if(r(`
|
|
45
|
+
Error:`,i)}}function xk(e){const t="console";ha(t,e),ga(t,Ek)}function Ek(){"console"in L&&hu.forEach(function(e){e in L.console&&me(L.console,e,function(t){return to[e]=t,function(...a){Je("console",{args:a,level:e});const i=to[e];i&&i.apply(L.console,a)}})})}function Ve(){const e=L,t=e.crypto||e.msCrypto;let a=()=>Math.random()*16;try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(a=()=>{const n=new Uint8Array(1);return t.getRandomValues(n),n[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,n=>(n^(a()&15)>>n/4).toString(16))}function Qp(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function qt(e){const{message:t,event_id:a}=e;if(t)return t;const n=Qp(e);return n?n.type&&n.value?`${n.type}: ${n.value}`:n.type||n.value||a||"<unknown>":a||"<unknown>"}function yu(e,t,a){const n=e.exception=e.exception||{},i=n.values=n.values||[],r=i[0]=i[0]||{};r.value||(r.value=t||""),r.type||(r.type="Error")}function Si(e,t){const a=Qp(e);if(!a)return;const n={type:"generic",handled:!0},i=a.mechanism;if(a.mechanism={...n,...i,...t},t&&"data"in t){const r={...i&&i.data,...t.data};a.mechanism.data=r}}function Xp(e){if(e&&e.__sentry_captured__)return!0;try{wi(e,"__sentry_captured__",!0)}catch{}return!1}function eh(e){return Array.isArray(e)?e:[e]}const ln=L,Ck=1e3;let th,ku,vu;function jk(e){const t="dom";ha(t,e),ga(t,$k)}function $k(){if(!ln.document)return;const e=Je.bind(null,"dom"),t=ah(e,!0);ln.document.addEventListener("click",t,!1),ln.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(a=>{const n=ln[a]&&ln[a].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(me(n,"addEventListener",function(i){return function(r,o,s){if(r==="click"||r=="keypress")try{const l=this,c=l.__sentry_instrumentation_handlers__=l.__sentry_instrumentation_handlers__||{},d=c[r]=c[r]||{refCount:0};if(!d.handler){const p=ah(e);d.handler=p,i.call(this,r,p,s)}d.refCount++}catch{}return i.call(this,r,o,s)}}),me(n,"removeEventListener",function(i){return function(r,o,s){if(r==="click"||r=="keypress")try{const l=this,c=l.__sentry_instrumentation_handlers__||{},d=c[r];d&&(d.refCount--,d.refCount<=0&&(i.call(this,r,d.handler,s),d.handler=void 0,delete c[r]),Object.keys(c).length===0&&delete l.__sentry_instrumentation_handlers__)}catch{}return i.call(this,r,o,s)}}))})}function Tk(e){if(e.type!==ku)return!1;try{if(!e.target||e.target._sentryId!==vu)return!1}catch{}return!0}function Pk(e,t){return e!=="keypress"?!1:!t||!t.tagName?!0:!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable)}function ah(e,t=!1){return a=>{if(!a||a._sentryCaptured)return;const n=zk(a);if(Pk(a.type,n))return;wi(a,"_sentryCaptured",!0),n&&!n._sentryId&&wi(n,"_sentryId",Ve());const i=a.type==="keypress"?"input":a.type;Tk(a)||(e({event:a,name:i,global:t}),ku=a.type,vu=n?n._sentryId:void 0),clearTimeout(th),th=ln.setTimeout(()=>{vu=void 0,ku=void 0},Ck)}}function zk(e){try{return e.target}catch{return null}}const wu=mu();function nh(){if(!("fetch"in wu))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function Su(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Nk(){if(typeof EdgeRuntime=="string")return!0;if(!nh())return!1;if(Su(wu.fetch))return!0;let e=!1;const t=wu.document;if(t&&typeof t.createElement=="function")try{const a=t.createElement("iframe");a.hidden=!0,t.head.appendChild(a),a.contentWindow&&a.contentWindow.fetch&&(e=Su(a.contentWindow.fetch)),t.head.removeChild(a)}catch(a){vi&&A.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",a)}return e}function Ak(e){const t="fetch";ha(t,e),ga(t,Ik)}function Ik(){Nk()&&me(L,"fetch",function(e){return function(...t){const{method:a,url:n}=Dk(t),i={args:t,fetchData:{method:a,url:n},startTimestamp:Date.now()};return Je("fetch",{...i}),e.apply(L,t).then(r=>{const o={...i,endTimestamp:Date.now(),response:r};return Je("fetch",o),r},r=>{const o={...i,endTimestamp:Date.now(),error:r};throw Je("fetch",o),r})}})}function xu(e,t){return!!e&&typeof e=="object"&&!!e[t]}function ih(e){return typeof e=="string"?e:e?xu(e,"url")?e.url:e.toString?e.toString():"":""}function Dk(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[a,n]=e;return{url:ih(a),method:xu(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:ih(t),method:xu(t,"method")?String(t.method).toUpperCase():"GET"}}let io=null;function Fk(e){const t="error";ha(t,e),ga(t,Mk)}function Mk(){io=L.onerror,L.onerror=function(e,t,a,n,i){return Je("error",{column:n,error:i,line:a,msg:e,url:t}),io&&!io.__SENTRY_LOADER__?io.apply(this,arguments):!1},L.onerror.__SENTRY_INSTRUMENTED__=!0}let ro=null;function _k(e){const t="unhandledrejection";ha(t,e),ga(t,Yk)}function Yk(){ro=L.onunhandledrejection,L.onunhandledrejection=function(e){return Je("unhandledrejection",e),ro&&!ro.__SENTRY_LOADER__?ro.apply(this,arguments):!0},L.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const oo=mu();function Rk(){const e=oo.chrome,t=e&&e.app&&e.app.runtime,a="history"in oo&&!!oo.history.pushState&&!!oo.history.replaceState;return!t&&a}const xi=L;let so;function rh(e){const t="history";ha(t,e),ga(t,Uk)}function Uk(){if(!Rk())return;const e=xi.onpopstate;xi.onpopstate=function(...a){const n=xi.location.href,i=so;if(so=n,Je("history",{from:i,to:n}),e)try{return e.apply(this,a)}catch{}};function t(a){return function(...n){const i=n.length>2?n[2]:void 0;if(i){const r=so,o=String(i);so=o,Je("history",{from:r,to:o})}return a.apply(this,n)}}me(xi.history,"pushState",t),me(xi.history,"replaceState",t)}const Lk=L,Ei="__sentry_xhr_v3__";function Bk(e){const t="xhr";ha(t,e),ga(t,Ok)}function Ok(){if(!Lk.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;me(e,"open",function(t){return function(...a){const n=Date.now(),i=wt(a[0])?a[0].toUpperCase():void 0,r=Vk(a[1]);if(!i||!r)return t.apply(this,a);this[Ei]={method:i,url:r,request_headers:{}},i==="POST"&&r.match(/sentry_key/)&&(this.__sentry_own_request__=!0);const o=()=>{const s=this[Ei];if(s&&this.readyState===4){try{s.status_code=this.status}catch{}const l={args:[i,r],endTimestamp:Date.now(),startTimestamp:n,xhr:this};Je("xhr",l)}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?me(this,"onreadystatechange",function(s){return function(...l){return o(),s.apply(this,l)}}):this.addEventListener("readystatechange",o),me(this,"setRequestHeader",function(s){return function(...l){const[c,d]=l,p=this[Ei];return p&&wt(c)&&wt(d)&&(p.request_headers[c.toLowerCase()]=d),s.apply(this,l)}}),t.apply(this,a)}}),me(e,"send",function(t){return function(...a){const n=this[Ei];if(!n)return t.apply(this,a);a[0]!==void 0&&(n.body=a[0]);const i={args:[n.method,n.url],startTimestamp:Date.now(),xhr:this};return Je("xhr",i),t.apply(this,a)}})}function Vk(e){if(wt(e))return e;try{return e.toString()}catch{}}function Hk(){return"npm"}function Wk(){const e=typeof WeakSet=="function",t=e?new WeakSet:[];function a(i){if(e)return t.has(i)?!0:(t.add(i),!1);for(let r=0;r<t.length;r++)if(t[r]===i)return!0;return t.push(i),!1}function n(i){if(e)t.delete(i);else for(let r=0;r<t.length;r++)if(t[r]===i){t.splice(r,1);break}}return[a,n]}function Jt(e,t=100,a=1/0){try{return Eu("",e,t,a)}catch(n){return{ERROR:`**non-serializable** (${n})`}}}function oh(e,t=3,a=100*1024){const n=Jt(e,t);return Jk(n)>a?oh(e,t-1,a):n}function Eu(e,t,a=1/0,n=1/0,i=Wk()){const[r,o]=i;if(t==null||["number","boolean","string"].includes(typeof t)&&!ik(t))return t;const s=Kk(e,t);if(!s.startsWith("[object "))return s;if(t.__sentry_skip_normalization__)return t;const l=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:a;if(l===0)return s.replace("object ","");if(r(t))return"[Circular ~]";const c=t;if(c&&typeof c.toJSON=="function")try{const g=c.toJSON();return Eu("",g,l-1,n,i)}catch{}const d=Array.isArray(t)?[]:{};let p=0;const m=Vp(t);for(const g in m){if(!Object.prototype.hasOwnProperty.call(m,g))continue;if(p>=n){d[g]="[MaxProperties ~]";break}const b=m[g];d[g]=Eu(g,b,l-1,n,i),p++}return o(t),d}function Kk(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(Fp(t))return"[VueViewModel]";if(nk(t))return"[SyntheticEvent]";if(typeof t=="number"&&t!==t)return"[NaN]";if(typeof t=="function")return`[Function: ${Gt(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const a=Gk(t);return/^HTML(\w*)Element$/.test(a)?`[HTMLElement: ${a}]`:`[object ${a}]`}catch(a){return`**non-serializable** (${a})`}}function Gk(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function qk(e){return~-encodeURI(e).split(/%..|./).length}function Jk(e){return qk(JSON.stringify(e))}var xt;(function(e){e[e.PENDING=0]="PENDING";const a=1;e[e.RESOLVED=a]="RESOLVED";const n=2;e[e.REJECTED=n]="REJECTED"})(xt||(xt={}));function un(e){return new De(t=>{t(e)})}function Cu(e){return new De((t,a)=>{a(e)})}class De{constructor(t){De.prototype.__init.call(this),De.prototype.__init2.call(this),De.prototype.__init3.call(this),De.prototype.__init4.call(this),this._state=xt.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(a){this._reject(a)}}then(t,a){return new De((n,i)=>{this._handlers.push([!1,r=>{if(!t)n(r);else try{n(t(r))}catch(o){i(o)}},r=>{if(!a)i(r);else try{n(a(r))}catch(o){i(o)}}]),this._executeHandlers()})}catch(t){return this.then(a=>a,t)}finally(t){return new De((a,n)=>{let i,r;return this.then(o=>{r=!1,i=o,t&&t()},o=>{r=!0,i=o,t&&t()}).then(()=>{if(r){n(i);return}a(i)})})}__init(){this._resolve=t=>{this._setResult(xt.RESOLVED,t)}}__init2(){this._reject=t=>{this._setResult(xt.REJECTED,t)}}__init3(){this._setResult=(t,a)=>{if(this._state===xt.PENDING){if(Qr(a)){a.then(this._resolve,this._reject);return}this._state=t,this._value=a,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===xt.PENDING)return;const t=this._handlers.slice();this._handlers=[],t.forEach(a=>{a[0]||(this._state===xt.RESOLVED&&a[1](this._value),this._state===xt.REJECTED&&a[2](this._value),a[0]=!0)})}}}function Zk(e){const t=[];function a(){return e===void 0||t.length<e}function n(o){return t.splice(t.indexOf(o),1)[0]}function i(o){if(!a())return Cu(new st("Not adding Promise because buffer limit was reached."));const s=o();return t.indexOf(s)===-1&&t.push(s),s.then(()=>n(s)).then(null,()=>n(s).then(null,()=>{})),s}function r(o){return new De((s,l)=>{let c=t.length;if(!c)return s(!0);const d=setTimeout(()=>{o&&o>0&&s(!1)},o);t.forEach(p=>{un(p).then(()=>{--c||(clearTimeout(d),s(!0))},l)})})}return{$:t,add:i,drain:r}}function ju(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const a=t[6]||"",n=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:a,hash:n,relative:t[5]+a+n}}const Qk=["fatal","error","warning","log","info","debug"];function Xk(e){return e==="warn"?"warning":Qk.includes(e)?e:"log"}const sh=1e3;function Ci(){return Date.now()/sh}function ev(){const{performance:e}=L;if(!e||!e.now)return Ci;const t=Date.now()-e.now(),a=e.timeOrigin==null?t:e.timeOrigin;return()=>(a+e.now())/sh}const lh=ev();(()=>{const{performance:e}=L;if(!e||!e.now)return;const t=3600*1e3,a=e.now(),n=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+a-n):t,r=i<t,o=e.timing&&e.timing.navigationStart,l=typeof o=="number"?Math.abs(o+a-n):t,c=l<t;return r||c?i<=l?e.timeOrigin:o:n})();function cn(e,t=[]){return[e,t]}function tv(e,t){const[a,n]=e;return[a,[...n,t]]}function uh(e,t){const a=e[1];for(const n of a){const i=n[0].type;if(t(n,i))return!0}return!1}function $u(e,t){return(t||new TextEncoder).encode(e)}function av(e,t){const[a,n]=e;let i=JSON.stringify(a);function r(o){typeof i=="string"?i=typeof o=="string"?i+o:[$u(i,t),o]:i.push(typeof o=="string"?$u(o,t):o)}for(const o of n){const[s,l]=o;if(r(`
|
|
46
46
|
${JSON.stringify(s)}
|
|
47
|
-
`),typeof l=="string"||l instanceof Uint8Array)r(l);else{let c;try{c=JSON.stringify(l)}catch{c=JSON.stringify(Jt(l))}r(c)}}return typeof i=="string"?i:nv(i)}function nv(e){const t=e.reduce((i,r)=>i+r.length,0),a=new Uint8Array(t);let n=0;for(const i of e)a.set(i,n),n+=i.length;return a}function iv(e,t){const a=typeof e.data=="string"?$u(e.data,t):e.data;return[St({type:"attachment",length:a.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),a]}const rv={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket"};function ch(e){return rv[e]}function dh(e){if(!e||!e.sdk)return;const{name:t,version:a}=e.sdk;return{name:t,version:a}}function ov(e,t,a,n){const i=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!a&&n&&{dsn:sn(n)},...i&&{trace:St({...i})}}}function sv(e,t,a){const n=[{type:"client_report"},{timestamp:Ci(),discarded_events:e}];return cn(t?{dsn:t}:{},[n])}const lv=60*1e3;function uv(e,t=Date.now()){const a=parseInt(`${e}`,10);if(!isNaN(a))return a*1e3;const n=Date.parse(`${e}`);return isNaN(n)?lv:n-t}function cv(e,t){return e[t]||e.all||0}function dv(e,t,a=Date.now()){return cv(e,t)>a}function mv(e,{statusCode:t,headers:a},n=Date.now()){const i={...e},r=a&&a["x-sentry-rate-limits"],o=a&&a["retry-after"];if(r)for(const s of r.trim().split(",")){const[l,c,,,d]=s.split(":",5),p=parseInt(l,10),m=(isNaN(p)?60:p)*1e3;if(!c)i.all=n+m;else for(const h of c.split(";"))h==="metric_bucket"?(!d||d.split(";").includes("custom"))&&(i[h]=n+m):i[h]=n+m}else o?i.all=n+uv(o,n):t===429&&(i.all=n+60*1e3);return i}const V=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,lo="production";function Tu(){return Rp("globalEventProcessors",()=>[])}function pv(e){Tu().push(e)}function uo(e,t,a,n=0){return new De((i,r)=>{const o=e[n];if(t===null||typeof o!="function")i(t);else{const s=o({...t},a);V&&o.id&&s===null&&A.log(`Event processor "${o.id}" dropped event`),Qr(s)?s.then(l=>uo(e,l,a,n+1).then(i)).then(null,r):uo(e,s,a,n+1).then(i).then(null,r)}})}function mh(e){const t=lh(),a={sid:Ve(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>hv(a)};return e&&fa(a,e),a}function fa(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||lh(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:Ve()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{const a=e.timestamp-e.started;e.duration=a>=0?a:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function ph(e,t){let a={};e.status==="ok"&&(a={status:"exited"}),fa(e,a)}function hv(e){return St({sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}const gv=1;function fv(e){const{spanId:t,traceId:a}=e.spanContext(),{data:n,op:i,parent_span_id:r,status:o,tags:s,origin:l}=ji(e);return St({data:n,op:i,parent_span_id:r,span_id:t,status:o,tags:s,trace_id:a,origin:l})}function ji(e){return bv(e)?e.getSpanJSON():typeof e.toJSON=="function"?e.toJSON():{}}function bv(e){return typeof e.getSpanJSON=="function"}function yv(e){const{traceFlags:t}=e.spanContext();return!!(t&gv)}function kv(e,t,a,n,i,r){const{normalizeDepth:o=3,normalizeMaxBreadth:s=1e3}=e,l={...t,event_id:t.event_id||a.event_id||Ve(),timestamp:t.timestamp||Ci()},c=a.integrations||e.integrations.map(f=>f.name);vv(l,e),xv(l,c),t.type===void 0&&wv(l,e.stackParser);const d=Cv(n,a.captureContext);a.mechanism&&Si(l,a.mechanism);const p=i&&i.getEventProcessors?i.getEventProcessors():[],m=_v().getScopeData();if(r){const f=r.getScopeData();Eh(m,f)}if(d){const f=d.getScopeData();Eh(m,f)}const h=[...a.attachments||[],...m.attachments];h.length&&(a.attachments=h),xh(l,m);const b=[...p,...Tu(),...m.eventProcessors];return uo(b,l,a).then(f=>(f&&Sv(f),typeof o=="number"&&o>0?Ev(f,o,s):f))}function vv(e,t){const{environment:a,release:n,dist:i,maxValueLength:r=250}=t;"environment"in e||(e.environment="environment"in t?a:lo),e.release===void 0&&n!==void 0&&(e.release=n),e.dist===void 0&&i!==void 0&&(e.dist=i),e.message&&(e.message=on(e.message,r));const o=e.exception&&e.exception.values&&e.exception.values[0];o&&o.value&&(o.value=on(o.value,r));const s=e.request;s&&s.url&&(s.url=on(s.url,r))}const hh=new WeakMap;function wv(e,t){const a=L._sentryDebugIds;if(!a)return;let n;const i=hh.get(t);i?n=i:(n=new Map,hh.set(t,n));const r=Object.keys(a).reduce((o,s)=>{let l;const c=n.get(s);c?l=c:(l=t(s),n.set(s,l));for(let d=l.length-1;d>=0;d--){const p=l[d];if(p.filename){o[p.filename]=a[s];break}}return o},{});try{e.exception.values.forEach(o=>{o.stacktrace.frames.forEach(s=>{s.filename&&(s.debug_id=r[s.filename])})})}catch{}}function Sv(e){const t={};try{e.exception.values.forEach(n=>{n.stacktrace.frames.forEach(i=>{i.debug_id&&(i.abs_path?t[i.abs_path]=i.debug_id:i.filename&&(t[i.filename]=i.debug_id),delete i.debug_id)})})}catch{}if(Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const a=e.debug_meta.images;Object.keys(t).forEach(n=>{a.push({type:"sourcemap",code_file:n,debug_id:t[n]})})}function xv(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function Ev(e,t,a){if(!e)return null;const n={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(i=>({...i,...i.data&&{data:Jt(i.data,t,a)}}))},...e.user&&{user:Jt(e.user,t,a)},...e.contexts&&{contexts:Jt(e.contexts,t,a)},...e.extra&&{extra:Jt(e.extra,t,a)}};return e.contexts&&e.contexts.trace&&n.contexts&&(n.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(n.contexts.trace.data=Jt(e.contexts.trace.data,t,a))),e.spans&&(n.spans=e.spans.map(i=>{const r=ji(i).data;return r&&(i.data=Jt(r,t,a)),i})),n}function Cv(e,t){if(!t)return e;const a=e?e.clone():new Et;return a.update(t),a}function jv(e){if(e)return $v(e)?{captureContext:e}:Pv(e)?{captureContext:e}:e}function $v(e){return e instanceof Et||typeof e=="function"}const Tv=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function Pv(e){return Object.keys(e).some(t=>Tv.includes(t))}function Pu(e,t){return lt().captureException(e,jv(t))}function gh(e,t){return lt().captureEvent(e,t)}function ba(e,t){lt().addBreadcrumb(e,t)}function fh(...e){const t=lt();if(e.length===2){const[a,n]=e;return a?t.withScope(()=>(t.getStackTop().scope=a,n(a))):t.withScope(n)}return t.withScope(e[0])}function Ee(){return lt().getClient()}function $i(){return lt().getScope()}function bh(e){const t=Ee(),a=mo(),n=$i(),{release:i,environment:r=lo}=t&&t.getOptions()||{},{userAgent:o}=L.navigator||{},s=mh({release:i,environment:r,user:n.getUser()||a.getUser(),...o&&{userAgent:o},...e}),l=a.getSession();return l&&l.status==="ok"&&fa(l,{status:"exited"}),yh(),a.setSession(s),n.setSession(s),s}function yh(){const e=mo(),t=$i(),a=t.getSession()||e.getSession();a&&ph(a),kh(),e.setSession(),t.setSession()}function kh(){const e=mo(),t=$i(),a=Ee(),n=t.getSession()||e.getSession();n&&a&&a.captureSession&&a.captureSession(n)}function vh(e=!1){if(e){yh();return}kh()}function wh(e){return e.transaction}function Sh(e,t,a){const n=t.getOptions(),{publicKey:i}=t.getDsn()||{},{segment:r}=a&&a.getUser()||{},o=St({environment:n.environment||lo,release:n.release,user_segment:r,public_key:i,trace_id:e});return t.emit&&t.emit("createDsc",o),o}function zv(e){const t=Ee();if(!t)return{};const a=Sh(ji(e).trace_id||"",t,$i()),n=wh(e);if(!n)return a;const i=n&&n._frozenDynamicSamplingContext;if(i)return i;const{sampleRate:r,source:o}=n.metadata;r!=null&&(a.sample_rate=`${r}`);const s=ji(n);return o&&o!=="url"&&(a.transaction=s.description),a.sampled=String(yv(n)),t.emit&&t.emit("createDsc",a),a}function xh(e,t){const{fingerprint:a,span:n,breadcrumbs:i,sdkProcessingMetadata:r}=t;Nv(e,t),n&&Dv(e,n),Fv(e,a),Av(e,i),Iv(e,r)}function Eh(e,t){const{extra:a,tags:n,user:i,contexts:r,level:o,sdkProcessingMetadata:s,breadcrumbs:l,fingerprint:c,eventProcessors:d,attachments:p,propagationContext:m,transactionName:h,span:b}=t;Ti(e,"extra",a),Ti(e,"tags",n),Ti(e,"user",i),Ti(e,"contexts",r),Ti(e,"sdkProcessingMetadata",s),o&&(e.level=o),h&&(e.transactionName=h),b&&(e.span=b),l.length&&(e.breadcrumbs=[...e.breadcrumbs,...l]),c.length&&(e.fingerprint=[...e.fingerprint,...c]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),p.length&&(e.attachments=[...e.attachments,...p]),e.propagationContext={...e.propagationContext,...m}}function Ti(e,t,a){if(a&&Object.keys(a).length){e[t]={...e[t]};for(const n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[t][n]=a[n])}}function Nv(e,t){const{extra:a,tags:n,user:i,contexts:r,level:o,transactionName:s}=t,l=St(a);l&&Object.keys(l).length&&(e.extra={...l,...e.extra});const c=St(n);c&&Object.keys(c).length&&(e.tags={...c,...e.tags});const d=St(i);d&&Object.keys(d).length&&(e.user={...d,...e.user});const p=St(r);p&&Object.keys(p).length&&(e.contexts={...p,...e.contexts}),o&&(e.level=o),s&&(e.transaction=s)}function Av(e,t){const a=[...e.breadcrumbs||[],...t];e.breadcrumbs=a.length?a:void 0}function Iv(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function Dv(e,t){e.contexts={trace:fv(t),...e.contexts};const a=wh(t);if(a){e.sdkProcessingMetadata={dynamicSamplingContext:zv(t),...e.sdkProcessingMetadata};const n=ji(a).description;n&&(e.tags={transaction:n,...e.tags})}}function Fv(e,t){e.fingerprint=e.fingerprint?eh(e.fingerprint):[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}const Mv=100;let zu;class Et{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=Ch()}static clone(t){return t?t.clone():new Et}clone(){const t=new Et;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._extra={...this._extra},t._contexts={...this._contexts},t._user=this._user,t._level=this._level,t._span=this._span,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._requestSession=this._requestSession,t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t}setClient(t){this._client=t}getClient(){return this._client}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,segment:void 0,username:void 0},this._session&&fa(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,a){return this._tags={...this._tags,[t]:a},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,a){return this._extra={...this._extra,[t]:a},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,a){return a===null?delete this._contexts[t]:this._contexts[t]=a,this._notifyScopeListeners(),this}setSpan(t){return this._span=t,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const t=this._span;return t&&t.transaction}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const a=typeof t=="function"?t(this):t;if(a instanceof Et){const n=a.getScopeData();this._tags={...this._tags,...n.tags},this._extra={...this._extra,...n.extra},this._contexts={...this._contexts,...n.contexts},n.user&&Object.keys(n.user).length&&(this._user=n.user),n.level&&(this._level=n.level),n.fingerprint.length&&(this._fingerprint=n.fingerprint),a.getRequestSession()&&(this._requestSession=a.getRequestSession()),n.propagationContext&&(this._propagationContext=n.propagationContext)}else if(rn(a)){const n=t;this._tags={...this._tags,...n.tags},this._extra={...this._extra,...n.extra},this._contexts={...this._contexts,...n.contexts},n.user&&(this._user=n.user),n.level&&(this._level=n.level),n.fingerprint&&(this._fingerprint=n.fingerprint),n.requestSession&&(this._requestSession=n.requestSession),n.propagationContext&&(this._propagationContext=n.propagationContext)}return this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this._propagationContext=Ch(),this}addBreadcrumb(t,a){const n=typeof a=="number"?a:Mv;if(n<=0)return this;const i={timestamp:Ci(),...t},r=this._breadcrumbs;return r.push(i),this._breadcrumbs=r.length>n?r.slice(-n):r,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}getAttachments(){return this.getScopeData().attachments}clearAttachments(){return this._attachments=[],this}getScopeData(){const{_breadcrumbs:t,_attachments:a,_contexts:n,_tags:i,_extra:r,_user:o,_level:s,_fingerprint:l,_eventProcessors:c,_propagationContext:d,_sdkProcessingMetadata:p,_transactionName:m,_span:h}=this;return{breadcrumbs:t,attachments:a,contexts:n,tags:i,extra:r,user:o,level:s,fingerprint:l||[],eventProcessors:c,propagationContext:d,sdkProcessingMetadata:p,transactionName:m,span:h}}applyToEvent(t,a={},n=[]){xh(t,this.getScopeData());const i=[...n,...Tu(),...this._eventProcessors];return uo(i,t,a)}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...t},this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,a){const n=a&&a.event_id?a.event_id:Ve();if(!this._client)return A.warn("No client configured on scope - will not capture exception!"),n;const i=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:i,...a,event_id:n},this),n}captureMessage(t,a,n){const i=n&&n.event_id?n.event_id:Ve();if(!this._client)return A.warn("No client configured on scope - will not capture message!"),i;const r=new Error(t);return this._client.captureMessage(t,a,{originalException:t,syntheticException:r,...n,event_id:i},this),i}captureEvent(t,a){const n=a&&a.event_id?a.event_id:Ve();return this._client?(this._client.captureEvent(t,{...a,event_id:n},this),n):(A.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}function _v(){return zu||(zu=new Et),zu}function Ch(){return{traceId:Ve(),spanId:Ve().substring(16)}}const Nu="7.120.4",jh=parseFloat(Nu),Yv=100;class $h{constructor(t,a,n,i=jh){this._version=i;let r;a?r=a:(r=new Et,r.setClient(t));let o;n?o=n:(o=new Et,o.setClient(t)),this._stack=[{scope:r}],t&&this.bindClient(t),this._isolationScope=o}isOlderThan(t){return this._version<t}bindClient(t){const a=this.getStackTop();a.client=t,a.scope.setClient(t),t&&t.setupIntegrations&&t.setupIntegrations()}pushScope(){const t=this.getScope().clone();return this.getStack().push({client:this.getClient(),scope:t}),t}popScope(){return this.getStack().length<=1?!1:!!this.getStack().pop()}withScope(t){const a=this.pushScope();let n;try{n=t(a)}catch(i){throw this.popScope(),i}return Qr(n)?n.then(i=>(this.popScope(),i),i=>{throw this.popScope(),i}):(this.popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(t,a){const n=this._lastEventId=a&&a.event_id?a.event_id:Ve(),i=new Error("Sentry syntheticException");return this.getScope().captureException(t,{originalException:t,syntheticException:i,...a,event_id:n}),n}captureMessage(t,a,n){const i=this._lastEventId=n&&n.event_id?n.event_id:Ve(),r=new Error(t);return this.getScope().captureMessage(t,a,{originalException:t,syntheticException:r,...n,event_id:i}),i}captureEvent(t,a){const n=a&&a.event_id?a.event_id:Ve();return t.type||(this._lastEventId=n),this.getScope().captureEvent(t,{...a,event_id:n}),n}lastEventId(){return this._lastEventId}addBreadcrumb(t,a){const{scope:n,client:i}=this.getStackTop();if(!i)return;const{beforeBreadcrumb:r=null,maxBreadcrumbs:o=Yv}=i.getOptions&&i.getOptions()||{};if(o<=0)return;const l={timestamp:Ci(),...t},c=r?ao(()=>r(l,a)):l;c!==null&&(i.emit&&i.emit("beforeAddBreadcrumb",c,a),n.addBreadcrumb(c,o))}setUser(t){this.getScope().setUser(t),this.getIsolationScope().setUser(t)}setTags(t){this.getScope().setTags(t),this.getIsolationScope().setTags(t)}setExtras(t){this.getScope().setExtras(t),this.getIsolationScope().setExtras(t)}setTag(t,a){this.getScope().setTag(t,a),this.getIsolationScope().setTag(t,a)}setExtra(t,a){this.getScope().setExtra(t,a),this.getIsolationScope().setExtra(t,a)}setContext(t,a){this.getScope().setContext(t,a),this.getIsolationScope().setContext(t,a)}configureScope(t){const{scope:a,client:n}=this.getStackTop();n&&t(a)}run(t){const a=Th(this);try{t(this)}finally{Th(a)}}getIntegration(t){const a=this.getClient();if(!a)return null;try{return a.getIntegration(t)}catch{return V&&A.warn(`Cannot retrieve integration ${t.id} from the current Hub`),null}}startTransaction(t,a){const n=this._callExtensionMethod("startTransaction",t,a);return V&&!n&&(this.getClient()?A.warn(`Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':
|
|
47
|
+
`),typeof l=="string"||l instanceof Uint8Array)r(l);else{let c;try{c=JSON.stringify(l)}catch{c=JSON.stringify(Jt(l))}r(c)}}return typeof i=="string"?i:nv(i)}function nv(e){const t=e.reduce((i,r)=>i+r.length,0),a=new Uint8Array(t);let n=0;for(const i of e)a.set(i,n),n+=i.length;return a}function iv(e,t){const a=typeof e.data=="string"?$u(e.data,t):e.data;return[St({type:"attachment",length:a.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),a]}const rv={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket"};function ch(e){return rv[e]}function dh(e){if(!e||!e.sdk)return;const{name:t,version:a}=e.sdk;return{name:t,version:a}}function ov(e,t,a,n){const i=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!a&&n&&{dsn:sn(n)},...i&&{trace:St({...i})}}}function sv(e,t,a){const n=[{type:"client_report"},{timestamp:Ci(),discarded_events:e}];return cn(t?{dsn:t}:{},[n])}const lv=60*1e3;function uv(e,t=Date.now()){const a=parseInt(`${e}`,10);if(!isNaN(a))return a*1e3;const n=Date.parse(`${e}`);return isNaN(n)?lv:n-t}function cv(e,t){return e[t]||e.all||0}function dv(e,t,a=Date.now()){return cv(e,t)>a}function mv(e,{statusCode:t,headers:a},n=Date.now()){const i={...e},r=a&&a["x-sentry-rate-limits"],o=a&&a["retry-after"];if(r)for(const s of r.trim().split(",")){const[l,c,,,d]=s.split(":",5),p=parseInt(l,10),m=(isNaN(p)?60:p)*1e3;if(!c)i.all=n+m;else for(const g of c.split(";"))g==="metric_bucket"?(!d||d.split(";").includes("custom"))&&(i[g]=n+m):i[g]=n+m}else o?i.all=n+uv(o,n):t===429&&(i.all=n+60*1e3);return i}const V=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,lo="production";function Tu(){return Rp("globalEventProcessors",()=>[])}function pv(e){Tu().push(e)}function uo(e,t,a,n=0){return new De((i,r)=>{const o=e[n];if(t===null||typeof o!="function")i(t);else{const s=o({...t},a);V&&o.id&&s===null&&A.log(`Event processor "${o.id}" dropped event`),Qr(s)?s.then(l=>uo(e,l,a,n+1).then(i)).then(null,r):uo(e,s,a,n+1).then(i).then(null,r)}})}function mh(e){const t=lh(),a={sid:Ve(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>hv(a)};return e&&fa(a,e),a}function fa(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||lh(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:Ve()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{const a=e.timestamp-e.started;e.duration=a>=0?a:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function ph(e,t){let a={};e.status==="ok"&&(a={status:"exited"}),fa(e,a)}function hv(e){return St({sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}const gv=1;function fv(e){const{spanId:t,traceId:a}=e.spanContext(),{data:n,op:i,parent_span_id:r,status:o,tags:s,origin:l}=ji(e);return St({data:n,op:i,parent_span_id:r,span_id:t,status:o,tags:s,trace_id:a,origin:l})}function ji(e){return bv(e)?e.getSpanJSON():typeof e.toJSON=="function"?e.toJSON():{}}function bv(e){return typeof e.getSpanJSON=="function"}function yv(e){const{traceFlags:t}=e.spanContext();return!!(t&gv)}function kv(e,t,a,n,i,r){const{normalizeDepth:o=3,normalizeMaxBreadth:s=1e3}=e,l={...t,event_id:t.event_id||a.event_id||Ve(),timestamp:t.timestamp||Ci()},c=a.integrations||e.integrations.map(f=>f.name);vv(l,e),xv(l,c),t.type===void 0&&wv(l,e.stackParser);const d=Cv(n,a.captureContext);a.mechanism&&Si(l,a.mechanism);const p=i&&i.getEventProcessors?i.getEventProcessors():[],m=_v().getScopeData();if(r){const f=r.getScopeData();Eh(m,f)}if(d){const f=d.getScopeData();Eh(m,f)}const g=[...a.attachments||[],...m.attachments];g.length&&(a.attachments=g),xh(l,m);const b=[...p,...Tu(),...m.eventProcessors];return uo(b,l,a).then(f=>(f&&Sv(f),typeof o=="number"&&o>0?Ev(f,o,s):f))}function vv(e,t){const{environment:a,release:n,dist:i,maxValueLength:r=250}=t;"environment"in e||(e.environment="environment"in t?a:lo),e.release===void 0&&n!==void 0&&(e.release=n),e.dist===void 0&&i!==void 0&&(e.dist=i),e.message&&(e.message=on(e.message,r));const o=e.exception&&e.exception.values&&e.exception.values[0];o&&o.value&&(o.value=on(o.value,r));const s=e.request;s&&s.url&&(s.url=on(s.url,r))}const hh=new WeakMap;function wv(e,t){const a=L._sentryDebugIds;if(!a)return;let n;const i=hh.get(t);i?n=i:(n=new Map,hh.set(t,n));const r=Object.keys(a).reduce((o,s)=>{let l;const c=n.get(s);c?l=c:(l=t(s),n.set(s,l));for(let d=l.length-1;d>=0;d--){const p=l[d];if(p.filename){o[p.filename]=a[s];break}}return o},{});try{e.exception.values.forEach(o=>{o.stacktrace.frames.forEach(s=>{s.filename&&(s.debug_id=r[s.filename])})})}catch{}}function Sv(e){const t={};try{e.exception.values.forEach(n=>{n.stacktrace.frames.forEach(i=>{i.debug_id&&(i.abs_path?t[i.abs_path]=i.debug_id:i.filename&&(t[i.filename]=i.debug_id),delete i.debug_id)})})}catch{}if(Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const a=e.debug_meta.images;Object.keys(t).forEach(n=>{a.push({type:"sourcemap",code_file:n,debug_id:t[n]})})}function xv(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function Ev(e,t,a){if(!e)return null;const n={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(i=>({...i,...i.data&&{data:Jt(i.data,t,a)}}))},...e.user&&{user:Jt(e.user,t,a)},...e.contexts&&{contexts:Jt(e.contexts,t,a)},...e.extra&&{extra:Jt(e.extra,t,a)}};return e.contexts&&e.contexts.trace&&n.contexts&&(n.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(n.contexts.trace.data=Jt(e.contexts.trace.data,t,a))),e.spans&&(n.spans=e.spans.map(i=>{const r=ji(i).data;return r&&(i.data=Jt(r,t,a)),i})),n}function Cv(e,t){if(!t)return e;const a=e?e.clone():new Et;return a.update(t),a}function jv(e){if(e)return $v(e)?{captureContext:e}:Pv(e)?{captureContext:e}:e}function $v(e){return e instanceof Et||typeof e=="function"}const Tv=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function Pv(e){return Object.keys(e).some(t=>Tv.includes(t))}function Pu(e,t){return lt().captureException(e,jv(t))}function gh(e,t){return lt().captureEvent(e,t)}function ba(e,t){lt().addBreadcrumb(e,t)}function fh(...e){const t=lt();if(e.length===2){const[a,n]=e;return a?t.withScope(()=>(t.getStackTop().scope=a,n(a))):t.withScope(n)}return t.withScope(e[0])}function Ee(){return lt().getClient()}function $i(){return lt().getScope()}function bh(e){const t=Ee(),a=mo(),n=$i(),{release:i,environment:r=lo}=t&&t.getOptions()||{},{userAgent:o}=L.navigator||{},s=mh({release:i,environment:r,user:n.getUser()||a.getUser(),...o&&{userAgent:o},...e}),l=a.getSession();return l&&l.status==="ok"&&fa(l,{status:"exited"}),yh(),a.setSession(s),n.setSession(s),s}function yh(){const e=mo(),t=$i(),a=t.getSession()||e.getSession();a&&ph(a),kh(),e.setSession(),t.setSession()}function kh(){const e=mo(),t=$i(),a=Ee(),n=t.getSession()||e.getSession();n&&a&&a.captureSession&&a.captureSession(n)}function vh(e=!1){if(e){yh();return}kh()}function wh(e){return e.transaction}function Sh(e,t,a){const n=t.getOptions(),{publicKey:i}=t.getDsn()||{},{segment:r}=a&&a.getUser()||{},o=St({environment:n.environment||lo,release:n.release,user_segment:r,public_key:i,trace_id:e});return t.emit&&t.emit("createDsc",o),o}function zv(e){const t=Ee();if(!t)return{};const a=Sh(ji(e).trace_id||"",t,$i()),n=wh(e);if(!n)return a;const i=n&&n._frozenDynamicSamplingContext;if(i)return i;const{sampleRate:r,source:o}=n.metadata;r!=null&&(a.sample_rate=`${r}`);const s=ji(n);return o&&o!=="url"&&(a.transaction=s.description),a.sampled=String(yv(n)),t.emit&&t.emit("createDsc",a),a}function xh(e,t){const{fingerprint:a,span:n,breadcrumbs:i,sdkProcessingMetadata:r}=t;Nv(e,t),n&&Dv(e,n),Fv(e,a),Av(e,i),Iv(e,r)}function Eh(e,t){const{extra:a,tags:n,user:i,contexts:r,level:o,sdkProcessingMetadata:s,breadcrumbs:l,fingerprint:c,eventProcessors:d,attachments:p,propagationContext:m,transactionName:g,span:b}=t;Ti(e,"extra",a),Ti(e,"tags",n),Ti(e,"user",i),Ti(e,"contexts",r),Ti(e,"sdkProcessingMetadata",s),o&&(e.level=o),g&&(e.transactionName=g),b&&(e.span=b),l.length&&(e.breadcrumbs=[...e.breadcrumbs,...l]),c.length&&(e.fingerprint=[...e.fingerprint,...c]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),p.length&&(e.attachments=[...e.attachments,...p]),e.propagationContext={...e.propagationContext,...m}}function Ti(e,t,a){if(a&&Object.keys(a).length){e[t]={...e[t]};for(const n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[t][n]=a[n])}}function Nv(e,t){const{extra:a,tags:n,user:i,contexts:r,level:o,transactionName:s}=t,l=St(a);l&&Object.keys(l).length&&(e.extra={...l,...e.extra});const c=St(n);c&&Object.keys(c).length&&(e.tags={...c,...e.tags});const d=St(i);d&&Object.keys(d).length&&(e.user={...d,...e.user});const p=St(r);p&&Object.keys(p).length&&(e.contexts={...p,...e.contexts}),o&&(e.level=o),s&&(e.transaction=s)}function Av(e,t){const a=[...e.breadcrumbs||[],...t];e.breadcrumbs=a.length?a:void 0}function Iv(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function Dv(e,t){e.contexts={trace:fv(t),...e.contexts};const a=wh(t);if(a){e.sdkProcessingMetadata={dynamicSamplingContext:zv(t),...e.sdkProcessingMetadata};const n=ji(a).description;n&&(e.tags={transaction:n,...e.tags})}}function Fv(e,t){e.fingerprint=e.fingerprint?eh(e.fingerprint):[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}const Mv=100;let zu;class Et{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=Ch()}static clone(t){return t?t.clone():new Et}clone(){const t=new Et;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._extra={...this._extra},t._contexts={...this._contexts},t._user=this._user,t._level=this._level,t._span=this._span,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._requestSession=this._requestSession,t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t}setClient(t){this._client=t}getClient(){return this._client}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,segment:void 0,username:void 0},this._session&&fa(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,a){return this._tags={...this._tags,[t]:a},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,a){return this._extra={...this._extra,[t]:a},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,a){return a===null?delete this._contexts[t]:this._contexts[t]=a,this._notifyScopeListeners(),this}setSpan(t){return this._span=t,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const t=this._span;return t&&t.transaction}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const a=typeof t=="function"?t(this):t;if(a instanceof Et){const n=a.getScopeData();this._tags={...this._tags,...n.tags},this._extra={...this._extra,...n.extra},this._contexts={...this._contexts,...n.contexts},n.user&&Object.keys(n.user).length&&(this._user=n.user),n.level&&(this._level=n.level),n.fingerprint.length&&(this._fingerprint=n.fingerprint),a.getRequestSession()&&(this._requestSession=a.getRequestSession()),n.propagationContext&&(this._propagationContext=n.propagationContext)}else if(rn(a)){const n=t;this._tags={...this._tags,...n.tags},this._extra={...this._extra,...n.extra},this._contexts={...this._contexts,...n.contexts},n.user&&(this._user=n.user),n.level&&(this._level=n.level),n.fingerprint&&(this._fingerprint=n.fingerprint),n.requestSession&&(this._requestSession=n.requestSession),n.propagationContext&&(this._propagationContext=n.propagationContext)}return this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this._propagationContext=Ch(),this}addBreadcrumb(t,a){const n=typeof a=="number"?a:Mv;if(n<=0)return this;const i={timestamp:Ci(),...t},r=this._breadcrumbs;return r.push(i),this._breadcrumbs=r.length>n?r.slice(-n):r,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}getAttachments(){return this.getScopeData().attachments}clearAttachments(){return this._attachments=[],this}getScopeData(){const{_breadcrumbs:t,_attachments:a,_contexts:n,_tags:i,_extra:r,_user:o,_level:s,_fingerprint:l,_eventProcessors:c,_propagationContext:d,_sdkProcessingMetadata:p,_transactionName:m,_span:g}=this;return{breadcrumbs:t,attachments:a,contexts:n,tags:i,extra:r,user:o,level:s,fingerprint:l||[],eventProcessors:c,propagationContext:d,sdkProcessingMetadata:p,transactionName:m,span:g}}applyToEvent(t,a={},n=[]){xh(t,this.getScopeData());const i=[...n,...Tu(),...this._eventProcessors];return uo(i,t,a)}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...t},this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,a){const n=a&&a.event_id?a.event_id:Ve();if(!this._client)return A.warn("No client configured on scope - will not capture exception!"),n;const i=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:i,...a,event_id:n},this),n}captureMessage(t,a,n){const i=n&&n.event_id?n.event_id:Ve();if(!this._client)return A.warn("No client configured on scope - will not capture message!"),i;const r=new Error(t);return this._client.captureMessage(t,a,{originalException:t,syntheticException:r,...n,event_id:i},this),i}captureEvent(t,a){const n=a&&a.event_id?a.event_id:Ve();return this._client?(this._client.captureEvent(t,{...a,event_id:n},this),n):(A.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}function _v(){return zu||(zu=new Et),zu}function Ch(){return{traceId:Ve(),spanId:Ve().substring(16)}}const Nu="7.120.4",jh=parseFloat(Nu),Yv=100;class $h{constructor(t,a,n,i=jh){this._version=i;let r;a?r=a:(r=new Et,r.setClient(t));let o;n?o=n:(o=new Et,o.setClient(t)),this._stack=[{scope:r}],t&&this.bindClient(t),this._isolationScope=o}isOlderThan(t){return this._version<t}bindClient(t){const a=this.getStackTop();a.client=t,a.scope.setClient(t),t&&t.setupIntegrations&&t.setupIntegrations()}pushScope(){const t=this.getScope().clone();return this.getStack().push({client:this.getClient(),scope:t}),t}popScope(){return this.getStack().length<=1?!1:!!this.getStack().pop()}withScope(t){const a=this.pushScope();let n;try{n=t(a)}catch(i){throw this.popScope(),i}return Qr(n)?n.then(i=>(this.popScope(),i),i=>{throw this.popScope(),i}):(this.popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(t,a){const n=this._lastEventId=a&&a.event_id?a.event_id:Ve(),i=new Error("Sentry syntheticException");return this.getScope().captureException(t,{originalException:t,syntheticException:i,...a,event_id:n}),n}captureMessage(t,a,n){const i=this._lastEventId=n&&n.event_id?n.event_id:Ve(),r=new Error(t);return this.getScope().captureMessage(t,a,{originalException:t,syntheticException:r,...n,event_id:i}),i}captureEvent(t,a){const n=a&&a.event_id?a.event_id:Ve();return t.type||(this._lastEventId=n),this.getScope().captureEvent(t,{...a,event_id:n}),n}lastEventId(){return this._lastEventId}addBreadcrumb(t,a){const{scope:n,client:i}=this.getStackTop();if(!i)return;const{beforeBreadcrumb:r=null,maxBreadcrumbs:o=Yv}=i.getOptions&&i.getOptions()||{};if(o<=0)return;const l={timestamp:Ci(),...t},c=r?ao(()=>r(l,a)):l;c!==null&&(i.emit&&i.emit("beforeAddBreadcrumb",c,a),n.addBreadcrumb(c,o))}setUser(t){this.getScope().setUser(t),this.getIsolationScope().setUser(t)}setTags(t){this.getScope().setTags(t),this.getIsolationScope().setTags(t)}setExtras(t){this.getScope().setExtras(t),this.getIsolationScope().setExtras(t)}setTag(t,a){this.getScope().setTag(t,a),this.getIsolationScope().setTag(t,a)}setExtra(t,a){this.getScope().setExtra(t,a),this.getIsolationScope().setExtra(t,a)}setContext(t,a){this.getScope().setContext(t,a),this.getIsolationScope().setContext(t,a)}configureScope(t){const{scope:a,client:n}=this.getStackTop();n&&t(a)}run(t){const a=Th(this);try{t(this)}finally{Th(a)}}getIntegration(t){const a=this.getClient();if(!a)return null;try{return a.getIntegration(t)}catch{return V&&A.warn(`Cannot retrieve integration ${t.id} from the current Hub`),null}}startTransaction(t,a){const n=this._callExtensionMethod("startTransaction",t,a);return V&&!n&&(this.getClient()?A.warn(`Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':
|
|
48
48
|
Sentry.addTracingExtensions();
|
|
49
49
|
Sentry.init({...});
|
|
50
50
|
`):A.warn("Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'")),n}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(t=!1){if(t)return this.endSession();this._sendSessionUpdate()}endSession(){const a=this.getStackTop().scope,n=a.getSession();n&&ph(n),this._sendSessionUpdate(),a.setSession()}startSession(t){const{scope:a,client:n}=this.getStackTop(),{release:i,environment:r=lo}=n&&n.getOptions()||{},{userAgent:o}=L.navigator||{},s=mh({release:i,environment:r,user:a.getUser(),...o&&{userAgent:o},...t}),l=a.getSession&&a.getSession();return l&&l.status==="ok"&&fa(l,{status:"exited"}),this.endSession(),a.setSession(s),s}shouldSendDefaultPii(){const t=this.getClient(),a=t&&t.getOptions();return!!(a&&a.sendDefaultPii)}_sendSessionUpdate(){const{scope:t,client:a}=this.getStackTop(),n=t.getSession();n&&a&&a.captureSession&&a.captureSession(n)}_callExtensionMethod(t,...a){const i=co().__SENTRY__;if(i&&i.extensions&&typeof i.extensions[t]=="function")return i.extensions[t].apply(this,a);V&&A.warn(`Extension method ${t} couldn't be found, doing nothing.`)}}function co(){return L.__SENTRY__=L.__SENTRY__||{extensions:{},hub:void 0},L}function Th(e){const t=co(),a=Au(t);return Ph(t,e),a}function lt(){const e=co();if(e.__SENTRY__&&e.__SENTRY__.acs){const t=e.__SENTRY__.acs.getCurrentHub();if(t)return t}return Rv(e)}function mo(){return lt().getIsolationScope()}function Rv(e=co()){return(!Uv(e)||Au(e).isOlderThan(jh))&&Ph(e,new $h),Au(e)}function Uv(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function Au(e){return Rp("hub",()=>new $h,e)}function Ph(e,t){if(!e)return!1;const a=e.__SENTRY__=e.__SENTRY__||{};return a.hub=t,!0}function Lv(e,t){return t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]]),e}function Bv(e,t,a,n){const i=dh(a),r={sent_at:new Date().toISOString(),...i&&{sdk:i},...!!n&&t&&{dsn:sn(t)}},o="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return cn(r,[o])}function Ov(e,t,a,n){const i=dh(a),r=e.type&&e.type!=="replay_event"?e.type:"event";Lv(e,a&&a.sdk);const o=ov(e,i,n,t);return delete e.sdkProcessingMetadata,cn(o,[[{type:r},e]])}const Vv="7";function zh(e){const t=e.protocol?`${e.protocol}:`:"",a=e.port?`:${e.port}`:"";return`${t}//${e.host}${a}${e.path?`/${e.path}`:""}/api/`}function Hv(e){return`${zh(e)}${e.projectId}/envelope/`}function Wv(e,t){return yk({sentry_key:e.publicKey,sentry_version:Vv,...t&&{sentry_client:`${t.name}/${t.version}`}})}function Kv(e,t={}){const a=typeof t=="string"?t:t.tunnel,n=typeof t=="string"||!t._metadata?void 0:t._metadata.sdk;return a||`${Hv(e)}?${Wv(e,n)}`}function Gv(e,t){const a=Bp(e);if(!a)return"";const n=`${zh(a)}embed/error-page/`;let i=`dsn=${sn(a)}`;for(const r in t)if(r!=="dsn"&&r!=="onClose")if(r==="user"){const o=t.user;if(!o)continue;o.name&&(i+=`&name=${encodeURIComponent(o.name)}`),o.email&&(i+=`&email=${encodeURIComponent(o.email)}`)}else i+=`&${encodeURIComponent(r)}=${encodeURIComponent(t[r])}`;return`${n}?${i}`}const Nh=[];function qv(e){const t={};return e.forEach(a=>{const{name:n}=a,i=t[n];i&&!i.isDefaultInstance&&a.isDefaultInstance||(t[n]=a)}),Object.keys(t).map(a=>t[a])}function Jv(e){const t=e.defaultIntegrations||[],a=e.integrations;t.forEach(o=>{o.isDefaultInstance=!0});let n;Array.isArray(a)?n=[...t,...a]:typeof a=="function"?n=eh(a(t)):n=t;const i=qv(n),r=Qv(i,o=>o.name==="Debug");if(r!==-1){const[o]=i.splice(r,1);i.push(o)}return i}function Zv(e,t){const a={};return t.forEach(n=>{n&&Ih(e,n,a)}),a}function Ah(e,t){for(const a of t)a&&a.afterAllSetup&&a.afterAllSetup(e)}function Ih(e,t,a){if(a[t.name]){V&&A.log(`Integration skipped because it was already installed: ${t.name}`);return}if(a[t.name]=t,Nh.indexOf(t.name)===-1&&(t.setupOnce(pv,lt),Nh.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),e.on&&typeof t.preprocessEvent=="function"){const n=t.preprocessEvent.bind(t);e.on("preprocessEvent",(i,r)=>n(i,r,e))}if(e.addEventProcessor&&typeof t.processEvent=="function"){const n=t.processEvent.bind(t),i=(r,o)=>n(r,o,e);i.id=t.name,e.addEventProcessor(i)}V&&A.log(`Integration installed: ${t.name}`)}function Qv(e,t){for(let a=0;a<e.length;a++)if(t(e[a])===!0)return a;return-1}function E0(e){return e}function Xv(e){let t="";for(const a of e){const n=Object.entries(a.tags),i=n.length>0?`|#${n.map(([r,o])=>`${r}:${o}`).join(",")}`:"";t+=`${a.name}@${a.unit}:${a.metric}|${a.metricType}${i}|T${a.timestamp}
|
|
51
|
-
`}return t}function ew(e,t,a,n){const i={sent_at:new Date().toISOString()};a&&a.sdk&&(i.sdk={name:a.sdk.name,version:a.sdk.version}),n&&t&&(i.dsn=sn(t));const r=tw(e);return cn(i,[r])}function tw(e){const t=Xv(e);return[{type:"statsd",length:t.length},t]}const Dh="Not capturing exception because it's already been captured.";class aw{constructor(t){if(this._options=t,this._integrations={},this._integrationsInitialized=!1,this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=Bp(t.dsn):V&&A.warn("No DSN provided, client will not send events."),this._dsn){const a=Kv(this._dsn,t);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:a})}}captureException(t,a,n){if(Xp(t)){V&&A.log(Dh);return}let i=a&&a.event_id;return this._process(this.eventFromException(t,a).then(r=>this._captureEvent(r,a,n)).then(r=>{i=r})),i}captureMessage(t,a,n,i){let r=n&&n.event_id;const o=uu(t)?t:String(t),s=cu(t)?this.eventFromMessage(o,a,n):this.eventFromException(t,n);return this._process(s.then(l=>this._captureEvent(l,n,i)).then(l=>{r=l})),r}captureEvent(t,a,n){if(a&&a.originalException&&Xp(a.originalException)){V&&A.log(Dh);return}let i=a&&a.event_id;const o=(t.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(t,a,o||n).then(s=>{i=s})),i}captureSession(t){typeof t.release!="string"?V&&A.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),fa(t,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const a=this._transport;return a?(this.metricsAggregator&&this.metricsAggregator.flush(),this._isClientDoneProcessing(t).then(n=>a.flush(t).then(i=>n&&i))):un(!0)}close(t){return this.flush(t).then(a=>(this.getOptions().enabled=!1,this.metricsAggregator&&this.metricsAggregator.close(),a))}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}setupIntegrations(t){(t&&!this._integrationsInitialized||this._isEnabled()&&!this._integrationsInitialized)&&this._setupIntegrations()}init(){this._isEnabled()&&this._setupIntegrations()}getIntegrationById(t){return this.getIntegrationByName(t)}getIntegrationByName(t){return this._integrations[t]}getIntegration(t){try{return this._integrations[t.id]||null}catch{return V&&A.warn(`Cannot retrieve integration ${t.id} from the current Client`),null}}addIntegration(t){const a=this._integrations[t.name];Ih(this,t,this._integrations),a||Ah(this,[t])}sendEvent(t,a={}){this.emit("beforeSendEvent",t,a);let n=Ov(t,this._dsn,this._options._metadata,this._options.tunnel);for(const r of a.attachments||[])n=tv(n,iv(r,this._options.transportOptions&&this._options.transportOptions.textEncoder));const i=this._sendEnvelope(n);i&&i.then(r=>this.emit("afterSendEvent",t,r),null)}sendSession(t){const a=Bv(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(a)}recordDroppedEvent(t,a,n){if(this._options.sendClientReports){const i=typeof n=="number"?n:1,r=`${t}:${a}`;V&&A.log(`Recording outcome: "${r}"${i>1?` (${i} times)`:""}`),this._outcomes[r]=(this._outcomes[r]||0)+i}}captureAggregateMetrics(t){V&&A.log(`Flushing aggregated metrics, number of metrics: ${t.length}`);const a=ew(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(a)}on(t,a){this._hooks[t]||(this._hooks[t]=[]),this._hooks[t].push(a)}emit(t,...a){this._hooks[t]&&this._hooks[t].forEach(n=>n(...a))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=Zv(this,t),Ah(this,t),this._integrationsInitialized=!0}_updateSessionFromEvent(t,a){let n=!1,i=!1;const r=a.exception&&a.exception.values;if(r){i=!0;for(const l of r){const c=l.mechanism;if(c&&c.handled===!1){n=!0;break}}}const o=t.status==="ok";(o&&t.errors===0||o&&n)&&(fa(t,{...n&&{status:"crashed"},errors:t.errors||Number(i||n)}),this.captureSession(t))}_isClientDoneProcessing(t){return new De(a=>{let n=0;const i=1,r=setInterval(()=>{this._numProcessing==0?(clearInterval(r),a(!0)):(n+=i,t&&n>=t&&(clearInterval(r),a(!1)))},i)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,a,n,i=mo()){const r=this.getOptions(),o=Object.keys(this._integrations);return!a.integrations&&o.length>0&&(a.integrations=o),this.emit("preprocessEvent",t,a),kv(r,t,a,n,this,i).then(s=>{if(s===null)return s;const l={...i.getPropagationContext(),...n?n.getPropagationContext():void 0};if(!(s.contexts&&s.contexts.trace)&&l){const{traceId:d,spanId:p,parentSpanId:m,dsc:
|
|
52
|
-
Reason: ${
|
|
51
|
+
`}return t}function ew(e,t,a,n){const i={sent_at:new Date().toISOString()};a&&a.sdk&&(i.sdk={name:a.sdk.name,version:a.sdk.version}),n&&t&&(i.dsn=sn(t));const r=tw(e);return cn(i,[r])}function tw(e){const t=Xv(e);return[{type:"statsd",length:t.length},t]}const Dh="Not capturing exception because it's already been captured.";class aw{constructor(t){if(this._options=t,this._integrations={},this._integrationsInitialized=!1,this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=Bp(t.dsn):V&&A.warn("No DSN provided, client will not send events."),this._dsn){const a=Kv(this._dsn,t);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:a})}}captureException(t,a,n){if(Xp(t)){V&&A.log(Dh);return}let i=a&&a.event_id;return this._process(this.eventFromException(t,a).then(r=>this._captureEvent(r,a,n)).then(r=>{i=r})),i}captureMessage(t,a,n,i){let r=n&&n.event_id;const o=uu(t)?t:String(t),s=cu(t)?this.eventFromMessage(o,a,n):this.eventFromException(t,n);return this._process(s.then(l=>this._captureEvent(l,n,i)).then(l=>{r=l})),r}captureEvent(t,a,n){if(a&&a.originalException&&Xp(a.originalException)){V&&A.log(Dh);return}let i=a&&a.event_id;const o=(t.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(t,a,o||n).then(s=>{i=s})),i}captureSession(t){typeof t.release!="string"?V&&A.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),fa(t,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const a=this._transport;return a?(this.metricsAggregator&&this.metricsAggregator.flush(),this._isClientDoneProcessing(t).then(n=>a.flush(t).then(i=>n&&i))):un(!0)}close(t){return this.flush(t).then(a=>(this.getOptions().enabled=!1,this.metricsAggregator&&this.metricsAggregator.close(),a))}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}setupIntegrations(t){(t&&!this._integrationsInitialized||this._isEnabled()&&!this._integrationsInitialized)&&this._setupIntegrations()}init(){this._isEnabled()&&this._setupIntegrations()}getIntegrationById(t){return this.getIntegrationByName(t)}getIntegrationByName(t){return this._integrations[t]}getIntegration(t){try{return this._integrations[t.id]||null}catch{return V&&A.warn(`Cannot retrieve integration ${t.id} from the current Client`),null}}addIntegration(t){const a=this._integrations[t.name];Ih(this,t,this._integrations),a||Ah(this,[t])}sendEvent(t,a={}){this.emit("beforeSendEvent",t,a);let n=Ov(t,this._dsn,this._options._metadata,this._options.tunnel);for(const r of a.attachments||[])n=tv(n,iv(r,this._options.transportOptions&&this._options.transportOptions.textEncoder));const i=this._sendEnvelope(n);i&&i.then(r=>this.emit("afterSendEvent",t,r),null)}sendSession(t){const a=Bv(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(a)}recordDroppedEvent(t,a,n){if(this._options.sendClientReports){const i=typeof n=="number"?n:1,r=`${t}:${a}`;V&&A.log(`Recording outcome: "${r}"${i>1?` (${i} times)`:""}`),this._outcomes[r]=(this._outcomes[r]||0)+i}}captureAggregateMetrics(t){V&&A.log(`Flushing aggregated metrics, number of metrics: ${t.length}`);const a=ew(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(a)}on(t,a){this._hooks[t]||(this._hooks[t]=[]),this._hooks[t].push(a)}emit(t,...a){this._hooks[t]&&this._hooks[t].forEach(n=>n(...a))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=Zv(this,t),Ah(this,t),this._integrationsInitialized=!0}_updateSessionFromEvent(t,a){let n=!1,i=!1;const r=a.exception&&a.exception.values;if(r){i=!0;for(const l of r){const c=l.mechanism;if(c&&c.handled===!1){n=!0;break}}}const o=t.status==="ok";(o&&t.errors===0||o&&n)&&(fa(t,{...n&&{status:"crashed"},errors:t.errors||Number(i||n)}),this.captureSession(t))}_isClientDoneProcessing(t){return new De(a=>{let n=0;const i=1,r=setInterval(()=>{this._numProcessing==0?(clearInterval(r),a(!0)):(n+=i,t&&n>=t&&(clearInterval(r),a(!1)))},i)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,a,n,i=mo()){const r=this.getOptions(),o=Object.keys(this._integrations);return!a.integrations&&o.length>0&&(a.integrations=o),this.emit("preprocessEvent",t,a),kv(r,t,a,n,this,i).then(s=>{if(s===null)return s;const l={...i.getPropagationContext(),...n?n.getPropagationContext():void 0};if(!(s.contexts&&s.contexts.trace)&&l){const{traceId:d,spanId:p,parentSpanId:m,dsc:g}=l;s.contexts={trace:{trace_id:d,span_id:p,parent_span_id:m},...s.contexts};const b=g||Sh(d,this,n);s.sdkProcessingMetadata={dynamicSamplingContext:b,...s.sdkProcessingMetadata}}return s})}_captureEvent(t,a={},n){return this._processEvent(t,a,n).then(i=>i.event_id,i=>{if(V){const r=i;r.logLevel==="log"?A.log(r.message):A.warn(r)}})}_processEvent(t,a,n){const i=this.getOptions(),{sampleRate:r}=i,o=Mh(t),s=Fh(t),l=t.type||"error",c=`before send for type \`${l}\``;if(s&&typeof r=="number"&&Math.random()>r)return this.recordDroppedEvent("sample_rate","error",t),Cu(new st(`Discarding event because it's not included in the random sample (sampling rate = ${r})`,"log"));const d=l==="replay_event"?"replay":l,m=(t.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(t,a,n,m).then(g=>{if(g===null)throw this.recordDroppedEvent("event_processor",d,t),new st("An event processor returned `null`, will not send event.","log");if(a.data&&a.data.__sentry__===!0)return g;const v=iw(i,g,a);return nw(v,c)}).then(g=>{if(g===null){if(this.recordDroppedEvent("before_send",d,t),o){const h=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",h)}throw new st(`${c} returned \`null\`, will not send event.`,"log")}const b=n&&n.getSession();if(!o&&b&&this._updateSessionFromEvent(b,g),o){const f=g.sdkProcessingMetadata&&g.sdkProcessingMetadata.spanCountBeforeProcessing||0,h=g.spans?g.spans.length:0,y=f-h;y>0&&this.recordDroppedEvent("before_send","span",y)}const v=g.transaction_info;if(o&&v&&g.transaction!==t.transaction){const f="custom";g.transaction_info={...v,source:f}}return this.sendEvent(g,a),g}).then(null,g=>{throw g instanceof st?g:(this.captureException(g,{data:{__sentry__:!0},originalException:g}),new st(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
52
|
+
Reason: ${g}`))})}_process(t){this._numProcessing++,t.then(a=>(this._numProcessing--,a),a=>(this._numProcessing--,a))}_sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)return this._transport.send(t).then(null,a=>{V&&A.error("Error while sending event:",a)});V&&A.error("Transport disabled")}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.keys(t).map(a=>{const[n,i]=a.split(":");return{reason:n,category:i,quantity:t[a]}})}}function nw(e,t){const a=`${t} must return \`null\` or a valid event.`;if(Qr(e))return e.then(n=>{if(!rn(n)&&n!==null)throw new st(a);return n},n=>{throw new st(`${t} rejected with ${n}`)});if(!rn(e)&&e!==null)throw new st(a);return e}function iw(e,t,a){const{beforeSend:n,beforeSendTransaction:i}=e;if(Fh(t)&&n)return n(t,a);if(Mh(t)&&i){if(t.spans){const r=t.spans.length;t.sdkProcessingMetadata={...t.sdkProcessingMetadata,spanCountBeforeProcessing:r}}return i(t,a)}return t}function Fh(e){return e.type===void 0}function Mh(e){return e.type==="transaction"}function rw(e,t){t.debug===!0&&(V?A.enable():ao(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),$i().update(t.initialScope);const n=new e(t);ow(n),sw(n)}function ow(e){const a=lt().getStackTop();a.client=e,a.scope.setClient(e)}function sw(e){e.init?e.init():e.setupIntegrations&&e.setupIntegrations()}const lw=30;function _h(e,t,a=Zk(e.bufferSize||lw)){let n={};const i=o=>a.drain(o);function r(o){const s=[];if(uh(o,(p,m)=>{const g=ch(m);if(dv(n,g)){const b=Yh(p,m);e.recordDroppedEvent("ratelimit_backoff",g,b)}else s.push(p)}),s.length===0)return un();const l=cn(o[0],s),c=p=>{uh(l,(m,g)=>{const b=Yh(m,g);e.recordDroppedEvent(p,ch(g),b)})},d=()=>t({body:av(l,e.textEncoder)}).then(p=>(p.statusCode!==void 0&&(p.statusCode<200||p.statusCode>=300)&&V&&A.warn(`Sentry responded with status code ${p.statusCode} to sent event.`),n=mv(n,p),p),p=>{throw c("network_error"),p});return a.add(d).then(p=>p,p=>{if(p instanceof st)return V&&A.error("Skipped sending event because buffer is full."),c("queue_overflow"),un();throw p})}return r.__sentry__baseTransport__=!0,{send:r,flush:i}}function Yh(e,t){if(!(t!=="event"&&t!=="transaction"))return Array.isArray(e)?e[1]:void 0}function Rh(e,t,a=[t],n="npm"){const i=e._metadata||{};i.sdk||(i.sdk={name:`sentry.javascript.${t}`,packages:a.map(r=>({name:`${n}:@sentry/${r}`,version:Nu})),version:Nu}),e._metadata=i}const uw=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/],cw=[/^.*\/healthcheck$/,/^.*\/healthy$/,/^.*\/live$/,/^.*\/ready$/,/^.*\/heartbeat$/,/^.*\/health$/,/^.*\/healthz$/],dw="InboundFilters",mw=(e={})=>({name:dw,setupOnce(){},processEvent(t,a,n){const i=n.getOptions(),r=pw(e,i);return hw(t,r)?null:t}});function pw(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:uw],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[],...e.disableTransactionDefaults?[]:cw],ignoreInternal:e.ignoreInternal!==void 0?e.ignoreInternal:!0}}function hw(e,t){return t.ignoreInternal&&vw(e)?(V&&A.warn(`Event dropped due to being internal Sentry Error.
|
|
53
53
|
Event: ${qt(e)}`),!0):gw(e,t.ignoreErrors)?(V&&A.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
|
|
54
54
|
Event: ${qt(e)}`),!0):fw(e,t.ignoreTransactions)?(V&&A.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
|
|
55
55
|
Event: ${qt(e)}`),!0):bw(e,t.denyUrls)?(V&&A.warn(`Event dropped due to being matched by \`denyUrls\` option.
|
|
@@ -618,7 +618,7 @@ Url: ${po(e)}`),!0)}function gw(e,t){return e.type||!t||!t.length?!1:kw(e).some(
|
|
|
618
618
|
.gh-portal-loadingicon.dark rect {
|
|
619
619
|
fill: var(--grey0);
|
|
620
620
|
}
|
|
621
|
-
`,KE=({brandColor:e,disabled:t,style:a={},isPrimary:n})=>{let i=e||"#3eb0ef",r="1.0",o="auto";return t&&(r="0.5",o="none"),{button:{...n?{color:"#fff"}:{},...n?{backgroundColor:i}:{},opacity:r,pointerEvents:o,...a||{}}}};function ae({label:e,onClick:t,disabled:a=!1,retry:n=!1,brandColor:i,isRunning:r,isPrimary:o=!0,isDestructive:s=!1,classes:l="",style:c={},tabindex:d=void 0,dataTestId:p}){let m=KE({disabled:a,brandColor:i,style:c,isPrimary:o}),
|
|
621
|
+
`,KE=({brandColor:e,disabled:t,style:a={},isPrimary:n})=>{let i=e||"#3eb0ef",r="1.0",o="auto";return t&&(r="0.5",o="none"),{button:{...n?{color:"#fff"}:{},...n?{backgroundColor:i}:{},opacity:r,pointerEvents:o,...a||{}}}};function ae({label:e,onClick:t,disabled:a=!1,retry:n=!1,brandColor:i,isRunning:r,isPrimary:o=!0,isDestructive:s=!1,classes:l="",style:c={},tabindex:d=void 0,dataTestId:p}){let m=KE({disabled:a,brandColor:i,style:c,isPrimary:o}),g="gh-portal-btn";o&&(g+=" gh-portal-btn-main gh-portal-btn-primary"),s&&(g+=" gh-portal-btn-destructive"),l&&(g+=" "+l),mn()&&(a=!0);const b=o?"gh-portal-loadingicon":"gh-portal-loadingicon dark";return u.jsx("button",{className:g,style:m.button,onClick:v=>t(v),disabled:a,type:"submit",tabIndex:d,"data-test-button":p,children:r?u.jsx(fn,{className:b}):e})}const GE=e=>k.createElement("svg",{id:"Regular",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",...e},k.createElement("defs",null,k.createElement("style",null,".cls-1{fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.5px;fill-rule:evenodd;}")),k.createElement("path",{className:"cls-1",d:"M16.25,23.25,5.53,12.53a.749.749,0,0,1,0-1.06L16.25.75"})),qE=`
|
|
622
622
|
.gh-portal-btn-back,
|
|
623
623
|
.gh-portal-btn-back:hover {
|
|
624
624
|
box-shadow: none;
|
|
@@ -742,7 +742,7 @@ Url: ${po(e)}`),!0)}function gw(e,t){return e.type||!t||!t.length?!1:kw(e).some(
|
|
|
742
742
|
height: 22px !important;
|
|
743
743
|
}
|
|
744
744
|
`;function _o({id:e,label:t="",onToggle:a,checked:n=!1,dataTestId:i="switch-input"}){const[r,o]=k.useState(n);k.useEffect(()=>{o(n)},[n]);const s=k.useRef(null);return k.useEffect(()=>{s.current&&s.current.checked!==r&&(s.current.checked=r)},[r,e]),u.jsx("div",{className:"gh-portal-for-switch","data-test-switch":i,children:u.jsxs("label",{className:"switch",htmlFor:e,children:[u.jsx("input",{ref:s,type:"checkbox",checked:r,id:e,onChange:()=>{},"aria-label":t}),u.jsx("span",{className:"input-toggle-component",onClick:l=>{o(!r),a(l,!r)},"data-testid":i})]})})}const ZE=".gh-portal-account-header{display:flex;flex-direction:column;align-items:center;margin:0 0 32px}.gh-portal-account-header .gh-portal-avatar{margin:6px 0 8px!important}.gh-portal-account-data{margin-bottom:40px}footer.gh-portal-account-footer{display:flex}.gh-portal-account-footer.paid{margin-top:12px}.gh-portal-account-footermenu{display:flex;align-items:center;list-style:none;padding:0;margin:0}.gh-portal-account-footerright{display:flex;flex-grow:1;align-items:center;justify-content:flex-end}.gh-portal-account-footermenu li{margin-inline-end:16px}.gh-portal-account-footermenu li:last-of-type{margin-inline-end:0}.gh-portal-freeaccount-newsletter{display:flex;align-items:center;justify-content:space-between;margin-top:24px}.gh-portal-freeaccount-newsletter .label{display:flex;flex-direction:column;flex-grow:1}.gh-portal-free-ctatext{margin-top:-12px}.gh-portal-cancelcontinue-container{margin:24px 0 32px}.gh-portal-list-detail .gh-portal-email-notice{display:flex;align-items:center;gap:5px;margin-top:6px;color:var(--red);font-weight:500;font-size:1.25rem;letter-spacing:.2px}.gh-portal-email-notice-icon{width:20px;height:20px}.gh-portal-billing-button-loader{width:32px;height:32px;margin-inline-end:-3px;opacity:.6}.gh-portal-product-icon{width:52px;margin-inline-end:12px;border-radius:2px}.gh-portal-account-discountcontainer{position:relative;display:flex;align-items:center}.gh-portal-account-old-price{text-decoration:line-through;color:var(--grey9)!important}.gh-portal-account-tagicon{width:16px;height:16px;color:var(--brandcolor);margin-inline-end:5px;z-index:999}@media (max-width: 390px){.gh-portal-account-footer{padding:0!important}}@media (max-width: 340px){.gh-portal-account-footer{padding:0!important;flex-wrap:wrap;gap:12px}.gh-portal-account-footer .gh-portal-account-footerright{justify-content:flex-start}}";let re=(wc=class extends Y.Component{constructor(){super(...arguments);X(this,"closePopup",()=>{this.context.onAction("closePopup")})}render(){const{onClick:a}=this.props;return u.jsx("div",{className:"gh-portal-closeicon-container","data-test-button":"close-popup",children:u.jsx(tc,{className:"gh-portal-closeicon",alt:"Close",onClick:a||this.closePopup,"data-testid":"close-popup"})})}},X(wc,"contextType",P),wc);const Pg=e=>k.createElement("svg",{width:15,height:14,viewBox:"0 0 15 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},k.createElement("path",{d:"M1 6.89286L6.10714 12L13.9643 1",stroke:"#222222",strokeWidth:2}));function zg(e,t){if(isNaN(e)||isNaN(t))return 0;const a=e?100-Math.floor(t/12*100/e):0;return a>=1&&a<100?a:0}var Ng={exports:{}},QE="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",XE=QE,eC=XE;function Ag(){}function Ig(){}Ig.resetWarningCache=Ag;var tC=function(){function e(n,i,r,o,s,l){if(l!==eC){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}e.isRequired=e;function t(){return e}var a={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Ig,resetWarningCache:Ag};return a.PropTypes=a,a};Ng.exports=tC();var aC=Ng.exports;const ic=Ne(aC);function Dg(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Mi(e){"@babel/helpers - typeof";return Mi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mi(e)}function nC(e,t){if(Mi(e)!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var n=a.call(e,t);if(Mi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function iC(e){var t=nC(e,"string");return Mi(t)=="symbol"?t:t+""}function rC(e,t){for(var a=0;a<t.length;a++){var n=t[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,iC(n.key),n)}}function Fg(e,t,a){return t&&rC(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function oC(e,t){if(e==null)return{};var a={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.includes(n))continue;a[n]=e[n]}return a}function sC(e,t){if(e==null)return{};var a,n,i=oC(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n<r.length;n++)a=r[n],t.includes(a)||{}.propertyIsEnumerable.call(e,a)&&(i[a]=e[a])}return i}var rc="TOKEN_PLACEHOLDER",Yo="TOKEN_OPEN_TAG",oc="TOKEN_CLOSE_TAG",sc="TOKEN_SELF_TAG",Ro="TOKEN_TEXT",Mg="NODE_FRAGMENT",_g="NODE_TAG_ELEMENT",Yg="NODE_VOID_ELEMENT",Rg="NODE_PLACEHOLDER",Ug="NODE_TEXT",lC=["type","children"],Ce=function(){function e(t){var a=t.type,n=t.children,i=sC(t,lC);Dg(this,e),this.type=a,this.children=n||[];for(var r in i)this[r]=i[r];i.token&&(this.string=i.token.string)}return Fg(e,[{key:"appendChild",value:function(a){this.children.push(a)}},{key:"isLeaf",get:function(){return this.children.length===0}}]),e}();Ce.createTagNode=function(e,t){return new Ce({type:_g,children:t,name:e.name,token:e})},Ce.createFragmentNode=function(e){return new Ce({type:Mg,children:e})},Ce.createVoidNode=function(e){return new Ce({type:Yg,name:e.name,token:e})},Ce.createTextNode=function(e){return new Ce({type:Ug,text:e.string,token:e})},Ce.createPlaceholderNode=function(e){return new Ce({type:Rg,name:e.name,token:e})};var uC=[{type:rc,regex:/{\s*(\w+)\s*}/g},{type:Yo,regex:/<(\w+)>/g},{type:oc,regex:/<\/(\w+)>/g},{type:sc,regex:/<(\w+)\s*\/>/g}];function cC(e,t){var a=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!a){if(Array.isArray(e)||(a=dC(e))||t){a&&(e=a);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
745
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var r=!0,o=!1,s;return{s:function(){a=a.call(e)},n:function(){var c=a.next();return r=c.done,c},e:function(c){o=!0,s=c},f:function(){try{!r&&a.return!=null&&a.return()}finally{if(o)throw s}}}}function dC(e,t){if(e){if(typeof e=="string")return Lg(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);if(a==="Object"&&e.constructor&&(a=e.constructor.name),a==="Map"||a==="Set")return Array.from(e);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Lg(e,t)}}function Lg(e,t){(t==null||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}function mC(e,t){var a=[],n=cC(t),i;try{for(n.s();!(i=n.n()).done;)for(var r=i.value,o=r.type,s=r.regex,l;(l=s.exec(e))!==null;)a.push({type:o,string:l[0],name:l[1],start:l.index,end:l.index+l[0].length})}catch(
|
|
745
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var r=!0,o=!1,s;return{s:function(){a=a.call(e)},n:function(){var c=a.next();return r=c.done,c},e:function(c){o=!0,s=c},f:function(){try{!r&&a.return!=null&&a.return()}finally{if(o)throw s}}}}function dC(e,t){if(e){if(typeof e=="string")return Lg(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);if(a==="Object"&&e.constructor&&(a=e.constructor.name),a==="Map"||a==="Set")return Array.from(e);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Lg(e,t)}}function Lg(e,t){(t==null||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}function mC(e,t){var a=[],n=cC(t),i;try{for(n.s();!(i=n.n()).done;)for(var r=i.value,o=r.type,s=r.regex,l;(l=s.exec(e))!==null;)a.push({type:o,string:l[0],name:l[1],start:l.index,end:l.index+l[0].length})}catch(g){n.e(g)}finally{n.f()}a.sort(function(g,b){return g.start-b.start});var c=[],d=0;a.forEach(function(g){if(g.start===d){d=g.end;return}var b=g.start,v=e.substring(d,b);c.push({type:Ro,string:v,text:v,start:d,end:b}),d=g.end});var p=e.substring(d);p!==""&&c.push({type:Ro,string:p,start:d,end:e.length});var m=[].concat(c,a).sort(function(g,b){return g.start-b.start});return m}function pC(e,t){t||(t=uC);var a=mC(e,t),n=new hC(a);return n.parse()}var _i="Syntax error. Please check if each open tag is closed correctly",Bg={type:"EPSILON"},hC=function(){function e(t){Dg(this,e),this.tokens=[].concat(t),this.tags=[]}return Fg(e,[{key:"parse",value:function(){var a=this.document();if(!this.predict(Bg.type))throw new Error(_i);return a}},{key:"document",value:function(){var a=this.elementOrData();return Ce.createFragmentNode(a)}},{key:"element",value:function(){var a=this.openTag(),n=this.elementOrData();return this.endTag(),Ce.createTagNode(a,n)}},{key:"openTag",value:function(){if(!this.predict(Yo))throw new Error(_i);return this.pushTag(this.lookahead),this.match(Yo)}},{key:"elementOrData",value:function(){var a=[];if(this.predict(Yo)&&(a.push(this.element()),a=a.concat(this.elementOrData())),this.predict(sc,Ro,rc)){var n=this.match(this.lookahead.type),i;switch(n.type){case sc:i=Ce.createVoidNode(n);break;case Ro:i=Ce.createTextNode(n);break;case rc:i=Ce.createPlaceholderNode(n);break}a.push(i),a=a.concat(this.elementOrData())}return a}},{key:"endTag",value:function(){if(!this.predict(oc))throw new Error(_i);var a=this.tags.pop();if(a.name!==this.lookahead.name)throw new Error(_i);this.match(oc)}},{key:"lookahead",get:function(){return this.tokens.length===0?Bg:this.tokens[0]}},{key:"predict",value:function(){for(var a=arguments.length,n=new Array(a),i=0;i<a;i++)n[i]=arguments[i];return n.includes(this.lookahead.type)}},{key:"match",value:function(a){if(!this.predict(a))throw new Error(_i);var n=this.tokens.shift();return n}},{key:"pushTag",value:function(a){this.tags.push(a)}}]),e}(),gC=function e(t,a,n){var i=t.children.map(function(l,c){return Y.createElement(Y.Fragment,{key:n+c},e(l,a,n))});switch(t.type){case Ug:return t.text;case Mg:return Y.createElement(Y.Fragment,null,i);case Yg:{var r=a[t.name];return typeof r=="function"?r():r||Y.createElement(t.name,null)}case _g:{var o=a[t.name];if(o===void 0)return Y.createElement(t.name,null,i);if(typeof o=="function")return o(i);if(Y.isValidElement(o)){if(Y.Children.count(o.props.children)!==0)throw new Error("when passing an element as value, the element should not contains children");return Y.cloneElement(o,{children:i})}throw new Error('Invalid mapping value for "'.concat(t.name,'". Only element or render function are accepted'))}case Rg:{var s=a[t.name];return s===void 0?(console.warn('missing "'.concat(t.name,'" in mapping')),t.string):typeof s=="function"?s():s}default:return}};function je(e){var t=e.string,a=e.syntax,n=e.mapping,i=n===void 0?{}:n,r=e.graceful,o=r===void 0?!0:r;try{var s=pC(t,a);return gC(s,i,t)}catch(l){if(o)return console.error(l),t;throw l}}je.propTypes={string:ic.string.isRequired,mapping:ic.object,graceful:ic.bool};const fC=()=>`
|
|
746
746
|
.gh-portal-products {
|
|
747
747
|
display: flex;
|
|
748
748
|
flex-direction: column;
|
|
@@ -1259,7 +1259,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1259
1259
|
min-height: unset;
|
|
1260
1260
|
}
|
|
1261
1261
|
}
|
|
1262
|
-
`,yn=Y.createContext({selectedInterval:"month",selectedProduct:"free",selectedPlan:null,setSelectedProduct:null});function bC({product:e}){return!e.benefits||!e.benefits.length?null:e.benefits.map((t,a)=>{const n=(t==null?void 0:t.id)||`benefit-${a}`;return u.jsxs("div",{className:"gh-portal-product-benefit",children:[u.jsx(Pg,{className:"gh-portal-benefit-checkmark",alt:""}),u.jsx("div",{className:"gh-portal-benefit-title",children:t.name})]},n)})}function lc({product:e,hide:t=!1}){return!e.benefits||!e.benefits.length||t?null:u.jsx("div",{className:"gh-portal-product-benefits",children:u.jsx(bC,{product:e})})}function Og({price:e}){const{site:t}=k.useContext(P),{portal_plans:a}=t;return!a.includes("monthly")||!a.includes("yearly")?u.jsx("div",{className:"gh-portal-product-alternative-price"}):u.jsx("div",{className:"gh-portal-product-alternative-price",children:NE(e)})}function yC({trialDays:e,discount:t,selectedInterval:a}){const{site:n,t:i}=k.useContext(P);return Io({site:n})?e?u.jsx("span",{className:"gh-portal-discount-label",children:i("{trialDays} days free",{trialDays:e})}):null:a==="year"?u.jsx("span",{className:"gh-portal-discount-label",children:i("{discount}% discount",{discount:t})}):null}function Vg({product:e}){const{selectedInterval:t}=k.useContext(yn),{t:a,site:n}=k.useContext(P),i=e.monthlyPrice,r=e.yearlyPrice,o=e.trial_days,s=t==="month"?i:r,l=t==="month"?r:i,c=s.interval==="year"?a("year"):a("month");if(!i||!r)return null;const d=zg(e.monthlyPrice.amount,e.yearlyPrice.amount),p=pe(s.currency);return Io({site:n})?u.jsx(u.Fragment,{children:u.jsxs("div",{className:"gh-portal-product-card-pricecontainer",children:[u.jsxs("div",{className:"gh-portal-product-card-price-trial",children:[u.jsxs("div",{className:"gh-portal-product-price",children:[u.jsx("span",{className:"currency-sign"+(p.length>1?" long":""),children:p}),u.jsx("span",{className:"amount","data-testid":"product-amount",children:gn(ec(s.amount))}),u.jsxs("span",{className:"billing-period",children:["/",c]})]}),u.jsx(yC,{trialDays:o,discount:d,selectedInterval:t})]}),t==="year"?u.jsx(Hg,{discount:d,trialDays:o}):"",u.jsx(Og,{price:l})]})}):u.jsxs("div",{className:"gh-portal-product-card-pricecontainer",children:[u.jsxs("div",{className:"gh-portal-product-card-price-trial",children:[u.jsxs("div",{className:"gh-portal-product-price",children:[u.jsx("span",{className:"currency-sign"+(p.length>1?" long":""),children:p}),u.jsx("span",{className:"amount","data-testid":"product-amount",children:gn(ec(s.amount))}),u.jsxs("span",{className:"billing-period",children:["/",c]})]}),t==="year"?u.jsx(Hg,{discount:d}):""]}),u.jsx(Og,{price:l})]})}function kC({products:e,handleChooseSignup:t,error:a}){const{site:n,action:i,t:r}=k.useContext(P),{selectedProduct:o,setSelectedProduct:s}=k.useContext(yn);let l=o==="free"?"gh-portal-product-card free checked":"gh-portal-product-card free";const c=ka({site:n});let d=xE({site:n}),p=i==="signup:running";mn()&&(p=!0);let m="$";e&&e[1]?m=pe(e[1].monthlyPrice.currency):m="$";const h=gg({site:n}),b=SE({site:n});if(h){if(!d&&!b.length)return null;l+=" only-free"}return!d&&!b.length&&(d="Free preview"),u.jsx(u.Fragment,{children:u.jsxs("div",{className:l,onClick:v=>{v.stopPropagation(),s("free")},"data-test-tier":"free",children:[u.jsxs("div",{className:"gh-portal-product-card-header",children:[u.jsx("h4",{className:"gh-portal-product-name",children:pg({site:n})}),h?"":u.jsx("div",{className:"gh-portal-product-card-pricecontainer free-trial-disabled",children:u.jsxs("div",{className:"gh-portal-product-price",children:[u.jsx("span",{className:"currency-sign"+(m.length>1?" long":""),children:m}),u.jsx("span",{className:"amount","data-testid":"product-amount",children:"0"})]})})]}),u.jsxs("div",{className:"gh-portal-product-card-details",children:[u.jsxs("div",{className:"gh-portal-product-card-detaildata",children:[d?u.jsx("div",{className:"gh-portal-product-description","data-testid":"product-description",children:d}):"",u.jsx(lc,{product:c})]}),h?"":u.jsxs("div",{className:"gh-portal-btn-product",children:[u.jsx("button",{"data-test-button":"select-tier",className:"gh-portal-btn",disabled:p,onClick:v=>{t(v,"free")},children:o==="free"&&p?u.jsx(fn,{className:"gh-portal-loadingicon"}):r("Choose")}),a&&u.jsx("div",{className:"gh-portal-error-message",children:a})]})]})]})})}function vC({selectedProduct:e,product:t,disabled:a,noOfProducts:n,trialDays:i}){const{t:r}=k.useContext(P);return e===t.id&&a?u.jsx(fn,{className:"gh-portal-loadingicon"}):i>0?u.jsx(je,{string:r("Start {amount}-day free trial"),mapping:{amount:i}}):n>1?r("Choose"):r("Continue")}function wC({product:e,products:t,selectedInterval:a,handleChooseSignup:n,error:i}){var h;const{selectedProduct:r,setSelectedProduct:o}=k.useContext(yn),{action:s}=k.useContext(P),l=e.trial_days,c=r===e.id?"gh-portal-product-card checked":"gh-portal-product-card",d=(h=t==null?void 0:t.filter(b=>b.type==="paid"))==null?void 0:h.length;let p=!!["signup:running","checkoutPlan:running"].includes(s);mn()&&(p=!0);let m=e.description;return(!e.benefits||!e.benefits.length)&&!m&&(m="Full access"),u.jsx(u.Fragment,{children:u.jsxs("div",{className:c,onClick:b=>{b.stopPropagation(),o(e.id)},"data-test-tier":"paid",children:[u.jsxs("div",{className:"gh-portal-product-card-header",children:[u.jsx("h4",{className:"gh-portal-product-name",children:e.name}),u.jsx(Vg,{product:e})]}),u.jsxs("div",{className:"gh-portal-product-card-details",children:[u.jsxs("div",{className:"gh-portal-product-card-detaildata",children:[u.jsx("div",{className:"gh-portal-product-description","data-testid":"product-description",children:m}),u.jsx(lc,{product:e})]}),u.jsxs("div",{className:"gh-portal-btn-product",children:[u.jsx("button",{"data-test-button":"select-tier",disabled:p,className:"gh-portal-btn",onClick:b=>{const v=uc({products:t,selectedInterval:a,selectedProduct:e.id});n(b,v.id)},children:u.jsx(vC,{selectedProduct:r,product:e,disabled:p,noOfProducts:d,trialDays:l})}),i&&u.jsx("div",{className:"gh-portal-error-message",children:i})]})]})]},e.id)})}function SC({product:e,products:t,selectedInterval:a,errors:n}){const i=uc({products:t,selectedInterval:a,selectedProduct:e.id});return i&&i.id&&n&&n[i.id]?n[i.id]:null}function xC({products:e,selectedInterval:t,handleChooseSignup:a,errors:n}){return e.map(i=>{const r=SC({product:i,products:e,selectedInterval:t,errors:n});return i.id==="free"?u.jsx(kC,{products:e,handleChooseSignup:a,error:r},i.id):u.jsx(wC,{products:e,product:i,selectedInterval:t,handleChooseSignup:a,error:r},i.id)})}function Hg({discount:e}){const{site:t,t:a}=k.useContext(P),{portal_plans:n}=t;return e===0||!n.includes("monthly")?null:Io({site:t})?u.jsx(u.Fragment,{children:u.jsx("span",{className:"gh-portal-discount-label-trial",children:a("{discount}% discount",{discount:e})})}):u.jsx(u.Fragment,{children:u.jsx("span",{className:"gh-portal-discount-label",children:a("{discount}% discount",{discount:e})})})}function Wg({selectedInterval:e,setSelectedInterval:t,products:a}){const{site:n,t:i}=k.useContext(P),{portal_plans:r}=n,s=a.filter(c=>c.type!=="free").map(c=>{var d,p;return zg((d=c.monthlyPrice)==null?void 0:d.amount,(p=c.yearlyPrice)==null?void 0:p.amount)}),l=Math.max(...s);return!r.includes("monthly")||!r.includes("yearly")?null:u.jsx("div",{className:"gh-portal-logged-out-form-container",children:u.jsxs("div",{className:"gh-portal-products-pricetoggle"+(e==="month"?" left":""),children:[u.jsx("button",{"data-test-button":"switch-monthly","data-testid":"monthly-switch",className:"gh-portal-btn"+(e==="month"?" active":""),onClick:()=>{t("month")},children:i("Monthly")}),u.jsxs("button",{"data-test-button":"switch-yearly","data-testid":"yearly-switch",className:"gh-portal-btn"+(e==="year"?" active":""),onClick:()=>{t("year")},children:[i("Yearly"),l>0&&u.jsx("span",{className:"gh-portal-maximum-discount",children:i("(save {highestYearlyDiscount}%)",{highestYearlyDiscount:l})})]})]})})}function uc({products:e,selectedProduct:t,selectedInterval:a}){let n=null;if(t==="free")n={id:"free"};else{let i=e.find(r=>r.id===t);i||(i=e.find(r=>r.type==="paid")),n=a==="month"?i==null?void 0:i.monthlyPrice:i==null?void 0:i.yearlyPrice}return n}function cc({portalPlans:e,portalDefaultPlan:t,selectedInterval:a}){if(a==="month"&&e.includes("monthly"))return"month";if(a==="year"&&e.includes("yearly"))return"year";if(t&&t==="monthly"&&e.includes("monthly"))return"month";if(e.includes("yearly"))return"year";if(e.includes("monthly"))return"month"}function Kg({onPlanSelect:e,products:t,type:a=null,handleChooseSignup:n,errors:i}){var j,x;const{site:r,member:o,t:s}=k.useContext(P),{portal_plans:l,portal_default_plan:c}=r,d=t.length>0?t[0].id:"free",[p,m]=k.useState(null),[h,b]=k.useState(d),v=uc({products:t,selectedInterval:p,selectedProduct:h}),f=cc({portalPlans:l,portalDefaultPlan:c,selectedInterval:p}),g=Zt({member:o}),y=gg({site:r});if(k.useEffect(()=>{b(d)},[d]),k.useEffect(()=>{e(null,v.id)},[v.id,e]),t.length===0)if(g){const C=Di({site:r});return u.jsx("p",{style:{textAlign:"center"},children:s("Please contact {supportAddress} to adjust your complimentary subscription.",{supportAddress:C})})}else return null;let w="gh-portal-products";a==="upgrade"&&(w+=" gh-portal-upgrade-product");let S=((j=t.find(C=>C.id===h))==null?void 0:j.id)||((x=t.find(C=>C.type==="paid"))==null?void 0:x.id);return u.jsx(yn.Provider,{value:{selectedInterval:f,selectedProduct:S,setSelectedProduct:b},children:u.jsxs("section",{className:w,children:[y?"":u.jsx(Wg,{products:t,selectedInterval:f,setSelectedInterval:m}),u.jsx("div",{className:"gh-portal-products-grid",children:u.jsx(xC,{products:t,selectedInterval:f,handleChooseSignup:n,errors:i})})]})})}function EC({onPlanSelect:e,selectedPlan:t,products:a,type:n=null}){var g;const{site:i,member:r}=k.useContext(P),{portal_plans:o}=i,s=ya({member:r}),l=bg({site:i,priceId:s.id}),c=cc({portalPlans:o,selectedInterval:s.interval}),d=(l==null?void 0:l.id)||((g=a==null?void 0:a[0])==null?void 0:g.id),[p,m]=k.useState(c),[h,b]=k.useState(d),v=cc({portalPlans:o,selectedInterval:p});if(k.useEffect(()=>{b(d)},[d]),!o.includes("monthly")&&!o.includes("yearly")||a.length===0)return null;let f="gh-portal-products";return n==="upgrade"&&(f+=" gh-portal-upgrade-product"),n==="changePlan"&&(f+=" gh-portal-upgrade-product gh-portal-change-plan"),u.jsx(yn.Provider,{value:{selectedInterval:v,selectedProduct:h,selectedPlan:t,setSelectedProduct:b},children:u.jsxs("section",{className:f,children:[u.jsx(Wg,{selectedInterval:v,setSelectedInterval:m,products:a}),u.jsx("div",{className:"gh-portal-products-grid",children:u.jsx($C,{products:a,onPlanSelect:e})})]})})}function CC({product:e}){return e!=null&&e.description?u.jsx("div",{className:"gh-portal-product-description","data-testid":"product-description",children:e.description}):null}function jC({product:e,onPlanSelect:t}){const{member:a,site:n,t:i}=k.useContext(P),{selectedProduct:r,setSelectedProduct:o,selectedInterval:s}=k.useContext(yn),l=r===e.id?"gh-portal-product-card checked":"gh-portal-product-card",c=e.monthlyPrice,d=e.yearlyPrice,p=ya({member:a}),m=s==="month"?c:d,h=gE({member:a,site:n,priceId:m.id});return u.jsxs("div",{className:l+(h?" disabled":""),onClick:b=>{b.stopPropagation(),o(e.id)},"data-test-tier":"paid",children:[u.jsxs("div",{className:"gh-portal-product-card-header",children:[u.jsx("h4",{className:"gh-portal-product-name",children:e.name}),u.jsx(Vg,{product:e})]}),u.jsxs("div",{className:"gh-portal-product-card-details",children:[u.jsxs("div",{className:"gh-portal-product-card-detaildata",children:[e.description?u.jsx(CC,{product:e,selectedPrice:m,activePrice:p}):"",u.jsx(lc,{product:e})]}),h?u.jsx("div",{className:"gh-portal-btn-product",children:u.jsx("span",{className:"gh-portal-current-plan",children:u.jsx("span",{children:i("Current plan")})})}):u.jsx("div",{className:"gh-portal-btn-product",children:u.jsx("button",{"data-test-button":"select-tier",className:"gh-portal-btn",onClick:()=>{t(null,m==null?void 0:m.id)},children:i("Choose")})})]})]},e.id)}function $C({products:e,onPlanSelect:t}){return e.map(a=>!a||a.id==="free"?null:u.jsx(jC,{product:a,onPlanSelect:t},a.id))}function TC({products:e,selectedPlan:t,onPlanSelect:a,onPlanCheckout:n,changePlan:i=!1}){return mn()&&(a=()=>{}),i?u.jsx("section",{className:"gh-portal-plans",children:u.jsx("div",{children:u.jsx(EC,{type:"changePlan",products:e,selectedPlan:t,onPlanSelect:a})})}):u.jsx("section",{className:"gh-portal-plans",children:u.jsx("div",{children:u.jsx(Kg,{type:"upgrade",products:e,onPlanSelect:a,handleChooseSignup:(...o)=>{n(...o)}})})})}const PC=`
|
|
1262
|
+
`,yn=Y.createContext({selectedInterval:"month",selectedProduct:"free",selectedPlan:null,setSelectedProduct:null});function bC({product:e}){return!e.benefits||!e.benefits.length?null:e.benefits.map((t,a)=>{const n=(t==null?void 0:t.id)||`benefit-${a}`;return u.jsxs("div",{className:"gh-portal-product-benefit",children:[u.jsx(Pg,{className:"gh-portal-benefit-checkmark",alt:""}),u.jsx("div",{className:"gh-portal-benefit-title",children:t.name})]},n)})}function lc({product:e,hide:t=!1}){return!e.benefits||!e.benefits.length||t?null:u.jsx("div",{className:"gh-portal-product-benefits",children:u.jsx(bC,{product:e})})}function Og({price:e}){const{site:t}=k.useContext(P),{portal_plans:a}=t;return!a.includes("monthly")||!a.includes("yearly")?u.jsx("div",{className:"gh-portal-product-alternative-price"}):u.jsx("div",{className:"gh-portal-product-alternative-price",children:NE(e)})}function yC({trialDays:e,discount:t,selectedInterval:a}){const{site:n,t:i}=k.useContext(P);return Io({site:n})?e?u.jsx("span",{className:"gh-portal-discount-label",children:i("{trialDays} days free",{trialDays:e})}):null:a==="year"?u.jsx("span",{className:"gh-portal-discount-label",children:i("{discount}% discount",{discount:t})}):null}function Vg({product:e}){const{selectedInterval:t}=k.useContext(yn),{t:a,site:n}=k.useContext(P),i=e.monthlyPrice,r=e.yearlyPrice,o=e.trial_days,s=t==="month"?i:r,l=t==="month"?r:i,c=s.interval==="year"?a("year"):a("month");if(!i||!r)return null;const d=zg(e.monthlyPrice.amount,e.yearlyPrice.amount),p=pe(s.currency);return Io({site:n})?u.jsx(u.Fragment,{children:u.jsxs("div",{className:"gh-portal-product-card-pricecontainer",children:[u.jsxs("div",{className:"gh-portal-product-card-price-trial",children:[u.jsxs("div",{className:"gh-portal-product-price",children:[u.jsx("span",{className:"currency-sign"+(p.length>1?" long":""),children:p}),u.jsx("span",{className:"amount","data-testid":"product-amount",children:gn(ec(s.amount))}),u.jsxs("span",{className:"billing-period",children:["/",c]})]}),u.jsx(yC,{trialDays:o,discount:d,selectedInterval:t})]}),t==="year"?u.jsx(Hg,{discount:d,trialDays:o}):"",u.jsx(Og,{price:l})]})}):u.jsxs("div",{className:"gh-portal-product-card-pricecontainer",children:[u.jsxs("div",{className:"gh-portal-product-card-price-trial",children:[u.jsxs("div",{className:"gh-portal-product-price",children:[u.jsx("span",{className:"currency-sign"+(p.length>1?" long":""),children:p}),u.jsx("span",{className:"amount","data-testid":"product-amount",children:gn(ec(s.amount))}),u.jsxs("span",{className:"billing-period",children:["/",c]})]}),t==="year"?u.jsx(Hg,{discount:d}):""]}),u.jsx(Og,{price:l})]})}function kC({products:e,handleChooseSignup:t,error:a}){const{site:n,action:i,t:r}=k.useContext(P),{selectedProduct:o,setSelectedProduct:s}=k.useContext(yn);let l=o==="free"?"gh-portal-product-card free checked":"gh-portal-product-card free";const c=ka({site:n});let d=xE({site:n}),p=i==="signup:running";mn()&&(p=!0);let m="$";e&&e[1]?m=pe(e[1].monthlyPrice.currency):m="$";const g=gg({site:n}),b=SE({site:n});if(g){if(!d&&!b.length)return null;l+=" only-free"}return!d&&!b.length&&(d="Free preview"),u.jsx(u.Fragment,{children:u.jsxs("div",{className:l,onClick:v=>{v.stopPropagation(),s("free")},"data-test-tier":"free",children:[u.jsxs("div",{className:"gh-portal-product-card-header",children:[u.jsx("h4",{className:"gh-portal-product-name",children:pg({site:n})}),g?"":u.jsx("div",{className:"gh-portal-product-card-pricecontainer free-trial-disabled",children:u.jsxs("div",{className:"gh-portal-product-price",children:[u.jsx("span",{className:"currency-sign"+(m.length>1?" long":""),children:m}),u.jsx("span",{className:"amount","data-testid":"product-amount",children:"0"})]})})]}),u.jsxs("div",{className:"gh-portal-product-card-details",children:[u.jsxs("div",{className:"gh-portal-product-card-detaildata",children:[d?u.jsx("div",{className:"gh-portal-product-description","data-testid":"product-description",children:d}):"",u.jsx(lc,{product:c})]}),g?"":u.jsxs("div",{className:"gh-portal-btn-product",children:[u.jsx("button",{"data-test-button":"select-tier",className:"gh-portal-btn",disabled:p,onClick:v=>{t(v,"free")},children:o==="free"&&p?u.jsx(fn,{className:"gh-portal-loadingicon"}):r("Choose")}),a&&u.jsx("div",{className:"gh-portal-error-message",children:a})]})]})]})})}function vC({selectedProduct:e,product:t,disabled:a,noOfProducts:n,trialDays:i}){const{t:r}=k.useContext(P);return e===t.id&&a?u.jsx(fn,{className:"gh-portal-loadingicon"}):i>0?u.jsx(je,{string:r("Start {amount}-day free trial"),mapping:{amount:i}}):n>1?r("Choose"):r("Continue")}function wC({product:e,products:t,selectedInterval:a,handleChooseSignup:n,error:i}){var g;const{selectedProduct:r,setSelectedProduct:o}=k.useContext(yn),{action:s}=k.useContext(P),l=e.trial_days,c=r===e.id?"gh-portal-product-card checked":"gh-portal-product-card",d=(g=t==null?void 0:t.filter(b=>b.type==="paid"))==null?void 0:g.length;let p=!!["signup:running","checkoutPlan:running"].includes(s);mn()&&(p=!0);let m=e.description;return(!e.benefits||!e.benefits.length)&&!m&&(m="Full access"),u.jsx(u.Fragment,{children:u.jsxs("div",{className:c,onClick:b=>{b.stopPropagation(),o(e.id)},"data-test-tier":"paid",children:[u.jsxs("div",{className:"gh-portal-product-card-header",children:[u.jsx("h4",{className:"gh-portal-product-name",children:e.name}),u.jsx(Vg,{product:e})]}),u.jsxs("div",{className:"gh-portal-product-card-details",children:[u.jsxs("div",{className:"gh-portal-product-card-detaildata",children:[u.jsx("div",{className:"gh-portal-product-description","data-testid":"product-description",children:m}),u.jsx(lc,{product:e})]}),u.jsxs("div",{className:"gh-portal-btn-product",children:[u.jsx("button",{"data-test-button":"select-tier",disabled:p,className:"gh-portal-btn",onClick:b=>{const v=uc({products:t,selectedInterval:a,selectedProduct:e.id});n(b,v.id)},children:u.jsx(vC,{selectedProduct:r,product:e,disabled:p,noOfProducts:d,trialDays:l})}),i&&u.jsx("div",{className:"gh-portal-error-message",children:i})]})]})]},e.id)})}function SC({product:e,products:t,selectedInterval:a,errors:n}){const i=uc({products:t,selectedInterval:a,selectedProduct:e.id});return i&&i.id&&n&&n[i.id]?n[i.id]:null}function xC({products:e,selectedInterval:t,handleChooseSignup:a,errors:n}){return e.map(i=>{const r=SC({product:i,products:e,selectedInterval:t,errors:n});return i.id==="free"?u.jsx(kC,{products:e,handleChooseSignup:a,error:r},i.id):u.jsx(wC,{products:e,product:i,selectedInterval:t,handleChooseSignup:a,error:r},i.id)})}function Hg({discount:e}){const{site:t,t:a}=k.useContext(P),{portal_plans:n}=t;return e===0||!n.includes("monthly")?null:Io({site:t})?u.jsx(u.Fragment,{children:u.jsx("span",{className:"gh-portal-discount-label-trial",children:a("{discount}% discount",{discount:e})})}):u.jsx(u.Fragment,{children:u.jsx("span",{className:"gh-portal-discount-label",children:a("{discount}% discount",{discount:e})})})}function Wg({selectedInterval:e,setSelectedInterval:t,products:a}){const{site:n,t:i}=k.useContext(P),{portal_plans:r}=n,s=a.filter(c=>c.type!=="free").map(c=>{var d,p;return zg((d=c.monthlyPrice)==null?void 0:d.amount,(p=c.yearlyPrice)==null?void 0:p.amount)}),l=Math.max(...s);return!r.includes("monthly")||!r.includes("yearly")?null:u.jsx("div",{className:"gh-portal-logged-out-form-container",children:u.jsxs("div",{className:"gh-portal-products-pricetoggle"+(e==="month"?" left":""),children:[u.jsx("button",{"data-test-button":"switch-monthly","data-testid":"monthly-switch",className:"gh-portal-btn"+(e==="month"?" active":""),onClick:()=>{t("month")},children:i("Monthly")}),u.jsxs("button",{"data-test-button":"switch-yearly","data-testid":"yearly-switch",className:"gh-portal-btn"+(e==="year"?" active":""),onClick:()=>{t("year")},children:[i("Yearly"),l>0&&u.jsx("span",{className:"gh-portal-maximum-discount",children:i("(save {highestYearlyDiscount}%)",{highestYearlyDiscount:l})})]})]})})}function uc({products:e,selectedProduct:t,selectedInterval:a}){let n=null;if(t==="free")n={id:"free"};else{let i=e.find(r=>r.id===t);i||(i=e.find(r=>r.type==="paid")),n=a==="month"?i==null?void 0:i.monthlyPrice:i==null?void 0:i.yearlyPrice}return n}function cc({portalPlans:e,portalDefaultPlan:t,selectedInterval:a}){if(a==="month"&&e.includes("monthly"))return"month";if(a==="year"&&e.includes("yearly"))return"year";if(t&&t==="monthly"&&e.includes("monthly"))return"month";if(e.includes("yearly"))return"year";if(e.includes("monthly"))return"month"}function Kg({onPlanSelect:e,products:t,type:a=null,handleChooseSignup:n,errors:i}){var j,x;const{site:r,member:o,t:s}=k.useContext(P),{portal_plans:l,portal_default_plan:c}=r,d=t.length>0?t[0].id:"free",[p,m]=k.useState(null),[g,b]=k.useState(d),v=uc({products:t,selectedInterval:p,selectedProduct:g}),f=cc({portalPlans:l,portalDefaultPlan:c,selectedInterval:p}),h=Zt({member:o}),y=gg({site:r});if(k.useEffect(()=>{b(d)},[d]),k.useEffect(()=>{e(null,v.id)},[v.id,e]),t.length===0)if(h){const C=Di({site:r});return u.jsx("p",{style:{textAlign:"center"},children:s("Please contact {supportAddress} to adjust your complimentary subscription.",{supportAddress:C})})}else return null;let w="gh-portal-products";a==="upgrade"&&(w+=" gh-portal-upgrade-product");let S=((j=t.find(C=>C.id===g))==null?void 0:j.id)||((x=t.find(C=>C.type==="paid"))==null?void 0:x.id);return u.jsx(yn.Provider,{value:{selectedInterval:f,selectedProduct:S,setSelectedProduct:b},children:u.jsxs("section",{className:w,children:[y?"":u.jsx(Wg,{products:t,selectedInterval:f,setSelectedInterval:m}),u.jsx("div",{className:"gh-portal-products-grid",children:u.jsx(xC,{products:t,selectedInterval:f,handleChooseSignup:n,errors:i})})]})})}function EC({onPlanSelect:e,selectedPlan:t,products:a,type:n=null}){var h;const{site:i,member:r}=k.useContext(P),{portal_plans:o}=i,s=ya({member:r}),l=bg({site:i,priceId:s.id}),c=cc({portalPlans:o,selectedInterval:s.interval}),d=(l==null?void 0:l.id)||((h=a==null?void 0:a[0])==null?void 0:h.id),[p,m]=k.useState(c),[g,b]=k.useState(d),v=cc({portalPlans:o,selectedInterval:p});if(k.useEffect(()=>{b(d)},[d]),!o.includes("monthly")&&!o.includes("yearly")||a.length===0)return null;let f="gh-portal-products";return n==="upgrade"&&(f+=" gh-portal-upgrade-product"),n==="changePlan"&&(f+=" gh-portal-upgrade-product gh-portal-change-plan"),u.jsx(yn.Provider,{value:{selectedInterval:v,selectedProduct:g,selectedPlan:t,setSelectedProduct:b},children:u.jsxs("section",{className:f,children:[u.jsx(Wg,{selectedInterval:v,setSelectedInterval:m,products:a}),u.jsx("div",{className:"gh-portal-products-grid",children:u.jsx($C,{products:a,onPlanSelect:e})})]})})}function CC({product:e}){return e!=null&&e.description?u.jsx("div",{className:"gh-portal-product-description","data-testid":"product-description",children:e.description}):null}function jC({product:e,onPlanSelect:t}){const{member:a,site:n,t:i}=k.useContext(P),{selectedProduct:r,setSelectedProduct:o,selectedInterval:s}=k.useContext(yn),l=r===e.id?"gh-portal-product-card checked":"gh-portal-product-card",c=e.monthlyPrice,d=e.yearlyPrice,p=ya({member:a}),m=s==="month"?c:d,g=gE({member:a,site:n,priceId:m.id});return u.jsxs("div",{className:l+(g?" disabled":""),onClick:b=>{b.stopPropagation(),o(e.id)},"data-test-tier":"paid",children:[u.jsxs("div",{className:"gh-portal-product-card-header",children:[u.jsx("h4",{className:"gh-portal-product-name",children:e.name}),u.jsx(Vg,{product:e})]}),u.jsxs("div",{className:"gh-portal-product-card-details",children:[u.jsxs("div",{className:"gh-portal-product-card-detaildata",children:[e.description?u.jsx(CC,{product:e,selectedPrice:m,activePrice:p}):"",u.jsx(lc,{product:e})]}),g?u.jsx("div",{className:"gh-portal-btn-product",children:u.jsx("span",{className:"gh-portal-current-plan",children:u.jsx("span",{children:i("Current plan")})})}):u.jsx("div",{className:"gh-portal-btn-product",children:u.jsx("button",{"data-test-button":"select-tier",className:"gh-portal-btn",onClick:()=>{t(null,m==null?void 0:m.id)},children:i("Choose")})})]})]},e.id)}function $C({products:e,onPlanSelect:t}){return e.map(a=>!a||a.id==="free"?null:u.jsx(jC,{product:a,onPlanSelect:t},a.id))}function TC({products:e,selectedPlan:t,onPlanSelect:a,onPlanCheckout:n,changePlan:i=!1}){return mn()&&(a=()=>{}),i?u.jsx("section",{className:"gh-portal-plans",children:u.jsx("div",{children:u.jsx(EC,{type:"changePlan",products:e,selectedPlan:t,onPlanSelect:a})})}):u.jsx("section",{className:"gh-portal-plans",children:u.jsx("div",{children:u.jsx(Kg,{type:"upgrade",products:e,onPlanSelect:a,handleChooseSignup:(...o)=>{n(...o)}})})})}const PC=`
|
|
1263
1263
|
.account-plan.full-size .gh-portal-main-title {
|
|
1264
1264
|
font-size: 3.2rem;
|
|
1265
1265
|
margin-top: 44px;
|
|
@@ -1288,7 +1288,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1288
1288
|
height: 62px;
|
|
1289
1289
|
padding: 6px 12px;
|
|
1290
1290
|
}
|
|
1291
|
-
`;function zC({confirmationType:e,t}){if(e==="changePlan")return t("Confirm subscription");if(e==="cancel")return t("Cancel subscription");if(e==="subscribe")return t("Subscribe")}const NC=({showConfirmation:e,confirmationType:t})=>{const{member:a,t:n}=k.useContext(P);let i=ut({member:a})?n("Change plan"):n("Choose a plan");return e&&(i=zC({confirmationType:t,t:n})),u.jsx("header",{className:"gh-portal-detail-header",children:u.jsx("h3",{className:"gh-portal-main-title",children:i})})},AC=({member:e,onCancelSubscription:t,action:a,brandColor:n})=>{const{site:i,t:r}=k.useContext(P);if(!e.paid)return null;const o=Me({member:e});if(!o||o.cancel_at_period_end)return null;const s=r("Cancel subscription"),l=["cancelSubscription:running"].includes(a),c=!!l,d=!!o.cancel_at_period_end,p=!o.cancelAtPeriodEnd;return u.jsx("div",{className:"gh-portal-expire-container",children:u.jsx(ae,{dataTestId:"cancel-subscription",onClick:()=>{t({subscriptionId:o.id,cancelAtPeriodEnd:!0})},isRunning:l,disabled:c,isPrimary:d,isDestructive:p,classes:To({site:i})?"gh-portal-btn-text mt2 mb4":"",brandColor:n,label:s,style:{width:"100%"}})})},IC=({plan:e,type:t,onConfirm:a})=>{const{site:n,action:i,member:r,brandColor:o,t:s}=k.useContext(P),[l,c]=k.useState(""),d=Me({member:r}),p=["updateSubscription:running","checkoutPlan:running","cancelSubscription:running"].includes(i),m=s("Confirm"),
|
|
1291
|
+
`;function zC({confirmationType:e,t}){if(e==="changePlan")return t("Confirm subscription");if(e==="cancel")return t("Cancel subscription");if(e==="subscribe")return t("Subscribe")}const NC=({showConfirmation:e,confirmationType:t})=>{const{member:a,t:n}=k.useContext(P);let i=ut({member:a})?n("Change plan"):n("Choose a plan");return e&&(i=zC({confirmationType:t,t:n})),u.jsx("header",{className:"gh-portal-detail-header",children:u.jsx("h3",{className:"gh-portal-main-title",children:i})})},AC=({member:e,onCancelSubscription:t,action:a,brandColor:n})=>{const{site:i,t:r}=k.useContext(P);if(!e.paid)return null;const o=Me({member:e});if(!o||o.cancel_at_period_end)return null;const s=r("Cancel subscription"),l=["cancelSubscription:running"].includes(a),c=!!l,d=!!o.cancel_at_period_end,p=!o.cancelAtPeriodEnd;return u.jsx("div",{className:"gh-portal-expire-container",children:u.jsx(ae,{dataTestId:"cancel-subscription",onClick:()=>{t({subscriptionId:o.id,cancelAtPeriodEnd:!0})},isRunning:l,disabled:c,isPrimary:d,isDestructive:p,classes:To({site:i})?"gh-portal-btn-text mt2 mb4":"",brandColor:n,label:s,style:{width:"100%"}})})},IC=({plan:e,type:t,onConfirm:a})=>{const{site:n,action:i,member:r,brandColor:o,t:s}=k.useContext(P),[l,c]=k.useState(""),d=Me({member:r}),p=["updateSubscription:running","checkoutPlan:running","cancelSubscription:running"].includes(i),m=s("Confirm"),g=Ct(d.current_period_end),b=ya({member:r});let v=s("Starting {startDate}",{startDate:g});b.id!==e.id&&(v=s("Starting today"));const f=gn(e.price),h=`${e.currency_symbol}${f}/${s(e.interval)} – ${v}`,y=bg({site:n,priceId:e==null?void 0:e.id}),w=To({site:n})?y==null?void 0:y.name:s("Price");return t==="changePlan"?u.jsxs("div",{className:"gh-portal-logged-out-form-container",children:[u.jsxs("div",{className:"gh-portal-list mb6",children:[u.jsx("section",{children:u.jsxs("div",{className:"gh-portal-list-detail",children:[u.jsx("h3",{children:s("Account")}),u.jsx("p",{children:r.email})]})}),u.jsx("section",{children:u.jsxs("div",{className:"gh-portal-list-detail",children:[u.jsx("h3",{children:w}),u.jsx("p",{children:h})]})})]}),u.jsx(ae,{dataTestId:"confirm-action",onClick:S=>a(S,e),isRunning:p,isPrimary:!0,brandColor:o,label:m,style:{width:"100%",height:"40px"}})]}):u.jsxs("div",{className:"gh-portal-logged-out-form-container gh-portal-cancellation-form",children:[u.jsx("p",{children:u.jsx(je,{string:s("If you cancel your subscription now, you will continue to have access until {periodEnd}."),mapping:{periodEnd:u.jsx("strong",{children:Ct(d.current_period_end)})}})}),u.jsxs("section",{className:"gh-portal-input-section",children:[u.jsx("div",{className:"gh-portal-input-labelcontainer",children:u.jsx("label",{className:"gh-portal-input-label",children:s("Cancellation reason")})}),u.jsx("textarea",{"data-test-input":"cancellation-reason",className:"gh-portal-input",label:"Cancellation reason",type:"text",name:"cancellation_reason",placeholder:"",value:l,onChange:S=>c(S.target.value),rows:"2",maxLength:"500"},"cancellation_reason")]}),u.jsx(ae,{dataTestId:"confirm-cancel-subscription",onClick:S=>a(S,l),isRunning:p,isPrimary:!0,brandColor:o,label:s("Confirm cancellation"),style:{width:"100%",height:"40px"}})]})},DC=({plans:e,selectedPlan:t,onPlanSelect:a,onCancelSubscription:n})=>{const{member:i,action:r,brandColor:o}=k.useContext(P);return u.jsxs("section",{children:[u.jsx("div",{className:"gh-portal-section gh-portal-accountplans-main",children:u.jsx(Gg,{showLabel:!1,plans:e,selectedPlan:t,onPlanSelect:a,changePlan:!0})}),u.jsx(AC,{member:i,onCancelSubscription:n,action:r,brandColor:o})]})};function Gg({selectedPlan:e,onPlanSelect:t,onPlanCheckout:a,changePlan:n=!1}){const{site:i,member:r}=k.useContext(P),o=mE({site:i,member:r}),s=Zt({member:r}),l=hE({member:r,site:i});return u.jsx(TC,{products:o.length>0||s||!l?o:[l],selectedPlan:e,changePlan:n,onPlanSelect:t,onPlanCheckout:a})}const FC=({plans:e,selectedPlan:t,onPlanSelect:a,onPlanCheckout:n})=>{let i="";return e.length===1&&(i="singleplan"),u.jsx("section",{children:u.jsx("div",{className:`gh-portal-section gh-portal-accountplans-main ${i}`,children:u.jsx(Gg,{showLabel:!1,plans:e,selectedPlan:t,onPlanSelect:a,onPlanCheckout:n})})})},MC=({plans:e,selectedPlan:t,confirmationPlan:a,confirmationType:n,showConfirmation:i=!1,onPlanSelect:r,onPlanCheckout:o,onConfirm:s,onCancelSubscription:l})=>{const{member:c}=k.useContext(P),d=Ni({member:c})&&Zt({member:c});return!ut({member:c})||d?u.jsx(FC,{plans:e,selectedPlan:t,onPlanSelect:r,onPlanCheckout:o}):i?u.jsx(IC,{plan:a,type:n,onConfirm:s}):u.jsx(DC,{plans:e,selectedPlan:t,onCancelSubscription:l,onPlanSelect:r})};class qg extends Y.Component{constructor(a,n){super(a,n);X(this,"onPlanSelect",(a,n)=>{a==null||a.preventDefault();const{member:i}=this.context,r=Ni({member:i})?Zt({member:i}):!1;if(!ut({member:i})||r)this.timeoutId=setTimeout(()=>{this.setState(()=>({selectedPlan:n}))},5);else{const o=this.prices.find(c=>c.id===n),l=this.getActivePriceId({member:i})?"changePlan":"subscribe";n!==this.state.selectedPlan&&this.setState({confirmationPlan:o,confirmationType:l,showConfirmation:!0})}});this.state=this.getInitialState()}componentDidMount(){const{member:a}=this.context;a||this.context.onAction("switchPage",{page:"signin"})}componentWillUnmount(){clearTimeout(this.timeoutId)}getInitialState(){const{member:a,site:n}=this.context;this.prices=Do({site:n});let i=ya({member:a});i&&(this.prices=pE({prices:this.prices,currency:i.currency}));let r=i?this.prices.find(s=>s.id===i.id):null;return!ut({member:a})&&this.prices.length>0&&(r=this.prices[0]),{selectedPlan:r?r.id:null}}handleSignout(a){a.preventDefault(),this.context.onAction("signout")}onBack(){this.state.showConfirmation?this.cancelConfirmPage():this.context.onAction("back")}cancelConfirmPage(){this.setState({showConfirmation:!1,confirmationPlan:null,confirmationType:null})}onPlanCheckout(a,n){const{onAction:i,member:r}=this.context;let{confirmationPlan:o,selectedPlan:s}=this.state;n&&(s=n);const l=Ni({member:r})?!Zt({member:r}):!0;if(ut({member:r})&&l){const c=Me({member:r}),d=c?c.id:"";d&&i("updateSubscription",{plan:o.name,planId:o.id,subscriptionId:d,cancelAtPeriodEnd:!1})}else i("checkoutPlan",{plan:s})}onCancelSubscription({subscriptionId:a}){const{member:n}=this.context,i=fE({subscriptionId:a,member:n}),r=qu({subscription:i});this.setState({showConfirmation:!0,confirmationPlan:r,confirmationType:"cancel"})}onCancelSubscriptionConfirmation(a){const{member:n}=this.context,i=Me({member:n});if(!i)return null;this.context.onAction("cancelSubscription",{subscriptionId:i.id,cancelAtPeriodEnd:!0,cancellationReason:a})}getActivePriceId({member:a}){const n=ya({member:a});return n?n.id:null}onConfirm(a,n){const{confirmationType:i}=this.state;if(i==="cancel")return this.onCancelSubscriptionConfirmation(n);if(["changePlan","subscribe"].includes(i))return this.onPlanCheckout()}render(){const a=this.prices,{selectedPlan:n,showConfirmation:i,confirmationPlan:r,confirmationType:o}=this.state,{lastPage:s}=this.context;return u.jsx(u.Fragment,{children:u.jsxs("div",{className:"gh-portal-content",children:[u.jsx(bn,{onClick:l=>this.onBack(l),hidden:!s&&!i}),u.jsx(re,{}),u.jsx(NC,{onBack:l=>this.onBack(l),confirmationType:o,showConfirmation:i}),u.jsx(MC,{plans:a,selectedPlan:n,showConfirmation:i,confirmationPlan:r,confirmationType:o,onConfirm:(...l)=>this.onConfirm(...l),onCancelSubscription:l=>this.onCancelSubscription(l),onPlanSelect:this.onPlanSelect,onPlanCheckout:(l,c)=>this.onPlanCheckout(l,c)})]})})}}X(qg,"contextType",P);const _C=`
|
|
1292
1292
|
.gh-portal-input-section.hidden {
|
|
1293
1293
|
display: none;
|
|
1294
1294
|
}
|
|
@@ -1352,7 +1352,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1352
1352
|
.gh-portal-popup-container:not(.preview) .gh-portal-input:disabled::placeholder {
|
|
1353
1353
|
color: var(--grey9);
|
|
1354
1354
|
}
|
|
1355
|
-
`;function YC({message:e,style:t}){return e?u.jsx("p",{style:{...t||{}},children:e}):null}function Jg({name:e,id:t,hidden:a,label:n,hideLabel:i,type:r,value:o,placeholder:s,disabled:l=!1,onChange:c=()=>{},onBlur:d=()=>{},onKeyDown:p=()=>{},tabindex:m,maxlength:
|
|
1355
|
+
`;function YC({message:e,style:t}){return e?u.jsx("p",{style:{...t||{}},children:e}):null}function Jg({name:e,id:t,hidden:a,label:n,hideLabel:i,type:r,value:o,placeholder:s,disabled:l=!1,onChange:c=()=>{},onBlur:d=()=>{},onKeyDown:p=()=>{},tabindex:m,maxlength:g,autoFocus:b,errorMessage:v}){const f=k.useRef(null);t=t||`input-${e}`;const h=a?"gh-portal-input-section hidden":"gh-portal-input-section",y=i?"gh-portal-input-label hidden":"gh-portal-input-label",w=v?"gh-portal-input error":"gh-portal-input";mn()&&(l=!0),J(["preview"])&&(l=!0);let S="",j="",x="",C,z;switch(t){case"input-email":S="off",j="off",x="off";break;case"input-name":S="off",j="off";break;case"input-otc":S="one-time-code",j="off",x="off",C="numeric",z="[0-9]*",s??(s="• • • • • •");break}return k.useEffect(()=>{b&&f.current.focus()},[b]),u.jsxs("section",{className:h,children:[u.jsxs("div",{className:"gh-portal-input-labelcontainer",children:[u.jsxs("label",{htmlFor:t,className:y,children:[" ",n," "]}),u.jsx(YC,{message:v,name:e})]}),u.jsx("input",{"data-test-input":t,ref:f,id:t,className:w,type:r,name:e,value:o,placeholder:s,onChange:E=>c(E,e),onKeyDown:E=>p(E,e),onBlur:E=>d(E,e),disabled:l,tabIndex:m,maxLength:g,autoComplete:S,autoCorrect:j,autoCapitalize:x,"aria-label":n,inputMode:C,pattern:z})]})}class Zg extends Y.Component{render(){const{t}=this.context;return u.jsx(u.Fragment,{children:u.jsxs("button",{className:"gh-portal-btn gh-portal-btn-site-title-back",onClick:()=>{this.props.onBack?this.props.onBack():this.context.onAction("closePopup")},children:[u.jsx("span",{children:"← "})," ",t("Back")]})})}}X(Zg,"contextType",P);const RC=e=>k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",...e},k.createElement("g",{transform:"matrix(0.6666666666666666,0,0,0.6666666666666666,0,0)"},k.createElement("path",{d:"M19.5,9.5h-.75V6.75a6.75,6.75,0,0,0-13.5,0V9.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-7.5,9a2,2,0,1,1,2-2A2,2,0,0,1,12,18.5ZM16.25,9a.5.5,0,0,1-.5.5H8.25a.5.5,0,0,1-.5-.5V6.75a4.25,4.25,0,0,1,8.5,0Z",style:{fill:"#000000"}})));function UC({newsletter:e,subscribedNewsletters:t,setSubscribedNewsletters:a,t:n}){const i=t.some(r=>r.id===(e==null?void 0:e.id));return e.paid?u.jsxs("section",{className:"gh-portal-list-toggle-wrapper","data-testid":"toggle-wrapper",children:[u.jsxs("div",{className:"gh-portal-list-detail gh-portal-list-big",children:[u.jsx("h3",{children:e.name}),u.jsx("p",{children:e.description})]}),u.jsx("div",{className:"gh-portal-lock-icon-container",children:u.jsx(RC,{className:"gh-portal-lock-icon",alt:"",title:n("Unlock access to all newsletters by becoming a paid subscriber.")})})]}):u.jsxs("section",{className:"gh-portal-list-toggle-wrapper","data-testid":"toggle-wrapper",children:[u.jsxs("div",{className:"gh-portal-list-detail gh-portal-list-big",children:[u.jsx("h3",{children:e.name}),u.jsx("p",{children:e.description})]}),u.jsx("div",{children:u.jsx(_o,{id:e.id,onToggle:(r,o)=>{let s=[];o?s=t.filter(l=>l.id!==e.id).concat(e):s=t.filter(l=>l.id!==e.id),a(s)},checked:i})})]})}function LC({subscribedNewsletters:e,setSubscribedNewsletters:t}){const{site:a,t:n}=k.useContext(P);return va({site:a}).map(r=>u.jsx(UC,{newsletter:r,subscribedNewsletters:e,setSubscribedNewsletters:t,t:n},r==null?void 0:r.id))}function dc({pageData:e,onBack:t}){const{brandColor:a,site:n,onAction:i,action:r,t:o}=k.useContext(P),l=va({site:n}).filter(v=>v.subscribe_on_signup);let c=!1;r==="signup:running"&&(c=!0);let d=o("Continue"),p=!1;r==="signup:failed"&&(d=o("Retry"),p=!0);const m=r==="signup:running",[g,b]=k.useState(l);return u.jsxs("div",{className:"gh-portal-content with-footer gh-portal-newsletter-selection",children:[u.jsx("p",{className:"gh-portal-text-center gh-portal-text-large",children:o("Choose your newsletters")}),u.jsx("div",{className:"gh-portal-section",children:u.jsx("div",{className:"gh-portal-list",children:u.jsx(LC,{subscribedNewsletters:g,setSubscribedNewsletters:b})})}),u.jsx("footer",{className:"gh-portal-action-footer",children:u.jsxs("div",{style:{width:"100%"},children:[u.jsx("div",{style:{marginBottom:"20px"},children:u.jsx(ae,{isRunning:c,retry:p,disabled:m,onClick:()=>{let v=g.map(j=>({id:j.id,name:j.name}));const{name:f,email:h,plan:y,phonenumber:w,offerId:S}=e;i("signup",{name:f,email:h,plan:y,phonenumber:w,newsletters:v,offerId:S})},brandColor:a,label:d,style:{width:"100%"}})}),pn({site:n})?null:u.jsx("div",{children:u.jsx("button",{className:"gh-portal-btn gh-portal-btn-link gh-portal-btn-different-plan",onClick:()=>{t()},children:u.jsx("span",{children:o("Choose a different plan")})})})]})})]})}const BC=({field:e,onChange:t,onBlur:a=()=>{},onKeyDown:n=()=>{}})=>e?u.jsx(u.Fragment,{children:u.jsx(Jg,{label:e.label,type:e.type,name:e.name,hidden:e.hidden,placeholder:e.placeholder,disabled:e.disabled,value:e.value,onKeyDown:n,onChange:i=>t(i,e),onBlur:i=>a(i,e),tabIndex:e.tabindex,errorMessage:e.errorMessage,autoFocus:e.autoFocus},e.name)}):null;class Uo extends k.Component{constructor(t){super(t),this.state={}}render(){const{fields:t,onChange:a,onBlur:n,onKeyDown:i}=this.props,r=t.map(o=>u.jsx(BC,{field:o,onChange:a,onBlur:n,onKeyDown:i},o.name));return u.jsx(u.Fragment,{children:r})}}const OC=e=>!!e&&/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(String(e).toLowerCase()),VC=({field:e,t})=>{if(e.required&&!e.value)switch(e.name){case"name":return t("Enter your name");case"email":return t("Enter your email address");default:return t("Please enter {fieldName}",{fieldName:e.name})}return e.type==="email"&&!OC(e.value)?t("Invalid email address"):null},Yi=({fields:e,t})=>{const a={};return e.forEach(n=>{const i=n.name,r=VC({field:n,t});a[i]=r}),a},Qg=e=>k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",...e},k.createElement("defs",null,k.createElement("style",null,".inviteicon{fill: currentColor;}")),k.createElement("path",{className:"inviteicon",d:"M23.991 11.464l-.036-.146-.028-.068-.011-.027-.115-.114-.018-.021-.008-.005h-.001l-3.774-2.596v-7.987c0-.276-.224-.5-.5-.5h-15c-.276 0-.5.224-.5.5v7.987l-3.774 2.595-.003.002-.006.004-.015.016-.118.118-.011.027-.028.068-.036.146-.009.037v10.5c0 1.103.897 2 2 2h20c1.103 0 2-.897 2-2v-10.5l-.009-.036zm-1.383.03l-2.608 1.738v-3.531l2.608 1.793zm-18.608 1.738l-2.608-1.739 2.608-1.792v3.531zm18 9.768h-20c-.551 0-1-.449-1-1v-9.566l5.223 3.482c.085.057.181.084.276.084.162 0 .32-.078.417-.223.153-.23.091-.54-.139-.693l-1.777-1.185v-12.899h14v12.899l-1.777 1.185c-.23.153-.292.463-.139.693.096.145.255.223.416.223.095 0 .191-.027.277-.084l5.223-3.482v9.566c0 .551-.449 1-1 1zM15.812 16.109c-.088-.07-.198-.109-.312-.109h-7c-.114 0-.224.039-.312.109l-5 4c-.215.173-.25.487-.078.703.173.215.487.251.703.078l4.862-3.89h6.649l4.863 3.891c.093.073.203.109.313.109.147 0 .292-.065.391-.188.172-.216.137-.53-.078-.703l-5.001-4zM11.706 12.779c.087.064.191.096.294.096s.207-.032.294-.096c.482-.35 4.706-3.497 4.706-6.101 0-1.868-1.387-2.984-2.728-2.984-.772 0-1.674.379-2.272 1.368-.598-.988-1.5-1.368-2.272-1.368-1.341-.001-2.728 1.116-2.728 2.984 0 2.604 4.224 5.751 4.706 6.101zm-1.978-8.086c.844 0 1.511.681 1.786 1.822.108.45.864.45.973 0 .274-1.141.942-1.822 1.786-1.822.85 0 1.728.742 1.728 1.984 0 1.646-2.658 4.037-4 5.072-1.342-1.035-4-3.426-4-5.072-.001-1.241.877-1.984 1.727-1.984z"})),Xg=e=>{if(e.currentTarget.contains(e.target)){const t=e.target.closest("a");t&&(e.preventDefault(),window.open(t.href,"_blank"))}},HC=`
|
|
1356
1356
|
.gh-portal-back-sitetitle {
|
|
1357
1357
|
position: absolute;
|
|
1358
1358
|
top: 35px;
|
|
@@ -1681,7 +1681,7 @@ html[dir=rtl] .gh-portal-signup-terms .checkbox:before {
|
|
|
1681
1681
|
transform: translateX(-50%);
|
|
1682
1682
|
}
|
|
1683
1683
|
}
|
|
1684
|
-
`;class ef extends Y.Component{constructor(a){super(a);X(this,"handleSelectPlan",(a,n)=>{a&&a.preventDefault(),this.timeoutId=setTimeout(()=>{this.setState(()=>({plan:n}))},5)});this.state={name:"",email:"",plan:"free",showNewsletterSelection:!1,termsCheckboxChecked:!1},this.termsRef=Y.createRef()}componentDidMount(){const{member:a}=this.context;a&&this.context.onAction("switchPage",{page:"accountHome"}),this.handleSelectedPlan()}componentDidUpdate(){this.handleSelectedPlan()}handleSelectedPlan(){const{site:a,pageQuery:n}=this.context,i=Fo({site:a,pageQuery:n}),r=this.getSelectedPriceId(i,this.state.plan);r!==this.state.plan&&this.setState({plan:r})}componentWillUnmount(){clearTimeout(this.timeoutId)}getFormErrors(a){const i=this.context.site.portal_signup_checkbox_required&&this.context.site.portal_signup_terms_html&&!a.termsCheckboxChecked;return{...Yi({fields:this.getInputFields({state:a}),t:this.context.t}),checkbox:i}}doSignup(){this.setState(a=>({errors:this.getFormErrors(a)}),()=>{const{site:a,onAction:n}=this.context,{name:i,email:r,plan:o,phonenumber:s,token:l,errors:c}=this.state,d=c&&Object.values(c).filter(
|
|
1684
|
+
`;class ef extends Y.Component{constructor(a){super(a);X(this,"handleSelectPlan",(a,n)=>{a&&a.preventDefault(),this.timeoutId=setTimeout(()=>{this.setState(()=>({plan:n}))},5)});this.state={name:"",email:"",plan:"free",showNewsletterSelection:!1,termsCheckboxChecked:!1},this.termsRef=Y.createRef()}componentDidMount(){const{member:a}=this.context;a&&this.context.onAction("switchPage",{page:"accountHome"}),this.handleSelectedPlan()}componentDidUpdate(){this.handleSelectedPlan()}handleSelectedPlan(){const{site:a,pageQuery:n}=this.context,i=Fo({site:a,pageQuery:n}),r=this.getSelectedPriceId(i,this.state.plan);r!==this.state.plan&&this.setState({plan:r})}componentWillUnmount(){clearTimeout(this.timeoutId)}getFormErrors(a){const i=this.context.site.portal_signup_checkbox_required&&this.context.site.portal_signup_terms_html&&!a.termsCheckboxChecked;return{...Yi({fields:this.getInputFields({state:a}),t:this.context.t}),checkbox:i}}doSignup(){this.setState(a=>({errors:this.getFormErrors(a)}),()=>{const{site:a,onAction:n}=this.context,{name:i,email:r,plan:o,phonenumber:s,token:l,errors:c}=this.state,d=c&&Object.values(c).filter(g=>!!g).length>0,p={...c};delete p.checkbox,(c==null?void 0:c.checkbox)&&Object.values(p).every(g=>!g)&&this.termsRef.current&&this.termsRef.current.scrollIntoView({behavior:"smooth",block:"center"}),d||(Ii({site:a})?this.setState({showNewsletterSelection:!0,pageData:{name:i,email:r,plan:o,phonenumber:s,token:l},errors:{}}):(this.setState({errors:{}}),n("signup",{name:i,email:r,phonenumber:s,plan:o,token:l})))})}handleSignup(a){a.preventDefault(),this.doSignup()}handleChooseSignup(a,n){a.preventDefault(),this.setState({plan:n},()=>{this.doSignup()})}handleInputChange(a,n){const i=n.name,r=a.target.value;this.setState({[i]:r})}onKeyDown(a){a.keyCode===13&&this.handleSignup(a)}getSelectedPriceId(a=[],n){return!a||a.length===0||n==="free"?"free":a.some(r=>r.id===n)?n:a[0].id||"free"}getInputFields({state:a,fieldNames:n}){const{site:{portal_name:i},t:r}=this.context,o=a.errors||{},s=[{type:"email",value:a.email,placeholder:r("jamie@example.com"),label:r("Email"),name:"email",required:!0,tabindex:2,errorMessage:o.email||""},{type:"text",value:a.phonenumber,placeholder:r("+1 (123) 456-7890"),label:r("Phone number"),name:"phonenumber",required:!1,tabindex:-1,autocomplete:"off",hidden:!0}];return i&&s.unshift({type:"text",value:a.name,placeholder:r("Jamie Larson"),label:r("Name"),name:"name",required:!0,tabindex:1,errorMessage:o.name||""}),s[0].autoFocus=!0,n&&n.length>0?s.filter(l=>n.includes(l.name)):s}renderSignupTerms(){var l;const{site:a}=this.context;if(a.portal_signup_terms_html===null||a.portal_signup_terms_html==="")return null;const n=c=>{this.setState({termsCheckboxChecked:c.target.checked})},i=u.jsx("div",{className:"gh-portal-signup-terms-content",dangerouslySetInnerHTML:{__html:a.portal_signup_terms_html}}),r=a.portal_signup_checkbox_required?u.jsxs("label",{children:[u.jsx("input",{type:"checkbox",checked:!!this.state.termsCheckboxChecked,required:!0,onChange:n}),u.jsx("span",{className:"checkbox"}),i]}):i,s=`gh-portal-signup-terms ${(l=this.state.errors)!=null&&l.checkbox?"gh-portal-error":""}`;return u.jsx("div",{className:s,onClick:Xg,ref:this.termsRef,children:r})}renderSubmitButton(){const{action:a,site:n,brandColor:i,pageQuery:r,t:o}=this.context;if(ct({site:n})||!jt({site:n,pageQuery:r}))return null;let s=o("Continue");const l=r==="free"&&Ju({site:n});if(pn({site:n})||l)s=o("Sign up");else return null;let c=!1;a==="signup:running"&&(s=o("Sending..."),c=!0);let d=!1;a==="signup:failed"&&(s=o("Retry"),d=!0);const p=a==="signup:running";return u.jsx(ae,{style:{width:"100%"},retry:d,onClick:m=>this.handleSignup(m),disabled:p,brandColor:i,label:s,isRunning:c,tabIndex:"3"})}renderProducts(){const{site:a,pageQuery:n,t:i}=this.context,r=Ao({site:a,pageQuery:n}),o=this.state.errors||{},s={};return Object.keys(o).length>0&&this.state.plan&&(s[this.state.plan]=i("Please fill in required fields")),u.jsx(u.Fragment,{children:u.jsx(Kg,{handleChooseSignup:(...l)=>this.handleChooseSignup(...l),products:r,onPlanSelect:this.handleSelectPlan,errors:s})})}renderFreeTrialMessage(){const{site:a,t:n,pageQuery:i}=this.context;return Io({site:a,pageQuery:i})&&!ct({site:a})&&jt({site:a,pageQuery:i})?u.jsx("p",{className:"gh-portal-free-trial-notification","data-testid":"free-trial-notification-text",children:n("After a free trial ends, you will be charged the regular price for the tier you've chosen. You can always cancel before then.")}):null}renderLoginMessage(){const{brandColor:a,onAction:n,t:i}=this.context;return u.jsxs("div",{children:[this.renderFreeTrialMessage(),u.jsxs("div",{className:"gh-portal-signup-message",children:[u.jsx("div",{children:i("Already a member?")}),u.jsx("button",{"data-test-button":"signin-switch","data-testid":"signin-switch",className:"gh-portal-btn gh-portal-btn-link",style:{color:a},onClick:()=>n("switchPage",{page:"signin"}),children:u.jsx("span",{children:i("Sign in")})})]})]})}renderForm(){const a=this.getInputFields({state:this.state}),{site:n,pageQuery:i}=this.context;if(this.state.showNewsletterSelection)return u.jsx(dc,{pageData:this.state.pageData,onBack:()=>{this.setState({showNewsletterSelection:!1})}});if(ct({site:n}))return this.renderInviteOnlyMessage();if(kE({site:n})&&i==="free")return this.renderPaidMembersOnlyMessage();if(!$o({site:n})||!jt({site:n,pageQuery:i}))return Qt({site:n})?this.renderInviteOnlyMessage():this.renderMembersDisabledMessage();const r=i==="free"&&Ju({site:n}),o=pn({site:n})||r,s=this.renderSignupTerms();return u.jsx("section",{className:"gh-portal-signup",children:u.jsxs("div",{className:"gh-portal-section",children:[u.jsx("div",{className:"gh-portal-logged-out-form-container",children:u.jsx(Uo,{fields:a,onChange:(l,c)=>this.handleInputChange(l,c),onKeyDown:l=>this.onKeyDown(l)})}),u.jsxs("div",{children:[o?u.jsxs(u.Fragment,{children:[this.renderProducts(),s&&u.jsx("div",{className:"gh-portal-signup-terms-wrapper free-only",children:s})]}):u.jsxs(u.Fragment,{children:[s&&u.jsx("div",{className:"gh-portal-signup-terms-wrapper",children:s}),this.renderProducts()]}),o?u.jsx("div",{className:"gh-portal-btn-container",children:u.jsxs("div",{className:"gh-portal-logged-out-form-container",children:[this.renderSubmitButton(),this.renderLoginMessage()]})}):this.renderLoginMessage()]})]})})}renderPaidMembersOnlyMessage(){const{t:a}=this.context;return u.jsx("section",{children:u.jsxs("div",{className:"gh-portal-section",children:[u.jsx("p",{className:"gh-portal-paid-members-only-notification","data-testid":"paid-members-only-notification-text",children:a("This site only accepts paid members.")}),this.renderLoginMessage()]})})}renderInviteOnlyMessage(){const{t:a}=this.context;return u.jsx("section",{children:u.jsxs("div",{className:"gh-portal-section",children:[u.jsx("p",{className:"gh-portal-invite-only-notification","data-testid":"invite-only-notification-text",children:a("This site is invite-only, contact the owner for access.")}),this.renderLoginMessage()]})})}renderMembersDisabledMessage(){const{t:a}=this.context;return u.jsx("section",{children:u.jsx("div",{className:"gh-portal-section",children:u.jsx("p",{className:"gh-portal-members-disabled-notification","data-testid":"members-disabled-notification-text",children:a("Memberships unavailable, contact the owner for access.")})})})}renderSiteIcon(){const{site:a,pageQuery:n}=this.context,i=a.icon;return i?u.jsx("img",{className:"gh-portal-signup-logo",src:i,alt:a.title}):!jt({site:a,pageQuery:n})||ct({site:a})||!$o({site:a})?u.jsx(Qg,{className:"gh-portal-icon gh-portal-icon-invitation"}):null}renderFormHeader(){const{site:a}=this.context,n=a.title||"";return u.jsxs("header",{className:"gh-portal-signup-header",children:[this.renderSiteIcon(),u.jsx("h1",{className:"gh-portal-main-title","data-testid":"site-title-text",children:n})]})}getClassNames(){const{site:a,pageQuery:n}=this.context,i=Fo({site:a,pageQuery:n}),r=this.getInputFields({state:this.state});let o="",s="";return(i.length<=1||ct({site:a}))&&(i.length===1&&i[0].type==="free"||ct({site:a})?(o=EE({site:a})?"singleplan":"noplan",r.length===1&&(o="single-field"),ct({site:a})&&(s="invite-only",o="invite-only")):o="singleplan"),{sectionClass:o,footerClass:s}}render(){let{sectionClass:a}=this.getClassNames();return u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"gh-portal-back-sitetitle",children:u.jsx(Zg,{onBack:()=>{this.state.showNewsletterSelection?this.setState({showNewsletterSelection:!1}):this.context.onAction("closePopup")}})}),u.jsx(re,{}),u.jsxs("div",{className:"gh-portal-content signup "+a,children:[this.renderFormHeader(),this.renderForm()]})]})}}X(ef,"contextType",P);const WC=e=>k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",...e},k.createElement("defs",null,k.createElement("style",null,".a{fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1px;}")),k.createElement("rect",{className:"a",x:.75,y:4.5,width:22.5,height:15,rx:1.5,ry:1.5}),k.createElement("line",{className:"a",x1:15.687,y1:9.975,x2:19.5,y2:13.5}),k.createElement("line",{className:"a",x1:8.313,y1:9.975,x2:4.5,y2:13.5}),k.createElement("path",{className:"a",d:"M22.88,5.014l-9.513,6.56a2.406,2.406,0,0,1-2.734,0L1.12,5.014"})),KC=`
|
|
1685
1685
|
.gh-portal-icon-envelope {
|
|
1686
1686
|
width: 44px;
|
|
1687
1687
|
margin: 12px 0 10px;
|
|
@@ -1850,7 +1850,7 @@ html[dir="rtl"] .gh-portal-offer-title h4 {
|
|
|
1850
1850
|
.gh-portal-offer .gh-portal-signup-terms.gh-portal-error {
|
|
1851
1851
|
margin: 0;
|
|
1852
1852
|
}
|
|
1853
|
-
`;class nf extends Y.Component{constructor(t,a){var n,i;super(t,a),this.state={name:((n=a==null?void 0:a.member)==null?void 0:n.name)||"",email:((i=a==null?void 0:a.member)==null?void 0:i.email)||"",plan:"free",showNewsletterSelection:!1,termsCheckboxChecked:!1}}getFormErrors(t){const n=this.context.site.portal_signup_checkbox_required&&this.context.site.portal_signup_terms_html&&!t.termsCheckboxChecked;return{...Yi({fields:this.getInputFields({state:t}),t:this.context.t}),checkbox:n}}getInputFields({state:t,fieldNames:a}){const{portal_name:n}=this.context.site,{member:i,t:r}=this.context,o=t.errors||{},s=[{type:"email",value:(i==null?void 0:i.email)||t.email,placeholder:"jamie@example.com",label:r("Email"),name:"email",disabled:!!i,required:!0,tabindex:2,errorMessage:o.email||""}];let l=!!n;return i&&!(i!=null&&i.name)&&(l=!1),l&&s.unshift({type:"text",value:(i==null?void 0:i.name)||t.name,placeholder:r("Jamie Larson"),label:r("Name"),name:"name",disabled:!!i,required:!0,tabindex:1,errorMessage:o.name||""}),s[0].autoFocus=!0,a&&a.length>0?s.filter(c=>a.includes(c.name)):s}renderSignupTerms(){var s;const{site:t}=this.context;if(t.portal_signup_terms_html===null||t.portal_signup_terms_html==="")return null;const a=l=>{this.setState({termsCheckboxChecked:l.target.checked})},n=u.jsx("div",{className:"gh-portal-signup-terms-content",dangerouslySetInnerHTML:{__html:t.portal_signup_terms_html}}),i=t.portal_signup_checkbox_required?u.jsxs("label",{children:[u.jsx("input",{type:"checkbox",checked:!!this.state.termsCheckboxChecked,required:!0,onChange:a}),u.jsx("span",{className:"checkbox"}),n]}):n,o=`gh-portal-signup-terms ${(s=this.state.errors)!=null&&s.checkbox?"gh-portal-error":""}`;return u.jsx("div",{className:o,onClick:Xg,children:i})}onKeyDown(t){t.keyCode===13&&this.handleSignup(t)}handleSignup(t){t.preventDefault();const{pageData:a,site:n}=this.context;if(!a)return null;const i=hn({site:n,productId:a.tier.id}),r=a.cadence==="month"?i.monthlyPrice:i.yearlyPrice;this.setState(o=>({errors:this.getFormErrors(o)}),()=>{const{onAction:o}=this.context,{name:s,email:l,phonenumber:c,errors:d}=this.state;if(!(d&&Object.values(d).filter(m=>!!m).length>0)){const m={name:s,email:l,plan:r==null?void 0:r.id,offerId:a==null?void 0:a.id,phonenumber:c};Ii({site:n})?this.setState({showNewsletterSelection:!0,pageData:m,errors:{}}):(o("signup",m),this.setState({errors:{}}))}})}handleInputChange(t,a){const n=a.name,i=t.target.value;this.setState({[n]:i})}renderSiteLogo(){const{site:t}=this.context,a=t.icon;return a?u.jsx("img",{className:"gh-portal-signup-logo",src:a,alt:t.title}):null}renderFormHeader(){const{site:t}=this.context,a=t.title||"";return u.jsxs("header",{className:"gh-portal-signup-header",children:[this.renderSiteLogo(),u.jsx("h2",{className:"gh-portal-main-title",children:a})]})}renderForm(){const t=this.getInputFields({state:this.state});return this.state.showNewsletterSelection?u.jsx(dc,{pageData:this.state.pageData,onBack:()=>{this.setState({showNewsletterSelection:!1})}}):u.jsx("section",{children:u.jsx("div",{className:"gh-portal-section",children:u.jsx(Uo,{fields:t,onChange:(a,n)=>this.handleInputChange(a,n),onKeyDown:a=>this.onKeyDown(a)})})})}renderSubmitButton(){const{action:t,brandColor:a,t:n}=this.context,{pageData:i}=this.context;let r=n("Continue");i.type==="trial"&&(r=n("Start {amount}-day free trial",{amount:i.amount}));let o=!1;t==="signup:running"&&(r=n("Sending..."),o=!0);let s=!1;t==="signup:failed"&&(r=n("Retry"),s=!0);const l=t==="signup:running";return u.jsx(ae,{style:{width:"100%"},retry:s,onClick:c=>this.handleSignup(c),disabled:l,brandColor:a,label:r,isRunning:o,tabindex:"3",classes:"sticky bottom"})}renderLoginMessage(){const{member:t}=this.context;if(t)return null;const{brandColor:a,onAction:n,t:i}=this.context;return u.jsxs("div",{className:"gh-portal-signup-message",children:[u.jsx("div",{children:i("Already a member?")}),u.jsx("button",{className:"gh-portal-btn gh-portal-btn-link",style:{color:a},onClick:()=>n("switchPage",{page:"signin"}),children:u.jsx("span",{children:i("Sign in")})})]})}renderOfferTag(){const{pageData:t,t:a}=this.context;return t.amount<=0?u.jsx(u.Fragment,{}):t.type==="fixed"?u.jsx("h5",{className:"gh-portal-discount-label",children:a("{amount} off",{amount:`${pe(t.currency)}${t.amount/100}`})}):t.type==="trial"?u.jsx("h5",{className:"gh-portal-discount-label",children:a("{amount} days free",{amount:t.amount})}):u.jsx("h5",{className:"gh-portal-discount-label",children:a("{amount} off",{amount:t.amount+"%"})})}renderBenefits({product:t}){const a=t.benefits||[];if(!(a!=null&&a.length))return;const n=a.map((i,r)=>u.jsxs("div",{className:"gh-portal-product-benefit",children:[u.jsx(Pg,{className:"gh-portal-benefit-checkmark"}),u.jsx("div",{className:"gh-portal-benefit-title",children:i.name})]},`${i.name}-${r}`));return u.jsx("div",{className:"gh-portal-product-benefits",children:n})}getOriginalPrice({offer:t,product:a}){const n=t.cadence==="month"?a.monthlyPrice:a.yearlyPrice,i=this.renderRoundedPrice(n.amount/100);return`${pe(n.currency)}${i}/${t.cadence}`}getUpdatedPrice({offer:t,product:a}){const n=t.cadence==="month"?a.monthlyPrice:a.yearlyPrice,i=n.amount;let r;return t.type==="fixed"&&Mo(t.currency,n.currency)?(r=(i-t.amount)/100,r>0?r:0):t.type==="percent"?(r=(i-i*t.amount/100)/100,r):i/100}renderRoundedPrice(t){if(t%1!==0){const a=Math.round(t*100)/100;return Number(a).toFixed(2)}return t}getOffAmount({offer:t}){return t.type==="fixed"?`${pe(t.currency)}${t.amount/100}`:t.type==="percent"?`${t.amount}%`:t.type==="trial"?t.amount:""}renderOfferMessage({offer:t,product:a,t:n}){const i={forever:n("{amount} off forever.",{amount:this.getOffAmount({offer:t})}),firstPeriod:n("{amount} off for first {period}.",{amount:this.getOffAmount({offer:t}),period:t.cadence}),firstNMonths:n("{amount} off for first {number} months.",{amount:this.getOffAmount({offer:t}),number:t.duration_in_months||""})},r=this.getOriginalPrice({offer:t,product:a}),o=n("Renews at {price}.",{price:r,interpolation:{escapeValue:!1}});let s="",l=!1;const c=t.duration;return c==="once"?(s=i.firstPeriod,l=!0):c==="forever"?s=i.forever:c==="repeating"&&((t.duration_in_months||"")===1?s=i.firstPeriod:s=i.firstNMonths,l=!0),c==="trial"?u.jsxs("p",{className:"footnote",children:[n("Try free for {amount} days, then {originalPrice}.",{amount:t.amount,originalPrice:r,interpolation:{escapeValue:!1}})," ",u.jsx("span",{className:"gh-portal-cancel",children:n("Cancel anytime.")})]}):u.jsxs("p",{className:"footnote",children:[s," ",l?o:""]})}renderProductLabel({product:t,offer:a}){const{site:n,t:i}=this.context;return To({site:n})?u.jsxs("h4",{className:"gh-portal-plan-name",children:[t.name," - ",a.cadence==="month"?i("Monthly"):i("Yearly")]}):u.jsx("h4",{className:"gh-portal-plan-name",children:a.cadence==="month"?i("Monthly"):i("Yearly")})}renderUpdatedTierPrice({offer:t,currencyClass:a,updatedPrice:n,price:i}){return t.type==="trial"?u.jsx("div",{className:"gh-portal-product-card-pricecontainer offer-type-trial",children:u.jsxs("div",{className:"gh-portal-product-price",children:[u.jsx("span",{className:"currency-sign "+a,children:pe(i.currency)}),u.jsx("span",{className:"amount",children:gn(this.renderRoundedPrice(n))})]})}):u.jsx("div",{className:"gh-portal-product-card-pricecontainer",children:u.jsxs("div",{className:"gh-portal-product-price",children:[u.jsx("span",{className:"currency-sign "+a,children:pe(i.currency)}),u.jsx("span",{className:"amount",children:gn(this.renderRoundedPrice(n))})]})})}renderOldTierPrice({offer:t,price:a}){return t.type==="trial"?null:u.jsxs("div",{className:"gh-portal-offer-oldprice",children:[pe(a.currency)," ",gn(a.amount/100)]})}renderProductCard({product:t,offer:a,currencyClass:n,updatedPrice:i,price:r,benefits:o}){const{t:s}=this.context;return this.state.showNewsletterSelection?null:u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"gh-portal-product-card top",children:u.jsxs("div",{className:"gh-portal-product-card-header",children:[u.jsxs("h4",{className:"gh-portal-product-name",children:[t.name," - ",a.cadence==="month"?s("Monthly"):s("Yearly")]}),this.renderOldTierPrice({offer:a,price:r}),this.renderUpdatedTierPrice({offer:a,currencyClass:n,updatedPrice:i,price:r}),this.renderOfferMessage({offer:a,product:t,price:r,t:s})]})}),u.jsxs("div",{children:[u.jsx("div",{className:"gh-portal-product-card bottom",children:u.jsxs("div",{className:"gh-portal-product-card-detaildata",children:[t.description?u.jsx("div",{className:"gh-portal-product-description",children:t.description}):"",o.length?this.renderBenefits({product:t}):""]})}),u.jsxs("div",{className:"gh-portal-btn-container sticky m32",children:[u.jsx("div",{className:"gh-portal-signup-terms-wrapper",children:this.renderSignupTerms()}),this.renderSubmitButton()]}),this.renderLoginMessage()]})]})}render(){const{pageData:t,site:a,t:n}=this.context;if(!t)return null;const i=hn({site:a,productId:t.tier.id});if(!i)return null;const r=t.cadence==="month"?i.monthlyPrice:i.yearlyPrice,o=this.getUpdatedPrice({offer:t,product:i}),s=i.benefits||[],l=pe(r.currency).length>1?"long":"";return u.jsx(u.Fragment,{children:u.jsxs("div",{className:"gh-portal-content gh-portal-offer",children:[u.jsx(re,{}),this.renderFormHeader(),u.jsxs("div",{className:"gh-portal-offer-bar",children:[u.jsxs("div",{className:"gh-portal-offer-title",children:[t.display_title?u.jsx("h4",{children:t.display_title}):u.jsx("h4",{className:"placeholder",children:n("Black Friday")}),this.renderOfferTag()]}),t.display_description?u.jsx("p",{children:t.display_description}):""]}),this.renderForm(),this.renderProductCard({product:i,offer:t,currencyClass:l,updatedPrice:o,price:r,benefits:s})]})})}}X(nf,"contextType",P);const rf=e=>k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 48 48",...e},k.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M42 26.572h-6.2A3.43 3.43 0 0 0 33.024 28l-8.31 12.771a2.92 2.92 0 0 1-3.587.967 2.875 2.875 0 0 1-1.609-3.366l1.5-5.656a3.36 3.36 0 0 0-1.788-3.895 3.438 3.438 0 0 0-1.5-.348H9.397a3.388 3.388 0 0 1-3.251-4.367v-.02l3.24-10.815v-.029c1.32-4.248 3.585-7.146 8.044-7.146 10.682 0 10.072-1.231 22.544 5.073.679.338 1.354.682 2.027 1.03v18.1"})),of=e=>k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 48 48",...e},k.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M6.002 21.429H12.2a3.432 3.432 0 0 0 2.777-1.43L23.29 7.23a2.916 2.916 0 0 1 3.586-.967A2.876 2.876 0 0 1 28.48 9.63l-1.497 5.652a3.36 3.36 0 0 0 1.787 3.897c.466.229.98.347 1.498.35h8.334a3.39 3.39 0 0 1 3.253 4.366v.02l-3.24 10.815v.027c-1.32 4.248-3.588 7.146-8.047 7.146-10.68 0-10.067 1.231-22.544-5.073-.675-.338-1.35-.684-2.025-1.026V18.002"})),QC=e=>k.createElement("svg",{width:96,height:56,viewBox:"0 0 96 56",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},k.createElement("path",{d:"M9.00004 34.973C9.66499 35.3085 10.3322 35.6418 11.0017 35.9729C23.3405 42.0995 22.7366 40.9062 33.3011 40.9062C37.7115 40.9062 39.954 38.0862 41.2567 33.9563V33.9296L44.4627 23.4164V23.3964C44.6151 22.9038 44.6477 22.3828 44.5578 21.8756C44.4679 21.3683 44.2581 20.8888 43.9453 20.4757C43.6324 20.0626 43.2253 19.7275 42.7565 19.4972C42.2878 19.2669 41.7706 19.1479 41.2466 19.1498H33.0026C32.489 19.1484 31.9825 19.0325 31.5211 18.8108C31.0598 18.5891 30.6558 18.2673 30.3394 17.8698C30.025 17.4718 29.8084 17.0078 29.7066 16.5141C29.6048 16.0203 29.6205 15.51 29.7525 15.0232L31.235 9.5266C31.3503 9.09972 31.3609 8.65208 31.2659 8.2204C31.171 7.78873 30.9732 7.38533 30.6888 7.0433C30.4078 6.70494 30.0511 6.43489 29.6465 6.2542C29.2418 6.07351 28.8002 5.98706 28.3559 6.00157C27.9117 6.01609 27.4769 6.13118 27.0854 6.33789C26.6938 6.5446 26.3562 6.83734 26.0987 7.19329L17.8784 19.6098C17.5652 20.0388 17.1527 20.3885 16.6749 20.6301C16.1971 20.8718 15.6678 20.9985 15.1304 20.9998H9.00004M9 17.6666L9 40.9997",stroke:"black",strokeWidth:2.85,strokeLinecap:"round",strokeLinejoin:"round"}),k.createElement("path",{d:"M86.2148 20.027C85.5499 19.6915 84.8826 19.3582 84.2132 19.0271C71.8743 12.9005 72.4782 14.0938 61.9137 14.0938C57.5034 14.0938 55.2609 16.9138 53.9581 21.0437V21.0704L50.7521 31.5836V31.6036C50.5997 32.0962 50.5672 32.6172 50.657 33.1244C50.7469 33.6317 50.9567 34.1112 51.2695 34.5243C51.5824 34.9374 51.9896 35.2725 52.4583 35.5028C52.927 35.7331 53.4442 35.8521 53.9683 35.8502H62.2123C62.7258 35.8516 63.2324 35.9675 63.6937 36.1892C64.155 36.4109 64.5591 36.7327 64.8754 37.1302C65.1899 37.5282 65.4064 37.9922 65.5082 38.4859C65.61 38.9797 65.5943 39.49 65.4624 39.9768L63.9798 45.4734C63.8646 45.9003 63.854 46.3479 63.9489 46.7796C64.0439 47.2113 64.2416 47.6147 64.526 47.9567C64.807 48.2951 65.1637 48.5651 65.5684 48.7458C65.973 48.9265 66.4147 49.0129 66.8589 48.9984C67.3031 48.9839 67.7379 48.8688 68.1295 48.6621C68.521 48.4554 68.8587 48.1627 69.1162 47.8067L77.3364 35.3902C77.6497 34.9612 78.0622 34.6115 78.5399 34.3699C79.0177 34.1282 79.547 34.0015 80.0844 34.0002H86.2148M86.2148 37.3334V14.0003",stroke:"black",strokeWidth:2.85,strokeLinecap:"round",strokeLinejoin:"round"}));class $t extends Error{static async fromApiResponse(t){if(t.status===400||t.status===429)try{const a=await t.json();if(a.errors&&Array.isArray(a.errors)&&a.errors.length>0&&a.errors[0].message)return new $t(a.errors[0].message)}catch{return!1}if(t.status===500)return new $t("A server error occurred")}}const Lo=[];function Sa(e,t,a){const n=(s,l=null)=>l?a(s,{number:l}):a(s),i=()=>{const s=l=>Lo.push(l);Lo.length===0&&(s("No member exists with this e-mail address. Please sign up first."),s("No member exists with this e-mail address."),s("This site is invite-only, contact the owner for access."),s("Unable to initiate checkout session"),s("This site is not accepting payments at the moment."),s("Too many attempts try again in {number} minutes."),s("Too many attempts try again in {number} hours."),s("Too many attempts try again in {number} days."),s("Too many different sign-in attempts, try again in {number} minutes"),s("Too many different sign-in attempts, try again in {number} hours"),s("Too many different sign-in attempts, try again in {number} days"),s("Failed to send magic link email"),s("This site only accepts paid members."),s("Signups from this email domain are currently restricted."),s("Too many sign-up attempts, try again later"),s("Memberships from this email domain are currently restricted."))},r=s=>(Lo.length===0&&i(),!!Lo.includes(s)),o=(s=null)=>{if(!s)return{preparedMessage:"An error occurred",number:null};const l=s.match(/\d+/);return l&&(s=s.replace(l[0],"{number}")),{preparedMessage:s,number:l?l[0]:null}};if(!e&&!t)return a("An error occurred");if(e instanceof $t||e.message){const{preparedMessage:s,number:l}=o(e.message);return r(s)?n(s,l):t||n(e==null?void 0:e.message)}else return t||a("An error occurred")+": "+e.toString()}function Bo({siteUrl:e=window.location.origin,apiUrl:t,apiKey:a}){const n="members/api";function i({type:l,resource:c}){return`${e.replace(/\/$/,"")}/${n}/${c}/`}function r({resource:l,params:c={}}){if(t&&a){const d=new URLSearchParams({...c,key:a});return`${t.replace(/\/$/,"")}/${l}/?${d.toString()}`}return""}function o({url:l,method:c="GET",headers:d={},credentials:p=void 0,body:m=void 0}){return fetch(l,{method:c,headers:d,credentials:p,body:m})}const s={};return s.site={read(){const l=i({type:"members",resource:"site"});return o({url:l,method:"GET",headers:{"Content-Type":"application/json"}}).then(function(c){if(c.ok)return c.json();throw new Error("Failed to fetch site data")})},newsletters(){const l=r({resource:"newsletters",params:{limit:100}});return o({url:l,method:"GET",headers:{"Content-Type":"application/json"}}).then(function(c){if(c.ok)return c.json();throw new Error("Failed to fetch site data")})},tiers(){const l=r({resource:"tiers",params:{limit:100,include:"monthly_price,yearly_price,benefits"}});return o({url:l,method:"GET",headers:{"Content-Type":"application/json"}}).then(function(c){if(c.ok)return c.json();throw new Error("Failed to fetch site data")})},settings(){const l=r({resource:"settings"});return o({url:l,method:"GET",headers:{"Content-Type":"application/json"}}).then(function(c){if(c.ok)return c.json();throw new Error("Failed to fetch site data")})},offer({offerId:l}){const c=r({resource:`offers/${l}`});return o({url:c,method:"GET",headers:{"Content-Type":"application/json"}}).then(function(d){if(d.ok)return d.json();throw new Error("Failed to fetch offer data")})},recommendations({limit:l=100}={limit:100}){const c=r({resource:"recommendations",params:{limit:l}});return o({url:c,method:"GET",headers:{"Content-Type":"application/json"}}).then(function(d){if(d.ok)return d.json();throw new Error("Failed to fetch recommendations")})}},s.feedback={async add({uuid:l,key:c,postId:d,score:p}){let m=i({type:"members",resource:"feedback"});l&&c&&(m=m+`?uuid=${l}&key=${c}`);const b=await o({url:m,method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({feedback:[{post_id:d,score:p}]})});if(b.ok)return b.json();throw await $t.fromApiResponse(b)??new Error("Failed to save feedback")}},s.recommendations={trackClicked({recommendationId:l}){let c=i({type:"members",resource:"recommendations/"+l+"/clicked"});navigator.sendBeacon(c)},trackSubscribed({recommendationId:l}){let c=i({type:"members",resource:"recommendations/"+l+"/subscribed"});navigator.sendBeacon(c)}},s.member={identity(){const l=i({type:"members",resource:"session"});return o({url:l,credentials:"same-origin"}).then(function(c){return!c.ok||c.status===204?null:c.text()})},sessionData(){const l=i({type:"members",resource:"member"});return o({url:l,credentials:"same-origin"}).then(function(c){return!c.ok||c.status===204?null:c.json()})},update({name:l,subscribed:c,newsletters:d,enableCommentNotifications:p}){const m=i({type:"members",resource:"member"}),h={name:l,subscribed:c,newsletters:d};return p!==void 0&&(h.enable_comment_notifications=p),o({url:m,method:"PUT",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(h)}).then(function(b){return b.ok?b.json():null})},deleteSuppression(){const l=i({type:"members",resource:"member/suppression"});return o({url:l,method:"DELETE"}).then(function(c){if(!c.ok)throw new Error("Your email has failed to resubscribe, please try again");return!0})},async getIntegrityToken(){const l=i({type:"members",resource:"integrity-token"}),c=await o({url:l,method:"GET"});if(c.ok)return c.text();{const d=await $t.fromApiResponse(c);throw d||new Error("Failed to start a members session")}},async sendMagicLink({email:l,emailType:c,labels:d,name:p,oldEmail:m,newsletters:h,redirect:b,integrityToken:v,phonenumber:f,customUrlHistory:g,token:y,autoRedirect:w=!0,includeOTC:S}){const j=i({type:"members",resource:"send-magic-link"}),x={name:p,email:l,newsletters:h,oldEmail:m,emailType:c,labels:d,requestSrc:"portal",redirect:b,integrityToken:v,honeypot:f,token:y,autoRedirect:w,includeOTC:S},C=g??Fi();C&&(x.urlHistory=C);const z=await o({url:j,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(x)});if(z.ok){if((z.headers.get("content-type")||"").toLowerCase().includes("application/json"))try{return await z.json()}catch{}return"Success"}else{const E=await $t.fromApiResponse(z);throw E||new Error("Failed to send magic link email")}},async verifyOTC({otc:l,otcRef:c,redirect:d}){const p=i({type:"members",resource:"verify-otc"}),h=await o({url:p,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({otc:l,otcRef:c,redirect:d})});if(h.ok)return await h.json();{const b=await $t.fromApiResponse(h);throw b||new Error("Failed to verify code")}},signout(l=!1){const c=i({type:"members",resource:"session"});return o({url:c,method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({all:l})}).then(function(d){if(d.ok)return window.location.replace(e),"Success";throw new Error("Failed to signout")})},async newsletters({uuid:l,key:c}){let d=i({type:"members",resource:"member/newsletters"});return d=d+`?uuid=${l}&key=${c}`,o({url:d,credentials:"same-origin"}).then(function(p){return!p.ok||p.status===204?null:p.json()})},async updateNewsletters({uuid:l,newsletters:c,key:d,enableCommentNotifications:p}){let m=i({type:"members",resource:"member/newsletters"});m=m+`?uuid=${l}&key=${d}`;const h={newsletters:c};return p!==void 0&&(h.enable_comment_notifications=p),o({url:m,method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(h)}).then(function(b){if(b.ok)return b.json();throw new Error("Failed to update email preferences")})},async updateEmailAddress({email:l}){const c=await s.member.identity(),d=i({type:"members",resource:"member/email"});return o({url:d,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:l,identity:c})}).then(async function(m){var h,b;if(m.ok)return"Success";{const v=await m.json(),f=((b=(h=v==null?void 0:v.errors)==null?void 0:h[0])==null?void 0:b.message)||"Failed to send email address verification email";throw new Error(f)}})},async checkoutPlan({plan:l,tierId:c,cadence:d,cancelUrl:p,successUrl:m,email:h,name:b,offerId:v,newsletters:f,metadata:g={}}={}){var C,z;const y=new URL(e),w=await s.member.identity(),S=i({type:"members",resource:"create-stripe-checkout-session"});if(!p){const E=window.location.href.startsWith(y.href)?new URL(window.location.href):new URL(e);E.searchParams.set("stripe","cancel"),p=E.href}const j={name:b,newsletters:JSON.stringify(f),requestSrc:"portal",fp_tid:(z=(C=window.FPROM||window.$FPROM)==null?void 0:C.data)==null?void 0:z.tid,urlHistory:Fi(),...g},x={priceId:v?null:l,offerId:v,identity:w,metadata:j,successUrl:m,cancelUrl:p};return h&&(x.customerEmail=h),c&&d&&(delete x.priceId,x.tierId=v?null:c,x.cadence=v?null:d),o({url:S,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(x)}).then(async function(E){var M,K;if(!E.ok){const ge=await E.json(),ne=((K=(M=ge==null?void 0:ge.errors)==null?void 0:M[0])==null?void 0:K.message)||"Failed to signup, please try again.";throw new Error(ne)}return E.json()}).then(function(E){return E.url?window.location.assign(E.url):window.Stripe(E.publicKey).redirectToCheckout({sessionId:E.sessionId}).then(function(K){if(K.error)throw new Error(K.error.message)})})},async checkoutDonation({successUrl:l,cancelUrl:c,metadata:d={},personalNote:p=""}={}){var y,w,S;const m=await s.member.identity(),h=i({type:"members",resource:"create-stripe-checkout-session"}),b={fp_tid:(w=(y=window.FPROM||window.$FPROM)==null?void 0:y.data)==null?void 0:w.tid,urlHistory:Fi(),...d},f=await o({url:h,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({identity:m,metadata:b,successUrl:l,cancelUrl:c,type:"donation",personalNote:p})}),g=await f.json();if(!f.ok){const j=(S=g==null?void 0:g.errors)==null?void 0:S[0];throw j||new Error("We're unable to process your payment right now. Please try again later.")}return g},async editBilling({successUrl:l,cancelUrl:c,subscriptionId:d}={}){const p=new URL(e),m=await s.member.identity(),h=i({type:"members",resource:"create-stripe-update-session"});if(!l){const b=new URL(e);b.searchParams.set("stripe","billing-update-success"),l=b.href}if(!c){const b=window.location.href.startsWith(p.href)?new URL(window.location.href):new URL(e);b.searchParams.set("stripe","billing-update-cancel"),c=b.href}return o({url:h,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({identity:m,subscription_id:d,successUrl:l,cancelUrl:c})}).then(function(b){if(!b.ok)throw new Error("Unable to create stripe checkout session");return b.json()}).then(function(b){return window.Stripe(b.publicKey).redirectToCheckout({sessionId:b.sessionId})}).then(function(b){if(b.error)throw new Error(b.error.message)}).catch(function(b){throw b})},async updateSubscription({subscriptionId:l,tierId:c,cadence:d,planId:p,smartCancel:m,cancelAtPeriodEnd:h,cancellationReason:b}){const v=await s.member.identity(),f=i({type:"members",resource:"subscriptions"})+l+"/",g={smart_cancel:m,cancel_at_period_end:h,cancellation_reason:b,identity:v,priceId:p};return c&&d&&(delete g.priceId,g.tierId=c,g.cadence=d),o({url:f,method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(g)})}},s.init=async()=>{let[l]=await Promise.all([s.member.sessionData()]),c={},d=[],p=[],m={};try{[{settings:m},{tiers:p},{newsletters:d}]=await Promise.all([s.site.settings(),s.site.tiers(),s.site.newsletters()]),c={...m,newsletters:d,tiers:_E({tiers:p})}}catch{}return c=wE({site:c}),{site:c,member:l}},s}class Ui extends Y.Component{render(){return u.jsx("div",{style:{display:"flex",flexDirection:"column",color:"#313131"},children:u.jsx("div",{style:{paddingLeft:"16px",paddingRight:"16px",paddingTop:"12px",height:"50px"},children:u.jsx(fn,{className:"gh-portal-loadingicon dark","data-testid":"loaderIcon"})})})}}const XC=`
|
|
1853
|
+
`;class nf extends Y.Component{constructor(t,a){var n,i;super(t,a),this.state={name:((n=a==null?void 0:a.member)==null?void 0:n.name)||"",email:((i=a==null?void 0:a.member)==null?void 0:i.email)||"",plan:"free",showNewsletterSelection:!1,termsCheckboxChecked:!1}}getFormErrors(t){const n=this.context.site.portal_signup_checkbox_required&&this.context.site.portal_signup_terms_html&&!t.termsCheckboxChecked;return{...Yi({fields:this.getInputFields({state:t}),t:this.context.t}),checkbox:n}}getInputFields({state:t,fieldNames:a}){const{portal_name:n}=this.context.site,{member:i,t:r}=this.context,o=t.errors||{},s=[{type:"email",value:(i==null?void 0:i.email)||t.email,placeholder:"jamie@example.com",label:r("Email"),name:"email",disabled:!!i,required:!0,tabindex:2,errorMessage:o.email||""}];let l=!!n;return i&&!(i!=null&&i.name)&&(l=!1),l&&s.unshift({type:"text",value:(i==null?void 0:i.name)||t.name,placeholder:r("Jamie Larson"),label:r("Name"),name:"name",disabled:!!i,required:!0,tabindex:1,errorMessage:o.name||""}),s[0].autoFocus=!0,a&&a.length>0?s.filter(c=>a.includes(c.name)):s}renderSignupTerms(){var s;const{site:t}=this.context;if(t.portal_signup_terms_html===null||t.portal_signup_terms_html==="")return null;const a=l=>{this.setState({termsCheckboxChecked:l.target.checked})},n=u.jsx("div",{className:"gh-portal-signup-terms-content",dangerouslySetInnerHTML:{__html:t.portal_signup_terms_html}}),i=t.portal_signup_checkbox_required?u.jsxs("label",{children:[u.jsx("input",{type:"checkbox",checked:!!this.state.termsCheckboxChecked,required:!0,onChange:a}),u.jsx("span",{className:"checkbox"}),n]}):n,o=`gh-portal-signup-terms ${(s=this.state.errors)!=null&&s.checkbox?"gh-portal-error":""}`;return u.jsx("div",{className:o,onClick:Xg,children:i})}onKeyDown(t){t.keyCode===13&&this.handleSignup(t)}handleSignup(t){t.preventDefault();const{pageData:a,site:n}=this.context;if(!a)return null;const i=hn({site:n,productId:a.tier.id}),r=a.cadence==="month"?i.monthlyPrice:i.yearlyPrice;this.setState(o=>({errors:this.getFormErrors(o)}),()=>{const{onAction:o}=this.context,{name:s,email:l,phonenumber:c,errors:d}=this.state;if(!(d&&Object.values(d).filter(m=>!!m).length>0)){const m={name:s,email:l,plan:r==null?void 0:r.id,offerId:a==null?void 0:a.id,phonenumber:c};Ii({site:n})?this.setState({showNewsletterSelection:!0,pageData:m,errors:{}}):(o("signup",m),this.setState({errors:{}}))}})}handleInputChange(t,a){const n=a.name,i=t.target.value;this.setState({[n]:i})}renderSiteLogo(){const{site:t}=this.context,a=t.icon;return a?u.jsx("img",{className:"gh-portal-signup-logo",src:a,alt:t.title}):null}renderFormHeader(){const{site:t}=this.context,a=t.title||"";return u.jsxs("header",{className:"gh-portal-signup-header",children:[this.renderSiteLogo(),u.jsx("h2",{className:"gh-portal-main-title",children:a})]})}renderForm(){const t=this.getInputFields({state:this.state});return this.state.showNewsletterSelection?u.jsx(dc,{pageData:this.state.pageData,onBack:()=>{this.setState({showNewsletterSelection:!1})}}):u.jsx("section",{children:u.jsx("div",{className:"gh-portal-section",children:u.jsx(Uo,{fields:t,onChange:(a,n)=>this.handleInputChange(a,n),onKeyDown:a=>this.onKeyDown(a)})})})}renderSubmitButton(){const{action:t,brandColor:a,t:n}=this.context,{pageData:i}=this.context;let r=n("Continue");i.type==="trial"&&(r=n("Start {amount}-day free trial",{amount:i.amount}));let o=!1;t==="signup:running"&&(r=n("Sending..."),o=!0);let s=!1;t==="signup:failed"&&(r=n("Retry"),s=!0);const l=t==="signup:running";return u.jsx(ae,{style:{width:"100%"},retry:s,onClick:c=>this.handleSignup(c),disabled:l,brandColor:a,label:r,isRunning:o,tabindex:"3",classes:"sticky bottom"})}renderLoginMessage(){const{member:t}=this.context;if(t)return null;const{brandColor:a,onAction:n,t:i}=this.context;return u.jsxs("div",{className:"gh-portal-signup-message",children:[u.jsx("div",{children:i("Already a member?")}),u.jsx("button",{className:"gh-portal-btn gh-portal-btn-link",style:{color:a},onClick:()=>n("switchPage",{page:"signin"}),children:u.jsx("span",{children:i("Sign in")})})]})}renderOfferTag(){const{pageData:t,t:a}=this.context;return t.amount<=0?u.jsx(u.Fragment,{}):t.type==="fixed"?u.jsx("h5",{className:"gh-portal-discount-label",children:a("{amount} off",{amount:`${pe(t.currency)}${t.amount/100}`})}):t.type==="trial"?u.jsx("h5",{className:"gh-portal-discount-label",children:a("{amount} days free",{amount:t.amount})}):u.jsx("h5",{className:"gh-portal-discount-label",children:a("{amount} off",{amount:t.amount+"%"})})}renderBenefits({product:t}){const a=t.benefits||[];if(!(a!=null&&a.length))return;const n=a.map((i,r)=>u.jsxs("div",{className:"gh-portal-product-benefit",children:[u.jsx(Pg,{className:"gh-portal-benefit-checkmark"}),u.jsx("div",{className:"gh-portal-benefit-title",children:i.name})]},`${i.name}-${r}`));return u.jsx("div",{className:"gh-portal-product-benefits",children:n})}getOriginalPrice({offer:t,product:a}){const n=t.cadence==="month"?a.monthlyPrice:a.yearlyPrice,i=this.renderRoundedPrice(n.amount/100);return`${pe(n.currency)}${i}/${t.cadence}`}getUpdatedPrice({offer:t,product:a}){const n=t.cadence==="month"?a.monthlyPrice:a.yearlyPrice,i=n.amount;let r;return t.type==="fixed"&&Mo(t.currency,n.currency)?(r=(i-t.amount)/100,r>0?r:0):t.type==="percent"?(r=(i-i*t.amount/100)/100,r):i/100}renderRoundedPrice(t){if(t%1!==0){const a=Math.round(t*100)/100;return Number(a).toFixed(2)}return t}getOffAmount({offer:t}){return t.type==="fixed"?`${pe(t.currency)}${t.amount/100}`:t.type==="percent"?`${t.amount}%`:t.type==="trial"?t.amount:""}renderOfferMessage({offer:t,product:a,t:n}){const i={forever:n("{amount} off forever.",{amount:this.getOffAmount({offer:t})}),firstPeriod:n("{amount} off for first {period}.",{amount:this.getOffAmount({offer:t}),period:t.cadence}),firstNMonths:n("{amount} off for first {number} months.",{amount:this.getOffAmount({offer:t}),number:t.duration_in_months||""})},r=this.getOriginalPrice({offer:t,product:a}),o=n("Renews at {price}.",{price:r,interpolation:{escapeValue:!1}});let s="",l=!1;const c=t.duration;return c==="once"?(s=i.firstPeriod,l=!0):c==="forever"?s=i.forever:c==="repeating"&&((t.duration_in_months||"")===1?s=i.firstPeriod:s=i.firstNMonths,l=!0),c==="trial"?u.jsxs("p",{className:"footnote",children:[n("Try free for {amount} days, then {originalPrice}.",{amount:t.amount,originalPrice:r,interpolation:{escapeValue:!1}})," ",u.jsx("span",{className:"gh-portal-cancel",children:n("Cancel anytime.")})]}):u.jsxs("p",{className:"footnote",children:[s," ",l?o:""]})}renderProductLabel({product:t,offer:a}){const{site:n,t:i}=this.context;return To({site:n})?u.jsxs("h4",{className:"gh-portal-plan-name",children:[t.name," - ",a.cadence==="month"?i("Monthly"):i("Yearly")]}):u.jsx("h4",{className:"gh-portal-plan-name",children:a.cadence==="month"?i("Monthly"):i("Yearly")})}renderUpdatedTierPrice({offer:t,currencyClass:a,updatedPrice:n,price:i}){return t.type==="trial"?u.jsx("div",{className:"gh-portal-product-card-pricecontainer offer-type-trial",children:u.jsxs("div",{className:"gh-portal-product-price",children:[u.jsx("span",{className:"currency-sign "+a,children:pe(i.currency)}),u.jsx("span",{className:"amount",children:gn(this.renderRoundedPrice(n))})]})}):u.jsx("div",{className:"gh-portal-product-card-pricecontainer",children:u.jsxs("div",{className:"gh-portal-product-price",children:[u.jsx("span",{className:"currency-sign "+a,children:pe(i.currency)}),u.jsx("span",{className:"amount",children:gn(this.renderRoundedPrice(n))})]})})}renderOldTierPrice({offer:t,price:a}){return t.type==="trial"?null:u.jsxs("div",{className:"gh-portal-offer-oldprice",children:[pe(a.currency)," ",gn(a.amount/100)]})}renderProductCard({product:t,offer:a,currencyClass:n,updatedPrice:i,price:r,benefits:o}){const{t:s}=this.context;return this.state.showNewsletterSelection?null:u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"gh-portal-product-card top",children:u.jsxs("div",{className:"gh-portal-product-card-header",children:[u.jsxs("h4",{className:"gh-portal-product-name",children:[t.name," - ",a.cadence==="month"?s("Monthly"):s("Yearly")]}),this.renderOldTierPrice({offer:a,price:r}),this.renderUpdatedTierPrice({offer:a,currencyClass:n,updatedPrice:i,price:r}),this.renderOfferMessage({offer:a,product:t,price:r,t:s})]})}),u.jsxs("div",{children:[u.jsx("div",{className:"gh-portal-product-card bottom",children:u.jsxs("div",{className:"gh-portal-product-card-detaildata",children:[t.description?u.jsx("div",{className:"gh-portal-product-description",children:t.description}):"",o.length?this.renderBenefits({product:t}):""]})}),u.jsxs("div",{className:"gh-portal-btn-container sticky m32",children:[u.jsx("div",{className:"gh-portal-signup-terms-wrapper",children:this.renderSignupTerms()}),this.renderSubmitButton()]}),this.renderLoginMessage()]})]})}render(){const{pageData:t,site:a,t:n}=this.context;if(!t)return null;const i=hn({site:a,productId:t.tier.id});if(!i)return null;const r=t.cadence==="month"?i.monthlyPrice:i.yearlyPrice,o=this.getUpdatedPrice({offer:t,product:i}),s=i.benefits||[],l=pe(r.currency).length>1?"long":"";return u.jsx(u.Fragment,{children:u.jsxs("div",{className:"gh-portal-content gh-portal-offer",children:[u.jsx(re,{}),this.renderFormHeader(),u.jsxs("div",{className:"gh-portal-offer-bar",children:[u.jsxs("div",{className:"gh-portal-offer-title",children:[t.display_title?u.jsx("h4",{children:t.display_title}):u.jsx("h4",{className:"placeholder",children:n("Black Friday")}),this.renderOfferTag()]}),t.display_description?u.jsx("p",{children:t.display_description}):""]}),this.renderForm(),this.renderProductCard({product:i,offer:t,currencyClass:l,updatedPrice:o,price:r,benefits:s})]})})}}X(nf,"contextType",P);const rf=e=>k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 48 48",...e},k.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M42 26.572h-6.2A3.43 3.43 0 0 0 33.024 28l-8.31 12.771a2.92 2.92 0 0 1-3.587.967 2.875 2.875 0 0 1-1.609-3.366l1.5-5.656a3.36 3.36 0 0 0-1.788-3.895 3.438 3.438 0 0 0-1.5-.348H9.397a3.388 3.388 0 0 1-3.251-4.367v-.02l3.24-10.815v-.029c1.32-4.248 3.585-7.146 8.044-7.146 10.682 0 10.072-1.231 22.544 5.073.679.338 1.354.682 2.027 1.03v18.1"})),of=e=>k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 48 48",...e},k.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M6.002 21.429H12.2a3.432 3.432 0 0 0 2.777-1.43L23.29 7.23a2.916 2.916 0 0 1 3.586-.967A2.876 2.876 0 0 1 28.48 9.63l-1.497 5.652a3.36 3.36 0 0 0 1.787 3.897c.466.229.98.347 1.498.35h8.334a3.39 3.39 0 0 1 3.253 4.366v.02l-3.24 10.815v.027c-1.32 4.248-3.588 7.146-8.047 7.146-10.68 0-10.067 1.231-22.544-5.073-.675-.338-1.35-.684-2.025-1.026V18.002"})),QC=e=>k.createElement("svg",{width:96,height:56,viewBox:"0 0 96 56",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},k.createElement("path",{d:"M9.00004 34.973C9.66499 35.3085 10.3322 35.6418 11.0017 35.9729C23.3405 42.0995 22.7366 40.9062 33.3011 40.9062C37.7115 40.9062 39.954 38.0862 41.2567 33.9563V33.9296L44.4627 23.4164V23.3964C44.6151 22.9038 44.6477 22.3828 44.5578 21.8756C44.4679 21.3683 44.2581 20.8888 43.9453 20.4757C43.6324 20.0626 43.2253 19.7275 42.7565 19.4972C42.2878 19.2669 41.7706 19.1479 41.2466 19.1498H33.0026C32.489 19.1484 31.9825 19.0325 31.5211 18.8108C31.0598 18.5891 30.6558 18.2673 30.3394 17.8698C30.025 17.4718 29.8084 17.0078 29.7066 16.5141C29.6048 16.0203 29.6205 15.51 29.7525 15.0232L31.235 9.5266C31.3503 9.09972 31.3609 8.65208 31.2659 8.2204C31.171 7.78873 30.9732 7.38533 30.6888 7.0433C30.4078 6.70494 30.0511 6.43489 29.6465 6.2542C29.2418 6.07351 28.8002 5.98706 28.3559 6.00157C27.9117 6.01609 27.4769 6.13118 27.0854 6.33789C26.6938 6.5446 26.3562 6.83734 26.0987 7.19329L17.8784 19.6098C17.5652 20.0388 17.1527 20.3885 16.6749 20.6301C16.1971 20.8718 15.6678 20.9985 15.1304 20.9998H9.00004M9 17.6666L9 40.9997",stroke:"black",strokeWidth:2.85,strokeLinecap:"round",strokeLinejoin:"round"}),k.createElement("path",{d:"M86.2148 20.027C85.5499 19.6915 84.8826 19.3582 84.2132 19.0271C71.8743 12.9005 72.4782 14.0938 61.9137 14.0938C57.5034 14.0938 55.2609 16.9138 53.9581 21.0437V21.0704L50.7521 31.5836V31.6036C50.5997 32.0962 50.5672 32.6172 50.657 33.1244C50.7469 33.6317 50.9567 34.1112 51.2695 34.5243C51.5824 34.9374 51.9896 35.2725 52.4583 35.5028C52.927 35.7331 53.4442 35.8521 53.9683 35.8502H62.2123C62.7258 35.8516 63.2324 35.9675 63.6937 36.1892C64.155 36.4109 64.5591 36.7327 64.8754 37.1302C65.1899 37.5282 65.4064 37.9922 65.5082 38.4859C65.61 38.9797 65.5943 39.49 65.4624 39.9768L63.9798 45.4734C63.8646 45.9003 63.854 46.3479 63.9489 46.7796C64.0439 47.2113 64.2416 47.6147 64.526 47.9567C64.807 48.2951 65.1637 48.5651 65.5684 48.7458C65.973 48.9265 66.4147 49.0129 66.8589 48.9984C67.3031 48.9839 67.7379 48.8688 68.1295 48.6621C68.521 48.4554 68.8587 48.1627 69.1162 47.8067L77.3364 35.3902C77.6497 34.9612 78.0622 34.6115 78.5399 34.3699C79.0177 34.1282 79.547 34.0015 80.0844 34.0002H86.2148M86.2148 37.3334V14.0003",stroke:"black",strokeWidth:2.85,strokeLinecap:"round",strokeLinejoin:"round"}));class $t extends Error{static async fromApiResponse(t){if(t.status===400||t.status===429)try{const a=await t.json();if(a.errors&&Array.isArray(a.errors)&&a.errors.length>0&&a.errors[0].message)return new $t(a.errors[0].message)}catch{return!1}if(t.status===500)return new $t("A server error occurred")}}const Lo=[];function Sa(e,t,a){const n=(s,l=null)=>l?a(s,{number:l}):a(s),i=()=>{const s=l=>Lo.push(l);Lo.length===0&&(s("No member exists with this e-mail address. Please sign up first."),s("No member exists with this e-mail address."),s("This site is invite-only, contact the owner for access."),s("Unable to initiate checkout session"),s("This site is not accepting payments at the moment."),s("Too many attempts try again in {number} minutes."),s("Too many attempts try again in {number} hours."),s("Too many attempts try again in {number} days."),s("Too many different sign-in attempts, try again in {number} minutes"),s("Too many different sign-in attempts, try again in {number} hours"),s("Too many different sign-in attempts, try again in {number} days"),s("Failed to send magic link email"),s("This site only accepts paid members."),s("Signups from this email domain are currently restricted."),s("Too many sign-up attempts, try again later"),s("Memberships from this email domain are currently restricted."))},r=s=>(Lo.length===0&&i(),!!Lo.includes(s)),o=(s=null)=>{if(!s)return{preparedMessage:"An error occurred",number:null};const l=s.match(/\d+/);return l&&(s=s.replace(l[0],"{number}")),{preparedMessage:s,number:l?l[0]:null}};if(!e&&!t)return a("An error occurred");if(e instanceof $t||e.message){const{preparedMessage:s,number:l}=o(e.message);return r(s)?n(s,l):t||n(e==null?void 0:e.message)}else return t||a("An error occurred")+": "+e.toString()}function Bo({siteUrl:e=window.location.origin,apiUrl:t,apiKey:a}){const n="members/api";function i({type:l,resource:c}){return`${e.replace(/\/$/,"")}/${n}/${c}/`}function r({resource:l,params:c={}}){if(t&&a){const d=new URLSearchParams({...c,key:a});return`${t.replace(/\/$/,"")}/${l}/?${d.toString()}`}return""}function o({url:l,method:c="GET",headers:d={},credentials:p=void 0,body:m=void 0}){return fetch(l,{method:c,headers:d,credentials:p,body:m})}const s={};return s.site={read(){const l=i({type:"members",resource:"site"});return o({url:l,method:"GET",headers:{"Content-Type":"application/json"}}).then(function(c){if(c.ok)return c.json();throw new Error("Failed to fetch site data")})},newsletters(){const l=r({resource:"newsletters",params:{limit:100}});return o({url:l,method:"GET",headers:{"Content-Type":"application/json"}}).then(function(c){if(c.ok)return c.json();throw new Error("Failed to fetch site data")})},tiers(){const l=r({resource:"tiers",params:{limit:100,include:"monthly_price,yearly_price,benefits"}});return o({url:l,method:"GET",headers:{"Content-Type":"application/json"}}).then(function(c){if(c.ok)return c.json();throw new Error("Failed to fetch site data")})},settings(){const l=r({resource:"settings"});return o({url:l,method:"GET",headers:{"Content-Type":"application/json"}}).then(function(c){if(c.ok)return c.json();throw new Error("Failed to fetch site data")})},offer({offerId:l}){const c=r({resource:`offers/${l}`});return o({url:c,method:"GET",headers:{"Content-Type":"application/json"}}).then(function(d){if(d.ok)return d.json();throw new Error("Failed to fetch offer data")})},recommendations({limit:l=100}={limit:100}){const c=r({resource:"recommendations",params:{limit:l}});return o({url:c,method:"GET",headers:{"Content-Type":"application/json"}}).then(function(d){if(d.ok)return d.json();throw new Error("Failed to fetch recommendations")})}},s.feedback={async add({uuid:l,key:c,postId:d,score:p}){let m=i({type:"members",resource:"feedback"});l&&c&&(m=m+`?uuid=${l}&key=${c}`);const b=await o({url:m,method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({feedback:[{post_id:d,score:p}]})});if(b.ok)return b.json();throw await $t.fromApiResponse(b)??new Error("Failed to save feedback")}},s.recommendations={trackClicked({recommendationId:l}){let c=i({type:"members",resource:"recommendations/"+l+"/clicked"});navigator.sendBeacon(c)},trackSubscribed({recommendationId:l}){let c=i({type:"members",resource:"recommendations/"+l+"/subscribed"});navigator.sendBeacon(c)}},s.member={identity(){const l=i({type:"members",resource:"session"});return o({url:l,credentials:"same-origin"}).then(function(c){return!c.ok||c.status===204?null:c.text()})},sessionData(){const l=i({type:"members",resource:"member"});return o({url:l,credentials:"same-origin"}).then(function(c){return!c.ok||c.status===204?null:c.json()})},update({name:l,subscribed:c,newsletters:d,enableCommentNotifications:p}){const m=i({type:"members",resource:"member"}),g={name:l,subscribed:c,newsletters:d};return p!==void 0&&(g.enable_comment_notifications=p),o({url:m,method:"PUT",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(g)}).then(function(b){return b.ok?b.json():null})},deleteSuppression(){const l=i({type:"members",resource:"member/suppression"});return o({url:l,method:"DELETE"}).then(function(c){if(!c.ok)throw new Error("Your email has failed to resubscribe, please try again");return!0})},async getIntegrityToken(){const l=i({type:"members",resource:"integrity-token"}),c=await o({url:l,method:"GET"});if(c.ok)return c.text();{const d=await $t.fromApiResponse(c);throw d||new Error("Failed to start a members session")}},async sendMagicLink({email:l,emailType:c,labels:d,name:p,oldEmail:m,newsletters:g,redirect:b,integrityToken:v,phonenumber:f,customUrlHistory:h,token:y,autoRedirect:w=!0,includeOTC:S}){const j=i({type:"members",resource:"send-magic-link"}),x={name:p,email:l,newsletters:g,oldEmail:m,emailType:c,labels:d,requestSrc:"portal",redirect:b,integrityToken:v,honeypot:f,token:y,autoRedirect:w,includeOTC:S},C=h??Fi();C&&(x.urlHistory=C);const z=await o({url:j,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(x)});if(z.ok){if((z.headers.get("content-type")||"").toLowerCase().includes("application/json"))try{return await z.json()}catch{}return"Success"}else{const E=await $t.fromApiResponse(z);throw E||new Error("Failed to send magic link email")}},async verifyOTC({otc:l,otcRef:c,redirect:d,integrityToken:p}){const m=i({type:"members",resource:"verify-otc"}),b=await o({url:m,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({otc:l,otcRef:c,redirect:d,integrityToken:p})});if(b.ok)return await b.json();{const v=await $t.fromApiResponse(b);throw v||new Error("Failed to verify code")}},signout(l=!1){const c=i({type:"members",resource:"session"});return o({url:c,method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({all:l})}).then(function(d){if(d.ok)return window.location.replace(e),"Success";throw new Error("Failed to signout")})},async newsletters({uuid:l,key:c}){let d=i({type:"members",resource:"member/newsletters"});return d=d+`?uuid=${l}&key=${c}`,o({url:d,credentials:"same-origin"}).then(function(p){return!p.ok||p.status===204?null:p.json()})},async updateNewsletters({uuid:l,newsletters:c,key:d,enableCommentNotifications:p}){let m=i({type:"members",resource:"member/newsletters"});m=m+`?uuid=${l}&key=${d}`;const g={newsletters:c};return p!==void 0&&(g.enable_comment_notifications=p),o({url:m,method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(g)}).then(function(b){if(b.ok)return b.json();throw new Error("Failed to update email preferences")})},async updateEmailAddress({email:l}){const c=await s.member.identity(),d=i({type:"members",resource:"member/email"});return o({url:d,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:l,identity:c})}).then(async function(m){var g,b;if(m.ok)return"Success";{const v=await m.json(),f=((b=(g=v==null?void 0:v.errors)==null?void 0:g[0])==null?void 0:b.message)||"Failed to send email address verification email";throw new Error(f)}})},async checkoutPlan({plan:l,tierId:c,cadence:d,cancelUrl:p,successUrl:m,email:g,name:b,offerId:v,newsletters:f,metadata:h={}}={}){var C,z;const y=new URL(e),w=await s.member.identity(),S=i({type:"members",resource:"create-stripe-checkout-session"});if(!p){const E=window.location.href.startsWith(y.href)?new URL(window.location.href):new URL(e);E.searchParams.set("stripe","cancel"),p=E.href}const j={name:b,newsletters:JSON.stringify(f),requestSrc:"portal",fp_tid:(z=(C=window.FPROM||window.$FPROM)==null?void 0:C.data)==null?void 0:z.tid,urlHistory:Fi(),...h},x={priceId:v?null:l,offerId:v,identity:w,metadata:j,successUrl:m,cancelUrl:p};return g&&(x.customerEmail=g),c&&d&&(delete x.priceId,x.tierId=v?null:c,x.cadence=v?null:d),o({url:S,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(x)}).then(async function(E){var M,K;if(!E.ok){const ge=await E.json(),ne=((K=(M=ge==null?void 0:ge.errors)==null?void 0:M[0])==null?void 0:K.message)||"Failed to signup, please try again.";throw new Error(ne)}return E.json()}).then(function(E){return E.url?window.location.assign(E.url):window.Stripe(E.publicKey).redirectToCheckout({sessionId:E.sessionId}).then(function(K){if(K.error)throw new Error(K.error.message)})})},async checkoutDonation({successUrl:l,cancelUrl:c,metadata:d={},personalNote:p=""}={}){var y,w,S;const m=await s.member.identity(),g=i({type:"members",resource:"create-stripe-checkout-session"}),b={fp_tid:(w=(y=window.FPROM||window.$FPROM)==null?void 0:y.data)==null?void 0:w.tid,urlHistory:Fi(),...d},f=await o({url:g,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({identity:m,metadata:b,successUrl:l,cancelUrl:c,type:"donation",personalNote:p})}),h=await f.json();if(!f.ok){const j=(S=h==null?void 0:h.errors)==null?void 0:S[0];throw j||new Error("We're unable to process your payment right now. Please try again later.")}return h},async editBilling({successUrl:l,cancelUrl:c,subscriptionId:d}={}){const p=new URL(e),m=await s.member.identity(),g=i({type:"members",resource:"create-stripe-update-session"});if(!l){const b=new URL(e);b.searchParams.set("stripe","billing-update-success"),l=b.href}if(!c){const b=window.location.href.startsWith(p.href)?new URL(window.location.href):new URL(e);b.searchParams.set("stripe","billing-update-cancel"),c=b.href}return o({url:g,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({identity:m,subscription_id:d,successUrl:l,cancelUrl:c})}).then(function(b){if(!b.ok)throw new Error("Unable to create stripe checkout session");return b.json()}).then(function(b){return window.Stripe(b.publicKey).redirectToCheckout({sessionId:b.sessionId})}).then(function(b){if(b.error)throw new Error(b.error.message)}).catch(function(b){throw b})},async updateSubscription({subscriptionId:l,tierId:c,cadence:d,planId:p,smartCancel:m,cancelAtPeriodEnd:g,cancellationReason:b}){const v=await s.member.identity(),f=i({type:"members",resource:"subscriptions"})+l+"/",h={smart_cancel:m,cancel_at_period_end:g,cancellation_reason:b,identity:v,priceId:p};return c&&d&&(delete h.priceId,h.tierId=c,h.cadence=d),o({url:f,method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(h)})}},s.init=async()=>{let[l]=await Promise.all([s.member.sessionData()]),c={},d=[],p=[],m={};try{[{settings:m},{tiers:p},{newsletters:d}]=await Promise.all([s.site.settings(),s.site.tiers(),s.site.newsletters()]),c={...m,newsletters:d,tiers:_E({tiers:p})}}catch{}return c=wE({site:c}),{site:c,member:l}},s}class Ui extends Y.Component{render(){return u.jsx("div",{style:{display:"flex",flexDirection:"column",color:"#313131"},children:u.jsx("div",{style:{paddingLeft:"16px",paddingRight:"16px",paddingTop:"12px",height:"50px"},children:u.jsx(fn,{className:"gh-portal-loadingicon dark","data-testid":"loaderIcon"})})})}}const XC=`
|
|
1854
1854
|
.gh-portal-feedback {
|
|
1855
1855
|
|
|
1856
1856
|
}
|
|
@@ -2008,7 +2008,7 @@ html[dir="rtl"] .gh-portal-offer-title h4 {
|
|
|
2008
2008
|
}
|
|
2009
2009
|
}
|
|
2010
2010
|
}
|
|
2011
|
-
`;function ej({error:e}){const{onAction:t,t:a}=k.useContext(P);return u.jsxs("div",{className:"gh-portal-content gh-portal-feedback with-footer",children:[u.jsx(re,{}),u.jsx("div",{className:"gh-feedback-icon gh-feedback-icon-error",children:u.jsx(QC,{})}),u.jsx("h1",{className:"gh-portal-main-title",children:a("Sorry, that didn’t work.")}),u.jsx("div",{children:u.jsx("p",{className:"gh-portal-text-center",children:e})}),u.jsx(ae,{style:{width:"100%"},retry:!1,onClick:()=>t("closePopup"),disabled:!1,brandColor:"#000000",label:a("Close"),isRunning:!1,tabindex:"3",classes:"sticky bottom"})]})}const tj=({onConfirm:e,loading:t,initialScore:a})=>{const{onAction:n,brandColor:i,t:r}=k.useContext(P),[o,s]=k.useState(a),l=
|
|
2011
|
+
`;function ej({error:e}){const{onAction:t,t:a}=k.useContext(P);return u.jsxs("div",{className:"gh-portal-content gh-portal-feedback with-footer",children:[u.jsx(re,{}),u.jsx("div",{className:"gh-feedback-icon gh-feedback-icon-error",children:u.jsx(QC,{})}),u.jsx("h1",{className:"gh-portal-main-title",children:a("Sorry, that didn’t work.")}),u.jsx("div",{children:u.jsx("p",{className:"gh-portal-text-center",children:e})}),u.jsx(ae,{style:{width:"100%"},retry:!1,onClick:()=>t("closePopup"),disabled:!1,brandColor:"#000000",label:a("Close"),isRunning:!1,tabindex:"3",classes:"sticky bottom"})]})}const tj=({onConfirm:e,loading:t,initialScore:a})=>{const{onAction:n,brandColor:i,t:r}=k.useContext(P),[o,s]=k.useState(a),l=g=>{g.stopPropagation()},c=()=>{n("closePopup")},d=async g=>{g.stopPropagation(),await e(o)},p=g=>{const b="gh-feedback-button";return g===o?`${b} gh-feedback-button-selected`:b},m=g=>g===o?{color:i}:{};return u.jsxs("div",{className:"gh-portal-confirm-dialog",onMouseDown:l,children:[u.jsx("h1",{className:"gh-portal-confirm-title",children:r("Give feedback on this post")}),u.jsxs("div",{className:"gh-feedback-buttons-group",children:[u.jsxs("button",{className:p(1),style:m(1),onClick:()=>s(1),children:[u.jsx(of,{}),r("More like this")]}),u.jsxs("button",{className:p(0),style:m(0),onClick:()=>s(0),children:[u.jsx(rf,{}),r("Less like this")]})]}),u.jsx(ae,{classes:"gh-portal-confirm-button",retry:!1,onClick:d,disabled:!1,brandColor:i,label:r("Submit feedback"),isRunning:t,tabindex:"3"}),u.jsx(re,{close:()=>c()})]})};async function aj({siteUrl:e,uuid:t,key:a,postId:n,score:i},r){await(r||Bo({siteUrl:e})).feedback.add({uuid:t,postId:n,key:a,score:i})}const nj=({action:e,score:t})=>(k.useEffect(()=>{e(t)}),u.jsx(Ui,{})),ij=({positive:e})=>{const{onAction:t,brandColor:a,t:n}=k.useContext(P),i=e?u.jsx(of,{}):u.jsx(rf,{});return u.jsxs("div",{className:"gh-portal-content gh-portal-feedback",children:[u.jsx(re,{}),u.jsx("div",{className:"gh-feedback-icon",children:i}),u.jsx("h1",{className:"gh-portal-main-title",children:n("Thanks for the feedback!")}),u.jsx("p",{className:"gh-portal-text-center",children:n("Your input helps shape what gets published.")}),u.jsx(ae,{style:{width:"100%"},retry:!1,onClick:()=>t("closePopup"),disabled:!1,brandColor:a,label:n("Close"),isRunning:!1,tabindex:"3",classes:"sticky bottom"})]})};function rj(){const{site:e,pageData:t,member:a,t:n,api:i}=k.useContext(P),{uuid:r,key:o,postId:s,score:l}=t,[c,d]=k.useState(l),p=c===1,m=!!a,[g,b]=k.useState(m),[v,f]=k.useState(m),[h,y]=k.useState(null),w=async j=>{f(!0);try{await aj({siteUrl:e.url,uuid:r,key:o,postId:s,score:j},i),d(j)}catch(x){const C=Sa(x,n("There was a problem submitting your feedback. Please try again a little later."),n);y(C)}f(!1)},S=async j=>{await w(j),b(!0)};if(h)return u.jsx(ej,{error:h});if(g){if(v)return u.jsx(nj,{action:w,score:c})}else return u.jsx(tj,{onConfirm:S,loading:v,initialScore:c});return u.jsx(ij,{positive:p})}const oj=".gh-email-suppressed-page-title{margin-bottom:14px}.gh-email-suppressed-page-icon{display:block;width:38px;height:38px;margin:0 auto 18px}.gh-email-suppressed-page-text{padding:0 14px;text-align:center;color:var(--grey6)}.gh-email-faq-footer-text{color:var(--grey8)}.gh-portal-list-detail.email-newsletter .gh-email-faq-page-button{display:block;margin-top:3px}.gh-portal-action-footer .gh-email-faq-page-button{margin-inline-start:4px}.emailReceivingFAQ .gh-portal-btn-back,.emailReceivingFAQ .gh-portal-btn-back:hover{left:calc(6vmin - 14px)}html[dir=rtl] .emailReceivingFAQ .gh-portal-btn-back,html[dir=rtl] .emailReceivingFAQ .gh-portal-btn-back:hover{right:calc(6vmin - 14px);left:unset}.emailReceivingFAQ .gh-portal-closeicon-container{right:calc(6vmin - 20px)}@media (max-width: 480px){.emailReceivingFAQ .gh-portal-btn-back,.emailReceivingFAQ .gh-portal-btn-back:hover{left:16px}.emailReceivingFAQ .gh-portal-closeicon-container{right:24px}}.gh-email-faq-page-button{color:var(--brandcolor);cursor:pointer;background:none;transition:color linear .1s;font-size:1.45rem}html[dir=rtl] .gh-email-faq-page-button span{transform:scaleX(-1);display:inline-flex}",sj="",lj="",uj=e=>k.createElement("svg",{id:"Regular",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",...e},k.createElement("title",null,"confetti"),k.createElement("defs",null,k.createElement("style",null,`
|
|
2012
2012
|
.cls-1{fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.5px}
|
|
2013
2013
|
`)),k.createElement("ellipse",{className:"cls-1",cx:11.531,cy:12.469,rx:2.625,ry:5.25,transform:"rotate(-45 11.531 12.47)"}),k.createElement("path",{className:"cls-1",d:"M7.4 9.7.888 21.121a1.5 1.5 0 0 0 1.991 1.991L14.3 16.605M15.773 7.7a.375.375 0 0 1 0 .531m-.53-.531a.375.375 0 0 1 .53 0m-.53.527a.377.377 0 0 1 0-.531m.53.531a.375.375 0 0 1-.53 0m4.773-4.773a.374.374 0 0 1 0 .53m-.53-.53a.374.374 0 0 1 .53 0m-.53.53a.374.374 0 0 1 0-.53m.53.53a.375.375 0 0 1-.53 0m.53 10.076a.375.375 0 0 1 0 .531m-.53-.531a.375.375 0 0 1 .53 0m-.53.531a.375.375 0 0 1 0-.531m.53.531a.375.375 0 0 1-.53 0M8.349 4.514a.377.377 0 0 1 0 .531m-.53-.531a.375.375 0 0 1 .53 0m-.53.531a.375.375 0 0 1 0-.531m.53.531a.375.375 0 0 1-.53 0M12.857.75a13.836 13.836 0 0 1-.531 5.62m4.243-4.242-.53 2.651m7.211 6.364a13.836 13.836 0 0 0-5.62.531m4.242-4.243-2.651.53"})),cj=`
|
|
2014
2014
|
.gh-portal-tips-and-donations .gh-portal-signup-header {
|
|
@@ -2187,7 +2187,7 @@ html[dir="rtl"] .gh-portal-offer-title h4 {
|
|
|
2187
2187
|
color: var(--grey6);
|
|
2188
2188
|
font-weight: 400;
|
|
2189
2189
|
}
|
|
2190
|
-
`,sf=e=>{let t=e.length,a;for(;t>0;)a=Math.floor(Math.random()*t),t-=1,[e[t],e[a]]=[e[a],e[t]];return e},bj=({title:e,favicon:t,featuredImage:a})=>{const[n,i]=k.useState(t||a),r=()=>{i(null)};return n?u.jsx("img",{className:"gh-portal-recommendation-item-favicon",src:n,alt:e,onError:r}):u.jsx("div",{className:"gh-portal-recommendation-item-favicon"})},lf=e=>{const t=window.open(e,"_blank");t?t.focus():window.location.href=e},yj=e=>{const{t,onAction:a,member:n,site:i}=k.useContext(P),{title:r,url:o,description:s,favicon:l,one_click_subscribe:c,featured_image:d}=e,p=n&&c,[m,
|
|
2190
|
+
`,sf=e=>{let t=e.length,a;for(;t>0;)a=Math.floor(Math.random()*t),t-=1,[e[t],e[a]]=[e[a],e[t]];return e},bj=({title:e,favicon:t,featuredImage:a})=>{const[n,i]=k.useState(t||a),r=()=>{i(null)};return n?u.jsx("img",{className:"gh-portal-recommendation-item-favicon",src:n,alt:e,onError:r}):u.jsx("div",{className:"gh-portal-recommendation-item-favicon"})},lf=e=>{const t=window.open(e,"_blank");t?t.focus():window.location.href=e},yj=e=>{const{t,onAction:a,member:n,site:i}=k.useContext(P),{title:r,url:o,description:s,favicon:l,one_click_subscribe:c,featured_image:d}=e,p=n&&c,[m,g]=k.useState(!1),[b,v]=k.useState(!1),[f,h]=k.useState(!1),y=i.outbound_link_tagging??!1,w=k.useMemo(()=>{if(!y)return o;try{const C=new URL(o);return C.searchParams.has("ref")||C.searchParams.has("utm_source")||C.searchParams.has("source")?o:(C.searchParams.set("ref",mg()),C.toString())}catch{return o}},[o,y]),S=k.useCallback(()=>{lf(w),b||(a("trackRecommendationClicked",{recommendationId:e.id}),v(!0))},[w,e.id,b]),j=k.useCallback(async()=>{try{h(!0),await a("oneClickSubscribe",{siteUrl:o,throwErrors:!0}),a("trackRecommendationSubscribed",{recommendationId:e.id}),g(!0)}catch{const z=new URL("#/portal/signup",w);lf(z),b||(a("trackRecommendationClicked",{recommendationId:e.id}),v(!0))}h(!1)},[g,o,w,e.id,b]),x=k.useCallback(C=>{f||(p?j(C):S(C))},[f,p,j,S]);return u.jsxs("section",{className:"gh-portal-recommendation-item",children:[u.jsxs("div",{className:"gh-portal-list-detail gh-portal-list-big",onClick:S,children:[u.jsxs("div",{className:"gh-portal-recommendation-item-header",children:[u.jsx(bj,{title:r,favicon:l,featuredImage:d}),u.jsx("h3",{children:r}),u.jsx(hj,{className:"gh-portal-recommendation-arrow-icon"})]}),u.jsxs("div",{className:"gh-portal-recommendation-description-container",children:[m&&u.jsxs("div",{className:"gh-portal-recommendation-subscribed "+(s?"with-description":"without-description"),children:[u.jsx("span",{children:t("Verification link sent, check your inbox")}),u.jsx(gj,{className:"gh-portal-recommendation-checkmark-icon",alt:""})]}),s&&u.jsx("p",{className:m?"gh-portal-recommendation-description-hidden":"",children:s})]})]}),u.jsxs("div",{className:"gh-portal-recommendation-item-action",children:[!m&&f&&u.jsx("span",{className:"gh-portal-recommendations-loading-container",children:u.jsx(fn,{className:"gh-portal-loadingicon dark"})}),!m&&!f&&p&&u.jsx("button",{type:"button",className:"gh-portal-btn gh-portal-btn-list",onClick:x,children:t("Subscribe")})]})]})},kj=()=>{const{api:e,site:t,pageData:a,t:n,onAction:i}=k.useContext(P),{title:r,icon:o}=t,{recommendations_enabled:s=!1}=t,[l,c]=k.useState(null);k.useEffect(()=>{e.site.recommendations({limit:100}).then(v=>{const f=v.recommendations.filter(y=>y.one_click_subscribe),h=v.recommendations.filter(y=>!y.one_click_subscribe);c([...sf(f),...sf(h)])}).catch(v=>{console.error(v)})},[]);const[d,p]=k.useState(5),m=()=>{p(l.length)};if(k.useEffect(()=>()=>{if(a.signup){const v=[];v.push("action","success"),nc(v)}},[]),l===null)return u.jsx(Ui,{});const g=a&&a.signup?n("Welcome to {siteTitle}",{siteTitle:r,interpolation:{escapeValue:!1}}):n("Recommendations");let b;return s&&l&&l.length>0?a&&a.signup?b=n("Thank you for subscribing. Before you start reading, below are a few other sites you may enjoy."):b=n("Here are a few other sites you may enjoy."):b=n("Sorry, no recommendations are available right now."),u.jsxs("div",{className:"gh-portal-content with-footer",children:[u.jsx(re,{}),u.jsxs("div",{className:"gh-portal-recommendations-header",children:[o&&u.jsx("img",{className:"gh-portal-signup-logo",alt:r,src:o}),u.jsx("h1",{className:"gh-portal-main-title",children:g})]}),u.jsx("p",{className:"gh-portal-recommendations-description",children:b}),s?u.jsx("div",{className:"gh-portal-list",children:l.slice(0,d).map((v,f)=>u.jsx(yj,{...v},f))}):null,(d<l.length||a&&a.signup)&&u.jsxs("footer",{className:"gh-portal-action-footer",children:[d<l.length&&u.jsx("button",{className:"gh-portal-btn gh-portal-center",style:{width:"100%"},onClick:m,children:u.jsx("span",{children:n("Show all")})}),a&&a.signup&&u.jsx("button",{className:"gh-portal-btn gh-portal-center gh-portal-btn-link gh-portal-btn-recommendations-later",style:{width:"100%"},onClick:m,children:u.jsx("span",{onClick:()=>i("closePopup"),children:n("Maybe later")})})]})]})},vj=`
|
|
2191
2191
|
.gh-portal-main-title {
|
|
2192
2192
|
text-align: center;
|
|
2193
2193
|
color: var(--grey0);
|
|
@@ -3416,9 +3416,9 @@ html[dir="rtl"] .gh-portal-list-toggle-wrapper .gh-portal-list-detail {
|
|
|
3416
3416
|
.gh-portal-hide {
|
|
3417
3417
|
display: none;
|
|
3418
3418
|
}
|
|
3419
|
-
`;function xj({site:e}){return Wu+vj+ZE+PC+_C+fC()+JE+WE+qE+ug+KC+HC+ZC()+Eg+GC+wj+Sj+XC+oj+sj+lj+cj+pj+fj}class uf extends Y.Component{constructor(t){super(t),this.state={email:"",token:void 0}}componentDidMount(){const{member:t}=this.context;t&&this.context.onAction("switchPage",{page:"accountHome"})}handleSignin(t){t.preventDefault(),this.doSignin()}doSignin(){this.setState(t=>({errors:Yi({fields:this.getInputFields({state:t}),t:this.context.t})}),async()=>{const{email:t,phonenumber:a,errors:n,token:i}=this.state,{redirect:r}=this.context.pageData??{};n&&Object.values(n).filter(s=>!!s).length>0||this.context.onAction("signin",{email:t,phonenumber:a,redirect:r,token:i})})}handleInputChange(t,a){const n=a.name;this.setState({[n]:t.target.value})}onKeyDown(t){t.keyCode===13&&this.handleSignin(t)}getInputFields({state:t}){const{t:a}=this.context,n=t.errors||{};return[{type:"email",value:t.email,placeholder:"jamie@example.com",label:a("Email"),name:"email",required:!0,errorMessage:n.email||"",autoFocus:!0},{type:"text",value:t.phonenumber,placeholder:"+1 (123) 456-7890",label:"Phone number",name:"phonenumber",required:!1,tabindex:-1,autocomplete:"off",hidden:!0}]}renderSubmitButton(){const{action:t,t:a}=this.context;let n=!1;const i=t==="signin:running";let r=a(i?"Sending login link...":"Continue");const o=!!i;return t==="signin:failed"&&(r=a("Retry"),n=!0),u.jsx(ae,{dataTestId:"signin",retry:n,style:{width:"100%"},onClick:s=>this.handleSignin(s),disabled:o,brandColor:this.context.brandColor,label:r,isRunning:i})}renderSignupMessage(){const{brandColor:t,t:a}=this.context;return u.jsxs("div",{className:"gh-portal-signup-message",children:[u.jsx("div",{children:a("Don't have an account?")}),u.jsx("button",{"data-test-button":"signup-switch",className:"gh-portal-btn gh-portal-btn-link",style:{color:t},onClick:()=>this.context.onAction("switchPage",{page:"signup"}),children:u.jsx("span",{children:a("Sign up")})})]})}renderForm(){const{site:t,t:a}=this.context,n=$o({site:t})&&jt({site:t});return Qt({site:t})?u.jsxs("section",{children:[u.jsx("div",{className:"gh-portal-section",children:u.jsx(Uo,{fields:this.getInputFields({state:this.state}),onChange:(i,r)=>this.handleInputChange(i,r),onKeyDown:(i,r)=>this.onKeyDown(i,r)})}),u.jsxs("footer",{className:"gh-portal-signin-footer",children:[this.renderSubmitButton(),n&&this.renderSignupMessage()]})]}):u.jsx("section",{children:u.jsx("div",{className:"gh-portal-section",children:u.jsx("p",{className:"gh-portal-members-disabled-notification","data-testid":"members-disabled-notification-text",children:a("Memberships unavailable, contact the owner for access.")})})})}renderSiteIcon(){const{site:t}=this.context,a=t.icon;return a?u.jsx("img",{className:"gh-portal-signup-logo",src:a,alt:this.context.site.title}):Qt({site:t})?null:u.jsx(Qg,{className:"gh-portal-icon gh-portal-icon-invitation"})}renderSiteTitle(){const{site:t,t:a}=this.context,n=t.title;return Qt({site:t})?u.jsx("h1",{className:"gh-portal-main-title",children:a("Sign in")}):u.jsx("h1",{className:"gh-portal-main-title",children:n})}renderFormHeader(){return u.jsxs("header",{className:"gh-portal-signin-header",children:[this.renderSiteIcon(),this.renderSiteTitle()]})}render(){return u.jsxs(u.Fragment,{children:[u.jsx(re,{}),u.jsx("div",{className:"gh-portal-logged-out-form-container",children:u.jsxs("div",{className:"gh-portal-content signin",children:[this.renderFormHeader(),this.renderForm()]})})]})}}X(uf,"contextType",P);const Ej=({handleSignout:e,supportAddress:t="",t:a})=>{const n=`mailto:${t}`;return u.jsxs("footer",{className:"gh-portal-account-footer",children:[u.jsx("ul",{className:"gh-portal-account-footermenu",children:u.jsx("li",{children:u.jsx("button",{"data-test-button":"footer-signout",className:"gh-portal-btn",name:"logout","aria-label":"logout",onClick:i=>e(i),children:a("Sign out")})})}),u.jsx("div",{className:"gh-portal-account-footerright",children:u.jsx("ul",{className:"gh-portal-account-footermenu",children:u.jsx("li",{children:u.jsx("a",{"data-test-link":"footer-support",className:"gh-portal-btn gh-portal-btn-branded",href:n,onClick:()=>{n&&window.open(n)},children:a("Contact support")})})})})]})},Cj=()=>{const{member:e,brandColor:t,t:a}=k.useContext(P),n=e.avatar_image;return u.jsxs("header",{className:"gh-portal-account-header",children:[u.jsx(Hu,{gravatar:n,style:{userIcon:{color:t,width:"56px",height:"56px",padding:"2px"}}}),u.jsx("h2",{className:"gh-portal-main-title",children:a("Your account")})]})},jj=()=>{const{site:e,action:t,brandColor:a,onAction:n,t:i}=k.useContext(P);if(!$o({site:e})||!jt({site:e}))return null;const r=["checkoutPlan:running"].includes(t),o=()=>{n("switchPage",{page:"accountPlan",lastPage:"accountHome"})};return u.jsx(ae,{dataTestId:"view-plans",isRunning:r,label:i("View plans"),onClick:()=>o(),brandColor:a,style:{width:"100%"}})},$j=()=>{const{member:e,site:t,t:a}=k.useContext(P),{is_stripe_configured:n}=t;if(!n||pn({site:t}))return null;const i=Me({member:e}),r=Zt({member:e});if(r&&!i)return null;if(i){const o=i==null?void 0:i.current_period_end;if(r&&Gu({member:e})){const s=Gu({member:e}),l=Ct(s);return u.jsx("div",{className:"gh-portal-section",children:u.jsx("p",{className:"gh-portal-text-center gh-portal-free-ctatext",children:a("Your subscription will expire on {expiryDate}",{expiryDate:l})})})}if(i!=null&&i.cancel_at_period_end||r)return null;if(Zu({sub:i})){const s=Ct(i.trial_end_at);return u.jsx("div",{className:"gh-portal-section",children:u.jsx("p",{className:"gh-portal-text-center gh-portal-free-ctatext",children:a("Your subscription will start on {subscriptionStart}",{subscriptionStart:s})})})}return u.jsx("div",{className:"gh-portal-section",children:u.jsx("p",{className:"gh-portal-text-center gh-portal-free-ctatext",children:a("Your subscription will renew on {renewalDate}",{renewalDate:Ct(o)})})})}return u.jsxs("div",{className:"gh-portal-section",children:[u.jsx("p",{className:"gh-portal-text-center gh-portal-free-ctatext",children:a("You currently have a free membership, upgrade to a paid subscription for full access.")}),u.jsx(jj,{})]})},Tj=()=>{const{member:e,onAction:t,action:a,brandColor:n,t:i}=k.useContext(P),r=Me({member:e});if(!r||!r.cancel_at_period_end)return null;const o=r.cancel_at_period_end?i("Continue subscription"):i("Cancel subscription"),s=["cancelSubscription:running"].includes(a),l=!!s,c=!!r.cancel_at_period_end,d=()=>{if(!r.cancel_at_period_end)return null;const p=r.current_period_end;return u.jsx("p",{className:"gh-portal-text-center gh-portal-free-ctatext",children:i("Your subscription will expire on {expiryDate}",{expiryDate:Ct(p)})})};return u.jsxs("div",{className:"gh-portal-cancelcontinue-container",children:[u.jsx(d,{}),u.jsx(ae,{onClick:()=>{t("continueSubscription",{subscriptionId:r.id})},isRunning:s,disabled:l,isPrimary:c,brandColor:n,label:o,style:{width:"100%"}})]})},Pj=e=>k.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},k.createElement("defs",null,k.createElement("style",null,".a{fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.5px;}")),k.createElement("path",{d:"M22.939 2.56V8.817C22.9391 9.61244 22.6232 10.3754 22.061 10.938L10.5 22.5C10.2187 22.7812 9.83721 22.9392 9.43946 22.9392C9.04172 22.9392 8.66026 22.7812 8.37896 22.5L1.49997 15.62C1.21876 15.3387 1.06079 14.9572 1.06079 14.5595C1.06079 14.1618 1.21876 13.7803 1.49997 13.499L13.061 1.938C13.6236 1.37572 14.3865 1.0599 15.182 1.06H21.439C21.8368 1.06 22.2183 1.21803 22.4996 1.49934C22.7809 1.78064 22.939 2.16217 22.939 2.56V2.56Z",className:"a"}),k.createElement("path",{d:"M17.689 7.81C16.8605 7.81 16.189 7.13842 16.189 6.31C16.189 5.48157 16.8605 4.81 17.689 4.81C18.5174 4.81 19.189 5.48157 19.189 6.31C19.189 7.13842 18.5174 7.81 17.689 7.81Z",className:"a"})),zj=()=>{const{member:e,site:t,onAction:a,t:n}=k.useContext(P),i=()=>{const b=Me({member:e});a("editBilling",{subscriptionId:b.id})},r=()=>{const{is_stripe_configured:b}=t;b&&a("switchPage",{page:"accountPlan",lastPage:"accountHome"})},o=({price:b,isComplimentary:v,subscription:f})=>{const{offer:g,start_date:y}=f||{};let w="";if(b){const{amount:E=0,currency:M,interval:K}=b;w=`${Intl.NumberFormat("en",{currency:M,style:"currency"}).format(E/100)}/${n(K)}`}let S=Aj({price:b,offer:g,subscriptionStartDate:y,t:n});const j=Gu({member:e});v&&(j?w=`${n("Complimentary")} - ${n("Expires {expiryDate}",{expiryDate:j})}`:w=w?`${n("Complimentary")} (${w})`:n("Complimentary"));let x="";S&&(x="gh-portal-account-old-price");const C=()=>S?u.jsxs("p",{className:"gh-portal-account-discountcontainer",children:[u.jsx(Pj,{className:"gh-portal-account-tagicon"}),u.jsx("span",{children:S})]}):null,z=Zu({sub:f});return z&&(x="gh-portal-account-old-price"),z?u.jsxs(u.Fragment,{children:[u.jsx("p",{className:x,children:w}),u.jsx(Nj,{subscription:f,t:n})]}):u.jsxs(u.Fragment,{children:[u.jsx("p",{className:x,children:w}),u.jsx(C,{})]})},s=({isComplimentary:b,isPaid:v})=>(Ni({member:e})?!1:b)||pn({site:t})&&!v?null:u.jsx("button",{className:"gh-portal-btn gh-portal-btn-list",onClick:g=>r(),"data-test-button":"change-plan",children:n("Change")}),l=({defaultCardLast4:b})=>{if(b){const v=`**** **** **** ${b}`;return u.jsx("p",{children:v})}return null},c=({defaultCardLast4:b,isComplimentary:v})=>{const{action:f}=k.useContext(P),g=f==="editBilling:running"?u.jsx(fn,{className:"gh-portal-billing-button-loader"}):n("Update");return v?null:u.jsxs("section",{children:[u.jsxs("div",{className:"gh-portal-list-detail",children:[u.jsx("h3",{children:n("Billing info")}),u.jsx(l,{defaultCardLast4:b})]}),u.jsx("button",{className:"gh-portal-btn gh-portal-btn-list",onClick:y=>i(),"data-test-button":"update-billing",children:g})]})},d=Me({member:e}),p=Zt({member:e}),m=ut({member:e}),h=d==null?void 0:d.cancel_at_period_end;if(d||p){const{price:b,default_payment_card_last4:v}=d||{};let f=n("Plan");return To({site:t})&&dg({member:e})&&(f=dg({member:e})),u.jsxs(u.Fragment,{children:[u.jsxs("section",{children:[u.jsxs("div",{className:"gh-portal-list-detail",children:[u.jsx("h3",{children:f}),u.jsx(o,{price:b,isComplimentary:p,subscription:d})]}),u.jsx(s,{isComplimentary:p,isPaid:m,isCancelled:h})]}),u.jsx(c,{isComplimentary:p,defaultCardLast4:v})]})}return null};function Nj({subscription:e,t}){if(Zu({sub:e})){const a=Ct(e.trial_end_at);return u.jsx("p",{className:"gh-portal-account-discountcontainer",children:u.jsx("div",{children:u.jsx("span",{children:t("Free Trial – Ends {trialEnd}",{trialEnd:a})})})})}return null}function Aj({offer:e,price:t,subscriptionStartDate:a,t:n}){let i="";if((e==null?void 0:e.type)==="trial"||(e==null?void 0:e.duration)==="once")return"";if(e){const r=e.duration;let o="";if(r==="forever")o=n("Forever");else if(r==="repeating"){const s=e.duration_in_months||0;let l=new Date(a),c=new Date(l.setMonth(l.getMonth()+s));if(fg(c))return"";o=n("Ends {offerEndDate}",{offerEndDate:Ct(c)})}i=`${AE({offer:e,price:t,useFormatted:!0})}/${t.interval}${o?` — ${o}`:""}`}return i}function Ij(){const{member:e,site:t,onAction:a,t:n}=k.useContext(P);let{newsletters:i}=e;const r=!!(i!=null&&i.length);let o=n(r?"Subscribed":"Unsubscribed");const s=l=>{var p;l.preventDefault();const c=va({site:t}),d=(p=e==null?void 0:e.newsletters)!=null&&p.length?[]:c;a("updateNewsletterPreference",{newsletters:d})};return u.jsxs("section",{children:[u.jsxs("div",{className:"gh-portal-list-detail email-newsletter",children:[u.jsx("h3",{children:n("Email newsletter")}),u.jsxs("p",{children:[o," ",Qu({member:e})&&r&&u.jsx("button",{className:"gh-portal-btn-text gh-email-faq-page-button",onClick:()=>a("switchPage",{page:"emailReceivingFAQ",lastPage:"accountHome"}),children:n("Not receiving emails?")})]})]}),u.jsx("div",{children:u.jsx(_o,{dataTestId:"default-newsletter-toggle",id:"default-newsletter-toggle",onToggle:l=>{s(l)},checked:r})})]})}const cf=e=>k.createElement("svg",{fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",...e},k.createElement("path",{d:"m12.79 12.376 4.08 4.079m-4.08 0 4.08-4.08",stroke:"red",strokeWidth:1.35,strokeLinecap:"round",strokeLinejoin:"round"}),k.createElement("path",{d:"m10.439 17.994-2.664-2.652-2.86 1.478.111-4.239m0 0L1.677 9.232a1.344 1.344 0 0 1-.366-1.222 1.369 1.369 0 0 1 .904-1.05l13.111-4.374a1.369 1.369 0 0 1 1.76 1.758L15 10m-9.974 2.581 11.67-9.727",stroke:"#A3A3A3",strokeWidth:1.35,strokeLinecap:"round",strokeLinejoin:"round"}));function Dj({t:e}){return u.jsxs("p",{className:"gh-portal-email-notice",children:[u.jsx(cf,{className:"gh-portal-email-notice-icon"}),u.jsx("span",{className:"gh-mobile-only",children:e("You're not receiving emails")}),u.jsx("span",{className:"gh-desktop-only",children:e("You're currently not receiving emails")})]})}function Fj(){const{onAction:e,member:t,t:a,site:n}=k.useContext(P),i=hg({member:t}),r=zi({site:n}),o=Po({site:n}),s=i?"emailSuppressed":"accountEmail",l=!r&&!o,c=()=>i||l?u.jsx(Dj,{t:a}):u.jsx("p",{children:a("Update your preferences")});return u.jsxs("section",{children:[u.jsxs("div",{className:"gh-portal-list-detail",children:[u.jsx("h3",{children:a("Emails")}),c()]}),u.jsx("button",{className:"gh-portal-btn gh-portal-btn-list",onClick:()=>{e("switchPage",{page:s,lastPage:"accountHome"})},"data-test-button":"manage-newsletters",children:a("Manage")})]})}const Mj=(e,t)=>Ii({site:e})&&zi({site:e})||Po({site:e})||hg({member:t}),_j=e=>!Ii({site:e})&&zi({site:e})&&!Po({site:e}),Yj=()=>{const{member:e,onAction:t,site:a,t:n}=k.useContext(P),{name:i,email:r}=e,o=()=>{t("switchPage",{page:"accountProfile",lastPage:"accountHome"})},s=Mj(a,e),l=_j(a);return u.jsx("div",{children:u.jsxs("div",{className:"gh-portal-list",children:[u.jsxs("section",{children:[u.jsxs("div",{className:"gh-portal-list-detail",children:[u.jsx("h3",{children:i||n("Account")}),u.jsx("p",{children:r})]}),u.jsx("button",{"data-test-button":"edit-profile",className:"gh-portal-btn gh-portal-btn-list",onClick:c=>o(),children:n("Edit")})]}),u.jsx(zj,{}),s&&u.jsx(Fj,{}),l&&u.jsx(Ij,{})]})})},Rj=()=>u.jsxs("div",{className:"gh-portal-content gh-portal-account-main",children:[u.jsx(re,{}),u.jsx(Cj,{}),u.jsxs("section",{className:"gh-portal-account-data",children:[u.jsx($j,{}),u.jsx(Tj,{}),u.jsx(Yj,{})]})]});class df extends Y.Component{componentDidMount(){const{member:t,site:a}=this.context;Qt({site:a})||this.context.onAction("signout"),t||this.context.onAction("switchPage",{page:"signin",pageData:{redirect:window.location.href}})}handleSignout(t){t.preventDefault(),this.context.onAction("signout")}render(){const{member:t,site:a,t:n}=this.context,i=Di({site:a});return!t||!Qt({site:a})?null:u.jsxs("div",{className:"gh-portal-account-wrapper",children:[u.jsx(Rj,{}),u.jsx(Ej,{onClose:()=>this.context.onAction("closePopup"),handleSignout:r=>this.handleSignout(r),supportAddress:i,t:n})]})}}X(df,"contextType",P);class mf extends Y.Component{constructor(t,a){super(t,a);const{name:n="",email:i=""}=a.member||{};this.state={name:n,email:i}}componentDidMount(){const{member:t}=this.context;t||this.context.onAction("switchPage",{page:"signin"})}handleSignout(t){t.preventDefault(),this.context.onAction("signout")}onBack(){this.context.onAction("back")}onProfileSave(t){t.preventDefault(),this.setState(a=>({errors:Yi({fields:this.getInputFields({state:a}),t:this.context.t})}),()=>{const{email:a,name:n,errors:i}=this.state;i&&Object.values(i).filter(o=>!!o).length>0||(this.context.onAction("clearPopupNotification"),this.context.onAction("updateProfile",{email:a,name:n}))})}renderSaveButton(){const{t}=this.context,a=this.context.action==="updateProfile:running";let n=t("Save");this.context.action==="updateProfile:failed"&&(n=t("Retry"));const i=!!a;return u.jsx(ae,{dataTestId:"save-button",isRunning:a,onClick:r=>this.onProfileSave(r),disabled:i,brandColor:this.context.brandColor,label:n,style:{width:"100%"}})}renderDeleteAccountButton(){const{t}=this.context;return u.jsx("div",{style:{cursor:"pointer",color:"red"},role:"button",children:t("Delete account")})}renderAccountFooter(){return u.jsx("footer",{className:"gh-portal-action-footer",children:this.renderSaveButton()})}renderHeader(){const{t}=this.context;return u.jsxs("header",{className:"gh-portal-detail-header",children:[u.jsx(bn,{brandColor:this.context.brandColor,hidden:!this.context.lastPage,onClick:a=>this.onBack(a)}),u.jsx("h3",{className:"gh-portal-main-title",children:t("Account settings")})]})}renderUserAvatar(){const t=this.context.member&&this.context.member.avatar_image,a={position:"relative",display:"flex",width:"64px",height:"64px",marginBottom:"6px",borderRadius:"100%",boxShadow:"0 0 0 3px #fff",border:"1px solid gray",overflow:"hidden",justifyContent:"center",alignItems:"center"};return u.jsx("div",{style:a,children:u.jsx(Hu,{gravatar:t,style:{userIcon:{color:"black",width:"56px",height:"56px"}}})})}handleInputChange(t,a){const n=a.name;this.setState({[n]:t.target.value})}getInputFields({state:t,fieldNames:a}){const{t:n}=this.context,i=t.errors||{},r=[{type:"text",value:t.name,placeholder:n("Jamie Larson"),label:n("Name"),name:"name",required:!1,errorMessage:i.name||""},{type:"email",value:t.email,placeholder:n("jamie@example.com"),label:n("Email"),name:"email",required:!0,errorMessage:i.email||""}];return a&&a.length>0?r.filter(o=>a.includes(o.name)):r}onKeyDown(t){t.keyCode===13&&this.onProfileSave(t)}renderProfileData(){return u.jsx("div",{className:"gh-portal-section",children:u.jsx(Uo,{fields:this.getInputFields({state:this.state}),onChange:(t,a)=>this.handleInputChange(t,a),onKeyDown:(t,a)=>this.onKeyDown(t,a)})})}render(){const{member:t}=this.context;return t?u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"gh-portal-content with-footer",children:[u.jsx(re,{}),this.renderHeader(),u.jsx("div",{className:"gh-portal-section",children:this.renderProfileData()})]}),this.renderAccountFooter()]}):null}}X(mf,"contextType",P);function Uj(){const{brandColor:e,lastPage:t,onAction:a,t:n}=k.useContext(P);return u.jsxs("header",{className:"gh-portal-detail-header",children:[u.jsx(bn,{brandColor:e,hidden:!t,onClick:()=>{a("back")}}),u.jsx("h3",{className:"gh-portal-main-title",children:n("Email preferences")})]})}function Lj({newsletter:e,subscribedNewsletters:t,setSubscribedNewsletters:a}){const n=t.some(i=>i.id===(e==null?void 0:e.id));return u.jsxs("section",{className:"gh-portal-list-toggle-wrapper","data-testid":"toggle-wrapper",children:[u.jsxs("div",{className:"gh-portal-list-detail",children:[u.jsx("h3",{children:e.name}),u.jsx("p",{children:e==null?void 0:e.description})]}),u.jsx("div",{style:{display:"flex",alignItems:"center"},children:u.jsx(_o,{id:e.id,onToggle:(i,r)=>{let o=[];r?o=t.filter(s=>s.id!==e.id).concat(e):o=t.filter(s=>s.id!==e.id),a(o)},checked:n,dataTestId:"switch-input"})})]})}function Bj({updateCommentNotifications:e,isCommentsEnabled:t,enableCommentNotifications:a}){const{t:n,onAction:i}=k.useContext(P),r=!!a;if(!t)return null;const o=async(s,l)=>{await e(l),i("showPopupNotification",{action:"updated:success",message:n("Comment preferences updated.")})};return u.jsxs("section",{className:"gh-portal-list-toggle-wrapper","data-testid":"toggle-wrapper",children:[u.jsxs("div",{className:"gh-portal-list-detail",children:[u.jsx("h3",{children:n("Comments")}),u.jsx("p",{children:n("Get notified when someone replies to your comment")})]}),u.jsx("div",{style:{display:"flex",alignItems:"center"},children:u.jsx(_o,{id:"comments",onToggle:o,checked:r,dataTestId:"switch-input"})})]})}function Oj({subscribedNewsletters:e,setSubscribedNewsletters:t,hasNewslettersEnabled:a}){const{site:n}=k.useContext(P),i=va({site:n});return a?i.map(r=>u.jsx(Lj,{newsletter:r,subscribedNewsletters:e,setSubscribedNewsletters:t},r==null?void 0:r.id)):null}function Vj({site:e,isPaid:t}){const{t:a}=k.useContext(P);return t?u.jsx("p",{style:{textAlign:"center",marginTop:"12px",marginBottom:"0",color:"var(--grey6)"},children:a("Unsubscribing from emails will not cancel your paid subscription to {title}",{title:e==null?void 0:e.title})}):null}function pf({hasNewslettersEnabled:e,notification:t,subscribedNewsletters:a,updateSubscribedNewsletters:n,updateCommentNotifications:i,unsubscribeAll:r,isPaidMember:o,isCommentsEnabled:s,enableCommentNotifications:l}){const{brandColor:c,onAction:d,member:p,site:m,t:h}=k.useContext(P),b=!(a!=null&&a.length)&&(s&&!l||!s),f=t||(()=>null);return u.jsxs("div",{className:"gh-portal-content with-footer",children:[u.jsx(re,{}),u.jsx(Uj,{}),u.jsx(f,{}),u.jsx("div",{className:"gh-portal-section flex",children:u.jsxs("div",{className:"gh-portal-list",children:[u.jsx(Oj,{hasNewslettersEnabled:e,subscribedNewsletters:a,setSubscribedNewsletters:g=>{let y=g.map(w=>({id:w.id}));n(y)}}),u.jsx(Bj,{isCommentsEnabled:s,enableCommentNotifications:l,updateCommentNotifications:i})]})}),u.jsx("div",{className:"gh-portal-btn-product gh-portal-btn-unsubscribe",style:{marginTop:"-48px",marginBottom:0},children:u.jsx(ae,{isRunning:!1,onClick:()=>{r()},disabled:b,brandColor:c,isPrimary:!1,label:h("Unsubscribe from all emails"),isDestructive:!0,style:{width:"100%",zIndex:900},dataTestId:"unsubscribe-from-all-emails"})}),u.jsxs("footer",{className:"gh-portal-action-footer"+(Qu({member:p})?" gh-feature-suppressions":""),children:[u.jsx("div",{style:{width:"100%"},children:u.jsx(Vj,{isPaid:o,site:m,subscribedNewsletters:a})}),Qu({member:p})&&!b&&u.jsxs("div",{className:"gh-portal-footer-secondary",children:[u.jsx("span",{className:"gh-portal-footer-secondary-light",children:h("Not receiving emails?")}),u.jsxs("button",{className:"gh-portal-btn-text gh-email-faq-page-button",onClick:()=>d("switchPage",{page:"emailReceivingFAQ",pageData:{direct:!1}}),children:[h("Get help")," ",u.jsx("span",{className:"right-arrow",children:"→"})]})]})]})]})}function Hj(){const{member:e,onAction:t,site:a,t:n,pageData:i}=k.useContext(P);let r,o;i&&(r=i.newsletterUuid,o=i.action);const[s,l]=k.useState(!0),c=va({site:a}),d=zi({site:a});k.useEffect(()=>{e||t("switchPage",{page:"signin"})},[e,t]),k.useEffect(()=>{if(r&&o==="unsubscribe"){const g=e==null?void 0:e.newsletters.filter(y=>y.uuid!==r);b(g),l(!1),t("updateNewsletterPreference",{newsletters:g})}},[]);const p=()=>{if(i.comments&&v){const w=s?"gh-portal-hide":"";return u.jsx(u.Fragment,{children:u.jsx("p",{className:`gh-portal-text-center gh-portal-header-message ${w}`,children:u.jsx(je,{string:n("{memberEmail} will no longer receive emails when someone replies to your comments."),mapping:{memberEmail:u.jsx("strong",{children:e==null?void 0:e.email})}})})})}const g=c==null?void 0:c.find(w=>w.uuid===i.newsletterUuid);if(!g)return null;const y=s?"gh-portal-hide":"";return u.jsx(u.Fragment,{children:u.jsx("p",{className:`gh-portal-text-center gh-portal-header-message ${y}`,children:u.jsx(je,{string:n("{memberEmail} will no longer receive {newsletterName} newsletter."),mapping:{memberEmail:u.jsx("strong",{children:e==null?void 0:e.email}),newsletterName:u.jsx("strong",{children:g==null?void 0:g.name})}})})})},m=[...(e==null?void 0:e.newsletters)||[]],[h,b]=k.useState(m),{comments_enabled:v}=a,{enable_comment_notifications:f}=e||{};return k.useEffect(()=>{b((e==null?void 0:e.newsletters)||[])},[e==null?void 0:e.newsletters]),u.jsx(pf,{hasNewslettersEnabled:d,notification:r?p:null,subscribedNewsletters:h,updateSubscribedNewsletters:g=>{b(g),t("updateNewsletterPreference",{newsletters:g}),t("showPopupNotification",{action:"updated:success",message:n("Email preferences updated.")})},updateCommentNotifications:async g=>{t("updateNewsletterPreference",{enableCommentNotifications:g})},unsubscribeAll:()=>{b([]),t("showPopupNotification",{action:"updated:success",message:n("Unsubscribed from all emails.")});const g={newsletters:[]};v&&(g.enableCommentNotifications=!1),t("updateNewsletterPreference",g)},isPaidMember:ut({member:e}),isCommentsEnabled:v!=="off",enableCommentNotifications:f})}function Wj(){const{site:e}=k.useContext(P),t=e.icon;return t?u.jsx("img",{className:"gh-portal-unsubscribe-logo",src:t,alt:e.title}):null}function Kj(){const{site:e}=k.useContext(P),t=e.title||"";return u.jsxs("header",{className:"gh-portal-header",children:[u.jsx(Wj,{}),u.jsx("h2",{className:"gh-portal-publication-title",children:t})]})}async function hf({api:e,memberUuid:t,key:a,newsletters:n,enableCommentNotifications:i}){try{return await e.member.updateNewsletters({uuid:t,key:a,newsletters:n,enableCommentNotifications:i})}catch{}}function Gj(){const{site:e,api:t,pageData:a,member:n,onAction:i,t:r}=k.useContext(P),[o,s]=k.useState(),[l,c]=k.useState(!0),d=va({site:e}),p=d.filter(E=>E.subscribe_on_signup),[m,h]=k.useState(!1),[b,v]=k.useState(p),[f,g]=k.useState(!1),{comments_enabled:y}=e,{enable_comment_notifications:w=!1}=o||{},S=zi({site:e}),j=async E=>{n?i("updateNewsletterPreference",{newsletters:E}):await hf({api:t,memberUuid:a.uuid,key:a.key,newsletters:E}),v(E);const M={action:"updated:success",message:r("Email preferences updated.")};i("showPopupNotification",M)},x=async E=>{let M;n?(await i("updateNewsletterPreference",{enableCommentNotifications:E}),M={...n,enable_comment_notifications:E}):M=await hf({api:t,memberUuid:a.uuid,key:a.key,enableCommentNotifications:E}),s(M),i("showPopupNotification",{action:"updated:success",message:r("Comment preferences updated.")})},C=async()=>{let E;n?(await i("updateNewsletterPreference",{newsletters:[],enableCommentNotifications:!1}),E={...n},E.newsletters=[],E.enable_comment_notifications=!1):E=await t.member.updateNewsletters({uuid:a.uuid,key:a.key,newsletters:[],enableCommentNotifications:!1}),v([]),s(E),i("showPopupNotification",{action:"updated:success",message:r("Unsubscribed from all emails.")})};if(k.useEffect(()=>{(async()=>{let E;try{E=await t.member.newsletters({uuid:a.uuid,key:a.key}),s(E??null),c(!1)}catch(K){console.error("[PORTAL] Error fetching member newsletters",K),s(null),c(!1);return}if(E===null)return;const M=(E==null?void 0:E.newsletters)||[];v(M),(d==null?void 0:d.length)===1&&!y&&!a.newsletterUuid?await j([]):a.newsletterUuid?await j(M==null?void 0:M.filter(K=>K.uuid!==a.newsletterUuid)):a.comments&&y&&await x(!1)})()},[y,a.uuid,a.newsletterUuid,a.comments,e.url,d==null?void 0:d.length]),l)return u.jsx(Ui,{});if(!o)return u.jsxs("div",{className:"gh-portal-content gh-portal-feedback with-footer",children:[u.jsx(re,{}),u.jsx("div",{className:"gh-feedback-icon gh-feedback-icon-error",children:u.jsx(ac,{})}),u.jsx("h1",{className:"gh-portal-main-title",children:r("That didn't go to plan")}),u.jsx("div",{children:u.jsx("p",{className:"gh-portal-text-center",children:r("We couldn't unsubscribe you as the email address was not found. Please contact the site owner.")})}),u.jsx(ae,{style:{width:"100%"},retry:!1,onClick:()=>i("closePopup"),disabled:!1,brandColor:"#000000",label:r("Close"),isRunning:!1,tabindex:"3",classes:"sticky bottom"})]});if((d==null?void 0:d.length)===1&&!y&&!f)return u.jsxs("div",{className:"gh-portal-content gh-portal-unsubscribe with-footer",children:[u.jsx(re,{}),u.jsx(Kj,{}),u.jsx("h1",{className:"gh-portal-main-title",children:r("Successfully unsubscribed")}),u.jsxs("div",{children:[u.jsx("p",{className:"gh-portal-text-center",children:u.jsx(je,{string:r("{memberEmail} will no longer receive this newsletter."),mapping:{memberEmail:u.jsx("strong",{children:o==null?void 0:o.email})}})}),u.jsx("p",{className:"gh-portal-text-center",children:u.jsx(je,{string:r("Didn't mean to do this? Manage your preferences <button>here</button>."),mapping:{button:u.jsx("button",{className:"gh-portal-btn-link gh-portal-btn-branded gh-portal-btn-inline",onClick:()=>{g(!0)}})}})})]})]});const z=()=>{if(a.comments&&y){const K=m?"gh-portal-hide":"";return u.jsx(u.Fragment,{children:u.jsx("p",{className:`gh-portal-text-center gh-portal-header-message ${K}`,children:u.jsx(je,{string:r("{memberEmail} will no longer receive emails when someone replies to your comments."),mapping:{memberEmail:u.jsx("strong",{children:o==null?void 0:o.email})}})})})}const E=d==null?void 0:d.find(K=>K.uuid===a.newsletterUuid);if(!E)return null;const M=m?"gh-portal-hide":"";return u.jsx(u.Fragment,{children:u.jsx("p",{className:`gh-portal-text-center gh-portal-header-message ${M}`,children:u.jsx(je,{string:r("{memberEmail} will no longer receive {newsletterName} newsletter."),mapping:{memberEmail:u.jsx("strong",{children:o==null?void 0:o.email}),newsletterName:u.jsx("strong",{children:E==null?void 0:E.name})}})})})};return u.jsx(pf,{hasNewslettersEnabled:S,notification:z,subscribedNewsletters:b,updateSubscribedNewsletters:async E=>{await j(E),h(!0)},updateCommentNotifications:x,unsubscribeAll:async()=>{await C(),h(!0)},isPaidMember:(o==null?void 0:o.status)!=="free",isCommentsEnabled:y!=="off",enableCommentNotifications:w})}function qj(){const{brandColor:e,lastPage:t,onAction:a,action:n,site:i,t:r}=k.useContext(P);k.useEffect(()=>{["removeEmailFromSuppressionList:success"].includes(n)&&a("refreshMemberData"),["removeEmailFromSuppressionList:failed","refreshMemberData:failed"].includes(n)&&a("back"),["refreshMemberData:success"].includes(n)&&(Ii({site:i})||Po({site:i})?(a("switchPage",{page:"accountEmail",lastPage:"accountHome"}),a("showPopupNotification",{message:r("You have been successfully resubscribed")})):a("back"))},[n,a,i,r]);const o=["removeEmailFromSuppressionList:running","refreshMemberData:running"].includes(n),s=()=>{a("removeEmailFromSuppressionList")};return u.jsxs("div",{className:"gh-email-suppressed-page",children:[u.jsxs("header",{className:"gh-portal-detail-header",children:[u.jsx(bn,{brandColor:e,hidden:!t,onClick:()=>{a("back")}}),u.jsx(re,{})]}),u.jsx(cf,{className:"gh-email-suppressed-page-icon"}),u.jsxs("div",{className:"gh-email-suppressed-page-text",children:[u.jsx("h3",{className:"gh-portal-main-title gh-email-suppressed-page-title",children:r("Emails disabled")}),u.jsx("p",{children:r("You're not receiving emails because you either marked a recent message as spam, or because messages could not be delivered to your provided email address.")})]}),u.jsx(ae,{dataTestId:"resubscribe-email",classes:"gh-portal-confirm-button",onClick:s,disabled:o,brandColor:e,label:r("Re-enable emails"),isRunning:o})]})}function Jj(){const{brandColor:e,onAction:t,site:a,t:n,pageData:i}=k.useContext(P),r=`mailto:${Di({site:a})}`,o=i&&i.direct||!1;return u.jsxs("div",{className:"gh-email-suppression-faq",children:[!o&&u.jsxs("header",{className:"gh-portal-detail-header",children:[u.jsx(bn,{brandColor:e,onClick:()=>{t("switchPage",{page:"emailSuppressed",lastPage:"accountHome"})}}),u.jsx(re,{})]}),u.jsxs("div",{className:"gh-longform",children:[u.jsx("h3",{children:n("Why has my email been disabled?")}),u.jsx("p",{children:n("Newsletters can be disabled on your account for two reasons: A previous email was marked as spam, or attempting to send an email resulted in a permanent failure (bounce).")}),u.jsx("h4",{children:n("Spam complaints")}),u.jsx("p",{children:n("If a newsletter is flagged as spam, emails are automatically disabled for that address to make sure you no longer receive any unwanted messages.")}),u.jsx("p",{children:n("If the spam complaint was accidental, or you would like to begin receiving emails again, you can resubscribe to emails by clicking the button on the previous screen.")}),u.jsx("p",{children:n("Once resubscribed, if you still don't see emails in your inbox, check your spam folder. Some inbox providers keep a record of previous spam complaints and will continue to flag emails. If this happens, mark the latest newsletter as 'Not spam' to move it back to your primary inbox.")}),u.jsx("h4",{children:n("Permanent failure (bounce)")}),u.jsx("p",{children:n("When an inbox fails to accept an email it is commonly called a bounce. In many cases, this can be temporary. However, in some cases, a bounced email can be returned as a permanent failure when an email address is invalid or non-existent.")}),u.jsx("p",{children:n("In the event a permanent failure is received when attempting to send a newsletter, emails will be disabled on the account.")}),u.jsx("p",{children:n("If you would like to start receiving emails again, the best next steps are to check your email address on file for any issues and then click resubscribe on the previous screen.")}),u.jsx("p",{children:u.jsx("a",{className:"gh-portal-btn gh-portal-btn-branded no-margin-right",href:r,onClick:()=>{r&&window.open(r)},children:n("Need more help? Contact support")})})]})]})}function Zj(){const{brandColor:e,onAction:t,site:a,lastPage:n,member:i,t:r,pageData:o}=k.useContext(P),s=Di({site:a}),l=`mailto:${s}`,c=zE({site:a}),d=o&&o.direct||!1;return u.jsxs("div",{className:"gh-email-receiving-faq",children:[u.jsxs("header",{className:"gh-portal-detail-header",children:[!d&&u.jsx(bn,{brandColor:e,onClick:()=>{n?t("switchPage",{page:"accountHome"}):t("switchPage",{page:"accountEmail",lastPage:"accountHome"})}}),u.jsx(re,{})]}),u.jsxs("div",{className:"gh-longform",children:[u.jsx("h3",{children:r("Help! I'm not receiving emails")}),u.jsx("p",{children:r("If you're not receiving the email newsletter you've subscribed to, here are a few things to check.")}),u.jsx("h4",{children:r("Verify your email address is correct")}),u.jsx("p",{children:u.jsx(je,{string:r("The email address we have for you is {memberEmail} — if that's not correct, you can update it in your <button>account settings area</button>."),mapping:{memberEmail:u.jsx("strong",{children:i.email}),button:u.jsx("button",{className:"gh-portal-btn-text",onClick:()=>t("switchPage",{lastPage:"emailReceivingFAQ",page:"accountProfile"})})}})}),u.jsx("h4",{children:r("Check spam & promotions folders")}),u.jsx("p",{children:r(`Make sure emails aren't accidentally ending up in the Spam or Promotions folders of your inbox. If they are, click on "Mark as not spam" and/or "Move to inbox".`)}),u.jsx("h4",{children:r("Create a new contact")}),u.jsx("p",{children:u.jsx(je,{string:r("In your email client add {senderEmail} to your contacts list. This signals to your mail provider that emails sent from this address should be trusted."),mapping:{senderEmail:u.jsx("strong",{children:c})}})}),u.jsx("h4",{children:r("Send an email and say hi!")}),u.jsx("p",{children:u.jsx(je,{string:r("Send an email to {senderEmail} and say hello. This can also help signal to your mail provider that emails to and from this address should be trusted."),mapping:{senderEmail:u.jsx("strong",{children:c})}})}),u.jsx("h4",{children:r("Check with your mail provider")}),u.jsx("p",{children:u.jsx(je,{string:r("If you have a corporate or government email account, reach out to your IT department and ask them to allow emails to be received from {senderEmail}"),mapping:{senderEmail:u.jsx("strong",{children:c})}})}),u.jsx("h4",{children:r("Get in touch for help")}),u.jsx("p",{children:u.jsx(je,{string:r("If you've completed all these checks and you're still not receiving emails, you can reach out to get support by contacting {supportAddress}."),mapping:{supportAddress:u.jsx("a",{href:l,onClick:()=>{l&&window.open(l)},children:s})}})})]})]})}const pc={signin:uf,signup:ef,accountHome:df,accountPlan:qg,accountProfile:mf,accountEmail:Hj,signupNewsletter:dc,unsubscribe:Gj,magiclink:tf,loading:Ui,offer:nf,feedback:rj,emailSuppressed:qj,emailSuppressionFAQ:Jj,emailReceivingFAQ:Zj,support:()=>{const[e,t]=k.useState(!0),[a,n]=k.useState(null),[i,r]=k.useState(null),{member:o,t:s,site:l}=k.useContext(P);return k.useEffect(()=>{async function c(){const d=l.url,p=window.location.origin+window.location.pathname,m=o?`${p}?action=support&success=true`:`${p}#/portal/support/success`,h=p,b=Bo({siteUrl:d});try{const v=await b.member.checkoutDonation({successUrl:m,cancelUrl:h,personalNote:s("Add a personal note")});v.url&&window.location.replace(v.url)}catch(v){v.type&&v.type==="DisabledFeatureError"?r(s("This site is not accepting payments at the moment.")):n(s("Something went wrong, please try again later.")),t(!1)}}l&&l.donations_enabled===!1?(r(s("This site is not accepting donations at the moment.")),t(!1)):c()},[]),e?u.jsx("div",{children:u.jsx(Ui,{})}):a?u.jsx(mc,{error:a}):i?u.jsx(mc,{error:i}):null},supportSuccess:dj,supportError:mc,recommendations:kj},hc=function({page:e}){return Object.keys(pc).includes(e)?e:"signup"},Qj=function({page:e}){return e.includes("account")},Xj=function({page:e}){return e.includes("offer")},e$=e=>k.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},k.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12C0 5.37258 5.37258 0 12 0C18.6274 0 24 5.37258 24 12ZM11.8326 2.33879C6.37785 2.95189 3.95901 5.20797 3.41126 9.74699C3.34896 10.2632 3.22642 10.7805 3.10443 11.2954C2.93277 12.02 2.76221 12.74 2.76221 13.4458C2.76221 17.9885 6.5856 21.556 11.1283 21.556C12.8959 21.556 14.4433 20.8144 15.8756 20.048C19.0536 18.3478 22.0328 16.2597 22.0328 12.5411C22.0328 9.91512 20.1051 7.56932 18.466 5.5747C18.3834 5.47416 18.3015 5.37451 18.2206 5.27577C17.3866 4.25742 14.4333 2.04643 11.8326 2.33879Z",fill:"#15171A"}));class gc extends Y.Component{render(){return u.jsxs("a",{href:"https://ghost.org",target:"_blank",rel:"noopener noreferrer",onClick:()=>{window.open("https://ghost.org","_blank")},children:[u.jsx(e$,{}),"Powered by Ghost"]})}}X(gc,"contextType",P);const gf=()=>({modalContainer:{zIndex:"3999999",position:"fixed",left:"0",top:"0",width:"100%",height:"100%",overflow:"hidden"},frame:{common:{margin:"auto",position:"relative",padding:"0",outline:"0",width:"100%",opacity:"1",overflow:"hidden",height:"100%"}},page:{links:{width:"600px"}}});function t$({message:e}){return mn()?u.jsx("div",{className:"gh-portal-cookiebanner",children:e}):null}class ff extends Y.Component{componentDidMount(){this.node&&!J(["preview"])&&!this.props.isMobile&&(this.node.focus(),this.keyUphandler=t=>{t.key==="Escape"&&this.dismissPopup(t)},this.node.ownerDocument.removeEventListener("keyup",this.keyUphandler),this.node.ownerDocument.addEventListener("keyup",this.keyUphandler)),this.sendContainerHeightChangeEvent()}dismissPopup(t){var i;const a=t.target&&t.target.tagName;(a!=="INPUT"||a==="INPUT"&&!((i=t==null?void 0:t.target)!=null&&i.value))&&this.context.onAction("closePopup")}sendContainerHeightChangeEvent(){var t,a;this.node&&J(["preview"])&&((t=this.node)==null?void 0:t.clientHeight)!==this.lastContainerHeight&&(this.lastContainerHeight=(a=this.node)==null?void 0:a.clientHeight,window.document.body.style.overflow="hidden",window.document.body.style["scrollbar-width"]="none",window.parent.postMessage({type:"portal-preview-updated",payload:{height:this.lastContainerHeight}},"*"))}componentDidUpdate(){this.sendContainerHeightChangeEvent()}componentWillUnmount(){this.node&&this.node.ownerDocument.removeEventListener("keyup",this.keyUphandler)}handlePopupClose(t){J(["preview"])||t.target===t.currentTarget&&this.context.onAction("closePopup")}renderActivePage(){const{page:t}=this.context;hc({page:t});const a=pc[t];return u.jsx(a,{})}renderPopupNotification(){const{popupNotification:t}=this.context;return!t||!t.type?null:u.jsx(af,{})}sendPortalPreviewReadyEvent(){window.self!==window.parent&&window.parent.postMessage({type:"portal-preview-ready",payload:{}},"*")}render(){const{page:t,pageQuery:a,site:n,customSiteUrl:i}=this.context,o=Ao({site:n,pageQuery:a}).length;hc({page:t});const l={...gf().page[t]};let c="",d="regular",p="",m=t;switch(t){case"signup":p="Cookies must be enabled in your browser to sign up.";break;case"signin":p="Cookies must be enabled in your browser to sign in.";break;case"accountHome":m="account-home";break;case"accountProfile":m="account-profile";break;case"accountPlan":m="account-plan";break;default:p="Cookies must be enabled in your browser.",m=t;break}o>1&&!ct({site:n})&&jt({site:n,pageQuery:a})&&t==="signup"&&(m+=" full-size",d="full");const h=Ai({site:n});(h&&o>2||!h&&o>1)&&t==="accountPlan"&&(m+=" full-size",d="full"),(t==="emailSuppressionFAQ"||t==="emailReceivingFAQ")&&(m+=" large-size");let b="gh-portal-popup-container";J(["preview"])&&(m+=" preview"),J(["preview"],{customSiteUrl:i})&&!n.disableBackground&&(b+=" preview"),J(["dev"])&&(b+=" dev");const v=`${b} ${c} ${m}`;return this.sendPortalPreviewReadyEvent(),u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"gh-portal-popup-wrapper "+m,onClick:f=>this.handlePopupClose(f),children:[this.renderPopupNotification(),u.jsxs("div",{className:v,style:l,ref:f=>this.node=f,tabIndex:-1,children:[u.jsx(t$,{message:p}),this.renderActivePage(),d==="full"?u.jsx("div",{className:"gh-portal-powered inside "+(J(["preview"])?"hidden ":"")+m,children:u.jsx(gc,{})}):""]})]}),u.jsx("div",{className:"gh-portal-powered outside "+(J(["preview"])?"hidden ":"")+m,children:u.jsx(gc,{})})]})}}X(ff,"contextType",P);class bf extends Y.Component{constructor(t){super(t),this.state={height:null}}renderCurrentPage(t){const a=pc[t];return u.jsx(a,{})}onHeightChange(t){this.setState({height:t})}handlePopupClose(t){t.preventDefault(),t.target===t.currentTarget&&this.context.onAction("closePopup")}renderFrameStyles(){const{site:t}=this.context,a=xj({site:t}),n=`
|
|
3419
|
+
`;function xj({site:e}){return Wu+vj+ZE+PC+_C+fC()+JE+WE+qE+ug+KC+HC+ZC()+Eg+GC+wj+Sj+XC+oj+sj+lj+cj+pj+fj}class uf extends Y.Component{constructor(t){super(t),this.state={email:"",token:void 0}}componentDidMount(){const{member:t}=this.context;t&&this.context.onAction("switchPage",{page:"accountHome"})}handleSignin(t){t.preventDefault(),this.doSignin()}doSignin(){this.setState(t=>({errors:Yi({fields:this.getInputFields({state:t}),t:this.context.t})}),async()=>{const{email:t,phonenumber:a,errors:n,token:i}=this.state,{redirect:r}=this.context.pageData??{};n&&Object.values(n).filter(s=>!!s).length>0||this.context.onAction("signin",{email:t,phonenumber:a,redirect:r,token:i})})}handleInputChange(t,a){const n=a.name;this.setState({[n]:t.target.value})}onKeyDown(t){t.keyCode===13&&this.handleSignin(t)}getInputFields({state:t}){const{t:a}=this.context,n=t.errors||{};return[{type:"email",value:t.email,placeholder:"jamie@example.com",label:a("Email"),name:"email",required:!0,errorMessage:n.email||"",autoFocus:!0},{type:"text",value:t.phonenumber,placeholder:"+1 (123) 456-7890",label:"Phone number",name:"phonenumber",required:!1,tabindex:-1,autocomplete:"off",hidden:!0}]}renderSubmitButton(){const{action:t,t:a}=this.context;let n=!1;const i=t==="signin:running";let r=a(i?"Sending login link...":"Continue");const o=!!i;return t==="signin:failed"&&(r=a("Retry"),n=!0),u.jsx(ae,{dataTestId:"signin",retry:n,style:{width:"100%"},onClick:s=>this.handleSignin(s),disabled:o,brandColor:this.context.brandColor,label:r,isRunning:i})}renderSignupMessage(){const{brandColor:t,t:a}=this.context;return u.jsxs("div",{className:"gh-portal-signup-message",children:[u.jsx("div",{children:a("Don't have an account?")}),u.jsx("button",{"data-test-button":"signup-switch",className:"gh-portal-btn gh-portal-btn-link",style:{color:t},onClick:()=>this.context.onAction("switchPage",{page:"signup"}),children:u.jsx("span",{children:a("Sign up")})})]})}renderForm(){const{site:t,t:a}=this.context,n=$o({site:t})&&jt({site:t});return Qt({site:t})?u.jsxs("section",{children:[u.jsx("div",{className:"gh-portal-section",children:u.jsx(Uo,{fields:this.getInputFields({state:this.state}),onChange:(i,r)=>this.handleInputChange(i,r),onKeyDown:(i,r)=>this.onKeyDown(i,r)})}),u.jsxs("footer",{className:"gh-portal-signin-footer",children:[this.renderSubmitButton(),n&&this.renderSignupMessage()]})]}):u.jsx("section",{children:u.jsx("div",{className:"gh-portal-section",children:u.jsx("p",{className:"gh-portal-members-disabled-notification","data-testid":"members-disabled-notification-text",children:a("Memberships unavailable, contact the owner for access.")})})})}renderSiteIcon(){const{site:t}=this.context,a=t.icon;return a?u.jsx("img",{className:"gh-portal-signup-logo",src:a,alt:this.context.site.title}):Qt({site:t})?null:u.jsx(Qg,{className:"gh-portal-icon gh-portal-icon-invitation"})}renderSiteTitle(){const{site:t,t:a}=this.context,n=t.title;return Qt({site:t})?u.jsx("h1",{className:"gh-portal-main-title",children:a("Sign in")}):u.jsx("h1",{className:"gh-portal-main-title",children:n})}renderFormHeader(){return u.jsxs("header",{className:"gh-portal-signin-header",children:[this.renderSiteIcon(),this.renderSiteTitle()]})}render(){return u.jsxs(u.Fragment,{children:[u.jsx(re,{}),u.jsx("div",{className:"gh-portal-logged-out-form-container",children:u.jsxs("div",{className:"gh-portal-content signin",children:[this.renderFormHeader(),this.renderForm()]})})]})}}X(uf,"contextType",P);const Ej=({handleSignout:e,supportAddress:t="",t:a})=>{const n=`mailto:${t}`;return u.jsxs("footer",{className:"gh-portal-account-footer",children:[u.jsx("ul",{className:"gh-portal-account-footermenu",children:u.jsx("li",{children:u.jsx("button",{"data-test-button":"footer-signout",className:"gh-portal-btn",name:"logout","aria-label":"logout",onClick:i=>e(i),children:a("Sign out")})})}),u.jsx("div",{className:"gh-portal-account-footerright",children:u.jsx("ul",{className:"gh-portal-account-footermenu",children:u.jsx("li",{children:u.jsx("a",{"data-test-link":"footer-support",className:"gh-portal-btn gh-portal-btn-branded",href:n,onClick:()=>{n&&window.open(n)},children:a("Contact support")})})})})]})},Cj=()=>{const{member:e,brandColor:t,t:a}=k.useContext(P),n=e.avatar_image;return u.jsxs("header",{className:"gh-portal-account-header",children:[u.jsx(Hu,{gravatar:n,style:{userIcon:{color:t,width:"56px",height:"56px",padding:"2px"}}}),u.jsx("h2",{className:"gh-portal-main-title",children:a("Your account")})]})},jj=()=>{const{site:e,action:t,brandColor:a,onAction:n,t:i}=k.useContext(P);if(!$o({site:e})||!jt({site:e}))return null;const r=["checkoutPlan:running"].includes(t),o=()=>{n("switchPage",{page:"accountPlan",lastPage:"accountHome"})};return u.jsx(ae,{dataTestId:"view-plans",isRunning:r,label:i("View plans"),onClick:()=>o(),brandColor:a,style:{width:"100%"}})},$j=()=>{const{member:e,site:t,t:a}=k.useContext(P),{is_stripe_configured:n}=t;if(!n||pn({site:t}))return null;const i=Me({member:e}),r=Zt({member:e});if(r&&!i)return null;if(i){const o=i==null?void 0:i.current_period_end;if(r&&Gu({member:e})){const s=Gu({member:e}),l=Ct(s);return u.jsx("div",{className:"gh-portal-section",children:u.jsx("p",{className:"gh-portal-text-center gh-portal-free-ctatext",children:a("Your subscription will expire on {expiryDate}",{expiryDate:l})})})}if(i!=null&&i.cancel_at_period_end||r)return null;if(Zu({sub:i})){const s=Ct(i.trial_end_at);return u.jsx("div",{className:"gh-portal-section",children:u.jsx("p",{className:"gh-portal-text-center gh-portal-free-ctatext",children:a("Your subscription will start on {subscriptionStart}",{subscriptionStart:s})})})}return u.jsx("div",{className:"gh-portal-section",children:u.jsx("p",{className:"gh-portal-text-center gh-portal-free-ctatext",children:a("Your subscription will renew on {renewalDate}",{renewalDate:Ct(o)})})})}return u.jsxs("div",{className:"gh-portal-section",children:[u.jsx("p",{className:"gh-portal-text-center gh-portal-free-ctatext",children:a("You currently have a free membership, upgrade to a paid subscription for full access.")}),u.jsx(jj,{})]})},Tj=()=>{const{member:e,onAction:t,action:a,brandColor:n,t:i}=k.useContext(P),r=Me({member:e});if(!r||!r.cancel_at_period_end)return null;const o=r.cancel_at_period_end?i("Continue subscription"):i("Cancel subscription"),s=["cancelSubscription:running"].includes(a),l=!!s,c=!!r.cancel_at_period_end,d=()=>{if(!r.cancel_at_period_end)return null;const p=r.current_period_end;return u.jsx("p",{className:"gh-portal-text-center gh-portal-free-ctatext",children:i("Your subscription will expire on {expiryDate}",{expiryDate:Ct(p)})})};return u.jsxs("div",{className:"gh-portal-cancelcontinue-container",children:[u.jsx(d,{}),u.jsx(ae,{onClick:()=>{t("continueSubscription",{subscriptionId:r.id})},isRunning:s,disabled:l,isPrimary:c,brandColor:n,label:o,style:{width:"100%"}})]})},Pj=e=>k.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},k.createElement("defs",null,k.createElement("style",null,".a{fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.5px;}")),k.createElement("path",{d:"M22.939 2.56V8.817C22.9391 9.61244 22.6232 10.3754 22.061 10.938L10.5 22.5C10.2187 22.7812 9.83721 22.9392 9.43946 22.9392C9.04172 22.9392 8.66026 22.7812 8.37896 22.5L1.49997 15.62C1.21876 15.3387 1.06079 14.9572 1.06079 14.5595C1.06079 14.1618 1.21876 13.7803 1.49997 13.499L13.061 1.938C13.6236 1.37572 14.3865 1.0599 15.182 1.06H21.439C21.8368 1.06 22.2183 1.21803 22.4996 1.49934C22.7809 1.78064 22.939 2.16217 22.939 2.56V2.56Z",className:"a"}),k.createElement("path",{d:"M17.689 7.81C16.8605 7.81 16.189 7.13842 16.189 6.31C16.189 5.48157 16.8605 4.81 17.689 4.81C18.5174 4.81 19.189 5.48157 19.189 6.31C19.189 7.13842 18.5174 7.81 17.689 7.81Z",className:"a"})),zj=()=>{const{member:e,site:t,onAction:a,t:n}=k.useContext(P),i=()=>{const b=Me({member:e});a("editBilling",{subscriptionId:b.id})},r=()=>{const{is_stripe_configured:b}=t;b&&a("switchPage",{page:"accountPlan",lastPage:"accountHome"})},o=({price:b,isComplimentary:v,subscription:f})=>{const{offer:h,start_date:y}=f||{};let w="";if(b){const{amount:E=0,currency:M,interval:K}=b;w=`${Intl.NumberFormat("en",{currency:M,style:"currency"}).format(E/100)}/${n(K)}`}let S=Aj({price:b,offer:h,subscriptionStartDate:y,t:n});const j=Gu({member:e});v&&(j?w=`${n("Complimentary")} - ${n("Expires {expiryDate}",{expiryDate:j})}`:w=w?`${n("Complimentary")} (${w})`:n("Complimentary"));let x="";S&&(x="gh-portal-account-old-price");const C=()=>S?u.jsxs("p",{className:"gh-portal-account-discountcontainer",children:[u.jsx(Pj,{className:"gh-portal-account-tagicon"}),u.jsx("span",{children:S})]}):null,z=Zu({sub:f});return z&&(x="gh-portal-account-old-price"),z?u.jsxs(u.Fragment,{children:[u.jsx("p",{className:x,children:w}),u.jsx(Nj,{subscription:f,t:n})]}):u.jsxs(u.Fragment,{children:[u.jsx("p",{className:x,children:w}),u.jsx(C,{})]})},s=({isComplimentary:b,isPaid:v})=>(Ni({member:e})?!1:b)||pn({site:t})&&!v?null:u.jsx("button",{className:"gh-portal-btn gh-portal-btn-list",onClick:h=>r(),"data-test-button":"change-plan",children:n("Change")}),l=({defaultCardLast4:b})=>{if(b){const v=`**** **** **** ${b}`;return u.jsx("p",{children:v})}return null},c=({defaultCardLast4:b,isComplimentary:v})=>{const{action:f}=k.useContext(P),h=f==="editBilling:running"?u.jsx(fn,{className:"gh-portal-billing-button-loader"}):n("Update");return v?null:u.jsxs("section",{children:[u.jsxs("div",{className:"gh-portal-list-detail",children:[u.jsx("h3",{children:n("Billing info")}),u.jsx(l,{defaultCardLast4:b})]}),u.jsx("button",{className:"gh-portal-btn gh-portal-btn-list",onClick:y=>i(),"data-test-button":"update-billing",children:h})]})},d=Me({member:e}),p=Zt({member:e}),m=ut({member:e}),g=d==null?void 0:d.cancel_at_period_end;if(d||p){const{price:b,default_payment_card_last4:v}=d||{};let f=n("Plan");return To({site:t})&&dg({member:e})&&(f=dg({member:e})),u.jsxs(u.Fragment,{children:[u.jsxs("section",{children:[u.jsxs("div",{className:"gh-portal-list-detail",children:[u.jsx("h3",{children:f}),u.jsx(o,{price:b,isComplimentary:p,subscription:d})]}),u.jsx(s,{isComplimentary:p,isPaid:m,isCancelled:g})]}),u.jsx(c,{isComplimentary:p,defaultCardLast4:v})]})}return null};function Nj({subscription:e,t}){if(Zu({sub:e})){const a=Ct(e.trial_end_at);return u.jsx("p",{className:"gh-portal-account-discountcontainer",children:u.jsx("div",{children:u.jsx("span",{children:t("Free Trial – Ends {trialEnd}",{trialEnd:a})})})})}return null}function Aj({offer:e,price:t,subscriptionStartDate:a,t:n}){let i="";if((e==null?void 0:e.type)==="trial"||(e==null?void 0:e.duration)==="once")return"";if(e){const r=e.duration;let o="";if(r==="forever")o=n("Forever");else if(r==="repeating"){const s=e.duration_in_months||0;let l=new Date(a),c=new Date(l.setMonth(l.getMonth()+s));if(fg(c))return"";o=n("Ends {offerEndDate}",{offerEndDate:Ct(c)})}i=`${AE({offer:e,price:t,useFormatted:!0})}/${t.interval}${o?` — ${o}`:""}`}return i}function Ij(){const{member:e,site:t,onAction:a,t:n}=k.useContext(P);let{newsletters:i}=e;const r=!!(i!=null&&i.length);let o=n(r?"Subscribed":"Unsubscribed");const s=l=>{var p;l.preventDefault();const c=va({site:t}),d=(p=e==null?void 0:e.newsletters)!=null&&p.length?[]:c;a("updateNewsletterPreference",{newsletters:d})};return u.jsxs("section",{children:[u.jsxs("div",{className:"gh-portal-list-detail email-newsletter",children:[u.jsx("h3",{children:n("Email newsletter")}),u.jsxs("p",{children:[o," ",Qu({member:e})&&r&&u.jsx("button",{className:"gh-portal-btn-text gh-email-faq-page-button",onClick:()=>a("switchPage",{page:"emailReceivingFAQ",lastPage:"accountHome"}),children:n("Not receiving emails?")})]})]}),u.jsx("div",{children:u.jsx(_o,{dataTestId:"default-newsletter-toggle",id:"default-newsletter-toggle",onToggle:l=>{s(l)},checked:r})})]})}const cf=e=>k.createElement("svg",{fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",...e},k.createElement("path",{d:"m12.79 12.376 4.08 4.079m-4.08 0 4.08-4.08",stroke:"red",strokeWidth:1.35,strokeLinecap:"round",strokeLinejoin:"round"}),k.createElement("path",{d:"m10.439 17.994-2.664-2.652-2.86 1.478.111-4.239m0 0L1.677 9.232a1.344 1.344 0 0 1-.366-1.222 1.369 1.369 0 0 1 .904-1.05l13.111-4.374a1.369 1.369 0 0 1 1.76 1.758L15 10m-9.974 2.581 11.67-9.727",stroke:"#A3A3A3",strokeWidth:1.35,strokeLinecap:"round",strokeLinejoin:"round"}));function Dj({t:e}){return u.jsxs("p",{className:"gh-portal-email-notice",children:[u.jsx(cf,{className:"gh-portal-email-notice-icon"}),u.jsx("span",{className:"gh-mobile-only",children:e("You're not receiving emails")}),u.jsx("span",{className:"gh-desktop-only",children:e("You're currently not receiving emails")})]})}function Fj(){const{onAction:e,member:t,t:a,site:n}=k.useContext(P),i=hg({member:t}),r=zi({site:n}),o=Po({site:n}),s=i?"emailSuppressed":"accountEmail",l=!r&&!o,c=()=>i||l?u.jsx(Dj,{t:a}):u.jsx("p",{children:a("Update your preferences")});return u.jsxs("section",{children:[u.jsxs("div",{className:"gh-portal-list-detail",children:[u.jsx("h3",{children:a("Emails")}),c()]}),u.jsx("button",{className:"gh-portal-btn gh-portal-btn-list",onClick:()=>{e("switchPage",{page:s,lastPage:"accountHome"})},"data-test-button":"manage-newsletters",children:a("Manage")})]})}const Mj=(e,t)=>Ii({site:e})&&zi({site:e})||Po({site:e})||hg({member:t}),_j=e=>!Ii({site:e})&&zi({site:e})&&!Po({site:e}),Yj=()=>{const{member:e,onAction:t,site:a,t:n}=k.useContext(P),{name:i,email:r}=e,o=()=>{t("switchPage",{page:"accountProfile",lastPage:"accountHome"})},s=Mj(a,e),l=_j(a);return u.jsx("div",{children:u.jsxs("div",{className:"gh-portal-list",children:[u.jsxs("section",{children:[u.jsxs("div",{className:"gh-portal-list-detail",children:[u.jsx("h3",{children:i||n("Account")}),u.jsx("p",{children:r})]}),u.jsx("button",{"data-test-button":"edit-profile",className:"gh-portal-btn gh-portal-btn-list",onClick:c=>o(),children:n("Edit")})]}),u.jsx(zj,{}),s&&u.jsx(Fj,{}),l&&u.jsx(Ij,{})]})})},Rj=()=>u.jsxs("div",{className:"gh-portal-content gh-portal-account-main",children:[u.jsx(re,{}),u.jsx(Cj,{}),u.jsxs("section",{className:"gh-portal-account-data",children:[u.jsx($j,{}),u.jsx(Tj,{}),u.jsx(Yj,{})]})]});class df extends Y.Component{componentDidMount(){const{member:t,site:a}=this.context;Qt({site:a})||this.context.onAction("signout"),t||this.context.onAction("switchPage",{page:"signin",pageData:{redirect:window.location.href}})}handleSignout(t){t.preventDefault(),this.context.onAction("signout")}render(){const{member:t,site:a,t:n}=this.context,i=Di({site:a});return!t||!Qt({site:a})?null:u.jsxs("div",{className:"gh-portal-account-wrapper",children:[u.jsx(Rj,{}),u.jsx(Ej,{onClose:()=>this.context.onAction("closePopup"),handleSignout:r=>this.handleSignout(r),supportAddress:i,t:n})]})}}X(df,"contextType",P);class mf extends Y.Component{constructor(t,a){super(t,a);const{name:n="",email:i=""}=a.member||{};this.state={name:n,email:i}}componentDidMount(){const{member:t}=this.context;t||this.context.onAction("switchPage",{page:"signin"})}handleSignout(t){t.preventDefault(),this.context.onAction("signout")}onBack(){this.context.onAction("back")}onProfileSave(t){t.preventDefault(),this.setState(a=>({errors:Yi({fields:this.getInputFields({state:a}),t:this.context.t})}),()=>{const{email:a,name:n,errors:i}=this.state;i&&Object.values(i).filter(o=>!!o).length>0||(this.context.onAction("clearPopupNotification"),this.context.onAction("updateProfile",{email:a,name:n}))})}renderSaveButton(){const{t}=this.context,a=this.context.action==="updateProfile:running";let n=t("Save");this.context.action==="updateProfile:failed"&&(n=t("Retry"));const i=!!a;return u.jsx(ae,{dataTestId:"save-button",isRunning:a,onClick:r=>this.onProfileSave(r),disabled:i,brandColor:this.context.brandColor,label:n,style:{width:"100%"}})}renderDeleteAccountButton(){const{t}=this.context;return u.jsx("div",{style:{cursor:"pointer",color:"red"},role:"button",children:t("Delete account")})}renderAccountFooter(){return u.jsx("footer",{className:"gh-portal-action-footer",children:this.renderSaveButton()})}renderHeader(){const{t}=this.context;return u.jsxs("header",{className:"gh-portal-detail-header",children:[u.jsx(bn,{brandColor:this.context.brandColor,hidden:!this.context.lastPage,onClick:a=>this.onBack(a)}),u.jsx("h3",{className:"gh-portal-main-title",children:t("Account settings")})]})}renderUserAvatar(){const t=this.context.member&&this.context.member.avatar_image,a={position:"relative",display:"flex",width:"64px",height:"64px",marginBottom:"6px",borderRadius:"100%",boxShadow:"0 0 0 3px #fff",border:"1px solid gray",overflow:"hidden",justifyContent:"center",alignItems:"center"};return u.jsx("div",{style:a,children:u.jsx(Hu,{gravatar:t,style:{userIcon:{color:"black",width:"56px",height:"56px"}}})})}handleInputChange(t,a){const n=a.name;this.setState({[n]:t.target.value})}getInputFields({state:t,fieldNames:a}){const{t:n}=this.context,i=t.errors||{},r=[{type:"text",value:t.name,placeholder:n("Jamie Larson"),label:n("Name"),name:"name",required:!1,errorMessage:i.name||""},{type:"email",value:t.email,placeholder:n("jamie@example.com"),label:n("Email"),name:"email",required:!0,errorMessage:i.email||""}];return a&&a.length>0?r.filter(o=>a.includes(o.name)):r}onKeyDown(t){t.keyCode===13&&this.onProfileSave(t)}renderProfileData(){return u.jsx("div",{className:"gh-portal-section",children:u.jsx(Uo,{fields:this.getInputFields({state:this.state}),onChange:(t,a)=>this.handleInputChange(t,a),onKeyDown:(t,a)=>this.onKeyDown(t,a)})})}render(){const{member:t}=this.context;return t?u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"gh-portal-content with-footer",children:[u.jsx(re,{}),this.renderHeader(),u.jsx("div",{className:"gh-portal-section",children:this.renderProfileData()})]}),this.renderAccountFooter()]}):null}}X(mf,"contextType",P);function Uj(){const{brandColor:e,lastPage:t,onAction:a,t:n}=k.useContext(P);return u.jsxs("header",{className:"gh-portal-detail-header",children:[u.jsx(bn,{brandColor:e,hidden:!t,onClick:()=>{a("back")}}),u.jsx("h3",{className:"gh-portal-main-title",children:n("Email preferences")})]})}function Lj({newsletter:e,subscribedNewsletters:t,setSubscribedNewsletters:a}){const n=t.some(i=>i.id===(e==null?void 0:e.id));return u.jsxs("section",{className:"gh-portal-list-toggle-wrapper","data-testid":"toggle-wrapper",children:[u.jsxs("div",{className:"gh-portal-list-detail",children:[u.jsx("h3",{children:e.name}),u.jsx("p",{children:e==null?void 0:e.description})]}),u.jsx("div",{style:{display:"flex",alignItems:"center"},children:u.jsx(_o,{id:e.id,onToggle:(i,r)=>{let o=[];r?o=t.filter(s=>s.id!==e.id).concat(e):o=t.filter(s=>s.id!==e.id),a(o)},checked:n,dataTestId:"switch-input"})})]})}function Bj({updateCommentNotifications:e,isCommentsEnabled:t,enableCommentNotifications:a}){const{t:n,onAction:i}=k.useContext(P),r=!!a;if(!t)return null;const o=async(s,l)=>{await e(l),i("showPopupNotification",{action:"updated:success",message:n("Comment preferences updated.")})};return u.jsxs("section",{className:"gh-portal-list-toggle-wrapper","data-testid":"toggle-wrapper",children:[u.jsxs("div",{className:"gh-portal-list-detail",children:[u.jsx("h3",{children:n("Comments")}),u.jsx("p",{children:n("Get notified when someone replies to your comment")})]}),u.jsx("div",{style:{display:"flex",alignItems:"center"},children:u.jsx(_o,{id:"comments",onToggle:o,checked:r,dataTestId:"switch-input"})})]})}function Oj({subscribedNewsletters:e,setSubscribedNewsletters:t,hasNewslettersEnabled:a}){const{site:n}=k.useContext(P),i=va({site:n});return a?i.map(r=>u.jsx(Lj,{newsletter:r,subscribedNewsletters:e,setSubscribedNewsletters:t},r==null?void 0:r.id)):null}function Vj({site:e,isPaid:t}){const{t:a}=k.useContext(P);return t?u.jsx("p",{style:{textAlign:"center",marginTop:"12px",marginBottom:"0",color:"var(--grey6)"},children:a("Unsubscribing from emails will not cancel your paid subscription to {title}",{title:e==null?void 0:e.title})}):null}function pf({hasNewslettersEnabled:e,notification:t,subscribedNewsletters:a,updateSubscribedNewsletters:n,updateCommentNotifications:i,unsubscribeAll:r,isPaidMember:o,isCommentsEnabled:s,enableCommentNotifications:l}){const{brandColor:c,onAction:d,member:p,site:m,t:g}=k.useContext(P),b=!(a!=null&&a.length)&&(s&&!l||!s),f=t||(()=>null);return u.jsxs("div",{className:"gh-portal-content with-footer",children:[u.jsx(re,{}),u.jsx(Uj,{}),u.jsx(f,{}),u.jsx("div",{className:"gh-portal-section flex",children:u.jsxs("div",{className:"gh-portal-list",children:[u.jsx(Oj,{hasNewslettersEnabled:e,subscribedNewsletters:a,setSubscribedNewsletters:h=>{let y=h.map(w=>({id:w.id}));n(y)}}),u.jsx(Bj,{isCommentsEnabled:s,enableCommentNotifications:l,updateCommentNotifications:i})]})}),u.jsx("div",{className:"gh-portal-btn-product gh-portal-btn-unsubscribe",style:{marginTop:"-48px",marginBottom:0},children:u.jsx(ae,{isRunning:!1,onClick:()=>{r()},disabled:b,brandColor:c,isPrimary:!1,label:g("Unsubscribe from all emails"),isDestructive:!0,style:{width:"100%",zIndex:900},dataTestId:"unsubscribe-from-all-emails"})}),u.jsxs("footer",{className:"gh-portal-action-footer"+(Qu({member:p})?" gh-feature-suppressions":""),children:[u.jsx("div",{style:{width:"100%"},children:u.jsx(Vj,{isPaid:o,site:m,subscribedNewsletters:a})}),Qu({member:p})&&!b&&u.jsxs("div",{className:"gh-portal-footer-secondary",children:[u.jsx("span",{className:"gh-portal-footer-secondary-light",children:g("Not receiving emails?")}),u.jsxs("button",{className:"gh-portal-btn-text gh-email-faq-page-button",onClick:()=>d("switchPage",{page:"emailReceivingFAQ",pageData:{direct:!1}}),children:[g("Get help")," ",u.jsx("span",{className:"right-arrow",children:"→"})]})]})]})]})}function Hj(){const{member:e,onAction:t,site:a,t:n,pageData:i}=k.useContext(P);let r,o;i&&(r=i.newsletterUuid,o=i.action);const[s,l]=k.useState(!0),c=va({site:a}),d=zi({site:a});k.useEffect(()=>{e||t("switchPage",{page:"signin"})},[e,t]),k.useEffect(()=>{if(r&&o==="unsubscribe"){const h=e==null?void 0:e.newsletters.filter(y=>y.uuid!==r);b(h),l(!1),t("updateNewsletterPreference",{newsletters:h})}},[]);const p=()=>{if(i.comments&&v){const w=s?"gh-portal-hide":"";return u.jsx(u.Fragment,{children:u.jsx("p",{className:`gh-portal-text-center gh-portal-header-message ${w}`,children:u.jsx(je,{string:n("{memberEmail} will no longer receive emails when someone replies to your comments."),mapping:{memberEmail:u.jsx("strong",{children:e==null?void 0:e.email})}})})})}const h=c==null?void 0:c.find(w=>w.uuid===i.newsletterUuid);if(!h)return null;const y=s?"gh-portal-hide":"";return u.jsx(u.Fragment,{children:u.jsx("p",{className:`gh-portal-text-center gh-portal-header-message ${y}`,children:u.jsx(je,{string:n("{memberEmail} will no longer receive {newsletterName} newsletter."),mapping:{memberEmail:u.jsx("strong",{children:e==null?void 0:e.email}),newsletterName:u.jsx("strong",{children:h==null?void 0:h.name})}})})})},m=[...(e==null?void 0:e.newsletters)||[]],[g,b]=k.useState(m),{comments_enabled:v}=a,{enable_comment_notifications:f}=e||{};return k.useEffect(()=>{b((e==null?void 0:e.newsletters)||[])},[e==null?void 0:e.newsletters]),u.jsx(pf,{hasNewslettersEnabled:d,notification:r?p:null,subscribedNewsletters:g,updateSubscribedNewsletters:h=>{b(h),t("updateNewsletterPreference",{newsletters:h}),t("showPopupNotification",{action:"updated:success",message:n("Email preferences updated.")})},updateCommentNotifications:async h=>{t("updateNewsletterPreference",{enableCommentNotifications:h})},unsubscribeAll:()=>{b([]),t("showPopupNotification",{action:"updated:success",message:n("Unsubscribed from all emails.")});const h={newsletters:[]};v&&(h.enableCommentNotifications=!1),t("updateNewsletterPreference",h)},isPaidMember:ut({member:e}),isCommentsEnabled:v!=="off",enableCommentNotifications:f})}function Wj(){const{site:e}=k.useContext(P),t=e.icon;return t?u.jsx("img",{className:"gh-portal-unsubscribe-logo",src:t,alt:e.title}):null}function Kj(){const{site:e}=k.useContext(P),t=e.title||"";return u.jsxs("header",{className:"gh-portal-header",children:[u.jsx(Wj,{}),u.jsx("h2",{className:"gh-portal-publication-title",children:t})]})}async function hf({api:e,memberUuid:t,key:a,newsletters:n,enableCommentNotifications:i}){try{return await e.member.updateNewsletters({uuid:t,key:a,newsletters:n,enableCommentNotifications:i})}catch{}}function Gj(){const{site:e,api:t,pageData:a,member:n,onAction:i,t:r}=k.useContext(P),[o,s]=k.useState(),[l,c]=k.useState(!0),d=va({site:e}),p=d.filter(E=>E.subscribe_on_signup),[m,g]=k.useState(!1),[b,v]=k.useState(p),[f,h]=k.useState(!1),{comments_enabled:y}=e,{enable_comment_notifications:w=!1}=o||{},S=zi({site:e}),j=async E=>{n?i("updateNewsletterPreference",{newsletters:E}):await hf({api:t,memberUuid:a.uuid,key:a.key,newsletters:E}),v(E);const M={action:"updated:success",message:r("Email preferences updated.")};i("showPopupNotification",M)},x=async E=>{let M;n?(await i("updateNewsletterPreference",{enableCommentNotifications:E}),M={...n,enable_comment_notifications:E}):M=await hf({api:t,memberUuid:a.uuid,key:a.key,enableCommentNotifications:E}),s(M),i("showPopupNotification",{action:"updated:success",message:r("Comment preferences updated.")})},C=async()=>{let E;n?(await i("updateNewsletterPreference",{newsletters:[],enableCommentNotifications:!1}),E={...n},E.newsletters=[],E.enable_comment_notifications=!1):E=await t.member.updateNewsletters({uuid:a.uuid,key:a.key,newsletters:[],enableCommentNotifications:!1}),v([]),s(E),i("showPopupNotification",{action:"updated:success",message:r("Unsubscribed from all emails.")})};if(k.useEffect(()=>{(async()=>{let E;try{E=await t.member.newsletters({uuid:a.uuid,key:a.key}),s(E??null),c(!1)}catch(K){console.error("[PORTAL] Error fetching member newsletters",K),s(null),c(!1);return}if(E===null)return;const M=(E==null?void 0:E.newsletters)||[];v(M),(d==null?void 0:d.length)===1&&!y&&!a.newsletterUuid?await j([]):a.newsletterUuid?await j(M==null?void 0:M.filter(K=>K.uuid!==a.newsletterUuid)):a.comments&&y&&await x(!1)})()},[y,a.uuid,a.newsletterUuid,a.comments,e.url,d==null?void 0:d.length]),l)return u.jsx(Ui,{});if(!o)return u.jsxs("div",{className:"gh-portal-content gh-portal-feedback with-footer",children:[u.jsx(re,{}),u.jsx("div",{className:"gh-feedback-icon gh-feedback-icon-error",children:u.jsx(ac,{})}),u.jsx("h1",{className:"gh-portal-main-title",children:r("That didn't go to plan")}),u.jsx("div",{children:u.jsx("p",{className:"gh-portal-text-center",children:r("We couldn't unsubscribe you as the email address was not found. Please contact the site owner.")})}),u.jsx(ae,{style:{width:"100%"},retry:!1,onClick:()=>i("closePopup"),disabled:!1,brandColor:"#000000",label:r("Close"),isRunning:!1,tabindex:"3",classes:"sticky bottom"})]});if((d==null?void 0:d.length)===1&&!y&&!f)return u.jsxs("div",{className:"gh-portal-content gh-portal-unsubscribe with-footer",children:[u.jsx(re,{}),u.jsx(Kj,{}),u.jsx("h1",{className:"gh-portal-main-title",children:r("Successfully unsubscribed")}),u.jsxs("div",{children:[u.jsx("p",{className:"gh-portal-text-center",children:u.jsx(je,{string:r("{memberEmail} will no longer receive this newsletter."),mapping:{memberEmail:u.jsx("strong",{children:o==null?void 0:o.email})}})}),u.jsx("p",{className:"gh-portal-text-center",children:u.jsx(je,{string:r("Didn't mean to do this? Manage your preferences <button>here</button>."),mapping:{button:u.jsx("button",{className:"gh-portal-btn-link gh-portal-btn-branded gh-portal-btn-inline",onClick:()=>{h(!0)}})}})})]})]});const z=()=>{if(a.comments&&y){const K=m?"gh-portal-hide":"";return u.jsx(u.Fragment,{children:u.jsx("p",{className:`gh-portal-text-center gh-portal-header-message ${K}`,children:u.jsx(je,{string:r("{memberEmail} will no longer receive emails when someone replies to your comments."),mapping:{memberEmail:u.jsx("strong",{children:o==null?void 0:o.email})}})})})}const E=d==null?void 0:d.find(K=>K.uuid===a.newsletterUuid);if(!E)return null;const M=m?"gh-portal-hide":"";return u.jsx(u.Fragment,{children:u.jsx("p",{className:`gh-portal-text-center gh-portal-header-message ${M}`,children:u.jsx(je,{string:r("{memberEmail} will no longer receive {newsletterName} newsletter."),mapping:{memberEmail:u.jsx("strong",{children:o==null?void 0:o.email}),newsletterName:u.jsx("strong",{children:E==null?void 0:E.name})}})})})};return u.jsx(pf,{hasNewslettersEnabled:S,notification:z,subscribedNewsletters:b,updateSubscribedNewsletters:async E=>{await j(E),g(!0)},updateCommentNotifications:x,unsubscribeAll:async()=>{await C(),g(!0)},isPaidMember:(o==null?void 0:o.status)!=="free",isCommentsEnabled:y!=="off",enableCommentNotifications:w})}function qj(){const{brandColor:e,lastPage:t,onAction:a,action:n,site:i,t:r}=k.useContext(P);k.useEffect(()=>{["removeEmailFromSuppressionList:success"].includes(n)&&a("refreshMemberData"),["removeEmailFromSuppressionList:failed","refreshMemberData:failed"].includes(n)&&a("back"),["refreshMemberData:success"].includes(n)&&(Ii({site:i})||Po({site:i})?(a("switchPage",{page:"accountEmail",lastPage:"accountHome"}),a("showPopupNotification",{message:r("You have been successfully resubscribed")})):a("back"))},[n,a,i,r]);const o=["removeEmailFromSuppressionList:running","refreshMemberData:running"].includes(n),s=()=>{a("removeEmailFromSuppressionList")};return u.jsxs("div",{className:"gh-email-suppressed-page",children:[u.jsxs("header",{className:"gh-portal-detail-header",children:[u.jsx(bn,{brandColor:e,hidden:!t,onClick:()=>{a("back")}}),u.jsx(re,{})]}),u.jsx(cf,{className:"gh-email-suppressed-page-icon"}),u.jsxs("div",{className:"gh-email-suppressed-page-text",children:[u.jsx("h3",{className:"gh-portal-main-title gh-email-suppressed-page-title",children:r("Emails disabled")}),u.jsx("p",{children:r("You're not receiving emails because you either marked a recent message as spam, or because messages could not be delivered to your provided email address.")})]}),u.jsx(ae,{dataTestId:"resubscribe-email",classes:"gh-portal-confirm-button",onClick:s,disabled:o,brandColor:e,label:r("Re-enable emails"),isRunning:o})]})}function Jj(){const{brandColor:e,onAction:t,site:a,t:n,pageData:i}=k.useContext(P),r=`mailto:${Di({site:a})}`,o=i&&i.direct||!1;return u.jsxs("div",{className:"gh-email-suppression-faq",children:[!o&&u.jsxs("header",{className:"gh-portal-detail-header",children:[u.jsx(bn,{brandColor:e,onClick:()=>{t("switchPage",{page:"emailSuppressed",lastPage:"accountHome"})}}),u.jsx(re,{})]}),u.jsxs("div",{className:"gh-longform",children:[u.jsx("h3",{children:n("Why has my email been disabled?")}),u.jsx("p",{children:n("Newsletters can be disabled on your account for two reasons: A previous email was marked as spam, or attempting to send an email resulted in a permanent failure (bounce).")}),u.jsx("h4",{children:n("Spam complaints")}),u.jsx("p",{children:n("If a newsletter is flagged as spam, emails are automatically disabled for that address to make sure you no longer receive any unwanted messages.")}),u.jsx("p",{children:n("If the spam complaint was accidental, or you would like to begin receiving emails again, you can resubscribe to emails by clicking the button on the previous screen.")}),u.jsx("p",{children:n("Once resubscribed, if you still don't see emails in your inbox, check your spam folder. Some inbox providers keep a record of previous spam complaints and will continue to flag emails. If this happens, mark the latest newsletter as 'Not spam' to move it back to your primary inbox.")}),u.jsx("h4",{children:n("Permanent failure (bounce)")}),u.jsx("p",{children:n("When an inbox fails to accept an email it is commonly called a bounce. In many cases, this can be temporary. However, in some cases, a bounced email can be returned as a permanent failure when an email address is invalid or non-existent.")}),u.jsx("p",{children:n("In the event a permanent failure is received when attempting to send a newsletter, emails will be disabled on the account.")}),u.jsx("p",{children:n("If you would like to start receiving emails again, the best next steps are to check your email address on file for any issues and then click resubscribe on the previous screen.")}),u.jsx("p",{children:u.jsx("a",{className:"gh-portal-btn gh-portal-btn-branded no-margin-right",href:r,onClick:()=>{r&&window.open(r)},children:n("Need more help? Contact support")})})]})]})}function Zj(){const{brandColor:e,onAction:t,site:a,lastPage:n,member:i,t:r,pageData:o}=k.useContext(P),s=Di({site:a}),l=`mailto:${s}`,c=zE({site:a}),d=o&&o.direct||!1;return u.jsxs("div",{className:"gh-email-receiving-faq",children:[u.jsxs("header",{className:"gh-portal-detail-header",children:[!d&&u.jsx(bn,{brandColor:e,onClick:()=>{n?t("switchPage",{page:"accountHome"}):t("switchPage",{page:"accountEmail",lastPage:"accountHome"})}}),u.jsx(re,{})]}),u.jsxs("div",{className:"gh-longform",children:[u.jsx("h3",{children:r("Help! I'm not receiving emails")}),u.jsx("p",{children:r("If you're not receiving the email newsletter you've subscribed to, here are a few things to check.")}),u.jsx("h4",{children:r("Verify your email address is correct")}),u.jsx("p",{children:u.jsx(je,{string:r("The email address we have for you is {memberEmail} — if that's not correct, you can update it in your <button>account settings area</button>."),mapping:{memberEmail:u.jsx("strong",{children:i.email}),button:u.jsx("button",{className:"gh-portal-btn-text",onClick:()=>t("switchPage",{lastPage:"emailReceivingFAQ",page:"accountProfile"})})}})}),u.jsx("h4",{children:r("Check spam & promotions folders")}),u.jsx("p",{children:r(`Make sure emails aren't accidentally ending up in the Spam or Promotions folders of your inbox. If they are, click on "Mark as not spam" and/or "Move to inbox".`)}),u.jsx("h4",{children:r("Create a new contact")}),u.jsx("p",{children:u.jsx(je,{string:r("In your email client add {senderEmail} to your contacts list. This signals to your mail provider that emails sent from this address should be trusted."),mapping:{senderEmail:u.jsx("strong",{children:c})}})}),u.jsx("h4",{children:r("Send an email and say hi!")}),u.jsx("p",{children:u.jsx(je,{string:r("Send an email to {senderEmail} and say hello. This can also help signal to your mail provider that emails to and from this address should be trusted."),mapping:{senderEmail:u.jsx("strong",{children:c})}})}),u.jsx("h4",{children:r("Check with your mail provider")}),u.jsx("p",{children:u.jsx(je,{string:r("If you have a corporate or government email account, reach out to your IT department and ask them to allow emails to be received from {senderEmail}"),mapping:{senderEmail:u.jsx("strong",{children:c})}})}),u.jsx("h4",{children:r("Get in touch for help")}),u.jsx("p",{children:u.jsx(je,{string:r("If you've completed all these checks and you're still not receiving emails, you can reach out to get support by contacting {supportAddress}."),mapping:{supportAddress:u.jsx("a",{href:l,onClick:()=>{l&&window.open(l)},children:s})}})})]})]})}const pc={signin:uf,signup:ef,accountHome:df,accountPlan:qg,accountProfile:mf,accountEmail:Hj,signupNewsletter:dc,unsubscribe:Gj,magiclink:tf,loading:Ui,offer:nf,feedback:rj,emailSuppressed:qj,emailSuppressionFAQ:Jj,emailReceivingFAQ:Zj,support:()=>{const[e,t]=k.useState(!0),[a,n]=k.useState(null),[i,r]=k.useState(null),{member:o,t:s,site:l}=k.useContext(P);return k.useEffect(()=>{async function c(){const d=l.url,p=window.location.origin+window.location.pathname,m=o?`${p}?action=support&success=true`:`${p}#/portal/support/success`,g=p,b=Bo({siteUrl:d});try{const v=await b.member.checkoutDonation({successUrl:m,cancelUrl:g,personalNote:s("Add a personal note")});v.url&&window.location.replace(v.url)}catch(v){v.type&&v.type==="DisabledFeatureError"?r(s("This site is not accepting payments at the moment.")):n(s("Something went wrong, please try again later.")),t(!1)}}l&&l.donations_enabled===!1?(r(s("This site is not accepting donations at the moment.")),t(!1)):c()},[]),e?u.jsx("div",{children:u.jsx(Ui,{})}):a?u.jsx(mc,{error:a}):i?u.jsx(mc,{error:i}):null},supportSuccess:dj,supportError:mc,recommendations:kj},hc=function({page:e}){return Object.keys(pc).includes(e)?e:"signup"},Qj=function({page:e}){return e.includes("account")},Xj=function({page:e}){return e.includes("offer")},e$=e=>k.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},k.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12C0 5.37258 5.37258 0 12 0C18.6274 0 24 5.37258 24 12ZM11.8326 2.33879C6.37785 2.95189 3.95901 5.20797 3.41126 9.74699C3.34896 10.2632 3.22642 10.7805 3.10443 11.2954C2.93277 12.02 2.76221 12.74 2.76221 13.4458C2.76221 17.9885 6.5856 21.556 11.1283 21.556C12.8959 21.556 14.4433 20.8144 15.8756 20.048C19.0536 18.3478 22.0328 16.2597 22.0328 12.5411C22.0328 9.91512 20.1051 7.56932 18.466 5.5747C18.3834 5.47416 18.3015 5.37451 18.2206 5.27577C17.3866 4.25742 14.4333 2.04643 11.8326 2.33879Z",fill:"#15171A"}));class gc extends Y.Component{render(){return u.jsxs("a",{href:"https://ghost.org",target:"_blank",rel:"noopener noreferrer",onClick:()=>{window.open("https://ghost.org","_blank")},children:[u.jsx(e$,{}),"Powered by Ghost"]})}}X(gc,"contextType",P);const gf=()=>({modalContainer:{zIndex:"3999999",position:"fixed",left:"0",top:"0",width:"100%",height:"100%",overflow:"hidden"},frame:{common:{margin:"auto",position:"relative",padding:"0",outline:"0",width:"100%",opacity:"1",overflow:"hidden",height:"100%"}},page:{links:{width:"600px"}}});function t$({message:e}){return mn()?u.jsx("div",{className:"gh-portal-cookiebanner",children:e}):null}class ff extends Y.Component{componentDidMount(){this.node&&!J(["preview"])&&!this.props.isMobile&&(this.node.focus(),this.keyUphandler=t=>{t.key==="Escape"&&this.dismissPopup(t)},this.node.ownerDocument.removeEventListener("keyup",this.keyUphandler),this.node.ownerDocument.addEventListener("keyup",this.keyUphandler)),this.sendContainerHeightChangeEvent()}dismissPopup(t){var i;const a=t.target&&t.target.tagName;(a!=="INPUT"||a==="INPUT"&&!((i=t==null?void 0:t.target)!=null&&i.value))&&this.context.onAction("closePopup")}sendContainerHeightChangeEvent(){var t,a;this.node&&J(["preview"])&&((t=this.node)==null?void 0:t.clientHeight)!==this.lastContainerHeight&&(this.lastContainerHeight=(a=this.node)==null?void 0:a.clientHeight,window.document.body.style.overflow="hidden",window.document.body.style["scrollbar-width"]="none",window.parent.postMessage({type:"portal-preview-updated",payload:{height:this.lastContainerHeight}},"*"))}componentDidUpdate(){this.sendContainerHeightChangeEvent()}componentWillUnmount(){this.node&&this.node.ownerDocument.removeEventListener("keyup",this.keyUphandler)}handlePopupClose(t){J(["preview"])||t.target===t.currentTarget&&this.context.onAction("closePopup")}renderActivePage(){const{page:t}=this.context;hc({page:t});const a=pc[t];return u.jsx(a,{})}renderPopupNotification(){const{popupNotification:t}=this.context;return!t||!t.type?null:u.jsx(af,{})}sendPortalPreviewReadyEvent(){window.self!==window.parent&&window.parent.postMessage({type:"portal-preview-ready",payload:{}},"*")}render(){const{page:t,pageQuery:a,site:n,customSiteUrl:i}=this.context,o=Ao({site:n,pageQuery:a}).length;hc({page:t});const l={...gf().page[t]};let c="",d="regular",p="",m=t;switch(t){case"signup":p="Cookies must be enabled in your browser to sign up.";break;case"signin":p="Cookies must be enabled in your browser to sign in.";break;case"accountHome":m="account-home";break;case"accountProfile":m="account-profile";break;case"accountPlan":m="account-plan";break;default:p="Cookies must be enabled in your browser.",m=t;break}o>1&&!ct({site:n})&&jt({site:n,pageQuery:a})&&t==="signup"&&(m+=" full-size",d="full");const g=Ai({site:n});(g&&o>2||!g&&o>1)&&t==="accountPlan"&&(m+=" full-size",d="full"),(t==="emailSuppressionFAQ"||t==="emailReceivingFAQ")&&(m+=" large-size");let b="gh-portal-popup-container";J(["preview"])&&(m+=" preview"),J(["preview"],{customSiteUrl:i})&&!n.disableBackground&&(b+=" preview"),J(["dev"])&&(b+=" dev");const v=`${b} ${c} ${m}`;return this.sendPortalPreviewReadyEvent(),u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"gh-portal-popup-wrapper "+m,onClick:f=>this.handlePopupClose(f),children:[this.renderPopupNotification(),u.jsxs("div",{className:v,style:l,ref:f=>this.node=f,tabIndex:-1,children:[u.jsx(t$,{message:p}),this.renderActivePage(),d==="full"?u.jsx("div",{className:"gh-portal-powered inside "+(J(["preview"])?"hidden ":"")+m,children:u.jsx(gc,{})}):""]})]}),u.jsx("div",{className:"gh-portal-powered outside "+(J(["preview"])?"hidden ":"")+m,children:u.jsx(gc,{})})]})}}X(ff,"contextType",P);class bf extends Y.Component{constructor(t){super(t),this.state={height:null}}renderCurrentPage(t){const a=pc[t];return u.jsx(a,{})}onHeightChange(t){this.setState({height:t})}handlePopupClose(t){t.preventDefault(),t.target===t.currentTarget&&this.context.onAction("closePopup")}renderFrameStyles(){const{site:t}=this.context,a=xj({site:t}),n=`
|
|
3420
3420
|
:root {
|
|
3421
3421
|
--brandcolor: ${this.context.brandColor}
|
|
3422
3422
|
}
|
|
3423
|
-
`+a;return u.jsxs(u.Fragment,{children:[u.jsx("style",{dangerouslySetInnerHTML:{__html:n}}),u.jsx("meta",{name:"viewport",content:"width=device-width, initial-scale=1, maximum-scale=1"})]})}renderFrameContainer(){const{member:t,site:a,customSiteUrl:n}=this.context,i=gf(),r=window.innerWidth<480,o={...i.frame.common};let s="gh-portal-popup-background";return J(["preview"])&&(i.modalContainer.zIndex="3999997"),J(["preview"],{customSiteUrl:n})&&!a.disableBackground&&(s+=" preview"),J(["dev"])&&(s+=" dev"),u.jsx("div",{style:i.modalContainer,children:u.jsxs(Ou,{style:o,title:"portal-popup",head:this.renderFrameStyles(),dataTestId:"portal-popup-frame",dataDir:this.context.dir,children:[u.jsx("div",{className:s,onClick:l=>this.handlePopupClose(l)}),u.jsx(ff,{isMobile:r})]})})}render(){const{showPopup:t}=this.context;return t?this.renderFrameContainer():null}}X(bf,"contextType",P),Oo({products:fc({numOfProducts:1})});function he(){return(new Date().getTime()/1e3|0).toString(16)+"xxxxxxxxxxxxxxxx".replace(/[x]/g,function(){return(Math.random()*16|0).toString(16)}).toLowerCase()}function Oo({title:e="The Blueprint",description:t="Thoughts, stories and ideas.",logo:a="https://static.ghost.org/v4.0.0/images/ghost-orb-1.png",icon:n="https://static.ghost.org/v4.0.0/images/ghost-orb-1.png",url:i="https://portal.localhost",plans:r={monthly:5e3,yearly:15e4,currency:"USD"},products:o=fc({numOfProducts:1}),portalProducts:s=o.map(M=>M.id),accentColor:l="#45C32E",portalPlans:c=["free","monthly","yearly"],membersSignupAccess:d="all",freePriceName:p="Free",freePriceDescription:m="Free preview",isStripeConfigured:h=!0,portalButton:b=!0,portalName:v=!0,portalButtonIcon:f="icon-1",portalButtonSignupText:g="Subscribe now",portalButtonStyle:y="icon-and-text",membersSupportAddress:w="support@example.com",editorDefaultEmailRecipients:S="visibility",newsletters:j=[],posts:x=a$(),commentsEnabled:C,recommendations:z=[],recommendationsEnabled:E}={}){return{title:e,description:t,logo:a,icon:n,accent_color:l,url:i,plans:r,products:o,portal_products:s,members_signup_access:d,free_price_name:p,free_price_description:m,is_stripe_configured:h,portal_button:b,portal_name:v,portal_plans:c,portal_button_icon:f,portal_button_signup_text:g,portal_button_style:y,members_support_address:w,comments_enabled:C!=="off",newsletters:j,recommendations:z,recommendations_enabled:!!E,editor_default_email_recipients:S,posts:x}}function yf({name:e="Black Friday",code:t="black-friday",displayTitle:a="Black Friday Sale!",displayDescription:n="Special deal for Black Friday. Subscribe now for only $15 per month and get additional benefits like accessing our podcast.",type:i="percent",cadence:r="month",amount:o=50,duration:s="repeating",durationInMonths:l=null,currencyRestriction:c=!1,currency:d=null,status:p="active",tierId:m="",tierName:h="Basic"}={}){return{id:`offer_${he()}`,name:e,code:t,display_title:a,display_description:n,type:i,cadence:r,amount:o,duration:s,duration_in_months:l,currency_restriction:c,currency:d,status:p,tier:{id:`${m}`,name:h}}}function Ze({name:e="Jamie Larson",email:t="jamie@example.com",firstname:a="Jamie",subscriptions:n=[],paid:i=!1,avatarImage:r="",subscribed:o=!0,email_suppression:s={suppressed:!1,info:null},newsletters:l=[]}={}){return{uuid:`member_${he()}`,email:t,name:e,firstname:a,paid:i,subscribed:o,avatar_image:r,subscriptions:n,email_suppression:s,newsletters:l}}function a$({numOfPosts:e=3}={}){const t=[];for(let a=0;a<e;a++)t.push(n$({title:`Post ${a+1}`,slug:`post-${a+1}`}));return t.slice(0,e)}function n$({id:e=`post_${he()}`,title:t="Post",excerpt:a="Post excerpt",slug:n="post",featured:i=!1}={}){return{id:e,title:t,excerpt:a,slug:n,featured:i}}function fc({numOfProducts:e=3}={}){const a=[kn({name:"Bronze",description:"Access to all members articles",monthlyPrice:We({interval:"month",amount:700}),yearlyPrice:We({interval:"year",amount:7e3}),numOfBenefits:2}),kn({name:"Silver",description:"Access to all members articles and weekly podcast",monthlyPrice:We({interval:"month",amount:1200}),yearlyPrice:We({interval:"year",amount:12e3}),numOfBenefits:3}),kn({name:"Friends of the Blueprint",description:"Get access to everything and lock in early adopter pricing for life + listen to my podcast",monthlyPrice:We({interval:"month",amount:18e3}),yearlyPrice:We({interval:"year",amount:17e3}),numOfBenefits:4})].slice(0,e),n=kf({});return[...a,n]}function kn({type:e="paid",name:t="Basic",description:a="",id:n=`product_${he()}`,monthlyPrice:i=We(),yearlyPrice:r=We({interval:"year"}),numOfBenefits:o=2,trialDays:s=null}){return{id:n,name:t,description:a,monthlyPrice:e==="free"?null:i,yearlyPrice:e==="free"?null:r,type:e,benefits:vf({numOfBenefits:o}),trial_days:s}}function kf({name:e="Free tier",description:t="Free tier description",id:a=`product_${he()}`,numOfBenefits:n=2}){return{id:a,name:e,type:"free",description:t,benefits:vf({numOfBenefits:n})}}function vf({numOfBenefits:e}){const t=he();return[Vo({name:`Limited early adopter pricing #${t.substring(0,6)}`}),Vo({name:`Latest gear reviews #${t.substring(6,12)}`}),Vo({name:`Weekly email newsletter #${t.substring(12,18)}`}),Vo({name:`Listen to my podcast #${t.substring(18)}`})].slice(0,e)}function Vo({id:e=`benefit_${he()}`,name:t="Benefit"}){return{id:e,name:t}}function We({interval:e="month",amount:t=e==="month"?500:5e3,nickname:a=e==="month"?"Monthly":"Yearly",description:n=null,currency:i="usd",active:r=!0,id:o=`price_${he()}`}={}){return{id:o,active:r,nickname:a,currency:i,amount:t,interval:e,description:n,stripe_price_id:`price_${he()}`,stripe_product_id:`prod_${he()}`,type:"recurring"}}function xa({id:e=`sub_${he()}`,status:t="active",currency:a="USD",interval:n="year",amount:i=n==="month"?500:5e3,nickname:r=n==="month"?"Monthly":"Yearly",cardLast4:o="4242",offer:s=r$,priceId:l=`price_${he()}`,startDate:c="2021-10-05T03:18:30.000Z",currentPeriodEnd:d="2022-10-05T03:18:30.000Z",cancelAtPeriodEnd:p=!1}={}){return{id:e,customer:{id:`cus_${he()}`,name:"Jamie",email:"jamie@example.com"},plan:{id:`price_${he()}`,nickname:r,amount:i,interval:n,currency:a},offer:s,status:t,start_date:c,default_payment_card_last4:o,cancel_at_period_end:p,cancellation_reason:null,current_period_end:d,price:{id:`stripe_price_${he()}`,price_id:l,nickname:r,amount:i,interval:n,type:"recurring",currency:a,product:{id:`stripe_prod_${he()}`,product_id:`prod_${he()}`}}}}function wf(){const e=fc({numOfProducts:1}),t=e.map(n=>n.id);return Oo({products:e,portalPlans:["free","monthly","yearly"],portalProducts:t})}wf();const i$=Oo({products:[kn({numOfBenefits:2,type:"free"})]}),r$=yf({tierId:(Bf=i$.products[0])==null?void 0:Bf.id});Ze(),Ze({paid:!0,subscriptions:[xa()]}),Ze({paid:!0,subscriptions:[]}),Ze({paid:!0,subscriptions:[xa({amount:0})]}),Ze({paid:!0,subscriptions:[xa({amount:1500,startDate:"2019-05-01T11:42:40.000Z",currentPeriodEnd:"2021-06-05T11:42:40.000Z"})]}),wf();const Ho=[kf({name:"Free",description:"Free tier description which is actually a pretty long description",numOfBenefits:2}),kn({name:"The Blueprint",description:"",monthlyPrice:We({interval:"month",amount:500}),yearlyPrice:We({interval:"year",amount:5e3}),numOfBenefits:3}),kn({name:"Friends of the Blueprint Silver",description:"Access to all members articles and weekly podcast",monthlyPrice:We({interval:"month",amount:1200}),yearlyPrice:We({interval:"year",amount:11e3}),numOfBenefits:4})],vn=Oo({title:"The Blueprint",description:"Thoughts, stories and ideas.",logo:"https://static.ghost.org/v4.0.0/images/ghost-orb-1.png",icon:"https://static.ghost.org/v4.0.0/images/ghost-orb-1.png",accentColor:"#45C32E",url:"https://portal.localhost",plans:{monthly:5e3,yearly:15e4,currency:"USD"},products:Ho,portalProducts:Ho.map(e=>e.id),membersSignupAccess:"all",freePriceName:"Free",freePriceDescription:"Free preview",isStripeConfigured:!0,portalButton:!0,portalName:!0,portalPlans:["free","monthly","yearly"],portalButtonIcon:"icon-1",portalButtonSignupText:"Subscribe now",portalButtonStyle:"icon-and-text",membersSupportAddress:"support@example.com",commentsEnabled:!0,newsletters:[{id:"weekly",name:"Weekly Rundown",description:"Best of last week",subscribe_on_signup:!0,paid:!0},{id:"daily",name:"Daily Brief",description:"One email every day",subscribe_on_signup:!1,paid:!1}],posts:[{id:"post_66aacfe061c94e10eb6e4fc1",title:"Post 1",excerpt:"Post excerpt",slug:"post-1",featured:!1},{id:"post_66aacfe04f14b8dbb56c5721",title:"Post 2",excerpt:"Post excerpt",slug:"post-2",featured:!1},{id:"post_66aacfe03d609460819af18c",title:"Post 3",excerpt:"Post excerpt",slug:"post-3",featured:!1}]}),Sf=yf({tierId:(Of=vn.products[1])==null?void 0:Of.id}),Wo={free:Ze({name:"Jamie Larson",email:"jamie@example.com",firstname:"Jamie",subscriptions:[],paid:!1,avatarImage:"",subscribed:!0}),paid:Ze({paid:!0,subscriptions:[xa({status:"active",currency:"USD",interval:"year",amount:5e3,cardLast4:"4242",startDate:"2021-10-05T03:18:30.000Z",currentPeriodEnd:"2022-10-05T03:18:30.000Z",cancelAtPeriodEnd:!1})]}),complimentary:Ze({paid:!0,subscriptions:[]}),complimentaryWithSubscription:Ze({paid:!0,subscriptions:[xa({amount:0})]}),preview:Ze({paid:!0,subscriptions:[xa({amount:1500,startDate:"2019-05-01T11:42:40.000Z",currentPeriodEnd:"2021-06-05T11:42:40.000Z"})]})};function o$(){var a;if(!Ho||!Ho[1])return null;let e=(a=vn==null?void 0:vn.products)==null?void 0:a[1].monthlyPrice,t=Ze({paid:!0,subscriptions:[xa({offer:null,priceId:e==null?void 0:e.id,status:"active",currency:e==null?void 0:e.currency,interval:e==null?void 0:e.interval,amount:e==null?void 0:e.amount,cardLast4:"4242",startDate:"2021-10-05T03:18:30.000Z",currentPeriodEnd:"2022-10-05T03:18:30.000Z",cancelAtPeriodEnd:!1})]});return{site:vn,member:t}}function s$(e){const t=e.getAttribute("href"),a=new URL(t,window.location.origin);!a.hash||!a.hash.startsWith("#/portal")||t.startsWith("#/portal")||a.origin===window.location.origin&&e.setAttribute("href",a.hash)}function l$({data:e,state:t}){return{page:e.page,popupNotification:null,lastPage:e.lastPage||null,pageData:e.pageData||t.pageData}}function u$({state:e}){return{showPopup:!e.showPopup}}function c$({data:e}){return{showPopup:!0,page:e.page,...e.pageQuery?{pageQuery:e.pageQuery}:{},...e.pageData?{pageData:e.pageData}:{}}}function d$({state:e}){return e.lastPage?{page:e.lastPage}:xf({state:e})}function xf({state:e}){return Ku(),{showPopup:!1,lastPage:null,pageQuery:"",popupNotification:null,page:e.page==="magiclink"?"":e.page}}function m$({data:e}){return{showNotification:!0,...e}}function p$(){return{showNotification:!1}}async function h$({api:e,state:t}){try{return await e.member.signout(),{action:"signout:success"}}catch{const{t:n}=t;return{action:"signout:failed",popupNotification:q({type:"signout:failed",autoHide:!1,closeable:!0,state:t,status:"error",message:n("Failed to log out, please try again")})}}}async function g$({data:e,api:t,state:a}){const{t:n,labs:i}=a,r=i!=null&&i.membersSigninOTC?!0:void 0;try{const o=await t.member.getIntegrityToken(),s={...e,emailType:"signin",integrityToken:o,...r?{includeOTC:!0}:{}},l=await t.member.sendMagicLink(s);return r&&(l!=null&&l.otc_ref)?{page:"magiclink",lastPage:"signin",otcRef:l.otc_ref}:{page:"magiclink",lastPage:"signin"}}catch(o){return{action:"signin:failed",popupNotification:q({type:"signin:failed",autoHide:!1,closeable:!0,state:a,status:"error",message:Sa(o,n("Failed to log in, please try again"),n)})}}}async function f$({data:e,api:t,state:a}){const{t:n}=a;try{const i=await t.member.verifyOTC(e);return i.redirectUrl?window.location.assign(i.redirectUrl):{action:"verifyOTC:failed",popupNotification:q({type:"verifyOTC:failed",autoHide:!1,closeable:!0,state:a,status:"error",message:i.message||n("Invalid verification code")})}}catch(i){return{action:"verifyOTC:failed",popupNotification:q({type:"verifyOTC:failed",autoHide:!1,closeable:!0,state:a,status:"error",message:Sa(i,n("Failed to verify code, please try again"),n)})}}}async function b$({data:e,state:t,api:a}){try{let{plan:n,tierId:i,cadence:r,email:o,name:s,newsletters:l,offerId:c}=e;if(n.toLowerCase()==="free"){const d=await a.member.getIntegrityToken();await a.member.sendMagicLink({emailType:"signup",integrityToken:d,...e})}else return i&&r?await a.member.checkoutPlan({plan:n,tierId:i,cadence:r,email:o,name:s,newsletters:l,offerId:c}):({tierId:i,cadence:r}=wa({site:t==null?void 0:t.site,priceId:n}),await a.member.checkoutPlan({plan:n,tierId:i,cadence:r,email:o,name:s,newsletters:l,offerId:c})),{page:"loading"};return{page:"magiclink",lastPage:"signup"}}catch(n){const{t:i}=t,r=Sa(n,i("Failed to sign up, please try again"),i);return{action:"signup:failed",popupNotification:q({type:"signup:failed",autoHide:!1,closeable:!0,state:t,status:"error",message:r})}}}async function y$({data:e,state:t,api:a}){try{let{plan:n,offerId:i,tierId:r,cadence:o}=e;(!r||!o)&&({tierId:r,cadence:o}=wa({site:t==null?void 0:t.site,priceId:n})),await a.member.checkoutPlan({plan:n,tierId:r,cadence:o,offerId:i,metadata:{checkoutType:"upgrade"}})}catch{const{t:i}=t;return{action:"checkoutPlan:failed",popupNotification:q({type:"checkoutPlan:failed",autoHide:!1,closeable:!0,state:t,status:"error",message:i("Failed to process checkout, please try again")})}}}async function k$({data:e,state:t,api:a}){const{t:n}=t;try{const{plan:i,planId:r,subscriptionId:o,cancelAtPeriodEnd:s}=e,{tierId:l,cadence:c}=wa({site:t==null?void 0:t.site,priceId:r});await a.member.updateSubscription({planName:i,tierId:l,cadence:c,subscriptionId:o,cancelAtPeriodEnd:s,planId:r});const d=await a.member.sessionData(),p="updateSubscription:success";return{action:p,popupNotification:q({type:p,autoHide:!0,closeable:!0,state:t,status:"success",message:n("Subscription plan updated successfully")}),page:"accountHome",member:d}}catch{return{action:"updateSubscription:failed",popupNotification:q({type:"updateSubscription:failed",autoHide:!1,closeable:!0,state:t,status:"error",message:n("Failed to update subscription, please try again")})}}}async function v$({data:e,state:t,api:a}){try{const{subscriptionId:n,cancellationReason:i}=e;return await a.member.updateSubscription({subscriptionId:n,smartCancel:!0,cancellationReason:i}),{action:"cancelSubscription:success",page:"accountHome",member:await a.member.sessionData()}}catch{const{t:i}=t;return{action:"cancelSubscription:failed",popupNotification:q({type:"cancelSubscription:failed",autoHide:!1,closeable:!0,state:t,status:"error",message:i("Failed to cancel subscription, please try again")})}}}async function w$({data:e,state:t,api:a}){try{const{subscriptionId:n}=e;return await a.member.updateSubscription({subscriptionId:n,cancelAtPeriodEnd:!1}),{action:"continueSubscription:success",page:"accountHome",member:await a.member.sessionData()}}catch{const{t:i}=t;return{action:"continueSubscription:failed",popupNotification:q({type:"continueSubscription:failed",autoHide:!1,closeable:!0,state:t,status:"error",message:i("Failed to cancel subscription, please try again")})}}}async function S$({data:e,state:t,api:a}){try{await a.member.editBilling(e)}catch{const{t:i}=t;return{action:"editBilling:failed",popupNotification:q({type:"editBilling:failed",autoHide:!1,closeable:!0,state:t,status:"error",message:i("Failed to update billing information, please try again")})}}}async function x$(){return{popupNotification:null}}async function E$({data:e,state:t}){let{action:a,message:n=""}=e;return a=a||"showPopupNotification:success",{popupNotification:q({type:a,autoHide:!0,closeable:!0,state:t,status:"success",message:n})}}async function C$({data:e,state:t,api:a}){try{const{newsletters:n,enableCommentNotifications:i}=e;if(!n&&i===void 0)return{};const r={};return n&&(r.newsletters=n),i!==void 0&&(r.enableCommentNotifications=i),{action:"updateNewsletterPref:success",member:await a.member.update(r)}}catch{const{t:i}=t;return{action:"updateNewsletterPref:failed",popupNotification:q({type:"updateNewsletter:failed",autoHide:!0,closeable:!0,state:t,status:"error",message:i("Failed to update newsletter settings")})}}}async function j$({state:e,api:t}){const{t:a}=e;try{return await t.member.deleteSuppression(),{action:"removeEmailFromSuppressionList:success",popupNotification:q({type:"removeEmailFromSuppressionList:success",autoHide:!0,closeable:!0,state:e,status:"success",message:a("You have been successfully resubscribed")})}}catch{return{action:"removeEmailFromSuppressionList:failed",popupNotification:q({type:"removeEmailFromSuppressionList:failed",autoHide:!0,closeable:!0,state:e,status:"error",message:a("Your email has failed to resubscribe, please try again")})}}}async function $$({data:e,state:t,api:a}){const{t:n}=t;try{const{subscribed:i}=e,r=await a.member.update({subscribed:i});if(!r)throw new Error("Failed to update newsletter");const o="updateNewsletter:success";return{action:o,member:r,popupNotification:q({type:o,autoHide:!0,closeable:!0,state:t,status:"success",message:n("Email newsletter settings updated")})}}catch{return{action:"updateNewsletter:failed",popupNotification:q({type:"updateNewsletter:failed",autoHide:!0,closeable:!0,state:t,status:"error",message:n("Failed to update newsletter settings")})}}}async function T$({data:e,state:t,api:a}){const{email:n}=e,i=$E({member:t.member});if(n!==i)try{return await a.member.updateEmailAddress({email:n}),{success:!0}}catch(r){return{success:!1,error:r}}return null}async function P$({data:e,state:t,api:a}){const{name:n}=e;if(PE({member:t.member})!==n)try{const r=await a.member.update({name:n});if(!r)throw new Error("Failed to update member");return{member:r,success:!0}}catch(r){return{success:!1,error:r}}return null}async function z$({state:e,api:t}){if(e.member)try{const a=await t.member.sessionData();return a?{member:a,success:!0,action:"refreshMemberData:success"}:null}catch(a){return{success:!1,error:a,action:"refreshMemberData:failed"}}return null}async function N$({data:e,state:t,api:a}){const{t:n}=t,[i,r]=await Promise.all([P$({data:e,state:t,api:a}),T$({data:e,state:t,api:a})]);if(i&&r){if(r.success)return{action:"updateProfile:success",...i.success?{member:i.member}:{},page:"accountHome",popupNotification:q({type:"updateProfile:success",autoHide:!0,closeable:!0,status:"success",state:t,message:n("Check your inbox to verify email update")})};const o=i.success?n("Failed to send verification email"):n("Failed to update account data");return{action:"updateProfile:failed",...i.success?{member:i.member}:{},popupNotification:q({type:"updateProfile:failed",autoHide:!0,closeable:!0,status:"error",message:o,state:t})}}else if(i){const o=i.success?"updateProfile:success":"updateProfile:failed",s=i.success?"success":"error",l=i.success?n("Account details updated successfully"):n("Failed to update account details");return{action:o,...i.success?{member:i.member}:{},...i.success?{page:"accountHome"}:{},popupNotification:q({type:o,autoHide:i.success,closeable:!0,status:s,state:t,message:l})}}else if(r){const o=r.success?"updateProfile:success":"updateProfile:failed",s=r.success?"success":"error";let l="";return r.error?l=Sa(r.error,n("Failed to send verification email"),n):l=n("Check your inbox to verify email update"),{action:o,...r.success?{page:"accountHome"}:{},popupNotification:q({type:o,autoHide:r.success,closeable:!0,status:s,state:t,message:l})}}return{action:"updateProfile:success",page:"accountHome",popupNotification:q({type:"updateProfile:success",autoHide:!0,closeable:!0,status:"success",state:t,message:n("Account details updated successfully")})}}async function A$({data:{siteUrl:e},state:t}){const a=Bo({siteUrl:e,apiUrl:"not-defined"}),{member:n}=t,i=window.location.href,r=mg(),o=await a.member.getIntegrityToken();return await a.member.sendMagicLink({emailType:"signup",name:n.name,email:n.email,autoRedirect:!1,integrityToken:o,customUrlHistory:t.site.outbound_link_tagging?[{time:Date.now(),referrerSource:r,referrerMedium:"Ghost Recommendations",referrerUrl:i}]:[]}),{}}function I$({data:{recommendationId:e},api:t}){try{const a=localStorage.getItem("ghost-recommendations-clicked"),n=a?JSON.parse(a):[];if(n.includes(e))return;n.push(e),localStorage.setItem("ghost-recommendations-clicked",JSON.stringify(n))}catch{}return t.recommendations.trackClicked({recommendationId:e}),{}}async function D$({data:{recommendationId:e},api:t}){return t.recommendations.trackSubscribed({recommendationId:e}),{}}const F$={togglePopup:u$,openPopup:c$,closePopup:xf,switchPage:l$,openNotification:m$,closeNotification:p$,back:d$,signout:h$,signin:g$,verifyOTC:f$,signup:b$,updateSubscription:k$,cancelSubscription:v$,continueSubscription:w$,updateNewsletter:$$,updateProfile:N$,refreshMemberData:z$,clearPopupNotification:x$,editBilling:S$,checkoutPlan:y$,updateNewsletterPreference:C$,showPopupNotification:E$,removeEmailFromSuppressionList:j$,oneClickSubscribe:A$,trackRecommendationClicked:I$,trackRecommendationSubscribed:D$};async function M$({action:e,data:t,state:a,api:n}){const i=F$[e];return i?await i({data:t,state:a,api:n})||{}:{}}var Ko={exports:{}};const D=e=>typeof e=="string",Li=()=>{let e,t;const a=new Promise((n,i)=>{e=n,t=i});return a.resolve=e,a.reject=t,a},Ef=e=>e==null?"":""+e,_$=(e,t,a)=>{e.forEach(n=>{t[n]&&(a[n]=t[n])})},Y$=/###/g,Cf=e=>e&&e.indexOf("###")>-1?e.replace(Y$,"."):e,jf=e=>!e||D(e),Bi=(e,t,a)=>{const n=D(t)?t.split("."):t;let i=0;for(;i<n.length-1;){if(jf(e))return{};const r=Cf(n[i]);!e[r]&&a&&(e[r]=new a),Object.prototype.hasOwnProperty.call(e,r)?e=e[r]:e={},++i}return jf(e)?{}:{obj:e,k:Cf(n[i])}},$f=(e,t,a)=>{const{obj:n,k:i}=Bi(e,t,Object);if(n!==void 0||t.length===1){n[i]=a;return}let r=t[t.length-1],o=t.slice(0,t.length-1),s=Bi(e,o,Object);for(;s.obj===void 0&&o.length;)r=`${o[o.length-1]}.${r}`,o=o.slice(0,o.length-1),s=Bi(e,o,Object),s&&s.obj&&typeof s.obj[`${s.k}.${r}`]<"u"&&(s.obj=void 0);s.obj[`${s.k}.${r}`]=a},R$=(e,t,a,n)=>{const{obj:i,k:r}=Bi(e,t,Object);i[r]=i[r]||[],i[r].push(a)},Go=(e,t)=>{const{obj:a,k:n}=Bi(e,t);if(a)return a[n]},U$=(e,t,a)=>{const n=Go(e,a);return n!==void 0?n:Go(t,a)},Tf=(e,t,a)=>{for(const n in t)n!=="__proto__"&&n!=="constructor"&&(n in e?D(e[n])||e[n]instanceof String||D(t[n])||t[n]instanceof String?a&&(e[n]=t[n]):Tf(e[n],t[n],a):e[n]=t[n]);return e},wn=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var L$={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const B$=e=>D(e)?e.replace(/[&<>"'\/]/g,t=>L$[t]):e;class O${constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const a=this.regExpMap.get(t);if(a!==void 0)return a;const n=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,n),this.regExpQueue.push(t),n}}const V$=[" ",",","?","!",";"],H$=new O$(20),W$=(e,t,a)=>{t=t||"",a=a||"";const n=V$.filter(o=>t.indexOf(o)<0&&a.indexOf(o)<0);if(n.length===0)return!0;const i=H$.getRegExp(`(${n.map(o=>o==="?"?"\\?":o).join("|")})`);let r=!i.test(e);if(!r){const o=e.indexOf(a);o>0&&!i.test(e.substring(0,o))&&(r=!0)}return r},bc=function(e,t){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const n=t.split(a);let i=e;for(let r=0;r<n.length;){if(!i||typeof i!="object")return;let o,s="";for(let l=r;l<n.length;++l)if(l!==r&&(s+=a),s+=n[l],o=i[s],o!==void 0){if(["string","number","boolean"].indexOf(typeof o)>-1&&l<n.length-1)continue;r+=l-r+1;break}i=o}return i},qo=e=>e&&e.replace("_","-"),K$={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class Jo{constructor(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,a)}init(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=a.prefix||"i18next:",this.logger=t||K$,this.options=a,this.debug=a.debug}log(){for(var t=arguments.length,a=new Array(t),n=0;n<t;n++)a[n]=arguments[n];return this.forward(a,"log","",!0)}warn(){for(var t=arguments.length,a=new Array(t),n=0;n<t;n++)a[n]=arguments[n];return this.forward(a,"warn","",!0)}error(){for(var t=arguments.length,a=new Array(t),n=0;n<t;n++)a[n]=arguments[n];return this.forward(a,"error","")}deprecate(){for(var t=arguments.length,a=new Array(t),n=0;n<t;n++)a[n]=arguments[n];return this.forward(a,"warn","WARNING DEPRECATED: ",!0)}forward(t,a,n,i){return i&&!this.debug?null:(D(t[0])&&(t[0]=`${n}${this.prefix} ${t[0]}`),this.logger[a](t))}create(t){return new Jo(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new Jo(this.logger,t)}}var dt=new Jo;class Zo{constructor(){this.observers={}}on(t,a){return t.split(" ").forEach(n=>{this.observers[n]||(this.observers[n]=new Map);const i=this.observers[n].get(a)||0;this.observers[n].set(a,i+1)}),this}off(t,a){if(this.observers[t]){if(!a){delete this.observers[t];return}this.observers[t].delete(a)}}emit(t){for(var a=arguments.length,n=new Array(a>1?a-1:0),i=1;i<a;i++)n[i-1]=arguments[i];this.observers[t]&&Array.from(this.observers[t].entries()).forEach(o=>{let[s,l]=o;for(let c=0;c<l;c++)s(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(o=>{let[s,l]=o;for(let c=0;c<l;c++)s.apply(s,[t,...n])})}}class Pf extends Zo{constructor(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=a,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const a=this.options.ns.indexOf(t);a>-1&&this.options.ns.splice(a,1)}getResource(t,a,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const r=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,o=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let s;t.indexOf(".")>-1?s=t.split("."):(s=[t,a],n&&(Array.isArray(n)?s.push(...n):D(n)&&r?s.push(...n.split(r)):s.push(n)));const l=Go(this.data,s);return!l&&!a&&!n&&t.indexOf(".")>-1&&(t=s[0],a=s[1],n=s.slice(2).join(".")),l||!o||!D(n)?l:bc(this.data&&this.data[t]&&this.data[t][a],n,r)}addResource(t,a,n,i){let r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const o=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let s=[t,a];n&&(s=s.concat(o?n.split(o):n)),t.indexOf(".")>-1&&(s=t.split("."),i=a,a=s[1]),this.addNamespaces(a),$f(this.data,s,i),r.silent||this.emit("added",t,a,n,i)}addResources(t,a,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const r in n)(D(n[r])||Array.isArray(n[r]))&&this.addResource(t,a,r,n[r],{silent:!0});i.silent||this.emit("added",t,a,n)}addResourceBundle(t,a,n,i,r){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},s=[t,a];t.indexOf(".")>-1&&(s=t.split("."),i=n,n=a,a=s[1]),this.addNamespaces(a);let l=Go(this.data,s)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),i?Tf(l,n,r):l={...l,...n},$f(this.data,s,l),o.silent||this.emit("added",t,a,n)}removeResourceBundle(t,a){this.hasResourceBundle(t,a)&&delete this.data[t][a],this.removeNamespaces(a),this.emit("removed",t,a)}hasResourceBundle(t,a){return this.getResource(t,a)!==void 0}getResourceBundle(t,a){return a||(a=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,a)}:this.getResource(t,a)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const a=this.getDataByLanguage(t);return!!(a&&Object.keys(a)||[]).find(i=>a[i]&&Object.keys(a[i]).length>0)}toJSON(){return this.data}}var zf={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,a,n,i){return e.forEach(r=>{this.processors[r]&&(t=this.processors[r].process(t,a,n,i))}),t}};const Nf={};class Qo extends Zo{constructor(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),_$(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=a,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=dt.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const n=this.resolve(t,a);return n&&n.res!==void 0}extractFromKey(t,a){let n=a.nsSeparator!==void 0?a.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const i=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let r=a.ns||this.options.defaultNS||[];const o=n&&t.indexOf(n)>-1,s=!this.options.userDefinedKeySeparator&&!a.keySeparator&&!this.options.userDefinedNsSeparator&&!a.nsSeparator&&!W$(t,n,i);if(o&&!s){const l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:D(r)?[r]:r};const c=t.split(n);(n!==i||n===i&&this.options.ns.indexOf(c[0])>-1)&&(r=c.shift()),t=c.join(i)}return{key:t,namespaces:D(r)?[r]:r}}translate(t,a,n){if(typeof a!="object"&&this.options.overloadTranslationOptionHandler&&(a=this.options.overloadTranslationOptionHandler(arguments)),typeof a=="object"&&(a={...a}),a||(a={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const i=a.returnDetails!==void 0?a.returnDetails:this.options.returnDetails,r=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,{key:o,namespaces:s}=this.extractFromKey(t[t.length-1],a),l=s[s.length-1],c=a.lng||this.language,d=a.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&c.toLowerCase()==="cimode"){if(d){const S=a.nsSeparator||this.options.nsSeparator;return i?{res:`${l}${S}${o}`,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(a)}:`${l}${S}${o}`}return i?{res:o,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(a)}:o}const p=this.resolve(t,a);let m=p&&p.res;const h=p&&p.usedKey||o,b=p&&p.exactUsedKey||o,v=Object.prototype.toString.apply(m),f=["[object Number]","[object Function]","[object RegExp]"],g=a.joinArrays!==void 0?a.joinArrays:this.options.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,w=!D(m)&&typeof m!="boolean"&&typeof m!="number";if(y&&m&&w&&f.indexOf(v)<0&&!(D(g)&&Array.isArray(m))){if(!a.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const S=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,m,{...a,ns:s}):`key '${o} (${this.language})' returned an object instead of string.`;return i?(p.res=S,p.usedParams=this.getUsedParamsDetails(a),p):S}if(r){const S=Array.isArray(m),j=S?[]:{},x=S?b:h;for(const C in m)if(Object.prototype.hasOwnProperty.call(m,C)){const z=`${x}${r}${C}`;j[C]=this.translate(z,{...a,joinArrays:!1,ns:s}),j[C]===z&&(j[C]=m[C])}m=j}}else if(y&&D(g)&&Array.isArray(m))m=m.join(g),m&&(m=this.extendTranslation(m,t,a,n));else{let S=!1,j=!1;const x=a.count!==void 0&&!D(a.count),C=Qo.hasDefaultValue(a),z=x?this.pluralResolver.getSuffix(c,a.count,a):"",E=a.ordinal&&x?this.pluralResolver.getSuffix(c,a.count,{ordinal:!1}):"",M=x&&!a.ordinal&&a.count===0&&this.pluralResolver.shouldUseIntlApi(),K=M&&a[`defaultValue${this.options.pluralSeparator}zero`]||a[`defaultValue${z}`]||a[`defaultValue${E}`]||a.defaultValue;!this.isValidLookup(m)&&C&&(S=!0,m=K),this.isValidLookup(m)||(j=!0,m=o);const ne=(a.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&j?void 0:m,mt=C&&K!==m&&this.options.updateMissing;if(j||S||mt){if(this.logger.log(mt?"updateKey":"missingKey",c,l,o,mt?K:m),r){const fe=this.resolve(o,{...a,keySeparator:!1});fe&&fe.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let _e=[];const pt=this.languageUtils.getFallbackCodes(this.options.fallbackLng,a.lng||this.language);if(this.options.saveMissingTo==="fallback"&&pt&&pt[0])for(let fe=0;fe<pt.length;fe++)_e.push(pt[fe]);else this.options.saveMissingTo==="all"?_e=this.languageUtils.toResolveHierarchy(a.lng||this.language):_e.push(a.lng||this.language);const xn=(fe,Qe,Ea)=>{const T=C&&Ea!==m?Ea:ne;this.options.missingKeyHandler?this.options.missingKeyHandler(fe,l,Qe,T,mt,a):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(fe,l,Qe,T,mt,a),this.emit("missingKey",fe,l,Qe,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&x?_e.forEach(fe=>{const Qe=this.pluralResolver.getSuffixes(fe,a);M&&a[`defaultValue${this.options.pluralSeparator}zero`]&&Qe.indexOf(`${this.options.pluralSeparator}zero`)<0&&Qe.push(`${this.options.pluralSeparator}zero`),Qe.forEach(Ea=>{xn([fe],o+Ea,a[`defaultValue${Ea}`]||K)})}):xn(_e,o,K))}m=this.extendTranslation(m,t,a,p,n),j&&m===o&&this.options.appendNamespaceToMissingKey&&(m=`${l}:${o}`),(j||S)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${o}`:o,S?m:void 0):m=this.options.parseMissingKeyHandler(m))}return i?(p.res=m,p.usedParams=this.getUsedParamsDetails(a),p):m}extendTranslation(t,a,n,i,r){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const c=D(t)&&(n&&n.interpolation&&n.interpolation.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let d;if(c){const m=t.match(this.interpolator.nestingRegexp);d=m&&m.length}let p=n.replace&&!D(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(p={...this.options.interpolation.defaultVariables,...p}),t=this.interpolator.interpolate(t,p,n.lng||this.language||i.usedLng,n),c){const m=t.match(this.interpolator.nestingRegexp),h=m&&m.length;d<h&&(n.nest=!1)}!n.lng&&this.options.compatibilityAPI!=="v1"&&i&&i.res&&(n.lng=this.language||i.usedLng),n.nest!==!1&&(t=this.interpolator.nest(t,function(){for(var m=arguments.length,h=new Array(m),b=0;b<m;b++)h[b]=arguments[b];return r&&r[0]===h[0]&&!n.context?(o.logger.warn(`It seems you are nesting recursively key: ${h[0]} in key: ${a[0]}`),null):o.translate(...h,a)},n)),n.interpolation&&this.interpolator.reset()}const s=n.postProcess||this.options.postProcess,l=D(s)?[s]:s;return t!=null&&l&&l.length&&n.applyPostProcessor!==!1&&(t=zf.handle(l,t,a,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),t}resolve(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n,i,r,o,s;return D(t)&&(t=[t]),t.forEach(l=>{if(this.isValidLookup(n))return;const c=this.extractFromKey(l,a),d=c.key;i=d;let p=c.namespaces;this.options.fallbackNS&&(p=p.concat(this.options.fallbackNS));const m=a.count!==void 0&&!D(a.count),h=m&&!a.ordinal&&a.count===0&&this.pluralResolver.shouldUseIntlApi(),b=a.context!==void 0&&(D(a.context)||typeof a.context=="number")&&a.context!=="",v=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);p.forEach(f=>{this.isValidLookup(n)||(s=f,!Nf[`${v[0]}-${f}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(s)&&(Nf[`${v[0]}-${f}`]=!0,this.logger.warn(`key "${i}" for languages "${v.join(", ")}" won't get resolved as namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),v.forEach(g=>{if(this.isValidLookup(n))return;o=g;const y=[d];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(y,d,g,f,a);else{let S;m&&(S=this.pluralResolver.getSuffix(g,a.count,a));const j=`${this.options.pluralSeparator}zero`,x=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(m&&(y.push(d+S),a.ordinal&&S.indexOf(x)===0&&y.push(d+S.replace(x,this.options.pluralSeparator)),h&&y.push(d+j)),b){const C=`${d}${this.options.contextSeparator}${a.context}`;y.push(C),m&&(y.push(C+S),a.ordinal&&S.indexOf(x)===0&&y.push(C+S.replace(x,this.options.pluralSeparator)),h&&y.push(C+j))}}let w;for(;w=y.pop();)this.isValidLookup(n)||(r=w,n=this.getResource(g,f,w,a))}))})}),{res:n,usedKey:i,exactUsedKey:r,usedLng:o,usedNS:s}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,a,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,a,n,i):this.resourceStore.getResource(t,a,n,i)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const a=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=t.replace&&!D(t.replace);let i=n?t.replace:t;if(n&&typeof t.count<"u"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!n){i={...i};for(const r of a)delete i[r]}return i}static hasDefaultValue(t){const a="defaultValue";for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&a===n.substring(0,a.length)&&t[n]!==void 0)return!0;return!1}}const yc=e=>e.charAt(0).toUpperCase()+e.slice(1);class Af{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=dt.create("languageUtils")}getScriptPartFromCode(t){if(t=qo(t),!t||t.indexOf("-")<0)return null;const a=t.split("-");return a.length===2||(a.pop(),a[a.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(a.join("-"))}getLanguagePartFromCode(t){if(t=qo(t),!t||t.indexOf("-")<0)return t;const a=t.split("-");return this.formatLanguageCode(a[0])}formatLanguageCode(t){if(D(t)&&t.indexOf("-")>-1){if(typeof Intl<"u"&&typeof Intl.getCanonicalLocales<"u")try{let i=Intl.getCanonicalLocales(t)[0];if(i&&this.options.lowerCaseLng&&(i=i.toLowerCase()),i)return i}catch{}const a=["hans","hant","latn","cyrl","cans","mong","arab"];let n=t.split("-");return this.options.lowerCaseLng?n=n.map(i=>i.toLowerCase()):n.length===2?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),a.indexOf(n[1].toLowerCase())>-1&&(n[1]=yc(n[1].toLowerCase()))):n.length===3&&(n[0]=n[0].toLowerCase(),n[1].length===2&&(n[1]=n[1].toUpperCase()),n[0]!=="sgn"&&n[2].length===2&&(n[2]=n[2].toUpperCase()),a.indexOf(n[1].toLowerCase())>-1&&(n[1]=yc(n[1].toLowerCase())),a.indexOf(n[2].toLowerCase())>-1&&(n[2]=yc(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let a;return t.forEach(n=>{if(a)return;const i=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(i))&&(a=i)}),!a&&this.options.supportedLngs&&t.forEach(n=>{if(a)return;const i=this.getLanguagePartFromCode(n);if(this.isSupportedCode(i))return a=i;a=this.options.supportedLngs.find(r=>{if(r===i)return r;if(!(r.indexOf("-")<0&&i.indexOf("-")<0)&&(r.indexOf("-")>0&&i.indexOf("-")<0&&r.substring(0,r.indexOf("-"))===i||r.indexOf(i)===0&&i.length>1))return r})}),a||(a=this.getFallbackCodes(this.options.fallbackLng)[0]),a}getFallbackCodes(t,a){if(!t)return[];if(typeof t=="function"&&(t=t(a)),D(t)&&(t=[t]),Array.isArray(t))return t;if(!a)return t.default||[];let n=t[a];return n||(n=t[this.getScriptPartFromCode(a)]),n||(n=t[this.formatLanguageCode(a)]),n||(n=t[this.getLanguagePartFromCode(a)]),n||(n=t.default),n||[]}toResolveHierarchy(t,a){const n=this.getFallbackCodes(a||this.options.fallbackLng||[],t),i=[],r=o=>{o&&(this.isSupportedCode(o)?i.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return D(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&r(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&r(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&r(this.getLanguagePartFromCode(t))):D(t)&&r(this.formatLanguageCode(t)),n.forEach(o=>{i.indexOf(o)<0&&r(this.formatLanguageCode(o))}),i}}let G$=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],q$={1:e=>+(e>1),2:e=>+(e!=1),3:e=>0,4:e=>e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,5:e=>e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5,6:e=>e==1?0:e>=2&&e<=4?1:2,7:e=>e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,8:e=>e==1?0:e==2?1:e!=8&&e!=11?2:3,9:e=>+(e>=2),10:e=>e==1?0:e==2?1:e<7?2:e<11?3:4,11:e=>e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3,12:e=>+(e%10!=1||e%100==11),13:e=>+(e!==0),14:e=>e==1?0:e==2?1:e==3?2:3,15:e=>e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2,16:e=>e%10==1&&e%100!=11?0:e!==0?1:2,17:e=>e==1||e%10==1&&e%100!=11?0:1,18:e=>e==0?0:e==1?1:2,19:e=>e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3,20:e=>e==1?0:e==0||e%100>0&&e%100<20?1:2,21:e=>e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0,22:e=>e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3};const J$=["v1","v2","v3"],Z$=["v4"],If={zero:0,one:1,two:2,few:3,many:4,other:5},Q$=()=>{const e={};return G$.forEach(t=>{t.lngs.forEach(a=>{e[a]={numbers:t.nr,plurals:q$[t.fc]}})}),e};class X${constructor(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=a,this.logger=dt.create("pluralResolver"),(!this.options.compatibilityJSON||Z$.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=Q$(),this.pluralRulesCache={}}addRule(t,a){this.rules[t]=a}clearCache(){this.pluralRulesCache={}}getRule(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi()){const n=qo(t==="dev"?"en":t),i=a.ordinal?"ordinal":"cardinal",r=JSON.stringify({cleanedCode:n,type:i});if(r in this.pluralRulesCache)return this.pluralRulesCache[r];let o;try{o=new Intl.PluralRules(n,{type:i})}catch{if(!t.match(/-|_/))return;const l=this.languageUtils.getLanguagePartFromCode(t);o=this.getRule(l,a)}return this.pluralRulesCache[r]=o,o}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(t,a);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(t,a){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,n).map(i=>`${a}${i}`)}getSuffixes(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(t,a);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort((i,r)=>If[i]-If[r]).map(i=>`${this.options.prepend}${a.ordinal?`ordinal${this.options.prepend}`:""}${i}`):n.numbers.map(i=>this.getSuffix(t,i,a)):[]}getSuffix(t,a){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(t,n);return i?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i.select(a)}`:this.getSuffixRetroCompatible(i,a):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,a){const n=t.noAbs?t.plurals(a):t.plurals(Math.abs(a));let i=t.numbers[n];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));const r=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?`_plural_${i.toString()}`:r():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?r():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!J$.includes(this.options.compatibilityJSON)}}const Df=function(e,t,a){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,r=U$(e,t,a);return!r&&i&&D(a)&&(r=bc(e,a,n),r===void 0&&(r=bc(t,a,n))),r},kc=e=>e.replace(/\$/g,"$$$$");class e0{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=dt.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(a=>a),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:a,escapeValue:n,useRawValueToEscape:i,prefix:r,prefixEscaped:o,suffix:s,suffixEscaped:l,formatSeparator:c,unescapeSuffix:d,unescapePrefix:p,nestingPrefix:m,nestingPrefixEscaped:h,nestingSuffix:b,nestingSuffixEscaped:v,nestingOptionsSeparator:f,maxReplaces:g,alwaysFormat:y}=t.interpolation;this.escape=a!==void 0?a:B$,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=r?wn(r):o||"{{",this.suffix=s?wn(s):l||"}}",this.formatSeparator=c||",",this.unescapePrefix=d?"":p||"-",this.unescapeSuffix=this.unescapePrefix?"":d||"",this.nestingPrefix=m?wn(m):h||wn("$t("),this.nestingSuffix=b?wn(b):v||wn(")"),this.nestingOptionsSeparator=f||",",this.maxReplaces=g||1e3,this.alwaysFormat=y!==void 0?y:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(a,n)=>a&&a.source===n?(a.lastIndex=0,a):new RegExp(n,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,a,n,i){let r,o,s;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=h=>{if(h.indexOf(this.formatSeparator)<0){const g=Df(a,l,h,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(g,void 0,n,{...i,...a,interpolationkey:h}):g}const b=h.split(this.formatSeparator),v=b.shift().trim(),f=b.join(this.formatSeparator).trim();return this.format(Df(a,l,v,this.options.keySeparator,this.options.ignoreJSONStructure),f,n,{...i,...a,interpolationkey:v})};this.resetRegExp();const d=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,p=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:h=>kc(h)},{regex:this.regexp,safeValue:h=>this.escapeValue?kc(this.escape(h)):kc(h)}].forEach(h=>{for(s=0;r=h.regex.exec(t);){const b=r[1].trim();if(o=c(b),o===void 0)if(typeof d=="function"){const f=d(t,r,i);o=D(f)?f:""}else if(i&&Object.prototype.hasOwnProperty.call(i,b))o="";else if(p){o=r[0];continue}else this.logger.warn(`missed to pass in variable ${b} for interpolating ${t}`),o="";else!D(o)&&!this.useRawValueToEscape&&(o=Ef(o));const v=h.safeValue(o);if(t=t.replace(r[0],v),p?(h.regex.lastIndex+=o.length,h.regex.lastIndex-=r[0].length):h.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),t}nest(t,a){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,r,o;const s=(l,c)=>{const d=this.nestingOptionsSeparator;if(l.indexOf(d)<0)return l;const p=l.split(new RegExp(`${d}[ ]*{`));let m=`{${p[1]}`;l=p[0],m=this.interpolate(m,o);const h=m.match(/'/g),b=m.match(/"/g);(h&&h.length%2===0&&!b||b.length%2!==0)&&(m=m.replace(/'/g,'"'));try{o=JSON.parse(m),c&&(o={...c,...o})}catch(v){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,v),`${l}${d}${m}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,l};for(;i=this.nestingRegexp.exec(t);){let l=[];o={...n},o=o.replace&&!D(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let c=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const d=i[1].split(this.formatSeparator).map(p=>p.trim());i[1]=d.shift(),l=d,c=!0}if(r=a(s.call(this,i[1].trim(),o),o),r&&i[0]===t&&!D(r))return r;D(r)||(r=Ef(r)),r||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),r=""),c&&(r=l.reduce((d,p)=>this.format(d,p,n.lng,{...n,interpolationkey:i[1].trim()}),r.trim())),t=t.replace(i[0],r),this.regexp.lastIndex=0}return t}}const t0=e=>{let t=e.toLowerCase().trim();const a={};if(e.indexOf("(")>-1){const n=e.split("(");t=n[0].toLowerCase().trim();const i=n[1].substring(0,n[1].length-1);t==="currency"&&i.indexOf(":")<0?a.currency||(a.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?a.range||(a.range=i.trim()):i.split(";").forEach(o=>{if(o){const[s,...l]=o.split(":"),c=l.join(":").trim().replace(/^'+|'+$/g,""),d=s.trim();a[d]||(a[d]=c),c==="false"&&(a[d]=!1),c==="true"&&(a[d]=!0),isNaN(c)||(a[d]=parseInt(c,10))}})}return{formatName:t,formatOptions:a}},Sn=e=>{const t={};return(a,n,i)=>{let r=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(r={...r,[i.interpolationkey]:void 0});const o=n+JSON.stringify(r);let s=t[o];return s||(s=e(qo(n),i),t[o]=s),s(a)}};class a0{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=dt.create("formatter"),this.options=t,this.formats={number:Sn((a,n)=>{const i=new Intl.NumberFormat(a,{...n});return r=>i.format(r)}),currency:Sn((a,n)=>{const i=new Intl.NumberFormat(a,{...n,style:"currency"});return r=>i.format(r)}),datetime:Sn((a,n)=>{const i=new Intl.DateTimeFormat(a,{...n});return r=>i.format(r)}),relativetime:Sn((a,n)=>{const i=new Intl.RelativeTimeFormat(a,{...n});return r=>i.format(r,n.range||"day")}),list:Sn((a,n)=>{const i=new Intl.ListFormat(a,{...n});return r=>i.format(r)})},this.init(t)}init(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=a.interpolation.formatSeparator||","}add(t,a){this.formats[t.toLowerCase().trim()]=a}addCached(t,a){this.formats[t.toLowerCase().trim()]=Sn(a)}format(t,a,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const r=a.split(this.formatSeparator);if(r.length>1&&r[0].indexOf("(")>1&&r[0].indexOf(")")<0&&r.find(s=>s.indexOf(")")>-1)){const s=r.findIndex(l=>l.indexOf(")")>-1);r[0]=[r[0],...r.splice(1,s)].join(this.formatSeparator)}return r.reduce((s,l)=>{const{formatName:c,formatOptions:d}=t0(l);if(this.formats[c]){let p=s;try{const m=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},h=m.locale||m.lng||i.locale||i.lng||n;p=this.formats[c](s,h,{...d,...i,...m})}catch(m){this.logger.warn(m)}return p}else this.logger.warn(`there was no format function for ${c}`);return s},t)}}const n0=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class i0 extends Zo{constructor(t,a,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=a,this.services=n,this.languageUtils=n.languageUtils,this.options=i,this.logger=dt.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,i.backend,i)}queueLoad(t,a,n,i){const r={},o={},s={},l={};return t.forEach(c=>{let d=!0;a.forEach(p=>{const m=`${c}|${p}`;!n.reload&&this.store.hasResourceBundle(c,p)?this.state[m]=2:this.state[m]<0||(this.state[m]===1?o[m]===void 0&&(o[m]=!0):(this.state[m]=1,d=!1,o[m]===void 0&&(o[m]=!0),r[m]===void 0&&(r[m]=!0),l[p]===void 0&&(l[p]=!0)))}),d||(s[c]=!0)}),(Object.keys(r).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(r),pending:Object.keys(o),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(l)}}loaded(t,a,n){const i=t.split("|"),r=i[0],o=i[1];a&&this.emit("failedLoading",r,o,a),!a&&n&&this.store.addResourceBundle(r,o,n,void 0,void 0,{skipCopy:!0}),this.state[t]=a?-1:2,a&&n&&(this.state[t]=0);const s={};this.queue.forEach(l=>{R$(l.loaded,[r],o),n0(l,t),a&&l.errors.push(a),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(c=>{s[c]||(s[c]={});const d=l.loaded[c];d.length&&d.forEach(p=>{s[c][p]===void 0&&(s[c][p]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(l=>!l.done)}read(t,a,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!t.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:a,fcName:n,tried:i,wait:r,callback:o});return}this.readingCalls++;const s=(c,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const p=this.waitingReads.shift();this.read(p.lng,p.ns,p.fcName,p.tried,p.wait,p.callback)}if(c&&d&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,t,a,n,i+1,r*2,o)},r);return}o(c,d)},l=this.backend[n].bind(this.backend);if(l.length===2){try{const c=l(t,a);c&&typeof c.then=="function"?c.then(d=>s(null,d)).catch(s):s(null,c)}catch(c){s(c)}return}return l(t,a,s)}prepareLoading(t,a){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();D(t)&&(t=this.languageUtils.toResolveHierarchy(t)),D(a)&&(a=[a]);const r=this.queueLoad(t,a,n,i);if(!r.toLoad.length)return r.pending.length||i(),null;r.toLoad.forEach(o=>{this.loadOne(o)})}load(t,a,n){this.prepareLoading(t,a,{},n)}reload(t,a,n){this.prepareLoading(t,a,{reload:!0},n)}loadOne(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const n=t.split("|"),i=n[0],r=n[1];this.read(i,r,"read",void 0,void 0,(o,s)=>{o&&this.logger.warn(`${a}loading namespace ${r} for language ${i} failed`,o),!o&&s&&this.logger.log(`${a}loaded namespace ${r} for language ${i}`,s),this.loaded(t,o,s)})}saveMissing(t,a,n,i,r){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},s=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(a)){this.logger.warn(`did not save key "${n}" as the namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(n==null||n==="")){if(this.backend&&this.backend.create){const l={...o,isUpdate:r},c=this.backend.create.bind(this.backend);if(c.length<6)try{let d;c.length===5?d=c(t,a,n,i,l):d=c(t,a,n,i),d&&typeof d.then=="function"?d.then(p=>s(null,p)).catch(s):s(null,d)}catch(d){s(d)}else c(t,a,n,i,s,l)}!t||!t[0]||this.store.addResource(t[0],a,n,i)}}}const Ff=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),D(e[1])&&(t.defaultValue=e[1]),D(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const a=e[3]||e[2];Object.keys(a).forEach(n=>{t[n]=a[n]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),Mf=e=>(D(e.ns)&&(e.ns=[e.ns]),D(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),D(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),Xo=()=>{},r0=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(a=>{typeof e[a]=="function"&&(e[a]=e[a].bind(e))})};class Oi extends Zo{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Mf(t),this.services={},this.logger=dt,this.modules={external:[]},r0(this),a&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,a),this;setTimeout(()=>{this.init(t,a)},0)}}init(){var t=this;let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof a=="function"&&(n=a,a={}),!a.defaultNS&&a.defaultNS!==!1&&a.ns&&(D(a.ns)?a.defaultNS=a.ns:a.ns.indexOf("translation")<0&&(a.defaultNS=a.ns[0]));const i=Ff();this.options={...i,...this.options,...Mf(a)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...i.interpolation,...this.options.interpolation}),a.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=a.keySeparator),a.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=a.nsSeparator);const r=d=>d?typeof d=="function"?new d:d:null;if(!this.options.isClone){this.modules.logger?dt.init(r(this.modules.logger),this.options):dt.init(null,this.options);let d;this.modules.formatter?d=this.modules.formatter:typeof Intl<"u"&&(d=a0);const p=new Af(this.options);this.store=new Pf(this.options.resources,this.options);const m=this.services;m.logger=dt,m.resourceStore=this.store,m.languageUtils=p,m.pluralResolver=new X$(p,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),d&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(m.formatter=r(d),m.formatter.init(m,this.options),this.options.interpolation.format=m.formatter.format.bind(m.formatter)),m.interpolator=new e0(this.options),m.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},m.backendConnector=new i0(r(this.modules.backend),m.resourceStore,m,this.options),m.backendConnector.on("*",function(h){for(var b=arguments.length,v=new Array(b>1?b-1:0),f=1;f<b;f++)v[f-1]=arguments[f];t.emit(h,...v)}),this.modules.languageDetector&&(m.languageDetector=r(this.modules.languageDetector),m.languageDetector.init&&m.languageDetector.init(m,this.options.detection,this.options)),this.modules.i18nFormat&&(m.i18nFormat=r(this.modules.i18nFormat),m.i18nFormat.init&&m.i18nFormat.init(this)),this.translator=new Qo(this.services,this.options),this.translator.on("*",function(h){for(var b=arguments.length,v=new Array(b>1?b-1:0),f=1;f<b;f++)v[f-1]=arguments[f];t.emit(h,...v)}),this.modules.external.forEach(h=>{h.init&&h.init(this)})}if(this.format=this.options.interpolation.format,n||(n=Xo),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.length>0&&d[0]!=="dev"&&(this.options.lng=d[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(d=>{this[d]=function(){return t.store[d](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(d=>{this[d]=function(){return t.store[d](...arguments),t}});const l=Li(),c=()=>{const d=(p,m)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(m),n(p,m)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return d(null,this.t.bind(this));this.changeLanguage(this.options.lng,d)};return this.options.resources||!this.options.initImmediate?c():setTimeout(c,0),l}loadResources(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Xo;const i=D(t)?t:this.language;if(typeof t=="function"&&(n=t),!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const r=[],o=s=>{if(!s||s==="cimode")return;this.services.languageUtils.toResolveHierarchy(s).forEach(c=>{c!=="cimode"&&r.indexOf(c)<0&&r.push(c)})};i?o(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>o(l)),this.options.preload&&this.options.preload.forEach(s=>o(s)),this.services.backendConnector.load(r,this.options.ns,s=>{!s&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(s)})}else n(null)}reloadResources(t,a,n){const i=Li();return typeof t=="function"&&(n=t,t=void 0),typeof a=="function"&&(n=a,a=void 0),t||(t=this.languages),a||(a=this.options.ns),n||(n=Xo),this.services.backendConnector.reload(t,a,r=>{i.resolve(),n(r)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&zf.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let a=0;a<this.languages.length;a++){const n=this.languages[a];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}changeLanguage(t,a){var n=this;this.isLanguageChangingTo=t;const i=Li();this.emit("languageChanging",t);const r=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},o=(l,c)=>{c?(r(c),this.translator.changeLanguage(c),this.isLanguageChangingTo=void 0,this.emit("languageChanged",c),this.logger.log("languageChanged",c)):this.isLanguageChangingTo=void 0,i.resolve(function(){return n.t(...arguments)}),a&&a(l,function(){return n.t(...arguments)})},s=l=>{!t&&!l&&this.services.languageDetector&&(l=[]);const c=D(l)?l:this.services.languageUtils.getBestMatchFromCodes(l);c&&(this.language||r(c),this.translator.language||this.translator.changeLanguage(c),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(c)),this.loadResources(c,d=>{o(d,c)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(t),i}getFixedT(t,a,n){var i=this;const r=function(o,s){let l;if(typeof s!="object"){for(var c=arguments.length,d=new Array(c>2?c-2:0),p=2;p<c;p++)d[p-2]=arguments[p];l=i.options.overloadTranslationOptionHandler([o,s].concat(d))}else l={...s};l.lng=l.lng||r.lng,l.lngs=l.lngs||r.lngs,l.ns=l.ns||r.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||n||r.keyPrefix);const m=i.options.keySeparator||".";let h;return l.keyPrefix&&Array.isArray(o)?h=o.map(b=>`${l.keyPrefix}${m}${b}`):h=l.keyPrefix?`${l.keyPrefix}${m}${o}`:o,i.t(h,l)};return D(t)?r.lng=t:r.lngs=t,r.ns=a,r.keyPrefix=n,r}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=a.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,r=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const o=(s,l)=>{const c=this.services.backendConnector.state[`${s}|${l}`];return c===-1||c===0||c===2};if(a.precheck){const s=a.precheck(this,o);if(s!==void 0)return s}return!!(this.hasResourceBundle(n,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(n,t)&&(!i||o(r,t)))}loadNamespaces(t,a){const n=Li();return this.options.ns?(D(t)&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{n.resolve(),a&&a(i)}),n):(a&&a(),Promise.resolve())}loadLanguages(t,a){const n=Li();D(t)&&(t=[t]);const i=this.options.preload||[],r=t.filter(o=>i.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return r.length?(this.options.preload=i.concat(r),this.loadResources(o=>{n.resolve(),a&&a(o)}),n):(a&&a(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const a=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],n=this.services&&this.services.languageUtils||new Af(Ff());return a.indexOf(n.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;return new Oi(t,a)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Xo;const n=t.forkResourceStore;n&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},r=new Oi(i);return(t.debug!==void 0||t.prefix!==void 0)&&(r.logger=r.logger.clone(t)),["store","services","language"].forEach(s=>{r[s]=this[s]}),r.services={...this.services},r.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},n&&(r.store=new Pf(this.store.data,i),r.services.resourceStore=r.store),r.translator=new Qo(r.services,i),r.translator.on("*",function(s){for(var l=arguments.length,c=new Array(l>1?l-1:0),d=1;d<l;d++)c[d-1]=arguments[d];r.emit(s,...c)}),r.init(i,a),r.translator.options=i,r.translator.backendConnector.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},r}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const _f=Oi.createInstance();_f.createInstance=Oi.createInstance;var o0=_f;const s0=o0,Yf=["af","ar","bg","bn","bs","ca","cs","da","de","de-CH","el","en","eo","es","et","eu","fa","fi","fr","gd","he","hi","hr","hu","id","is","it","ja","ko","kz","lt","lv","mk","mn","ms","nb","ne","nl","nn","pa","pl","pt","pt-BR","ro","ru","si","sk","sl","sq","sr","sr-Cyrl","sv","th","tr","uk","ur","uz","vi","zh","zh-Hant","sw","ta"];function Rf(e,t){return e.reduce((a,n)=>{let i;try{i=ag("/ghost/i18n/lib")(`../locales/${n}/${t}.json`)}catch{i=ag("/ghost/i18n/lib")(`../locales/en/${t}.json`)}return a[n]={[t]:{...i,...i.default&&typeof i.default=="object"?i.default:{}}},a},{})}Ko.exports=(e="en",t="portal")=>{const a=s0.createInstance(),n={prefix:"{",suffix:"}"};let i=Rf(Yf,t);return a.init({lng:e,nsSeparator:!1,keySeparator:!1,returnEmptyString:!1,fallbackLng:{no:["nb","en"],default:["en"]},ns:t,defaultNS:t,interpolation:n,resources:i}),a},Ko.exports.SUPPORTED_LOCALES=Yf,Ko.exports.generateResources=Rf;var l0=Ko.exports,u0=l0;const vc=Ne(u0);function Uf(e,t){e&&(e.innerText=t)}function c0(e,t,a,n){t.classList.add("error");const i=n("There was an error sending the email, please try again");Uf(a,Sa(e,i,n))}async function d0({event:e,form:t,errorEl:a,siteUrl:n,submitHandler:i},r=o=>o){var y;t.removeEventListener("submit",i),e.preventDefault(),a&&(a.innerText=""),t.classList.remove("success","invalid","error");let o=e.target.querySelector("input[data-members-email]"),s=e.target.querySelector("input[data-members-name]"),l=((y=t==null?void 0:t.dataset)==null?void 0:y.membersAutoredirect)||"true",c=o==null?void 0:o.value,d=s&&s.value||void 0,p,m=[],h=[],b=e.target.querySelectorAll("input[data-members-label]")||[];for(let w=0;w<b.length;++w)m.push(b[w].value);let v=e.target.querySelectorAll("input[type=hidden][data-members-newsletter], input[type=checkbox][data-members-newsletter]:checked, input[type=radio][data-members-newsletter]:checked")||[];for(let w=0;w<v.length;++w)h.push({name:v[w].value});t.dataset.membersForm&&(p=t.dataset.membersForm),t.classList.add("loading");const f=Fi(),g={email:c,emailType:p,labels:m,name:d,autoRedirect:l==="true"};f&&(g.urlHistory=f),v.length>0?g.newsletters=h:(e.target.querySelectorAll("input[type=checkbox][data-members-newsletter]")||[]).length>0&&(g.newsletters=[]);try{const S=await(await fetch(`${n}/members/api/integrity-token/`,{method:"GET"})).text(),j=await fetch(`${n}/members/api/send-magic-link/`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...g,integrityToken:S})});if(t.addEventListener("submit",i),t.classList.remove("loading"),j.ok)t.classList.add("success");else{const x=await $t.fromApiResponse(j),C=Sa(x,r("Failed to send magic link email"),r);Uf(a,C),t.classList.add("error")}}catch(w){c0(w,t,a,r)}}function m0({event:e,el:t,errorEl:a,siteUrl:n,site:i,member:r,clickHandler:o}){const s=i.locale||"en",c=vc(s,"portal").t;t.removeEventListener("click",o),e.preventDefault();let d=t.dataset.membersPlan,p=bE(i,d.toLowerCase()),m=t.dataset.membersSuccess,h=t.dataset.membersCancel,b,v;m&&(b=new URL(m,window.location.href).href),h&&(v=new URL(h,window.location.href).href),a&&(a.innerText=""),t.classList.add("loading");const f=r?{checkoutType:"upgrade"}:{},g=Fi();return g&&(f.urlHistory=g),fetch(`${n}/members/api/session`,{credentials:"same-origin"}).then(function(y){return y.ok?y.text():null}).then(function(y){return fetch(`${n}/members/api/create-stripe-checkout-session/`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...p,identity:y,successUrl:b,cancelUrl:v,metadata:f})}).then(function(w){if(!w.ok)throw new Error(c("Could not create stripe checkout session"));return w.json()})}).then(function(y){return y.url?window.location.assign(y.url):window.Stripe(y.publicKey).redirectToCheckout({sessionId:y.sessionId}).then(function(S){if(S.error)throw new Error(S.error.message)})}).catch(function(y){console.error(y),t.addEventListener("click",o),t.classList.remove("loading"),a&&(a.innerText=y.message),t.classList.add("error")})}function p0({siteUrl:e,site:t,member:a}){const n=t.locale||"en",r=vc(n,"portal").t;e&&(e=e.replace(/\/$/,""),Array.prototype.forEach.call(document.querySelectorAll("form[data-members-form]"),function(o){let s=o.querySelector("[data-members-error]");function l(c){d0({event:c,errorEl:s,form:o,siteUrl:e,submitHandler:l},r)}o.addEventListener("submit",l)}),Array.prototype.forEach.call(document.querySelectorAll("[data-members-plan]"),function(o){let s=o.querySelector("[data-members-error]");function l(c){m0({el:o,event:c,errorEl:s,member:a,site:t,siteUrl:e,clickHandler:l})}o.addEventListener("click",l)}),Array.prototype.forEach.call(document.querySelectorAll("[data-members-edit-billing]"),function(o){let s=o.querySelector("[data-members-error]"),l=o.dataset.membersSuccess,c=o.dataset.membersCancel,d,p;l&&(d=new URL(l,window.location.href).href),c&&(p=new URL(c,window.location.href).href);function m(h){o.removeEventListener("click",m),h.preventDefault(),s&&(s.innerText=""),o.classList.add("loading"),fetch(`${e}/members/api/session`,{credentials:"same-origin"}).then(function(b){return b.ok?b.text():null}).then(function(b){return fetch(`${e}/members/api/create-stripe-update-session/`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({identity:b,successUrl:d,cancelUrl:p})}).then(function(v){if(!v.ok)throw new Error(r("Could not create stripe checkout session"));return v.json()})}).then(function(b){return window.Stripe(b.publicKey).redirectToCheckout({sessionId:b.sessionId})}).then(function(b){if(b.error)throw new Error(r(b.error.message))}).catch(function(b){console.error(b),o.addEventListener("click",m),o.classList.remove("loading"),s&&(s.innerText=b.message),o.classList.add("error")})}o.addEventListener("click",m)}),Array.prototype.forEach.call(document.querySelectorAll("[data-members-signout]"),function(o){function s(l){o.removeEventListener("click",s),l.preventDefault(),o.classList.remove("error"),o.classList.add("loading"),fetch(`${e}/members/api/session`,{method:"DELETE"}).then(function(c){c.ok?window.location.replace(e):(o.addEventListener("click",s),o.classList.remove("loading"),o.classList.add("error"))})}o.addEventListener("click",s)}),Array.prototype.forEach.call(document.querySelectorAll("[data-members-cancel-subscription]"),function(o){let s=o.parentElement.querySelector("[data-members-error]");function l(c){o.removeEventListener("click",l),c.preventDefault(),o.classList.remove("error"),o.classList.add("loading");let d=o.dataset.membersCancelSubscription;return s&&(s.innerText=""),fetch(`${e}/members/api/session`,{credentials:"same-origin"}).then(function(p){return p.ok?p.text():null}).then(function(p){return fetch(`${e}/members/api/subscriptions/${d}/`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({identity:p,smart_cancel:!0})})}).then(function(p){p.ok?window.location.reload():(o.addEventListener("click",l),o.classList.remove("loading"),o.classList.add("error"),s&&(s.innerText=r("There was an error cancelling your subscription, please try again.")))})}o.addEventListener("click",l)}),Array.prototype.forEach.call(document.querySelectorAll("[data-members-continue-subscription]"),function(o){let s=o.parentElement.querySelector("[data-members-error]");function l(c){o.removeEventListener("click",l),c.preventDefault(),o.classList.remove("error"),o.classList.add("loading");let d=o.dataset.membersContinueSubscription;return s&&(s.innerText=""),fetch(`${e}/members/api/session`,{credentials:"same-origin"}).then(function(p){return p.ok?p.text():null}).then(function(p){return fetch(`${e}/members/api/subscriptions/${d}/`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({identity:p,cancel_at_period_end:!1})})}).then(function(p){p.ok?window.location.reload():(o.addEventListener("click",l),o.classList.remove("loading"),o.classList.add("error"),s&&(s.innerText=r("There was an error continuing your subscription, please try again.")))})}o.addEventListener("click",l)}))}const h0={showPopup:!0,site:vn,member:Wo.free,page:"accountEmail",...o$(),pageData:Sf};function g0({site:e,children:t}){const{portal_sentry:a}=e||{};return a&&a.dsn?u.jsx(Bu,{children:t}):u.jsx(u.Fragment,{children:t})}class f0 extends Y.Component{constructor(t){super(t),this.setupCustomTriggerButton(t),this.state={site:null,member:null,page:"loading",showPopup:!1,action:"init:running",initStatus:"running",lastPage:null,customSiteUrl:t.customSiteUrl,locale:t.locale,scrollbarWidth:0,labs:t.labs||{}}}componentDidMount(){const t=this.getScrollbarWidth();this.setState({scrollbarWidth:t}),this.initSetup()}componentDidUpdate(t,a){var n,i,r;if(a.showPopup!==this.state.showPopup){this.handleCustomTriggerClassUpdate();try{this.state.showPopup?(this.bodyScroll=(r=(i=(n=window.document)==null?void 0:n.body)==null?void 0:i.style)==null?void 0:r.overflow,this.bodyMargin=window.getComputedStyle(document.body).getPropertyValue("margin-right"),window.document.body.style.overflow="hidden",this.state.scrollbarWidth&&(window.document.body.style.marginRight=`calc(${this.bodyMargin} + ${this.state.scrollbarWidth}px)`)):(window.document.body.style.overflow=this.bodyScroll||"",!this.bodyMargin||this.bodyMargin==="0px"?window.document.body.style.marginRight="":window.document.body.style.marginRight=this.bodyMargin)}catch{}}if(this.state.initStatus==="success"&&a.initStatus!==this.state.initStatus){const{siteUrl:o}=this.props,s=this.getContextFromState();this.sendPortalReadyEvent(),p0({siteUrl:o,site:s.site,member:s.member})}}componentWillUnmount(){clearTimeout(this.timeoutId),this.customTriggerButtons&&this.customTriggerButtons.forEach(t=>{t.removeEventListener("click",this.clickHandler)}),window.removeEventListener("hashchange",this.hashHandler,!1)}sendPortalReadyEvent(){window.self!==window.parent&&window.parent.postMessage({type:"portal-ready",payload:{}},"*")}getScrollbarWidth(){const t=document.createElement("div");t.style.visibility="hidden",t.style.overflow="scroll",document.body.appendChild(t),document.body.appendChild(t);const a=t.offsetWidth-t.clientWidth;return document.body.removeChild(t),a}setupCustomTriggerButton(){this.clickHandler=n=>{n.preventDefault();const i=n.currentTarget,r=i&&i.dataset.portal,{page:o,pageQuery:s,pageData:l}=this.getPageFromLinkPath(r)||{};this.state.initStatus==="success"&&(s&&s!=="free"?this.handleSignupQuery({site:this.state.site,pageQuery:s}):this.dispatchAction("openPopup",{page:o,pageQuery:s,pageData:l}))};const t="[data-portal]",a="gh-portal-close";this.customTriggerButtons=document.querySelectorAll(t)||[],this.customTriggerButtons.forEach(n=>{n.classList.add(a),n.removeEventListener("click",this.clickHandler),n.addEventListener("click",this.clickHandler)})}handleCustomTriggerClassUpdate(){var n;const t="gh-portal-open",a="gh-portal-close";(n=this.customTriggerButtons)==null||n.forEach(i=>{const r=this.state.showPopup?t:a,o=this.state.showPopup?a:t;i.classList.add(r),i.classList.remove(o)})}async initSetup(){try{const{site:t,member:a,page:n,showPopup:i,popupNotification:r,lastPage:o,pageQuery:s,pageData:l}=await this.fetchData(),c=this.props.siteI18nEnabled&&(this.props.locale||t.locale)||"en",d=vc(c,"portal"),p={site:t,member:a,page:n,lastPage:o,pageQuery:s,showPopup:i,pageData:l,popupNotification:r,t:d.t,dir:d.dir()||"ltr",action:"init:success",initStatus:"success",locale:c};if(this.handleSignupQuery({site:t,pageQuery:s,member:a}),this.setState(p),this.hashHandler=()=>{this.updateStateForPreviewLinks()},window.addEventListener("hashchange",this.hashHandler,!1),!a){const m=document.querySelectorAll("[data-lexical-signup-form]");m.length>0&&m.forEach(h=>{h.style.display=""})}this.setupRecommendationButtons(),this.transformPortalLinksToRelative()}catch(t){console.error("[Portal] Failed to initialize:",t),this.setState({action:"init:failed",initStatus:"failed"})}}async fetchData(){const{site:t,member:a}=await this.fetchApiData(),{site:n,...i}=this.fetchDevData(),{site:r,...o}=this.fetchLinkData(t,a),{site:s,...l}=this.fetchPreviewData(),{site:c,...d}=this.fetchNotificationData();return{member:a,page:"",site:{...t,...r,...s,...c,...n,plans:{...(n||{}).plans,...(t||{}).plans,...(s||{}).plans}},...i,...o,...d,...l}}fetchDevData(){return J(["dev"])&&!this.state.customSiteUrl?h0:J(["test"])?{showPopup:this.props.showPopup!==void 0?this.props.showPopup:!0}:{}}fetchOfferQueryStrData(t=""){const a=new URLSearchParams(t),n={};for(let i of a.entries()){const r=i[0],o=decodeURIComponent(i[1]);r==="name"?n.name=o||"":r==="code"?n.code=o||"":r==="display_title"?n.display_title=o||"":r==="display_description"?n.display_description=o||"":r==="type"?n.type=o||"":r==="cadence"?n.cadence=o||"":r==="duration"?n.duration=o||"":r==="duration_in_months"&&!isNaN(Number(o))?n.duration_in_months=Number(o):r==="amount"&&!isNaN(Number(o))?n.amount=Number(o):r==="currency"?n.currency=o||"":r==="status"?n.status=o||"":r==="tier_id"&&(n.tier={id:o||Sf.tier.id})}return{page:"offer",pageData:n}}fetchQueryStrData(t=""){const a=new URLSearchParams(t),n={site:{plans:{}}},i=[];let r,o=null,s,l,c;for(let d of a.entries()){const p=d[0],m=decodeURIComponent(d[1]);if(p==="button")n.site.portal_button=JSON.parse(m);else if(p==="name")n.site.portal_name=JSON.parse(m);else if(p==="isFree"&&JSON.parse(m))i.push("free");else if(p==="isMonthly"&&JSON.parse(m))i.push("monthly");else if(p==="isYearly"&&JSON.parse(m))i.push("yearly");else if(p==="portalPrices")r=m?m.split(","):[];else if(p==="portalProducts")o=m?m.split(","):[];else if(p==="page"&&m)n.page=m;else if(p==="accentColor"&&(m===""||m))n.site.accent_color=m;else if(p==="buttonIcon"&&m)n.site.portal_button_icon=m;else if(p==="signupButtonText")n.site.portal_button_signup_text=m||"";else if(p==="signupTermsHtml")n.site.portal_signup_terms_html=m||"";else if(p==="signupCheckboxRequired")n.site.portal_signup_checkbox_required=JSON.parse(m);else if(p==="buttonStyle"&&m)n.site.portal_button_style=m;else if(p==="monthlyPrice"&&!isNaN(Number(m)))n.site.plans.monthly=Number(m),s=Number(m);else if(p==="yearlyPrice"&&!isNaN(Number(m)))n.site.plans.yearly=Number(m),l=Number(m);else if(p==="currency"&&m){const h=m.toUpperCase();n.site.plans.currency=h,n.site.plans.currency_symbol=pe(h),c=h}else p==="disableBackground"?n.site.disableBackground=JSON.parse(m):p==="membersSignupAccess"&&m?n.site.members_signup_access=m:p==="portalDefaultPlan"&&m&&(n.site.portal_default_plan=m)}return n.site.portal_plans=i,n.site.portal_products=o,r?n.site.portal_plans=r:s&&l&&c&&(n.site.prices=[{id:"monthly",stripe_price_id:"dummy_stripe_monthly",stripe_product_id:"dummy_stripe_product",active:1,nickname:"Monthly",currency:c,amount:s,type:"recurring",interval:"month"},{id:"yearly",stripe_price_id:"dummy_stripe_yearly",stripe_product_id:"dummy_stripe_product",active:1,nickname:"Yearly",currency:c,amount:l,type:"recurring",interval:"year"}]),n}fetchNotificationData(){const{type:t,status:a,duration:n,autoHide:i,closeable:r}=jg({billingOnly:!0})||{};return["stripe:billing-update"].includes(t)?a==="success"?{showPopup:!0,popupNotification:q({type:t,status:a,duration:n,closeable:r,autoHide:i,state:this.state,message:a==="success"?"Billing info updated successfully":""})}:{showPopup:!0}:{}}fetchLinkData(t,a){const n=new URLSearchParams(window.location.search);if(n.get("action")==="unsubscribe")return n.get("key")&&n.get("uuid")?{showPopup:!0,page:"unsubscribe",pageData:{uuid:n.get("uuid"),key:n.get("key"),newsletterUuid:n.get("newsletter"),comments:n.get("comments")}}:{showPopup:!0,page:"accountEmail",pageData:{newsletterUuid:n.get("newsletter"),action:"unsubscribe",redirect:t.url+"#/portal/account/newsletters"}};if(vE({site:t})&&n.get("action")==="signup"&&n.get("success")==="true")return{showPopup:!0,page:"recommendations",pageData:{signup:!0}};const[i,r]=window.location.hash.substr(1).split("?"),o=new URLSearchParams(r??""),s=/^(?:(\w+?))?\/monthly$/,l=/^(?:(\w+?))?\/yearly$/,c=/^offers\/(\w+?)\/?$/,d=/^\/portal\/?(?:\/(\w+(?:\/\w+)*))?\/?$/,p=/^\/feedback\/(\w+?)\/(\w+?)\/?$/;if(i&&p.test(i)){const[,m,h]=i.match(p),b=parseInt(h);if(b===1||b===0)return a||o.get("uuid")&&o.get("key")?{showPopup:!0,page:"feedback",pageData:{uuid:a?null:o.get("uuid"),key:a?null:o.get("key"),postId:m,score:b}}:{showPopup:!0,page:"signin",pageData:{redirect:t.url+`#/feedback/${m}/${b}/`}}}if(i&&d.test(i)){const[,m]=i.match(d),{page:h,pageQuery:b,pageData:v}=this.getPageFromLinkPath(m,t)||{},f=["accountPlan","accountProfile"].includes(h)?"accountHome":null;return{showPopup:!(["monthly","yearly"].includes(b)||s.test(b)||l.test(b)||c.test(b)),...h?{page:h}:{},...b?{pageQuery:b}:{},...v?{pageData:v}:{},...f?{lastPage:f}:{}}}return{}}fetchPreviewData(){const[,t]=window.location.hash.substr(1).split("?");if(J(["preview"])){let a={};return J(["offerPreview"])?a=this.fetchOfferQueryStrData(t):a=this.fetchQueryStrData(t),{...a,showPopup:!0}}return{}}getColorOverride(){const t=document.querySelector("script[data-ghost]");return t&&t.dataset.accentColor?t.dataset.accentColor:!1}async fetchApiData(){const{siteUrl:t,customSiteUrl:a,apiUrl:n,apiKey:i}=this.props;try{this.GhostApi=this.props.api||Bo({siteUrl:t,apiUrl:n,apiKey:i});const{site:r,member:o}=await this.GhostApi.init(),s=this.getColorOverride();return s&&(r.accent_color=s),this.setupFirstPromoter({site:r,member:o}),this.setupSentry({site:r}),{site:r,member:o}}catch(r){if(J(["dev","test"],{customSiteUrl:a}))return{};throw r}}setupSentry({site:t}){if(J(["test"]))return null;const{portal_sentry:a,portal_version:n,version:i}=t,o=`portal@2.53.0|ghost@${i}`;a&&a.dsn&&Vx({dsn:a.dsn,environment:a.env||"development",release:o,beforeSend:s=>cE({event:s})?s:null,allowUrls:[/https?:\/\/((www)\.)?unpkg\.com\/@tryghost\/portal/]})}setupFirstPromoter({site:t,member:a}){if(J(["test"]))return null;const n=TE({site:t});let i=Xu({site:t});if(i=i==null?void 0:i.replace(/^(\S*\.)?(\S*\.\S*)$/i,".$2"),n&&i){const r=document.createElement("script");r.type="text/javascript",r.async=!0,r.src="https://cdn.firstpromoter.com/fprom.js",r.onload=r.onreadystatechange=function(){let s=this.readyState;if(!s||s==="complete"||s==="loaded")try{if(window.$FPROM.init(n,i),YE({member:a})){const l=a.email,c=a.uuid;if(window.$FPROM)window.$FPROM.trackSignup({email:l,uid:c});else{const d=window._fprom||[];window._fprom=d,d.push(["event","signup"]),d.push(["email",l]),d.push(["uid",c])}}}catch{}};const o=document.getElementsByTagName("script")[0];o.parentNode.insertBefore(r,o)}}async dispatchAction(t,a){clearTimeout(this.timeoutId),this.setState({action:`${t}:running`});try{const n=await M$({action:t,data:a,state:this.state,api:this.GhostApi});this.setState(n),n&&n.action&&!n.action.includes(":failed")&&(this.timeoutId=setTimeout(()=>{this.setState({action:""})},2e3))}catch(n){if(console.error(`[Portal] Failed to dispatch action: ${t}`,n),a&&a.throwErrors)throw n;const i=q({type:`${t}:failed`,autoHide:!0,closeable:!0,status:"error",state:this.state,meta:{error:n}});this.setState({action:`${t}:failed`,popupNotification:i})}}updateStateForPreviewLinks(){const{site:t,...a}=this.fetchPreviewData(),{site:n,...i}=this.fetchLinkData(),r={site:{...this.state.site,...n||{},...t||{},plans:{...this.state.site&&this.state.site.plans,...(n||{}).plans,...(t||{}).plans}},...i,...a};this.handleSignupQuery({site:r.site,pageQuery:r.pageQuery}),this.setState(r)}async handleOfferQuery({site:t,offerId:a,member:n=this.state.member}){const{portal_button:i}=t;if(Ku(),!ut({member:n}))try{const r=await this.GhostApi.site.offer({offerId:a}),o=r==null?void 0:r.offers[0];if(IE({site:t,offer:o}))if(i)this.dispatchAction("openPopup",{page:"offer",pageData:r==null?void 0:r.offers[0]});else{const s=hn({site:t,productId:o.tier.id}),l=o.cadence==="month"?s.monthlyPrice:s.yearlyPrice;if(this.dispatchAction("openPopup",{page:"loading"}),n){const{tierId:c,cadence:d}=wa({site:t,priceId:l.id});this.dispatchAction("checkoutPlan",{plan:l.id,offerId:a,tierId:c,cadence:d})}else{const{tierId:c,cadence:d}=wa({site:t,priceId:l.id});this.dispatchAction("signup",{plan:l.id,offerId:a,tierId:c,cadence:d})}}}catch{}}handleSignupQuery({site:t,pageQuery:a,member:n}){const i=/^offers\/(\w+?)\/?$/;let r=a;if(i.test(a||"")){const[,s]=a.match(i);this.handleOfferQuery({site:t,offerId:s,member:n});return}yg({site:t,pageQuery:a})&&(r=yg({site:t,pageQuery:a}));const o=yE({site:t,priceId:r});if(a&&a!=="free"){Ku();const s=(o==null?void 0:o.id)||r;s!=="free"&&this.dispatchAction("openPopup",{page:"loading"});const{tierId:l,cadence:c}=wa({site:t,priceId:s});this.dispatchAction("signup",{plan:s,tierId:l,cadence:c})}}getPageFromLinkPath(t){const a=/^signup\/?(?:\/(\w+?))?\/?$/,n=/^signup\/?(?:\/(\w+?))\/monthly\/?$/,i=/^signup\/?(?:\/(\w+?))\/yearly\/?$/,r=/^offers\/(\w+?)\/?$/;if(t===void 0||t==="")return{page:"default"};if(r.test(t))return{pageQuery:t};if(t==="signup")return{page:"signup"};if(n.test(t)){const[,o]=t.match(n);return{page:"signup",pageQuery:`${o}/monthly`}}else if(i.test(t)){const[,o]=t.match(i);return{page:"signup",pageQuery:`${o}/yearly`}}else if(a.test(t)){const[,o]=t.match(a);return{page:"signup",pageQuery:o}}else{if(t==="signup/free")return{page:"signup",pageQuery:"free"};if(t==="signup/monthly")return{page:"signup",pageQuery:"monthly"};if(t==="signup/yearly")return{page:"signup",pageQuery:"yearly"};if(t==="signin")return{page:"signin"};if(t==="account")return{page:"accountHome"};if(t==="account/plans")return{page:"accountPlan"};if(t==="account/profile")return{page:"accountProfile"};if(t==="account/newsletters")return{page:"accountEmail"};if(t==="support")return{page:"support"};if(t==="support/success")return{page:"supportSuccess"};if(t==="support/error")return{page:"supportError"};if(t==="recommendations")return{page:"recommendations",pageData:{signup:!1}};if(t==="account/newsletters/help")return{page:"emailReceivingFAQ",pageData:{direct:!0}};if(t==="account/newsletters/disabled")return{page:"emailSuppressionFAQ",pageData:{direct:!0}}}return{page:"default"}}getAccentColor(){const{accent_color:t}=this.state.site||{};return t}getContextPage({site:t,page:a,member:n}){if(!a||a==="default"){const i=ct({site:t})||!jt({site:t})?"signin":"signup";a=n?"accountHome":i}return a==="accountPlan"&&Zt({member:n})&&!Ni({member:n})&&(a="accountHome"),hc({page:a})}getContextMember({page:t,member:a,customSiteUrl:n}){return J(["dev","preview"],{customSiteUrl:n})?Qj({page:t})||Xj({page:t})?J(["dev"],{customSiteUrl:n})?a||Wo.free:J(["preview"])?Wo.preview:Wo.paid:null:a}getContextFromState(){const{site:t,member:a,action:n,page:i,lastPage:r,showPopup:o,pageQuery:s,pageData:l,popupNotification:c,customSiteUrl:d,t:p,dir:m,scrollbarWidth:h,labs:b,otcRef:v}=this.state,f=this.getContextPage({site:t,page:i,member:a}),g=this.getContextMember({page:f,member:a,customSiteUrl:d});return{api:this.GhostApi,site:t,action:n,brandColor:this.getAccentColor(),page:f,pageQuery:s,pageData:l,member:g,lastPage:r,showPopup:o,popupNotification:c,customSiteUrl:d,t:p,dir:m,scrollbarWidth:h,labs:b,otcRef:v,onAction:(y,w)=>this.dispatchAction(y,w)}}getRecommendationButtons(){return document.querySelectorAll("[data-recommendation]")||[]}setupRecommendationButtons(){const t=n=>{const i=n.currentTarget.dataset.recommendation;i?this.dispatchAction("trackRecommendationClicked",{recommendationId:i}).catch(console.error):console.warn("[Portal] Invalid usage of data-recommendation attribute")},a=this.getRecommendationButtons();for(const n of a)n.addEventListener("click",t,{passive:!0})}transformPortalLinksToRelative(){document.querySelectorAll('a[href*="#/portal"]').forEach(s$)}render(){return this.state.initStatus==="success"?u.jsx(g0,{site:this.state.site,children:u.jsxs(P.Provider,{value:this.getContextFromState(),children:[u.jsx(bf,{}),u.jsx(xg,{}),u.jsx(Tg,{})]})}):null}}const Lf="ghost-portal-root";function b0(){const e=document.createElement("div");e.id=Lf,document.body.appendChild(e)}function y0(){const e=document.querySelector("script[data-ghost]");if(e){const t=e.dataset.i18n==="true",a=e.dataset.ghost,n=e.dataset.key,i=e.dataset.api,r=e.dataset.locale,o={};return o.membersSigninOTC=e.dataset.membersSigninOtc==="true",{siteUrl:a,apiKey:n,apiUrl:i,siteI18nEnabled:t,locale:r,labs:o}}return{}}function k0(){const e=new URL(window.location.href);e.searchParams.get("token")&&(e.searchParams.delete("token"),window.history.replaceState({},document.title,e.href))}function v0(){b0(),k0()}function w0(){const{siteUrl:e,apiKey:t,apiUrl:a,siteI18nEnabled:n,locale:i,labs:r}=y0(),o=e||window.location.origin;v0(),Xy.render(u.jsx(Y.StrictMode,{children:u.jsx(f0,{siteUrl:o,customSiteUrl:e,apiKey:t,apiUrl:a,siteI18nEnabled:n,locale:i,labs:r})}),document.getElementById(Lf))}w0()});
|
|
3423
|
+
`+a;return u.jsxs(u.Fragment,{children:[u.jsx("style",{dangerouslySetInnerHTML:{__html:n}}),u.jsx("meta",{name:"viewport",content:"width=device-width, initial-scale=1, maximum-scale=1"})]})}renderFrameContainer(){const{member:t,site:a,customSiteUrl:n}=this.context,i=gf(),r=window.innerWidth<480,o={...i.frame.common};let s="gh-portal-popup-background";return J(["preview"])&&(i.modalContainer.zIndex="3999997"),J(["preview"],{customSiteUrl:n})&&!a.disableBackground&&(s+=" preview"),J(["dev"])&&(s+=" dev"),u.jsx("div",{style:i.modalContainer,children:u.jsxs(Ou,{style:o,title:"portal-popup",head:this.renderFrameStyles(),dataTestId:"portal-popup-frame",dataDir:this.context.dir,children:[u.jsx("div",{className:s,onClick:l=>this.handlePopupClose(l)}),u.jsx(ff,{isMobile:r})]})})}render(){const{showPopup:t}=this.context;return t?this.renderFrameContainer():null}}X(bf,"contextType",P),Oo({products:fc({numOfProducts:1})});function he(){return(new Date().getTime()/1e3|0).toString(16)+"xxxxxxxxxxxxxxxx".replace(/[x]/g,function(){return(Math.random()*16|0).toString(16)}).toLowerCase()}function Oo({title:e="The Blueprint",description:t="Thoughts, stories and ideas.",logo:a="https://static.ghost.org/v4.0.0/images/ghost-orb-1.png",icon:n="https://static.ghost.org/v4.0.0/images/ghost-orb-1.png",url:i="https://portal.localhost",plans:r={monthly:5e3,yearly:15e4,currency:"USD"},products:o=fc({numOfProducts:1}),portalProducts:s=o.map(M=>M.id),accentColor:l="#45C32E",portalPlans:c=["free","monthly","yearly"],membersSignupAccess:d="all",freePriceName:p="Free",freePriceDescription:m="Free preview",isStripeConfigured:g=!0,portalButton:b=!0,portalName:v=!0,portalButtonIcon:f="icon-1",portalButtonSignupText:h="Subscribe now",portalButtonStyle:y="icon-and-text",membersSupportAddress:w="support@example.com",editorDefaultEmailRecipients:S="visibility",newsletters:j=[],posts:x=a$(),commentsEnabled:C,recommendations:z=[],recommendationsEnabled:E}={}){return{title:e,description:t,logo:a,icon:n,accent_color:l,url:i,plans:r,products:o,portal_products:s,members_signup_access:d,free_price_name:p,free_price_description:m,is_stripe_configured:g,portal_button:b,portal_name:v,portal_plans:c,portal_button_icon:f,portal_button_signup_text:h,portal_button_style:y,members_support_address:w,comments_enabled:C!=="off",newsletters:j,recommendations:z,recommendations_enabled:!!E,editor_default_email_recipients:S,posts:x}}function yf({name:e="Black Friday",code:t="black-friday",displayTitle:a="Black Friday Sale!",displayDescription:n="Special deal for Black Friday. Subscribe now for only $15 per month and get additional benefits like accessing our podcast.",type:i="percent",cadence:r="month",amount:o=50,duration:s="repeating",durationInMonths:l=null,currencyRestriction:c=!1,currency:d=null,status:p="active",tierId:m="",tierName:g="Basic"}={}){return{id:`offer_${he()}`,name:e,code:t,display_title:a,display_description:n,type:i,cadence:r,amount:o,duration:s,duration_in_months:l,currency_restriction:c,currency:d,status:p,tier:{id:`${m}`,name:g}}}function Ze({name:e="Jamie Larson",email:t="jamie@example.com",firstname:a="Jamie",subscriptions:n=[],paid:i=!1,avatarImage:r="",subscribed:o=!0,email_suppression:s={suppressed:!1,info:null},newsletters:l=[]}={}){return{uuid:`member_${he()}`,email:t,name:e,firstname:a,paid:i,subscribed:o,avatar_image:r,subscriptions:n,email_suppression:s,newsletters:l}}function a$({numOfPosts:e=3}={}){const t=[];for(let a=0;a<e;a++)t.push(n$({title:`Post ${a+1}`,slug:`post-${a+1}`}));return t.slice(0,e)}function n$({id:e=`post_${he()}`,title:t="Post",excerpt:a="Post excerpt",slug:n="post",featured:i=!1}={}){return{id:e,title:t,excerpt:a,slug:n,featured:i}}function fc({numOfProducts:e=3}={}){const a=[kn({name:"Bronze",description:"Access to all members articles",monthlyPrice:We({interval:"month",amount:700}),yearlyPrice:We({interval:"year",amount:7e3}),numOfBenefits:2}),kn({name:"Silver",description:"Access to all members articles and weekly podcast",monthlyPrice:We({interval:"month",amount:1200}),yearlyPrice:We({interval:"year",amount:12e3}),numOfBenefits:3}),kn({name:"Friends of the Blueprint",description:"Get access to everything and lock in early adopter pricing for life + listen to my podcast",monthlyPrice:We({interval:"month",amount:18e3}),yearlyPrice:We({interval:"year",amount:17e3}),numOfBenefits:4})].slice(0,e),n=kf({});return[...a,n]}function kn({type:e="paid",name:t="Basic",description:a="",id:n=`product_${he()}`,monthlyPrice:i=We(),yearlyPrice:r=We({interval:"year"}),numOfBenefits:o=2,trialDays:s=null}){return{id:n,name:t,description:a,monthlyPrice:e==="free"?null:i,yearlyPrice:e==="free"?null:r,type:e,benefits:vf({numOfBenefits:o}),trial_days:s}}function kf({name:e="Free tier",description:t="Free tier description",id:a=`product_${he()}`,numOfBenefits:n=2}){return{id:a,name:e,type:"free",description:t,benefits:vf({numOfBenefits:n})}}function vf({numOfBenefits:e}){const t=he();return[Vo({name:`Limited early adopter pricing #${t.substring(0,6)}`}),Vo({name:`Latest gear reviews #${t.substring(6,12)}`}),Vo({name:`Weekly email newsletter #${t.substring(12,18)}`}),Vo({name:`Listen to my podcast #${t.substring(18)}`})].slice(0,e)}function Vo({id:e=`benefit_${he()}`,name:t="Benefit"}){return{id:e,name:t}}function We({interval:e="month",amount:t=e==="month"?500:5e3,nickname:a=e==="month"?"Monthly":"Yearly",description:n=null,currency:i="usd",active:r=!0,id:o=`price_${he()}`}={}){return{id:o,active:r,nickname:a,currency:i,amount:t,interval:e,description:n,stripe_price_id:`price_${he()}`,stripe_product_id:`prod_${he()}`,type:"recurring"}}function xa({id:e=`sub_${he()}`,status:t="active",currency:a="USD",interval:n="year",amount:i=n==="month"?500:5e3,nickname:r=n==="month"?"Monthly":"Yearly",cardLast4:o="4242",offer:s=r$,priceId:l=`price_${he()}`,startDate:c="2021-10-05T03:18:30.000Z",currentPeriodEnd:d="2022-10-05T03:18:30.000Z",cancelAtPeriodEnd:p=!1}={}){return{id:e,customer:{id:`cus_${he()}`,name:"Jamie",email:"jamie@example.com"},plan:{id:`price_${he()}`,nickname:r,amount:i,interval:n,currency:a},offer:s,status:t,start_date:c,default_payment_card_last4:o,cancel_at_period_end:p,cancellation_reason:null,current_period_end:d,price:{id:`stripe_price_${he()}`,price_id:l,nickname:r,amount:i,interval:n,type:"recurring",currency:a,product:{id:`stripe_prod_${he()}`,product_id:`prod_${he()}`}}}}function wf(){const e=fc({numOfProducts:1}),t=e.map(n=>n.id);return Oo({products:e,portalPlans:["free","monthly","yearly"],portalProducts:t})}wf();const i$=Oo({products:[kn({numOfBenefits:2,type:"free"})]}),r$=yf({tierId:(Bf=i$.products[0])==null?void 0:Bf.id});Ze(),Ze({paid:!0,subscriptions:[xa()]}),Ze({paid:!0,subscriptions:[]}),Ze({paid:!0,subscriptions:[xa({amount:0})]}),Ze({paid:!0,subscriptions:[xa({amount:1500,startDate:"2019-05-01T11:42:40.000Z",currentPeriodEnd:"2021-06-05T11:42:40.000Z"})]}),wf();const Ho=[kf({name:"Free",description:"Free tier description which is actually a pretty long description",numOfBenefits:2}),kn({name:"The Blueprint",description:"",monthlyPrice:We({interval:"month",amount:500}),yearlyPrice:We({interval:"year",amount:5e3}),numOfBenefits:3}),kn({name:"Friends of the Blueprint Silver",description:"Access to all members articles and weekly podcast",monthlyPrice:We({interval:"month",amount:1200}),yearlyPrice:We({interval:"year",amount:11e3}),numOfBenefits:4})],vn=Oo({title:"The Blueprint",description:"Thoughts, stories and ideas.",logo:"https://static.ghost.org/v4.0.0/images/ghost-orb-1.png",icon:"https://static.ghost.org/v4.0.0/images/ghost-orb-1.png",accentColor:"#45C32E",url:"https://portal.localhost",plans:{monthly:5e3,yearly:15e4,currency:"USD"},products:Ho,portalProducts:Ho.map(e=>e.id),membersSignupAccess:"all",freePriceName:"Free",freePriceDescription:"Free preview",isStripeConfigured:!0,portalButton:!0,portalName:!0,portalPlans:["free","monthly","yearly"],portalButtonIcon:"icon-1",portalButtonSignupText:"Subscribe now",portalButtonStyle:"icon-and-text",membersSupportAddress:"support@example.com",commentsEnabled:!0,newsletters:[{id:"weekly",name:"Weekly Rundown",description:"Best of last week",subscribe_on_signup:!0,paid:!0},{id:"daily",name:"Daily Brief",description:"One email every day",subscribe_on_signup:!1,paid:!1}],posts:[{id:"post_66aacfe061c94e10eb6e4fc1",title:"Post 1",excerpt:"Post excerpt",slug:"post-1",featured:!1},{id:"post_66aacfe04f14b8dbb56c5721",title:"Post 2",excerpt:"Post excerpt",slug:"post-2",featured:!1},{id:"post_66aacfe03d609460819af18c",title:"Post 3",excerpt:"Post excerpt",slug:"post-3",featured:!1}]}),Sf=yf({tierId:(Of=vn.products[1])==null?void 0:Of.id}),Wo={free:Ze({name:"Jamie Larson",email:"jamie@example.com",firstname:"Jamie",subscriptions:[],paid:!1,avatarImage:"",subscribed:!0}),paid:Ze({paid:!0,subscriptions:[xa({status:"active",currency:"USD",interval:"year",amount:5e3,cardLast4:"4242",startDate:"2021-10-05T03:18:30.000Z",currentPeriodEnd:"2022-10-05T03:18:30.000Z",cancelAtPeriodEnd:!1})]}),complimentary:Ze({paid:!0,subscriptions:[]}),complimentaryWithSubscription:Ze({paid:!0,subscriptions:[xa({amount:0})]}),preview:Ze({paid:!0,subscriptions:[xa({amount:1500,startDate:"2019-05-01T11:42:40.000Z",currentPeriodEnd:"2021-06-05T11:42:40.000Z"})]})};function o$(){var a;if(!Ho||!Ho[1])return null;let e=(a=vn==null?void 0:vn.products)==null?void 0:a[1].monthlyPrice,t=Ze({paid:!0,subscriptions:[xa({offer:null,priceId:e==null?void 0:e.id,status:"active",currency:e==null?void 0:e.currency,interval:e==null?void 0:e.interval,amount:e==null?void 0:e.amount,cardLast4:"4242",startDate:"2021-10-05T03:18:30.000Z",currentPeriodEnd:"2022-10-05T03:18:30.000Z",cancelAtPeriodEnd:!1})]});return{site:vn,member:t}}function s$(e){const t=e.getAttribute("href"),a=new URL(t,window.location.origin);!a.hash||!a.hash.startsWith("#/portal")||t.startsWith("#/portal")||a.origin===window.location.origin&&e.setAttribute("href",a.hash)}function l$({data:e,state:t}){return{page:e.page,popupNotification:null,lastPage:e.lastPage||null,pageData:e.pageData||t.pageData}}function u$({state:e}){return{showPopup:!e.showPopup}}function c$({data:e}){return{showPopup:!0,page:e.page,...e.pageQuery?{pageQuery:e.pageQuery}:{},...e.pageData?{pageData:e.pageData}:{}}}function d$({state:e}){return e.lastPage?{page:e.lastPage}:xf({state:e})}function xf({state:e}){return Ku(),{showPopup:!1,lastPage:null,pageQuery:"",popupNotification:null,page:e.page==="magiclink"?"":e.page}}function m$({data:e}){return{showNotification:!0,...e}}function p$(){return{showNotification:!1}}async function h$({api:e,state:t}){try{return await e.member.signout(),{action:"signout:success"}}catch{const{t:n}=t;return{action:"signout:failed",popupNotification:q({type:"signout:failed",autoHide:!1,closeable:!0,state:t,status:"error",message:n("Failed to log out, please try again")})}}}async function g$({data:e,api:t,state:a}){const{t:n,labs:i}=a,r=i!=null&&i.membersSigninOTC?!0:void 0;try{const o=await t.member.getIntegrityToken(),s={...e,emailType:"signin",integrityToken:o,...r?{includeOTC:!0}:{}},l=await t.member.sendMagicLink(s);return r&&(l!=null&&l.otc_ref)?{page:"magiclink",lastPage:"signin",otcRef:l.otc_ref}:{page:"magiclink",lastPage:"signin"}}catch(o){return{action:"signin:failed",popupNotification:q({type:"signin:failed",autoHide:!1,closeable:!0,state:a,status:"error",message:Sa(o,n("Failed to log in, please try again"),n)})}}}async function f$({data:e,api:t,state:a}){const{t:n}=a;try{const i=await t.member.getIntegrityToken(),r=await t.member.verifyOTC({...e,integrityToken:i});return r.redirectUrl?window.location.assign(r.redirectUrl):{action:"verifyOTC:failed",popupNotification:q({type:"verifyOTC:failed",autoHide:!1,closeable:!0,state:a,status:"error",message:r.message||n("Invalid verification code")})}}catch(i){return{action:"verifyOTC:failed",popupNotification:q({type:"verifyOTC:failed",autoHide:!1,closeable:!0,state:a,status:"error",message:Sa(i,n("Failed to verify code, please try again"),n)})}}}async function b$({data:e,state:t,api:a}){try{let{plan:n,tierId:i,cadence:r,email:o,name:s,newsletters:l,offerId:c}=e;if(n.toLowerCase()==="free"){const d=await a.member.getIntegrityToken();await a.member.sendMagicLink({emailType:"signup",integrityToken:d,...e})}else return i&&r?await a.member.checkoutPlan({plan:n,tierId:i,cadence:r,email:o,name:s,newsletters:l,offerId:c}):({tierId:i,cadence:r}=wa({site:t==null?void 0:t.site,priceId:n}),await a.member.checkoutPlan({plan:n,tierId:i,cadence:r,email:o,name:s,newsletters:l,offerId:c})),{page:"loading"};return{page:"magiclink",lastPage:"signup"}}catch(n){const{t:i}=t,r=Sa(n,i("Failed to sign up, please try again"),i);return{action:"signup:failed",popupNotification:q({type:"signup:failed",autoHide:!1,closeable:!0,state:t,status:"error",message:r})}}}async function y$({data:e,state:t,api:a}){try{let{plan:n,offerId:i,tierId:r,cadence:o}=e;(!r||!o)&&({tierId:r,cadence:o}=wa({site:t==null?void 0:t.site,priceId:n})),await a.member.checkoutPlan({plan:n,tierId:r,cadence:o,offerId:i,metadata:{checkoutType:"upgrade"}})}catch{const{t:i}=t;return{action:"checkoutPlan:failed",popupNotification:q({type:"checkoutPlan:failed",autoHide:!1,closeable:!0,state:t,status:"error",message:i("Failed to process checkout, please try again")})}}}async function k$({data:e,state:t,api:a}){const{t:n}=t;try{const{plan:i,planId:r,subscriptionId:o,cancelAtPeriodEnd:s}=e,{tierId:l,cadence:c}=wa({site:t==null?void 0:t.site,priceId:r});await a.member.updateSubscription({planName:i,tierId:l,cadence:c,subscriptionId:o,cancelAtPeriodEnd:s,planId:r});const d=await a.member.sessionData(),p="updateSubscription:success";return{action:p,popupNotification:q({type:p,autoHide:!0,closeable:!0,state:t,status:"success",message:n("Subscription plan updated successfully")}),page:"accountHome",member:d}}catch{return{action:"updateSubscription:failed",popupNotification:q({type:"updateSubscription:failed",autoHide:!1,closeable:!0,state:t,status:"error",message:n("Failed to update subscription, please try again")})}}}async function v$({data:e,state:t,api:a}){try{const{subscriptionId:n,cancellationReason:i}=e;return await a.member.updateSubscription({subscriptionId:n,smartCancel:!0,cancellationReason:i}),{action:"cancelSubscription:success",page:"accountHome",member:await a.member.sessionData()}}catch{const{t:i}=t;return{action:"cancelSubscription:failed",popupNotification:q({type:"cancelSubscription:failed",autoHide:!1,closeable:!0,state:t,status:"error",message:i("Failed to cancel subscription, please try again")})}}}async function w$({data:e,state:t,api:a}){try{const{subscriptionId:n}=e;return await a.member.updateSubscription({subscriptionId:n,cancelAtPeriodEnd:!1}),{action:"continueSubscription:success",page:"accountHome",member:await a.member.sessionData()}}catch{const{t:i}=t;return{action:"continueSubscription:failed",popupNotification:q({type:"continueSubscription:failed",autoHide:!1,closeable:!0,state:t,status:"error",message:i("Failed to cancel subscription, please try again")})}}}async function S$({data:e,state:t,api:a}){try{await a.member.editBilling(e)}catch{const{t:i}=t;return{action:"editBilling:failed",popupNotification:q({type:"editBilling:failed",autoHide:!1,closeable:!0,state:t,status:"error",message:i("Failed to update billing information, please try again")})}}}async function x$(){return{popupNotification:null}}async function E$({data:e,state:t}){let{action:a,message:n=""}=e;return a=a||"showPopupNotification:success",{popupNotification:q({type:a,autoHide:!0,closeable:!0,state:t,status:"success",message:n})}}async function C$({data:e,state:t,api:a}){try{const{newsletters:n,enableCommentNotifications:i}=e;if(!n&&i===void 0)return{};const r={};return n&&(r.newsletters=n),i!==void 0&&(r.enableCommentNotifications=i),{action:"updateNewsletterPref:success",member:await a.member.update(r)}}catch{const{t:i}=t;return{action:"updateNewsletterPref:failed",popupNotification:q({type:"updateNewsletter:failed",autoHide:!0,closeable:!0,state:t,status:"error",message:i("Failed to update newsletter settings")})}}}async function j$({state:e,api:t}){const{t:a}=e;try{return await t.member.deleteSuppression(),{action:"removeEmailFromSuppressionList:success",popupNotification:q({type:"removeEmailFromSuppressionList:success",autoHide:!0,closeable:!0,state:e,status:"success",message:a("You have been successfully resubscribed")})}}catch{return{action:"removeEmailFromSuppressionList:failed",popupNotification:q({type:"removeEmailFromSuppressionList:failed",autoHide:!0,closeable:!0,state:e,status:"error",message:a("Your email has failed to resubscribe, please try again")})}}}async function $$({data:e,state:t,api:a}){const{t:n}=t;try{const{subscribed:i}=e,r=await a.member.update({subscribed:i});if(!r)throw new Error("Failed to update newsletter");const o="updateNewsletter:success";return{action:o,member:r,popupNotification:q({type:o,autoHide:!0,closeable:!0,state:t,status:"success",message:n("Email newsletter settings updated")})}}catch{return{action:"updateNewsletter:failed",popupNotification:q({type:"updateNewsletter:failed",autoHide:!0,closeable:!0,state:t,status:"error",message:n("Failed to update newsletter settings")})}}}async function T$({data:e,state:t,api:a}){const{email:n}=e,i=$E({member:t.member});if(n!==i)try{return await a.member.updateEmailAddress({email:n}),{success:!0}}catch(r){return{success:!1,error:r}}return null}async function P$({data:e,state:t,api:a}){const{name:n}=e;if(PE({member:t.member})!==n)try{const r=await a.member.update({name:n});if(!r)throw new Error("Failed to update member");return{member:r,success:!0}}catch(r){return{success:!1,error:r}}return null}async function z$({state:e,api:t}){if(e.member)try{const a=await t.member.sessionData();return a?{member:a,success:!0,action:"refreshMemberData:success"}:null}catch(a){return{success:!1,error:a,action:"refreshMemberData:failed"}}return null}async function N$({data:e,state:t,api:a}){const{t:n}=t,[i,r]=await Promise.all([P$({data:e,state:t,api:a}),T$({data:e,state:t,api:a})]);if(i&&r){if(r.success)return{action:"updateProfile:success",...i.success?{member:i.member}:{},page:"accountHome",popupNotification:q({type:"updateProfile:success",autoHide:!0,closeable:!0,status:"success",state:t,message:n("Check your inbox to verify email update")})};const o=i.success?n("Failed to send verification email"):n("Failed to update account data");return{action:"updateProfile:failed",...i.success?{member:i.member}:{},popupNotification:q({type:"updateProfile:failed",autoHide:!0,closeable:!0,status:"error",message:o,state:t})}}else if(i){const o=i.success?"updateProfile:success":"updateProfile:failed",s=i.success?"success":"error",l=i.success?n("Account details updated successfully"):n("Failed to update account details");return{action:o,...i.success?{member:i.member}:{},...i.success?{page:"accountHome"}:{},popupNotification:q({type:o,autoHide:i.success,closeable:!0,status:s,state:t,message:l})}}else if(r){const o=r.success?"updateProfile:success":"updateProfile:failed",s=r.success?"success":"error";let l="";return r.error?l=Sa(r.error,n("Failed to send verification email"),n):l=n("Check your inbox to verify email update"),{action:o,...r.success?{page:"accountHome"}:{},popupNotification:q({type:o,autoHide:r.success,closeable:!0,status:s,state:t,message:l})}}return{action:"updateProfile:success",page:"accountHome",popupNotification:q({type:"updateProfile:success",autoHide:!0,closeable:!0,status:"success",state:t,message:n("Account details updated successfully")})}}async function A$({data:{siteUrl:e},state:t}){const a=Bo({siteUrl:e,apiUrl:"not-defined"}),{member:n}=t,i=window.location.href,r=mg(),o=await a.member.getIntegrityToken();return await a.member.sendMagicLink({emailType:"signup",name:n.name,email:n.email,autoRedirect:!1,integrityToken:o,customUrlHistory:t.site.outbound_link_tagging?[{time:Date.now(),referrerSource:r,referrerMedium:"Ghost Recommendations",referrerUrl:i}]:[]}),{}}function I$({data:{recommendationId:e},api:t}){try{const a=localStorage.getItem("ghost-recommendations-clicked"),n=a?JSON.parse(a):[];if(n.includes(e))return;n.push(e),localStorage.setItem("ghost-recommendations-clicked",JSON.stringify(n))}catch{}return t.recommendations.trackClicked({recommendationId:e}),{}}async function D$({data:{recommendationId:e},api:t}){return t.recommendations.trackSubscribed({recommendationId:e}),{}}const F$={togglePopup:u$,openPopup:c$,closePopup:xf,switchPage:l$,openNotification:m$,closeNotification:p$,back:d$,signout:h$,signin:g$,verifyOTC:f$,signup:b$,updateSubscription:k$,cancelSubscription:v$,continueSubscription:w$,updateNewsletter:$$,updateProfile:N$,refreshMemberData:z$,clearPopupNotification:x$,editBilling:S$,checkoutPlan:y$,updateNewsletterPreference:C$,showPopupNotification:E$,removeEmailFromSuppressionList:j$,oneClickSubscribe:A$,trackRecommendationClicked:I$,trackRecommendationSubscribed:D$};async function M$({action:e,data:t,state:a,api:n}){const i=F$[e];return i?await i({data:t,state:a,api:n})||{}:{}}var Ko={exports:{}};const D=e=>typeof e=="string",Li=()=>{let e,t;const a=new Promise((n,i)=>{e=n,t=i});return a.resolve=e,a.reject=t,a},Ef=e=>e==null?"":""+e,_$=(e,t,a)=>{e.forEach(n=>{t[n]&&(a[n]=t[n])})},Y$=/###/g,Cf=e=>e&&e.indexOf("###")>-1?e.replace(Y$,"."):e,jf=e=>!e||D(e),Bi=(e,t,a)=>{const n=D(t)?t.split("."):t;let i=0;for(;i<n.length-1;){if(jf(e))return{};const r=Cf(n[i]);!e[r]&&a&&(e[r]=new a),Object.prototype.hasOwnProperty.call(e,r)?e=e[r]:e={},++i}return jf(e)?{}:{obj:e,k:Cf(n[i])}},$f=(e,t,a)=>{const{obj:n,k:i}=Bi(e,t,Object);if(n!==void 0||t.length===1){n[i]=a;return}let r=t[t.length-1],o=t.slice(0,t.length-1),s=Bi(e,o,Object);for(;s.obj===void 0&&o.length;)r=`${o[o.length-1]}.${r}`,o=o.slice(0,o.length-1),s=Bi(e,o,Object),s&&s.obj&&typeof s.obj[`${s.k}.${r}`]<"u"&&(s.obj=void 0);s.obj[`${s.k}.${r}`]=a},R$=(e,t,a,n)=>{const{obj:i,k:r}=Bi(e,t,Object);i[r]=i[r]||[],i[r].push(a)},Go=(e,t)=>{const{obj:a,k:n}=Bi(e,t);if(a)return a[n]},U$=(e,t,a)=>{const n=Go(e,a);return n!==void 0?n:Go(t,a)},Tf=(e,t,a)=>{for(const n in t)n!=="__proto__"&&n!=="constructor"&&(n in e?D(e[n])||e[n]instanceof String||D(t[n])||t[n]instanceof String?a&&(e[n]=t[n]):Tf(e[n],t[n],a):e[n]=t[n]);return e},wn=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var L$={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const B$=e=>D(e)?e.replace(/[&<>"'\/]/g,t=>L$[t]):e;class O${constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const a=this.regExpMap.get(t);if(a!==void 0)return a;const n=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,n),this.regExpQueue.push(t),n}}const V$=[" ",",","?","!",";"],H$=new O$(20),W$=(e,t,a)=>{t=t||"",a=a||"";const n=V$.filter(o=>t.indexOf(o)<0&&a.indexOf(o)<0);if(n.length===0)return!0;const i=H$.getRegExp(`(${n.map(o=>o==="?"?"\\?":o).join("|")})`);let r=!i.test(e);if(!r){const o=e.indexOf(a);o>0&&!i.test(e.substring(0,o))&&(r=!0)}return r},bc=function(e,t){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const n=t.split(a);let i=e;for(let r=0;r<n.length;){if(!i||typeof i!="object")return;let o,s="";for(let l=r;l<n.length;++l)if(l!==r&&(s+=a),s+=n[l],o=i[s],o!==void 0){if(["string","number","boolean"].indexOf(typeof o)>-1&&l<n.length-1)continue;r+=l-r+1;break}i=o}return i},qo=e=>e&&e.replace("_","-"),K$={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class Jo{constructor(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,a)}init(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=a.prefix||"i18next:",this.logger=t||K$,this.options=a,this.debug=a.debug}log(){for(var t=arguments.length,a=new Array(t),n=0;n<t;n++)a[n]=arguments[n];return this.forward(a,"log","",!0)}warn(){for(var t=arguments.length,a=new Array(t),n=0;n<t;n++)a[n]=arguments[n];return this.forward(a,"warn","",!0)}error(){for(var t=arguments.length,a=new Array(t),n=0;n<t;n++)a[n]=arguments[n];return this.forward(a,"error","")}deprecate(){for(var t=arguments.length,a=new Array(t),n=0;n<t;n++)a[n]=arguments[n];return this.forward(a,"warn","WARNING DEPRECATED: ",!0)}forward(t,a,n,i){return i&&!this.debug?null:(D(t[0])&&(t[0]=`${n}${this.prefix} ${t[0]}`),this.logger[a](t))}create(t){return new Jo(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new Jo(this.logger,t)}}var dt=new Jo;class Zo{constructor(){this.observers={}}on(t,a){return t.split(" ").forEach(n=>{this.observers[n]||(this.observers[n]=new Map);const i=this.observers[n].get(a)||0;this.observers[n].set(a,i+1)}),this}off(t,a){if(this.observers[t]){if(!a){delete this.observers[t];return}this.observers[t].delete(a)}}emit(t){for(var a=arguments.length,n=new Array(a>1?a-1:0),i=1;i<a;i++)n[i-1]=arguments[i];this.observers[t]&&Array.from(this.observers[t].entries()).forEach(o=>{let[s,l]=o;for(let c=0;c<l;c++)s(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(o=>{let[s,l]=o;for(let c=0;c<l;c++)s.apply(s,[t,...n])})}}class Pf extends Zo{constructor(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=a,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const a=this.options.ns.indexOf(t);a>-1&&this.options.ns.splice(a,1)}getResource(t,a,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const r=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,o=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let s;t.indexOf(".")>-1?s=t.split("."):(s=[t,a],n&&(Array.isArray(n)?s.push(...n):D(n)&&r?s.push(...n.split(r)):s.push(n)));const l=Go(this.data,s);return!l&&!a&&!n&&t.indexOf(".")>-1&&(t=s[0],a=s[1],n=s.slice(2).join(".")),l||!o||!D(n)?l:bc(this.data&&this.data[t]&&this.data[t][a],n,r)}addResource(t,a,n,i){let r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const o=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let s=[t,a];n&&(s=s.concat(o?n.split(o):n)),t.indexOf(".")>-1&&(s=t.split("."),i=a,a=s[1]),this.addNamespaces(a),$f(this.data,s,i),r.silent||this.emit("added",t,a,n,i)}addResources(t,a,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const r in n)(D(n[r])||Array.isArray(n[r]))&&this.addResource(t,a,r,n[r],{silent:!0});i.silent||this.emit("added",t,a,n)}addResourceBundle(t,a,n,i,r){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},s=[t,a];t.indexOf(".")>-1&&(s=t.split("."),i=n,n=a,a=s[1]),this.addNamespaces(a);let l=Go(this.data,s)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),i?Tf(l,n,r):l={...l,...n},$f(this.data,s,l),o.silent||this.emit("added",t,a,n)}removeResourceBundle(t,a){this.hasResourceBundle(t,a)&&delete this.data[t][a],this.removeNamespaces(a),this.emit("removed",t,a)}hasResourceBundle(t,a){return this.getResource(t,a)!==void 0}getResourceBundle(t,a){return a||(a=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,a)}:this.getResource(t,a)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const a=this.getDataByLanguage(t);return!!(a&&Object.keys(a)||[]).find(i=>a[i]&&Object.keys(a[i]).length>0)}toJSON(){return this.data}}var zf={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,a,n,i){return e.forEach(r=>{this.processors[r]&&(t=this.processors[r].process(t,a,n,i))}),t}};const Nf={};class Qo extends Zo{constructor(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),_$(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=a,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=dt.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const n=this.resolve(t,a);return n&&n.res!==void 0}extractFromKey(t,a){let n=a.nsSeparator!==void 0?a.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const i=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let r=a.ns||this.options.defaultNS||[];const o=n&&t.indexOf(n)>-1,s=!this.options.userDefinedKeySeparator&&!a.keySeparator&&!this.options.userDefinedNsSeparator&&!a.nsSeparator&&!W$(t,n,i);if(o&&!s){const l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:D(r)?[r]:r};const c=t.split(n);(n!==i||n===i&&this.options.ns.indexOf(c[0])>-1)&&(r=c.shift()),t=c.join(i)}return{key:t,namespaces:D(r)?[r]:r}}translate(t,a,n){if(typeof a!="object"&&this.options.overloadTranslationOptionHandler&&(a=this.options.overloadTranslationOptionHandler(arguments)),typeof a=="object"&&(a={...a}),a||(a={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const i=a.returnDetails!==void 0?a.returnDetails:this.options.returnDetails,r=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,{key:o,namespaces:s}=this.extractFromKey(t[t.length-1],a),l=s[s.length-1],c=a.lng||this.language,d=a.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&c.toLowerCase()==="cimode"){if(d){const S=a.nsSeparator||this.options.nsSeparator;return i?{res:`${l}${S}${o}`,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(a)}:`${l}${S}${o}`}return i?{res:o,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(a)}:o}const p=this.resolve(t,a);let m=p&&p.res;const g=p&&p.usedKey||o,b=p&&p.exactUsedKey||o,v=Object.prototype.toString.apply(m),f=["[object Number]","[object Function]","[object RegExp]"],h=a.joinArrays!==void 0?a.joinArrays:this.options.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,w=!D(m)&&typeof m!="boolean"&&typeof m!="number";if(y&&m&&w&&f.indexOf(v)<0&&!(D(h)&&Array.isArray(m))){if(!a.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const S=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,m,{...a,ns:s}):`key '${o} (${this.language})' returned an object instead of string.`;return i?(p.res=S,p.usedParams=this.getUsedParamsDetails(a),p):S}if(r){const S=Array.isArray(m),j=S?[]:{},x=S?b:g;for(const C in m)if(Object.prototype.hasOwnProperty.call(m,C)){const z=`${x}${r}${C}`;j[C]=this.translate(z,{...a,joinArrays:!1,ns:s}),j[C]===z&&(j[C]=m[C])}m=j}}else if(y&&D(h)&&Array.isArray(m))m=m.join(h),m&&(m=this.extendTranslation(m,t,a,n));else{let S=!1,j=!1;const x=a.count!==void 0&&!D(a.count),C=Qo.hasDefaultValue(a),z=x?this.pluralResolver.getSuffix(c,a.count,a):"",E=a.ordinal&&x?this.pluralResolver.getSuffix(c,a.count,{ordinal:!1}):"",M=x&&!a.ordinal&&a.count===0&&this.pluralResolver.shouldUseIntlApi(),K=M&&a[`defaultValue${this.options.pluralSeparator}zero`]||a[`defaultValue${z}`]||a[`defaultValue${E}`]||a.defaultValue;!this.isValidLookup(m)&&C&&(S=!0,m=K),this.isValidLookup(m)||(j=!0,m=o);const ne=(a.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&j?void 0:m,mt=C&&K!==m&&this.options.updateMissing;if(j||S||mt){if(this.logger.log(mt?"updateKey":"missingKey",c,l,o,mt?K:m),r){const fe=this.resolve(o,{...a,keySeparator:!1});fe&&fe.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let _e=[];const pt=this.languageUtils.getFallbackCodes(this.options.fallbackLng,a.lng||this.language);if(this.options.saveMissingTo==="fallback"&&pt&&pt[0])for(let fe=0;fe<pt.length;fe++)_e.push(pt[fe]);else this.options.saveMissingTo==="all"?_e=this.languageUtils.toResolveHierarchy(a.lng||this.language):_e.push(a.lng||this.language);const xn=(fe,Qe,Ea)=>{const T=C&&Ea!==m?Ea:ne;this.options.missingKeyHandler?this.options.missingKeyHandler(fe,l,Qe,T,mt,a):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(fe,l,Qe,T,mt,a),this.emit("missingKey",fe,l,Qe,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&x?_e.forEach(fe=>{const Qe=this.pluralResolver.getSuffixes(fe,a);M&&a[`defaultValue${this.options.pluralSeparator}zero`]&&Qe.indexOf(`${this.options.pluralSeparator}zero`)<0&&Qe.push(`${this.options.pluralSeparator}zero`),Qe.forEach(Ea=>{xn([fe],o+Ea,a[`defaultValue${Ea}`]||K)})}):xn(_e,o,K))}m=this.extendTranslation(m,t,a,p,n),j&&m===o&&this.options.appendNamespaceToMissingKey&&(m=`${l}:${o}`),(j||S)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${o}`:o,S?m:void 0):m=this.options.parseMissingKeyHandler(m))}return i?(p.res=m,p.usedParams=this.getUsedParamsDetails(a),p):m}extendTranslation(t,a,n,i,r){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const c=D(t)&&(n&&n.interpolation&&n.interpolation.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let d;if(c){const m=t.match(this.interpolator.nestingRegexp);d=m&&m.length}let p=n.replace&&!D(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(p={...this.options.interpolation.defaultVariables,...p}),t=this.interpolator.interpolate(t,p,n.lng||this.language||i.usedLng,n),c){const m=t.match(this.interpolator.nestingRegexp),g=m&&m.length;d<g&&(n.nest=!1)}!n.lng&&this.options.compatibilityAPI!=="v1"&&i&&i.res&&(n.lng=this.language||i.usedLng),n.nest!==!1&&(t=this.interpolator.nest(t,function(){for(var m=arguments.length,g=new Array(m),b=0;b<m;b++)g[b]=arguments[b];return r&&r[0]===g[0]&&!n.context?(o.logger.warn(`It seems you are nesting recursively key: ${g[0]} in key: ${a[0]}`),null):o.translate(...g,a)},n)),n.interpolation&&this.interpolator.reset()}const s=n.postProcess||this.options.postProcess,l=D(s)?[s]:s;return t!=null&&l&&l.length&&n.applyPostProcessor!==!1&&(t=zf.handle(l,t,a,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),t}resolve(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n,i,r,o,s;return D(t)&&(t=[t]),t.forEach(l=>{if(this.isValidLookup(n))return;const c=this.extractFromKey(l,a),d=c.key;i=d;let p=c.namespaces;this.options.fallbackNS&&(p=p.concat(this.options.fallbackNS));const m=a.count!==void 0&&!D(a.count),g=m&&!a.ordinal&&a.count===0&&this.pluralResolver.shouldUseIntlApi(),b=a.context!==void 0&&(D(a.context)||typeof a.context=="number")&&a.context!=="",v=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);p.forEach(f=>{this.isValidLookup(n)||(s=f,!Nf[`${v[0]}-${f}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(s)&&(Nf[`${v[0]}-${f}`]=!0,this.logger.warn(`key "${i}" for languages "${v.join(", ")}" won't get resolved as namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),v.forEach(h=>{if(this.isValidLookup(n))return;o=h;const y=[d];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(y,d,h,f,a);else{let S;m&&(S=this.pluralResolver.getSuffix(h,a.count,a));const j=`${this.options.pluralSeparator}zero`,x=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(m&&(y.push(d+S),a.ordinal&&S.indexOf(x)===0&&y.push(d+S.replace(x,this.options.pluralSeparator)),g&&y.push(d+j)),b){const C=`${d}${this.options.contextSeparator}${a.context}`;y.push(C),m&&(y.push(C+S),a.ordinal&&S.indexOf(x)===0&&y.push(C+S.replace(x,this.options.pluralSeparator)),g&&y.push(C+j))}}let w;for(;w=y.pop();)this.isValidLookup(n)||(r=w,n=this.getResource(h,f,w,a))}))})}),{res:n,usedKey:i,exactUsedKey:r,usedLng:o,usedNS:s}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,a,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,a,n,i):this.resourceStore.getResource(t,a,n,i)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const a=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=t.replace&&!D(t.replace);let i=n?t.replace:t;if(n&&typeof t.count<"u"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!n){i={...i};for(const r of a)delete i[r]}return i}static hasDefaultValue(t){const a="defaultValue";for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&a===n.substring(0,a.length)&&t[n]!==void 0)return!0;return!1}}const yc=e=>e.charAt(0).toUpperCase()+e.slice(1);class Af{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=dt.create("languageUtils")}getScriptPartFromCode(t){if(t=qo(t),!t||t.indexOf("-")<0)return null;const a=t.split("-");return a.length===2||(a.pop(),a[a.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(a.join("-"))}getLanguagePartFromCode(t){if(t=qo(t),!t||t.indexOf("-")<0)return t;const a=t.split("-");return this.formatLanguageCode(a[0])}formatLanguageCode(t){if(D(t)&&t.indexOf("-")>-1){if(typeof Intl<"u"&&typeof Intl.getCanonicalLocales<"u")try{let i=Intl.getCanonicalLocales(t)[0];if(i&&this.options.lowerCaseLng&&(i=i.toLowerCase()),i)return i}catch{}const a=["hans","hant","latn","cyrl","cans","mong","arab"];let n=t.split("-");return this.options.lowerCaseLng?n=n.map(i=>i.toLowerCase()):n.length===2?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),a.indexOf(n[1].toLowerCase())>-1&&(n[1]=yc(n[1].toLowerCase()))):n.length===3&&(n[0]=n[0].toLowerCase(),n[1].length===2&&(n[1]=n[1].toUpperCase()),n[0]!=="sgn"&&n[2].length===2&&(n[2]=n[2].toUpperCase()),a.indexOf(n[1].toLowerCase())>-1&&(n[1]=yc(n[1].toLowerCase())),a.indexOf(n[2].toLowerCase())>-1&&(n[2]=yc(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let a;return t.forEach(n=>{if(a)return;const i=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(i))&&(a=i)}),!a&&this.options.supportedLngs&&t.forEach(n=>{if(a)return;const i=this.getLanguagePartFromCode(n);if(this.isSupportedCode(i))return a=i;a=this.options.supportedLngs.find(r=>{if(r===i)return r;if(!(r.indexOf("-")<0&&i.indexOf("-")<0)&&(r.indexOf("-")>0&&i.indexOf("-")<0&&r.substring(0,r.indexOf("-"))===i||r.indexOf(i)===0&&i.length>1))return r})}),a||(a=this.getFallbackCodes(this.options.fallbackLng)[0]),a}getFallbackCodes(t,a){if(!t)return[];if(typeof t=="function"&&(t=t(a)),D(t)&&(t=[t]),Array.isArray(t))return t;if(!a)return t.default||[];let n=t[a];return n||(n=t[this.getScriptPartFromCode(a)]),n||(n=t[this.formatLanguageCode(a)]),n||(n=t[this.getLanguagePartFromCode(a)]),n||(n=t.default),n||[]}toResolveHierarchy(t,a){const n=this.getFallbackCodes(a||this.options.fallbackLng||[],t),i=[],r=o=>{o&&(this.isSupportedCode(o)?i.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return D(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&r(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&r(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&r(this.getLanguagePartFromCode(t))):D(t)&&r(this.formatLanguageCode(t)),n.forEach(o=>{i.indexOf(o)<0&&r(this.formatLanguageCode(o))}),i}}let G$=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],q$={1:e=>+(e>1),2:e=>+(e!=1),3:e=>0,4:e=>e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,5:e=>e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5,6:e=>e==1?0:e>=2&&e<=4?1:2,7:e=>e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,8:e=>e==1?0:e==2?1:e!=8&&e!=11?2:3,9:e=>+(e>=2),10:e=>e==1?0:e==2?1:e<7?2:e<11?3:4,11:e=>e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3,12:e=>+(e%10!=1||e%100==11),13:e=>+(e!==0),14:e=>e==1?0:e==2?1:e==3?2:3,15:e=>e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2,16:e=>e%10==1&&e%100!=11?0:e!==0?1:2,17:e=>e==1||e%10==1&&e%100!=11?0:1,18:e=>e==0?0:e==1?1:2,19:e=>e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3,20:e=>e==1?0:e==0||e%100>0&&e%100<20?1:2,21:e=>e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0,22:e=>e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3};const J$=["v1","v2","v3"],Z$=["v4"],If={zero:0,one:1,two:2,few:3,many:4,other:5},Q$=()=>{const e={};return G$.forEach(t=>{t.lngs.forEach(a=>{e[a]={numbers:t.nr,plurals:q$[t.fc]}})}),e};class X${constructor(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=a,this.logger=dt.create("pluralResolver"),(!this.options.compatibilityJSON||Z$.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=Q$(),this.pluralRulesCache={}}addRule(t,a){this.rules[t]=a}clearCache(){this.pluralRulesCache={}}getRule(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi()){const n=qo(t==="dev"?"en":t),i=a.ordinal?"ordinal":"cardinal",r=JSON.stringify({cleanedCode:n,type:i});if(r in this.pluralRulesCache)return this.pluralRulesCache[r];let o;try{o=new Intl.PluralRules(n,{type:i})}catch{if(!t.match(/-|_/))return;const l=this.languageUtils.getLanguagePartFromCode(t);o=this.getRule(l,a)}return this.pluralRulesCache[r]=o,o}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(t,a);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(t,a){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,n).map(i=>`${a}${i}`)}getSuffixes(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(t,a);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort((i,r)=>If[i]-If[r]).map(i=>`${this.options.prepend}${a.ordinal?`ordinal${this.options.prepend}`:""}${i}`):n.numbers.map(i=>this.getSuffix(t,i,a)):[]}getSuffix(t,a){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(t,n);return i?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i.select(a)}`:this.getSuffixRetroCompatible(i,a):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,a){const n=t.noAbs?t.plurals(a):t.plurals(Math.abs(a));let i=t.numbers[n];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));const r=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?`_plural_${i.toString()}`:r():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?r():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!J$.includes(this.options.compatibilityJSON)}}const Df=function(e,t,a){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,r=U$(e,t,a);return!r&&i&&D(a)&&(r=bc(e,a,n),r===void 0&&(r=bc(t,a,n))),r},kc=e=>e.replace(/\$/g,"$$$$");class e0{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=dt.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(a=>a),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:a,escapeValue:n,useRawValueToEscape:i,prefix:r,prefixEscaped:o,suffix:s,suffixEscaped:l,formatSeparator:c,unescapeSuffix:d,unescapePrefix:p,nestingPrefix:m,nestingPrefixEscaped:g,nestingSuffix:b,nestingSuffixEscaped:v,nestingOptionsSeparator:f,maxReplaces:h,alwaysFormat:y}=t.interpolation;this.escape=a!==void 0?a:B$,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=r?wn(r):o||"{{",this.suffix=s?wn(s):l||"}}",this.formatSeparator=c||",",this.unescapePrefix=d?"":p||"-",this.unescapeSuffix=this.unescapePrefix?"":d||"",this.nestingPrefix=m?wn(m):g||wn("$t("),this.nestingSuffix=b?wn(b):v||wn(")"),this.nestingOptionsSeparator=f||",",this.maxReplaces=h||1e3,this.alwaysFormat=y!==void 0?y:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(a,n)=>a&&a.source===n?(a.lastIndex=0,a):new RegExp(n,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,a,n,i){let r,o,s;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=g=>{if(g.indexOf(this.formatSeparator)<0){const h=Df(a,l,g,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(h,void 0,n,{...i,...a,interpolationkey:g}):h}const b=g.split(this.formatSeparator),v=b.shift().trim(),f=b.join(this.formatSeparator).trim();return this.format(Df(a,l,v,this.options.keySeparator,this.options.ignoreJSONStructure),f,n,{...i,...a,interpolationkey:v})};this.resetRegExp();const d=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,p=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:g=>kc(g)},{regex:this.regexp,safeValue:g=>this.escapeValue?kc(this.escape(g)):kc(g)}].forEach(g=>{for(s=0;r=g.regex.exec(t);){const b=r[1].trim();if(o=c(b),o===void 0)if(typeof d=="function"){const f=d(t,r,i);o=D(f)?f:""}else if(i&&Object.prototype.hasOwnProperty.call(i,b))o="";else if(p){o=r[0];continue}else this.logger.warn(`missed to pass in variable ${b} for interpolating ${t}`),o="";else!D(o)&&!this.useRawValueToEscape&&(o=Ef(o));const v=g.safeValue(o);if(t=t.replace(r[0],v),p?(g.regex.lastIndex+=o.length,g.regex.lastIndex-=r[0].length):g.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),t}nest(t,a){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,r,o;const s=(l,c)=>{const d=this.nestingOptionsSeparator;if(l.indexOf(d)<0)return l;const p=l.split(new RegExp(`${d}[ ]*{`));let m=`{${p[1]}`;l=p[0],m=this.interpolate(m,o);const g=m.match(/'/g),b=m.match(/"/g);(g&&g.length%2===0&&!b||b.length%2!==0)&&(m=m.replace(/'/g,'"'));try{o=JSON.parse(m),c&&(o={...c,...o})}catch(v){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,v),`${l}${d}${m}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,l};for(;i=this.nestingRegexp.exec(t);){let l=[];o={...n},o=o.replace&&!D(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let c=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const d=i[1].split(this.formatSeparator).map(p=>p.trim());i[1]=d.shift(),l=d,c=!0}if(r=a(s.call(this,i[1].trim(),o),o),r&&i[0]===t&&!D(r))return r;D(r)||(r=Ef(r)),r||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),r=""),c&&(r=l.reduce((d,p)=>this.format(d,p,n.lng,{...n,interpolationkey:i[1].trim()}),r.trim())),t=t.replace(i[0],r),this.regexp.lastIndex=0}return t}}const t0=e=>{let t=e.toLowerCase().trim();const a={};if(e.indexOf("(")>-1){const n=e.split("(");t=n[0].toLowerCase().trim();const i=n[1].substring(0,n[1].length-1);t==="currency"&&i.indexOf(":")<0?a.currency||(a.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?a.range||(a.range=i.trim()):i.split(";").forEach(o=>{if(o){const[s,...l]=o.split(":"),c=l.join(":").trim().replace(/^'+|'+$/g,""),d=s.trim();a[d]||(a[d]=c),c==="false"&&(a[d]=!1),c==="true"&&(a[d]=!0),isNaN(c)||(a[d]=parseInt(c,10))}})}return{formatName:t,formatOptions:a}},Sn=e=>{const t={};return(a,n,i)=>{let r=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(r={...r,[i.interpolationkey]:void 0});const o=n+JSON.stringify(r);let s=t[o];return s||(s=e(qo(n),i),t[o]=s),s(a)}};class a0{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=dt.create("formatter"),this.options=t,this.formats={number:Sn((a,n)=>{const i=new Intl.NumberFormat(a,{...n});return r=>i.format(r)}),currency:Sn((a,n)=>{const i=new Intl.NumberFormat(a,{...n,style:"currency"});return r=>i.format(r)}),datetime:Sn((a,n)=>{const i=new Intl.DateTimeFormat(a,{...n});return r=>i.format(r)}),relativetime:Sn((a,n)=>{const i=new Intl.RelativeTimeFormat(a,{...n});return r=>i.format(r,n.range||"day")}),list:Sn((a,n)=>{const i=new Intl.ListFormat(a,{...n});return r=>i.format(r)})},this.init(t)}init(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=a.interpolation.formatSeparator||","}add(t,a){this.formats[t.toLowerCase().trim()]=a}addCached(t,a){this.formats[t.toLowerCase().trim()]=Sn(a)}format(t,a,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const r=a.split(this.formatSeparator);if(r.length>1&&r[0].indexOf("(")>1&&r[0].indexOf(")")<0&&r.find(s=>s.indexOf(")")>-1)){const s=r.findIndex(l=>l.indexOf(")")>-1);r[0]=[r[0],...r.splice(1,s)].join(this.formatSeparator)}return r.reduce((s,l)=>{const{formatName:c,formatOptions:d}=t0(l);if(this.formats[c]){let p=s;try{const m=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},g=m.locale||m.lng||i.locale||i.lng||n;p=this.formats[c](s,g,{...d,...i,...m})}catch(m){this.logger.warn(m)}return p}else this.logger.warn(`there was no format function for ${c}`);return s},t)}}const n0=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class i0 extends Zo{constructor(t,a,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=a,this.services=n,this.languageUtils=n.languageUtils,this.options=i,this.logger=dt.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,i.backend,i)}queueLoad(t,a,n,i){const r={},o={},s={},l={};return t.forEach(c=>{let d=!0;a.forEach(p=>{const m=`${c}|${p}`;!n.reload&&this.store.hasResourceBundle(c,p)?this.state[m]=2:this.state[m]<0||(this.state[m]===1?o[m]===void 0&&(o[m]=!0):(this.state[m]=1,d=!1,o[m]===void 0&&(o[m]=!0),r[m]===void 0&&(r[m]=!0),l[p]===void 0&&(l[p]=!0)))}),d||(s[c]=!0)}),(Object.keys(r).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(r),pending:Object.keys(o),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(l)}}loaded(t,a,n){const i=t.split("|"),r=i[0],o=i[1];a&&this.emit("failedLoading",r,o,a),!a&&n&&this.store.addResourceBundle(r,o,n,void 0,void 0,{skipCopy:!0}),this.state[t]=a?-1:2,a&&n&&(this.state[t]=0);const s={};this.queue.forEach(l=>{R$(l.loaded,[r],o),n0(l,t),a&&l.errors.push(a),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(c=>{s[c]||(s[c]={});const d=l.loaded[c];d.length&&d.forEach(p=>{s[c][p]===void 0&&(s[c][p]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(l=>!l.done)}read(t,a,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!t.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:a,fcName:n,tried:i,wait:r,callback:o});return}this.readingCalls++;const s=(c,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const p=this.waitingReads.shift();this.read(p.lng,p.ns,p.fcName,p.tried,p.wait,p.callback)}if(c&&d&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,t,a,n,i+1,r*2,o)},r);return}o(c,d)},l=this.backend[n].bind(this.backend);if(l.length===2){try{const c=l(t,a);c&&typeof c.then=="function"?c.then(d=>s(null,d)).catch(s):s(null,c)}catch(c){s(c)}return}return l(t,a,s)}prepareLoading(t,a){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();D(t)&&(t=this.languageUtils.toResolveHierarchy(t)),D(a)&&(a=[a]);const r=this.queueLoad(t,a,n,i);if(!r.toLoad.length)return r.pending.length||i(),null;r.toLoad.forEach(o=>{this.loadOne(o)})}load(t,a,n){this.prepareLoading(t,a,{},n)}reload(t,a,n){this.prepareLoading(t,a,{reload:!0},n)}loadOne(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const n=t.split("|"),i=n[0],r=n[1];this.read(i,r,"read",void 0,void 0,(o,s)=>{o&&this.logger.warn(`${a}loading namespace ${r} for language ${i} failed`,o),!o&&s&&this.logger.log(`${a}loaded namespace ${r} for language ${i}`,s),this.loaded(t,o,s)})}saveMissing(t,a,n,i,r){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},s=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(a)){this.logger.warn(`did not save key "${n}" as the namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(n==null||n==="")){if(this.backend&&this.backend.create){const l={...o,isUpdate:r},c=this.backend.create.bind(this.backend);if(c.length<6)try{let d;c.length===5?d=c(t,a,n,i,l):d=c(t,a,n,i),d&&typeof d.then=="function"?d.then(p=>s(null,p)).catch(s):s(null,d)}catch(d){s(d)}else c(t,a,n,i,s,l)}!t||!t[0]||this.store.addResource(t[0],a,n,i)}}}const Ff=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),D(e[1])&&(t.defaultValue=e[1]),D(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const a=e[3]||e[2];Object.keys(a).forEach(n=>{t[n]=a[n]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),Mf=e=>(D(e.ns)&&(e.ns=[e.ns]),D(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),D(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),Xo=()=>{},r0=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(a=>{typeof e[a]=="function"&&(e[a]=e[a].bind(e))})};class Oi extends Zo{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Mf(t),this.services={},this.logger=dt,this.modules={external:[]},r0(this),a&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,a),this;setTimeout(()=>{this.init(t,a)},0)}}init(){var t=this;let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof a=="function"&&(n=a,a={}),!a.defaultNS&&a.defaultNS!==!1&&a.ns&&(D(a.ns)?a.defaultNS=a.ns:a.ns.indexOf("translation")<0&&(a.defaultNS=a.ns[0]));const i=Ff();this.options={...i,...this.options,...Mf(a)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...i.interpolation,...this.options.interpolation}),a.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=a.keySeparator),a.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=a.nsSeparator);const r=d=>d?typeof d=="function"?new d:d:null;if(!this.options.isClone){this.modules.logger?dt.init(r(this.modules.logger),this.options):dt.init(null,this.options);let d;this.modules.formatter?d=this.modules.formatter:typeof Intl<"u"&&(d=a0);const p=new Af(this.options);this.store=new Pf(this.options.resources,this.options);const m=this.services;m.logger=dt,m.resourceStore=this.store,m.languageUtils=p,m.pluralResolver=new X$(p,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),d&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(m.formatter=r(d),m.formatter.init(m,this.options),this.options.interpolation.format=m.formatter.format.bind(m.formatter)),m.interpolator=new e0(this.options),m.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},m.backendConnector=new i0(r(this.modules.backend),m.resourceStore,m,this.options),m.backendConnector.on("*",function(g){for(var b=arguments.length,v=new Array(b>1?b-1:0),f=1;f<b;f++)v[f-1]=arguments[f];t.emit(g,...v)}),this.modules.languageDetector&&(m.languageDetector=r(this.modules.languageDetector),m.languageDetector.init&&m.languageDetector.init(m,this.options.detection,this.options)),this.modules.i18nFormat&&(m.i18nFormat=r(this.modules.i18nFormat),m.i18nFormat.init&&m.i18nFormat.init(this)),this.translator=new Qo(this.services,this.options),this.translator.on("*",function(g){for(var b=arguments.length,v=new Array(b>1?b-1:0),f=1;f<b;f++)v[f-1]=arguments[f];t.emit(g,...v)}),this.modules.external.forEach(g=>{g.init&&g.init(this)})}if(this.format=this.options.interpolation.format,n||(n=Xo),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.length>0&&d[0]!=="dev"&&(this.options.lng=d[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(d=>{this[d]=function(){return t.store[d](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(d=>{this[d]=function(){return t.store[d](...arguments),t}});const l=Li(),c=()=>{const d=(p,m)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(m),n(p,m)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return d(null,this.t.bind(this));this.changeLanguage(this.options.lng,d)};return this.options.resources||!this.options.initImmediate?c():setTimeout(c,0),l}loadResources(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Xo;const i=D(t)?t:this.language;if(typeof t=="function"&&(n=t),!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const r=[],o=s=>{if(!s||s==="cimode")return;this.services.languageUtils.toResolveHierarchy(s).forEach(c=>{c!=="cimode"&&r.indexOf(c)<0&&r.push(c)})};i?o(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>o(l)),this.options.preload&&this.options.preload.forEach(s=>o(s)),this.services.backendConnector.load(r,this.options.ns,s=>{!s&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(s)})}else n(null)}reloadResources(t,a,n){const i=Li();return typeof t=="function"&&(n=t,t=void 0),typeof a=="function"&&(n=a,a=void 0),t||(t=this.languages),a||(a=this.options.ns),n||(n=Xo),this.services.backendConnector.reload(t,a,r=>{i.resolve(),n(r)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&zf.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let a=0;a<this.languages.length;a++){const n=this.languages[a];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}changeLanguage(t,a){var n=this;this.isLanguageChangingTo=t;const i=Li();this.emit("languageChanging",t);const r=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},o=(l,c)=>{c?(r(c),this.translator.changeLanguage(c),this.isLanguageChangingTo=void 0,this.emit("languageChanged",c),this.logger.log("languageChanged",c)):this.isLanguageChangingTo=void 0,i.resolve(function(){return n.t(...arguments)}),a&&a(l,function(){return n.t(...arguments)})},s=l=>{!t&&!l&&this.services.languageDetector&&(l=[]);const c=D(l)?l:this.services.languageUtils.getBestMatchFromCodes(l);c&&(this.language||r(c),this.translator.language||this.translator.changeLanguage(c),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(c)),this.loadResources(c,d=>{o(d,c)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(t),i}getFixedT(t,a,n){var i=this;const r=function(o,s){let l;if(typeof s!="object"){for(var c=arguments.length,d=new Array(c>2?c-2:0),p=2;p<c;p++)d[p-2]=arguments[p];l=i.options.overloadTranslationOptionHandler([o,s].concat(d))}else l={...s};l.lng=l.lng||r.lng,l.lngs=l.lngs||r.lngs,l.ns=l.ns||r.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||n||r.keyPrefix);const m=i.options.keySeparator||".";let g;return l.keyPrefix&&Array.isArray(o)?g=o.map(b=>`${l.keyPrefix}${m}${b}`):g=l.keyPrefix?`${l.keyPrefix}${m}${o}`:o,i.t(g,l)};return D(t)?r.lng=t:r.lngs=t,r.ns=a,r.keyPrefix=n,r}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=a.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,r=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const o=(s,l)=>{const c=this.services.backendConnector.state[`${s}|${l}`];return c===-1||c===0||c===2};if(a.precheck){const s=a.precheck(this,o);if(s!==void 0)return s}return!!(this.hasResourceBundle(n,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(n,t)&&(!i||o(r,t)))}loadNamespaces(t,a){const n=Li();return this.options.ns?(D(t)&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{n.resolve(),a&&a(i)}),n):(a&&a(),Promise.resolve())}loadLanguages(t,a){const n=Li();D(t)&&(t=[t]);const i=this.options.preload||[],r=t.filter(o=>i.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return r.length?(this.options.preload=i.concat(r),this.loadResources(o=>{n.resolve(),a&&a(o)}),n):(a&&a(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const a=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],n=this.services&&this.services.languageUtils||new Af(Ff());return a.indexOf(n.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;return new Oi(t,a)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Xo;const n=t.forkResourceStore;n&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},r=new Oi(i);return(t.debug!==void 0||t.prefix!==void 0)&&(r.logger=r.logger.clone(t)),["store","services","language"].forEach(s=>{r[s]=this[s]}),r.services={...this.services},r.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},n&&(r.store=new Pf(this.store.data,i),r.services.resourceStore=r.store),r.translator=new Qo(r.services,i),r.translator.on("*",function(s){for(var l=arguments.length,c=new Array(l>1?l-1:0),d=1;d<l;d++)c[d-1]=arguments[d];r.emit(s,...c)}),r.init(i,a),r.translator.options=i,r.translator.backendConnector.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},r}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const _f=Oi.createInstance();_f.createInstance=Oi.createInstance;var o0=_f;const s0=o0,Yf=["af","ar","bg","bn","bs","ca","cs","da","de","de-CH","el","en","eo","es","et","eu","fa","fi","fr","gd","he","hi","hr","hu","id","is","it","ja","ko","kz","lt","lv","mk","mn","ms","nb","ne","nl","nn","pa","pl","pt","pt-BR","ro","ru","si","sk","sl","sq","sr","sr-Cyrl","sv","th","tr","uk","ur","uz","vi","zh","zh-Hant","sw","ta"];function Rf(e,t){return e.reduce((a,n)=>{let i;try{i=ag("/ghost/i18n/lib")(`../locales/${n}/${t}.json`)}catch{i=ag("/ghost/i18n/lib")(`../locales/en/${t}.json`)}return a[n]={[t]:{...i,...i.default&&typeof i.default=="object"?i.default:{}}},a},{})}Ko.exports=(e="en",t="portal")=>{const a=s0.createInstance(),n={prefix:"{",suffix:"}"};let i=Rf(Yf,t);return a.init({lng:e,nsSeparator:!1,keySeparator:!1,returnEmptyString:!1,fallbackLng:{no:["nb","en"],default:["en"]},ns:t,defaultNS:t,interpolation:n,resources:i}),a},Ko.exports.SUPPORTED_LOCALES=Yf,Ko.exports.generateResources=Rf;var l0=Ko.exports,u0=l0;const vc=Ne(u0);function Uf(e,t){e&&(e.innerText=t)}function c0(e,t,a,n){t.classList.add("error");const i=n("There was an error sending the email, please try again");Uf(a,Sa(e,i,n))}async function d0({event:e,form:t,errorEl:a,siteUrl:n,submitHandler:i},r=o=>o){var y;t.removeEventListener("submit",i),e.preventDefault(),a&&(a.innerText=""),t.classList.remove("success","invalid","error");let o=e.target.querySelector("input[data-members-email]"),s=e.target.querySelector("input[data-members-name]"),l=((y=t==null?void 0:t.dataset)==null?void 0:y.membersAutoredirect)||"true",c=o==null?void 0:o.value,d=s&&s.value||void 0,p,m=[],g=[],b=e.target.querySelectorAll("input[data-members-label]")||[];for(let w=0;w<b.length;++w)m.push(b[w].value);let v=e.target.querySelectorAll("input[type=hidden][data-members-newsletter], input[type=checkbox][data-members-newsletter]:checked, input[type=radio][data-members-newsletter]:checked")||[];for(let w=0;w<v.length;++w)g.push({name:v[w].value});t.dataset.membersForm&&(p=t.dataset.membersForm),t.classList.add("loading");const f=Fi(),h={email:c,emailType:p,labels:m,name:d,autoRedirect:l==="true"};f&&(h.urlHistory=f),v.length>0?h.newsletters=g:(e.target.querySelectorAll("input[type=checkbox][data-members-newsletter]")||[]).length>0&&(h.newsletters=[]);try{const S=await(await fetch(`${n}/members/api/integrity-token/`,{method:"GET"})).text(),j=await fetch(`${n}/members/api/send-magic-link/`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...h,integrityToken:S})});if(t.addEventListener("submit",i),t.classList.remove("loading"),j.ok)t.classList.add("success");else{const x=await $t.fromApiResponse(j),C=Sa(x,r("Failed to send magic link email"),r);Uf(a,C),t.classList.add("error")}}catch(w){c0(w,t,a,r)}}function m0({event:e,el:t,errorEl:a,siteUrl:n,site:i,member:r,clickHandler:o}){const s=i.locale||"en",c=vc(s,"portal").t;t.removeEventListener("click",o),e.preventDefault();let d=t.dataset.membersPlan,p=bE(i,d.toLowerCase()),m=t.dataset.membersSuccess,g=t.dataset.membersCancel,b,v;m&&(b=new URL(m,window.location.href).href),g&&(v=new URL(g,window.location.href).href),a&&(a.innerText=""),t.classList.add("loading");const f=r?{checkoutType:"upgrade"}:{},h=Fi();return h&&(f.urlHistory=h),fetch(`${n}/members/api/session`,{credentials:"same-origin"}).then(function(y){return y.ok?y.text():null}).then(function(y){return fetch(`${n}/members/api/create-stripe-checkout-session/`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...p,identity:y,successUrl:b,cancelUrl:v,metadata:f})}).then(function(w){if(!w.ok)throw new Error(c("Could not create stripe checkout session"));return w.json()})}).then(function(y){return y.url?window.location.assign(y.url):window.Stripe(y.publicKey).redirectToCheckout({sessionId:y.sessionId}).then(function(S){if(S.error)throw new Error(S.error.message)})}).catch(function(y){console.error(y),t.addEventListener("click",o),t.classList.remove("loading"),a&&(a.innerText=y.message),t.classList.add("error")})}function p0({siteUrl:e,site:t,member:a}){const n=t.locale||"en",r=vc(n,"portal").t;e&&(e=e.replace(/\/$/,""),Array.prototype.forEach.call(document.querySelectorAll("form[data-members-form]"),function(o){let s=o.querySelector("[data-members-error]");function l(c){d0({event:c,errorEl:s,form:o,siteUrl:e,submitHandler:l},r)}o.addEventListener("submit",l)}),Array.prototype.forEach.call(document.querySelectorAll("[data-members-plan]"),function(o){let s=o.querySelector("[data-members-error]");function l(c){m0({el:o,event:c,errorEl:s,member:a,site:t,siteUrl:e,clickHandler:l})}o.addEventListener("click",l)}),Array.prototype.forEach.call(document.querySelectorAll("[data-members-edit-billing]"),function(o){let s=o.querySelector("[data-members-error]"),l=o.dataset.membersSuccess,c=o.dataset.membersCancel,d,p;l&&(d=new URL(l,window.location.href).href),c&&(p=new URL(c,window.location.href).href);function m(g){o.removeEventListener("click",m),g.preventDefault(),s&&(s.innerText=""),o.classList.add("loading"),fetch(`${e}/members/api/session`,{credentials:"same-origin"}).then(function(b){return b.ok?b.text():null}).then(function(b){return fetch(`${e}/members/api/create-stripe-update-session/`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({identity:b,successUrl:d,cancelUrl:p})}).then(function(v){if(!v.ok)throw new Error(r("Could not create stripe checkout session"));return v.json()})}).then(function(b){return window.Stripe(b.publicKey).redirectToCheckout({sessionId:b.sessionId})}).then(function(b){if(b.error)throw new Error(r(b.error.message))}).catch(function(b){console.error(b),o.addEventListener("click",m),o.classList.remove("loading"),s&&(s.innerText=b.message),o.classList.add("error")})}o.addEventListener("click",m)}),Array.prototype.forEach.call(document.querySelectorAll("[data-members-signout]"),function(o){function s(l){o.removeEventListener("click",s),l.preventDefault(),o.classList.remove("error"),o.classList.add("loading"),fetch(`${e}/members/api/session`,{method:"DELETE"}).then(function(c){c.ok?window.location.replace(e):(o.addEventListener("click",s),o.classList.remove("loading"),o.classList.add("error"))})}o.addEventListener("click",s)}),Array.prototype.forEach.call(document.querySelectorAll("[data-members-cancel-subscription]"),function(o){let s=o.parentElement.querySelector("[data-members-error]");function l(c){o.removeEventListener("click",l),c.preventDefault(),o.classList.remove("error"),o.classList.add("loading");let d=o.dataset.membersCancelSubscription;return s&&(s.innerText=""),fetch(`${e}/members/api/session`,{credentials:"same-origin"}).then(function(p){return p.ok?p.text():null}).then(function(p){return fetch(`${e}/members/api/subscriptions/${d}/`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({identity:p,smart_cancel:!0})})}).then(function(p){p.ok?window.location.reload():(o.addEventListener("click",l),o.classList.remove("loading"),o.classList.add("error"),s&&(s.innerText=r("There was an error cancelling your subscription, please try again.")))})}o.addEventListener("click",l)}),Array.prototype.forEach.call(document.querySelectorAll("[data-members-continue-subscription]"),function(o){let s=o.parentElement.querySelector("[data-members-error]");function l(c){o.removeEventListener("click",l),c.preventDefault(),o.classList.remove("error"),o.classList.add("loading");let d=o.dataset.membersContinueSubscription;return s&&(s.innerText=""),fetch(`${e}/members/api/session`,{credentials:"same-origin"}).then(function(p){return p.ok?p.text():null}).then(function(p){return fetch(`${e}/members/api/subscriptions/${d}/`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({identity:p,cancel_at_period_end:!1})})}).then(function(p){p.ok?window.location.reload():(o.addEventListener("click",l),o.classList.remove("loading"),o.classList.add("error"),s&&(s.innerText=r("There was an error continuing your subscription, please try again.")))})}o.addEventListener("click",l)}))}const h0={showPopup:!0,site:vn,member:Wo.free,page:"accountEmail",...o$(),pageData:Sf};function g0({site:e,children:t}){const{portal_sentry:a}=e||{};return a&&a.dsn?u.jsx(Bu,{children:t}):u.jsx(u.Fragment,{children:t})}class f0 extends Y.Component{constructor(t){super(t),this.setupCustomTriggerButton(t),this.state={site:null,member:null,page:"loading",showPopup:!1,action:"init:running",initStatus:"running",lastPage:null,customSiteUrl:t.customSiteUrl,locale:t.locale,scrollbarWidth:0,labs:t.labs||{}}}componentDidMount(){const t=this.getScrollbarWidth();this.setState({scrollbarWidth:t}),this.initSetup()}componentDidUpdate(t,a){var n,i,r;if(a.showPopup!==this.state.showPopup){this.handleCustomTriggerClassUpdate();try{this.state.showPopup?(this.bodyScroll=(r=(i=(n=window.document)==null?void 0:n.body)==null?void 0:i.style)==null?void 0:r.overflow,this.bodyMargin=window.getComputedStyle(document.body).getPropertyValue("margin-right"),window.document.body.style.overflow="hidden",this.state.scrollbarWidth&&(window.document.body.style.marginRight=`calc(${this.bodyMargin} + ${this.state.scrollbarWidth}px)`)):(window.document.body.style.overflow=this.bodyScroll||"",!this.bodyMargin||this.bodyMargin==="0px"?window.document.body.style.marginRight="":window.document.body.style.marginRight=this.bodyMargin)}catch{}}if(this.state.initStatus==="success"&&a.initStatus!==this.state.initStatus){const{siteUrl:o}=this.props,s=this.getContextFromState();this.sendPortalReadyEvent(),p0({siteUrl:o,site:s.site,member:s.member})}}componentWillUnmount(){clearTimeout(this.timeoutId),this.customTriggerButtons&&this.customTriggerButtons.forEach(t=>{t.removeEventListener("click",this.clickHandler)}),window.removeEventListener("hashchange",this.hashHandler,!1)}sendPortalReadyEvent(){window.self!==window.parent&&window.parent.postMessage({type:"portal-ready",payload:{}},"*")}getScrollbarWidth(){const t=document.createElement("div");t.style.visibility="hidden",t.style.overflow="scroll",document.body.appendChild(t),document.body.appendChild(t);const a=t.offsetWidth-t.clientWidth;return document.body.removeChild(t),a}setupCustomTriggerButton(){this.clickHandler=n=>{n.preventDefault();const i=n.currentTarget,r=i&&i.dataset.portal,{page:o,pageQuery:s,pageData:l}=this.getPageFromLinkPath(r)||{};this.state.initStatus==="success"&&(s&&s!=="free"?this.handleSignupQuery({site:this.state.site,pageQuery:s}):this.dispatchAction("openPopup",{page:o,pageQuery:s,pageData:l}))};const t="[data-portal]",a="gh-portal-close";this.customTriggerButtons=document.querySelectorAll(t)||[],this.customTriggerButtons.forEach(n=>{n.classList.add(a),n.removeEventListener("click",this.clickHandler),n.addEventListener("click",this.clickHandler)})}handleCustomTriggerClassUpdate(){var n;const t="gh-portal-open",a="gh-portal-close";(n=this.customTriggerButtons)==null||n.forEach(i=>{const r=this.state.showPopup?t:a,o=this.state.showPopup?a:t;i.classList.add(r),i.classList.remove(o)})}async initSetup(){try{const{site:t,member:a,page:n,showPopup:i,popupNotification:r,lastPage:o,pageQuery:s,pageData:l}=await this.fetchData(),c=this.props.siteI18nEnabled&&(this.props.locale||t.locale)||"en",d=vc(c,"portal"),p={site:t,member:a,page:n,lastPage:o,pageQuery:s,showPopup:i,pageData:l,popupNotification:r,t:d.t,dir:d.dir()||"ltr",action:"init:success",initStatus:"success",locale:c};if(this.handleSignupQuery({site:t,pageQuery:s,member:a}),this.setState(p),this.hashHandler=()=>{this.updateStateForPreviewLinks()},window.addEventListener("hashchange",this.hashHandler,!1),!a){const m=document.querySelectorAll("[data-lexical-signup-form]");m.length>0&&m.forEach(g=>{g.style.display=""})}this.setupRecommendationButtons(),this.transformPortalLinksToRelative()}catch(t){console.error("[Portal] Failed to initialize:",t),this.setState({action:"init:failed",initStatus:"failed"})}}async fetchData(){const{site:t,member:a}=await this.fetchApiData(),{site:n,...i}=this.fetchDevData(),{site:r,...o}=this.fetchLinkData(t,a),{site:s,...l}=this.fetchPreviewData(),{site:c,...d}=this.fetchNotificationData();return{member:a,page:"",site:{...t,...r,...s,...c,...n,plans:{...(n||{}).plans,...(t||{}).plans,...(s||{}).plans}},...i,...o,...d,...l}}fetchDevData(){return J(["dev"])&&!this.state.customSiteUrl?h0:J(["test"])?{showPopup:this.props.showPopup!==void 0?this.props.showPopup:!0}:{}}fetchOfferQueryStrData(t=""){const a=new URLSearchParams(t),n={};for(let i of a.entries()){const r=i[0],o=decodeURIComponent(i[1]);r==="name"?n.name=o||"":r==="code"?n.code=o||"":r==="display_title"?n.display_title=o||"":r==="display_description"?n.display_description=o||"":r==="type"?n.type=o||"":r==="cadence"?n.cadence=o||"":r==="duration"?n.duration=o||"":r==="duration_in_months"&&!isNaN(Number(o))?n.duration_in_months=Number(o):r==="amount"&&!isNaN(Number(o))?n.amount=Number(o):r==="currency"?n.currency=o||"":r==="status"?n.status=o||"":r==="tier_id"&&(n.tier={id:o||Sf.tier.id})}return{page:"offer",pageData:n}}fetchQueryStrData(t=""){const a=new URLSearchParams(t),n={site:{plans:{}}},i=[];let r,o=null,s,l,c;for(let d of a.entries()){const p=d[0],m=decodeURIComponent(d[1]);if(p==="button")n.site.portal_button=JSON.parse(m);else if(p==="name")n.site.portal_name=JSON.parse(m);else if(p==="isFree"&&JSON.parse(m))i.push("free");else if(p==="isMonthly"&&JSON.parse(m))i.push("monthly");else if(p==="isYearly"&&JSON.parse(m))i.push("yearly");else if(p==="portalPrices")r=m?m.split(","):[];else if(p==="portalProducts")o=m?m.split(","):[];else if(p==="page"&&m)n.page=m;else if(p==="accentColor"&&(m===""||m))n.site.accent_color=m;else if(p==="buttonIcon"&&m)n.site.portal_button_icon=m;else if(p==="signupButtonText")n.site.portal_button_signup_text=m||"";else if(p==="signupTermsHtml")n.site.portal_signup_terms_html=m||"";else if(p==="signupCheckboxRequired")n.site.portal_signup_checkbox_required=JSON.parse(m);else if(p==="buttonStyle"&&m)n.site.portal_button_style=m;else if(p==="monthlyPrice"&&!isNaN(Number(m)))n.site.plans.monthly=Number(m),s=Number(m);else if(p==="yearlyPrice"&&!isNaN(Number(m)))n.site.plans.yearly=Number(m),l=Number(m);else if(p==="currency"&&m){const g=m.toUpperCase();n.site.plans.currency=g,n.site.plans.currency_symbol=pe(g),c=g}else p==="disableBackground"?n.site.disableBackground=JSON.parse(m):p==="membersSignupAccess"&&m?n.site.members_signup_access=m:p==="portalDefaultPlan"&&m&&(n.site.portal_default_plan=m)}return n.site.portal_plans=i,n.site.portal_products=o,r?n.site.portal_plans=r:s&&l&&c&&(n.site.prices=[{id:"monthly",stripe_price_id:"dummy_stripe_monthly",stripe_product_id:"dummy_stripe_product",active:1,nickname:"Monthly",currency:c,amount:s,type:"recurring",interval:"month"},{id:"yearly",stripe_price_id:"dummy_stripe_yearly",stripe_product_id:"dummy_stripe_product",active:1,nickname:"Yearly",currency:c,amount:l,type:"recurring",interval:"year"}]),n}fetchNotificationData(){const{type:t,status:a,duration:n,autoHide:i,closeable:r}=jg({billingOnly:!0})||{};return["stripe:billing-update"].includes(t)?a==="success"?{showPopup:!0,popupNotification:q({type:t,status:a,duration:n,closeable:r,autoHide:i,state:this.state,message:a==="success"?"Billing info updated successfully":""})}:{showPopup:!0}:{}}fetchLinkData(t,a){const n=new URLSearchParams(window.location.search);if(n.get("action")==="unsubscribe")return n.get("key")&&n.get("uuid")?{showPopup:!0,page:"unsubscribe",pageData:{uuid:n.get("uuid"),key:n.get("key"),newsletterUuid:n.get("newsletter"),comments:n.get("comments")}}:{showPopup:!0,page:"accountEmail",pageData:{newsletterUuid:n.get("newsletter"),action:"unsubscribe",redirect:t.url+"#/portal/account/newsletters"}};if(vE({site:t})&&n.get("action")==="signup"&&n.get("success")==="true")return{showPopup:!0,page:"recommendations",pageData:{signup:!0}};const[i,r]=window.location.hash.substr(1).split("?"),o=new URLSearchParams(r??""),s=/^(?:(\w+?))?\/monthly$/,l=/^(?:(\w+?))?\/yearly$/,c=/^offers\/(\w+?)\/?$/,d=/^\/portal\/?(?:\/(\w+(?:\/\w+)*))?\/?$/,p=/^\/feedback\/(\w+?)\/(\w+?)\/?$/;if(i&&p.test(i)){const[,m,g]=i.match(p),b=parseInt(g);if(b===1||b===0)return a||o.get("uuid")&&o.get("key")?{showPopup:!0,page:"feedback",pageData:{uuid:a?null:o.get("uuid"),key:a?null:o.get("key"),postId:m,score:b}}:{showPopup:!0,page:"signin",pageData:{redirect:t.url+`#/feedback/${m}/${b}/`}}}if(i&&d.test(i)){const[,m]=i.match(d),{page:g,pageQuery:b,pageData:v}=this.getPageFromLinkPath(m,t)||{},f=["accountPlan","accountProfile"].includes(g)?"accountHome":null;return{showPopup:!(["monthly","yearly"].includes(b)||s.test(b)||l.test(b)||c.test(b)),...g?{page:g}:{},...b?{pageQuery:b}:{},...v?{pageData:v}:{},...f?{lastPage:f}:{}}}return{}}fetchPreviewData(){const[,t]=window.location.hash.substr(1).split("?");if(J(["preview"])){let a={};return J(["offerPreview"])?a=this.fetchOfferQueryStrData(t):a=this.fetchQueryStrData(t),{...a,showPopup:!0}}return{}}getColorOverride(){const t=document.querySelector("script[data-ghost]");return t&&t.dataset.accentColor?t.dataset.accentColor:!1}async fetchApiData(){const{siteUrl:t,customSiteUrl:a,apiUrl:n,apiKey:i}=this.props;try{this.GhostApi=this.props.api||Bo({siteUrl:t,apiUrl:n,apiKey:i});const{site:r,member:o}=await this.GhostApi.init(),s=this.getColorOverride();return s&&(r.accent_color=s),this.setupFirstPromoter({site:r,member:o}),this.setupSentry({site:r}),{site:r,member:o}}catch(r){if(J(["dev","test"],{customSiteUrl:a}))return{};throw r}}setupSentry({site:t}){if(J(["test"]))return null;const{portal_sentry:a,portal_version:n,version:i}=t,o=`portal@2.53.1|ghost@${i}`;a&&a.dsn&&Vx({dsn:a.dsn,environment:a.env||"development",release:o,beforeSend:s=>cE({event:s})?s:null,allowUrls:[/https?:\/\/((www)\.)?unpkg\.com\/@tryghost\/portal/]})}setupFirstPromoter({site:t,member:a}){if(J(["test"]))return null;const n=TE({site:t});let i=Xu({site:t});if(i=i==null?void 0:i.replace(/^(\S*\.)?(\S*\.\S*)$/i,".$2"),n&&i){const r=document.createElement("script");r.type="text/javascript",r.async=!0,r.src="https://cdn.firstpromoter.com/fprom.js",r.onload=r.onreadystatechange=function(){let s=this.readyState;if(!s||s==="complete"||s==="loaded")try{if(window.$FPROM.init(n,i),YE({member:a})){const l=a.email,c=a.uuid;if(window.$FPROM)window.$FPROM.trackSignup({email:l,uid:c});else{const d=window._fprom||[];window._fprom=d,d.push(["event","signup"]),d.push(["email",l]),d.push(["uid",c])}}}catch{}};const o=document.getElementsByTagName("script")[0];o.parentNode.insertBefore(r,o)}}async dispatchAction(t,a){clearTimeout(this.timeoutId),this.setState({action:`${t}:running`});try{const n=await M$({action:t,data:a,state:this.state,api:this.GhostApi});this.setState(n),n&&n.action&&!n.action.includes(":failed")&&(this.timeoutId=setTimeout(()=>{this.setState({action:""})},2e3))}catch(n){if(console.error(`[Portal] Failed to dispatch action: ${t}`,n),a&&a.throwErrors)throw n;const i=q({type:`${t}:failed`,autoHide:!0,closeable:!0,status:"error",state:this.state,meta:{error:n}});this.setState({action:`${t}:failed`,popupNotification:i})}}updateStateForPreviewLinks(){const{site:t,...a}=this.fetchPreviewData(),{site:n,...i}=this.fetchLinkData(),r={site:{...this.state.site,...n||{},...t||{},plans:{...this.state.site&&this.state.site.plans,...(n||{}).plans,...(t||{}).plans}},...i,...a};this.handleSignupQuery({site:r.site,pageQuery:r.pageQuery}),this.setState(r)}async handleOfferQuery({site:t,offerId:a,member:n=this.state.member}){const{portal_button:i}=t;if(Ku(),!ut({member:n}))try{const r=await this.GhostApi.site.offer({offerId:a}),o=r==null?void 0:r.offers[0];if(IE({site:t,offer:o}))if(i)this.dispatchAction("openPopup",{page:"offer",pageData:r==null?void 0:r.offers[0]});else{const s=hn({site:t,productId:o.tier.id}),l=o.cadence==="month"?s.monthlyPrice:s.yearlyPrice;if(this.dispatchAction("openPopup",{page:"loading"}),n){const{tierId:c,cadence:d}=wa({site:t,priceId:l.id});this.dispatchAction("checkoutPlan",{plan:l.id,offerId:a,tierId:c,cadence:d})}else{const{tierId:c,cadence:d}=wa({site:t,priceId:l.id});this.dispatchAction("signup",{plan:l.id,offerId:a,tierId:c,cadence:d})}}}catch{}}handleSignupQuery({site:t,pageQuery:a,member:n}){const i=/^offers\/(\w+?)\/?$/;let r=a;if(i.test(a||"")){const[,s]=a.match(i);this.handleOfferQuery({site:t,offerId:s,member:n});return}yg({site:t,pageQuery:a})&&(r=yg({site:t,pageQuery:a}));const o=yE({site:t,priceId:r});if(a&&a!=="free"){Ku();const s=(o==null?void 0:o.id)||r;s!=="free"&&this.dispatchAction("openPopup",{page:"loading"});const{tierId:l,cadence:c}=wa({site:t,priceId:s});this.dispatchAction("signup",{plan:s,tierId:l,cadence:c})}}getPageFromLinkPath(t){const a=/^signup\/?(?:\/(\w+?))?\/?$/,n=/^signup\/?(?:\/(\w+?))\/monthly\/?$/,i=/^signup\/?(?:\/(\w+?))\/yearly\/?$/,r=/^offers\/(\w+?)\/?$/;if(t===void 0||t==="")return{page:"default"};if(r.test(t))return{pageQuery:t};if(t==="signup")return{page:"signup"};if(n.test(t)){const[,o]=t.match(n);return{page:"signup",pageQuery:`${o}/monthly`}}else if(i.test(t)){const[,o]=t.match(i);return{page:"signup",pageQuery:`${o}/yearly`}}else if(a.test(t)){const[,o]=t.match(a);return{page:"signup",pageQuery:o}}else{if(t==="signup/free")return{page:"signup",pageQuery:"free"};if(t==="signup/monthly")return{page:"signup",pageQuery:"monthly"};if(t==="signup/yearly")return{page:"signup",pageQuery:"yearly"};if(t==="signin")return{page:"signin"};if(t==="account")return{page:"accountHome"};if(t==="account/plans")return{page:"accountPlan"};if(t==="account/profile")return{page:"accountProfile"};if(t==="account/newsletters")return{page:"accountEmail"};if(t==="support")return{page:"support"};if(t==="support/success")return{page:"supportSuccess"};if(t==="support/error")return{page:"supportError"};if(t==="recommendations")return{page:"recommendations",pageData:{signup:!1}};if(t==="account/newsletters/help")return{page:"emailReceivingFAQ",pageData:{direct:!0}};if(t==="account/newsletters/disabled")return{page:"emailSuppressionFAQ",pageData:{direct:!0}}}return{page:"default"}}getAccentColor(){const{accent_color:t}=this.state.site||{};return t}getContextPage({site:t,page:a,member:n}){if(!a||a==="default"){const i=ct({site:t})||!jt({site:t})?"signin":"signup";a=n?"accountHome":i}return a==="accountPlan"&&Zt({member:n})&&!Ni({member:n})&&(a="accountHome"),hc({page:a})}getContextMember({page:t,member:a,customSiteUrl:n}){return J(["dev","preview"],{customSiteUrl:n})?Qj({page:t})||Xj({page:t})?J(["dev"],{customSiteUrl:n})?a||Wo.free:J(["preview"])?Wo.preview:Wo.paid:null:a}getContextFromState(){const{site:t,member:a,action:n,page:i,lastPage:r,showPopup:o,pageQuery:s,pageData:l,popupNotification:c,customSiteUrl:d,t:p,dir:m,scrollbarWidth:g,labs:b,otcRef:v}=this.state,f=this.getContextPage({site:t,page:i,member:a}),h=this.getContextMember({page:f,member:a,customSiteUrl:d});return{api:this.GhostApi,site:t,action:n,brandColor:this.getAccentColor(),page:f,pageQuery:s,pageData:l,member:h,lastPage:r,showPopup:o,popupNotification:c,customSiteUrl:d,t:p,dir:m,scrollbarWidth:g,labs:b,otcRef:v,onAction:(y,w)=>this.dispatchAction(y,w)}}getRecommendationButtons(){return document.querySelectorAll("[data-recommendation]")||[]}setupRecommendationButtons(){const t=n=>{const i=n.currentTarget.dataset.recommendation;i?this.dispatchAction("trackRecommendationClicked",{recommendationId:i}).catch(console.error):console.warn("[Portal] Invalid usage of data-recommendation attribute")},a=this.getRecommendationButtons();for(const n of a)n.addEventListener("click",t,{passive:!0})}transformPortalLinksToRelative(){document.querySelectorAll('a[href*="#/portal"]').forEach(s$)}render(){return this.state.initStatus==="success"?u.jsx(g0,{site:this.state.site,children:u.jsxs(P.Provider,{value:this.getContextFromState(),children:[u.jsx(bf,{}),u.jsx(xg,{}),u.jsx(Tg,{})]})}):null}}const Lf="ghost-portal-root";function b0(){const e=document.createElement("div");e.id=Lf,document.body.appendChild(e)}function y0(){const e=document.querySelector("script[data-ghost]");if(e){const t=e.dataset.i18n==="true",a=e.dataset.ghost,n=e.dataset.key,i=e.dataset.api,r=e.dataset.locale,o={};return o.membersSigninOTC=e.dataset.membersSigninOtc==="true",{siteUrl:a,apiKey:n,apiUrl:i,siteI18nEnabled:t,locale:r,labs:o}}return{}}function k0(){const e=new URL(window.location.href);e.searchParams.get("token")&&(e.searchParams.delete("token"),window.history.replaceState({},document.title,e.href))}function v0(){b0(),k0()}function w0(){const{siteUrl:e,apiKey:t,apiUrl:a,siteI18nEnabled:n,locale:i,labs:r}=y0(),o=e||window.location.origin;v0(),Xy.render(u.jsx(Y.StrictMode,{children:u.jsx(f0,{siteUrl:o,customSiteUrl:e,apiKey:t,apiUrl:a,siteI18nEnabled:n,locale:i,labs:r})}),document.getElementById(Lf))}w0()});
|
|
3424
3424
|
//# sourceMappingURL=portal.min.js.map
|