PageSourceSearch

https://theimmersionapp.com/assets/index-C_FPn_np.js

js theimmersionapp.com collected 2026-09-24 14:54:10 UTC 642,701 bytes, 89 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/StorePreviewPage-kTGjejDo.js","assets/StorePreviewPage-BXYsif_l.css"])))=>i.map(i=>d[i]);
2var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var l=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+j(a,u),c+=N(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+j(a,u++),c+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(M(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function P(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function F(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var I=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},L={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=L,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:F}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,I)}catch(e){I(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()}
2,e.version=`19.2.7`})),u=o(((e,t)=>{t.exports=l()})),d=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}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(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),f=o(((e,t)=>{t.exports=d()})),p=o((e=>{var t=u();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()}
vendor: 18,143 bytes, lines 2-9
2,e.version=`19.2.7`})),m=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=p()})),h=o((e=>{var t=f(),n=u(),r=m();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(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 c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function d(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function p(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=p(e),t!==null)return t;e=e.sibling}return null}var h=Object.assign,g=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),k=Symbol.for(`react.activity`),A=Symbol.for(`react.memo_cache_sentinel`),j=Symbol.iterator;function M(e){return typeof e!=`object`||!e?null:(e=j&&e[j]||e[`@@iterator`],typeof e==`function`?e:null)}var N=Symbol.for(`react.client.reference`);function P(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===N?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case k:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case D:return t=e.displayName||null,t===null?P(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return P(e(t))}catch{}}return null}var F=Array.isArray,I=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee={pending:!1,data:null,method:null,action:null},te=[],ne=-1;function re(e){return{current:e}}function R(e){0>ne||(e.current=te[ne],te[ne]=null,ne--)}function z(e,t){ne++,te[ne]=e.current,e.current=t}var ie=re(null),ae=re(null),oe=re(null),se=re(null);function ce(e,t){switch(z(oe,t),z(ae,e),z(ie,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}R(ie),z(ie,e)}function le(){R(ie),R(ae),R(oe)}function ue(e){e.memoizedState!==null&&z(se,e);var t=ie.current,n=Hd(t,e.type);t!==n&&(z(ae,e),z(ie,n))}function de(e){ae.current===e&&(R(ie),R(ae)),se.current===e&&(R(se),Qf._currentValue=ee)}var fe,pe;function me(e){if(fe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);fe=t&&t[1]||``,pe=-1<e.stack.indexOf(`
3    at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
4`+fe+e+pe}var he=!1;function ge(e,t){if(!e||he)return``;he=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
5`),l=s.split(`
6`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
7`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{he=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?me(n):``}function _e(e,t){switch(e.tag){case 26:case 27:case 5:return me(e.type);case 16:return me(`Lazy`);case 13:return e.child!==t&&t!==null?me(`Suspense Fallback`):me(`Suspense`);case 19:return me(`SuspenseList`);case 0:case 15:return ge(e.type,!1);case 11:return ge(e.type.render,!1);case 1:return ge(e.type,!0);case 31:return me(`Activity`);default:return``}}function ve(e){try{var t=``,n=null;do t+=_e(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
8Error generating stack: `+e.message+`
9`+e.stack}}var ye=Object.prototype.hasOwnProperty,be=t.unstable_scheduleCallback,xe=t.unstable_cancelCallback,Se=t.unstable_shouldYield,Ce=t.unstable_requestPaint,we=t.unstable_now,Te=t.unstable_getCurrentPriorityLevel,Ee=t.unstable_ImmediatePriority,De=t.unstable_UserBlockingPriority,Oe=t.unstable_NormalPriority,ke=t.unstable_LowPriority,Ae=t.unstable_IdlePriority,je=t.log,Me=t.unstable_setDisableYieldValue,Ne=null,Pe=null;function Fe(e){if(typeof je==`function`&&Me(e),Pe&&typeof Pe.setStrictMode==`function`)try{Pe.setStrictMode(Ne,e)}catch{}}var Ie=Math.clz32?Math.clz32:ze,Le=Math.log,Re=Math.LN2;function ze(e){return e>>>=0,e===0?32:31-(Le(e)/Re|0)|0}var Be=256,Ve=262144,He=4194304;function Ue(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function We(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Ue(n))):i=Ue(o):i=Ue(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ue(n))):i=Ue(o)):i=Ue(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Ge(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ke(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function qe(){var e=He;return He<<=1,!(He&62914560)&&(He=4194304),e}function Je(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ye(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Xe(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Ie(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&Ze(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Ze(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ie(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Qe(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ie(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function $e(e,t){var n=t&-t;return n=n&42?1:et(n),(n&(e.suspendedLanes|t))===0?n:0}function et(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function tt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function nt(){var e=L.p;return e===0?(e=window.event,e===void 0?32:mp(e.type)):e}function rt(e,t){var n=L.p;try{return L.p=e,t()}finally{L.p=n}}var it=Math.random().toString(36).slice(2),at=`__reactFiber$`+it,ot=`__reactProps$`+it,st=`__reactContainer$`+it,ct=`__reactEvents$`+it,lt=`__reactListeners$`+it,ut=`__reactHandles$`+it,dt=`__reactResources$`+it,ft=`__reactMarker$`+it;function pt(e){delete e[at],delete e[ot],delete e[ct],delete e[lt],delete e[ut]}function mt(e){var t=e[at];if(t)return t;for(var n=e.parentNode;n;){if(t=n[st]||n[at]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=df(e);e!==null;){if(n=e[at])return n;e=df(e)}return t}e=n,n=e.parentNode}return null}function ht(e){if(e=e[at]||e[st]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function gt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function _t(e){var t=e[dt];return t||=e[dt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function vt(e){e[ft]=!0}var yt=new Set,bt={};function xt(e,t){St(e,t),St(e+`Capture`,t)}function St(e,t){for(bt[e]=t,e=0;e<t.length;e++)yt.add(t[e])}var Ct=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),wt={},Tt={};function Et(e){return ye.call(Tt,e)?!0:ye.call(wt,e)?!1:Ct.test(e)?Tt[e]=!0:(wt[e]=!0,!1)}function Dt(e,t,n){if(Et(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function Ot(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function kt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function At(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function jt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Mt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Nt(e){if(!e._valueTracker){var t=jt(e)?`checked`:`value`;e._valueTracker=Mt(e,t,``+e[t])}}function Pt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=jt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Ft(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var It=/[\n"\\]/g;function Lt(e){return e.replace(It,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Rt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+At(t)):e.value!==``+At(t)&&(e.value=``+At(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Bt(e,o,At(n)):Bt(e,o,At(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+At(s):e.removeAttribute(`name`)}function zt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Nt(e);return}n=n==null?``:``+At(n),t=t==null?n:``+At(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Nt(e)}function Bt(e,t,n){t===`number`&&Ft(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Vt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+At(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Ht(e,t,n){if(t!=null&&(t=``+At(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+At(n)}function Ut(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(F(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=At(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Nt(e)}function Wt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Gt=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function Kt(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||Gt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function qt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&Kt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Kt(e,o,t[o])}function Jt(e){if(e.indexOf(`-`)===-1)return!1;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}}var Yt=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`
9clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),Xt=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Zt(e){return Xt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Qt(){}var $t=null;function en(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var tn=null,nn=null;function rn(e){var t=ht(e);if(t&&(e=t.stateNode)){var n=e[ot]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Rt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Lt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[ot]||null;if(!a)throw Error(i(90));Rt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Pt(r)}break a;case`textarea`:Ht(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Vt(e,!!n.multiple,t,!1)}}}var an=!1;function on(e,t,n){if(an)return e(t,n);an=!0;try{return e(t)}finally{if(an=!1,(tn!==null||nn!==null)&&(yu(),tn&&(t=tn,e=nn,nn=tn=null,rn(t),e)))for(t=0;t<e.length;t++)rn(e[t])}}function sn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[ot]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var cn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),ln=!1;if(cn)try{var un={};Object.defineProperty(un,"passive",{get:function(){ln=!0}}),window.addEventListener(`test`,un,un),window.removeEventListener(`test`,un,un)}catch{ln=!1}
vendor: 84,779 bytes, line 9
9var dn=null,fn=null,pn=null;function mn(){if(pn)return pn;var e,t=fn,n=t.length,r,i=`value`in dn?dn.value:dn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return pn=i.slice(e,1<r?1-r:void 0)}function hn(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 gn(){return!0}function _n(){return!1}function vn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?gn:_n,this.isPropagationStopped=_n,this}return h(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=gn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=gn)},persist:function(){},isPersistent:gn}),t}var yn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},bn=vn(yn),xn=h({},yn,{view:0,detail:0}),Sn=vn(xn),Cn,wn,Tn,En=h({},xn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ln,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!==Tn&&(Tn&&e.type===`mousemove`?(Cn=e.screenX-Tn.screenX,wn=e.screenY-Tn.screenY):wn=Cn=0,Tn=e),Cn)},movementY:function(e){return`movementY`in e?e.movementY:wn}}),Dn=vn(En),On=vn(h({},En,{dataTransfer:0})),kn=vn(h({},xn,{relatedTarget:0})),An=vn(h({},yn,{animationName:0,elapsedTime:0,pseudoElement:0})),jn=vn(h({},yn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Mn=vn(h({},yn,{data:0})),Nn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Pn={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`},Fn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function In(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Fn[e])?!!t[e]:!1}function Ln(){return In}var Rn=vn(h({},xn,{key:function(e){if(e.key){var t=Nn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=hn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Pn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ln,charCode:function(e){return e.type===`keypress`?hn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?hn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),zn=vn(h({},En,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Bn=vn(h({},xn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ln})),Vn=vn(h({},yn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Hn=vn(h({},En,{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})),Un=vn(h({},yn,{newState:0,oldState:0})),Wn=[9,13,27,32],Gn=cn&&`CompositionEvent`in window,Kn=null;cn&&`documentMode`in document&&(Kn=document.documentMode);var qn=cn&&`TextEvent`in window&&!Kn,Jn=cn&&(!Gn||Kn&&8<Kn&&11>=Kn),Yn=` `,Xn=!1;function Zn(e,t){switch(e){case`keyup`:return Wn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Qn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var $n=!1;function er(e,t){switch(e){case`compositionend`:return Qn(t);case`keypress`:return t.which===32?(Xn=!0,Yn):null;case`textInput`:return e=t.data,e===Yn&&Xn?null:e;default:return null}}function tr(e,t){if($n)return e===`compositionend`||!Gn&&Zn(e,t)?(e=mn(),pn=fn=dn=null,$n=!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 Jn&&t.locale!==`ko`?null:t.data;default:return null}}var nr={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 rr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!nr[e.type]:t===`textarea`}function ir(e,t,n,r){tn?nn?nn.push(r):nn=[r]:tn=r,t=Td(t,`onChange`),0<t.length&&(n=new bn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var ar=null,or=null;function sr(e){vd(e,0)}function cr(e){if(Pt(gt(e)))return e}function lr(e,t){if(e===`change`)return t}var ur=!1;if(cn){var dr;if(cn){var fr=`oninput`in document;if(!fr){var pr=document.createElement(`div`);pr.setAttribute(`oninput`,`return;`),fr=typeof pr.oninput==`function`}dr=fr}else dr=!1;ur=dr&&(!document.documentMode||9<document.documentMode)}function mr(){ar&&(ar.detachEvent(`onpropertychange`,hr),or=ar=null)}function hr(e){if(e.propertyName===`value`&&cr(or)){var t=[];ir(t,or,e,en(e)),on(sr,t)}}function gr(e,t,n){e===`focusin`?(mr(),ar=t,or=n,ar.attachEvent(`onpropertychange`,hr)):e===`focusout`&&mr()}function _r(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return cr(or)}function vr(e,t){if(e===`click`)return cr(t)}function yr(e,t){if(e===`input`||e===`change`)return cr(t)}function br(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var xr=typeof Object.is==`function`?Object.is:br;function Sr(e,t){if(xr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!ye.call(t,i)||!xr(e[i],t[i]))return!1}return!0}function Cr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function wr(e,t){var n=Cr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Cr(n)}}function Tr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Tr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Er(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ft(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ft(e.document)}return t}function Dr(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 Or=cn&&`documentMode`in document&&11>=document.documentMode,kr=null,Ar=null,jr=null,Mr=!1;function Nr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Mr||kr==null||kr!==Ft(r)||(r=kr,`selectionStart`in r&&Dr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),jr&&Sr(jr,r)||(jr=r,r=Td(Ar,`onSelect`),0<r.length&&(t=new bn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=kr)))}function Pr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Fr={animationend:Pr(`Animation`,`AnimationEnd`),animationiteration:Pr(`Animation`,`AnimationIteration`),animationstart:Pr(`Animation`,`AnimationStart`),transitionrun:Pr(`Transition`,`TransitionRun`),transitionstart:Pr(`Transition`,`TransitionStart`),transitioncancel:Pr(`Transition`,`TransitionCancel`),transitionend:Pr(`Transition`,`TransitionEnd`)},Ir={},Lr={};cn&&(Lr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Fr.animationend.animation,delete Fr.animationiteration.animation,delete Fr.animationstart.animation),`TransitionEvent`in window||delete Fr.transitionend.transition);function Rr(e){if(Ir[e])return Ir[e];if(!Fr[e])return e;var t=Fr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Lr)return Ir[e]=t[n];return e}var zr=Rr(`animationend`),Br=Rr(`animationiteration`),Vr=Rr(`animationstart`),Hr=Rr(`transitionrun`),Ur=Rr(`transitionstart`),Wr=Rr(`transitioncancel`),Gr=Rr(`transitionend`),Kr=new Map,B=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);B.push(`scrollEnd`);function qr(e,t){Kr.set(e,t),xt(t,[e])}var Jr=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},Yr=[],Xr=0,Zr=0;function Qr(){for(var e=Xr,t=Zr=Xr=0;t<e;){var n=Yr[t];Yr[t++]=null;var r=Yr[t];Yr[t++]=null;var i=Yr[t];Yr[t++]=null;var a=Yr[t];if(Yr[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&ni(n,i,a)}}function $r(e,t,n,r){Yr[Xr++]=e,Yr[Xr++]=t,Yr[Xr++]=n,Yr[Xr++]=r,Zr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ei(e,t,n,r){return $r(e,t,n,r),ri(e)}function ti(e,t){return $r(e,null,null,t),ri(e)}function ni(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Ie(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ri(e){if(50<uu)throw uu=0,du=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ii={};function ai(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function oi(e,t,n,r){return new ai(e,t,n,r)}function si(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ci(e,t){var n=e.alternate;return n===null?(n=oi(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function li(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ui(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)si(e)&&(s=1);else if(typeof e==`string`)s=Uf(e,n,ie.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case k:return e=oi(31,n,t,a),e.elementType=k,e.lanes=o,e;case y:return di(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=oi(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case T:return e=oi(13,n,t,a),e.elementType=T,e.lanes=o,e;case E:return e=oi(19,n,t,a),e.elementType=E,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case C:s=10;break a;case S:s=9;break a;case w:s=11;break a;case D:s=14;break a;case O:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=oi(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function di(e,t,n,r){return e=oi(7,e,r,t),e.lanes=n,e}function fi(e,t,n){return e=oi(6,e,null,t),e.lanes=n,e}function pi(e){var t=oi(18,null,null,0);return t.stateNode=e,t}function mi(e,t,n){return t=oi(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var hi=new WeakMap;function gi(e,t){if(typeof e==`object`&&e){var n=hi.get(e);return n===void 0?(t={value:e,source:t,stack:ve(t)},hi.set(e,t),t):n}return{value:e,source:t,stack:ve(t)}}var _i=[],vi=0,yi=null,bi=0,xi=[],Si=0,Ci=null,wi=1,Ti=``;function Ei(e,t){_i[vi++]=bi,_i[vi++]=yi,yi=e,bi=t}function Di(e,t,n){xi[Si++]=wi,xi[Si++]=Ti,xi[Si++]=Ci,Ci=e;var r=wi;e=Ti;var i=32-Ie(r)-1;r&=~(1<<i),n+=1;var a=32-Ie(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,wi=1<<32-Ie(t)+i|n<<i|r,Ti=a+e}else wi=1<<a|n<<i|r,Ti=e}function Oi(e){e.return!==null&&(Ei(e,1),Di(e,1,0))}function ki(e){for(;e===yi;)yi=_i[--vi],_i[vi]=null,bi=_i[--vi],_i[vi]=null;for(;e===Ci;)Ci=xi[--Si],xi[Si]=null,Ti=xi[--Si],xi[Si]=null,wi=xi[--Si],xi[Si]=null}function Ai(e,t){xi[Si++]=wi,xi[Si++]=Ti,xi[Si++]=Ci,wi=t.id,Ti=t.overflow,Ci=e}var ji=null,Mi=null,V=!1,Ni=null,Pi=!1,Fi=Error(i(519));function Ii(e){throw Hi(gi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Fi}function Li(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[at]=e,t[ot]=r,n){case`dialog`:$(`cancel`,t),$(`close`,t);break;case`iframe`:case`object`:case`embed`:$(`load`,t);break;case`video`:case`audio`:for(n=0;n<gd.length;n++)$(gd[n],t);break;case`source`:$(`error`,t);break;case`img`:case`image`:case`link`:$(`error`,t),$(`load`,t);break;case`details`:$(`toggle`,t);break;case`input`:$(`invalid`,t),zt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:$(`invalid`,t);break;case`textarea`:$(`invalid`,t),Ut(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||jd(t.textContent,n)?(r.popover!=null&&($(`beforetoggle`,t),$(`toggle`,t)),r.onScroll!=null&&$(`scroll`,t),r.onScrollEnd!=null&&$(`scrollend`,t),r.onClick!=null&&(t.onclick=Qt),t=!0):t=!1,t||Ii(e,!0)}function Ri(e){for(ji=e.return;ji;)switch(ji.tag){case 5:case 31:case 13:Pi=!1;return;case 27:case 3:Pi=!0;return;default:ji=ji.return}}function zi(e){if(e!==ji)return!1;if(!V)return Ri(e),V=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Ud(e.type,e.memoizedProps)),n=!n),n&&Mi&&Ii(e),Ri(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Mi=uf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Mi=uf(e)}else t===27?(t=Mi,Zd(e.type)?(e=lf,lf=null,Mi=e):Mi=t):Mi=ji?cf(e.stateNode.nextSibling):null;return!0}function Bi(){Mi=ji=null,V=!1}function Vi(){var e=Ni;return e!==null&&(Xl===null?Xl=e:Xl.push.apply(Xl,e),Ni=null),e}function Hi(e){Ni===null?Ni=[e]:Ni.push(e)}var Ui=re(null),Wi=null,Gi=null;function Ki(e,t,n){z(Ui,t._currentValue),t._currentValue=n}function qi(e){e._currentValue=Ui.current,R(Ui)}function Ji(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Yi(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Ji(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Ji(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function Xi(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;xr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===se.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[Qf]:e.push(Qf))}a=a.return}e!==null&&Yi(t,e,n,r),t.flags|=262144}function Zi(e){for(e=e.firstContext;e!==null;){if(!xr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Qi(e){Wi=e,Gi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function $i(e){return ta(Wi,e)}function ea(e,t){return Wi===null&&Qi(e),ta(e,t)}function ta(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Gi===null){if(e===null)throw Error(i(308));Gi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Gi=Gi.next=t;return n}var na=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},ra=t.unstable_scheduleCallback,ia=t.unstable_NormalPriority,aa={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function oa(){return{controller:new na,data:new Map,refCount:0}}function sa(e){e.refCount--,e.refCount===0&&ra(ia,function(){e.controller.abort()})}var ca=null,la=0,ua=0,da=null;function fa(e,t){if(ca===null){var n=ca=[];la=0,ua=ud(),da={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return la++,t.then(pa,pa),t}function pa(){if(--la===0&&ca!==null){da!==null&&(da.status=`fulfilled`);var e=ca;ca=null,ua=0,da=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ma(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var ha=I.S;I.S=function(e,t){$l=we(),typeof t==`object`&&t&&typeof t.then==`function`&&fa(e,t),ha!==null&&ha(e,t)};var ga=re(null);function _a(){var e=ga.current;return e===null?Ll.pooledCache:e}function va(e,t){t===null?z(ga,ga.current):z(ga,t.pool)}function ya(){var e=_a();return e===null?null:{parent:aa._currentValue,pool:e}}var ba=Error(i(460)),xa=Error(i(474)),Sa=Error(i(542)),Ca={then:function(){}};function wa(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Ta(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Qt,Qt),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ka(e),e;default:if(typeof t.status==`string`)t.then(Qt,Qt);else{if(e=Ll,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ka(e),e}throw Da=t,ba}}function Ea(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Da=e,ba):e}}var Da=null;function Oa(){if(Da===null)throw Error(i(459));var e=Da;return Da=null,e}function ka(e){if(e===ba||e===Sa)throw Error(i(483))}var Aa=null,H=0;function ja(e){var t=H;return H+=1,Aa===null&&(Aa=[]),Ta(Aa,e,t)}function Ma(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Na(e,t){throw t.$$typeof===g?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Pa(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=ci(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=fi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===y?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===O&&Ea(i)===t.type)?(t=a(t,n.props),Ma(t,n),t.return=e,t):(t=ui(n.type,n.key,n.props,null,e.mode,r),Ma(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=mi(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=di(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=fi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case _:return n=ui(t.type,t.key,t.props,null,e.mode,n),Ma(n,t),n.return=e,n;case v:return t=mi(t,e.mode,n),t.return=e,t;case O:return t=Ea(t),f(e,t,n)}if(F(t)||M(t))return t=di(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,ja(t),n);if(t.$$typeof===C)return f(e,ea(e,t),n);Na(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case _:return n.key===i?l(e,t,n,r):null;case v:return n.key===i?u(e,t,n,r):null;case O:return n=Ea(n),p(e,t,n,r)}if(F(n)||M(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,ja(n),r);if(n.$$typeof===C)return p(e,t,ea(e,n),r);Na(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case _:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case v:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case O:return r=Ea(r),m(e,t,n,r,i)}if(F(r)||M(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,ja(r),i);if(r.$$typeof===C)return m(e,t,n,ea(t,r),i);Na(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),V&&Ei(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return V&&Ei(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),V&&Ei(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),V&&Ei(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return V&&Ei(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),V&&Ei(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case _:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===O&&Ea(l)===r.type){n(e,r.sibling),c=a(r,o.props),Ma(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=di(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=ui(o.type,o.key,o.props,null,e.mode,c),Ma(c,o),c.return=e,e=c)}return s(e);case v:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=mi(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=Ea(o),b(e,r,o,c)}if(F(o))return h(e,r,o,c);if(M(o)){if(l=M(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,ja(o),c);if(o.$$typeof===C)return b(e,r,ea(e,o),c);Na(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=fi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{H=0;var i=b(e,t,n,r);return Aa=null,i}catch(t){if(t===ba||t===Sa)throw t;var a=oi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Fa=Pa(!0),Ia=Pa(!1),La=!1;function Ra(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function za(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function U(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ba(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,J&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ri(e),ni(e,null,n),t}return $r(e,r,t,n),ri(e)}function Va(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Qe(e,n)}}function Ha(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ua=!1;function Wa(){if(Ua){var e=da;if(e!==null)throw e}}function Ga(e,t,n,r){Ua=!1;var i=e.updateQueue;La=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(X&f)===f:(r&f)===f){f!==0&&f===ua&&(Ua=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(m=g.payload,typeof m==`function`){d=m.call(_,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,f=typeof m==`function`?m.call(_,d,f):m,f==null)break a;d=h({},d,f);break a;case 2:La=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Wl|=o,e.lanes=o,e.memoizedState=d}}function Ka(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function qa(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ka(n[e],t)}var Ja=re(null),Ya=re(0);function Xa(e,t){e=Hl,z(Ya,e),z(Ja,t),Hl=e|t.baseLanes}function Za(){z(Ya,Hl),z(Ja,Ja.current)}function Qa(){Hl=Ya.current,R(Ja),R(Ya)}var $a=re(null),eo=null;function to(e){var t=e.alternate;z(oo,oo.current&1),z($a,e),eo===null&&(t===null||Ja.current!==null||t.memoizedState!==null)&&(eo=e)}function no(e){z(oo,oo.current),z($a,e),eo===null&&(eo=e)}function ro(e){e.tag===22?(z(oo,oo.current),z($a,e),eo===null&&(eo=e)):io(e)}function io(){z(oo,oo.current),z($a,$a.current)}function ao(e){R($a),eo===e&&(eo=null),R(oo)}var oo=re(0);function so(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||af(n)||of(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)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 co=0,W=null,G=null,lo=null,uo=!1,fo=!1,po=!1,mo=0,ho=0,go=null,_o=0;function vo(){throw Error(i(321))}function yo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!xr(e[n],t[n]))return!1;return!0}function bo(e,t,n,r,i,a){return co=a,W=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,I.H=e===null||e.memoizedState===null?Is:Ls,po=!1,a=n(r,i),po=!1,fo&&(a=So(t,n,r,i)),xo(e),a}function xo(e){I.H=K;var t=G!==null&&G.next!==null;if(co=0,lo=G=W=null,uo=!1,ho=0,go=null,t)throw Error(i(300));e===null||$s||(e=e.dependencies,e!==null&&Zi(e)&&($s=!0))}function So(e,t,n,r){W=e;var a=0;do{if(fo&&(go=null),ho=0,fo=!1,25<=a)throw Error(i(301));if(a+=1,lo=G=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}I.H=q,o=t(n,r)}while(fo);return o}function Co(){var e=I.H,t=e.useState()[0];return t=typeof t.then==`function`?Ao(t):t,e=e.useState()[0],(G===null?null:G.memoizedState)!==e&&(W.flags|=1024),t}function wo(){var e=mo!==0;return mo=0,e}function To(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Eo(e){if(uo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}uo=!1}co=0,lo=G=W=null,fo=!1,ho=mo=0,go=null}function Do(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return lo===null?W.memoizedState=lo=e:lo=lo.next=e,lo}function Oo(){if(G===null){var e=W.alternate;e=e===null?null:e.memoizedState}else e=G.next;var t=lo===null?W.memoizedState:lo.next;if(t!==null)lo=t,G=e;else{if(e===null)throw W.alternate===null?Error(i(467)):Error(i(310));G=e,e={memoizedState:G.memoizedState,baseState:G.baseState,baseQueue:G.baseQueue,queue:G.queue,next:null},lo===null?W.memoizedState=lo=e:lo=lo.next=e}return lo}function ko(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ao(e){var t=ho;return ho+=1,go===null&&(go=[]),e=Ta(go,e,t),t=W,(lo===null?t.memoizedState:lo.next)===null&&(t=t.alternate,I.H=t===null||t.memoizedState===null?Is:Ls),e}function jo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Ao(e);if(e.$$typeof===C)return $i(e)}throw Error(i(438,String(e)))}function Mo(e){var t=null,n=W.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=W.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=ko(),W.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=A;return t.index++,n}function No(e,t){return typeof t==`function`?t(e):t}function Po(e){return Fo(Oo(),G,e)}function Fo(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(co&f)===f:(X&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===ua&&(d=!0);else if((co&p)===p){u=u.next,p===ua&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,W.lanes|=p,Wl|=p;f=u.action,po&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,W.lanes|=f,Wl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!xr(o,e.memoizedState)&&($s=!0,d&&(n=da,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Io(e){var t=Oo(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);xr(o,t.memoizedState)||($s=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Lo(e,t,n){var r=W,a=Oo(),o=V;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!xr((G||a).memoizedState,n);if(s&&(a.memoizedState=n,$s=!0),a=a.queue,cs(Bo.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||lo!==null&&lo.memoizedState.tag&1){if(r.flags|=2048,rs(9,{destroy:void 0},zo.bind(null,r,a,n,t),null),Ll===null)throw Error(i(349));o||co&127||Ro(r,t,n)}return n}function Ro(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=W.updateQueue,t===null?(t=ko(),W.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function zo(e,t,n,r){t.value=n,t.getSnapshot=r,Vo(t)&&Ho(e)}function Bo(e,t,n){return n(function(){Vo(t)&&Ho(e)})}function Vo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!xr(e,n)}catch{return!0}}function Ho(e){var t=ti(e,2);t!==null&&mu(t,e,2)}function Uo(e){var t=Do();if(typeof e==`function`){var n=e;if(e=n(),po){Fe(!0);try{n()}finally{Fe(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:No,lastRenderedState:e},t}function Wo(e,t,n,r){return e.baseState=n,Fo(e,G,typeof r==`function`?r:No)}function Go(e,t,n,r,a){if(Ns(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};I.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Ko(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Ko(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=I.T,o={};I.T=o;try{var s=n(i,r),c=I.S;c!==null&&c(o,s),qo(e,t,s)}catch(n){Yo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),I.T=a}}else try{a=n(i,r),qo(e,t,a)}catch(n){Yo(e,t,n)}}function qo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Jo(e,t,n)},function(n){return Yo(e,t,n)}):Jo(e,t,n)}function Jo(e,t,n){t.status=`fulfilled`,t.value=n,Xo(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Ko(e,n)))}function Yo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Xo(t),t=t.next;while(t!==r)}e.action=null}function Xo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Zo(e,t){return t}function Qo(e,t){if(V){var n=Ll.formState;if(n!==null){a:{var r=W;if(V){if(Mi){b:{for(var i=Mi,a=Pi;i.nodeType!==8;){if(!a){i=null;break b}if(i=cf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Mi=cf(i.nextSibling),r=i.data===`F!`;break a}}Ii(r)}r=!1}r&&(t=n[0])}}return n=Do(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zo,lastRenderedState:t},n.queue=r,n=As.bind(null,W,r),r.dispatch=n,r=Uo(!1),a=Ms.bind(null,W,!1,r.queue),r=Do(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Go.bind(null,W,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function $o(e){return es(Oo(),G,e)}function es(e,t,n){if(t=Fo(e,t,Zo)[0],e=Po(No)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Ao(t)}catch(e){throw e===ba?Sa:e}else r=t;t=Oo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(W.flags|=2048,rs(9,{destroy:void 0},ts.bind(null,i,n),null)),[r,a,e]}function ts(e,t){e.action=t}function ns(e){var t=Oo(),n=G;if(n!==null)return es(t,n,e);Oo(),t=t.memoizedState,n=Oo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function rs(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=W.updateQueue,t===null&&(t=ko(),W.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function is(){return Oo().memoizedState}function as(e,t,n,r){var i=Do();W.flags|=e,i.memoizedState=rs(1|t,{destroy:void 0},n,r===void 0?null:r)}function os(e,t,n,r){var i=Oo();r=r===void 0?null:r;var a=i.memoizedState.inst;G!==null&&r!==null&&yo(r,G.memoizedState.deps)?i.memoizedState=rs(t,a,n,r):(W.flags|=e,i.memoizedState=rs(1|t,a,n,r))}function ss(e,t){as(8390656,8,e,t)}function cs(e,t){os(2048,8,e,t)}function ls(e){W.flags|=4;var t=W.updateQueue;if(t===null)t=ko(),W.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function us(e){var t=Oo().memoizedState;return ls({ref:t,nextImpl:e}),function(){if(J&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function ds(e,t){return os(4,2,e,t)}function fs(e,t){return os(4,4,e,t)}function ps(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ms(e,t,n){n=n==null?null:n.concat([e]),os(4,4,ps.bind(null,t,e),n)}function hs(){}function gs(e,t){var n=Oo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&yo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function _s(e,t){var n=Oo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&yo(t,r[1]))return r[0];if(r=e(),po){Fe(!0);try{e()}finally{Fe(!1)}}return n.memoizedState=[r,t],r}function vs(e,t,n){return n===void 0||co&1073741824&&!(X&261930)?e.memoizedState=t:(e.memoizedState=n,e=pu(),W.lanes|=e,Wl|=e,n)}function ys(e,t,n,r){return xr(n,t)?n:Ja.current===null?!(co&42)||co&1073741824&&!(X&261930)?($s=!0,e.memoizedState=n):(e=pu(),W.lanes|=e,Wl|=e,t):(e=vs(e,n,r),xr(e,t)||($s=!0),e)}function bs(e,t,n,r,i){var a=L.p;L.p=a!==0&&8>a?a:8;var o=I.T,s={};I.T=s,Ms(e,!1,t,n);try{var c=i(),l=I.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?js(e,t,ma(c,r),fu(e)):js(e,t,r,fu(e))}catch(n){js(e,t,{then:function(){},status:`rejected`,reason:n},fu())}finally{L.p=a,o!==null&&s.types!==null&&(o.types=s.types),I.T=o}}function xs(){}function Ss(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Cs(e).queue;bs(e,a,t,ee,n===null?xs:function(){return ws(e),n(r)})}function Cs(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ee,baseState:ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:No,lastRenderedState:ee},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:No,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ws(e){var t=Cs(e);t.next===null&&(t=e.alternate.memoizedState),js(e,t.next.queue,{},fu())}function Ts(){return $i(Qf)}function Es(){return Oo().memoizedState}function Ds(){return Oo().memoizedState}function Os(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=fu();e=U(n);var r=Ba(t,e,n);r!==null&&(mu(r,t,n),Va(r,t,n)),t={cache:oa()},e.payload=t;return}t=t.return}}function ks(e,t,n){var r=fu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ns(e)?Ps(t,n):(n=ei(e,t,n,r),n!==null&&(mu(n,e,r),Fs(n,t,r)))}function As(e,t,n){js(e,t,n,fu())}function js(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ns(e))Ps(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,xr(s,o))return $r(e,t,i,0),Ll===null&&Qr(),!1}catch{}if(n=ei(e,t,i,r),n!==null)return mu(n,e,r),Fs(n,t,r),!0}return!1}function Ms(e,t,n,r){if(r={lane:2,revertLane:ud(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ns(e)){if(t)throw Error(i(479))}else t=ei(e,n,r,2),t!==null&&mu(t,e,2)}function Ns(e){var t=e.alternate;return e===W||t!==null&&t===W}function Ps(e,t){fo=uo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Fs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Qe(e,n)}}var K={readContext:$i,use:jo,useCallback:vo,useContext:vo,useEffect:vo,useImperativeHandle:vo,useLayoutEffect:vo,useInsertionEffect:vo,useMemo:vo,useReducer:vo,useRef:vo,useState:vo,useDebugValue:vo,useDeferredValue:vo,useTransition:vo,useSyncExternalStore:vo,useId:vo,useHostTransitionStatus:vo,useFormState:vo,useActionState:vo,useOptimistic:vo,useMemoCache:vo,useCacheRefresh:vo};K.useEffectEvent=vo;var Is={readContext:$i,use:jo,useCallback:function(e,t){return Do().memoizedState=[e,t===void 0?null:t],e},useContext:$i,useEffect:ss,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),as(4194308,4,ps.bind(null,t,e),n)},useLayoutEffect:function(e,t){return as(4194308,4,e,t)},useInsertionEffect:function(e,t){as(4,2,e,t)},useMemo:function(e,t){var n=Do();t=t===void 0?null:t;var r=e();if(po){Fe(!0);try{e()}finally{Fe(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Do();if(n!==void 0){var i=n(t);if(po){Fe(!0);try{n(t)}finally{Fe(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=ks.bind(null,W,e),[r.memoizedState,e]},useRef:function(e){var t=Do();return e={current:e},t.memoizedState=e},useState:function(e){e=Uo(e);var t=e.queue,n=As.bind(null,W,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:hs,useDeferredValue:function(e,t){return vs(Do(),e,t)},useTransition:function(){var e=Uo(!1);return e=bs.bind(null,W,e.queue,!0,!1),Do().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=W,a=Do();if(V){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Ll===null)throw Error(i(349));X&127||Ro(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,ss(Bo.bind(null,r,o,e),[e]),r.flags|=2048,rs(9,{destroy:void 0},zo.bind(null,r,o,n,t),null),n},useId:function(){var e=Do(),t=Ll.identifierPrefix;if(V){var n=Ti,r=wi;n=(r&~(1<<32-Ie(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=mo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=_o++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Ts,useFormState:Qo,useActionState:Qo,useOptimistic:function(e){var t=Do();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Ms.bind(null,W,!0,n),n.dispatch=t,[e,t]},useMemoCache:Mo,useCacheRefresh:function(){return Do().memoizedState=Os.bind(null,W)},useEffectEvent:function(e){var t=Do(),n={impl:e};return t.memoizedState=n,function(){if(J&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Ls={readContext:$i,use:jo,useCallback:gs,useContext:$i,useEffect:cs,useImperativeHandle:ms,useInsertionEffect:ds,useLayoutEffect:fs,useMemo:_s,useReducer:Po,useRef:is,useState:function(){return Po(No)},useDebugValue:hs,useDeferredValue:function(e,t){return ys(Oo(),G.memoizedState,e,t)},useTransition:function(){var e=Po(No)[0],t=Oo().memoizedState;return[typeof e==`boolean`?e:Ao(e),t]},useSyncExternalStore:Lo,useId:Es,useHostTransitionStatus:Ts,useFormState:$o,useActionState:$o,useOptimistic:function(e,t){return Wo(Oo(),G,e,t)},useMemoCache:Mo,useCacheRefresh:Ds};Ls.useEffectEvent=us;var q={readContext:$i,use:jo,useCallback:gs,useContext:$i,useEffect:cs,useImperativeHandle:ms,useInsertionEffect:ds,useLayoutEffect:fs,useMemo:_s,useReducer:Io,useRef:is,useState:function(){return Io(No)},useDebugValue:hs,useDeferredValue:function(e,t){var n=Oo();return G===null?vs(n,e,t):ys(n,G.memoizedState,e,t)},useTransition:function(){var e=Io(No)[0],t=Oo().memoizedState;return[typeof e==`boolean`?e:Ao(e),t]},useSyncExternalStore:Lo,useId:Es,useHostTransitionStatus:Ts,useFormState:ns,useActionState:ns,useOptimistic:function(e,t){var n=Oo();return G===null?(n.baseState=e,[e,n.queue.dispatch]):Wo(n,G,e,t)},useMemoCache:Mo,useCacheRefresh:Ds};q.useEffectEvent=us;function Rs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:h({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var zs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=fu(),i=U(r);i.payload=t,n!=null&&(i.callback=n),t=Ba(e,i,r),t!==null&&(mu(t,e,r),Va(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=fu(),i=U(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ba(e,i,r),t!==null&&(mu(t,e,r),Va(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=fu(),r=U(n);r.tag=2,t!=null&&(r.callback=t),t=Ba(e,r,n),t!==null&&(mu(t,e,n),Va(t,e,n))}};function Bs(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Sr(n,r)||!Sr(i,a):!0}function Vs(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&zs.enqueueReplaceState(t,t.state,null)}function Hs(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=h({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Us(e){Jr(e)}function Ws(e){console.error(e)}function Gs(e){Jr(e)}function Ks(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function qs(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Js(e,t,n){return n=U(n),n.tag=3,n.payload={element:null},n.callback=function(){Ks(e,t)},n}function Ys(e){return e=U(e),e.tag=3,e}function Xs(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){qs(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){qs(t,n,r),typeof i!=`function`&&(nu===null?nu=new Set([this]):nu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Zs(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Xi(t,n,a,!0),n=$a.current,n!==null){switch(n.tag){case 31:case 13:return eo===null?Eu():n.alternate===null&&Ul===0&&(Ul=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Ca?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Wu(e,r,a)),!1;case 22:return n.flags|=65536,r===Ca?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Wu(e,r,a)),!1}throw Error(i(435,n.tag))}return Wu(e,r,a),Eu(),!1}if(V)return t=$a.current,t===null?(r!==Fi&&(t=Error(i(423),{cause:r}),Hi(gi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=gi(r,n),a=Js(e.stateNode,r,a),Ha(e,a),Ul!==4&&(Ul=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Fi&&(e=Error(i(422),{cause:r}),Hi(gi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=gi(o,n),Yl===null?Yl=[o]:Yl.push(o),Ul!==4&&(Ul=2),t===null)return!0;r=gi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Js(n.stateNode,r,e),Ha(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(nu===null||!nu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Ys(a),Xs(a,e,n,r),Ha(n,a),!1}n=n.return}while(n!==null);return!1}var Qs=Error(i(461)),$s=!1;function ec(e,t,n,r){t.child=e===null?Ia(t,null,n,r):Fa(t,e.child,n,r)}function tc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return Qi(t),r=bo(e,t,n,o,a,i),s=wo(),e!==null&&!$s?(To(e,t,i),Tc(e,t,i)):(V&&s&&Oi(t),t.flags|=1,ec(e,t,r,i),t.child)}function nc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!si(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,rc(e,t,a,r,i)):(e=ui(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Ec(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Sr:n,n(o,r)&&e.ref===t.ref)return Tc(e,t,i)}return t.flags|=1,e=ci(a,r),e.ref=t.ref,e.return=t,t.child=e}function rc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Sr(a,r)&&e.ref===t.ref)if($s=!1,t.pendingProps=r=a,Ec(e,i))e.flags&131072&&($s=!0);else return t.lanes=e.lanes,Tc(e,t,i)}return dc(e,t,n,r,i)}function ic(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return oc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&va(t,a===null?null:a.cachePool),a===null?Za():Xa(t,a),ro(t);else return r=t.lanes=536870912,oc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&va(t,null),Za(),io(t)):(va(t,a.cachePool),Xa(t,a),io(t),t.memoizedState=null);return ec(e,t,i,n),t.child}function ac(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function oc(e,t,n,r,i){var a=_a();return a=a===null?null:{parent:aa._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&va(t,null),Za(),ro(t),e!==null&&Xi(e,t,r,!0),t.childLanes=i,null}function sc(e,t){return t=bc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function cc(e,t,n){return Fa(t,e.child,null,n),e=sc(t,t.pendingProps),e.flags|=2,ao(t),t.memoizedState=null,e}function lc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(V){if(r.mode===`hidden`)return e=sc(t,r),t.lanes=536870912,ac(null,e);if(no(t),(e=Mi)?(e=rf(e,Pi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ci===null?null:{id:wi,overflow:Ti},retryLane:536870912,hydrationErrors:null},n=pi(e),n.return=t,t.child=n,ji=t,Mi=null)):e=null,e===null)throw Ii(t);return t.lanes=536870912,null}return sc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(no(t),a)if(t.flags&256)t.flags&=-257,t=cc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if($s||Xi(e,t,n,!1),a=(n&e.childLanes)!==0,$s||a){if(r=Ll,r!==null&&(s=$e(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,ti(e,s),mu(r,e,s),Qs;Eu(),t=cc(e,t,n)}else e=o.treeContext,Mi=cf(s.nextSibling),ji=t,V=!0,Ni=null,Pi=!1,e!==null&&Ai(t,e),t=sc(t,r),t.flags|=4096;return t}return e=ci(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function uc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function dc(e,t,n,r,i){return Qi(t),n=bo(e,t,n,r,void 0,i),r=wo(),e!==null&&!$s?(To(e,t,i),Tc(e,t,i)):(V&&r&&Oi(t),t.flags|=1,ec(e,t,n,i),t.child)}function fc(e,t,n,r,i,a){return Qi(t),t.updateQueue=null,n=So(t,r,n,i),xo(e),r=wo(),e!==null&&!$s?(To(e,t,a),Tc(e,t,a)):(V&&r&&Oi(t),t.flags|=1,ec(e,t,n,a),t.child)}function pc(e,t,n,r,i){if(Qi(t),t.stateNode===null){var a=ii,o=n.contextType;typeof o==`object`&&o&&(a=$i(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=zs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Ra(t),o=n.contextType,a.context=typeof o==`object`&&o?$i(o):ii,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Rs(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&zs.enqueueReplaceState(a,a.state,null),Ga(t,r,a,i),Wa(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Hs(n,s);a.props=c;var l=a.context,u=n.contextType;o=ii,typeof u==`object`&&u&&(o=$i(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Vs(t,a,r,o),La=!1;var f=t.memoizedState;a.state=f,Ga(t,r,a,i),Wa(),l=t.memoizedState,s||f!==l||La?(typeof d==`function`&&(Rs(t,n,d,r),l=t.memoizedState),(c=La||Bs(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,za(e,t),o=t.memoizedProps,u=Hs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ii,typeof l==`object`&&l&&(c=$i(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Vs(t,a,r,c),La=!1,f=t.memoizedState,a.state=f,Ga(t,r,a,i),Wa();var p=t.memoizedState;o!==d||f!==p||La||e!==null&&e.dependencies!==null&&Zi(e.dependencies)?(typeof s==`function`&&(Rs(t,n,s,r),p=t.memoizedState),(u=La||Bs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Zi(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,uc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Fa(t,e.child,null,i),t.child=Fa(t,null,n,i)):ec(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Tc(e,t,i),e}function mc(e,t,n,r){return Bi(),t.flags|=256,ec(e,t,n,r),t.child}var hc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function gc(e){return{baseLanes:e,cachePool:ya()}}function _c(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=ql),e}function vc(e,t,n){var r=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(oo.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(V){if(a?to(t):io(t),(e=Mi)?(e=rf(e,Pi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ci===null?null:{id:wi,overflow:Ti},retryLane:536870912,hydrationErrors:null},n=pi(e),n.return=t,t.child=n,ji=t,Mi=null)):e=null,e===null)throw Ii(t);return of(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(io(t),a=t.mode,c=bc({mode:`hidden`,children:c},a),r=di(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=gc(n),r.childLanes=_c(e,s,n),t.memoizedState=hc,ac(null,r)):(to(t),yc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(to(t),t.flags&=-257,t=xc(e,t,n)):t.memoizedState===null?(io(t),c=r.fallback,a=t.mode,r=bc({mode:`visible`,children:r.children},a),c=di(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Fa(t,e.child,null,n),r=t.child,r.memoizedState=gc(n),r.childLanes=_c(e,s,n),t.memoizedState=hc,t=ac(null,r)):(io(t),t.child=e.child,t.flags|=128,t=null);else if(to(t),of(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Hi({value:r,source:null,stack:null}),t=xc(e,t,n)}else if($s||Xi(e,t,n,!1),s=(n&e.childLanes)!==0,$s||s){if(s=Ll,s!==null&&(r=$e(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,ti(e,r),mu(s,e,r),Qs;af(c)||Eu(),t=xc(e,t,n)}else af(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Mi=cf(c.nextSibling),ji=t,V=!0,Ni=null,Pi=!1,e!==null&&Ai(t,e),t=yc(t,r.children),t.flags|=4096);return t}return a?(io(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=ci(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=di(c,a,n,null),c.flags|=2):c=ci(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,ac(null,r),r=t.child,c=e.child.memoizedState,c===null?c=gc(n):(a=c.cachePool,a===null?a=ya():(l=aa._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=_c(e,s,n),t.memoizedState=hc,ac(e.child,r)):(to(t),n=e.child,e=n.sibling,n=ci(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function yc(e,t){return t=bc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function bc(e,t){return e=oi(22,e,null,t),e.lanes=0,e}function xc(e,t,n){return Fa(t,e.child,null,n),e=yc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Sc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ji(e.return,t,n)}function Cc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function wc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=oo.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,z(oo,o),ec(e,t,r,n),r=V?bi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Sc(e,n,t);else if(e.tag===19)Sc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&so(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Cc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&so(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Cc(t,!0,n,null,a,r);break;case`together`:Cc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Tc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Wl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Xi(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=ci(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ci(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Ec(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&Zi(e))):!0}function Dc(e,t,n){switch(t.tag){case 3:ce(t,t.stateNode.containerInfo),Ki(t,aa,e.memoizedState.cache),Bi();break;case 27:case 5:ue(t);break;case 4:ce(t,t.stateNode.containerInfo);break;case 10:Ki(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,no(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(to(t),e=Tc(e,t,n),e===null?null:e.sibling):vc(e,t,n):(to(t),t.flags|=128,null);to(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(Xi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return wc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),z(oo,oo.current),r)break;return null;case 22:return t.lanes=0,ic(e,t,n,t.pendingProps);case 24:Ki(t,aa,e.memoizedState.cache)}return Tc(e,t,n)}function Oc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)$s=!0;else{if(!Ec(e,n)&&!(t.flags&128))return $s=!1,Dc(e,t,n);$s=!!(e.flags&131072)}else $s=!1,V&&t.flags&1048576&&Di(t,bi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Ea(t.elementType),t.type=e,typeof e==`function`)si(e)?(r=Hs(e,r),t.tag=1,t=pc(null,t,e,r,n)):(t.tag=0,t=dc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===w){t.tag=11,t=tc(null,t,e,r,n);break a}else if(a===D){t.tag=14,t=nc(null,t,e,r,n);break a}}throw t=P(e)||e,Error(i(306,t,``))}}return t;case 0:return dc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Hs(r,t.pendingProps),pc(e,t,r,a,n);case 3:a:{if(ce(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,za(e,t),Ga(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Ki(t,aa,r),r!==o.cache&&Yi(t,[aa],n,!0),Wa(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=mc(e,t,r,n);break a}else if(r!==a){a=gi(Error(i(424)),t),Hi(a),t=mc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Mi=cf(e.firstChild),ji=t,V=!0,Ni=null,Pi=!0,n=Ia(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Bi(),r===a){t=Tc(e,t,n);break a}ec(e,t,r,n)}t=t.child}return t;case 26:return uc(e,t),e===null?(n=kf(t.type,null,t.pendingProps,null))?t.memoizedState=n:V||(n=t.type,e=t.pendingProps,r=Bd(oe.current).createElement(n),r[at]=t,r[ot]=e,Pd(r,n,e),vt(r),t.stateNode=r):t.memoizedState=kf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ue(t),e===null&&V&&(r=t.stateNode=ff(t.type,t.pendingProps,oe.current),ji=t,Pi=!0,a=Mi,Zd(t.type)?(lf=a,Mi=cf(r.firstChild)):Mi=a),ec(e,t,t.pendingProps.children,n),uc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&V&&((a=r=Mi)&&(r=tf(r,t.type,t.pendingProps,Pi),r===null?a=!1:(t.stateNode=r,ji=t,Mi=cf(r.firstChild),Pi=!1,a=!0)),a||Ii(t)),ue(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Ud(a,o)?r=null:s!==null&&Ud(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=bo(e,t,Co,null,null,n),Qf._currentValue=a),uc(e,t),ec(e,t,r,n),t.child;case 6:return e===null&&V&&((e=n=Mi)&&(n=nf(n,t.pendingProps,Pi),n===null?e=!1:(t.stateNode=n,ji=t,Mi=null,e=!0)),e||Ii(t)),null;case 13:return vc(e,t,n);case 4:return ce(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Fa(t,null,r,n):ec(e,t,r,n),t.child;case 11:return tc(e,t,t.type,t.pendingProps,n);case 7:return ec(e,t,t.pendingProps,n),t.child;case 8:return ec(e,t,t.pendingProps.children,n),t.child;case 12:return ec(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Ki(t,t.type,r.value),ec(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,Qi(t),a=$i(a),r=r(a),t.flags|=1,ec(e,t,r,n),t.child;case 14:return nc(e,t,t.type,t.pendingProps,n);case 15:return rc(e,t,t.type,t.pendingProps,n);case 19:return wc(e,t,n);case 31:return lc(e,t,n);case 22:return ic(e,t,n,t.pendingProps);case 24:return Qi(t),r=$i(aa),e===null?(a=_a(),a===null&&(a=Ll,o=oa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Ra(t),Ki(t,aa,a)):((e.lanes&n)!==0&&(za(e,t),Ga(t,null,null,n),Wa()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Ki(t,aa,r),r!==a.cache&&Yi(t,[aa],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Ki(t,aa,r))),ec(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function kc(e){e.flags|=4}function Ac(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Cu())e.flags|=8192;else throw Da=Ca,xa}else e.flags&=-16777217}function jc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Wf(t))if(Cu())e.flags|=8192;else throw Da=Ca,xa}function Mc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:qe(),e.lanes|=t,Jl|=t)}function Nc(e,t){if(!V)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Pc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Fc(e,t,n){var r=t.pendingProps;switch(ki(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Pc(t),null;case 1:return Pc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),qi(aa),le(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(zi(t)?kc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Vi())),Pc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(kc(t),o===null?(Pc(t),Ac(t,a,null,r,n)):(Pc(t),jc(t,o))):o?o===e.memoizedState?(Pc(t),t.flags&=-16777217):(kc(t),Pc(t),jc(t,o)):(e=e.memoizedProps,e!==r&&kc(t),Pc(t),Ac(t,a,e,r,n)),null;case 27:if(de(t),n=oe.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&kc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Pc(t),null}e=ie.current,zi(t)?Li(t,e):(e=ff(a,r,n),t.stateNode=e,kc(t))}return Pc(t),null;case 5:if(de(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&kc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Pc(t),null}if(o=ie.current,zi(t))Li(t,o);else{var s=Bd(oe.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[at]=t,o[ot]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Pd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&kc(t)}}return Pc(t),Ac(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&kc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=oe.current,zi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=ji,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[at]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||jd(e.nodeValue,n)),e||Ii(t,!0)}else e=Bd(e).createTextNode(r),e[at]=t,t.stateNode=e}return Pc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=zi(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[at]=t}else Bi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Pc(t),e=!1}else n=Vi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(ao(t),t):(ao(t),null);if(t.flags&128)throw Error(i(558))}return Pc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=zi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[at]=t}else Bi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Pc(t),a=!1}else a=Vi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(ao(t),t):(ao(t),null)}return ao(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Mc(t,t.updateQueue),Pc(t),null);case 4:return le(),e===null&&xd(t.stateNode.containerInfo),Pc(t),null;case 10:return qi(t.type),Pc(t),null;case 19:if(R(oo),r=t.memoizedState,r===null)return Pc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Nc(r,!1);else{if(Ul!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=so(e),o!==null){for(t.flags|=128,Nc(r,!1),e=o.updateQueue,t.updateQueue=e,Mc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)li(n,e),n=n.sibling;return z(oo,oo.current&1|2),V&&Ei(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&we()>eu&&(t.flags|=128,a=!0,Nc(r,!1),t.lanes=4194304)}else{if(!a)if(e=so(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Mc(t,e),Nc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!V)return Pc(t),null}else 2*we()-r.renderingStartTime>eu&&n!==536870912&&(t.flags|=128,a=!0,Nc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Pc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=we(),e.sibling=null,n=oo.current,z(oo,a?n&1|2:n&1),V&&Ei(t,r.treeForkCount),e);case 22:case 23:return ao(t),Qa(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Pc(t),t.subtreeFlags&6&&(t.flags|=8192)):Pc(t),n=t.updateQueue,n!==null&&Mc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&R(ga),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),qi(aa),Pc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Ic(e,t){switch(ki(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return qi(aa),le(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return de(t),null;case 31:if(t.memoizedState!==null){if(ao(t),t.alternate===null)throw Error(i(340));Bi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(ao(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Bi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return R(oo),null;case 4:return le(),null;case 10:return qi(t.type),null;case 22:case 23:return ao(t),Qa(),e!==null&&R(ga),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return qi(aa),null;case 25:return null;default:return null}}function Lc(e,t){switch(ki(t),t.tag){case 3:qi(aa),le();break;case 26:case 27:case 5:de(t);break;case 4:le();break;case 31:t.memoizedState!==null&&ao(t);break;case 13:ao(t);break;case 19:R(oo);break;case 10:qi(t.type);break;case 22:case 23:ao(t),Qa(),e!==null&&R(ga);break;case 24:qi(aa)}}function Rc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Q(t,t.return,e)}}function zc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Q(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Q(t,t.return,e)}}function Bc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{qa(t,n)}catch(t){Q(e,e.return,t)}}}function Vc(e,t,n){n.props=Hs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Q(e,t,n)}}function Hc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Q(e,t,n)}}function Uc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Q(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Q(e,t,n)}else n.current=null}function Wc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Q(e,e.return,t)}}function Gc(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[ot]=t}catch(t){Q(e,e.return,t)}}function Kc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function qc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Kc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Zd(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Jc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Qt));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Jc(e,t,n),e=e.sibling;e!==null;)Jc(e,t,n),e=e.sibling}function Yc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Yc(e,t,n),e=e.sibling;e!==null;)Yc(e,t,n),e=e.sibling}function Xc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Pd(t,r,n),t[at]=e,t[ot]=n}catch(t){Q(e,e.return,t)}}var Zc=!1,Qc=!1,$c=!1,el=typeof WeakSet==`function`?WeakSet:Set,tl=null;function nl(e,t){if(e=e.containerInfo,Rd=sp,e=Er(e),Dr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(zd={focusedElem:e,selectionRange:n},sp=!1,tl=t;tl!==null;)if(t=tl,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,tl=e;else for(;tl!==null;){switch(t=tl,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Hs(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Q(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)ef(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:ef(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,tl=e;break}tl=t.return}}function rl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:vl(e,n),r&4&&Rc(5,n);break;case 1:if(vl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Q(n,n.return,e)}else{var i=Hs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Q(n,n.return,e)}}r&64&&Bc(n),r&512&&Hc(n,n.return);break;case 3:if(vl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{qa(e,t)}catch(e){Q(n,n.return,e)}}break;case 27:t===null&&r&4&&Xc(n);case 26:case 5:vl(e,n),t===null&&r&4&&Wc(n),r&512&&Hc(n,n.return);break;case 12:vl(e,n);break;case 31:vl(e,n),r&4&&ll(e,n);break;case 13:vl(e,n),r&4&&ul(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=qu.bind(null,n),sf(e,n))));break;case 22:if(r=n.memoizedState!==null||Zc,!r){t=t!==null&&t.memoizedState!==null||Qc,i=Zc;var a=Qc;Zc=r,(Qc=t)&&!a?bl(e,n,(n.subtreeFlags&8772)!=0):vl(e,n),Zc=i,Qc=a}break;case 30:break;default:vl(e,n)}}function il(e){var t=e.alternate;t!==null&&(e.alternate=null,il(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&pt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var al=null,ol=!1;function sl(e,t,n){for(n=n.child;n!==null;)cl(e,t,n),n=n.sibling}function cl(e,t,n){if(Pe&&typeof Pe.onCommitFiberUnmount==`function`)try{Pe.onCommitFiberUnmount(Ne,n)}catch{}switch(n.tag){case 26:Qc||Uc(n,t),sl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Qc||Uc(n,t);var r=al,i=ol;Zd(n.type)&&(al=n.stateNode,ol=!1),sl(e,t,n),pf(n.stateNode),al=r,ol=i;break;case 5:Qc||Uc(n,t);case 6:if(r=al,i=ol,al=null,sl(e,t,n),al=r,ol=i,al!==null)if(ol)try{(al.nodeType===9?al.body:al.nodeName===`HTML`?al.ownerDocument.body:al).removeChild(n.stateNode)}catch(e){Q(n,t,e)}else try{al.removeChild(n.stateNode)}catch(e){Q(n,t,e)}break;case 18:al!==null&&(ol?(e=al,Qd(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Np(e)):Qd(al,n.stateNode));break;case 4:r=al,i=ol,al=n.stateNode.containerInfo,ol=!0,sl(e,t,n),al=r,ol=i;break;case 0:case 11:case 14:case 15:zc(2,n,t),Qc||zc(4,n,t),sl(e,t,n);break;case 1:Qc||(Uc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Vc(n,t,r)),sl(e,t,n);break;case 21:sl(e,t,n);break;case 22:Qc=(r=Qc)||n.memoizedState!==null,sl(e,t,n),Qc=r;break;default:sl(e,t,n)}}function ll(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Np(e)}catch(e){Q(t,t.return,e)}}}function ul(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Np(e)}catch(e){Q(t,t.return,e)}}function dl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new el),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new el),t;default:throw Error(i(435,e.tag))}}function fl(e,t){var n=dl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Ju.bind(null,e,t);t.then(r,r)}})}function pl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(Zd(c.type)){al=c.stateNode,ol=!1;break a}break;case 5:al=c.stateNode,ol=!1;break a;case 3:case 4:al=c.stateNode.containerInfo,ol=!0;break a}c=c.return}if(al===null)throw Error(i(160));cl(o,s,a),al=null,ol=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)hl(t,e),t=t.sibling}var ml=null;function hl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:pl(t,e),gl(e),r&4&&(zc(3,e,e.return),Rc(3,e),zc(5,e,e.return));break;case 1:pl(t,e),gl(e),r&512&&(Qc||n===null||Uc(n,n.return)),r&64&&Zc&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=ml;if(pl(t,e),gl(e),r&512&&(Qc||n===null||Uc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[ft]||o[at]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head >
9 title`))),Pd(o,r,n),o[at]=e,vt(o),r=o;break a;case`link`:var s=Vf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Pd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Vf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Pd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[at]=e,vt(o),r=o}e.stateNode=r}else Hf(a,e.type,e.stateNode);else e.stateNode=If(a,r,e.memoizedProps);
vendor: 23,071 bytes, line 9
9else o===r?r===null&&e.stateNode!==null&&Gc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Hf(a,e.type,e.stateNode):If(a,r,e.memoizedProps))}break;case 27:pl(t,e),gl(e),r&512&&(Qc||n===null||Uc(n,n.return)),n!==null&&r&4&&Gc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(pl(t,e),gl(e),r&512&&(Qc||n===null||Uc(n,n.return)),e.flags&32){a=e.stateNode;try{Wt(a,``)}catch(t){Q(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Gc(e,a,n===null?a:n.memoizedProps)),r&1024&&($c=!0);break;case 6:if(pl(t,e),gl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Q(e,e.return,t)}}break;case 3:if(Bf=null,a=ml,ml=gf(t.containerInfo),pl(t,e),ml=a,gl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Np(t.containerInfo)}catch(t){Q(e,e.return,t)}$c&&($c=!1,_l(e));break;case 4:r=ml,ml=gf(e.stateNode.containerInfo),pl(t,e),gl(e),ml=r;break;case 12:pl(t,e),gl(e);break;case 31:pl(t,e),gl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,fl(e,r)));break;case 13:pl(t,e),gl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Ql=we()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,fl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=Zc,d=Qc;if(Zc=u||a,Qc=d||l,pl(t,e),Qc=d,Zc=u,gl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||Zc||Qc||yl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Q(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Q(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?$d(m,!0):$d(l.stateNode,!1)}catch(e){Q(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,fl(e,n))));break;case 19:pl(t,e),gl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,fl(e,r)));break;case 30:break;case 21:break;default:pl(t,e),gl(e)}}function gl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Kc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;Yc(e,qc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Wt(o,``),n.flags&=-33),Yc(e,qc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Jc(e,qc(e),s);break;default:throw Error(i(161))}}catch(t){Q(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function _l(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;_l(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function vl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)rl(e,t.alternate,t),t=t.sibling}function yl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:zc(4,t,t.return),yl(t);break;case 1:Uc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Vc(t,t.return,n),yl(t);break;case 27:pf(t.stateNode);case 26:case 5:Uc(t,t.return),yl(t);break;case 22:t.memoizedState===null&&yl(t);break;case 30:yl(t);break;default:yl(t)}e=e.sibling}}function bl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:bl(i,a,n),Rc(4,a);break;case 1:if(bl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Q(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Ka(c[i],s)}catch(e){Q(r,r.return,e)}}n&&o&64&&Bc(a),Hc(a,a.return);break;case 27:Xc(a);case 26:case 5:bl(i,a,n),n&&r===null&&o&4&&Wc(a),Hc(a,a.return);break;case 12:bl(i,a,n);break;case 31:bl(i,a,n),n&&o&4&&ll(i,a);break;case 13:bl(i,a,n),n&&o&4&&ul(i,a);break;case 22:a.memoizedState===null&&bl(i,a,n),Hc(a,a.return);break;case 30:break;default:bl(i,a,n)}t=t.sibling}}function xl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&sa(n))}function Sl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&sa(e))}function Cl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)wl(e,t,n,r),t=t.sibling}function wl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Cl(e,t,n,r),i&2048&&Rc(9,t);break;case 1:Cl(e,t,n,r);break;case 3:Cl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&sa(e)));break;case 12:if(i&2048){Cl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Q(t,t.return,e)}}else Cl(e,t,n,r);break;case 31:Cl(e,t,n,r);break;case 13:Cl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Cl(e,t,n,r):(a._visibility|=2,Tl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?Cl(e,t,n,r):El(e,t),i&2048&&xl(o,t);break;case 24:Cl(e,t,n,r),i&2048&&Sl(t.alternate,t);break;default:Cl(e,t,n,r)}}function Tl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Tl(a,o,s,c,i),Rc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Tl(a,o,s,c,i)):u._visibility&2?Tl(a,o,s,c,i):El(a,o),i&&l&2048&&xl(o.alternate,o);break;case 24:Tl(a,o,s,c,i),i&&l&2048&&Sl(o.alternate,o);break;default:Tl(a,o,s,c,i)}t=t.sibling}}function El(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:El(n,r),i&2048&&xl(r.alternate,r);break;case 24:El(n,r),i&2048&&Sl(r.alternate,r);break;default:El(n,r)}t=t.sibling}}var Dl=8192;function Ol(e,t,n){if(e.subtreeFlags&Dl)for(e=e.child;e!==null;)kl(e,t,n),e=e.sibling}function kl(e,t,n){switch(e.tag){case 26:Ol(e,t,n),e.flags&Dl&&e.memoizedState!==null&&Gf(n,ml,e.memoizedState,e.memoizedProps);break;case 5:Ol(e,t,n);break;case 3:case 4:var r=ml;ml=gf(e.stateNode.containerInfo),Ol(e,t,n),ml=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Dl,Dl=16777216,Ol(e,t,n),Dl=r):Ol(e,t,n));break;default:Ol(e,t,n)}}function Al(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function jl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];tl=r,Pl(r,e)}Al(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ml(e),e=e.sibling}function Ml(e){switch(e.tag){case 0:case 11:case 15:jl(e),e.flags&2048&&zc(9,e,e.return);break;case 3:jl(e);break;case 12:jl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Nl(e)):jl(e);break;default:jl(e)}}function Nl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];tl=r,Pl(r,e)}Al(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:zc(8,t,t.return),Nl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Nl(t));break;default:Nl(t)}e=e.sibling}}function Pl(e,t){for(;tl!==null;){var n=tl;switch(n.tag){case 0:case 11:case 15:zc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:sa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,tl=r;else a:for(n=e;tl!==null;){r=tl;var i=r.sibling,a=r.return;if(il(r),r===n){tl=null;break a}if(i!==null){i.return=a,tl=i;break a}tl=a}}}var Fl={getCacheForType:function(e){var t=$i(aa),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return $i(aa).controller.signal}},Il=typeof WeakMap==`function`?WeakMap:Map,J=0,Ll=null,Y=null,X=0,Z=0,Rl=null,zl=!1,Bl=!1,Vl=!1,Hl=0,Ul=0,Wl=0,Gl=0,Kl=0,ql=0,Jl=0,Yl=null,Xl=null,Zl=!1,Ql=0,$l=0,eu=1/0,tu=null,nu=null,ru=0,iu=null,au=null,ou=0,su=0,cu=null,lu=null,uu=0,du=null;function fu(){return J&2&&X!==0?X&-X:I.T===null?nt():ud()}function pu(){if(ql===0)if(!(X&536870912)||V){var e=Ve;Ve<<=1,!(Ve&3932160)&&(Ve=262144),ql=e}else ql=536870912;return e=$a.current,e!==null&&(e.flags|=32),ql}function mu(e,t,n){(e===Ll&&(Z===2||Z===9)||e.cancelPendingCommit!==null)&&(xu(e,0),vu(e,X,ql,!1)),Ye(e,n),(!(J&2)||e!==Ll)&&(e===Ll&&(!(J&2)&&(Gl|=n),Ul===4&&vu(e,X,ql,!1)),nd(e))}function hu(e,t,n){if(J&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||Ge(e,t),a=r?ku(e,t):Du(e,t,!0),o=r;do{if(a===0){Bl&&!r&&vu(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!_u(n)){a=Du(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=Yl;var l=c.current.memoizedState.isDehydrated;if(l&&(xu(c,s).flags|=256),s=Du(c,s,!1),s!==2){if(Vl&&!l){c.errorRecoveryDisabledLanes|=o,Gl|=o,a=4;break a}o=Xl,Xl=a,o!==null&&(Xl===null?Xl=o:Xl.push.apply(Xl,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){xu(e,0),vu(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:vu(r,t,ql,!zl);break a;case 2:Xl=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=Ql+300-we(),10<a)){if(vu(r,t,ql,!zl),We(r,0,!0)!==0)break a;ou=t,r.timeoutHandle=Kd(gu.bind(null,r,n,Xl,tu,Zl,t,ql,Gl,Jl,zl,o,`Throttled`,-0,0),a);break a}gu(r,n,Xl,tu,Zl,t,ql,Gl,Jl,zl,o,null,-0,0)}}break}while(1);nd(e)}function gu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Qt},kl(t,a,d);var m=(a&62914560)===a?Ql-we():(a&4194048)===a?$l-we():0;if(m=qf(d,m),m!==null){ou=a,e.cancelPendingCommit=m(Iu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),vu(e,a,o,!l);return}}Iu(e,t,a,n,r,i,o,s,c)}function _u(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!xr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function vu(e,t,n,r){t&=~Kl,t&=~Gl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Ie(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&Ze(e,n,t)}function yu(){return J&6?!0:(rd(0,!1),!1)}function bu(){if(Y!==null){if(Z===0)var e=Y.return;else e=Y,Gi=Wi=null,Eo(e),Aa=null,H=0,e=Y;for(;e!==null;)Lc(e.alternate,e),e=e.return;Y=null}}function xu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,qd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),ou=0,bu(),Ll=e,Y=n=ci(e.current,null),X=t,Z=0,Rl=null,zl=!1,Bl=Ge(e,t),Vl=!1,Jl=ql=Kl=Gl=Wl=Ul=0,Xl=Yl=null,Zl=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Ie(r),a=1<<i;t|=e[i],r&=~a}return Hl=t,Qr(),n}function Su(e,t){W=null,I.H=K,t===ba||t===Sa?(t=Oa(),Z=3):t===xa?(t=Oa(),Z=4):Z=t===Qs?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Rl=t,Y===null&&(Ul=1,Ks(e,gi(t,e.current)))}function Cu(){var e=$a.current;return e===null?!0:(X&4194048)===X?eo===null:(X&62914560)===X||X&536870912?e===eo:!1}function wu(){var e=I.H;return I.H=K,e===null?K:e}function Tu(){var e=I.A;return I.A=Fl,e}function Eu(){Ul=4,zl||(X&4194048)!==X&&$a.current!==null||(Bl=!0),!(Wl&134217727)&&!(Gl&134217727)||Ll===null||vu(Ll,X,ql,!1)}function Du(e,t,n){var r=J;J|=2;var i=wu(),a=Tu();(Ll!==e||X!==t)&&(tu=null,xu(e,t)),t=!1;var o=Ul;a:do try{if(Z!==0&&Y!==null){var s=Y,c=Rl;switch(Z){case 8:bu(),o=6;break a;case 3:case 2:case 9:case 6:$a.current===null&&(t=!0);var l=Z;if(Z=0,Rl=null,Nu(e,s,c,l),n&&Bl){o=0;break a}break;default:l=Z,Z=0,Rl=null,Nu(e,s,c,l)}}Ou(),o=Ul;break}catch(t){Su(e,t)}while(1);return t&&e.shellSuspendCounter++,Gi=Wi=null,J=r,I.H=i,I.A=a,Y===null&&(Ll=null,X=0,Qr()),o}function Ou(){for(;Y!==null;)ju(Y)}function ku(e,t){var n=J;J|=2;var r=wu(),a=Tu();Ll!==e||X!==t?(tu=null,eu=we()+500,xu(e,t)):Bl=Ge(e,t);a:do try{if(Z!==0&&Y!==null){t=Y;var o=Rl;b:switch(Z){case 1:Z=0,Rl=null,Nu(e,t,o,1);break;case 2:case 9:if(wa(o)){Z=0,Rl=null,Mu(t);break}t=function(){Z!==2&&Z!==9||Ll!==e||(Z=7),nd(e)},o.then(t,t);break a;case 3:Z=7;break a;case 4:Z=5;break a;case 7:wa(o)?(Z=0,Rl=null,Mu(t)):(Z=0,Rl=null,Nu(e,t,o,7));break;case 5:var s=null;switch(Y.tag){case 26:s=Y.memoizedState;case 5:case 27:var c=Y;if(s?Wf(s):c.stateNode.complete){Z=0,Rl=null;var l=c.sibling;if(l!==null)Y=l;else{var u=c.return;u===null?Y=null:(Y=u,Pu(u))}break b}}Z=0,Rl=null,Nu(e,t,o,5);break;case 6:Z=0,Rl=null,Nu(e,t,o,6);break;case 8:bu(),Ul=6;break a;default:throw Error(i(462))}}Au();break}catch(t){Su(e,t)}while(1);return Gi=Wi=null,I.H=r,I.A=a,J=n,Y===null?(Ll=null,X=0,Qr(),Ul):0}function Au(){for(;Y!==null&&!Se();)ju(Y)}function ju(e){var t=Oc(e.alternate,e,Hl);e.memoizedProps=e.pendingProps,t===null?Pu(e):Y=t}function Mu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=fc(n,t,t.pendingProps,t.type,void 0,X);break;case 11:t=fc(n,t,t.pendingProps,t.type.render,t.ref,X);break;case 5:Eo(t);default:Lc(n,t),t=Y=li(t,Hl),t=Oc(n,t,Hl)}e.memoizedProps=e.pendingProps,t===null?Pu(e):Y=t}function Nu(e,t,n,r){Gi=Wi=null,Eo(t),Aa=null,H=0;var i=t.return;try{if(Zs(e,i,t,n,X)){Ul=1,Ks(e,gi(n,e.current)),Y=null;return}}catch(t){if(i!==null)throw Y=i,t;Ul=1,Ks(e,gi(n,e.current)),Y=null;return}t.flags&32768?(V||r===1?e=!0:Bl||X&536870912?e=!1:(zl=e=!0,(r===2||r===9||r===3||r===6)&&(r=$a.current,r!==null&&r.tag===13&&(r.flags|=16384))),Fu(t,e)):Pu(t)}function Pu(e){var t=e;do{if(t.flags&32768){Fu(t,zl);return}e=t.return;var n=Fc(t.alternate,t,Hl);if(n!==null){Y=n;return}if(t=t.sibling,t!==null){Y=t;return}Y=t=e}while(t!==null);Ul===0&&(Ul=5)}function Fu(e,t){do{var n=Ic(e.alternate,e);if(n!==null){n.flags&=32767,Y=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Y=e;return}Y=e=n}while(e!==null);Ul=6,Y=null}function Iu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Vu();while(ru!==0);if(J&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=Zr,Xe(e,n,o,s,c,l),e===Ll&&(Y=Ll=null,X=0),au=t,iu=e,ou=n,su=o,cu=a,lu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Yu(Oe,function(){return Hu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=I.T,I.T=null,a=L.p,L.p=2,s=J,J|=4;try{nl(e,t,n)}finally{J=s,L.p=a,I.T=r}}ru=1,Lu(),Ru(),zu()}}function Lu(){if(ru===1){ru=0;var e=iu,t=au,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=I.T,I.T=null;var r=L.p;L.p=2;var i=J;J|=4;try{hl(t,e);var a=zd,o=Er(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Tr(s.ownerDocument.documentElement,s)){if(c!==null&&Dr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=wr(s,h),v=wr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}sp=!!Rd,zd=Rd=null}finally{J=i,L.p=r,I.T=n}}e.current=t,ru=2}}function Ru(){if(ru===2){ru=0;var e=iu,t=au,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=I.T,I.T=null;var r=L.p;L.p=2;var i=J;J|=4;try{rl(e,t.alternate,t)}finally{J=i,L.p=r,I.T=n}}ru=3}}function zu(){if(ru===4||ru===3){ru=0,Ce();var e=iu,t=au,n=ou,r=lu;t.subtreeFlags&10256||t.flags&10256?ru=5:(ru=0,au=iu=null,Bu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(nu=null),tt(n),t=t.stateNode,Pe&&typeof Pe.onCommitFiberRoot==`function`)try{Pe.onCommitFiberRoot(Ne,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=I.T,i=L.p,L.p=2,I.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{I.T=t,L.p=i}}ou&3&&Vu(),nd(e),i=e.pendingLanes,n&261930&&i&42?e===du?uu++:(uu=0,du=e):uu=0,rd(0,!1)}}function Bu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,sa(t)))}function Vu(){return Lu(),Ru(),zu(),Hu()}function Hu(){if(ru!==5)return!1;var e=iu,t=su;su=0;var n=tt(ou),r=I.T,a=L.p;try{L.p=32>n?32:n,I.T=null,n=cu,cu=null;var o=iu,s=ou;if(ru=0,au=iu=null,ou=0,J&6)throw Error(i(331));var c=J;if(J|=4,Ml(o.current),wl(o,o.current,s,n),J=c,rd(0,!1),Pe&&typeof Pe.onPostCommitFiberRoot==`function`)try{Pe.onPostCommitFiberRoot(Ne,o)}catch{}return!0}finally{L.p=a,I.T=r,Bu(e,t)}}function Uu(e,t,n){t=gi(n,t),t=Js(e.stateNode,t,2),e=Ba(e,t,2),e!==null&&(Ye(e,2),nd(e))}function Q(e,t,n){if(e.tag===3)Uu(e,e,n);else for(;t!==null;){if(t.tag===3){Uu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(nu===null||!nu.has(r))){e=gi(n,e),n=Ys(2),r=Ba(t,n,2),r!==null&&(Xs(n,r,t,e),Ye(r,2),nd(r));break}}t=t.return}}function Wu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Il;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Vl=!0,i.add(n),e=Gu.bind(null,e,t,n),t.then(e,e))}function Gu(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ll===e&&(X&n)===n&&(Ul===4||Ul===3&&(X&62914560)===X&&300>we()-Ql?!(J&2)&&xu(e,0):Kl|=n,Jl===X&&(Jl=0)),nd(e)}function Ku(e,t){t===0&&(t=qe()),e=ti(e,t),e!==null&&(Ye(e,t),nd(e))}function qu(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ku(e,n)}function Ju(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),Ku(e,n)}function Yu(e,t){return be(e,t)}var Xu=null,Zu=null,Qu=!1,$u=!1,ed=!1,td=0;function nd(e){e!==Zu&&e.next===null&&(Zu===null?Xu=Zu=e:Zu=Zu.next=e),$u=!0,Qu||(Qu=!0,ld())}function rd(e,t){if(!ed&&$u){ed=!0;do for(var n=!1,r=Xu;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Ie(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,cd(r,a))}else a=X,a=We(r,r===Ll?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Ge(r,a)||(n=!0,cd(r,a));r=r.next}while(n);ed=!1}}function id(){ad()}function ad(){$u=Qu=!1;var e=0;td!==0&&Gd()&&(e=td);for(var t=we(),n=null,r=Xu;r!==null;){var i=r.next,a=od(r,t);a===0?(r.next=null,n===null?Xu=i:n.next=i,i===null&&(Zu=n)):(n=r,(e!==0||a&3)&&($u=!0)),r=i}ru!==0&&ru!==5||rd(e,!1),td!==0&&(td=0)}function od(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Ie(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Ke(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Ll,n=X,n=We(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Z===2||Z===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&xe(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Ge(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&xe(r),tt(n)){case 2:case 8:n=De;break;case 32:n=Oe;break;case 268435456:n=Ae;break;default:n=Oe}return r=sd.bind(null,e),n=be(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&xe(r),e.callbackPriority=2,e.callbackNode=null,2}function sd(e,t){if(ru!==0&&ru!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Vu()&&e.callbackNode!==n)return null;var r=X;return r=We(e,e===Ll?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(hu(e,r,t),od(e,we()),e.callbackNode!=null&&e.callbackNode===n?sd.bind(null,e):null)}function cd(e,t){if(Vu())return null;hu(e,t,!0)}function ld(){Yd(function(){J&6?be(Ee,id):ad()})}function ud(){if(td===0){var e=ua;e===0&&(e=Be,Be<<=1,!(Be&261888)&&(Be=256)),td=e}return td}function dd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Zt(``+e)}function fd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function pd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=dd((i[ot]||null).action),o=r.submitter;o&&(t=(t=o[ot]||null)?dd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new bn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(td!==0){var e=o?fd(i,o):new FormData(i);Ss(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?fd(i,o):new FormData(i),Ss(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var md=0;md<B.length;md++){var hd=B[md];qr(hd.toLowerCase(),`on`+(hd[0].toUpperCase()+hd.slice(1)))}qr(zr,`onAnimationEnd`),qr(Br,`onAnimationIteration`),qr(Vr,`onAnimationStart`),qr(`dblclick`,`onDoubleClick`),qr(`focusin`,`onFocus`),qr(`focusout`,`onBlur`),qr(Hr,`onTransitionRun`),qr(Ur,`onTransitionStart`),qr(Wr,`onTransitionCancel`),qr(Gr,`onTransitionEnd`),St(`onMouseEnter`,[`mouseout`,`mouseover`]),St(`onMouseLeave`,[`mouseout`,`mouseover`]),St(`onPointerEnter`,[`pointerout`,`pointerover`]),St(`onPointerLeave`,[`pointerout`,`pointerover`]),xt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),xt(`onSelect`,`focusout contextmenu dragend focu
9sin 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 gd=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),_d=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(gd));function vd(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Jr(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Jr(e)}i.currentTarget=null,a=c}}}}function $(e,t){var n=t[ct];n===void 0&&(n=t[ct]=new Set);var r=e+`__bubble`;n.has(r)||(Sd(t,e,2,!1),n.add(r))}function yd(e,t,n){var r=0;t&&(r|=4),Sd(n,e,r,t)}var bd=`_reactListening`+Math.random().toString(36).slice(2);function xd(e){if(!e[bd]){e[bd]=!0,yt.forEach(function(t){t!==`selectionchange`&&(_d.has(t)||yd(t,!1,e),yd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[bd]||(t[bd]=!0,yd(`selectionchange`,!1,t))}}function Sd(e,t,n,r){switch(mp(t)){case 2:var i=cp;break;case 8:i=lp;break;default:i=up}n=i.bind(null,t,n,e),i=void 0,!ln||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Cd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=mt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}on(function(){var r=a,i=en(n),s=[];a:{var c=Kr.get(e);if(c!==void 0){var l=bn,u=e;switch(e){case`keypress`:if(hn(n)===0)break a;case`keydown`:case`keyup`:l=Rn;break;case`focusin`:u=`focus`,l=kn;break;case`focusout`:u=`blur`,l=kn;break;case`beforeblur`:case`afterblur`:l=kn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=Dn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=On;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Bn;break;case zr:case Br:case Vr:l=An;break;case Gr:l=Vn;break;case`scroll`:case`scrollend`:l=Sn;break;case`wheel`:l=Hn;break;case`copy`:case`cut`:case`paste`:l=jn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=zn;break;case`toggle`:case`beforetoggle`:l=Un}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=sn(m,p),g!=null&&d.push(wd(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==$t&&(u=n.relatedTarget||n.fromElement)&&(mt(u)||u[st]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?mt(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=Dn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=zn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:gt(l),h=u==null?c:gt(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,mt(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Ed,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Dd(s,c,l,d,!1),u!==null&&f!==null&&Dd(s,f,u,d,!0)}}a:{if(c=r?gt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=lr;else if(rr(c))if(ur)v=yr;else{v=_r;var y=gr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Jt(r.elementType)&&(v=lr):v=vr;if(v&&=v(e,r)){ir(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Bt(c,`number`,c.value)}switch(y=r?gt(r):window,e){case`focusin`:(rr(y)||y.contentEditable===`true`)&&(kr=y,Ar=r,jr=null);break;case`focusout`:jr=Ar=kr=null;break;case`mousedown`:Mr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Mr=!1,Nr(s,n,i);break;case`selectionchange`:if(Or)break;case`keydown`:case`keyup`:Nr(s,n,i)}var b;if(Gn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else $n?Zn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Jn&&n.locale!==`ko`&&($n||x!==`onCompositionStart`?x===`onCompositionEnd`&&$n&&(b=mn()):(dn=i,fn=`value`in dn?dn.value:dn.textContent,$n=!0)),y=Td(r,x),0<y.length&&(x=new Mn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=Qn(n),b!==null&&(x.data=b)))),(b=qn?er(e,n):tr(e,n))&&(x=Td(r,`onBeforeInput`),0<x.length&&(y=new Mn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),pd(s,e,r,n,i)}vd(s,t)})}function wd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Td(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=sn(e,n),i!=null&&r.unshift(wd(e,i,a)),i=sn(e,t),i!=null&&r.push(wd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Ed(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Dd(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=sn(n,a),l!=null&&o.unshift(wd(n,l,c))):i||(l=sn(n,a),l!=null&&o.push(wd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Od=/\r\n?/g,kd=/\u0000|\uFFFD/g;function Ad(e){return(typeof e==`string`?e:``+e).replace(Od,`
10`).replace(kd,``)}
vendor: 35,745 bytes, line 10
10function jd(e,t){return t=Ad(t),Ad(e)===t}function Md(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Wt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Wt(e,``+r);break;case`className`:Ot(e,`class`,r);break;case`tabIndex`:Ot(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Ot(e,n,r);break;case`style`:qt(e,r,o);break;case`data`:if(t!==`object`){Ot(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Zt(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&Md(e,t,`name`,a.name,a,null),Md(e,t,`formEncType`,a.formEncType,a,null),Md(e,t,`formMethod`,a.formMethod,a,null),Md(e,t,`formTarget`,a.formTarget,a,null)):(Md(e,t,`encType`,a.encType,a,null),Md(e,t,`method`,a.method,a,null),Md(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Zt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Qt);break;case`onScroll`:r!=null&&$(`scroll`,e);break;case`onScrollEnd`:r!=null&&$(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=Zt(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:$(`beforetoggle`,e),$(`toggle`,e),Dt(e,`popover`,r);break;case`xlinkActuate`:kt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:kt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:kt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:kt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:kt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:kt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:kt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:kt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:kt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Dt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Yt.get(n)||n,Dt(e,n,r))}}function Nd(e,t,n,r,a,o){switch(n){case`style`:qt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Wt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Wt(e,``+r);break;case`onScroll`:r!=null&&$(`scroll`,e);break;case`onScrollEnd`:r!=null&&$(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Qt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!bt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[ot]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):Dt(e,n,r)}}}function Pd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:$(`error`,e),$(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Md(e,t,o,s,n,null)}}a&&Md(e,t,`srcSet`,n.srcSet,n,null),r&&Md(e,t,`src`,n.src,n,null);return;case`input`:$(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Md(e,t,r,d,n,null)}}zt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in $(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Md(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Vt(e,!!r,n,!0):Vt(e,!!r,t,!1);return;case`textarea`:for(s in $(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Md(e,t,s,c,n,null)}Ut(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Md(e,t,l,r,n,null)}return;case`dialog`:$(`beforetoggle`,e),$(`toggle`,e),$(`cancel`,e),$(`close`,e);break;case`iframe`:case`object`:$(`load`,e);break;case`video`:case`audio`:for(r=0;r<gd.length;r++)$(gd[r],e);break;case`image`:$(`error`,e),$(`load`,e);break;case`details`:$(`toggle`,e);break;case`embed`:case`source`:case`link`:$(`error`,e),$(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Md(e,t,u,r,n,null)}return;default:if(Jt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Nd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Md(e,t,c,r,n,null))}function Fd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Md(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Md(e,t,p,m,r,f)}}Rt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Md(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Md(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Vt(e,!!n,n?[]:``,!1):Vt(e,!!n,t,!0)):Vt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Md(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Md(e,t,s,a,r,o)}Ht(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Md(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Md(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Md(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Md(e,t,u,p,r,m)}return;default:if(Jt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Nd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Nd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Md(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Md(e,t,f,p,r,m)}function Id(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Ld(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Id(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Id(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Rd=null,zd=null;function Bd(e){return e.nodeType===9?e:e.ownerDocument}function Vd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Hd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Ud(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Wd=null;function Gd(){var e=window.event;return e&&e.type===`popstate`?e===Wd?!1:(Wd=e,!0):(Wd=null,!1)}var Kd=typeof setTimeout==`function`?setTimeout:void 0,qd=typeof clearTimeout==`function`?clearTimeout:void 0,Jd=typeof Promise==`function`?Promise:void 0,Yd=typeof queueMicrotask==`function`?queueMicrotask:Jd===void 0?Kd:function(e){return Jd.resolve(null).then(e).catch(Xd)};function Xd(e){setTimeout(function(){throw e})}function Zd(e){return e===`head`}function Qd(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Np(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)pf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,pf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[ft]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&pf(e.ownerDocument.body);n=i}while(n);Np(t)}function $d(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function ef(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:ef(n),pt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function tf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[ft])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=cf(e.nextSibling),e===null)break}return null}function nf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=cf(e.nextSibling),e===null))return null;return e}function rf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=cf(e.nextSibling),e===null))return null;return e}function af(e){return e.data===`$?`||e.data===`$~`}function of(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function sf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function cf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var lf=null;function uf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return cf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function df(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function ff(e,t,n){switch(t=Bd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function pf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);pt(e)}var mf=new Map,hf=new Set;function gf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var _f=L.d;L.d={f:vf,r:yf,D:Sf,C:Cf,L:wf,m:Tf,X:Df,S:Ef,M:Of};function vf(){var e=_f.f(),t=yu();return e||t}function yf(e){var t=ht(e);t!==null&&t.tag===5&&t.type===`form`?ws(t):_f.r(e)}var bf=typeof document>`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=Lt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Pd(t,`link`,e),vt(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Lt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Lt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Lt(n.imageSizes)+`"]`)):i+=`[href="`+Lt(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=h({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Pd(t,`link`,e),vt(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Lt(r)+`"][href="`+Lt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=h({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Pd(r,`link`,e),vt(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=_t(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=h({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);vt(c),Pd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=_t(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),vt(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=_t(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),vt(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var a=(a=oe.current)?gf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Af(n.href),n=_t(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Af(n.href);var o=_t(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(jf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),mf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},mf.set(e,n),o||Nf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Pf(n),n=_t(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Af(e){return`href="`+Lt(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return h({},e,{"data-precedence":e.precedence,precedence:null})}function Nf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Pd(t,`link`,n),vt(t),e.head.appendChild(t))}function Pf(e){return`[src="`+Lt(e)+`"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Lt(n.href)+`"]`);if(r)return t.instance=r,vt(r),r;var a=h({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),vt(r),Pd(r,`style`,a),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Af(n.href);var o=e.querySelector(jf(a));if(o)return t.state.loading|=4,t.instance=o,vt(o),o;r=Mf(n),(a=mf.get(a))&&Rf(r,a),o=(e.ownerDocument||e).createElement(`link`),vt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Pd(o,`link`,r),t.state.loading|=4,Lf(o,n.precedence,e),t.instance=o;case`script`:return o=Pf(n.src),(a=e.querySelector(Ff(o)))?(t.instance=a,vt(a),a):(r=n,(a=mf.get(o))&&(r=h({},n),zf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),vt(a),Pd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Lf(r,n.precedence,e));return t.instance}function Lf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Rf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Bf=null;function Vf(e,t,n){if(Bf===null){var r=new Map,i=Bf=new Map;i.set(n,r)}else i=Bf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[ft]||a[at]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Hf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Uf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,vt(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),vt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Kf===0&&(Kf=62500*Ld());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Jf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Qf={$$typeof:C,Provider:null,Consumer:null,_currentValue:ee,_currentValue2:ee,_threadCount:0};function $f(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Je(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Je(0),this.hiddenUpdates=Je(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function ep(e,t,n,r,i,a,o,s,c,l,u,d){return e=new $f(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=oi(3,null,null,t),e.current=a,a.stateNode=e,t=oa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ra(a),e}function tp(e){return e?(e=ii,e):ii}function np(e,t,n,r,i,a){i=tp(i),r.context===null?r.context=i:r.pendingContext=i,r=U(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ba(e,r,t),n!==null&&(mu(n,e,t),Va(n,e,t))}function rp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ip(e,t){rp(e,t),(e=e.alternate)&&rp(e,t)}function ap(e){if(e.tag===13||e.tag===31){var t=ti(e,67108864);t!==null&&mu(t,e,67108864),ip(e,67108864)}}function op(e){if(e.tag===13||e.tag===31){var t=fu();t=et(t);var n=ti(e,t);n!==null&&mu(n,e,t),ip(e,t)}}var sp=!0;function cp(e,t,n,r){var i=I.T;I.T=null;var a=L.p;try{L.p=2,up(e,t,n,r)}finally{L.p=a,I.T=i}}function lp(e,t,n,r){var i=I.T;I.T=null;var a=L.p;try{L.p=8,up(e,t,n,r)}finally{L.p=a,I.T=i}}function up(e,t,n,r){if(sp){var i=dp(r);if(i===null)Cd(e,t,r,fp,n),Cp(e,r);else if(Tp(i,e,t,n,r))r.stopPropagation();else if(Cp(e,r),t&4&&-1<Sp.indexOf(e)){for(;i!==null;){var a=ht(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Ue(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ie(o);s.entanglements[1]|=c,o&=~c}nd(a),!(J&6)&&(eu=we()+500,rd(0,!1))}}break;case 31:case 13:s=ti(a,2),s!==null&&mu(s,a,2),yu(),ip(a,2)}if(a=dp(r),a===null&&Cd(e,t,r,fp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Cd(e,t,r,null,n)}}function dp(e){return e=en(e),pp(e)}var fp=null;function pp(e){if(fp=null,e=mt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return fp=e,null}function mp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Te()){case Ee:return 2;case De:return 8;case Oe:case ke:return 32;case Ae:return 268435456;default:return 32}default:return 32}}var hp=!1,gp=null,_p=null,vp=null,yp=new Map,bp=new Map,xp=[],Sp=`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`.split(` `);function Cp(e,t){switch(e){case`focusin`:case`focusout`:gp=null;break;case`dragenter`:case`dragleave`:_p=null;break;case`mouseover`:case`mouseout`:vp=null;break;case`pointerover`:case`pointerout`:yp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:bp.delete(t.pointerId)}}function wp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=ht(t),t!==null&&ap(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Tp(e,t,n,r,i){switch(t){case`focusin`:return gp=wp(gp,e,t,n,r,i),!0;case`dragenter`:return _p=wp(_p,e,t,n,r,i),!0;case`mouseover`:return vp=wp(vp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return yp.set(a,wp(yp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,bp.set(a,wp(bp.get(a)||null,e,t,n,r,i)),!0}return!1}function Ep(e){var t=mt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,rt(e.priority,function(){op(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,rt(e.priority,function(){op(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Dp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=dp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);$t=r,n.target.dispatchEvent(r),$t=null}else return t=ht(n),t!==null&&ap(t),e.blockedOn=n,!1;t.shift()}return!0}function Op(e,t,n){Dp(e)&&n.delete(t)}function kp(){hp=!1,gp!==null&&Dp(gp)&&(gp=null),_p!==null&&Dp(_p)&&(_p=null),vp!==null&&Dp(vp)&&(vp=null),yp.forEach(Op),bp.forEach(Op)}function Ap(e,n){e.blockedOn===n&&(e.blockedOn=null,hp||(hp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,kp)))}var jp=null;function Mp(e){jp!==e&&(jp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){jp===e&&(jp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(pp(r||n)===null)continue;break}var a=ht(n);a!==null&&(e.splice(t,3),t-=3,Ss(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Np(e){function t(t){return Ap(t,e)}gp!==null&&Ap(gp,e),_p!==null&&Ap(_p,e),vp!==null&&Ap(vp,e),yp.forEach(t),bp.forEach(t);for(var n=0;n<xp.length;n++){var r=xp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<xp.length&&(n=xp[0],n.blockedOn===null);)Ep(n),n.blockedOn===null&&xp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[ot]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[ot]||null)s=o.formAction;else if(pp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Mp(n)}}}function Pp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Fp(e){this._internalRoot=e}Ip.prototype.render=Fp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;np(n,fu(),e,t,null,null)},Ip.prototype.unmount=Fp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;np(e.current,2,null,e,null,null),yu(),t[st]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=nt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<xp.length&&t!==0&&t<xp[n].priority;n++);xp.splice(n,0,e),n===0&&Ep(e)}};var Lp=n.version;if(Lp!==`19.2.7`)throw Error(i(527,Lp,`19.2.7`));L.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=d(t),e=e===null?null:p(e),e=e===null?null:e.stateNode,e};var Rp={bundleType:0,version:`19.2.7`,rendererPackageName:`react-dom`,currentDispatcherRef:I,reconcilerVersion:`19.2.7`};
10if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zp.isDisabled&&zp.supportsFiber)try{Ne=zp.inject(Rp),Pe=zp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Us,s=Ws,c=Gs;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=ep(e,1,!1,null,null,n,r,null,o,s,c,Pp),e[st]=t.current,xd(e),new Fp(t)},e.hydrateRoot=function(e,t,n){if(!a(e))throw Error(i(299));var r=!1,o=``,s=Us,c=Ws,l=Gs,u=null;return n!=null&&(!0===n.unstable_strictMode&&(r=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onUncaughtError!==void 0&&(s=n.onUncaughtError),n.onCaughtError!==void 0&&(c=n.onCaughtError),n.onRecoverableError!==void 0&&(l=n.onRecoverableError),n.formState!==void 0&&(u=n.formState)),t=ep(e,1,!0,t,n??null,r,o,u,s,c,l,Pp),t.context=tp(null),n=t.current,r=fu(),r=et(r),o=U(r),o.callback=null,Ba(n,o,r),n=r,t.current.lanes=n,Ye(t,n),nd(t),e[st]=t.current,xd(e),new Ip(t)},e.version=`19.2.7`})),g=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=h()})),_=c(u(),1),v=c(g(),1),y=class e extends Error{static kind=`ClerkError`;clerkError=!0;code;longMessage;docsUrl;cause;get name(){return this.constructor.name}constructor(t){super(new.target.formatMessage(new.target.kind,t.message,t.code,t.docsUrl),{cause:t.cause}),Object.setPrototypeOf(this,e.prototype),this.code=t.code,this.docsUrl=t.docsUrl,this.longMessage=t.longMessage,this.cause=t.cause}toString(){return`[${this.name}]\nMessage:${this.message}`}static formatMessage(e,t,n,r){let i=`Clerk:`,a=new RegExp(i.replace(` `,`\\s*`),`i`);return t=t.replace(a,``),t=`${i} ${t.trim()}\n\n(code="${n}")\n\n`,r&&(t+=`\n\nDocs: ${r}`),t}},b=class e extends y{static kind=`ClerkRuntimeError`;clerkRuntimeError=!0;constructor(t,n){super({...n,message:t}),Object.setPrototypeOf(this,e.prototype)}},x=Object.freeze({InvalidProxyUrlErrorMessage:`The proxyUrl passed to Clerk is invali
10d. The expected value for proxyUrl is an absolute URL or a relative path with a leading '/'. (key={{url}})`,InvalidPublishableKeyErrorMessage:`The publishableKey passed to Clerk is invalid. You can get your Publishable key at https://dashboard.clerk.com/last-active?path=api-keys. (key={{key}})`,MissingPublishableKeyErrorMessage:`Missing publishableKey. You can get your key at https://dashboard.clerk.com/last-active?path=api-keys.`,MissingSecretKeyErrorMessage:`Missing secretKey. You can get your key at https://dashboard.clerk.com/last-active?path=api-keys.`,MissingClerkProvider:`{{source}} can only be used within the <ClerkProvider /> component. Learn more: https://clerk.com/docs/components/clerk-provider`});function S({packageName:e,customMessages:t}){let n=e;function r(e,t){if(!t)return`${n}: ${e}`;let r=e,i=e.matchAll(/{{([a-zA-Z0-9-_]+)}}/g);for(let e of i){let n=(t[e[1]]||``).toString();r=r.replace(`{{${e[1]}}}`,n)}return`${n}: ${r}`}let i={...x,...t};return{setPackageName({packageName:e}){return typeof e==`string`&&(n=e),this},setMessages({customMessages:e}){return Object.assign(i,e||{}),this},throwInvalidPublishableKeyError(e){throw Error(r(i.InvalidPublishableKeyErrorMessage,e))},throwInvalidProxyUrl(e){throw Error(r(i.InvalidProxyUrlErrorMessage,e))},throwMissingPublishableKeyError(){throw Error(r(i.MissingPublishableKeyErrorMessage))},throwMissingSecretKeyError(){throw Error(r(i.MissingSecretKeyErrorMessage))},throwMissingClerkProviderError(e){throw Error(r(i.MissingClerkProvider,e))},throw(e){throw Error(r(e))}}}var C={strict_mfa:{afterMinutes:10,level:`multi_factor`},strict:{afterMinutes:10,level:`second_factor`},moderate:{afterMinutes:60,level:`second_factor`},lax:{afterMinutes:1440,level:`second_factor`}},w=new Set([`first_factor`,`second_factor`,`multi_factor`]),T=new Set([`strict_mfa`,`strict`,`moderate`,`lax`]),E=new Set([`o`,`org`,`organization`]),D=new Set([`u`,`user`]),O=e=>typeof e==`number`&&e>0,k=e=>w.has(e),A=e=>T.has(e),j=e=>typeof e==`number`&&Number.isFinite(e)&&(e===-1||e>=0),M=e=>e.replace(/^(org:)*/,`org:`),N=(e,t)=>{let{orgId:n,orgRole:r,orgPermissions:i}=t,a=e.role!==void 0,o=e.permission!==void 0;return!a&&!o?`skip`:a&&typeof e.role!=`string`||o&&typeof e.permission!=`string`||!n||a&&(typeof r!=`string`||!r||M(r)!==M(e.role))||o&&(!Array.isArray(i)||!i.includes(M(e.permission)))?`fail`:`pass`},P=(e,t)=>{let{org:n,user:r}=I(e),[i,a]=t.split(`:`),o=a!==void 0,s=i,c=a||i;if(o&&!E.has(s)&&!D.has(s))throw Error(`Invalid scope: ${s}`);if(o){if(E.has(s))return n.includes(c);if(D.has(s))return r.includes(c)}return[...n,...r].includes(c)},F=(e,t)=>{let{features:n,plans:r}=t,i=e.feature!==void 0,a=e.plan!==void 0;if(!i&&!a)return`skip`;if(i&&typeof e.feature!=`string`||a&&typeof e.plan!=`string`)return`fail`;if(i){if(typeof n!=`string`||!n)return`fail`;try{if(!P(n,e.feature))return`fail`}catch{return`fail`}}if(a){if(typeof r!=`string`||!r)return`fail`;try{if(!P(r,e.plan))return`fail`}catch{return`fail`}}return`pass`},I=e=>{let t=[],n=[];if(!e)return{org:t,user:n};let r=e.split(`,`);for(let e=0;e<r.length;e++){let i=r[e].trim(),a=i.indexOf(`:`);if(a===-1)throw Error(`Invalid claim element (missing colon): ${i}`);let o=i.slice(0,a),s=i.slice(a+1);o===`o`?t.push(s):o===`u`?n.push(s):(o===`ou`||o===`uo`)&&(t.push(s),n.push(s))}return{org:t,user:n}},L=e=>{if(!e)return!1;let t=e=>typeof e==`string`?C[e]:e,n=typeof e==`string`&&A(e),r=typeof e==`object`&&k(e.level)&&O(e.afterMinutes);return n||r?t.bind(null,e):!1},ee=(e,{factorVerificationAge:t})=>{if(e.reverification===void 0)return`skip`;if(!t||!Array.isArray(t)||t.length!==2||!j(t[0])||!j(t[1]))return`fail`;let n=L(e.reverification);if(!n)return`fail`;let{level:r,afterMinutes:i}=n(),[a,o]=t;if(a===-1&&o===-1)return`fail`;let s=a!==-1&&i>a,c=o!==-1&&i>o;switch(r){case`first_factor`:return s?`pass`:`fail`;case`second_factor`:return o===-1?s?`pass`:`fail`:c?`pass`:`fail`;case`multi_factor`:return o===-1?s?`pass`:`fail`:a===-1?`fail`:s&&c?`pass`:`fail`}},te=e=>e.some(e=>e===`pass`)&&e.every(e=>e===`pass`||e===`skip`),ne=e=>t=>e.userId?te([N(t,e),F(t,e),ee(t,e)]):!1,re=({authObject:{sessionId:e,sessionStatus:t,userId:n,actor:r,orgId:i,orgRole:a,orgSlug:o,signOut:s,getToken:c,has:l,sessionClaims:u},options:{treatPendingAsSignedOut:d=!0}})=>{if(e===void 0&&n===void 0)return{actor:void 0,getToken:c,has:()=>!1,isLoaded:!1,isSignedIn:void 0,orgId:void 0,orgRole:void 0,orgSlug:void 0,sessionClaims:void 0,sessionId:e,signOut:s,userId:n};if(e===null&&n===null)return{actor:null,getToken:c,has:()=>!1,isLoaded:!0,isSignedIn:!1,orgId:null,orgRole:null,orgSlug:null,sessionClaims:null,
10sessionId:e,signOut:s,userId:n};if(d&&t===`pending`)return{actor:null,getToken:c,has:()=>!1,isLoaded:!0,isSignedIn:!1,orgId:null,orgRole:null,orgSlug:null,sessionClaims:null,sessionId:null,signOut:s,userId:null};if(e&&u&&n&&i&&a)return{actor:r||null,getToken:c,has:l,isLoaded:!0,isSignedIn:!0,orgId:i,orgRole:a,orgSlug:o||null,sessionClaims:u,sessionId:e,signOut:s,userId:n};if(e&&u&&n&&!i)return{actor:r||null,getToken:c,has:l,isLoaded:!0,isSignedIn:!0,orgId:null,orgRole:null,orgSlug:null,sessionClaims:u,sessionId:e,signOut:s,userId:n}},R=(e,t,n)=>!e&&n?z(n):ie(t),z=e=>{let t=e.userId,n=e.user,r=e.sessionId,i=e.sessionStatus,a=e.sessionClaims;return{userId:t,user:n,sessionId:r,session:e.session,sessionStatus:i,sessionClaims:a,organization:e.organization,orgId:e.orgId,orgRole:e.orgRole,orgPermissions:e.orgPermissions,orgSlug:e.orgSlug,actor:e.actor,factorVerificationAge:e.factorVerificationAge}},ie=e=>{let t=e.user?e.user.id:e.user,n=e.user,r=e.session?e.session.id:e.session,i=e.session,a=e.session?.status,o=e.session?e.session.lastActiveToken?.jwt?.claims:null,s=e.session?e.session.factorVerificationAge:null,c=i?.actor,l=e.organization,u=e.organization?e.organization.id:e.organization,d=l?.slug,f=l&&n?.organizationMemberships?.find(e=>e.organization.id===u),p=f&&f.permissions;return{userId:t,user:n,sessionId:r,session:i,sessionStatus:a,sessionClaims:o,organization:l,orgId:u,orgRole:f&&f.role,orgSlug:d,orgPermissions:p,actor:c,factorVerificationAge:s}},ae=[`.lcl.dev`,`.stg.dev`,`.lclstage.dev`,`.stgstage.dev`,`.dev.lclclerk.com`,`.stg.lclclerk.com`,`.accounts.lclclerk.com`,`accountsstage.dev`,`accounts.dev`],oe=e=>typeof atob<`u`&&typeof atob==`function`?atob(e):globalThis.Buffer===void 0?e:globalThis.Buffer.from(e,`base64`).toString(),se=`pk_live_`,ce=`pk_test_`;function le(e){if(!e.endsWith(`$`))return!1;let t=e.slice(0,-1);return!t.includes(`$`)&&t.includes(`.`)}function ue(e,t={}){if(e||=``,!e||!de(e)){if(t.fatal&&!e)throw Error(`Publishable key is missing. Ensure that your publishable key is correctly configured. Double-check your environment configuration for your keys, or access them here: https://dashboard.clerk.com/last-active?path=api-keys`);if(t.fatal&&!de(e))throw Error(`Publishable key not valid.`);return null}let n=e.startsWith(se)?`production`:`development`,r;try{r=oe(e.split(`_`)[2])}catch{if(t.fatal)throw Error(`Publishable key not valid: Failed to decode key.`);return null}if(!le(r)){if(t.fatal)throw Error(`Publishable key not valid: Decoded key has invalid format.`);return null}let i=r.slice(0,-1);return t.proxyUrl?i=t.proxyUrl:n!==`development`&&t.domain&&t.isSatellite&&(i=`clerk.${t.domain}`),{instanceType:n,frontendApi:i}}function de(e=``){try{if(!(e.startsWith(se)||e.startsWith(ce)))return!1;let t=e.split(`_`);if(t.length!==3)return!1;let n=t[2];return n?le(oe(n)):!1}catch{return!1}}function fe(){let e=new Map;return{isDevOrStagingUrl:t=>{if(!t)return!1;let n=typeof t==`string`?t:t.hostname,r=e.get(n);return r===void 0&&(r=ae.some(e=>n.endsWith(e)),e.set(n,r)),r}}}var pe=e=>!!e?.cloudflare?.env,me=e=>!!e?.env,he=(e,t)=>{if(typeof process<`u`&&typeof{}[e]==`string`)return{}[e];if(typeof{BASE_URL:`/`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_API_BASE_URL:``,VITE_CLERK_PUBLISHABLE_KEY:`pk_live_Y2xlcmsudGhlaW1tZXJzaW9uYXBwLmNvbSQ`}[e]==`string`)return{BASE_URL:`/`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_API_BASE_URL:``,VITE_CLERK_PUBLISHABLE_KEY:`pk_live_Y2xlcmsudGhlaW1tZXJzaW9uYXBwLmNvbSQ`}[e];if(pe(t))return t.cloudflare.env[e]||``;if(me(t))return t.env[e]||``;if(t&&typeof t[e]==`string`)return t[e];try{return globalThis[e]}catch{}return``},ge=()=>{try{return!1}catch{}return!1},_e=()=>{try{return!1}catch{}return!1},ve=()=>{try{return!0}catch{}return!1},ye=`METHOD_CALLED`,be=.1;function xe(e,t){return{event:ye,eventSamplingRate:be,payload:{method:e,...t}}}var Se=`ClerkJS:`;function Ce(){throw Error(`${Se} Clerk instance not found. Make sure Clerk is initialized before using any Clerk components.`)}var we=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Te=new class extends we{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();
10this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},Ee={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},De=new class{#e=Ee;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function Oe(e){setTimeout(e,0)}var ke=typeof window>`u`||`Deno`in globalThis;function Ae(){}function je(e,t){return typeof e==`function`?e(t):e}function Me(e){return typeof e==`number`&&e>=0&&e!==1/0}function Ne(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Pe(e,t){return typeof e==`function`?e(t):e}function Fe(e,t){return typeof e==`function`?e(t):e}function Ie(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==Re(o,t.options))return!1}else if(!Be(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function Le(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(ze(t.options.mutationKey)!==ze(a))return!1}else if(!Be(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Re(e,t){return(t?.queryKeyHashFn||ze)(e)}function ze(e){return JSON.stringify(e,(e,t)=>Ge(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function Be(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(Array.isArray(e)&&Array.isArray(t)){for(let n=0;n<t.length;n++)if(!Be(e[n],t[n]))return!1;return!0}let n=Object.keys(t);for(let r of n)if(!Be(e[r],t[r]))return!1;return!0}return!1}var Ve=Object.prototype.hasOwnProperty;function He(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=We(e)&&We(t);if(!r&&!(Ge(e)&&Ge(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:Ve.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=He(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function Ue(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function We(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ge(e){if(!Ke(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!Ke(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function Ke(e){return Object.prototype.toString.call(e)===`[object Object]`}function qe(e){return new Promise(t=>{De.setTimeout(t,e)})}function Je(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:He(e,t)}function Ye(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function Xe(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Ze=Symbol();function Qe(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Ze?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function $e(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var et=(()=>{let e=()=>ke;return{isServer(){return e()},setIsServer(t){e=t}}})();function tt(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}var nt=Oe;function rt(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=nt,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var it=rt(),at=new class extends we{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}
10setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function ot(e){return Math.min(1e3*2**e,3e4)}function st(e){return(e??`online`)!==`online`||at.isOnline()}var ct=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function lt(e){let t=!1,n=0,r,i=tt(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new ct(t);f(n),e.onCancel?.(n)}},s=()=>{t=!0},c=()=>{t=!1},l=()=>Te.isFocused()&&(e.networkMode===`always`||at.isOnline())&&e.canRun(),u=()=>st(e.networkMode)&&e.canRun(),d=e=>{a()||(r?.(),i.resolve(e))},f=e=>{a()||(r?.(),i.reject(e))},p=()=>new Promise(t=>{r=e=>{(a()||l())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),m=()=>{if(a())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(d).catch(r=>{if(a())return;let i=e.retry??(et.isServer()?0:3),o=e.retryDelay??ot,s=typeof o==`function`?o(n,r):o,c=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!c){f(r);return}n++,e.onFail?.(n,r),qe(s).then(()=>l()?void 0:p()).then(()=>{t?f(r):m()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r?.(),i),cancelRetry:s,continueRetry:c,canStart:u,start:()=>(u()?m():p().then(m),i)}}var ut=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Me(this.gcTime)&&(this.#e=De.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(et.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(De.clearTimeout(this.#e),this.#e=void 0)}};function dt(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{$e(e,()=>t.signal,()=>n=!0)},u=Qe(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})(),o=await u(a),{maxPages:s}=t.options,c=i?Xe:Ye;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?pt:ft,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:ft(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function ft(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function pt(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function mt(e,t){return t?ft(e,t)!=null:!1}function ht(e,t){return!t||!e.getPreviousPageParam?!1:pt(e,t)!=null}var gt=class extends ut{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=yt(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=yt(this.options);e.data!==void 0&&(this.setState(vt(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=Je(this.state.data,e,this.options);return this.#l({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#l({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(Ae).catch(Ae):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>Fe(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ze||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdate
10Count>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>Pe(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!Ne(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#a&&(this.#s||this.#c()?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}#c(){return this.state.fetchStatus===`paused`&&this.state.status===`pending`}invalidate(){this.state.isInvalidated||this.#l({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=Qe(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?dt(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#l({type:`fetch`,meta:a.fetchOptions?.meta}),this.#a=lt({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof ct&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#l({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#l({type:`pause`})},onContinue:()=>{this.#l({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#a.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof ct){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#l({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#l(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,..._t(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...vt(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),it.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function _t(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:st(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function vt(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function yt(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdate
10Count:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var bt=class extends we{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=tt(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),St(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ct(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ct(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof Fe(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!Ue(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&wt(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||Fe(this.options.enabled,this.#t)!==Fe(t.enabled,this.#t)||Pe(this.options.staleTime,this.#t)!==Pe(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||Fe(this.options.enabled,this.#t)!==Fe(t.enabled,this.#t)||i!==this.#p)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return Et(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Ae)),t}#g(){this.#b();let e=Pe(this.options.staleTime,this.#t);if(et.isServer()||this.#r.isStale||!Me(e))return;let t=Ne(this.#r.dataUpdatedAt,e)+1;this.#d=De.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!(et.isServer()||Fe(this.options.enabled,this.#t)===!1||!Me(this.#p)||this.#p===0)&&(this.#f=De.setInterval(()=>{(this.options.refetchIntervalInBackground||Te.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d!==void 0&&(De.clearTimeout(this.#d),this.#d=void 0)}#x(){this.#f!==void 0&&(De.clearInterval(this.#f),this.#f=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&St(e,t),o=i&&wt(e,n,t,r);(a||o)&&(l={...l,..._t(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(m=`success`,d=Je(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h)if(i&&d===a?.data&&t.select===this.#c)d=this.#l;else try{this.#c=t.select,d=t.select(d),d=Je(i?.data,d,t),this.#l=d,this.#s=null}catch(e){this.#s=e}this.#s&&(f=this.#s,d=this.#l,p=Date.now(),m=`error`);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0,x={status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdate
10Count:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:Tt(e,t),refetch:this.refetch,promise:this.#o,isEnabled:Fe(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=x.data!==void 0,r=x.status===`error`&&!t,i=e=>{r?e.reject(x.error):t&&e.resolve(x.data)},a=()=>{let e=this.#o=x.promise=tt();i(e)},o=this.#o;switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||x.data!==o.value)&&a();break;case`rejected`:(!r||x.error!==o.reason)&&a();break}}return x}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!Ue(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){it.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function xt(e,t){return Fe(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&Fe(t.retryOnMount,e)===!1)}function St(e,t){return xt(e,t)||e.state.data!==void 0&&Ct(e,t,t.refetchOnMount)}function Ct(e,t,n){if(Fe(t.enabled,e)!==!1&&Pe(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&Tt(e,t)}return!1}function wt(e,t,n,r){return(e!==t||Fe(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Tt(e,n)}function Tt(e,t){return Fe(t.enabled,e)!==!1&&e.isStaleByTime(Pe(t.staleTime,e))}function Et(e,t){return!Ue(e.getCurrentResult(),t)}var Dt=class extends bt{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type=`infinite`,super.setOptions(e)}getOptimisticResult(e){return e._type=`infinite`,super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`forward`}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`backward`}}})}createResult(e,t){let{state:n}=e,r=super.createResult(e,t),{isFetching:i,isRefetching:a,isError:o,isRefetchError:s}=r,c=n.fetchMeta?.fetchMore?.direction,l=o&&c===`forward`,u=i&&c===`forward`,d=o&&c===`backward`,f=i&&c===`backward`;return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:mt(t,n.data),hasPreviousPage:ht(t,n.data),isFetchNextPageError:l,isFetchingNextPage:u,isFetchPreviousPageError:d,isFetchingPreviousPage:f,isRefetchError:s&&!l&&!d,isRefetching:a&&!u&&!f}}},Ot=class extends ut{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||kt(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=lt({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});
10let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),it.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function kt(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var At=class extends we{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new Ot({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=jt(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=jt(e);if(typeof t==`string`){let n=this.#t.get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=jt(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}else return!0}runNext(e){let t=jt(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>
10t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){it.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>Le(t,e))}findAll(e={}){return this.getAll().filter(t=>Le(e,t))}notify(e){it.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return it.batch(()=>Promise.all(e.map(e=>e.continue().catch(Ae))))}};function jt(e){return e.options.scope?.id}var Mt=class extends we{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??Re(r,t),a=this.get(i);return a||(a=new gt({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){it.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>Ie(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>Ie(e,t)):t}notify(e){it.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){it.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){it.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Nt=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new Mt,this.#t=e.mutationCache||new At,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=Te.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=at.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Pe(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=je(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return it.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;it.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return it.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=it.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(Ae).catch(Ae)}invalidateQueries(e,t={}){return it.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=it.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(Ae)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(Ae)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(Pe(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Ae).catch(Ae)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Ae).catch(Ae)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return at.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(ze(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{Be(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(ze(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{Be(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=Re(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===Ze&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Pt=Object.prototype.hasOwnProperty;function Ft(e,t,n){for(n of e.keys())if(It(n,t))return n}function It(e,t){var n,r,i;if(e===t)return!0;
10if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&It(e[r],t[r]););return r===-1}if(n===Set){if(e.size!==t.size)return!1;for(r of e)if(i=r,i&&typeof i==`object`&&(i=Ft(t,i),!i)||!t.has(i))return!1;return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e)if(i=r[0],i&&typeof i==`object`&&(i=Ft(t,i),!i)||!It(r[1],t.get(i)))return!1;return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return r===-1}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return r===-1}if(!n||typeof e==`object`){for(n in r=0,e)if(Pt.call(e,n)&&++r&&!Pt.call(t,n)||!(n in t)||!It(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}function Lt(e,t){if(!e)throw Error(typeof t==`string`?t:`${t.displayName} not found`)}var Rt=(e,t)=>{let{assertCtxFn:n=Lt}=t||{},r=_.createContext(void 0);return r.displayName=e,[r,()=>{let t=_.useContext(r);return n(t,`${e} not found`),t.value},()=>{let e=_.useContext(r);return e?e.value:{}}]},[zt,Bt]=Rt(`ClerkInstanceContext`),[Vt,Ht]=Rt(`InitialStateContext`);function Ut({children:e,initialState:t}){let[n]=(0,_.useState)(t),r=_.useMemo(()=>({value:n}),[n]);return _.createElement(Vt.Provider,{value:r},e)}function Wt(){let e=Ht();if(e instanceof Promise){if(`use`in _.default&&typeof _.use==`function`)return _.use(e);throw Error(`initialState cannot be a promise if React version is less than 19`)}return e}_.createContext({});var[Gt,Kt]=Rt(`CheckoutContext`),qt=({children:e,...t})=>_.createElement(Gt.Provider,{value:{value:t}},e);function Jt(e){if(!_.useContext(zt)){if(typeof e==`function`){e();return}throw Error(`${e} can only be used within the <ClerkProvider /> component.
11
12Possible fixes:
131. Ensure that the <ClerkProvider /> is correctly wrapping your application where this component is used.
142. Check for multiple versions of the \`@clerk/shared\` package in your project. Use a tool like \`npm ls @clerk/shared\` to identify multiple versions, and update your dependencies to only rely on one.
15
16Learn more: https://clerk.com/docs/components/clerk-provider`.trim())}}var Yt={USER_MEMBERSHIPS_KEY:`userMemberships`,USER_INVITATIONS_KEY:`userInvitations`,USER_SUGGESTIONS_KEY:`userSuggestions`,DOMAINS_KEY:`domains`,MEMBERSHIP_REQUESTS_KEY:`membershipRequests`,MEMBERSHIPS_KEY:`memberships`,INVITATIONS_KEY:`invitations`,PLANS_KEY:`billing-plans`,SUBSCRIPTION_KEY:`billing-subscription`,PAYMENT_METHODS_KEY:`billing-payment-methods`,PAYMENT_ATTEMPTS_KEY:`billing-payment-attempts`,STATEMENTS_KEY:`billing-statements`,API_KEYS_KEY:`apiKeys`,ORGANIZATION_CREATION_DEFAULTS_KEY:`organizationCreationDefaults`,OAUTH_CONSENT_INFO_KEY:`oauthConsentInfo`,CREDIT_BALANCE_KEY:`billing-credit-balance`};function Xt(e){return{queryKey:[e.stablePrefix,e.authenticated,e.tracked,e.untracked],invalidationKey:[e.stablePrefix,e.authenticated,e.tracked],stableKey:e.stablePrefix,authenticated:e.authenticated}}function Zt(e){if(e)return function(e){return e}}var Qt,$t=!1;function en(){if(!(typeof window>`u`))return $t||=(Qt=new Nt,!0),Qt}function tn(e){let t=function(){},n;return n=new Proxy(t,{get(t,r){if(r!==`then`)return r===`toString`?()=>`[${e}]`:r===Symbol.toPrimitive?()=>0:n},apply(){return n},construct(){return n},has(){return!1},set(){return!1}}),n}var nn=tn(`ClerkMockQueryClient`),rn=()=>{let e=en();return[e??nn,!!e]};function an(e,t){let[n,r]=rn(),i=r?n.defaultQueryOptions(e):e;i._optimisticResults=`optimistic`;let a=_.useMemo(()=>new t(n,i),[n]),o=a.getOptimisticResult(i),s=e.subscribed!==!1;return _.useSyncExternalStore(_.useCallback(e=>{let t=s?a.subscribe(it.batchCalls(e)):Ae;return a.updateResult(),t},[a,s]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),_.useEffect(()=>{a.setOptions(i)},[i,a]),r?i.notifyOnChangeProps?o:a.trackResult(o):{data:void 0,error:null,isLoading:e.enabled!==!1,isFetching:!1,status:`pending`}}function on(e){return an(e,Dt)}function sn(e){return an(e,bt)}function cn(e){let t=(0,_.useRef)(e),n=(0,_.useRef)(null);return t.current!==e&&(n.current=t.current,t.current=e),n.current}var ln=e=>[e,`${e}-inf`];function un(e){let{isSignedOut:t,stableKeys:n,authenticated:r=!0,onCleanup:i}
16=e,a=(0,_.useRef)(n),[o]=rn(),s=cn(!t);(0,_.useEffect)(()=>{r===!0&&s&&t===!0&&(o.removeQueries({predicate:e=>{let[t,n]=e.queryKey;return n===!0&&typeof t==`string`&&(Array.isArray(a.current)?a.current.includes(t):a.current===t)}}),i?.())},[r,t,s,o])}var dn=(e,t)=>{let n=typeof e==`boolean`&&e,r=(0,_.useRef)(n?t.initialPage:e?.initialPage??t.initialPage),i=(0,_.useRef)(n?t.pageSize:e?.pageSize??t.pageSize),a={};for(let r of Object.keys(t))a[r]=n?t[r]:e?.[r]??t[r];return{...a,initialPage:r.current,pageSize:i.current}};function fn(e,t){return(e-1)*t}function pn(e,t,n){return Math.ceil((e-t)/n)}function mn(e,t,n,r){return e-t>n*r}function hn(e,t,n){return(e-1)*t>n}var gn=e=>{let{fetcher:t,config:n,keys:r}=e,[i,a]=(0,_.useState)(n.initialPage??1),o=(0,_.useRef)(n.initialPage??1),s=(0,_.useRef)(n.pageSize??10),c=n.enabled??!0,l=n.isSignedIn,u=n.infinite??!1,d=n.__experimental_mode===`cache`,f=n.keepPreviousData??!1,[p]=rn(),m=c&&!!t&&!d&&l!==!1,[h,g]=(0,_.useState)(0),v=(0,_.useCallback)(e=>{g(e)},[]),y=(0,_.useMemo)(()=>{let[e,t,n,a]=r.queryKey;return[e,t,n,{...a,args:{...a.args,initialPage:i,pageSize:s.current}}]},[r.queryKey,i]),b=sn({queryKey:y,queryFn:({queryKey:e})=>{let{args:n}=e[3];if(t)return t(n)},staleTime:6e4,enabled:m&&!u,placeholderData:Zt(f)}),x=(0,_.useMemo)(()=>{let[e,t,n,i]=r.queryKey;return[e+`-inf`,t,n,i]},[r.queryKey]),S=on({queryKey:x,initialPageParam:n.initialPage??1,getNextPageParam:(e,t,r)=>{let i=e?.total_count??0;return(t.length+(n.initialPage?n.initialPage-1:0))*(n.pageSize??10)<i?r+1:void 0},queryFn:({pageParam:e,queryKey:n})=>{let{args:r}=n[3];if(t)return t({...r,initialPage:e,pageSize:s.current})},staleTime:6e4,enabled:m&&u});un({isSignedOut:l===!1,authenticated:r.authenticated,stableKeys:ln(r.stableKey),onCleanup:()=>{a(o.current),Promise.resolve().then(()=>v(e=>e+1))}});let{data:C,count:w,page:T}=(0,_.useMemo)(()=>{if(u){let e=p.getQueryData(x),t=m?S.data?.pages??e?.pages??[]:e?.pages??[],n=Array.isArray(t)?t.filter(Boolean):[];return{data:n.map(e=>e?.data).flat().filter(Boolean)??[],count:n[n.length-1]?.total_count??0,page:n.length>0?n.length:o.current}}let e=m?b.data??p.getQueryData(y):p.getQueryData(y);return{data:Array.isArray(e?.data)?e.data:[],count:typeof e?.total_count==`number`?e.total_count:0,page:i}},[m,h,u,S.data?.pages,b.data,p,x,y,i]),E=(0,_.useCallback)(e=>{if(u){let t=typeof e==`function`?e(T):e,n=Math.max(0,t),r=p.getQueryData(x);n-(S.data?.pages??r?.pages??[]).length>0&&S.fetchNextPage({cancelRefetch:!1});return}return a(e)},[S,T,u,p,x]),D=u?S.isLoading:b.isLoading,O=u?S.isFetching:b.isFetching,k=(u?S.error:b.error)??null,A=!!k,j=(0,_.useCallback)(()=>{if(u){S.fetchNextPage({cancelRefetch:!1});return}a(e=>Math.max(0,e+1))},[S,u]),M=(0,_.useCallback)(()=>{u||a(e=>Math.max(0,e-1))},[u]),N=fn(o.current,s.current);return{data:C,count:w,error:k,isLoading:D,isFetching:O,isError:A,page:T,pageCount:pn(w,N,s.current),fetchPage:E,fetchNext:j,fetchPrevious:M,hasNextPage:u?!!S.hasNextPage:mn(w,N,T,s.current),hasPreviousPage:u?!!S.hasPreviousPage:hn(T,s.current,N),revalidate:async()=>{await p.invalidateQueries({queryKey:r.invalidationKey});let[e,...t]=r.invalidationKey;return p.invalidateQueries({queryKey:[e+`-inf`,...t]})},setData:e=>u?(p.setQueryData(x,(t={})=>{let n=Array.isArray(t?.pages)?t.pages:[],r=typeof e==`function`?e(n):e;return{...t,pages:r}}),v(e=>e+1),Promise.resolve()):(p.setQueryData(y,(t={data:[],total_count:0})=>typeof e==`function`?e(t):e),v(e=>e+1),Promise.resolve())}};function _n(){let e=Bt(),t=Wt(),n=(0,_.useCallback)(()=>t?.user,[t?.user]);return(0,_.useSyncExternalStore)((0,_.useCallback)(t=>e.addListener(t,{skipInitialEmit:!0}),[e]),(0,_.useCallback)(()=>!e.loaded||!e.__internal_lastEmittedResources?n():e.__internal_lastEmittedResources.user,[e,n]),n)}function vn(){let e=Bt(),t=Wt(),n=(0,_.useCallback)(()=>t?.organization,[t?.organization]);return(0,_.useSyncExternalStore)((0,_.useCallback)(t=>e.addListener(t,{skipInitialEmit:!0}),[e]),(0,_.useCallback)(()=>!e.loaded||!e.__internal_lastEmittedResources?n():e.__internal_lastEmittedResources.organization,[e,n]),n)}typeof window<`u`?_.useLayoutEffect:_.useEffect;var yn=It;function bn(e){let t=Bt(),n=e?.enabled??!0,r=t.__internal_environment,i=_n(),a=vn(),o=r?.commerceSettings.billing.user.enabled,s=r?.commerceSettings.billing.organization.enabled,c=e?.for===`organization`?s:e?.for===`user`?o:o||s,l=e?.for===`organization`,u=e?.authenticated??!0?(!l||!!a?.id)&&!!i?.id:!0;return c&&n&&t.loaded&&u}function xn({hookName:e,resourceType:t,useFetcher:n,options:r}){return function(i){let{for:a,enabled:o,...s}=i||{},c=a||`user`;Jt(e);let l=n(c),u=dn(s,{initialPage:1,pageSize:10,keepPreviousData:!1,infinite:!1,__experimental_mode:void 0}),d=Bt(),f=_n(),p=vn();d.telemetry?.record(xe(e));let m=c===`organization`,h=bn({for:c,enabled:o,authenticated:!r?.unauthenticated}),g=s===void 0?void 0:{initialPage:u.initialPage,pageSize:u.pageSize,...r?.unauthenticated?{}:m?{orgId:p?.id}:{}},_=!!g&&d.loaded&&!!h;return gn({fetcher:l,config:{keepPreviousData:u.keepPreviousData,infinite:u.infinite,enabled:_,...r?.unauthenticated?{}:{isSignedIn:f!==null},__experimental_mode:u.__experimental_mode,initialPage:u.initialPage,pageSize:u.pageSize},keys:Xt({stablePrefix:t,authenticated:!r?.unauthenticated,tracked:r?.unauthenticated?{for:c}:{userId:f?.id,...m?{orgId:p?.id}:{}},untracked:{args:g}})})}}
16xn({hookName:`useStatements`,resourceType:Yt.STATEMENTS_KEY,useFetcher:()=>{let e=Bt();if(e.loaded)return e.billing.getStatements}}),xn({hookName:`usePaymentAttempts`,resourceType:Yt.PAYMENT_ATTEMPTS_KEY,useFetcher:()=>{let e=Bt();if(e.loaded)return e.billing.getPaymentAttempts}}),xn({hookName:`usePaymentMethods`,resourceType:Yt.PAYMENT_METHODS_KEY,useFetcher:e=>{let t=vn(),n=_n();return e===`organization`?t?.getPaymentMethods:n?.getPaymentMethods}}),xn({hookName:`usePlans`,resourceType:Yt.PLANS_KEY,useFetcher:e=>{let t=Bt();if(t.loaded)return n=>t.billing.getPlans({...n,for:e})},options:{unauthenticated:!0}});function Sn(e){e||Ce()}function Cn(e){let t=e.clerk;if(Sn(t),e.initialState instanceof Promise&&!(`use`in _.default&&typeof _.use==`function`))throw Error(`initialState cannot be a promise if React version is less than 19`);let n=_.useMemo(()=>({value:t}),[e.clerkStatus]);return _.createElement(Ut,{initialState:e.initialState},_.createElement(zt.Provider,{value:n},_.createElement(qt,{value:void 0},e.children)))}var wn=e=>{let t=(0,_.useRef)(e);return(0,_.useEffect)(()=>{t.current=e},[e]),t.current},Tn=(e,t,n)=>{let r=!!n,i=(0,_.useRef)(n);(0,_.useEffect)(()=>{i.current=n},[n]),(0,_.useEffect)(()=>{if(!r||!e)return()=>{};let n=(...e)=>{i.current&&i.current(...e)};return e.on(t,n),()=>{e.off(t,n)}},[r,t,e,i])},En=_.createContext(null);En.displayName=`ElementsContext`;var Dn=(e,t)=>{if(!e)throw Error(`Could not find Elements context; You need to wrap the part of your app that ${t} in an <Elements> provider.`);return e},On=e=>typeof e==`object`&&!!e,kn=(e,t,n)=>On(e)?Object.keys(e).reduce((r,i)=>{let a=!On(t)||!jn(e[i],t[i]);return n.includes(i)?(a&&console.warn(`Unsupported prop change: options.${i} is not a mutable property.`),r):a?{...r||{},[i]:e[i]}:r},null):null,An=`[object Object]`,jn=(e,t)=>{if(!On(e)||!On(t))return e===t;let n=Array.isArray(e);if(n!==Array.isArray(t))return!1;let r=Object.prototype.toString.call(e)===An;if(r!==(Object.prototype.toString.call(t)===An))return!1;if(!r&&!n)return e===t;let i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;let o={};for(let e=0;e<i.length;e+=1)o[i[e]]=!0;for(let e=0;e<a.length;e+=1)o[a[e]]=!0;let s=Object.keys(o);if(s.length!==i.length)return!1;let c=e,l=t;return s.every(e=>jn(c[e],l[e]))},Mn=e=>Dn(_.useContext(En),e),Nn=e=>e.charAt(0).toUpperCase()+e.slice(1);((e,t)=>{let n=`${Nn(e)}Element`,r=t?e=>{Mn(`mounts <${n}>`);let{id:t,className:r}=e;return _.createElement(`div`,{id:t,className:r})}:({id:t,className:r,fallback:i,options:a={},onBlur:o,onFocus:s,onReady:c,onChange:l,onEscape:u,onClick:d,onLoadError:f,onLoaderStart:p,onNetworksChange:m,onConfirm:h,onCancel:g,onShippingAddressChange:v,onShippingRateChange:y})=>{let b=Mn(`mounts <${n}>`),x=`elements`in b?b.elements:null,[S,C]=_.useState(null),w=_.useRef(null),T=_.useRef(null),[E,D]=(0,_.useState)(!1);Tn(S,`blur`,o),Tn(S,`focus`,s),Tn(S,`escape`,u),Tn(S,`click`,d),Tn(S,`loaderror`,f),Tn(S,`loaderstart`,p),Tn(S,`networkschange`,m),Tn(S,`confirm`,h),Tn(S,`cancel`,g),Tn(S,`shippingaddresschange`,v),Tn(S,`shippingratechange`,y),Tn(S,`change`,l);let O;c&&(O=()=>{D(!0),c(S)}),Tn(S,`ready`,O),_.useLayoutEffect(()=>{if(w.current===null&&T.current!==null&&x){let t=null;x&&(t=x.create(e,a)),w.current=t,C(t),t&&t.mount(T.current)}},[x,a]);let k=wn(a);return _.useEffect(()=>{if(!w.current)return;let e=kn(a,k,[`paymentRequest`]);e&&`update`in w.current&&w.current.update(e)},[a,k]),_.useLayoutEffect(()=>()=>{if(w.current&&typeof w.current.destroy==`function`)try{w.current.destroy(),w.current=null}catch{}},[]),_.createElement(_.Fragment,null,!E&&i,_.createElement(`div`,{id:t,style:{height:E?`unset`:`0px`,visibility:E?`visible`:`hidden`},className:r,ref:T}))};return r.displayName=n,r.__elementType=e,r})(`payment`,typeof window>`u`);var[Pn,Fn]=Rt(`PaymentElementContext`),[In,Ln]=Rt(`StripeUtilsContext`),[Rn,,zn]=Rt(`PortalProvider`),Bn=({children:e,getContainer:t})=>{let n=_.useMemo(()=>({value:{getContainer:t}}),[t]);return _.createElement(Rn.Provider,{value:n},e)};Bn.displayName=`UNSAFE_PortalProvider`;var Vn=()=>{let e=zn();return e&&`getContainer`in e&&e.getContainer?e.getContainer:()=>null},Hn=S({packageName:`@clerk/react`});function Un(e){Hn.setMessages(e).setPackageName(e)}var Wn=Bt,Gn=e=>{Jt(()=>{Hn.throwMissingClerkProviderError({source:e})})};function Kn(e,t,n){if(typeof e==`function`)return e(t);if(e!==void 0)return e;if(n!==void 0)return n}var qn=e=>{ge()&&console.error(`Clerk: ${e}`)},Jn=c(m(),1),Yn=(e,...t)=>{let n={...e};for(let e of t)delete n[e];return n};function Xn(){return typeof window<`u`}new RegExp(`bot.spider.crawl.APIs-Google.AdsBot.Googlebot.mediapartners.Google Favicon.FeedFetcher.Google-Read-Aloud.DuplexWeb-Google.googleweblight.bing.yandex.baidu.duckduck.yahoo.ecosia.ia_archiver.facebook.instagram.pinterest.reddit.slack.twitter.whatsapp.youtube.semrush`.split(`.`).join(`|`),`i`);var Zn=`You've added multiple <ClerkProvider> components in your React component tree. Wrap your components in a single <ClerkProvider>.`,Qn=e=>`You've passed multiple children components to <${e}/>. You can only pass a single child component or text.`,$n=`Invalid state. Feel free to submit a bug or reach out to supp
16ort here: https://clerk.com/contact/support`,er=`Unsupported usage of isSatellite, domain or proxyUrl. The usage of isSatellite, domain or proxyUrl as function is not supported in non-browser environments.`,tr="<UserProfile.Page /> component needs to be a direct child of `<UserProfile />` or `<UserButton />`.",nr="<UserProfile.Link /> component needs to be a direct child of `<UserProfile />` or `<UserButton />`.",rr="<OrganizationProfile.Page /> component needs to be a direct child of `<OrganizationProfile />` or `<OrganizationSwitcher />`.",ir="<OrganizationProfile.Link /> component needs to be a direct child of `<OrganizationProfile />` or `<OrganizationSwitcher />`.",ar=e=>`<${e} /> can only accept <${e}.Page /> and <${e}.Link /> as its children. Any other provided component will be ignored. Additionally, please ensure that the component is rendered in a client component.`,or=e=>`Missing props. <${e}.Page /> component requires the following props: url, label, labelIcon, alongside with children to be rendered inside the page.`,sr=e=>`Missing props. <${e}.Link /> component requires the following props: url, label and labelIcon.`,cr=`<UserButton /> can only accept <UserButton.UserProfilePage />, <UserButton.UserProfileLink /> and <UserButton.MenuItems /> as its children. Any other provided component will be ignored. Additionally, please ensure that the component is rendered in a client component.`,lr=`<UserButton.MenuItems /> component can only accept <UserButton.Action /> and <UserButton.Link /> as its children. Any other provided component will be ignored. Additionally, please ensure that the component is rendered in a client component.`,ur="<UserButton.MenuItems /> component needs to be a direct child of `<UserButton />`.",dr="<UserButton.Action /> component needs to be a direct child of `<UserButton.MenuItems />`.",fr="<UserButton.Link /> component needs to be a direct child of `<UserButton.MenuItems />`.",pr=`Missing props. <UserButton.Link /> component requires the following props: href, label and labelIcon.`,mr=`Missing props. <UserButton.Action /> component requires the following props: label.`,hr=e=>t=>{try{return _.Children.only(e)}catch{let n=_.Children.toArray(e);return n.length===1&&_.isValidElement(n[0])?n[0]:Hn.throw(Qn(t))}},gr=(e,t)=>(e||=t,typeof e==`string`&&(e=_.createElement(`button`,null,e)),e),_r=e=>(...t)=>{if(e&&typeof e==`function`)return e(...t)},vr=e=>he(`VITE_${e}`)||he(e),yr=(e,t)=>
16e===void 0?vr(t)||void 0:e,br=e=>{let t=yr(e.publishableKey,`CLERK_PUBLISHABLE_KEY`);return{...e,...t!==void 0&&{publishableKey:t}}};function xr(e){return typeof e==`function`}var Sr=new Map;function Cr(e,t,n=1){_.useEffect(()=>{let r=Sr.get(e)||0;return r==n?Hn.throw(t):(Sr.set(e,r+1),()=>{Sr.set(e,(Sr.get(e)||1)-1)})},[])}function wr(e,t,n){let r=e.displayName||e.name||t||`Component`,i=r=>(Cr(t,n),_.createElement(e,r));return i.displayName=`withMaxAllowedInstancesGuard(${r})`,i}var Tr=e=>{let[t,n]=(0,_.useState)(new Map),r=(0,_.useRef)(t),i=(0,_.useRef)(new Map),a=(0,_.useRef)(new Map);r.current=t,i.current=new Map(e.map(e=>[e.id,e.component]));let o=new Set(e.map(e=>e.id));return a.current.forEach((e,t)=>{o.has(t)||a.current.delete(t)}),e.map(e=>{let t=e.id,o=a.current.get(t);if(o)return o;let s={id:e.id,mount:e=>n(n=>new Map(n).set(t,e)),unmount:()=>n(e=>{let n=new Map(e);return n.set(t,null),n}),portal:()=>{let e=r.current.get(t),n=i.current.get(t);return e?(0,Jn.createPortal)(n,e):null}};return a.current.set(t,s),s})},Er=(e,t)=>
16!!e&&_.isValidElement(e)&&e?.type===t,Dr=(e,t)=>Ar({children:e,reorderItemsLabels:[`account`,`security`,`billing`,`apiKeys`],LinkComponent:Yr,PageComponent:Jr,MenuItemsComponent:$r,componentName:`UserProfile`},t),Or=(e,t)=>Ar({children:e,reorderItemsLabels:[`general`,`members`,`billing`,`apiKeys`],LinkComponent:ai,PageComponent:ii,componentName:`OrganizationProfile`},t),kr=e=>{let t=[],n=[ai,ii,$r,Jr,Yr];return _.Children.forEach(e,e=>{n.some(t=>Er(e,t))||t.push(e)}),t},Ar=(e,t)=>{let{children:n,LinkComponent:r,PageComponent:i,MenuItemsComponent:a,reorderItemsLabels:o,componentName:s}=e,{allowForAnyChildren:c=!1}=t||{},l=[],u=new Map;_.Children.forEach(n,e=>{if(!Er(e,i)&&!Er(e,r)&&!Er(e,a)){e&&!c&&qn(ar(s));return}let{props:t}=e,{children:n,label:d,url:f,labelIcon:p}=t,m=e.key;if(Er(e,i))if(Mr(t,o))l.push({label:d});else if(Nr(t))l.push({label:d,labelIcon:p,children:n,url:f,portalId:jr(`page`,t,m,u)});else{qn(or(s));return}if(Er(e,r))if(Pr(t))l.push({label:d,labelIcon:p,url:f,portalId:jr(`link`,t,m,u)});else{qn(sr(s));return}});let d=[],f=[],p=[];l.forEach((e,t)=>{if(Nr(e)){d.push({component:e.children,id:e.portalId||t}),f.push({component:e.labelIcon,id:e.portalId||t});return}Pr(e)&&p.push({component:e.labelIcon,id:e.portalId||t})});let m=Tr(d),h=Tr(f),g=Tr(p),v=[],y=[];return l.forEach((e,t)=>{if(Mr(e,o)){v.push({label:e.label});return}if(Nr(e)){let{portal:n,mount:r,unmount:i}=m.find(n=>n.id===(e.portalId||t)),{portal:a,mount:o,unmount:s}=h.find(n=>n.id===(e.portalId||t));v.push({label:e.label,url:e.url,mount:r,unmount:i,mountIcon:o,unmountIcon:s}),y.push({key:`content:${e.portalId||t}`,portal:n}),y.push({key:`label:${e.portalId||t}`,portal:a});return}if(Pr(e)){let{portal:n,mount:r,unmount:i}=g.find(n=>n.id===(e.portalId||t));v.push({label:e.label,url:e.url,mountIcon:r,unmountIcon:i}),y.push({key:`label:${e.portalId||t}`,portal:n});return}}),{customPages:v,customPagesPortals:y}},jr=(e,t,n,r)=>{if(n!=null)return`${e}:key:${n}`;let i=`${e}:${t.label}:${t.url}`,a=r.get(i)??0;return r.set(i,a+1),`${i}:${a}`},Mr=(e,t)=>{let{children:n,label:r,url:i,labelIcon:a}=e;return!n&&!i&&!a&&t.some(e=>e===r)},Nr=e=>{let{children:t,label:n,url:r,labelIcon:i}=e;return!!t&&!!r&&!!i&&!!n},Pr=e=>{let{children:t,label:n,url:r,labelIcon:i}=e;return!t&&!!r&&!!i&&!!n},Fr=(e,t)=>Ir({children:e,reorderItemsLabels:[`manageAccount`,`signOut`],MenuItemsComponent:$r,MenuActionComponent:ei,MenuLinkComponent:ti,UserProfileLinkComponent:Yr,UserProfilePageComponent:Jr,allowForAnyChildren:t?.allowForAnyChildren??!1}),Ir=({children:e,MenuItemsComponent:t,MenuActionComponent:n,MenuLinkComponent:r,UserProfileLinkComponent:i,UserProfilePageComponent:a,reorderItemsLabels:o,allowForAnyChildren:s=!1})=>{let c=[],l=[],u=[],d=new Map;_.Children.forEach(e,e=>{if(!Er(e,t)&&!Er(e,i)&&!Er(e,a)){e&&!s&&qn(cr);return}if(Er(e,i)||Er(e,a))return;let{props:l}=e;_.Children.forEach(l.children,e=>{if(!Er(e,n)&&!Er(e,r)){e&&qn(lr);return}let{props:t}=e,i=e.key,{label:a,labelIcon:s,href:l,onClick:u,open:f}=t;if(Er(e,n))if(Rr(t,o))c.push({label:a});else if(zr(t)){let e={label:a,labelIcon:s};if(u!==void 0)c.push({...e,onClick:u,portalId:Lr(`action`,t,i,d)});else if(f!==void 0)c.push({...e,open:f.startsWith(`/`)?f:`/${f}`,portalId:Lr(`action`,t,i,d)});else{qn(`Custom menu item must have either onClick or open property`);return}}else{qn(mr);return}if(Er(e,r))if(Br(t))c.push({label:a,labelIcon:s,href:l,portalId:Lr(`link`,t,i,d)});else{qn(pr);return}})});let f=[],p=[];c.forEach((e,t)=>{zr(e)&&f.push({component:e.labelIcon,id:e.portalId||t}),Br(e)&&p.push({component:e.labelIcon,id:e.portalId||t})});let m=Tr(f),h=Tr(p);return c.forEach((e,t)=>{if(Rr(e,o)&&l.push({label:e.label}),zr(e)){let{portal:n,mount:r,unmount:i}=m.find(n=>n.id===(e.portalId||t)),a={label:e.label,mountIcon:r,unmountIcon:i};`onClick`in e?a.onClick=e.onClick:`open`in e&&(a.open=e.open),l.push(a),u.push({key:`icon:${e.portalId||t}`,portal:n})}if(Br(e)){let{portal:n,mount:r,unmount:i}=h.find(n=>n.id===(e.portalId||t));l.push({label:e.label,href:e.href,mountIcon:r,unmountIcon:i}),u.push({key:`icon:${e.portalId||t}`,portal:n})}}
16),{customMenuItems:l,customMenuItemsPortals:u}},Lr=(e,t,n,r)=>{if(n!=null)return`${e}:key:${n}`;let i=t.href||t.open||``,a=`${e}:${t.label}:${i}`,o=r.get(a)??0;return r.set(a,o+1),`${a}:${o}`},Rr=(e,t)=>{let{children:n,label:r,onClick:i,labelIcon:a}=e;return!n&&!i&&!a&&t.some(e=>e===r)},zr=e=>{let{label:t,labelIcon:n,onClick:r,open:i}=e;return!!n&&!!t&&(typeof r==`function`||typeof i==`string`)},Br=e=>{let{label:t,href:n,labelIcon:r}=e;return!!n&&!!r&&!!t},Vr=(e=>{let t=e?.isReady;return n=>new Promise((r,i)=>{let{root:a=document?.body,selector:o,timeout:s=0}=n;if(!a){i(Error(`No root element provided`));return}let c=a;if(o&&(c=a?.querySelector(o)),t(c,o)){r();return}let l=new MutationObserver(n=>{for(let i of n)if(!c&&o&&(c=a?.querySelector(o)),(e.childList&&i.type===`childList`||e.attributes&&i.type===`attributes`)&&t(c,o)){l.disconnect(),r();return}});l.observe(a,e),s>0&&setTimeout(()=>{l.disconnect(),i(Error(`Timeout waiting for ${o}`))},s)})})({childList:!0,subtree:!0,isReady:(e,t)=>!!e?.childElementCount&&e?.matches?.(t)&&e.childElementCount>0});function Hr(e,t){let n=(0,_.useRef)(),[r,i]=(0,_.useState)(`rendering`);return(0,_.useEffect)(()=>{if(!e)throw Error(`Clerk: no component name provided, unable to detect mount.`);if(typeof window<`u`&&!n.current){let r=`[data-clerk-component="${e}"]`,a=t?.selector;n.current=Vr({selector:a?r+a:r}).then(()=>{i(`rendered`)}).catch(()=>{i(`error`)})}},[e,t?.selector]),r}var Ur=e=>`mount`in e,Wr=e=>`open`in e,Gr=e=>e?.map(({mountIcon:e,unmountIcon:t,...n})=>n),Kr=class extends _.PureComponent{constructor(...e){super(...e),this.rootRef=_.createRef()}componentDidUpdate(e){if(!Ur(e)||!Ur(this.props))return;let t=Yn(e.props||{},`customPages`,`customMenuItems`,`children`),n=Yn(this.props.props||{},`customPages`,`customMenuItems`,`children`),r=e.props?.customPages?.length!==this.props.props?.customPages?.length,i=e.props?.customMenuItems?.length!==this.props.props?.customMenuItems?.length,a=Gr(e.props?.customMenuItems),o=Gr(this.props.props?.customMenuItems);(!yn(t,n)||!yn(a,o)||r||i)&&this.rootRef.current&&this.props.updateProps({node:this.rootRef.current,props:this.props.props})}componentDidMount(){this.rootRef.current&&(Ur(this.props)&&this.props.mount(this.rootRef.current,this.props.props),Wr(this.props)&&this.props.open(this.props.props))}componentWillUnmount(){this.rootRef.current&&(Ur(this.props)&&this.props.unmount(this.rootRef.current),Wr(this.props)&&this.props.close())}render(){let{hideRootHtmlElement:e=!1}=this.props,t={ref:this.rootRef,...this.props.rootProps,...this.props.component&&{"data-clerk-component":this.props.component}};return _.createElement(_.Fragment,null,!e&&_.createElement(`div`,t),this.props.children)}},B=(e,t)=>{let n=(typeof t==`string`?t:t?.component)||e.displayName||e.name||`Component`;e.displayName=n;let r=typeof t==`string`?void 0:t,i=t=>{Gn(n||`withClerk`);let i=Wn(),a=Vn();return!i.loaded&&!r?.renderWhileLoading?null:_.createElement(e,{getContainer:a,...t,component:n,clerk:i})};return i.displayName=`withClerk(${n})`,i},qr=e=>_.createElement(_.Fragment,null,e?.customPagesPortals?.map(({key:e,portal:t})=>(0,_.createElement)(t,{key:e})),e?.customMenuItemsPortals?.map(({key:e,portal:t})=>(0,_.createElement)(t,{key:e})));B(({clerk:e,component:t,fallback:n,...r})=>{let i=Hr(t)===`rendering`||!e.loaded,a={...i&&n&&{style:{display:`none`}}};return _.createElement(_.Fragment,null,i&&n,e.loaded&&_.createElement(Kr,{component:t,mount:e.mountSignIn,unmount:e.unmountSignIn,updateProps:e.__internal_updateProps,props:r,rootProps:a}))},{component:`SignIn`,renderWhileLoading:!0}),B(({clerk:e,component:t,fallback:n,...r})=>{let i=Hr(t)===`rendering`||!e.loaded,a={...i&&n&&{style:{display:`none`}}};return _.createElement(_.Fragment,null,i&&n,e.loaded&&_.createElement(Kr,{component:t,mount:e.mountSignUp,unmount:e.unmountSignUp,updateProps:e.__internal_updateProps,props:r,rootProps:a}))},{component:`SignUp`,renderWhileLoading:!0});function Jr({children:e}){return qn(tr),_.createElement(_.Fragment,null,e)}function Yr({children:e}){return qn(nr),_.createElement(_.Fragment,null,e)}var Xr=B(({clerk:e,component:t,fallback:n,...r})=>{let i=Hr(t)===`rendering`||!e.loaded,a={...i&&n&&{style:{display:`none`}}},{customPages:o,customPagesPortals:s}=Dr(r.children);return _.createElement(_.Fragment,null,i&&n,_.createElement(Kr,{component:t,mount:e.mountUserProfile,unmount:e.unmountUserProfile,updateProps:e.__internal_updateProps,props:{...r,customPages:o},rootProps:a},_.createElement(qr,{customPagesPortals:s})))},{component:`UserProfile`,renderWhileLoading:!0});Object.assign(Xr,{Page:Jr,Link:Yr});var Zr=(0,_.createContext)({mount:()=>{},unmount:()=>{},updateProps:()=>{}}),Qr=B(({clerk:e,component:t,fallback:n,...r})=>{let i=Hr(t)===`rendering`||!e.loaded,a={...i&&n&&{style:{display:`none`}}},{customPages:o,customPagesPortals:s}=Dr(r.children,{allowForAnyChildren:!!r.__experimental_asProvider}),c={...r.userProfileProps,customPages:o},{customMenuItems:l,customMenuItemsPortals:u}=Fr(r.children,{allowForAnyChildren:!!r.__experimental_asProvider}),d=kr(r.children),f={mount:e.mountUserButton,unmount:e.unmountUserButton,updateProps:e.__internal_updateProps,props:{...r,userProfileProps:c,customMenuItems:l}},p={customPagesPortals:s,customMenuItemsPortals:u};return _.createElement(Zr.Provider,{value:f},i&&n,e.loaded&&_.createElement(Kr,{component:t,...f,hideRootHtmlElement:!!r.__experimental_asProvider,rootProps:a},r.__experimental_asProvider?d:null,_.createElement(qr,p)))},{component:`UserButton`,renderWhileLoading:!0});function $r({children:e}){return qn(ur),_.createElement(_.Fragment,null,e)}function ei({children:e}){return qn(dr),_.createElement(_.Fragment,null,e)}function ti({children:e}){return qn(fr),_.createElement(_.Fragment,null,e)}function ni(e){let t=(0,_.useContext)(Zr),n={...t,props:{...t.props,...e}};return _.createElement(Kr,n)}var ri=Object.assign(Qr,{UserProfilePage:Jr,UserProfileLink:Yr,MenuItems:$r,Action:ei,Link:ti,__experimental_Outlet:ni});function ii({children:e}){return qn(rr),_.createElement(_.Fragment,null,e)}function ai({children:e}){return qn(ir),_.createElement(_.Fragment,null,e)}var oi=B(({clerk:e,component:t,fallback:n,...r})=>{let i=Hr(t)===`rendering`||!e.loaded,a={...i&&n&&{style:{display:`none`}}},{customPages:o,customPagesPortals:s}=Or(r.children);return _.createElement(_.Fragment,null,i&&n,e.loaded&&_.createElement(Kr,{component:t,mount:e.mountOrganizationProfile,unmount:e.unmountOrganizationProfile,updateProps:e.__internal_updateProps,props:{...r,customPages:o},rootProps:a},_.createElement(qr,{customPagesPortals:s})))},{component:`OrganizationProfile`,renderWhileLoading:!0});Object.assign(oi,{Page:ii,Link:ai}),B(({clerk:e,component:t,fallback:n,...r})=>{let i=Hr(t)===`rendering`||!e.loaded,a={...i&&n&&{style:{display:`none`}}};return _.createElement(_.Fragment,null,i&&n,e.loaded&&_.createElement(Kr,{component:t,mount:e.mountCreateOrganization,unmount:e.unmountCreateOrganization,updateProps:e.__internal_updateProps,props:r,rootProps:a}))},{component:`CreateOrganization`,renderWhileLoading:!0});var si=(0,_.createContext)({mount:()=>{},unmount:()=>{},updateProps:()=>{}}),ci=B(({clerk:e,component:t,fallback:n,...r})=>{let i=Hr(t)===`rendering`||!e.loaded,a={...i&&n&&{style:{display:`none`}}},{customPages:o,customPagesPortals:s}=Or(r.children,{allowForAnyChildren:!!r.__experimental_asProvider}),c={...r.organizationProfileProps,customPages:o},l=kr(r.children),u={mount:e.mountOrganizationSwitcher,unmount:e.unmountOrganizationSwitcher,updateProps:e.__internal_updateProps,props:{...r,organizationProfileProps:c},rootProps:a,component:t};return e.__experimental_prefetchOrganizationSwitcher(),_.createElement(si.Provider,{value:u},_.createElement(_.Fragment,null,i&&n,e.loaded&&_.createElement(Kr,{...u,hideRootHtmlElement:!!r.__experimental_asProvider},r.__experimental_asProvider?l:null,_.createElement(qr,{customPagesPortals:s}))))},{component:`OrganizationSwitcher`,renderWhileLoading:!0});function li(e){let t=(0,_.useContext)(si),n={...t,props:{...t.props,...e}};return _.createElement(Kr,n)}Object.assign(ci,{OrganizationProfilePage:ii,OrganizationProfileLink:ai,__experimental_Outlet:li}),B(({clerk:e,component:t,fallback:n,...r})=>{let i=Hr(t)===`rendering`||!e.loaded,a={...i&&n&&{style:{display:`none`}}};return _.createElement(_.Fragment,null,i&&n,e.loaded&&_.createElement(Kr,{component:t,mount:e.mountOrganizationList,unmount:e.unmountOrganizationList,updateProps:e.__internal_updateProps,props:r,rootProps:a}))},{component:`OrganizationList`,renderWhileLoading:!0}),B(({clerk:e,component:t,fallback:n,...r})=>{let i=Hr(t)===`rendering`||!e.loaded,a={...i&&n&&{style:{display:`none`}}};return _.createElement(_.Fragment,null,i&&n,e.loaded&&_.createElement(Kr,{component:t,open:e.openGoogleOneTap,close:e.closeGoogleOneTap,updateProps:e.__internal_updateProps,props:r,rootProps:a}))},{component:`GoogleOneTap`,renderWhileLoading:!0}),B(({clerk:e,component:t,fallback:n,...r})=>{let i=Hr(t)===`rendering`||!e.loaded,a={...i&&n&&{style:{display:`none`}}};return _.createElement(_.Fragment,null,i&&n,e.loaded&&_.createElement(Kr,{component:t,mount:e.mountWaitlist,unmount:e.unmountWaitlist,updateProps:e.__internal_updateProps,props:r,rootProps:a}))},{component:`Waitlist`,renderWhileLoading:!0}),B(({clerk:e,component:t,fallback:n,...r})=>{let i=Hr(t,{selector:`[data-component-status="ready"]`})===`rendering`||!e.loaded,a={...i&&n&&{style:{display:`none`}}};return _.createElement(_.Fragment,null,i&&n,e.loaded&&_.createElement(Kr,{component:t,mount:e.mountPricingTable,unmount:e.unmountPricingTable,updateProps:e.__internal_updateProps,props:r,rootProps:a}))},{component:`PricingTable`,renderWhileLoading:!0}),B(({clerk:e,component:t,fallback:n,...r})=>{let i=Hr(t)===`rendering`||!e.loaded,a={...i&&n&&{style:{display:`none`}}};return _.createElement(_.Fragment,null,i&&n,e.loaded&&_.createElement(Kr,{component:t,mount:e.mountAPIKeys,unmount:e.unmountAPIKeys,updateProps:e.__internal_updateProps,props:r,rootProps:a}))},{component:`ApiKeys`,renderWhileLoading:!0}),B(({clerk:e,component:t,fallback:n,...r})=>{let i=Hr(t)===`rendering`||!e.loaded,a={...i&&n&&{style:{display:`none`}}};return _.createElement(_.Fragment,null,i&&n,e.loaded&&_.createElement(Kr,{component:t,mount:e.__internal_mountOAuthConsent,unmount:e.__internal_unmountOAuthConsent,updateProps:e.__internal_updateProps,props:r,rootProps:a}))},{component:`OAuthConsent`,renderWhileLoading:!0}),B(({clerk:e,component:t,fallback:n,...r})=>{let i=Hr(t)===`rendering`||!e.loaded,a={...i&&n&&{style:{display:`none`}}};return _.createElement(_.Fragment,null,i&&n,e.loaded&&_.createElement(Kr,{component:t,mount:e.mountUserAvatar,unmount:e.unmountUserAvatar,updateProps:e.__internal_updateProps,props:r,rootProps:a}))},{component:`UserAvatar`,renderWhileLoading:!0}),B(({clerk:e,component:t,fallback:n,...r})=>{let i=Hr(t)===`rendering`||!e.loaded,a={...i&&n&&{style:{display:`none`}}};return _.createElement(_.Fragment,null,i&&n,e.loaded&&_.createElement(Kr,{component:t,mount:e.mountTaskChooseOrganization,unmount:e.unmountTaskChooseOrganization,updateProps:e.__internal_updateProps,props:r,rootProps:a}))},{component:`TaskChooseOrganization`,renderWhileLoading:!0}),B(({clerk:e,component:t,fallback:n,...r})=>{let i=Hr(t)===`rendering`||!e.loaded,a={...i&&n&&{style:{display:`none`}}};return _.createElement(_.Fragment,null,i&&n,e.loaded&&_.createElement(Kr,{component:t,mount:e.mountTaskResetPassword,unmount:e.unmountTaskResetPassword,updateProps:e.__internal_updateProps,props:r,rootProps:a}))},{component:`TaskResetPassword`,renderWhileLoading:!0}),B(({clerk:e,component:t,fallback:n,...r})=>{let i=Hr(t)===`rendering`||!e.loaded,a={...i&&n&&{style:{display:`none`}}};return _.createElement(_.Fragment,null,i&&n,e.loaded&&_.createElement(Kr,{component:t,mount:e.mountTaskSetupMFA,unmount:e.unmountTaskSetupMFA,updateProps:e.__internal_updateProps,props:r,rootProps:a}))},{component:`TaskSetupMFA`,renderWhileLoading:!0});var ui={actor:void 0,factorVerificationAge:null,orgId:void 0,orgPermissions:void 0,orgRole:void 0,orgSlug:void 0,sessionClaims:void 0,sessionId:void 0,sessionStatus:void 0,userId:void 0};function di(){let e=Bt(),t=Wt(),n=(0,_.useCallback)(()=>t,[t]),r=(0,_.useSyncExternalStore)((0,_.useCallback)(t=>e.addListener(t,{skipInitialEmit:!0}),[e]),(0,_.useCallback)(()=>!e.loaded||!e.__internal_lastEmittedResources?n():e.__internal_lastEmittedResources,[e,n]),n);return(0,_.useMemo)(()=>r?fi(pi(r)?R(!1,{},r):R(!0,r,void 0)):ui,[r])}function fi(e){return{sessionId:e.sessionId,sessionStatus:e.sessionStatus,sessionClaims:e.sessionClaims,userId:e.userId,actor:e.actor,orgId:e.orgId,orgRole:e.orgRole,orgSlug:e.orgSlug,orgPermissions:e.orgPermissions,factorVerificationAge:e.factorVerificationAge}}function pi(e){return!(`client`in e)}var mi=e=>new Promise(t=>{let n=r=>{[`ready`,`degraded`].includes(r)&&(t(),e.off(`status`,n))};e.on(`status`,n,{notify:!0})}),hi=e=>async t=>{if(!Xn())throw new b(`useAuth().getToken() can only be used in browser environments. To access auth data server-side, see the Auth object reference doc: https://clerk.c
16om/docs/reference/backend/types/auth-object`,{code:`clerk_runtime_not_browser`});return await mi(e),e.session?e.session.getToken(t):null},gi=e=>async(...t)=>(await mi(e),e.signOut(...t)),_i=(e={})=>{Gn(`useAuth`);let{treatPendingAsSignedOut:t}=e??{},n=di(),r=Wn(),i=(0,_.useCallback)(hi(r),[r]),a=(0,_.useCallback)(gi(r),[r]);return r.telemetry?.record(xe(`useAuth`,{treatPendingAsSignedOut:t})),vi({...n,getToken:i,signOut:a},{treatPendingAsSignedOut:t})};function vi(e,{treatPendingAsSignedOut:t=!0}={}){let{userId:n,orgId:r,orgRole:i,has:a,signOut:o,getToken:s,orgPermissions:c,factorVerificationAge:l,sessionClaims:u}=e??{},d=(0,_.useCallback)(e=>a?a(e):ne({userId:n,orgId:r,orgRole:i,orgPermissions:c,factorVerificationAge:l,features:u?.fea||``,plans:u?.pla||``})(e),[a,n,r,i,c,l,u]);return re({authObject:{...e,getToken:s,signOut:o,has:d},options:{treatPendingAsSignedOut:t}})||Hn.throw($n)}var yi={initialDelay:125,maxDelayBetweenRetries:0,factor:2,shouldRetry:(e,t)=>t<5,retryImmediately:!1,jitter:!0},bi=100,xi=async e=>new Promise(t=>setTimeout(t,e)),Si=(e,t)=>t?e*(1+Math.random()):e,Ci=e=>{let t=0,n=()=>{let n=e.initialDelay*e.factor**+t;return n=Si(n,e.jitter),Math.min(e.maxDelayBetweenRetries||n,n)};return async()=>{await xi(n()),t++}},wi=async(e,t={})=>{let n=0,{shouldRetry:r,initialDelay:i,maxDelayBetweenRetries:a,factor:o,retryImmediately:s,jitter:c,onBeforeRetry:l}={...yi,...t},u=Ci({initialDelay:i,maxDelayBetweenRetries:a,factor:o,jitter:c});for(;;)try{return await e()}catch(e){if(n++,!r(e,n))throw e;l&&await l(n),s&&n===1?await xi(Si(bi,c)):await u()}},Ti=`loadScript cannot be called when document does not exist`,Ei=`loadScript cannot be called without a src`;async function Di(e=``,t){let{async:n,defer:r,beforeLoad:i,crossOrigin:a,nonce:o}=t||{};return wi(()=>new Promise((t,s)=>{e||s(Error(Ei)),(!document||!document.body)&&s(Error(Ti));let c=document.createElement(`script`);a&&c.setAttribute(`crossorigin`,a),c.async=n||!1,c.defer=r||!1,c.addEventListener(`load`,()=>{c.remove(),t(c)}),c.addEventListener(`error`,t=>{c.remove(),s(t.error??Error(`failed to load script: ${e}`))}),c.src=e,o&&(c.nonce=o),i?.(c),document.body.appendChild(c)}),{shouldRetry:(e,t)=>t<=5})}function Oi(e){return!e||ki(e)||Ai(e)}function ki(e){return/^http(s)?:\/\//.test(e||``)}function Ai(e){return e.startsWith(`/`)}function ji(e){return e?!Ai(e)||typeof window>`u`||!window.location?.origin?e:new URL(e,window.location.origin).toString():``}function Mi(e){if(!e)return``;let t;if(e.match(/^(clerk\.)+\w*$/))t=/(clerk\.)*(?=clerk\.)/;else if(e.match(/\.clerk.accounts/))return e;else t=/^(clerk\.)*/gi;return`clerk.${e.replace(t,``)}`}var V=(e,t=`6.25.13`)=>{if(e)return e;let n=Ni(t);return n?n===`snapshot`?t:n:Pi(t)},Ni=e=>e.trim().replace(/^v/,``).match(/-(.+?)(\.|$)/)?.[1],Pi=e=>e.trim().replace(/^v/,``).split(`.`)[0],{isDevOrStagingUrl:Fi}=fe(),Ii=S({packageName:`@clerk/shared`});function Li(e){return typeof window>`u`||!window[e]?!1:!!window[e]}var Ri=()=>Li(`Clerk`),zi=()=>Li(`__internal_ClerkUICtor`);function Bi(e){if(typeof window>`u`||!window.performance)return!1;let t=performance.getEntriesByName(e,`resource`);if(t.length===0)return!1;let n=t[t.length-1];return n.transferSize===0&&n.decodedBodySize===0&&(n.responseEnd===0||n.responseEnd>0&&n.responseStart>0||`responseStatus`in n&&(n.responseStatus>=400||n.responseStatus===0))}var Vi=async e=>{let t=e?.scriptLoadTimeout??15e3,n=e=>
16new b(`Failed to load Clerk JS`+(e?.message?`, ${e.message}`:``),{code:`failed_to_load_clerk_js`,cause:e});if(Ri())return null;if(!e?.publishableKey)return Ii.throwMissingPublishableKeyError(),null;let r=Ui(e),i=document.querySelector(`script[data-clerk-js-script]`);if(i)if(Bi(r))i.remove();else try{return await Zi(t,Ri,n(),i),null}catch{i.remove()}let a=Zi(t,Ri,n());return Di(r,{async:!0,crossOrigin:`anonymous`,nonce:e.nonce,beforeLoad:qi(Gi(e))}).catch(e=>{throw n(e)}),a},Hi=async e=>{let t=e?.scriptLoadTimeout??15e3,n=e=>new b(`Failed to load Clerk UI`+(e?.message?`, ${e.message}`:``),{code:`failed_to_load_clerk_ui`,cause:e});if(zi())return null;if(!e?.publishableKey)return Ii.throwMissingPublishableKeyError(),null;let r=Wi(e),i=document.querySelector(`script[data-clerk-ui-script]`);if(i)if(Bi(r))i.remove();else try{return await Zi(t,zi,n(),i),null}catch{i.remove()}let a=Zi(t,zi,n());return Di(r,{async:!0,crossOrigin:`anonymous`,nonce:e.nonce,beforeLoad:qi(Ki(e))}).catch(e=>{throw n(e)}),a},Ui=e=>{let{__internal_clerkJSUrl:t,__internal_clerkJSVersion:n,proxyUrl:r,domain:i,publishableKey:a}=e;if(t)return t;let o=V(n);return r&&Ai(r)?Yi(r,`clerk-js`,o,`clerk.browser.js`):`https://${Xi({publishableKey:a,proxyUrl:r,domain:i})}/npm/@clerk/clerk-js@${o}/dist/clerk.browser.js`},Wi=e=>{let{__internal_clerkUIUrl:t,__internal_clerkUIVersion:n,proxyUrl:r,domain:i,publishableKey:a}=e;if(t)return t;let o=V(n,`1.27.2`);return r&&Ai(r)?Yi(r,`ui`,o,`ui.browser.js`):`https://${Xi({publishableKey:a,proxyUrl:r,domain:i})}/npm/@clerk/ui@${o}/dist/ui.browser.js`},Gi=e=>{let t={};return e.publishableKey&&(t[`data-clerk-publishable-key`]=e.publishableKey),e.proxyUrl&&(t[`data-clerk-proxy-url`]=e.proxyUrl),e.domain&&(t[`data-clerk-domain`]=e.domain),e.nonce&&(t.nonce=e.nonce),t},Ki=e=>Gi(e),qi=e=>t=>{for(let n in e)t.setAttribute(n,e[n])},Ji=e=>{for(;e.endsWith(`/`);)e=e.slice(0,-1);return e},Yi=(e,t,n,r)=>`${Ji(e)}/npm/@clerk/${t}@${n}/dist/${r}`,Xi=e=>{let{proxyUrl:t,domain:n,publishableKey:r}=e;if(t&&Oi(t)){let e=ji(t);return Ai(e)?ue(r)?.frontendApi||``:e.replace(/http(s)?:\/\//,``)}else if(n&&!Fi(ue(r)?.frontendApi||``))return Mi(n);else return ue(r)?.frontendApi||``};function Zi(e,t,n,r){return new Promise((i,a)=>{let o=!1,s=(e,t)=>{clearTimeout(e),clearInterval(t)};r?.addEventListener(`error`,()=>{s(l,u),a(n)});let c=()=>{o||t()&&(o=!0,s(l,u),i(null))},l=setTimeout(()=>{o||(o=!0,s(l,u),t()?i(null):a(n))},e);c();let u=setInterval(()=>{if(o){clearInterval(u);return}c()},100)})}function Qi(e){Ii.setPackageName({packageName:e})}var $i=new Set,ea=(e,t,n)=>{let r=_e()||ve(),i=n??e;$i.has(i)||r||($i.add(i),console.warn(`Clerk - DEPRECATION WARNING: "${e}" is deprecated and will be removed in the next major release.\n${t}`))},ta=(e,t,n,r,i)=>{let{notify:a}=i||{},o=e.get(n);o||(o=[],e.set(n,o)),o.push(r),a&&t.has(n)&&r(t.get(n))},na=(e,t,n)=>(e.get(t)||[]).map(e=>e(n)),ra=(e,t,n)=>{let r=e.get(t);r&&(n?r.splice(r.indexOf(n)>>>0,1):e.set(t,[]))},ia=()=>{let e=new Map,t=new Map,n=new Map;return{on:(...n)=>ta(e,t,...n),prioritizedOn:(...e)=>ta(n,t,...e),emit:(r,i)=>{t.set(r,i),na(n,r,i),na(e,r,i)},off:(...t)=>ra(e,...t),prioritizedOff:(...e)=>ra(n,...e),internal:{retrieveListeners:t=>e.get(t)||[]}}},aa={Status:`status`},oa=()=>ia(),sa=`clerk:beforeunload`,ca=[`http:`,`https:`,`wails:`,`chrome-extension:`],la=/^[/\\][/\\]/;function ua(e){let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;let n=``;for(let r=t;r<e.length;r++){let t=e.charCodeAt(r);t!==9&&t!==10&&t!==13&&(n+=e[r])}return n}function da(e,t){if(typeof e==`string`&&la.test(ua(e))){console.warn(`Clerk: scheme-relative navigation to "${e}" is not allowed. Provide a same-origin path or an absolute URL.`);return}let n=new URL(e,window.location.href);if(!(t?.allowedProtocols??ca).includes(n.protocol)){console.warn(`Clerk: "${n.protocol}" is not a valid navigation protocol. Aborting navigation. If you think this is a mistake, please open an issue.`);return}window.dispatchEvent(new CustomEvent(sa)),window.location.href=n.href}function fa(e){let t=e.match(/^(\d+)\.(\d+)\.(\d+)/);if(!t)return null;let[,n,r,i]=t;return{major:parseInt(n,10),minor:parseInt(r,10),patch:parseInt(i,10)}}function pa(e,t){let{major:n,minor:r,patch:i}=e;return t.some(([e,t,a,o])=>n===e?a===-1?r>t||r===t&&i>=o:r===a&&i>=o:!1)}function ma(e,t){let n=fa(e);return n?pa(n,t):!1}B(({clerk:e,...t})=>{let{client:n,session:r}=e,i=(n.signedInSessions?.length??0)>0;return _.useEffect(()=>{r===null&&i?e.redirectToAfterSignOut():e.redirectToSignIn(t)},[]),null},`RedirectToSignIn`),B(({clerk:e,...t})=>(_.useEffect(()=>{e.redirectToSignUp(t)},[]),null),`RedirectToSignUp`),B(({clerk:e,...t})=>(_.useEffect(()=>{e.redirectToTasks(t)},[]),null),`RedirectToTasks`),B(({clerk:e})=>(_.useEffect(()=>{ea(`RedirectToUserProfile`,"Use the `redirectToUserProfile()` method instead."),e.redirectToUserProfile()},[]),null),`RedirectToUserProfile`),B(({clerk:e})=>(_.useEffect(()=>{ea(`RedirectToOrganizationProfile`,"Use the `redirectToOrganizationProfile()` method instead."),e.redirectToOrganizationProfile()},[]),null),`RedirectToOrganizationProfile`),B(({clerk:e})=>(_.useEffect(()=>{ea(`RedirectToCreateOrganization`,"Use the `redirectToCreateOrganization()` method instead."),e.redirectToCreateOrganization()},[]),null),`RedirectToCreateOrganization`),B(({clerk:e,...t})=>(_.useEffect(()=>{e.handleRedirectCallback(t)},[]),null),`AuthenticateWithRedirectCallback`);var ha=()=>({fields:{identifier:null,password:null,code:null},raw:null,global:null}),ga=()=>({fields:{firstName:null,lastName:null,emailAddress:null,phoneNumber:null,password:null,username:null,code:null,captcha:null,legalAccepted:null},raw:null,global:null}),_a=()=>({fields:{emailAddress:null},raw:null,global:null}),va=()=>({pathRoot:``,attempts:null,error:null,expireAt:null,externalVerificationRedirectURL:null,nonce:null,message:null,status:null,strategy:null,verifiedAtClient:null,verifiedFromTheSameClient(){return!1},reload(){throw Error(`reload() called before Clerk is loaded`)},__internal_toSnapshot(){return{object:`verification`,id:``,attempts:null,error:{code:``,message:``},expire_at:null,externalVerificationRedirectURL:null,nonce:null,message:null,status:null,strategy:null,verified_at_client:null}}}),ya=()=>({...va(),supportedStrategies:[],nextAction:``,reload(){throw Error(`reload() called before Clerk is loaded`)},__internal_toSnapshot(){return{...va().__internal_toSnapshot(),next_action:this.nextAction,supported_strategies:this.supportedStrategies}}}),ba=class{constructor(e){this.isomorphicClerk=e,this.signInSignalProxy=this.buildSignInProxy(),this.signUpSignalProxy=this.buildSignUpProxy(),this.waitlistSignalProxy=this.buildWaitlistProxy()}signInSignal(){return this.signInSignalProxy}signUpSignal(){return this.signUpSignalProxy}waitlistSignal(){return this.waitlistSignalProxy}get __internal_waitlist(){return this.state.__internal_waitlist}checkoutSignal(e){return this.buildCheckoutProxy(e)}buildSignInProxy(){let e=this.gateProperty.bind(this),t=()=>this.client.signIn.__internal_future;return{errors:ha(),fetchStatus:`idle`,signIn:{status:`needs_identifier`,availableStrategies:[],get isTransferable(){return e(t,`isTransferable`,!1)},get id(){return e(t,`id`,void 0)},get supportedFirstFactors(){return e(t,`supportedFirstFactors`,[])},get supportedSecondFactors(){return e(t,`supportedSecondFactors`,[])},get secondFactorVerification(){return e(t,`secondFactorVerification`,{status:null,error:null,expireAt:null,externalVerificationRedirectURL:null,nonce:null,attempts:null,message:null,strategy:null,verifiedAtClient:null,verifiedFromTheSameClient:()=>!1,__internal_toSnapshot:()=>{throw Error(`__internal_toSnapshot called before Clerk is loaded`)},pathRoot:``,reload:()=>{throw Error(`__internal_toSnapshot called before Clerk is loaded`)}})},get identifier(){return e(t,`identifier`,null)}
16,get createdSessionId(){return e(t,`createdSessionId`,null)},get userData(){return e(t,`userData`,{})},get firstFactorVerification(){return e(t,`firstFactorVerification`,{status:null,error:null,expireAt:null,externalVerificationRedirectURL:null,nonce:null,attempts:null,message:null,strategy:null,verifiedAtClient:null,verifiedFromTheSameClient:()=>!1,__internal_toSnapshot:()=>{throw Error(`__internal_toSnapshot called before Clerk is loaded`)},pathRoot:``,reload:()=>{throw Error(`__internal_toSnapshot called before Clerk is loaded`)}})},get canBeDiscarded(){return e(t,`canBeDiscarded`,!1)},get protectCheck(){return e(t,`protectCheck`,null)},create:this.gateMethod(t,`create`),password:this.gateMethod(t,`password`),sso:this.gateMethod(t,`sso`),finalize:this.gateMethod(t,`finalize`),reset:this.gateMethod(t,`reset`),submitProtectCheck:this.gateMethod(t,`submitProtectCheck`),emailCode:this.wrapMethods(()=>t().emailCode,[`sendCode`,`verifyCode`]),emailLink:this.wrapStruct(()=>t().emailLink,[`sendLink`,`waitForVerification`],[`verification`],{verification:null}),resetPasswordEmailCode:this.wrapMethods(()=>t().resetPasswordEmailCode,[`sendCode`,`verifyCode`,`submitPassword`]),resetPasswordPhoneCode:this.wrapMethods(()=>t().resetPasswordPhoneCode,[`sendCode`,`verifyCode`,`submitPassword`]),phoneCode:this.wrapMethods(()=>t().phoneCode,[`sendCode`,`verifyCode`]),mfa:this.wrapMethods(()=>t().mfa,[`sendPhoneCode`,`verifyPhoneCode`,`sendEmailCode`,`verifyEmailCode`,`verifyTOTP`,`verifyBackupCode`]),ticket:this.gateMethod(t,`ticket`),passkey:this.gateMethod(t,`passkey`),web3:this.gateMethod(t,`web3`)}}}buildSignUpProxy(){let e=this.gateProperty.bind(this),t=this.gateMethod.bind(this),n=()=>this.client.signUp.__internal_future;return{errors:ga(),fetchStatus:`idle`,signUp:{get id(){return e(n,`id`,void 0)},get requiredFields(){return e(n,`requiredFields`,[])},get optionalFields(){return e(n,`optionalFields`,[])},get missingFields(){return e(n,`missingFields`,[])},get username(){return e(n,`username`,null)},get firstName(){return e(n,`firstName`,null)},get lastName(){return e(n,`lastName`,null)},get emailAddress(){return e(n,`emailAddress`,null)},get phoneNumber(){return e(n,`phoneNumber`,null)},get web3Wallet(){return e(n,`web3Wallet`,null)},get hasPassword(){return e(n,`hasPassword`,!1)},get unsafeMetadata(){return e(n,`unsafeMetadata`,{})},get createdSessionId(){return e(n,`createdSessionId`,null)},get createdUserId(){return e(n,`createdUserId`,null)},get abandonAt(){return e(n,`abandonAt`,null)},get legalAcceptedAt(){return e(n,`legalAcceptedAt`,null)},get locale(){return e(n,`locale`,null)},get status(){return e(n,`status`,`missing_requirements`)},get unverifiedFields(){return e(n,`unverifiedFields`,[])},get isTransferable(){return e(n,`isTransferable`,!1)},get canBeDiscarded(){return e(n,`canBeDiscarded`,!1)},get protectCheck(){return e(n,`protectCheck`,null)},create:t(n,`create`),update:t(n,`update`),sso:t(n,`sso`),password:t(n,`password`),ticket:t(n,`ticket`),web3:t(n,`web3`),finalize:t(n,`finalize`),reset:t(n,`reset`),submitProtectCheck:t(n,`submitProtectCheck`),verifications:this.wrapStruct(()=>n().verifications,[`sendEmailCode`,`verifyEmailCode`,`sendEmailLink`,`waitForEmailLinkVerification`,`sendPhoneCode`,`verifyPhoneCode`],[`emailAddress`,`phoneNumber`,`web3Wallet`,`externalAccount`,`emailLinkVerification`],{emailAddress:ya(),phoneNumber:ya(),web3Wallet:ya(),externalAccount:ya(),emailLinkVerification:null})}}}buildWaitlistProxy(){let e=this.gateProperty.bind(this),t=this.gateMethod.bind(this),n=()=>this.state.__internal_waitlist;return{errors:_a(),fetchStatus:`idle`,waitlist:{pathRoot:`/waitlist`,get id(){return e(n,`id`,``)},get createdAt(){return e(n,`createdAt`,null)},get updatedAt(){return e(n,`updatedAt`,null)},join:t(n,`join`),reload:t(n,`reload`)}}}buildCheckoutProxy(e){let t=this.gateProperty.bind(this),n=()=>this.checkout(e),r=()=>n().checkout;return{errors:{raw:null,global:null},fetchStatus:`idle`,checkout:{get status(){return t(r,`status`,`needs_initialization`)},get externalClientSecret(){return t(r,`externalClientSecret`,null)},get externalGatewayId(){return t(r,`externalGatewayId`,null)},get paymentMethod(){return t(r,`paymentMethod`,null)},get plan(){return t(r,`plan`,null)},get planPeriod(){return t(r,`planPeriod`,null)},get totals(){return t(r,`totals`,null)},get isImmediatePlanChange(){return t(r,`isImmediatePlanChange`,!1)},get freeTrialEndsAt(){return t(r,`freeTrialEndsAt`,null)},get payer(){return t(r,`payer`,null)},get planPeriodStart(){return t(r,`planPeriodStart`,null)},get needsPaymentMethod(){return t(r,`needsPaymentMethod`,null)},start:this.gateMethod(r,`start`),confirm:this.gateMethod(r,`confirm`),finalize:this.gateMethod(r,`finalize`)}}}__internal_effect(e){throw Error(`__internal_effect called before Clerk is loaded`)}__internal_computed(e){throw Error(`__internal_computed called before Clerk is loaded`)}get state(){let e=this.isomorphicClerk.__internal_state;if(!e)throw Error(`Clerk state not ready`);return e}get client(){let e=this.isomorphicClerk.client;if(!e)throw Error(`Clerk client not ready`);return e}get checkout(){let e=this.isomorphicClerk.__experimental_checkout;if(!e)throw Error(`Clerk checkout not ready`);return e}gateProperty(e,t,n){return!Xn()||!this.isomorphicClerk.loaded?n:e()[t]}gateMethod(e,t){return(async(...n)=>{if(!Xn())return Hn.throw(`Attempted to call a method (${t}) that is not supported on the server.`);this.isomorphicClerk.loaded||await new Promise(e=>this.isomorphicClerk.addOnLoaded(e));let r=e();return r[t].apply(r,n)})}wrapMethods(e,t){return Object.fromEntries(t.map(t=>[t,this.gateMethod(e,t)]))}wrapStruct(e,t,n,r){let i={};for(let n of t)i[n]=this.gateMethod(e,n);for(let t of n)Object.defineProperty(i,t,{get:()=>this.gateProperty(e,t,r[t]),enumerable:!0});return i}};globalThis.__BUILD_DISABLE_RHC__===void 0&&(globalThis.__BUILD_DISABLE_RHC__=!1);var xa={name:`@clerk/react`,version:`6.12.10`,environment:`production`},Sa=class e{#e;#t;#n;#r;#i;#a;get publishableKey(){return this.#r}get loaded(){return this.clerkjs?.loaded||!1}get status(){return this.clerkjs?this.clerkjs?.status||(this.clerkjs.loaded?`ready`:`loading`):this.#e}static#o;static getOrCreateInstance(t){return(!Xn()||!this.#o||t.Clerk&&this.#o.Clerk!==t.Clerk||this.#o.publishableKey!==t.publishableKey)&&(this.#o=new e(t)),this.#o}static clearInstance(){this.#o=null}get domain(){return typeof window<`u`&&window.location?Kn(this.#t,new URL(window.location.href),``):typeof this.#t==`function`?Hn.throw(er):this.#t||``}get proxyUrl(){return typeof window<`u`&&window.location?Kn(this.#n,new URL(window.location.href),``):typeof this.#n==`function`?Hn.throw(er):this.#n||``}__internal_getOption(e){return this.clerkjs?.__internal_getOption?this.clerkjs?.__internal_getOption(e):this.options[e]}get __internal_moduleManager(){return this.clerkjs?.__internal_moduleManager}constructor(e){this.clerkjs=null,this.preopenOneTap=null,this.preopenUserVerification=null,this.preopenEnableOrganizationsPrompt=null,this.preopenSignIn=null,this.preopenCheckout=null,this.preopenPlanDetails=null,this.preopenSubscriptionDetail
16s=null,this.preopenSignUp=null,this.preopenUserProfile=null,this.preopenOrganizationProfile=null,this.preopenCreateOrganization=null,this.preOpenWaitlist=null,this.premountSignInNodes=new Map,this.premountSignUpNodes=new Map,this.premountUserAvatarNodes=new Map,this.premountUserProfileNodes=new Map,this.premountUserButtonNodes=new Map,this.premountOrganizationProfileNodes=new Map,this.premountCreateOrganizationNodes=new Map,this.premountOrganizationSwitcherNodes=new Map,this.premountOrganizationListNodes=new Map,this.premountMethodCalls=new Map,this.premountWaitlistNodes=new Map,this.premountPricingTableNodes=new Map,this.premountAPIKeysNodes=new Map,this.premountConfigureSSONodes=new Map,this.premountOAuthConsentNodes=new Map,this.premountTaskChooseOrganizationNodes=new Map,this.premountTaskResetPasswordNodes=new Map,this.premountTaskSetupMFANodes=new Map,this.premountAddListenerCalls=new Map,this.loadedListeners=[],this.#e=`loading`,this.#i=oa(),this.__internal_windowNavigate=(e,t)=>{let n=this.clerkjs;if(typeof n?.__internal_windowNavigate==`function`){n.__internal_windowNavigate(e,t);return}Xn()&&da(e,{allowedProtocols:t?.useStaticAllowlistOnly?ca:[...ca,...this.options.allowedRedirectProtocols??[]]})},this.buildSignInUrl=e=>{let t=()=>this.clerkjs?.buildSignInUrl(e)||``;if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`buildSignInUrl`,t)},this.buildSignUpUrl=e=>{let t=()=>this.clerkjs?.buildSignUpUrl(e)||``;if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`buildSignUpUrl`,t)},this.buildAfterSignInUrl=(...e)=>{let t=()=>this.clerkjs?.buildAfterSignInUrl(...e)||``;if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`buildAfterSignInUrl`,t)},this.buildAfterSignUpUrl=(...e)=>{let t=()=>this.clerkjs?.buildAfterSignUpUrl(...e)||``;if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`buildAfterSignUpUrl`,t)},this.buildAfterSignOutUrl=()=>{let e=()=>this.clerkjs?.buildAfterSignOutUrl()||``;if(this.clerkjs&&this.loaded)return e();this.premountMethodCalls.set(`buildAfterSignOutUrl`,e)},this.buildNewSubscriptionRedirectUrl=()=>{let e=()=>this.clerkjs?.buildNewSubscriptionRedirectUrl()||``;if(this.clerkjs&&this.loaded)return e();this.premountMethodCalls.set(`buildNewSubscriptionRedirectUrl`,e)},this.buildAfterMultiSessionSingleSignOutUrl=()=>{let e=()=>this.clerkjs?.buildAfterMultiSessionSingleSignOutUrl()||``;if(this.clerkjs&&this.loaded)return e();this.premountMethodCalls.set(`buildAfterMultiSessionSingleSignOutUrl`,e)},this.buildUserProfileUrl=()=>{let e=()=>this.clerkjs?.buildUserProfileUrl()||``;if(this.clerkjs&&this.loaded)return e();this.premountMethodCalls.set(`buildUserProfileUrl`,e)},this.buildCreateOrganizationUrl=()=>{let e=()=>this.clerkjs?.buildCreateOrganizationUrl()||``;if(this.clerkjs&&this.loaded)return e();this.premountMethodCalls.set(`buildCreateOrganizationUrl`,e)},this.buildOrganizationProfileUrl=()=>{let e=()=>this.clerkjs?.buildOrganizationProfileUrl()||``;if(this.clerkjs&&this.loaded)return e();this.premountMethodCalls.set(`buildOrganizationProfileUrl`,e)},this.buildWaitlistUrl=()=>{let e=()=>this.clerkjs?.buildWaitlistUrl()||``;if(this.clerkjs&&this.loaded)return e();this.premountMethodCalls.set(`buildWaitlistUrl`,e)},this.buildTasksUrl=()=>{let e=()=>this.clerkjs?.buildTasksUrl()||``;if(this.clerkjs&&this.loaded)return e();this.premountMethodCalls.set(`buildTasksUrl`,e)},this.buildUrlWithAuth=e=>{let t=()=>this.clerkjs?.buildUrlWithAuth(e)||``;if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`buildUrlWithAuth`,t)},this.handleUnauthenticated=async()=>{let e=()=>this.clerkjs?.handleUnauthenticated();this.clerkjs&&this.loaded?e():this.premountMethodCalls.set(`handleUnauthenticated`,e)},this.on=(...e)=>{if(this.clerkjs?.on)return this.clerkjs.on(...e);this.#i.on(...e)},this.off=(...e)=>{if(this.clerkjs?.off)return this.clerkjs.off(...e);this.#i.off(...e)},this.addOnLoaded=e=>{this.loadedListeners.push(e),this.loaded&&this.emitLoaded()},this.emitLoaded=()=>{this.loadedListeners.forEach(e=>e()),this.loadedListeners=[]},this.beforeLoad=e=>{if(!e)throw Error(`Failed to hydrate latest Clerk JS`)},this.replayInterceptedInvocations=e=>{if(!e)throw Error(`Failed to hydrate latest Clerk JS`);
16return this.clerkjs=e,this.premountMethodCalls.forEach(e=>e()),this.premountAddListenerCalls.forEach((t,n)=>{t.handlers.nativeUnsubscribe=e.addListener(n,t.options)}),this.#i.internal.retrieveListeners(`status`)?.forEach(e=>{this.on(`status`,e,{notify:!0})}),this.preopenSignIn!==null&&e.openSignIn(this.preopenSignIn),this.preopenCheckout!==null&&e.__internal_openCheckout(this.preopenCheckout),this.preopenPlanDetails!==null&&e.__internal_openPlanDetails(this.preopenPlanDetails),this.preopenSubscriptionDetails!==null&&e.__internal_openSubscriptionDetails(this.preopenSubscriptionDetails),this.preopenSignUp!==null&&e.openSignUp(this.preopenSignUp),this.preopenUserProfile!==null&&e.openUserProfile(this.preopenUserProfile),this.preopenUserVerification!==null&&e.__internal_openReverification(this.preopenUserVerification),this.preopenOneTap!==null&&e.openGoogleOneTap(this.preopenOneTap),this.preopenOrganizationProfile!==null&&e.openOrganizationProfile(this.preopenOrganizationProfile),this.preopenCreateOrganization!==null&&e.openCreateOrganization(this.preopenCreateOrganization),this.preOpenWaitlist!==null&&e.openWaitlist(this.preOpenWaitlist),this.preopenEnableOrganizationsPrompt&&e.__internal_openEnableOrganizationsPrompt(this.preopenEnableOrganizationsPrompt),this.premountSignInNodes.forEach((t,n)=>{e.mountSignIn(n,t)}),this.premountSignUpNodes.forEach((t,n)=>{e.mountSignUp(n,t)}),this.premountUserProfileNodes.forEach((t,n)=>{e.mountUserProfile(n,t)}),this.premountUserAvatarNodes.forEach((t,n)=>{e.mountUserAvatar(n,t)}),this.premountUserButtonNodes.forEach((t,n)=>{e.mountUserButton(n,t)}),this.premountOrganizationListNodes.forEach((t,n)=>{e.mountOrganizationList(n,t)}),this.premountWaitlistNodes.forEach((t,n)=>{e.mountWaitlist(n,t)}),this.premountPricingTableNodes.forEach((t,n)=>{e.mountPricingTable(n,t)}),this.premountAPIKeysNodes.forEach((t,n)=>{e.mountAPIKeys(n,t)}),this.premountConfigureSSONodes.forEach((t,n)=>{e.__internal_mountConfigureSSO(n,t)}),this.premountOAuthConsentNodes.forEach((t,n)=>{e.__internal_mountOAuthConsent(n,t)}),this.premountTaskChooseOrganizationNodes.forEach((t,n)=>{e.mountTaskChooseOrganization(n,t)}),this.premountTaskResetPasswordNodes.forEach((t,n)=>{e.mountTaskResetPassword(n,t)}),this.premountTaskSetupMFANodes.forEach((t,n)=>{e.mountTaskSetupMFA(n,t)}),this.clerkjs.status===void 0&&this.#i.emit(aa.Status,`ready`),this.emitLoaded(),this.clerkjs},this.__experimental_checkout=(...e)=>this.loaded&&this.clerkjs?this.clerkjs.__experimental_checkout(...e):this.#a.checkoutSignal(...e),this.__internal_updateProps=async e=>{let t=await this.#s();if(t&&`__internal_updateProps`in t)return t.__internal_updateProps(e)},this.setActive=e=>this.clerkjs?this.clerkjs.setActive(e):Promise.reject(),this.openSignIn=e=>{this.clerkjs&&this.loaded?this.clerkjs.openSignIn(e):this.preopenSignIn=e},this.closeSignIn=()=>{this.clerkjs&&this.loaded?this.clerkjs.closeSignIn():this.preopenSignIn=null},this.__internal_openCheckout=e=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_openCheckout(e):this.preopenCheckout=e},this.__internal_closeCheckout=()=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_closeCheckout():this.preopenCheckout=null},this.__internal_openPlanDetails=e=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_openPlanDetails(e):this.preopenPlanDetails=e},this.__internal_closePlanDetails=()=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_closePlanDetails():this.preopenPlanDetails=null},this.__internal_openSubscriptionDetails=e=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_openSubscriptionDetails(e):this.preopenSubscriptionDetails=e??null},this.__internal_closeSubscriptionDetails=()=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_closeSubscriptionDetails():this.preopenSubscriptionDetails=null},this.__internal_openReverification=e=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_openReverification(e):this.preopenUserVerification=e},this.__internal_closeReverification=()=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_closeReverification():this.preopenUserVerification=null},this.__internal_openEnableOrganizationsPrompt=e=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_openEnableOrganizationsPrompt(e):this.preopenEnableOrganizationsPrompt=e},this.__internal_closeEnableOrganizationsPrompt=()=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_closeEnableOrganizationsPrompt():this.preopenEnableOrganizationsPrompt=null},this.openGoogleOneTap=e=>{this.clerkjs&&this.loaded?this.clerkjs.openGoogleOneTap(e):this.preopenOneTap=e},this.closeGoogleOneTap=()=>{this.clerkjs&&this.loaded?this.clerkjs.closeGoogleOneTap():this.preopenOneTap=null},this.openUserProfile=e=>{this.clerkjs&&this.loaded?this.clerkjs.openUserProfile(e):this.preopenUserProfile=e},this.closeUserProfile=()=>{this.clerkjs&&this.loaded?this.clerkjs.closeUserProfile():this.preopenUserProfile=null},this.openOrganizationProfile=e=>{this.clerkjs&&this.loaded?this.clerkjs.openOrganizationProfile(e):this.preopenOrganizationProfile=e},this.closeOrganizationProfile=()=>{this.clerkjs&&this.loaded?this.clerkjs.closeOrganizationProfile():this.preopenOrganizationProfile=null},this.openCreateOrganization=e=>{this.clerkjs&&this.loaded?this.clerkjs.openCreateOrganization(e):this.preopenCreateOrganization=e},this.closeCreateOrganization=()=>{this.clerkjs&&this.loaded?this.clerkjs.closeCreateOrganization():this.preopenCreateOrganization=null},this.openWaitlist=e=>{this.clerkjs&&this.loaded?this.clerkjs.openWaitlist(e):this.preOpenWaitlist=e},this.closeWaitlist=()=>{this.clerkjs&&this.loaded?this.clerkjs.closeWaitlist():this.preOpenWaitlist=null},this.openSignUp=e=>{this.clerkjs&&this.loaded?this.clerkjs.openSignUp(e):this.preopenSignUp=e},this.closeSignUp=()=>{this.clerkjs&&this.loaded?this.clerkjs.closeSignUp():this.preopenSignUp=null}
16,this.mountSignIn=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountSignIn(e,t):this.premountSignInNodes.set(e,t)},this.unmountSignIn=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountSignIn(e):this.premountSignInNodes.delete(e)},this.mountSignUp=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountSignUp(e,t):this.premountSignUpNodes.set(e,t)},this.unmountSignUp=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountSignUp(e):this.premountSignUpNodes.delete(e)},this.mountUserAvatar=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountUserAvatar(e,t):this.premountUserAvatarNodes.set(e,t)},this.unmountUserAvatar=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountUserAvatar(e):this.premountUserAvatarNodes.delete(e)},this.mountUserProfile=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountUserProfile(e,t):this.premountUserProfileNodes.set(e,t)},this.unmountUserProfile=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountUserProfile(e):this.premountUserProfileNodes.delete(e)},this.mountOrganizationProfile=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountOrganizationProfile(e,t):this.premountOrganizationProfileNodes.set(e,t)},this.unmountOrganizationProfile=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountOrganizationProfile(e):this.premountOrganizationProfileNodes.delete(e)},this.mountCreateOrganization=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountCreateOrganization(e,t):this.premountCreateOrganizationNodes.set(e,t)},this.unmountCreateOrganization=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountCreateOrganization(e):this.premountCreateOrganizationNodes.delete(e)},this.mountOrganizationSwitcher=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountOrganizationSwitcher(e,t):this.premountOrganizationSwitcherNodes.set(e,t)},this.unmountOrganizationSwitcher=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountOrganizationSwitcher(e):this.premountOrganizationSwitcherNodes.delete(e)},this.__experimental_prefetchOrganizationSwitcher=()=>{let e=()=>this.clerkjs?.__experimental_prefetchOrganizationSwitcher();this.clerkjs&&this.loaded?e():this.premountMethodCalls.set(`__experimental_prefetchOrganizationSwitcher`,e)},this.mountOrganizationList=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountOrganizationList(e,t):this.premountOrganizationListNodes.set(e,t)},this.unmountOrganizationList=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountOrganizationList(e):this.premountOrganizationListNodes.delete(e)},this.mountUserButton=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountUserButton(e,t):this.premountUserButtonNodes.set(e,t)},this.unmountUserButton=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountUserButton(e):this.premountUserButtonNodes.delete(e)},this.mountWaitlist=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountWaitlist(e,t):this.premountWaitlistNodes.set(e,t)},this.unmountWaitlist=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountWaitlist(e):this.premountWaitlistNodes.delete(e)},this.mountPricingTable=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountPricingTable(e,t):this.premountPricingTableNodes.set(e,t)},this.unmountPricingTable=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountPricingTable(e):this.premountPricingTableNodes.delete(e)},this.mountAPIKeys=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountAPIKeys(e,t):this.premountAPIKeysNodes.set(e,t)},this.unmountAPIKeys=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountAPIKeys(e):this.premountAPIKeysNodes.delete(e)},this.__internal_mountConfigureSSO=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_mountConfigureSSO(e,t):this.premountConfigureSSONodes.set(e,t)},this.__internal_unmountConfigureSSO=e=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_unmountConfigureSSO(e):this.premountConfigureSSONodes.delete(e)},this.__internal_mountOAuthConsent=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_mountOAuthConsent(e,t):this.premountOAuthConsentNodes.set(e,t)},this.__internal_unmountOAuthConsent=e=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_unmountOAuthConsent(e):this.premountOAuthConsentNodes.delete(e)},this.mountOAuthConsent=(e,t)=>{this.__internal_mountOAuthConsent(e,t)},this.unmountOAuthConsent=e=>{this.__internal_unmountOAuthConsent(e)},this.mountTaskChooseOrganization=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountTaskChooseOrganization(e,t):this.premountTaskChooseOrganizationNodes.set(e,t)},this.unmountTaskChooseOrganization=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountTaskChooseOrganization(e):this.premountTaskChooseOrganizationNodes.delete(e)},this.mountTaskResetPassword=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountTaskResetPassword(e,t):this.premountTaskResetPasswordNodes.set(e,t)},this.unmountTaskResetPassword=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountTaskResetPassword(e):this.premountTaskResetPasswordNodes.delete(e)},this.mountTaskSetupMFA=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountTaskSetupMFA(e,t):this.premountTaskSetupMFANodes.set(e,t)},this.unmountTaskSetupMFA=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountTaskSetupMFA(e):this.premountTaskSetupMFANodes.delete(e)},this.addListener=(e,t)=>{if(this.clerkjs)return this.clerkjs.addListener(e,t);{let n=()=>{let t=this.premountAddListenerCalls.get(e);t?.handlers&&(t?.handlers.nativeUnsubscribe?.(),this.premountAddListenerCalls.delete(e))};return this.premountAddListenerCalls.set(e,{options:t,handlers:{unsubscribe:n,nativeUnsubscribe:void 0}}),n}},this.navigate=e=>{let t=()=>this.clerkjs?.navigate(e);this.clerkjs&&this.loaded?t():this.premountMethodCalls.set(`navigate`,t)},this.redirectWithAuth=async(...e)=>{let t=()=>this.clerkjs?.redirectWithAuth(...e);if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`redirectWithAuth`,t)},this.redirectToSignIn=async e=>{let t=()=>this.clerkjs?.redirectToSignIn(e);if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`redirectToSignIn`,t)},this.redirectToSignUp=async e=>{let t=()=>this.clerkjs?.redirectToSignUp(e);if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`redirectToSignUp`,t)},this.redirectToUserProfile=async()=>{let e=()=>this.clerkjs?.redirectToUserProfile();if(this.clerkjs&&this.loaded)return e();this.premountMethodCalls.set(`redirectToUserProfile`,e)},this.redirectToAfterSignUp=()=>{let e=()=>this.clerkjs?.redirectToAfterSignUp();if(this.clerkjs&&this.loaded)return e();this.premountMethodCalls.set(`redirectToAfterSignUp`,e)},this.redirectToAfterSignIn=()=>{let e=()=>this.clerkjs?.redirectToAfterSignIn();this.clerkjs&&this.loaded?e():this.premountMethodCalls.set(`redirectToAfterSignIn`,e)},this.redirectToAfterSignOut=()=>{let e=()=>this.clerkjs?.redirectToAfterSignOut();this.clerkjs&&this.loaded?e():this.premountMethodCalls.set(`redirectToAfterSignOut`,e)},this.redirectToOrganizationProfile=async()=>{let e=()=>this.clerkjs?.redirectToOrganizationProfile();if(this.clerkjs&&this.loaded)return e();this.premountMethodCalls.set(`redirectToOrganizationProfile`,e)},this.redirectToCreateOrganization=async()=>{let e=()=>this.clerkjs?.redirectToCreateOrganization();if(this.clerkjs&&this.loaded)return e();this.premountMethodCalls.set(`redirectToCreateOrganization`,e)},this.redirectToWaitlist=async()=>{let e=()=>this.clerkjs?.redirectToWaitlist();if(this.clerkjs&&this.loaded)return e();this.premountMethodCalls.set(`redirectToWaitlist`,e)},this.redirectToTasks=async e=>{let t=()=>this.clerkjs?.redirectToTasks(e);if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`redirectToTasks`,t)},this.handleRedirectCallback=async e=>{let t=()=>this.clerkjs?.handleRedirectCallback(e);this.clerkjs&&this.loaded?t()?.catch(()=>{}):this.premountMethodCalls.set(`handleRedirectCallback`,t)},this.handleGoogleOneTapCallback=async(e,t)=>{let n=()=>this.clerkjs?.handleGoogleOneTapCallback(e,t);this.clerkjs&&this.loaded?n()?.catch(()=>{}):this.premountMethodCalls.set(`handleGoogleOneTapCallback`,n)},this.__internal_handleResourceCallback=async(e,t,n)=>{let r=()=>this.clerkjs?.__internal_handleResourceCallback(e,t,n);if(this.clerkjs&&this.loaded)return r();this.premountMethodCalls.set(`__internal_handleResourceCallback`,r)},this.handleEmailLinkVerification=async e=>{let t=()=>this.clerkjs?.handleEmailLinkVerification(e);if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`handleEmailLinkVerification`,t)},this.authenticateWithMetamask=async e=>{let t=()=>this.clerkjs?.authenticateWithMetamask(e);if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`authenticateWithMetamask`,t)},this.authenticateWithCoinbaseWallet=async e=>{let t=()=>this.clerkjs?.authenticateWithCoinbaseWallet(e);if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`authenticateWithCoinbaseWallet`,t)},this.authenticateWithBase=async e=>{let t=()=>this.clerkjs?.authenticateWithBase(e);if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`authenticateWithBase`,t)},this.authenticateWithOKXWallet=async e=>{let t=()=>this.clerkjs?.authenticateWithOKXWallet(e);if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`authenticateWithOKXWallet`,t)},this.authenticateWithSolana=async e=>{let t=()=>this.clerkjs?.authenticateWithSolana(e);if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`authenticateWithSolana`,t)},this.authenticateWithWeb3=async e=>{let t=()=>this.clerkjs?.authenticateWithWeb3(e);
16if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`authenticateWithWeb3`,t)},this.authenticateWithGoogleOneTap=async e=>(await this.#s()).authenticateWithGoogleOneTap(e),this.__internal_loadStripeJs=async()=>(await this.#s()).__internal_loadStripeJs(),this.createOrganization=async e=>{let t=()=>this.clerkjs?.createOrganization(e);if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`createOrganization`,t)},this.getOrganization=async e=>{let t=()=>this.clerkjs?.getOrganization(e);if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`getOrganization`,t)},this.joinWaitlist=async e=>{let t=()=>this.clerkjs?.joinWaitlist(e);if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`joinWaitlist`,t)},this.signOut=async(...e)=>{let t=()=>this.clerkjs?.signOut(...e);if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`signOut`,t)},this.__internal_attemptToEnableEnvironmentSetting=e=>{let t=()=>this.clerkjs?.__internal_attemptToEnableEnvironmentSetting(e);if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`__internal_attemptToEnableEnvironmentSetting`,t)},this.#r=e?.publishableKey,this.#n=e?.proxyUrl,this.#t=e?.domain,this.options=e,this.Clerk=e?.Clerk||null,this.mode=Xn()?`browser`:`server`,this.#a=new ba(this),this.options.sdkMetadata||(this.options.sdkMetadata=xa),this.#i.emit(aa.Status,`loading`),this.#i.prioritizedOn(aa.Status,e=>this.#e=e),this.#r&&this.options.experimental?.runtimeEnvironment===`headless`&&this.options.Clerk?this.loadHeadlessClerk():this.#r&&this.getEntryChunks()}loadHeadlessClerk(){let e=xr(this.options.Clerk)?new this.options.Clerk(this.#r,{proxyUrl:this.proxyUrl,domain:this.domain}):this.options.Clerk;if(!e){this.#i.emit(aa.Status,`error`);return}let t=()=>{this.replayInterceptedInvocations(e)};e.loaded?t():e.load(this.options).then(()=>t()).catch(e=>{this.#i.emit(aa.Status,`error`),this.emitLoaded()})}get sdkMetadata(){return this.clerkjs?.sdkMetadata||this.options.sdkMetadata||void 0}get instanceType(){return this.clerkjs?.instanceType}get frontendApi(){return this.clerkjs?.frontendApi||``}get isStandardBrowser(){return this.clerkjs?.isStandardBrowser||this.options.standardBrowser||!1}get isSatellite(){return typeof window<`u`&&window.location?Kn(this.options.isSatellite,new URL(window.location.href),!1):typeof this.options.isSatellite==`function`&&Hn.throw(er)}#s(){return new Promise(e=>{this.addOnLoaded(()=>e(this.clerkjs))})}async getEntryChunks(){if(!(this.mode!==`browser`||this.loaded)){typeof window<`u`&&(window.__clerk_publishable_key=this.#r,window.__clerk_proxy_url=this.proxyUrl,window.__clerk_domain=this.domain);try{let e=await this.getClerkJsEntryChunk();if(!e.loaded){this.beforeLoad(e);let t=this.options.standardBrowser!==!1&&!this.options.Clerk||this.options.ui?.ClerkUI?await this.getClerkUIEntryChunk():void 0;await e.load({...this.options,ui:{...this.options.ui,ClerkUI:t}})}e.loaded&&this.replayInterceptedInvocations(e)}catch(e){let t=e;this.#i.emit(aa.Status,`error`),console.error(t.stack||t.message||t);return}}}async getClerkJsEntryChunk(){if((!this.options.Clerk||this.options.__internal_clerkJSUrl)&&!__BUILD_DISABLE_RHC__&&await Vi({...this.options,publishableKey:this.#r,proxyUrl:this.proxyUrl,domain:this.domain,nonce:this.options.nonce}),this.options.Clerk&&!this.options.__internal_clerkJSUrl&&(globalThis.Clerk=xr(this.options.Clerk)?new this.options.Clerk(this.#r,{proxyUrl:this.proxyUrl,domain:this.domain}):this.options.Clerk),!globalThis.Clerk)throw Error(`Failed to download latest ClerkJS. Contact [email protected].`);return globalThis.Clerk}async getClerkUIEntryChunk(){let e=this.options.ui,t=!!this.options.__internal_clerkUIUrl;if(e?.ClerkUI&&!t)return e.ClerkUI;if(!((e||this.options.prefetchUI===!1)&&!t)&&!__BUILD_DISABLE_RHC__){if(await Hi({...this.options,publishableKey:this.#r,proxyUrl:this.proxyUrl,domain:this.domain,nonce:this.options.nonce}),!globalThis.__internal_ClerkUICtor)throw Error(`Failed to download latest Clerk UI. Contact [email protected].`);return globalThis.__internal_ClerkUICtor}}get version(){return this.clerkjs?.version}get uiVersion(){return this.clerkjs?.uiVersion}get client(){if(this.clerkjs)return this.clerkjs.client}get session(){if(this.clerkjs)return this.clerkjs.session}
16get user(){if(this.clerkjs)return this.clerkjs.user}get organization(){if(this.clerkjs)return this.clerkjs.organization}get telemetry(){if(this.clerkjs)return this.clerkjs.telemetry}get __internal_environment(){if(this.clerkjs)return this.clerkjs.__internal_environment}get isSignedIn(){return this.clerkjs?this.clerkjs.isSignedIn:!1}get billing(){return this.clerkjs?.billing}get __internal_state(){return this.loaded&&this.clerkjs?this.clerkjs.__internal_state:this.#a}get apiKeys(){return this.clerkjs?.apiKeys}get oauthApplication(){return this.clerkjs?.oauthApplication}__internal_setEnvironment(...e){if(this.clerkjs&&`__internal_setEnvironment`in this.clerkjs)this.clerkjs.__internal_setEnvironment(e);else return}get __internal_lastEmittedResources(){return this.clerkjs?.__internal_lastEmittedResources}get __internal_hasOAuthTransport(){return this.clerkjs?.__internal_hasOAuthTransport||!1}get __internal_oauthTransport(){return this.clerkjs?.__internal_oauthTransport||null}};function Ca(){try{return ma(`19.2.7`,[[18,0,-1,0],[19,0,0,3],[19,1,1,4],[19,2,2,3],[19,3,3,0]])}catch{return!1}}var wa=Ca();function Ta(e){let{initialState:t,children:n,...r}=e,{isomorphicClerk:i,clerkStatus:a}=Oa(br(r));return _.createElement(Cn,{initialState:t,clerk:i,clerkStatus:a},n)}var Ea=wr(Ta,`ClerkProvider`,Zn);Ea.displayName=`ClerkProvider`;var Da=wa?`shared`:``,Oa=e=>{let t=_.useMemo(()=>({clerkUIVariant:Da,...e}),[e]),n=_.useRef(Sa.getOrCreateInstance(t)),[r,i]=_.useState(n.current.status);return _.useEffect(()=>{n.current.__internal_updateProps({appearance:e.appearance})},[e.appearance]),_.useEffect(()=>{n.current.__internal_updateProps({options:e})},[e.localization]),_.useEffect(()=>(n.current.on(`status`,i),()=>{n.current&&n.current.off(`status`,i),Sa.clearInstance()}),[]),{isomorphicClerk:n.current,clerkStatus:r}},ka=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),Aa=o(((e,t)=>{t.exports=ka()})),H=c(Aa(),1);if(typeof window<`u`&&!window.global&&(window.global=typeof global>`u`?window:global),globalThis.__clerkSharedModules){let e=globalThis.__clerkSharedModules.react?.version;e&&e!==`19.2.7`&&console.warn(`[@clerk/ui/register] React version mismatch detected. Already registered: ${e}, current import: 19.2.7. This may cause issues with the shared @clerk/ui variant.`)}else globalThis.__clerkSharedModules={react:_,"react-dom":Jn,"react-dom/client":v,"react/jsx-runtime":H};var ja=B(({clerk:e,children:t,...n})=>{let{appearance:r,getContainer:i,component:a,signUpFallbackRedirectUrl:o,forceRedirectUrl:s,fallbackRedirectUrl:c,signUpForceRedirectUrl:l,mode:u,initialValues:d,withSignUp:f,oauthFlow:p,...m}=n;t=gr(t,`Sign in`);let h=hr(t)(`SignInButton`),g=()=>{let t={forceRedirectUrl:s,fallbackRedirectUrl:c,signUpFallbackRedirectUrl:o,signUpForceRedirectUrl:l,initialValues:d,withSignUp:f,oauthFlow:p};return u===`modal`?e.openSignIn({...t,appearance:r,getContainer:i}):e.redirectToSignIn({...t,signInFallbackRedirectUrl:c,signInForceRedirectUrl:s})},v=async e=>(h&&typeof h==`object`&&`props`in h&&await _r(h.props.onClick)(e),g()),y={...m,onClick:v};return _.cloneElement(h,y)},{component:`SignInButton`,renderWhileLoading:!0});B(({clerk:e,children:t,...n})=>{let{redirectUrl:r,getContainer:i,component:a,...o}=n;t=gr(t,`Sign in with Metamask`);let s=hr(t)(`SignInWithMetamaskButton`),c=async()=>{async function t(){await e.authenticateWithMetamask({redirectUrl:r||void 0})}t()},l=async e=>(await _r(s.props.onClick)(e),c()),u={...o,onClick:l};return _.cloneElement(s,u)},{component:`SignInWithMetamask`,renderWhileLoading:!0}),B(({clerk:e,children:t,...n})=>{let{redirectUrl:r=`/`,sessionId:i,signOutOptions:a,getContainer:o,component:s,...c}=n;a&&ea("SignOutButton `signOutOptions`","Use the `redirectUrl` and `sessionId` props directly instead."),t=gr(t,`Sign out`);let l=hr(t)(`SignOutButton`),u=()=>e.signOut({redirectUrl:r,...i!==void 0&&{sessionId:i},...a}
16),d=async e=>(await _r(l.props.onClick)(e),u()),f={...c,onClick:d};return _.cloneElement(l,f)},{component:`SignOutButton`,renderWhileLoading:!0});var Ma=B(({clerk:e,children:t,...n})=>{let{appearance:r,unsafeMetadata:i,getContainer:a,component:o,fallbackRedirectUrl:s,forceRedirectUrl:c,signInFallbackRedirectUrl:l,signInForceRedirectUrl:u,mode:d,initialValues:f,oauthFlow:p,...m}=n;t=gr(t,`Sign up`);let h=hr(t)(`SignUpButton`),g=()=>{let t={fallbackRedirectUrl:s,forceRedirectUrl:c,signInFallbackRedirectUrl:l,signInForceRedirectUrl:u,initialValues:f,oauthFlow:p};return d===`modal`?e.openSignUp({...t,appearance:r,unsafeMetadata:i,getContainer:a}):e.redirectToSignUp({...t,signUpFallbackRedirectUrl:s,signUpForceRedirectUrl:c})},v=async e=>(h&&typeof h==`object`&&`props`in h&&await _r(h.props.onClick)(e),g()),y={...m,onClick:v};return _.cloneElement(h,y)},{component:`SignUpButton`,renderWhileLoading:!0});Un({packageName:`@clerk/react`}),Qi(`@clerk/react`);var Na=8e3;function Pa({signedOut:e,signedIn:t}){let{isLoaded:n,isSignedIn:r}=_i(),[i,a]=(0,_.useState)(!1);return(0,_.useEffect)(()=>{if(n){a(!1);return}let e=window.setTimeout(()=>a(!0),Na);return()=>window.clearTimeout(e)},[n]),!n&&i?(0,H.jsxs)(`p`,{className:`site-error`,role:`alert`,children:[`Sign-in cannot reach Clerk (`,(0,H.jsx)(`code`,{children:`clerk.theimmersionapp.com`}),` is blocked). In Cloudflare DNS, set the `,(0,H.jsx)(`code`,{children:`clerk`}),` and `,(0,H.jsx)(`code`,{children:`accounts`}),` records to DNS only (grey cloud), not Proxied. If they already are, check Overview → Zone Hold, then Clerk Dashboard → Domains → deploy certificates.`]}):n?(0,H.jsx)(H.Fragment,{children:r?t:e}):(0,H.jsx)(`p`,{className:`site-done-blurb`,children:`Loading sign-in…`})}var Fa=`immersion.marketingEmail`;function Ia(){try{return localStorage.getItem(Fa)===`1`}catch{return!1}}function La(e){try{e?localStorage.setItem(Fa,`1`):localStorage.removeItem(Fa)}catch{}}function Ra(){try{localStorage.removeItem(Fa)}catch{}}function za(){let[e,t]=(0,_.useState)(Ia);return(0,H.jsxs)(`label`,{className:`site-opt-in`,children:[(0,H.jsx)(`input`,{type:`checkbox`,checked:e,onChange:e=>{let n=e.target.checked;t(n),La(n)}}),(0,H.jsx)(`span`,{children:`Email me about new features (optional)`})]})}var U=class extends Error{status;constructor(e,t){super(e),this.name=`ApiError`,this.status=t}};
16function Ba(){return`https://api.theimmersionapp.com`}function Va(){return!0}function Ha(e){let t=Ba();return t?`${t}${e}`:e}async function Ua(e){try{let t=await e.json();if(t&&typeof t==`object`&&`error`in t&&typeof t.error==`string`)return t.error}catch{}return`Request failed (${e.status})`}async function Wa(e,t,n){let r=new Headers(t.headers);!r.has(`Content-Type`)&&t.body&&r.set(`Content-Type`,`application/json`);let i=n?await n():null;i&&r.set(`Authorization`,`Bearer ${i}`);try{return await fetch(Ha(e),{...t,headers:r})}catch{throw new U(`Can’t reach the API. Is the Worker running? (cd server && npm run dev)`,0)}}async function Ga(e,t){let n=await Wa(`/api/v1/stories`,{method:`POST`,body:JSON.stringify(e)},t);if(!n.ok)throw new U(await Ua(n),n.status);return await n.json()}async function Ka(e,t){let n=await Wa(`/api/v1/words?language=${encodeURIComponent(e)}`,{method:`GET`},t);if(!n.ok)throw new U(await Ua(n),n.status);return(await n.json()).words??[]}async function qa(e,t,n){let r=await Wa(`/api/v1/words`,{method:`POST`,body:JSON.stringify({language:e,words:t})},n);if(!r.ok)throw new U(await Ua(r),r.status);return await r.json()}async function Ja(e,t,n){let r=await Wa(`/api/v1/words/${encodeURIComponent(e)}`,{method:`PATCH`,body:JSON.stringify(t)},n);if(!r.ok)throw new U(await Ua(r),r.status);return(await r.json()).word}async function Ya(e,t){let n=await Wa(`/api/v1/words/${encodeURIComponent(e)}`,{method:`DELETE`},t);if(!n.ok)throw new U(await Ua(n),n.status)}async function Xa(e,t){let n=await Wa(`/api/v1/words?language=${encodeURIComponent(e)}`,{method:`DELETE`},t);if(!n.ok)throw new U(await Ua(n),n.status)}async function Za(e,t){let n=await Wa(`/api/v1/lookups?language=${encodeURIComponent(e)}`,{method:`GET`},t);if(!n.ok)throw new U(await Ua(n),n.status);return(await n.json()).lookups??[]}async function Qa(e,t){if(t)try{let n=await t();if(!n||!(await Wa(`/api/v1/lookups`,{method:`POST`,body:JSON.stringify(e)},async()=>n)).ok)return}catch{}}async function $a(e){let t=await Wa(`/api/v1/me`,{method:`GET`},e);if(!t.ok)throw new U(await Ua(t),t.status);return await t.json()}async function eo(e=`zh-Hans`,t){let n=await Wa(`/api/v1/seen?language=${encodeURIComponent(e)}`,{method:`GET`},t);if(!n.ok)throw new U(await Ua(n),n.status);let r=await n.json();return{uniqueWords:Number(r.uniqueWords)||0,uniqueChars:Number(r.uniqueChars)||0,uniqueHovered:Number(r.uniqueHovered)||0,pages:Number(r.pages)||0,streak:Number(r.streak)||0,longestStreak:Number(r.longestStreak)||0,lastActiveDay:typeof r.lastActiveDay==`string`?r.lastActiveDay:``,lookups:Number(r.lookups)||0,savedWords:Number(r.savedWords)||0}}function to(e){return e?e.uniqueWords>0||e.uniqueChars>0||e.pages>0||e.streak>0:!1}async function no(){let e=await Wa(`/api/v1/billing/config`,{method:`GET`});if(!e.ok)throw new U(await Ua(e),e.status);return await e.json()}async function ro(e,t){let n=await Wa(`/api/v1/billing/checkout`,{method:`POST`,body:JSON.stringify({plan:e})},t);if(!n.ok)throw new U(await Ua(n),n.status);return await n.json()}async function io(e){let t=await Wa(`/api/v1/billing/portal`,{method:`POST`,body:JSON.stringify({})},e);if(!t.ok)throw new U(await Ua(t),t.status);return await t.json()}async function ao(e,t){let n=await Wa(`/api/v1/me`,{method:`PUT`,body:JSON.stringify(e)},t);if(!n.ok)throw new U(await Ua(n),n.status);return await n.json()}async function oo(e,t){let n=await Wa(`/api/v1/lists?language=${encodeURIComponent(e)}`,{method:`GET`},t);if(!n.ok)throw new U(await Ua(n),n.status);let r=await n.json();return{lists:r.lists??[],activeListId:r.activeListId??null}}async function so(e,t){let n=await Wa(`/api/v1/lists`,{method:`POST`,body:JSON.stringify(e)},t);if(!n.ok)throw new U(await Ua(n),n.status);return await n.json()}async function co(e,t,n){let r=await Wa(`/api/v1/lists/${encodeURIComponent(e)}`,{method:`PUT`,body:JSON.stringify(t)},n);if(!r.ok)throw new U(await Ua(r),r.status);return(await r.json()).list}async function W(e,t){let n=await Wa(`/api/v1/lists/${encodeURIComponent(e)}`,{method:`DELETE`},t);if(!n.ok)throw new U(await Ua(n),n.status);return(await n.json()).activeListId??null}async function G(e,t){let n=await Wa(`/api/v1/lists/active`,{method:`PUT`,body:JSON.stringify({listId:e})},t);
16if(!n.ok)throw new U(await Ua(n),n.status);return(await n.json()).activeListId}async function lo(e,t=``,n=`web`,r={}){let i=await Wa(`/api/v1/waitlist`,{method:`POST`,body:JSON.stringify({email:e,website:t,source:n,...r.interest?{interest:r.interest}:{},...r.marketing===void 0?{}:{marketing:r.marketing}})});if(!i.ok)throw new U(await Ua(i),i.status);return await i.json()}async function uo(e){let t=await Wa(`/api/v1/auth/extension-token`,{method:`POST`,body:JSON.stringify({})},e);if(!t.ok)throw new U(await Ua(t),t.status);return await t.json()}var fo=`IMMERSION`,po=`https://apps.apple.com/app/the-immersion-app/id6803826478`,mo=`https://chromewebstore.google.com/detail/immersion/kocfjhmikldljogaobiaobjkgchlhmnk`,ho=`[email protected]`,go=`https://theimmersionapp.com`,_o=3.99,vo=29.99;function yo(){return typeof window>`u`?!1:new URLSearchParams(window.location.search).get(`extensionAuth`)===`1`}function bo(){return new URLSearchParams(window.location.search).get(`iosAuth`)===`1`}function xo(){let{isSignedIn:e,getToken:t}=_i();return(0,_.useEffect)(()=>{if(!e)return;let n=!1,r=async()=>{try{let e=await t({skipCache:!0});if(n||!e)return;window.postMessage({type:`VOCABLEARNING_EXTENSION_TOKEN`,token:e},window.location.origin)}catch{}},i=e=>{e.source===window&&e.data?.type===`VOCABLEARNING_EXTENSION_TOKEN_PLEASE`&&r()};return window.addEventListener(`message`,i),r(),()=>{n=!0,window.removeEventListener(`message`,i)}},[e,t]),null}function So({showExtensionBanner:e=!0}){return Va()?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(xo,{}),e&&yo()?(0,H.jsx)(Co,{variant:`banner`}):null,bo()?(0,H.jsx)(wo,{}):null]}):null}function Co({variant:e=`hero`}){let{isSignedIn:t}=_i(),[n,r]=(0,_.useState)(`idle`),[i,a]=(0,_.useState)(null);(0,_.useEffect)(()=>{if(!t)return;let e=!1,n=t=>{if(t.source!==window)return;let n=t.data;!n||n.type!==`VOCABLEARNING_EXTENSION_TOKEN_ACK`||e||(n.ok?(r(`done`),a(null)):(r(`error`),a(typeof n.error==`string`?n.error:`Extension did not accept token`)))};return window.addEventListener(`message`,n),r(`sending`),window.postMessage({type:`VOCABLEARNING_EXTENSION_TOKEN_PLEASE`},window.location.origin),()=>{e=!0,window.removeEventListener(`message`,n)}},[t]);let o=t?n===`done`?(0,H.jsx)(`p`,{className:e===`hero`?`site-lede`:void 0,children:`You’re signed in. The extension has your session — you can close this tab.`}):n===`error`?(0,H.jsx)(`p`,{className:e===`hero`?`site-lede sync-error`:`sync-error`,children:i??`Could not connect`}):(0,H.jsx)(`p`,{className:e===`hero`?`site-lede`:void 0,children:`Sending session to the extension…`}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`p`,{className:e===`hero`?`site-lede`:void 0,children:[`Sign in with Google or Apple to connect the `,fo,` extension.`]}),(0,H.jsx)(`div`,{className:`extension-auth-actions`,children:(0,H.jsx)(Pa,{signedOut:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(ja,{mode:`modal`,children:(0,H.jsx)(`button`,{type:`button`,className:`site-submit`,children:`Sign in`})}),(0,H.jsx)(Ma,{mode:`modal`,children:(0,H.jsx)(`button`,{type:`button`,className:`site-secondary`,children:`Sign up`})}),(0,H.jsx)(za,{})]}),signedIn:null})})]});return e===`hero`?(0,H.jsx)(`div`,{className:`site-auth`,role:`status`,children:o}):(0,H.jsxs)(`div`,{className:`extension-auth-banner`,role:`status`,children:[(0,H.jsx)(`strong`,{children:`Chrome extension login`}),o]})}function wo(){let{isSignedIn:e,getToken:t}=_i(),[n,r]=(0,_.useState)(`idle`),[i,a]=(0,_.useState)(null);return(0,_.useEffect)(()=>{if(!e)return;let n=!1;return r(`minting`),a(null),(async()=>{try{let e=new URLSearchParams(window.location.search),i=e.get(`api`)?.trim().replace(/\/$/,``),a=e.get(`redirect`)?.trim()||`immersion://auth`,o;if(i){let e=await t({skipCache:!0});if(!e)throw Error(`No Clerk session`);let n=await fetch(`${i}/api/v1/auth/extension-token`,{method:`POST`,headers:{Authorization:`Bearer ${e}`,"Content-Type":`application/json`,Accept:`application/json`},body:`{}`});if(!n.ok){let e=await n.text();throw Error(e||`Mint failed (${n.status})`)}o=await n.json()}else o=await uo(async()=>t({skipCache:!0}));if(n)return;r(`redirecting`);let s=new URL(a);s.searchParams.set(`token`,o.token),s.searchParams.set(`expiresAt`,String(o.expiresAt)),window.location.replace(s.toString())}catch(e){if(n)return;r(`error`),a(e instanceof Error?e.message:`Could not create session`)}})(),()=>{n=!0}},[e,t]),(0,H.jsxs)(`div`,{className:`extension-auth-banner`,role:`status`,children:[(0,H.jsx)(`strong`,{children:`iPhone login`}),e?n===`error`?(0,H.jsx)(`p`,{className:`sync-error`,children:i??`Could not connect`}):n===`redirecting`?(0,H.jsxs)(`p`,{children:[`Returning to `,fo,`…`]}):(0,H.jsx)(`p`,{children:`Creating your session…`}):(0,H.jsxs)(`div`,{className:`extension-auth-actions`,children:[(0,H.jsx)(`p`,{children:`Sign in with Google or Apple — same account as the web app.`}),(0,H.jsx)(Pa,{signedOut:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(ja,{mode:`modal`,children:(0,H.jsx)(`button`,{type:`button`,className:`site-submit`,children:`Sign in`})}),(0,H.jsx)(Ma,{mode:`modal`,children:(0,H.jsx)(`button`,{type:`button`,className:`site-secondary`,children:`Sign up`})}),(0,H.jsx)(za,{})]}),signedIn:null})]})]})}function To(){return Va()?(0,H.jsx)(`div`,{className:`auth-controls`,children:(0,H.jsx)(Pa,{signedOut:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(ja,{mode:`modal`,children:(0,H.jsx)(`button`,{type:`button`,className:`text-button auth-sign-in`,children:`Sign in`})}),(0,H.jsx)(Ma,{mode:`modal`,children:(0,H.jsx)(`button`,{type:`button`,className:`text-button auth-sign-in`,children:`Sign up`})})]}),signedIn:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Eo,{}),(0,H.jsx)(ri,{})]})})}):(0,H.jsx)(`span`,{className:`auth-local-badge`,title:`Add VITE_CLERK_PUBLISHABLE_KEY to .env.local to enable Google / Apple sign-in`,children:`Offline only`})}function Eo(){let{getToken:e}=_i(),[t,n]=(0,_.useState)(`Ext token`),[r,i]=(0,_.useState)(!1);return(0,H.jsx)(`button`,{type:`button`,className:`text-button auth-sign-in`,title:`Copy a long-lived API token for the Chrome extension or iOS (advanced)`,disabled:r,onClick:()=>{(async()=>{i(!0);try{let t=await uo(async()=>e({skipCache:!0}));await navigator.clipboard.writeText(t.token),n(`Copied`),window.setTimeout(()=>n(`Ext token`),1500)}catch{n(`Failed`),window.setTimeout(()=>n(`Ext token`),2e3)}finally{i(!1)}})()},children:r?`…`:t})}
16var Do=[`de`,`zh-Hans`,`fr`,`it`],Oo={de:{id:`de`,appName:`${fo} · Deutsch`,shortName:`Deutsch`,label:`German`,termLabel:`German`,code:`DE`,chipFill:`#000000`,chipText:`#FFCC00`,translateCode:`de`,speechLocale:`de-DE`,speechNameHints:/german|deutsch/i,hasArticles:!0,singularizeNouns:!0,hasPinyin:!1,standardizeHint:`Nouns get der/die/das and plurals become singular when possible.`},"zh-Hans":{id:`zh-Hans`,appName:`${fo} · 中文`,shortName:`中文`,label:`Chinese`,termLabel:`Chinese`,code:`ZH`,chipFill:`#DE2910`,chipText:`#FFDE00`,translateCode:`zh-CN`,speechLocale:`zh-CN`,speechNameHints:/chinese|mandarin|中文|普通话/i,hasArticles:!1,singularizeNouns:!1,hasPinyin:!0,romanizationLabel:`Pinyin`,standardizeHint:`Hanzi is stored with pinyin for study support.`},fr:{id:`fr`,appName:`${fo} · Français`,shortName:`Français`,label:`French`,termLabel:`French`,code:`FR`,chipFill:`#002395`,chipText:`#FFFFFF`,translateCode:`fr`,speechLocale:`fr-FR`,speechNameHints:/french|français|francais/i,hasArticles:!0,singularizeNouns:!0,hasPinyin:!1,standardizeHint:`Nouns get le/la/l’ and plurals become singular when possible.`},it:{id:`it`,appName:`${fo} · Italiano`,shortName:`Italiano`,label:`Italian`,termLabel:`Italian`,code:`IT`,chipFill:`#009246`,chipText:`#FFFFFF`,translateCode:`it`,speechLocale:`it-IT`,speechNameHints:/italian|italiano/i,hasArticles:!0,singularizeNouns:!0,hasPinyin:!1,standardizeHint:`Nouns get il/la/lo (etc.) and plurals become singular when possible.`},ja:{id:`ja`,appName:`${fo} · 日本語`,shortName:`日本語`,label:`Japanese`,termLabel:`Japanese`,code:`JA`,chipFill:`#BC002D`,chipText:`#FFFFFF`,translateCode:`ja`,speechLocale:`ja-JP`,speechNameHints:/japanese|日本語/i,hasArticles:!1,singularizeNouns:!1,hasPinyin:!0,romanizationLabel:`Romaji`,standardizeHint:`Japanese is stored with romaji for study support.`},es:{id:`es`,appName:`${fo} · Español`,shortName:`Español`,label:`Spanish`,termLabel:`Spanish`,code:`ES`,chipFill:`#AA151B`,chipText:`#F1BF00`,translateCode:`es`,speechLocale:`es-ES`,speechNameHints:/spanish|español|espanol/i,hasArticles:!0,singularizeNouns:!0,hasPinyin:!1,standardizeHint:`Nouns get el/la and plurals become singular when possible.`}};function ko(e){return e===`zh-Hans`||e===`de`||e===`it`||e===`fr`||e===`ja`||e===`es`}function Ao(e){return Oo[e]}function jo(e=window.location.search){let t=new URLSearchParams(e).get(`lang`);return ko(t)?t:null}function Mo(e){let t=new URL(window.location.href);return t.searchParams.set(`lang`,e),`${t.pathname}${t.search}${t.hash}`}var No=new Set([`hub`,`mixed`,`quiz`,`match`,`story`,`choice`,`listen`,`scramble`,`tones`]);function Po(e){return!!e&&No.has(e)}function Fo(e=window.location.search){let t=new URLSearchParams(e).get(`tab`);return t===`quick`||t===`study`||t===`words`?t:null}function Io(e=window.location.search){let t=new URLSearchParams(e).get(`mode`);return Po(t)?t:null}function Lo(e,t){let n=new URL(window.location.href);n.searchParams.set(`tab`,e),e===`study`&&t?n.searchParams.set(`mode`,t):e!==`study`&&n.searchParams.delete(`mode`),window.history.replaceState(null,``,`${n.pathname}${n.search}${n.hash}`)}var Ro={};function zo(e){return e.replace(`_`,`-`).toLowerCase()}function Bo(e,t){let n=Ao(t),r=zo(n.speechLocale),i=zo(e.lang),a=0;if(i===r)a+=100;else if(i.startsWith(r.split(`-`)[0]))a+=80;else if(n.speechNameHints.test(e.name))a+=50;else return-1;return/google/i.test(e.name)&&(a+=20),e.localService&&(a+=5),a}function Vo(e){if(e in Ro)return Ro[e]??null;let t=window.speechSynthesis.getVoices();if(t.length===0)return Ro[e]=null,null;let n=null,r=-1;for(let i of t){let t=Bo(i,e);t>r&&(r=t,n=i)}return Ro[e]=n,n}function Ho(e,t){window.speechSynthesis.cancel();let n=new SpeechSynthesisUtterance(e),r=Vo(t),i=Ao(t);r?(n.voice=r,n.lang=r.lang):n.lang=i.speechLocale,n.rate=t===`zh-Hans`||t===`ja`?.9:.85,window.speechSynthesis.resume(),window.speechSynthesis.speak(n)}function Uo(){return typeof window<`u`&&`speechSynthesis`in window}function Wo(e,t){if(!Uo()||!e.trim())return;let n=e.trim();if(window.speechSynthesis.getVoices().length===0){let e=()=>{window.speechSynthesis.removeEventListener(`voiceschanged`,e),window.setTimeout(()=>Ho(n,t),50)};window.speechSynthesis.addEventListener(`voiceschanged`,e),window.setTimeout(()=>{window.speechSynthesis.removeEventListener(`voiceschanged`,e),window.speechSynthesis.getVoices().length>0&&Ho(n,t)},750);return}Ho(n,t)}function Go(e){Uo()&&(Ro={},window.speechSynthesis.getVoices(),e&&Vo(e))}typeof window<`u`&&Uo()&&(Go(),window.speechSynthesis.addEventListener(`voiceschanged`,()=>Go()));var Ko=[{id:`sans`,cssClass:`han-sans`,label:`Sans`},{id:`serif`,cssClass:`han-serif`,label:`Serif`},{id:`xiaowei`,cssClass:`han-xiaowei`,label:`XiaoWei`},{id:`mashan`,cssClass:`han-mashan`,label:`Ma Shan`},{id:`huangyou`,cssClass:`han-huangyou`,label:`HuangYou`},{id:`longcang`,cssClass:`han-longcang`,label:`Long Cang`},{id:`kuaile`,cssClass:`han-kuaile`,label:`KuaiLe`}];function qo(e){let t=0;for(let n=0;n<e.length;n++)t=t*31+e.charCodeAt(n)>>>0;return t}function Jo(e){return Ko[qo(e)%Ko.length]}function Yo(e){return Ko[(e%Ko.length+Ko.length)%Ko.length]}function Xo(e){return`han ${e.cssClass}`}var Zo=Ko.filter(e=>e.id===`sans`||e.id===`serif`||e.id===`xiaowei`);function Qo(e){let t=Zo.length>0?Zo:Ko;return t[qo(e)%t.length]}
16function $o(e){return e===`zh-Hans`||e===`ja`}function es({onClick:e,label:t=`Hear pronunciation`,className:n=``}){return(0,H.jsx)(`button`,{type:`button`,className:[`speak-button`,n].filter(Boolean).join(` `),onClick:e,"aria-label":t,title:t,children:(0,H.jsxs)(`svg`,{className:`speak-icon`,viewBox:`0 0 24 24`,width:`20`,height:`20`,"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.8`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,H.jsx)(`path`,{d:`M3 10v4h3l4 3V7L6 10H3z`,fill:`currentColor`,stroke:`none`}),(0,H.jsx)(`path`,{d:`M14.5 9.5a3.5 3.5 0 0 1 0 5`}),(0,H.jsx)(`path`,{d:`M16.8 7a6.5 6.5 0 0 1 0 10`})]})})}function ts({done:e,total:t,correct:n,wrong:r,label:i}){let a=Math.max(t,1),o=Math.min(Math.max(e,0),a),s=Math.min(a,24),c=Math.round(o/a*s),l=Array.from({length:s},(e,t)=>t<c);return(0,H.jsxs)(`div`,{className:`session-chrome a-progress`,children:[(0,H.jsxs)(`span`,{className:`session-progress-count`,children:[String(o).padStart(2,`0`),` / `,String(a).padStart(2,`0`)]}),(0,H.jsx)(`div`,{className:`session-ticks`,"aria-label":`Session progress ${e} of ${t}`,role:`img`,children:l.map((e,t)=>(0,H.jsx)(`i`,{className:e?`on`:void 0},t))}),(0,H.jsxs)(`span`,{className:`session-score`,children:[i?`${i} · `:``,n,`✓ `,r,`✗`]})]})}function ns({count:e,wordCount:t,minimum:n=1,onChange:r}){let i=Math.max(n,Math.min(50,Math.max(t,n)));return(0,H.jsxs)(`div`,{className:`match-target`,children:[(0,H.jsx)(`span`,{className:`match-target-label`,children:`Words this session`}),(0,H.jsxs)(`div`,{className:`match-target-stepper`,children:[(0,H.jsx)(`button`,{type:`button`,className:`stepper-button`,onClick:()=>r(e-1),disabled:e<=n,"aria-label":`Fewer words`,children:`−`}),(0,H.jsx)(`span`,{className:`match-target-value`,children:e}),(0,H.jsx)(`button`,{type:`button`,className:`stepper-button`,onClick:()=>r(e+1),disabled:e>=i,"aria-label":`More words`,children:`+`})]}),(0,H.jsxs)(`p`,{className:`match-target-hint`,children:[`Up to `,Math.min(50,i),`.`]})]})}var rs={ā:1,á:2,ǎ:3,à:4,ē:1,é:2,ě:3,è:4,ī:1,í:2,ǐ:3,ì:4,ō:1,ó:2,ǒ:3,ò:4,ū:1,ú:2,ǔ:3,ù:4,ǖ:1,ǘ:2,ǚ:3,ǜ:4,Ā:1,Á:2,Ǎ:3,À:4,Ē:1,É:2,Ě:3,È:4,Ī:1,Í:2,Ǐ:3,Ì:4,Ō:1,Ó:2,Ǒ:3,Ò:4,Ū:1,Ú:2,Ǔ:3,Ù:4,Ǖ:1,Ǘ:2,Ǚ:3,Ǜ:4},is=/[bpmfdtnlgkhjqxzcsrwyBPMFDTNLGKHJQXZCSRWY'’]/,as=/[iuüIUÜvV]/;function os(e){for(let t of e){let e=rs[t];if(e)return e}let t=e.match(/[1-5]\s*$/);return t?Number(t[0]):5}function ss(e){return rs[e]!==void 0}function cs(e,t,n){let r=t;for(;r>n&&as.test(e[r-1]);)--r;if(r<=n)return n;let i=e.slice(Math.max(n,r-2),r).toLowerCase();return i===`zh`||i===`ch`||i===`sh`?r-2:is.test(e[r-1])?r-1:r}function ls(e){let t=[];for(let n=0;n<e.length;n++)ss(e[n])&&t.push(n);return(t.length<=1?[e]:(()=>{let n=[],r=0;for(let i=1;i<t.length;i++){let a=cs(e,t[i],r);a<=r||(n.push(e.slice(r,a)),r=a)}return n.push(e.slice(r)),n.filter(Boolean)})()).flatMap(ds)}function us(e){return ss(e)||`aeiouüvAEIOUÜV`.includes(e)}function ds(e){return fs(e).flatMap(ps)}function fs(e){let t=-1;for(let n=0;n<e.length;n++)if(ss(e[n])){t=n;break}if(t<0)return[e];let n=cs(e,t,0);return n<=0?[e]:[e.slice(0,n),e.slice(n)].filter(Boolean)}function ps(e){let t=-1;for(let n=0;n<e.length;n++)if(ss(e[n])){t=n;break}if(t<0)return[e];let n=t+1;if(n<e.length&&us(e[n])&&!ss(e[n])&&(n+=1),n<e.length&&e[n].toLowerCase()===`n`&&(n+=1,n<e.length&&e[n].toLowerCase()===`g`)){let t=e[n+1];(!t||!us(t))&&(n+=1)}if(n<e.length&&e[n].toLowerCase()===`r`){let t=e[n+1];(!t||!us(t))&&(n+=1)}return n>=e.length?[e]:[e.slice(0,n),e.slice(n)].filter(Boolean)}function ms(e){if(!/\d/.test(e))return[e];let t=e.match(/[^1-5]+[1-5]/g);if(!t||t.length<=1)return[e];let n=t.join(``).length;return n<e.length?[...t,e.slice(n)].filter(Boolean):t}function hs(e){return/[1-5]/.test(e)&&!/[āáǎàēéěèīíǐìōóǒòūúǔùǖǘǚǜĀÁǍÀĒÉĚÈĪÍǏÌŌÓǑÒŪÚǓÙǕǗǙǛ]/.test(e)?ms(e):ls(e)}function gs(e){return e.trim().split(/[\s\-]+/).filter(Boolean).flatMap(hs)}function _s(e){return gs(e).map(e=>({text:e,tone:os(e)}))}function vs(e){return`t${e}`}var ys=/[āáǎàēéěèīíǐìōóǒòūúǔùǖǘǚǜĀÁǍÀĒÉĚÈĪÍǏÌŌÓǑÒŪÚǓÙǕǗǙǛ]/;function bs(e){return ys.test(e)||/[1-5]/.test(e)}function xs(e){return bs(e)}function Ss(e){return e.trim().toLowerCase().replace(/ü/g,`v`).normalize(`NFD`).replace(/\p{M}/gu,``).replace(/[^a-z]/g,``)}function Cs(e){let t=e.trim();if(!t)return null;let n=t.toLowerCase().replace(/ü/g,`v`);if(/[1-5]/.test(n)&&!ys.test(t)){let e=n.match(/[a-z]+[1-5]/g);return e&&e.length>0?e.join(``):null}let r=gs(t);return r.length===0?null:r.map(e=>
16{let t=os(e),n=Ss(e);return n?`${n}${t}`:``}).filter(Boolean).join(``)}function ws(e){let t=Cs(e);return t?t.replace(/([1-5])(?=[a-z])/g,`$1 `):e.trim()}function Ts(e,t){let n=Ss(t),r=Ss(e);if(!n||!r||n!==r)return!1;if(!bs(e))return!0;let i=Cs(t),a=Cs(e);return!i||!a?!1:i===a}var Es={a:[`a`,`ā`,`á`,`ǎ`,`à`],e:[`e`,`ē`,`é`,`ě`,`è`],i:[`i`,`ī`,`í`,`ǐ`,`ì`],o:[`o`,`ō`,`ó`,`ǒ`,`ò`],u:[`u`,`ū`,`ú`,`ǔ`,`ù`],ü:[`ü`,`ǖ`,`ǘ`,`ǚ`,`ǜ`],v:[`ü`,`ǖ`,`ǘ`,`ǚ`,`ǜ`]};function Ds(e){return e.normalize(`NFD`).replace(/\p{M}/gu,``).replace(/[1-5]\s*$/u,``).replace(/v/gi,e=>e===`V`?`Ü`:`ü`)}function Os(e){let t=e.toLowerCase(),n=t.indexOf(`a`);if(n>=0)return n;let r=t.indexOf(`e`);if(r>=0)return r;let i=t.indexOf(`ou`);if(i>=0)return i;for(let e=t.length-1;e>=0;e--)if(`aeiouüv`.includes(t[e]))return e;return-1}function ks(e,t){let n=Es[e.toLowerCase()===`v`?`v`:e.toLowerCase()];if(!n)return e;let r=n[t===5?0:t];return e===e.toUpperCase()&&e.toLowerCase()!==e?r.toUpperCase():r}function As(e,t){let n=Ds(e);if(!n)return e;let r=Os(n);return r<0?n:n.slice(0,r)+ks(n[r],t)+n.slice(r+1)}function js(e){return e.filter(Boolean).join(` `)}function Ms(e){for(let t=e.length-1;t>0;t--){let n=Math.floor(Math.random()*(t+1));[e[t],e[n]]=[e[n],e[t]]}return e}function Ns(e){return e.join(`-`)}function Ps(e){let t=e?[1,2,3,4,5]:[1,2,3,4];return t[Math.floor(Math.random()*t.length)]}function Fs(e){let t=gs(e);if(t.length===0||!t.every(e=>Ss(e).length>0))return null;let n=t.map(e=>os(e)),r=e=>js(t.map((t,n)=>As(t,e[n]))),i=r(n),a=new Set([Ns(n)]),o=[n],s=e=>{let t=Ns(e);return a.has(t)?!1:(a.add(t),o.push(e),!0)};if(t.length===1){let e=n[0],t=e===5?Ms([1,2,3,4]).slice(0,3):[1,2,3,4].filter(t=>t!==e);for(let e of t)s([e])}else{let e=n.some(e=>e===5);for(let t=0;t<80&&o.length<4;t++){let r=n.map(t=>{let n=Ps(e||t===5),r=0;for(;n===t&&r++<8;)n=Ps(e||t===5);return n});r.filter((e,t)=>e!==n[t]).length<2&&t<50||s(r)}for(let t=0;t<40&&o.length<4;t++){let t=[...n],r=Math.floor(Math.random()*t.length),i=Ps(e||t[r]===5),a=0;for(;i===t[r]&&a++<8;)i=Ps(e||t[r]===5);t[r]=i,s(t)}}if(o.length<2)return null;let c=1;for(;o.length<4&&c<=4;){let e=[...n];e[0]=c,s(e),c+=1}return{options:Ms(o.map(r)),correctOption:i}}function K({pinyin:e,className:t}){let n=_s(e);if(n.length===0)return null;let r=[];return n.forEach((e,t)=>{t>0&&r.push(` `),r.push((0,H.jsx)(`span`,{className:vs(e.tone),children:e.text},`${e.text}-${t}`))}),(0,H.jsx)(`span`,{className:[`py`,t].filter(Boolean).join(` `),children:r})}function Is({option:e,pinyin:t,scriptClass:n}){return t?(0,H.jsxs)(`span`,{className:`choice-option-stack`,children:[(0,H.jsx)(`span`,{className:[`choice-option-text`,n].filter(Boolean).join(` `),children:e}),(0,H.jsx)(`span`,{className:`choice-option-pinyin`,children:(0,H.jsx)(K,{pinyin:t})})]}):(0,H.jsx)(`span`,{className:[`choice-option-text`,n].filter(Boolean).join(` `),children:e})}function Ls({config:e,language:t,wordCount:n,dueCount:r,canStart:i,active:a,prompt:o,promptPinyin:s,optionPinyin:c,scaffold:l=!1,termText:u,direction:d,options:f,correctOption:p,selected:m,feedback:h,session:g,sessionGoal:_,sessionCount:v,onSessionCountChange:y,speechSupported:b,onStart:x,onSelectOption:S,onNext:C,onStop:w,onChangeMode:T}){let E=$o(t),D=!!e.hasPinyin;if(n===0)return(0,H.jsxs)(`section`,{className:`panel empty-state`,children:[(0,H.jsx)(`h2`,{children:`No words yet`}),(0,H.jsx)(`p`,{children:`Capture or add vocabulary first, then come back to study.`})]});if(!a)return(0,H.jsxs)(`section`,{className:`panel`,children:[(0,H.jsx)(`h2`,{children:`Choice`}),(0,H.jsxs)(`div`,{className:`stats-grid`,children:[(0,H.jsxs)(`div`,{className:`stat-card`,children:[(0,H.jsx)(`span`,{className:`stat-value`,children:n}),(0,H.jsx)(`span`,{className:`stat-label`,children:`Total words`})]}),(0,H.jsxs)(`div`,{className:`stat-card accent`,children:[(0,H.jsx)(`span`,{className:`stat-value`,children:r}),(0,H.jsx)(`span`,{className:`stat-label`,children:`Due now`})]})]}),i?D?(0,H.jsx)(`p`,{className:`hint`,children:`Starts with hanzi + pinyin, then drops pinyin once a word’s written skill is solid.`}):r===0?(0,H.jsx)(`p`,{className:`hint`,children:`Nothing due — practice anytime. Due reviews are preferred when available.`}):(0,H.jsx)(`p`,{className:`hint`,children:`Tap the matching meaning. Faster than typing, same SRS updates.`}):(0,H.jsx)(`p`,{className:`hint`,children:`Need at least 4 words in your list for multiple-choice distractors.`}),(0,H.jsx)(ns,{count:v,wordCount:n,minimum:4,onChange:y}),(0,H.jsx)(`button`,{type:`button`,className:`primary large`,onClick:x,disabled:!i,children:r===0&&i?`Practice anyway`:`Start choice`}),(0,H.jsx)(`button`,{type:`button`,className:`secondary study-switch`,onClick:T,children:`Change mode`})]});let O=D?l?` · with pinyin`:` · hanzi only`:``,k=d===`term-en`?`${e.termLabel} → English${O}`:`English → ${e.termLabel}${O}`,A=b&&u&&(d===`term-en`||h===`wrong`&&d===`en-term`),j=d===`term-en`&&E,M=Jo(`${t}:choice:${o}:${d??``}`),N=d===`en-term`&&E,P=e=>e&&c?c[e]:void 0;return(0,H.jsxs)(`section`,{className:`panel quiz-panel choice-panel`,children:[(0,H.jsx)(ts,{label:k,done:g.reviewed,total:_,correct:g.correct,wrong:g.wrong}),(0,H.jsxs)(`div`,{className:`prompt-zone corner-burst choice-prompt-center`,children:[(0,H.jsxs)(`div`,{className:`prompt-block`,children:[(0,H.jsx)(`p`,{className:[`prompt`,`prompt-stack`,j?Xo(M):``].filter(
16Boolean).join(` `),children:o}),s&&(0,H.jsx)(`p`,{className:`prompt-pinyin`,children:(0,H.jsx)(K,{pinyin:s})})]}),A&&(0,H.jsx)(es,{onClick:()=>Wo(u,t)}),(0,H.jsx)(`span`,{className:`prompt-corner-dot`,"aria-hidden":`true`})]},`${o}-${l}`),h?(0,H.jsx)(`p`,{className:`feedback-title choice-feedback-line ${h}`,children:h===`correct`?`Correct!`:`Not quite`}):(0,H.jsx)(`p`,{className:`feedback-title choice-feedback-line`,"aria-hidden":`true`,children:`\xA0`}),(0,H.jsx)(`div`,{className:`choice-options`,role:`group`,"aria-label":`Answer choices`,children:f.map((e,n)=>{let r=e===p,i=e===m,a=Jo(`${t}:choice-opt:${e}`);return(0,H.jsxs)(`button`,{type:`button`,className:[`choice-option`,`swatch-${n%4}`,h&&r?`correct`:``,h&&i&&!r?`wrong`:``].filter(Boolean).join(` `),onClick:()=>S(e),disabled:!!h,children:[(0,H.jsx)(`span`,{className:`choice-letter`,children:String.fromCharCode(65+n)}),(0,H.jsx)(Is,{option:e,pinyin:P(e),scriptClass:N?Xo(a):void 0})]},e)})}),(0,H.jsx)(`div`,{className:`choice-next-slot`,children:(0,H.jsx)(`button`,{type:`button`,className:`primary`,onClick:C,disabled:!h,"aria-hidden":!h,tabIndex:h?0:-1,style:{visibility:h?`visible`:`hidden`},children:`Continue`})}),(0,H.jsx)(`button`,{type:`button`,className:`text-button session-leave`,onClick:w,children:`End session`})]})}var q={product:{headline:`Immerse yourself in Chinese at your level.`,lede:`Keep living your daily life — and see more Chinese in it. Widgets on the screens you already look at, and more of the pages you already read, at the HSK level you can actually handle. HSK 1 is free. Plus unlocks 2–6.`,heroHanzi:`沉浸`,heroPinyin:`chén jìn`,chromeOnComputer:`Works in Chrome on your computer.`,iphoneOnly:`The app is iPhone only.`,metaDescription:`Immerse yourself in Chinese at your level. See more of it in the life you already have — Home Screen, Lock Screen, and Chrome. HSK 1 is free. Plus unlocks 2–6.`},cta:{iphoneLive:`Get the iPhone app`,iphoneSoon:`iPhone — coming soon`,iphoneKicker:`iPhone app`,chrome:`Get the Chrome extension`,chromeComputer:`Chrome on your computer`,iosNotifyTitle:`Tell me when it’s on the App Store`,iosNotifyBlurb:`We’ll email you when the iPhone app is ready.`,iosNotifyButton:`Tell me`,iosNotifyDone:`You’re on the list`,iosNotifyAlready:`You’re already on it`,menu:`Menu`,close:`Close`,back:`Back`,subscribe:`Subscribe on the web`,support:`Support`,privacy:`Privacy`,terms:`Terms`},widgets:{headline:`How to add a widget`,sectionKicker:`iPhone`,sectionTitle:`Chinese on your Home Screen`,sectionLede:`More Chinese in the day you already have. Word and Sentence widgets rotate at your level on Home Screen and Lock Screen. Tap a widget to open it in the app.`,blurb:`HSK 1 widgets work without an account. HSK 2–6 need Plus. In the app, Settings → Widgets turns pinyin on or off.`,homeScreen:{label:`Home Screen`,steps:[{text:`Touch and hold the Home Screen, then tap Edit → Add Widget.`,image:`howto/widget-home-add.png`,alt:`Yellow iPhone Home Screen in jiggle mode, with Edit and Add Widget.`},{text:`Search IMMERSION.`,image:`howto/widget-home-search.png`,alt:`iPhone widget sheet with IMMERSION in the search field.`},{text:`Add a small Word, a small Sentence, or a medium Sentence.`,image:`howto/widget-home-pick.png`,alt:`Widget size picker showing small Word, small Sentence, and medium Sentence.`},{text:`Settings → Widgets turns pinyin on or off.`}]},lockScreen:{label:`Lock Screen`,steps:[{text:`Touch and hold the Lock Screen, then tap Customize.`,image:`howto/widget-lock-customize.png`,alt:`Yellow iPhone Lock Screen with Customize highlighted.`},{text:`Tap a widget area above or below the clock.`,image:`howto/widget-lock-slots.png`,alt:`Lock Screen customize view with empty widget slots below the clock.`},{text:`Search IMMERSION. Add Word or Sentence.`,image:`howto/widget-lock-done.png`,alt:`Lock Screen with an IMMERSION Word circle and Sentence widget.`}]}},chrome:{headline:`How to set up Chrome`,sectionKicker:`Chrome`,sectionTitle:`Chinese as you read`,sectionLede:`Keep reading the pages you already open. Matching English words swap for Chinese at your HSK level. Verbs stay in English. Hover for English and tone-colored pinyin.`,sectionLedeWithLists:`Keep reading the pages you already open. The higher your level, the more of that page becomes Chinese — whole sentences when you can read them, leftover words when you can’t. Hover for English and tone-colored pinyin.`,blurb:`Plus is the same price on the web and in the iPhone app. Monthly has no trial. The extension does not take payment.`,plusDemoNote:`On the real product, HSK 2–6 need Plus. This demo lets you peek.`,steps:[{text:`Install IMMERSION from the Chrome Web Store.`,link:`chromeStore`,linkText:`Chrome Web Store`,image:`howto/chrome-install.png`,alt:`Browser showing an IMMERSION Chrome Web Store card with Add to Chrome.`},{text:`Open an English page, click the icon, pick HSK 1, and turn Immersion on.`,image:`howto/chrome-on.png`,alt:`Chrome page with Chinese swapped in and the IMMERSION popup on HSK 1.`},{text:`For HSK 2–6, sign in and subscribe to Plus on theimmer
16sionapp.com (or on the iPhone with the same Apple or Google account).`,image:`howto/chrome-plus.png`,alt:`IMMERSION popup showing HSK 2–6 as Plus, with Unlock Plus.`}]},plus:{kicker:`Plus`,headline:`HSK 1 is free. Plus unlocks 2–6.`,blurb:`Same Apple or Google account on iPhone, the website, and Chrome. Subscribe in the iPhone app or on the web. The extension does not take payment.`,blurbWithLists:`Same Apple or Google account on iPhone, the website, and Chrome. Plus also unlocks your own word lists. Subscribe in the iPhone app or on the web. The extension does not take payment.`},languages:{kicker:`More languages`,lede:`Get an email when Japanese, Spanish, German, French, Italian, and more ship.`,button:`Alert me`,which:`Which language do you want first?`,choose:`Choose a language`,save:`Save`,skip:`Skip for now`,japanese:`Japanese`,spanish:`Spanish`,german:`German`,french:`French`,italian:`Italian`,other:`Other`,doneBlurb:`We’ll write when another language is ready.`},methodology:{kicker:`Methodology`,menu:`Methodology`,pageTitle:`Methodology — IMMERSION`,headline:`Only Chinese you will understand.`,lede:`IMMERSE yourself in Chinese at your level — without changing your behaviour. Passively learn it in the life you already have.`,home:`Back to IMMERSION`,levelKicker:`At your level`,levelTitle:`Chinese you can already read`,levelLede:`You only see Chinese words and sentences that you will understand.`,levelBody:`If the whole line is readable at this HSK tick, it becomes Chinese. If not, leftover English stays and only the bits you know swap. Isolated verbs stay English until the line passes. Hover a swap for English.`,lifeKicker:`Daily life`,lifeTitle:`Without changing your behaviour`,lifeLede:`Same pages. Same Home Screen. Widgets and Chrome put in-level Chinese where you already look. Effortlessly make Chinese part of your daily life.`,tonesKicker:`Pinyin`,tonesTitle:`The color sticks to the sound`,tonesLede:`Pinyin is always colored by tone — the same map, on widgets, in Chrome, and in the app — so the color sticks to the sound.`,tonesExampleHanzi:`你好`,tonesExamplePinyin:`nǐ hǎo`,tonesCaption:`Hover a swap in Chrome for English and this pinyin.`,tonesAria:`Tone colors. 1 mā red, 2 má orange, 3 mǎ green, 4 mà blue, 5 ma gray.`}},Rs=`immersion-dev-features`;function zs(){try{return localStorage.getItem(Rs)===`1`}catch{return!1}}function Bs(e){try{localStorage.setItem(Rs,e?`1`:`0`)}catch{}}function Vs(){if(typeof window>`u`)return!1;let e=new URLSearchParams(window.location.search);if(e.get(`dev`)!==`1`)return!1;Bs(!0),e.delete(`dev`);let t=e.toString(),n=`${window.location.pathname}${t?`?${t}`:``}${window.location.hash}`;return window.history.replaceState({},``,n),!0}function Hs(){return Vs(),!zs()}var Us=`#f7f7f5`;function Ws(){document.documentElement.dataset.theme=`light`;let e=document.querySelector(`meta[name="theme-color"]`);e&&e.setAttribute(`content`,Us)}function Gs(){let[e]=(0,_.useState)(`light`),[t]=(0,_.useState)(`light`);return(0,_.useEffect)(()=>{Ws()},[]),{preference:e,resolved:t,cycleTheme:()=>{Ws()}}}var Ks=[{id:`words-1`,kind:`words`,at:1,title:`First word`,share:`I just met my first Chinese word in Chrome with IMMERSION.`},{id:`words-10`,kind:`words`,at:10,title:`10 words`,share:`10 unique Chinese words in Chrome with IMMERSION.`},{id:`words-50`,kind:`words`,at:50,title:`50 words`,share:`50 unique Chinese words in Chrome with IMMERSION.`},{id:`words-100`,kind:`words`,at:100,title:`100 words`,share:`I just hit 100 unique Chinese words in Chrome with IMMERSION.`},{id:`words-250`,kind:`words`,at:250,title:`250 words`,share:`250 unique Chinese words in Chrome with IMMERSION.`},{id:`words-500`,kind:`words`,at:500,title:`500 words`,share:`500 unique Chinese words in Chrome with IMMERSION.`},{id:`words-1000`,kind:`words`,at:1e3,title:`1,000 words`,share:`1,000 unique Chinese words in Chrome with IMMERSION.`},{id:`chars-20`,kind:`chars`,at:20,title:`20 characters`,share:`20 Chinese characters met in Chrome with IMMERSION.`},{id:`chars-100`,kind:`chars`,at:100,title:`100 characters`,share:`100 Chinese characters met in Chrome with IMMERSION.`},{id:`pages-1`,kind:`pages`,at:1,title:`First page`,share:`I just immersed my first page in Chinese with IMMERSION.`},{id:`pages-10`,kind:`pages`,at:10,title:`10 pages`,share:`10 pages immersed in Chinese with IMMERSION.`},{id:`pages-50`,kind:`pages`,at:50,title:`50 pages`,share:`50 pages immersed in Chinese with IMMERSION.`},{id:`streak-3`,kind:`streak`,at:3,title:`3-day streak`,share:`I'm on a 3-day IMMERSION streak — Chinese in the pages I already read.`},{id:`streak-7`,kind:`streak`,at:7,title:`7-day streak`,share:`I'm on a 7-day IMMERSION streak. Chinese in Chrome, every day.`},{id:`streak-14`,kind:`streak`,at:14,title:`14-day streak`,share:`14 days in a row with IMMERSION.`}
16,{id:`streak-30`,kind:`streak`,at:30,title:`30-day streak`,share:`30-day IMMERSION streak. Chinese is just there when I browse.`},{id:`streak-100`,kind:`streak`,at:100,title:`100-day streak`,share:`100-day IMMERSION streak.`}];function qs(e){return{words:Number(e?.uniqueWords)||0,chars:Number(e?.uniqueChars)||0,pages:Number(e?.pages)||0,streak:Number(e?.streak)||0}}function Js(e){let t=qs(e);return Ks.filter(e=>t[e.kind]>=e.at)}function Ys(e){let t=qs(e);return Ks.find(e=>t[e.kind]<e.at)??null}function Xs(e){let t=Js(e);return t[t.length-1]??null}function Zs(e,t={}){let n=t.site||`https://theimmersionapp.com`,r=Number(e?.streak)||0,i=Number(e?.uniqueWords)||0;if((t.focus===`streak`||t.focus===`latest`?t.focus:r>=2?`streak`:`latest`)===`streak`&&r)return`I'm on a ${r}-day streak learning Chinese in Chrome with IMMERSION.${i?` ${i} unique words so far.`:``} ${n}`;let a=Xs(e);if(a){let e=a.kind!==`words`&&i?` ${i} unique words so far.`:``;return`${a.share}${e} ${n}`}return i?`I've met ${i} unique Chinese words in Chrome with IMMERSION. ${n}`:`Learning Chinese in Chrome with IMMERSION. ${n}`}function Qs(e){return`https://twitter.com/intent/tweet?text=${encodeURIComponent(e)}`}function $s(e,t={}){let n=document.createElement(`canvas`);n.width=1200,n.height=630;let r=n.getContext(`2d`);if(!r)return n;let i=Number(e?.streak)||0,a=Number(e?.uniqueWords)||0,o=(t.focus===`streak`||t.focus===`latest`?t.focus:i>=2?`streak`:`latest`)===`streak`&&i>0;return r.fillStyle=`#ffe14d`,r.fillRect(0,0,1200,630),r.strokeStyle=`#111111`,r.lineWidth=14,r.strokeRect(18,18,1164,594),r.fillStyle=`#111111`,r.font=`700 28px ui-monospace, "IBM Plex Mono", monospace`,r.fillText(`IMMERSION`,72,92),r.font=`400 132px Georgia, "Times New Roman", serif`,o?(r.fillText(`${i}-day`,72,300),r.font=`400 52px Georgia, "Times New Roman", serif`,r.fillText(`streak`,72,380),r.font=`700 22px ui-monospace, "IBM Plex Mono", monospace`,r.fillText(a?`${a} UNIQUE WORDS IN CHROME`:`CHINESE IN THE PAGES I ALREADY READ`,72,500)):(r.fillText(String(a||0),72,300),r.font=`400 52px Georgia, "Times New Roman", serif`,r.fillText(`unique words`,72,380),r.font=`700 22px ui-monospace, "IBM Plex Mono", monospace`,r.fillText(i?`${i}-DAY STREAK`:`CHINESE IN CHROME`,72,500)),r.font=`700 20px ui-monospace, "IBM Plex Mono", monospace`,r.fillText(`THEIMMERSIONAPP.COM`,72,568),n}function ec(e){return new Promise(t=>{e.toBlob(e=>t(e),`image/png`)})}function tc({stats:e,actionsOnly:t=!1}){let[n,r]=(0,_.useState)(``),i=Js(e),a=Xs(e),o=Ys(e),s=Zs(e,{focus:`streak`}),c=Zs(e,{focus:`latest`}),l=async t=>{try{await navigator.clipboard.writeText(Zs(e,{focus:t})),r(`Copied.`)}catch{r(`Could not copy.`)}},u=async t=>{try{let n=await ec($s(e,{focus:t}));if(!n)throw Error(`empty`);let i=URL.createObjectURL(n),a=document.createElement(`a`);a.href=i,a.download=t===`streak`?`immersion-streak.png`:`immersion.png`,a.click(),URL.revokeObjectURL(i),r(`Card saved.`)}catch{r(`Could not save the card.`)}};return(0,H.jsxs)(`div`,{className:`site-share`,children:[t?null:(0,H.jsxs)(H.Fragment,{children:[e.streak>0?(0,H.jsxs)(`p`,{className:`site-seen-line`,children:[e.streak,`-day streak`,e.longestStreak>e.streak?` · best ${e.longestStreak}`:``]}):null,a?(0,H.jsx)(`p`,{className:`site-seen-meta`,children:a.title}):null,o?(0,H.jsxs)(`p`,{className:`site-seen-blurb`,children:[`Next: `,o.title,i.length?` · ${i.length} unlocked`:``]}):null]}),(0,H.jsxs)(`div`,{className:`site-share-row`,children:[e.streak>0?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`button`,{type:`button`,className:`site-text-link site-share-btn`,onClick:()=>void l(`streak`),children:`Copy streak`}),(0,H.jsx)(`a`,{className:`site-text-link`,href:Qs(s),target:`_blank`,rel:`noreferrer`,children:`Share streak`}),(0,H.jsx)(`button`,{type:`button`,className:`site-text-link site-share-btn`,onClick:()=>void u(`streak`),children:`Save streak card`})]}):null,(0,H.jsx)(`button`,{type:`button`,className:`site-text-link site-share-btn`,onClick:()=>void l(`latest`),children:`Copy`}),(0,H.jsx)(`a`,{className:`site-text-link`,href:Qs(c),target:`_blank`,rel:`noreferrer`,children:`Post on X`}),(0,H.jsx)(`button`,{type:`button`,className:`site-text-link site-share-btn`,onClick:()=>void u(`latest`),children:`Save card`})]}),n?(0,H.jsx)(`p`,{className:`site-seen-blurb`,children:n}):null]})}
16function nc(e,t){return(0,H.jsxs)(`div`,{className:`site-you-stat`,children:[(0,H.jsx)(`span`,{className:`site-you-stat-n`,children:e}),(0,H.jsx)(`span`,{className:`site-you-stat-label`,children:t})]})}function rc({seen:e,signedIn:t}){if(!t)return(0,H.jsxs)(`div`,{className:`site-seen`,role:`status`,children:[(0,H.jsx)(`p`,{className:`site-seen-kicker`,children:`In Chrome`}),(0,H.jsx)(`p`,{className:`site-seen-line`,children:`Your progress lives here`}),(0,H.jsx)(`p`,{className:`site-seen-blurb`,children:`Sign in with the same Apple or Google account you use in the extension. Words, characters, pages, and your streak sync from Chrome.`})]});let n=e??{uniqueWords:0,uniqueChars:0,uniqueHovered:0,pages:0,streak:0,longestStreak:0,lastActiveDay:``,lookups:0,savedWords:0},r=Js(n),i=Ys(n),a=!to(n);return(0,H.jsxs)(`div`,{className:`site-seen`,role:`status`,children:[(0,H.jsx)(`p`,{className:`site-seen-kicker`,children:`In Chrome`}),a?(0,H.jsx)(`p`,{className:`site-seen-line`,children:`Nothing counted yet`}):(0,H.jsx)(`p`,{className:`site-seen-line`,children:n.streak>0?`${n.streak}-day streak`:`Words you’ve met`}),(0,H.jsxs)(`div`,{className:`site-you-grid`,children:[nc(n.uniqueWords,n.uniqueWords===1?`Word`:`Words`),nc(n.uniqueChars,n.uniqueChars===1?`Character`:`Characters`),nc(n.pages,n.pages===1?`Page`:`Pages`),nc(n.uniqueHovered,`Hovered`),nc(n.streak,n.streak===1?`Day`:`Streak`)]}),n.longestStreak>n.streak?(0,H.jsxs)(`p`,{className:`site-seen-meta`,children:[`Best streak `,n.longestStreak]}):null,n.lookups||n.savedWords?(0,H.jsx)(`p`,{className:`site-seen-meta`,children:[n.lookups?`${n.lookups} lookup${n.lookups===1?``:`s`}`:``,n.savedWords?`${n.savedWords} saved`:``].filter(Boolean).join(` · `)}):null,a?(0,H.jsx)(`p`,{className:`site-seen-blurb`,children:`Turn IMMERSION on in Chrome and read a page. Unique words and characters you meet are counted here — not on the popup.`}):(0,H.jsx)(`p`,{className:`site-seen-blurb`,children:`Unique words and characters from pages you immersed, plus hovers. Same account on iPhone.`}),r.length?(0,H.jsx)(`ul`,{className:`site-you-achievements`,children:r.map(e=>(0,H.jsx)(`li`,{children:e.title},e.id))}):null,i?(0,H.jsxs)(`p`,{className:`site-seen-meta`,children:[`Next: `,i.title]}):null,a?null:(0,H.jsx)(tc,{stats:n,actionsOnly:!0})]})}function ic(e=``){let t=new URLSearchParams(window.location.search);t.set(`subscribe`,`1`),e===`clear`&&t.delete(`checkout`);let n=t.toString();return`${window.location.pathname}?${n}`}function ac(){return Va()?(0,H.jsx)(oc,{}):(0,H.jsxs)(`div`,{className:`site-copy`,children:[(0,H.jsx)(`p`,{className:`site-lede`,children:`IMMERSION Plus`}),(0,H.jsx)(`p`,{className:`site-error`,children:`Sign-in is not configured on this build.`}),(0,H.jsx)(`p`,{children:(0,H.jsx)(`a`,{className:`site-text-link`,href:window.location.pathname,children:`Back to IMMERSION`})})]})}function oc(){let e=_i(),[t,n]=(0,_.useState)(null),[r,i]=(0,_.useState)(null),[a,o]=(0,_.useState)(null),[s,c]=(0,_.useState)(null),[l,u]=(0,_.useState)(null),d=new URLSearchParams(window.location.search).get(`checkout`),f=d===`success`,p=r?.plusActive===!0,m=!f&&!p,h=(0,_.useCallback)(async()=>e.getToken({skipCache:!0}),[e.getToken]),g=(0,_.useCallback)(async()=>{u(null);try{let t=await no();if(n(t),e.isSignedIn){let e=await $a(h);i(e);try{o(await eo(`zh-Hans`,h))}catch{o(null)}}else i(null),o(null)}catch(e){u(e instanceof U?e.message:`Could not load billing.`)}},[e.isSignedIn,h]);(0,_.useEffect)(()=>{g()},[g]),(0,_.useEffect)(()=>{if(!f||!e.isSignedIn||p)return;let t=!1,n=0;return(async()=>{for(;!t&&n<8;){n+=1;try{let e=await $a(h);if(t||(i(e),e.plusActive))return}catch{}await new Promise(e=>window.setTimeout(e,1e3))}})(),()=>{t=!0}},[f,e.isSignedIn,p,h]);let v=async t=>{if(e.isSignedIn){c(t),u(null);try{let{url:n}=await ro(t,async()=>e.getToken({skipCache:!0}));window.location.assign(n)}catch(e){c(null),u(e instanceof U?e.message:`Could not start checkout.`)}}},y=async()=>{if(e.isSignedIn){c(`portal`),u(null);try{let{url:t}=await io(async()=>e.getToken({skipCache:!0}));window.location.assign(t)}catch(e){c(null),u(e instanceof U?e.message:`Could not open billing portal.`)}}},b=f||p?(0,H.jsxs)(`div`,{className:`site-done`,role:`status`,children:[(0,H.jsx)(`p`,{className:`site-done-title`,children:p?`Plus is on`:`You’re in`}),(0,H.jsx)(`p`,{className:`site-done-blurb`,children:p&&r?.plusSource===`apple`?`This account is billed through the App Store. Manage it in iPhone Settings → Subscriptions.`:p&&r?.plusSource===`stripe`?`Billed on the web. Change plan or cancel in the customer portal. Same account on iPhone and in Chrome.`:`Plus is on this account. Open the iPhone app and sign in with the same Apple or Google account. Chrome: reload the extension.`}),p&&r?.plusSource===`stripe`?(0,H.jsx)(`button`,{type:`button`,className:`site-secondary`,disabled:s===`portal`,onClick:()=>void y(),children:s===`portal`?`Opening…`:`Manage subscription`}):null]}
16):null,x=m&&t?(0,H.jsxs)(`div`,{className:`site-you-billing`,children:[(0,H.jsxs)(`p`,{className:`site-done-blurb`,children:[`Same price in the iPhone app: $`,t.monthly.usd.toFixed(2),`/month or $`,t.yearly.usd.toFixed(2),`/year. Yearly includes a `,t.yearly.trialDays??7,`-day free trial. Sign in with the same Apple or Google account and Plus is already on.`]}),t.enabled?(0,H.jsxs)(`div`,{className:`site-plans`,children:[(0,H.jsxs)(`button`,{type:`button`,className:`site-plan site-plan-yearly`,disabled:!e.isSignedIn||s!==null,onClick:()=>void v(`yearly`),children:[(0,H.jsx)(`span`,{className:`site-plan-kicker`,children:t.yearly.trialDays?`${t.yearly.trialDays}-day trial · best value`:`Best value`}),(0,H.jsx)(`span`,{className:`site-plan-name`,children:t.yearly.label}),(0,H.jsxs)(`span`,{className:`site-plan-price`,children:[`$`,t.yearly.usd.toFixed(2)]}),(0,H.jsx)(`span`,{className:`site-plan-meta`,children:s===`yearly`?`Redirecting…`:`Then $${t.yearly.usd.toFixed(2)} / year`})]}),(0,H.jsxs)(`button`,{type:`button`,className:`site-plan`,disabled:!e.isSignedIn||s!==null,onClick:()=>void v(`monthly`),children:[(0,H.jsx)(`span`,{className:`site-plan-name`,children:t.monthly.label}),(0,H.jsxs)(`span`,{className:`site-plan-price`,children:[`$`,t.monthly.usd.toFixed(2)]}),(0,H.jsx)(`span`,{className:`site-plan-meta`,children:s===`monthly`?`Redirecting…`:`$${t.monthly.usd.toFixed(2)} / month, no trial`})]}),e.isSignedIn?null:(0,H.jsx)(`p`,{className:`site-done-blurb`,children:`Sign in first, then pick a plan.`})]}):(0,H.jsx)(`p`,{className:`site-done-blurb`,children:`Web checkout is not live yet. Use the iPhone app when Plus ships.`})]}):null,S=b??x;return(0,H.jsxs)(`div`,{className:`site-copy site-copy-you`,children:[(0,H.jsxs)(`div`,{className:`site-you-intro`,children:[(0,H.jsxs)(`div`,{className:`site-you-intro-copy`,children:[(0,H.jsx)(`p`,{className:`site-lede`,children:`You`}),(0,H.jsxs)(`p`,{className:`site-done-blurb`,children:[`Words, characters, and pages you’ve met in Chrome.`,` `,`Plus is HSK 2–6.`,` `,`HSK 1 stays free.`]})]}),(0,H.jsx)(`div`,{className:`site-auth-row`,children:(0,H.jsx)(Pa,{signedOut:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(ja,{mode:`modal`,children:(0,H.jsx)(`button`,{type:`button`,className:`site-submit`,children:`Sign in`})}),(0,H.jsx)(Ma,{mode:`modal`,children:(0,H.jsx)(`button`,{type:`button`,className:`site-secondary`,children:`Create account`})}),(0,H.jsx)(za,{})]}),signedIn:(0,H.jsx)(ri,{})})})]}),d===`cancel`?(0,H.jsx)(`p`,{className:`site-done-blurb`,children:`Checkout was cancelled. Pick a plan when you’re ready.`}):null,(0,H.jsxs)(`div`,{className:`site-you-split`,children:[(0,H.jsx)(rc,{seen:a,signedIn:!!e.isSignedIn}),S]}),l?(0,H.jsx)(`p`,{className:`site-error`,children:l}):null,(0,H.jsxs)(`p`,{children:[(0,H.jsx)(`a`,{className:`site-text-link`,href:window.location.pathname,children:`Back to IMMERSION`}),d?(0,H.jsxs)(H.Fragment,{children:[` · `,(0,H.jsx)(`a`,{className:`site-text-link`,href:ic(`clear`),children:`Dismiss`})]}):null]})]})}var sc={packs:[{id:`kitchen`,name:`Kitchen`,blurb:`Cupboard labels. Same nouns as the sticker sheet.`,words:[{term:`厨房`,pinyin:`chúfáng`,english:`kitchen`,hskLevel:5,kind:`noun`},{term:`门`,pinyin:`mén`,english:`door`,hskLevel:1,kind:`noun`},{term:`冰箱`,pinyin:`bīngxiāng`,english:`fridge`,hskLevel:4,kind:`noun`},{term:`柜子`,pinyin:`guìzi`,english:`cupboard`,hskLevel:5,kind:`noun`},{term:`水龙头`,pinyin:`shuǐlóngtóu`,english:`tap`,kind:`noun`},{term:`水壶`,pinyin:`shuǐhú`,english:`kettle`,kind:`noun`},{term:`窗户`,pinyin:`chuānghu`,english:`window`,hskLevel:4,kind:`noun`},{term:`灯`,pinyin:`dēng`,english:`light`,hskLevel:2,kind:`noun`},{term:`桌子`,pinyin:`zhuōzi`,english:`table`,hskLevel:1,kind:`noun`},{term:`椅子`,pinyin:`yǐzi`,english:`chair`,hskLevel:2,kind:`noun`},{term:`杯子`,pinyin:`bēizi`,english:`cup`,hskLevel:1,kind:`noun`},{term:`碗`,pinyin:`wǎn`,english:`bowl`,hskLevel:2,kind:`noun`},{term:`筷子`,pinyin:`kuàizi`,english:`chopsticks`,hskLevel:2,kind:`noun`},{term:`锅`,pinyin:`guō`,english:`pot`,hskLevel:5,kind:`noun`},{term:`刀`,pinyin:`dāo`,english:`knife`,hskLevel:3,kind:`noun`},{term:`盘子`,pinyin:`pánzi`,english:`plate`,hskLevel:4,kind:`noun`}]}
16,{id:`bedroom`,name:`Bedroom`,blurb:`Bed, wardrobe, and the rest of the room.`,words:[{term:`卧室`,pinyin:`wòshì`,english:`bedroom`,hskLevel:5,kind:`noun`},{term:`床`,pinyin:`chuáng`,english:`bed`,hskLevel:1,kind:`noun`},{term:`枕头`,pinyin:`zhěntou`,english:`pillow`,kind:`noun`},{term:`被子`,pinyin:`bèizi`,english:`quilt`,hskLevel:3,kind:`noun`},{term:`衣柜`,pinyin:`yīguì`,english:`wardrobe`,kind:`noun`},{term:`抽屉`,pinyin:`chōuti`,english:`drawer`,kind:`noun`},{term:`镜子`,pinyin:`jìngzi`,english:`mirror`,hskLevel:4,kind:`noun`},{term:`闹钟`,pinyin:`nàozhōng`,english:`alarm clock`,hskLevel:4,kind:`noun`},{term:`灯`,pinyin:`dēng`,english:`light`,hskLevel:2,kind:`noun`},{term:`窗户`,pinyin:`chuānghu`,english:`window`,hskLevel:4,kind:`noun`},{term:`沙发`,pinyin:`shāfā`,english:`sofa`,hskLevel:3,kind:`noun`},{term:`墙`,pinyin:`qiáng`,english:`wall`,hskLevel:2,kind:`noun`}]},{id:`bathroom`,name:`Bathroom`,blurb:`Tap, towel, and the rest of the washroom.`,words:[{term:`卫生间`,pinyin:`wèishēngjiān`,english:`bathroom`,hskLevel:3,kind:`noun`},{term:`马桶`,pinyin:`mǎtǒng`,english:`toilet`,kind:`noun`},{term:`淋浴`,pinyin:`línyù`,english:`shower`,kind:`noun`},{term:`浴缸`,pinyin:`yùgāng`,english:`bathtub`,kind:`noun`},{term:`毛巾`,pinyin:`máojīn`,english:`towel`,hskLevel:4,kind:`noun`},{term:`肥皂`,pinyin:`féizào`,english:`soap`,kind:`noun`},{term:`牙刷`,pinyin:`yáshuā`,english:`toothbrush`,hskLevel:4,kind:`noun`},{term:`镜子`,pinyin:`jìngzi`,english:`mirror`,hskLevel:4,kind:`noun`},{term:`水龙头`,pinyin:`shuǐlóngtóu`,english:`tap`,kind:`noun`},{term:`门`,pinyin:`mén`,english:`door`,hskLevel:1,kind:`noun`}]},{id:`study`,name:`Study`,blurb:`Desk, books, and the computer.`,words:[{term:`书房`,pinyin:`shūfáng`,english:`study`,hskLevel:6,kind:`noun`},{term:`书桌`,pinyin:`shūzhuō`,english:`desk`,hskLevel:5,kind:`noun`},{term:`书架`,pinyin:`shūjià`,english:`bookshelf`,hskLevel:3,kind:`noun`},{term:`书`,pinyin:`shū`,english:`book`,hskLevel:1,kind:`noun`},{term:`笔`,pinyin:`bǐ`,english:`pen`,hskLevel:2,kind:`noun`},{term:`铅笔`,pinyin:`qiānbǐ`,english:`pencil`,hskLevel:6,kind:`noun`},{term:`电脑`,pinyin:`diànnǎo`,english:`computer`,hskLevel:1,kind:`noun`},{term:`键盘`,pinyin:`jiànpán`,english:`keyboard`,hskLevel:5,kind:`noun`},{term:`笔记本`,pinyin:`bǐjìběn`,english:`notebook`,hskLevel:2,kind:`noun`},{term:`台灯`,pinyin:`táidēng`,english:`desk lamp`,hskLevel:6,kind:`noun`},{term:`椅子`,pinyin:`yǐzi`,english:`chair`,hskLevel:2,kind:`noun`},{term:`纸`,pinyin:`zhǐ`,english:`paper`,hskLevel:2,kind:`noun`}]},{id:`signs`,name:`Signs`,blurb:`Entrance, exit, mind your step — the labels on doors, platforms, and wet floors.`,words:[{term:`入口`,pinyin:`rùkǒu`,english:`entrance`,hskLevel:2,kind:`noun`},{term:`出口`,pinyin:`chūkǒu`,english:`exit`,hskLevel:2,kind:`noun`},{term:`紧急出口`,pinyin:`jǐnjí chūkǒu`,english:`emergency exit`,kind:`noun`},{term:`安全出口`,pinyin:`ānquán chūkǒu`,english:`fire exit`,kind:`noun`},{term:`注意脚下`,pinyin:`zhùyì jiǎoxià`,english:`mind your step`,kind:`noun`},{term:`小心地滑`,pinyin:`xiǎoxīn dì huá`,english:`wet floor`,kind:`noun`},{term:`小心台阶`,pinyin:`xiǎoxīn táijiē`,english:`mind the step`,kind:`noun`},{term:`小心碰头`,pinyin:`xiǎoxīn pèngtóu`,english:`mind your head`,kind:`noun`},{term:`小心空隙`,pinyin:`xiǎoxīn kòngxì`,english:`mind the gap`,kind:`noun`},{term:`禁止吸烟`,pinyin:`jìnzhǐ xīyān`,english:`no smoking`,kind:`noun`},{term:`禁止拍照`,pinyin:`jìnzhǐ pāizhào`,english:`no photography`,kind:`noun`},{term:`禁止入内`,pinyin:`jìnzhǐ rùnèi`,english:`no entry`,kind:`noun`},{term:`禁止停车`,pinyin:`jìnzhǐ tíngchē`,english:`no parking`,kind:`noun`},{term:`请勿触摸`,pinyin:`qǐng wù chùmō`,english:`do not touch`,kind:`noun`},{term:`危险`,pinyin:`wēixiǎn`,english:`danger`,hskLevel:3,kind:`noun`},{term:`电梯`,pinyin:`diàntī`,english:`elevator`,hskLevel:4,kind:`noun`},{term:`楼梯`,pinyin:`lóutī`,english:`stairs`,hskLevel:4,kind:`noun`},{term:`自动扶梯`,pinyin:`zìdòng fútī`,english:`escalator`,kind:`noun`},{term:`洗手间`,pinyin:`xǐshǒujiān`,english:`restroom`,hskLevel:1,kind:`noun`},{term:`问讯处`,pinyin:`wènxùnchù`,english:`information desk`,kind:`noun`},{term:`停车场`,pinyin:`tíngchēchǎng`,english:`parking`,hskLevel:2,kind:`noun`},{term:`灭火器`,pinyin:`mièhuǒqì`,english:`fire extinguisher`,kind:`noun`},{term:`消防通道`,pinyin:`xiāofáng tōngdào`,english:`fire escape`,kind:`noun`},{term:`爱心专座`,pinyin:`àixīn zhuānzuò`,english:`priority seat`,kind:`noun`},{term:`无障碍`,pinyin:`wúzhàng'ài`,english:`step-free`,kind:`noun`},{term:`推`,pinyin:`tuī`,english:`push`,hskLevel:2,kind:`phrase`},{term:`拉`,pinyin:`lā`,english:`pull`,hskLevel:2,kind:`phrase`},{term:`营业中`,pinyin:`yíngyè zhōng`,english:`open`,kind:`phrase`},{term:`休息中`,pinyin:`xiūxi zhōng`,english:`closed`,kind:`phrase`},{term:`请排队`,pinyin:`qǐng páiduì`,english:`please queue`,kind:`phrase`},{term:`先下后上`,pinyin:`xiān xià hòu shàng`,english:`let passengers off first`,kind:`phrase`}
16,{term:`请站稳扶好`,pinyin:`qǐng zhàn wěn fú hǎo`,english:`hold tight`,kind:`phrase`}]},{id:`bubble-tea`,name:`Bubble tea`,blurb:`The board above the counter: tea, toppings, sugar, ice, and cup size.`,words:[{term:`珍珠奶茶`,pinyin:`zhēnzhū nǎichá`,english:`bubble tea`,kind:`noun`},{term:`波霸奶茶`,pinyin:`bōbà nǎichá`,english:`boba tea`,kind:`noun`},{term:`奶茶`,pinyin:`nǎichá`,english:`milk tea`,kind:`noun`},{term:`绿茶`,pinyin:`lǜchá`,english:`green tea`,hskLevel:4,kind:`noun`},{term:`红茶`,pinyin:`hóngchá`,english:`black tea`,kind:`noun`},{term:`乌龙茶`,pinyin:`wūlóngchá`,english:`oolong`,kind:`noun`},{term:`抹茶`,pinyin:`mǒchá`,english:`matcha`,kind:`noun`},{term:`可可`,pinyin:`kěkě`,english:`cocoa`,kind:`noun`},{term:`柠檬茶`,pinyin:`níngméng chá`,english:`lemon tea`,kind:`noun`},{term:`水果茶`,pinyin:`shuǐguǒ chá`,english:`fruit tea`,kind:`noun`},{term:`酸奶`,pinyin:`suānnǎi`,english:`yogurt`,hskLevel:4,kind:`noun`},{term:`鲜奶`,pinyin:`xiānnǎi`,english:`fresh milk`,kind:`noun`},{term:`椰奶`,pinyin:`yēnǎi`,english:`coconut milk`,kind:`noun`},{term:`燕麦奶`,pinyin:`yànmài nǎi`,english:`oat milk`,kind:`noun`},{term:`珍珠`,pinyin:`zhēnzhū`,english:`tapioca pearls`,kind:`noun`},{term:`波霸`,pinyin:`bōbà`,english:`boba`,kind:`noun`},{term:`椰果`,pinyin:`yēguǒ`,english:`coconut jelly`,kind:`noun`},{term:`布丁`,pinyin:`bùdīng`,english:`pudding`,kind:`noun`},{term:`仙草`,pinyin:`xiāncǎo`,english:`grass jelly`,kind:`noun`},{term:`芋圆`,pinyin:`yùyuán`,english:`taro balls`,kind:`noun`},{term:`红豆`,pinyin:`hóngdòu`,english:`red bean`,kind:`noun`},{term:`西米`,pinyin:`xīmǐ`,english:`sago`,kind:`noun`},{term:`奶盖`,pinyin:`nǎigài`,english:`cheese foam`,kind:`noun`},{term:`冰淇淋`,pinyin:`bīngqílín`,english:`ice cream`,hskLevel:3,kind:`noun`},{term:`全糖`,pinyin:`quán táng`,english:`full sugar`,kind:`noun`},{term:`正常糖`,pinyin:`zhèngcháng táng`,english:`regular sugar`,kind:`noun`},{term:`少糖`,pinyin:`shǎo táng`,english:`less sugar`,kind:`noun`},{term:`半糖`,pinyin:`bàn táng`,english:`half sugar`,kind:`noun`},{term:`微糖`,pinyin:`wēi táng`,english:`light sugar`,kind:`noun`},{term:`无糖`,pinyin:`wú táng`,english:`no sugar`,kind:`noun`},{term:`正常冰`,pinyin:`zhèngcháng bīng`,english:`regular ice`,kind:`noun`},{term:`少冰`,pinyin:`shǎo bīng`,english:`less ice`,kind:`noun`},{term:`去冰`,pinyin:`qù bīng`,english:`no ice`,kind:`noun`},{term:`常温`,pinyin:`chángwēn`,english:`room temperature`,kind:`noun`},{term:`热饮`,pinyin:`rèyǐn`,english:`hot drink`,kind:`noun`},{term:`中杯`,pinyin:`zhōng bēi`,english:`medium cup`,kind:`noun`},{term:`大杯`,pinyin:`dà bēi`,english:`large cup`,kind:`noun`},{term:`超大杯`,pinyin:`chāo dà bēi`,english:`extra large cup`,kind:`noun`},{term:`菜单`,pinyin:`càidān`,english:`drinks menu`,hskLevel:3,kind:`noun`},{term:`点单`,pinyin:`diǎndān`,english:`place order`,kind:`noun`},{term:`收银`,pinyin:`shōuyín`,english:`cashier`,kind:`noun`},{term:`排队`,pinyin:`páiduì`,english:`queue here`,hskLevel:4,kind:`noun`},{term:`打包`,pinyin:`dǎbāo`,english:`takeaway`,kind:`noun`},{term:`店内`,pinyin:`diànnèi`,english:`for here`,kind:`noun`},{term:`吸管`,pinyin:`xīguǎn`,english:`straw`,kind:`noun`},{term:`杯套`,pinyin:`bēitào`,english:`cup sleeve`,kind:`noun`},{term:`发票`,pinyin:`fāpiào`,english:`receipt`,hskLevel:5,kind:`noun`},{term:`茶`,pinyin:`chá`,english:`tea`,hskLevel:1,kind:`phrase`},{term:`奶`,pinyin:`nǎi`,english:`milk`,hskLevel:2,kind:`phrase`},{term:`冰`,pinyin:`bīng`,english:`ice`,hskLevel:2,kind:`phrase`},{term:`糖`,pinyin:`táng`,english:`sugar`,hskLevel:2,kind:`phrase`},{term:`热`,pinyin:`rè`,english:`hot`,hskLevel:1,kind:`phrase`},{term:`杯`,pinyin:`bēi`,english:`cup`,hskLevel:1,kind:`phrase`}]},{id:`restaurant-names`,name:`Restaurant menus`,blurb:`Sit down at a fake restaurant. The name on top, then the dishes you would actually order.`,words:[{term:`饭店`,pinyin:`fàndiàn`,english:`restaurant`,hskLevel:3,kind:`noun`},{term:`酒楼`,pinyin:`jiǔlóu`,english:`restaurant (grand)`,kind:`noun`},{term:`餐厅`,pinyin:`cāntīng`,english:`dining hall`,hskLevel:3,kind:`noun`},{term:`餐馆`,pinyin:`cānguǎn`,english:`restaurant`,kind:`noun`}
16,{term:`面馆`,pinyin:`miànguǎn`,english:`noodle shop`,kind:`noun`},{term:`小吃店`,pinyin:`xiǎochī diàn`,english:`snack shop`,kind:`noun`},{term:`火锅店`,pinyin:`huǒguō diàn`,english:`hotpot restaurant`,kind:`noun`},{term:`烧烤店`,pinyin:`shāokǎo diàn`,english:`barbecue shop`,kind:`noun`},{term:`饺子馆`,pinyin:`jiǎozi guǎn`,english:`dumpling house`,kind:`noun`},{term:`包子铺`,pinyin:`bāozi pù`,english:`baozi shop`,kind:`noun`},{term:`茶餐厅`,pinyin:`chá cāntīng`,english:`cha chaan teng`,kind:`noun`},{term:`大排档`,pinyin:`dàpáidàng`,english:`dai pai dong`,kind:`noun`},{term:`粥铺`,pinyin:`zhōu pù`,english:`congee shop`,kind:`noun`},{term:`酒家`,pinyin:`jiǔjiā`,english:`restaurant (Cantonese)`,kind:`noun`},{term:`金龙`,pinyin:`jīnlóng`,english:`Golden Dragon`,kind:`noun`},{term:`金龙饭店`,pinyin:`jīnlóng fàndiàn`,english:`Golden Dragon Restaurant`,kind:`noun`},{term:`金龙酒家`,pinyin:`jīnlóng jiǔjiā`,english:`Golden Dragon Restaurant`,kind:`noun`},{term:`金凤`,pinyin:`jīnfèng`,english:`Golden Phoenix`,kind:`noun`},{term:`金凤酒家`,pinyin:`jīnfèng jiǔjiā`,english:`Golden Phoenix Restaurant`,kind:`noun`},{term:`龙凤酒家`,pinyin:`lóngfèng jiǔjiā`,english:`Dragon & Phoenix`,kind:`noun`},{term:`龙宫`,pinyin:`lónggōng`,english:`Dragon Palace`,kind:`noun`},{term:`金殿`,pinyin:`jīndiàn`,english:`Golden Palace`,kind:`noun`},{term:`长城`,pinyin:`chángchéng`,english:`Great Wall`,kind:`noun`},{term:`长城饭店`,pinyin:`chángchéng fàndiàn`,english:`Great Wall Restaurant`,kind:`noun`},{term:`大中华`,pinyin:`dà zhōnghuá`,english:`Great China`,kind:`noun`},{term:`新中华`,pinyin:`xīn zhōnghuá`,english:`New China`,kind:`noun`},{term:`皇朝`,pinyin:`huángcháo`,english:`Imperial Dynasty`,kind:`noun`},{term:`福满楼`,pinyin:`fúmǎnlóu`,english:`Fortune House`,kind:`noun`},{term:`醉仙楼`,pinyin:`zuìxiānlóu`,english:`Drunken Immortal`,kind:`noun`},{term:`杏花村`,pinyin:`xìnghuācūn`,english:`Apricot Blossom Village`,kind:`noun`},{term:`得月楼`,pinyin:`déyuèlóu`,english:`Moon House`,kind:`noun`},{term:`知味观`,pinyin:`zhīwèiguān`,english:`Know-the-flavor`,kind:`noun`},{term:`陶陶居`,pinyin:`táotáo jū`,english:`Happy House`,kind:`noun`},{term:`锦绣楼`,pinyin:`jǐnxiùlóu`,english:`Splendid House`,kind:`noun`},{term:`翠园`,pinyin:`cuìyuán`,english:`Jade Garden`,kind:`noun`},{term:`海鲜酒家`,pinyin:`hǎixiān jiǔjiā`,english:`Seafood Restaurant`,kind:`noun`},{term:`四季饭店`,pinyin:`sìjì fàndiàn`,english:`Four Seasons Restaurant`,kind:`noun`},{term:`鸿运来`,pinyin:`hóngyùn lái`,english:`Fortune Comes`,kind:`noun`},{term:`熊猫`,pinyin:`xióngmāo`,english:`Panda`,kind:`noun`},{term:`老四川`,pinyin:`lǎo Sìchuān`,english:`Old Sichuan`,kind:`noun`},{term:`大上海`,pinyin:`dà Shànghǎi`,english:`Great Shanghai`,kind:`noun`},{term:`北京饭店`,pinyin:`Běijīng fàndiàn`,english:`Beijing Restaurant`,kind:`noun`},{term:`夜来香`,pinyin:`yèláixiāng`,english:`Night Fragrance`,kind:`noun`},{term:`王记`,pinyin:`Wáng jì`,english:`Wang’s`,kind:`noun`},{term:`李记`,pinyin:`Lǐ jì`,english:`Li’s`,kind:`noun`},{term:`张记`,pinyin:`Zhāng jì`,english:`Zhang’s`,kind:`noun`},{term:`陈记`,pinyin:`Chén jì`,english:`Chen’s`,kind:`noun`},{term:`川菜`,pinyin:`chuāncài`,english:`Sichuan food`,kind:`noun`},{term:`粤菜`,pinyin:`yuècài`,english:`Cantonese food`,kind:`noun`},{term:`湘菜`,pinyin:`xiāngcài`,english:`Hunan food`,kind:`noun`},{term:`本帮菜`,pinyin:`běnbāng cài`,english:`Shanghai food`,kind:`noun`},{term:`东北菜`,pinyin:`dōngběi cài`,english:`Northeast food`,kind:`noun`},{term:`云南菜`,pinyin:`yúnnán cài`,english:`Yunnan food`,kind:`noun`},{term:`清真`,pinyin:`qīngzhēn`,english:`halal`,kind:`noun`},{term:`素食`,pinyin:`sùshí`,english:`vegetarian`,kind:`noun`},{term:`家常菜`,pinyin:`jiācháng cài`,english:`home-style cooking`,kind:`noun`},{term:`火锅`,pinyin:`huǒguō`,english:`hotpot`,hskLevel:4,kind:`noun`},{term:`烧烤`,pinyin:`shāokǎo`,english:`barbecue`,kind:`noun`},{term:`小笼包`,pinyin:`xiǎolóngbāo`,english:`xiaolongbao`,kind:`noun`},{term:`烤鸭`,pinyin:`kǎoyā`,english:`roast duck`,kind:`noun`},{term:`麻辣烫`,pinyin:`málàtàng`,english:`malatang`,kind:`noun`},{term:`兰州拉面`,pinyin:`lánzhōu lāmiàn`,english:`Lanzhou noodles`,kind:`noun`},{term:`过桥米线`,pinyin:`guòqiáo mǐxiàn`,english:`crossing-the-bridge noodles`,kind:`noun`},{term:`黄焖鸡`,pinyin:`huángmèn jī`,english:`braised chicken`,kind:`noun`},{term:`重庆小面`,pinyin:`chóngqìng xiǎomiàn`,english:`Chongqing noodles`,kind:`noun`},{term:`串串香`,pinyin:`chuànchuàn xiāng`,english:`skewer hotpot`,kind:`noun`},{term:`水饺`,pinyin:`shuǐjiǎo`,english:`boiled dumplings`,kind:`noun`},{term:`炒饭`,pinyin:`chǎofàn`,english:`fried rice`,kind:`noun`}
16,{term:`老字号`,pinyin:`lǎozìhào`,english:`time-honored brand`,kind:`noun`},{term:`招牌`,pinyin:`zhāopái`,english:`signature / shop sign`,kind:`noun`},{term:`特色`,pinyin:`tèsè`,english:`specialty`,hskLevel:4,kind:`noun`},{term:`新开业`,pinyin:`xīn kāiyè`,english:`newly opened`,kind:`phrase`},{term:`营业中`,pinyin:`yíngyè zhōng`,english:`open now`,kind:`phrase`},{term:`欢迎光临`,pinyin:`huānyíng guānglín`,english:`welcome`,kind:`phrase`},{term:`包间`,pinyin:`bāojiān`,english:`private room`,kind:`noun`},{term:`外卖`,pinyin:`wàimài`,english:`takeaway`,hskLevel:4,kind:`noun`},{term:`堂食`,pinyin:`tángshí`,english:`dine in`,kind:`noun`},{term:`等位`,pinyin:`děngwèi`,english:`waiting for a table`,kind:`noun`},{term:`分店`,pinyin:`fēndiàn`,english:`branch`,kind:`noun`},{term:`总店`,pinyin:`zǒngdiàn`,english:`main shop`,kind:`noun`},{term:`老北京`,pinyin:`lǎo Běijīng`,english:`old Beijing`,kind:`noun`},{term:`四川`,pinyin:`Sìchuān`,english:`Sichuan`,kind:`noun`},{term:`重庆`,pinyin:`Chóngqìng`,english:`Chongqing`,kind:`noun`},{term:`上海`,pinyin:`Shànghǎi`,english:`Shanghai`,kind:`noun`},{term:`广东`,pinyin:`Guǎngdōng`,english:`Guangdong`,kind:`noun`},{term:`兰州`,pinyin:`Lánzhōu`,english:`Lanzhou`,kind:`noun`},{term:`店`,pinyin:`diàn`,english:`shop`,hskLevel:1,kind:`phrase`},{term:`馆`,pinyin:`guǎn`,english:`house / hall`,hskLevel:4,kind:`phrase`},{term:`楼`,pinyin:`lóu`,english:`building / restaurant`,hskLevel:1,kind:`phrase`},{term:`居`,pinyin:`jū`,english:`house (in names)`,kind:`phrase`},{term:`坊`,pinyin:`fāng`,english:`workshop / shop (in names)`,kind:`phrase`},{term:`轩`,pinyin:`xuān`,english:`pavilion (in names)`,kind:`phrase`},{term:`老`,pinyin:`lǎo`,english:`old (in names)`,hskLevel:3,kind:`phrase`},{term:`家`,pinyin:`jiā`,english:`home / family (in names)`,hskLevel:1,kind:`phrase`},{term:`味`,pinyin:`wèi`,english:`flavor (in names)`,hskLevel:2,kind:`phrase`},{term:`香`,pinyin:`xiāng`,english:`fragrant (in names)`,hskLevel:3,kind:`phrase`},{term:`龙`,pinyin:`lóng`,english:`dragon (in names)`,hskLevel:1,kind:`phrase`},{term:`凤`,pinyin:`fèng`,english:`phoenix (in names)`,kind:`phrase`},{term:`金`,pinyin:`jīn`,english:`gold / golden (in names)`,hskLevel:3,kind:`phrase`},{term:`福`,pinyin:`fú`,english:`fortune (in names)`,hskLevel:4,kind:`phrase`},{term:`园`,pinyin:`yuán`,english:`garden (in names)`,hskLevel:3,kind:`phrase`},{term:`阁`,pinyin:`gé`,english:`pavilion (in names)`,kind:`phrase`},{term:`记`,pinyin:`jì`,english:`’s shop (in names)`,hskLevel:3,kind:`phrase`},{term:`鸿`,pinyin:`hóng`,english:`grand (in names)`,kind:`phrase`},{term:`运`,pinyin:`yùn`,english:`luck (in names)`,hskLevel:3,kind:`phrase`},{term:`仙`,pinyin:`xiān`,english:`immortal (in names)`,kind:`phrase`},{term:`宫`,pinyin:`gōng`,english:`palace (in names)`,hskLevel:3,kind:`phrase`},{term:`中华`,pinyin:`zhōnghuá`,english:`China (in names)`,kind:`phrase`},{term:`老四川火锅`,pinyin:`lǎo Sìchuān huǒguō`,english:`Old Sichuan Hotpot`,kind:`noun`},{term:`李记饺子馆`,pinyin:`Lǐ jì jiǎozi guǎn`,english:`Li’s dumpling house`,kind:`noun`},{term:`北京烤鸭店`,pinyin:`Běijīng kǎoyā diàn`,english:`Beijing roast duck shop`,kind:`noun`},{term:`张记烧烤`,pinyin:`Zhāng jì shāokǎo`,english:`Zhang’s barbecue`,kind:`noun`},{term:`王记包子铺`,pinyin:`Wáng jì bāozi pù`,english:`Wang’s baozi shop`,kind:`noun`},{term:`锅底`,pinyin:`guōdǐ`,english:`hotpot broth`,kind:`noun`},{term:`麻辣锅`,pinyin:`málà guō`,english:`spicy broth`,kind:`noun`},{term:`清汤锅`,pinyin:`qīngtāng guō`,english:`clear broth`,kind:`noun`},{term:`番茄锅`,pinyin:`fānqié guō`,english:`tomato broth`,kind:`noun`},{term:`鸳鸯锅`,pinyin:`yuānyāng guō`,english:`split pot`,kind:`noun`},{term:`荤菜`,pinyin:`hūncài`,english:`meat dishes`,kind:`noun`},{term:`毛肚`,pinyin:`máodǔ`,english:`beef tripe`,kind:`noun`},{term:`牛肉`,pinyin:`niúròu`,english:`beef`,hskLevel:3,kind:`noun`},{term:`羊肉`,pinyin:`yángròu`,english:`lamb`,kind:`noun`},{term:`虾滑`,pinyin:`xiāhuá`,english:`shrimp paste`,kind:`noun`},{term:`素菜`,pinyin:`sùcài`,english:`vegetable dishes`,kind:`noun`},{term:`土豆`,pinyin:`tǔdòu`,english:`potato`,hskLevel:5,kind:`noun`},{term:`豆腐`,pinyin:`dòufu`,english:`tofu`,hskLevel:5,kind:`noun`},{term:`金针菇`,pinyin:`jīnzhēngū`,english:`enoki mushrooms`,kind:`noun`},{term:`白菜`,pinyin:`báicài`,english:`napa cabbage`,hskLevel:4,kind:`noun`},{term:`调料`,pinyin:`tiáoliào`,english:`dipping sauce`,kind:`noun`},{term:`香油`,pinyin:`xiāngyóu`,english:`sesame oil`,kind:`noun`},{term:`蒜泥`,pinyin:`suànní`,english:`crushed garlic`,kind:`noun`},{term:`香菜`,pinyin:`xiāngcài`,english:`cilantro`,kind:`noun`},{term:`煎饺`,pinyin:`jiānjiǎo`,english:`pan-fried dumplings`,kind:`noun`},{term:`锅贴`,pinyin:`guōtiē`,english:`potstickers`,kind:`noun`},{term:`猪肉水饺`,pinyin:`zhūròu shuǐjiǎo`,english:`pork dumplings`,kind:`noun`},{term:`白菜水饺`,pinyin:`báicài shuǐjiǎo`,english:`cabbage dumplings`,kind:`noun`},{term:`三鲜水饺`,pinyin:`sānxiān shuǐjiǎo`,english:`three-delicacy dumplings`,kind:`noun`},{term:`蛋花汤`,pinyin:`dànhuā tāng`,english:`egg-drop soup`,kind:`noun`},{term:`紫菜汤`,pinyin:`zǐcài tāng`,english:`seaweed soup`,kind:`noun`},{term:`牛肉面`,pinyin:`niúròu miàn`,english:`beef noodles`,kind:`noun`},{term:`炸酱面`,pinyin:`zhájiàng miàn`,english:`zhajiang noodles`,kind:`noun`},{term:`拍黄瓜`,pinyin:`pāi huángguā`,english:`smashed cucumber`,kind:`noun`},{term:`咸菜`,pinyin:`xiáncài`,english:`pickles`,kind:`noun`},{term:`酸梅汤`,pinyin:`suānméi tāng`,english:`sour plum drink`,kind:`noun`},{term:`辣椒油`,pinyin:`làjiāo yóu`,english:`chili oil`,kind:`noun`},{term:`鸭架汤`,pinyin:`yājià tāng`,english:`duck-frame soup`,kind:`noun`},{term:`荷叶饼`,pinyin:`héyè bǐng`,english:`lotus-leaf pancakes`,kind:`noun`},{term:`甜面酱`,pinyin:`tiánmiànjiàng`,english:`sweet bean sauce`,kind:`noun`},{term:`葱丝`,pinyin:`cōngsī`,english:`scallion strips`,kind:`noun`},{term:`皮蛋豆腐`,pinyin:`pídàn dòufu`,english:`tofu with century egg`,kind:`noun`},{term:`虾饺`,pinyin:`xiājiǎo`,english:`shrimp dumplings`,kind:`noun`},{term:`烧卖`,pinyin:`shāomài`,english:`siu mai`,kind:`noun`},{term:`叉烧包`,pinyin:`chāshāo bāo`,english:`char siu bao`,kind:`noun`},{term:`肠粉`,pinyin:`chángfěn`,english:`rice noodle rolls`,kind:`noun`},{term:`普洱`,pinyin:`pǔ'ěr`,english:`pu-erh tea`,kind:`noun`},{term:`茉莉花茶`,pinyin:`mòlìhuā chá`,english:`jasmine tea`,kind:`noun`},{term:`叉烧饭`,pinyin:`chāshāo fàn`,english:`char siu rice`,kind:`noun`},{term:`羊肉串`,pinyin:`yángròu chuàn`,english:`lamb skewers`,kind:`noun`},{term:`鸡翅`,pinyin:`jīchì`,english:`chicken wings`,kind:`noun`},{term:`韭菜`,pinyin:`jiǔcài`,english:`garlic chives`,kind:`noun`},{term:`烤馒头`,pinyin:`kǎo mántou`,english:`grilled steamed bun`,kind:`noun`},{term:`啤酒`,pinyin:`píjiǔ`,english:`beer`,hskLevel:3,kind:`noun`},{term:`汽水`,pinyin:`qìshuǐ`,english:`soda`,kind:`noun`},{term:`包子`,pinyin:`bāozi`,english:`baozi`,hskLevel:4,kind:`noun`},{term:`豆浆`,pinyin:`dòujiāng`,english:`soy milk`,kind:`noun`},{term:`油条`,pinyin:`yóutiáo`,english:`fried dough stick`,kind:`noun`},{term:`茶叶蛋`,pinyin:`cháyè dàn`,english:`tea egg`,kind:`noun`},{term:`白粥`,pinyin:`báizhōu`,english:`plain congee`,kind:`noun`},{term:`皮蛋瘦肉粥`,pinyin:`pídàn shòuròu zhōu`,english:`century-egg and pork congee`,kind:`noun`},{term:`生煎`,pinyin:`shēngjiān`,english:`pan-fried buns`,kind:`noun`},{term:`阳春面`,pinyin:`yángchūn miàn`,english:`plain noodles`,kind:`noun`},{term:`菜单`,pinyin:`càidān`,english:`menu`,hskLevel:3,kind:`noun`},{term:`茶`,pinyin:`chá`,english:`tea`,hskLevel:1,kind:`noun`}]}
16,{id:`soft-drinks`,name:`Soft drinks`,blurb:`The back of a can: nutrition facts, ingredients, net content, and the date stamp.`,words:[{term:`可乐`,pinyin:`kělè`,english:`cola`,kind:`noun`},{term:`汽水`,pinyin:`qìshuǐ`,english:`soda`,kind:`noun`},{term:`橙汁`,pinyin:`chéngzhī`,english:`orange juice`,kind:`noun`},{term:`碳酸饮料`,pinyin:`tànsuān yǐnliào`,english:`carbonated drink`,kind:`noun`},{term:`果汁饮料`,pinyin:`guǒzhī yǐnliào`,english:`fruit drink`,kind:`noun`},{term:`茶饮料`,pinyin:`chá yǐnliào`,english:`tea drink`,kind:`noun`},{term:`含乳饮料`,pinyin:`hánrǔ yǐnliào`,english:`milk drink`,kind:`noun`},{term:`运动饮料`,pinyin:`yùndòng yǐnliào`,english:`sports drink`,kind:`noun`},{term:`包装饮用水`,pinyin:`bāozhuāng yǐnyòngshuǐ`,english:`bottled water`,kind:`noun`},{term:`营养成分表`,pinyin:`yíngyǎng chéngfèn biǎo`,english:`nutrition facts`,kind:`noun`},{term:`营养素参考值`,pinyin:`yíngyǎngsù cānkǎo zhí`,english:`NRV`,kind:`noun`},{term:`每100毫升`,pinyin:`měi yìbǎi háoshēng`,english:`per 100ml`,kind:`noun`},{term:`每份`,pinyin:`měi fèn`,english:`per serving`,kind:`noun`},{term:`能量`,pinyin:`néngliàng`,english:`energy`,hskLevel:5,kind:`noun`},{term:`卡路里`,pinyin:`kǎlùlǐ`,english:`calories`,kind:`noun`},{term:`蛋白质`,pinyin:`dànbáizhì`,english:`protein`,hskLevel:5,kind:`noun`},{term:`脂肪`,pinyin:`zhīfáng`,english:`fat`,hskLevel:5,kind:`noun`},{term:`饱和脂肪`,pinyin:`bǎohé zhīfáng`,english:`saturated fat`,kind:`noun`},{term:`反式脂肪`,pinyin:`fǎnshì zhīfáng`,english:`trans fat`,kind:`noun`},{term:`碳水化合物`,pinyin:`tànshuǐ huàhéwù`,english:`carbohydrate`,kind:`noun`},{term:`糖`,pinyin:`táng`,english:`sugars`,hskLevel:2,kind:`noun`},{term:`钠`,pinyin:`nà`,english:`sodium`,kind:`noun`},{term:`膳食纤维`,pinyin:`shànshí xiānwéi`,english:`fiber`,kind:`noun`},{term:`配料`,pinyin:`pèiliào`,english:`ingredients`,kind:`noun`},{term:`配料表`,pinyin:`pèiliào biǎo`,english:`ingredients list`,kind:`noun`},{term:`水`,pinyin:`shuǐ`,english:`water`,hskLevel:1,kind:`noun`},{term:`白砂糖`,pinyin:`báishātáng`,english:`white sugar`,kind:`noun`},{term:`浓缩果汁`,pinyin:`nóngsuō guǒzhī`,english:`juice concentrate`,kind:`noun`},{term:`二氧化碳`,pinyin:`èryǎnghuàtàn`,english:`carbon dioxide`,kind:`noun`},{term:`食用香精`,pinyin:`shíyòng xiāngjīng`,english:`flavoring`,kind:`noun`},{term:`焦糖色`,pinyin:`jiāotángsè`,english:`caramel color`,kind:`noun`},{term:`柠檬酸`,pinyin:`níngméngsuān`,english:`citric acid`,kind:`noun`},{term:`咖啡因`,pinyin:`kāfēiyīn`,english:`caffeine`,kind:`noun`},{term:`阿斯巴甜`,pinyin:`āsībātán`,english:`aspartame`,kind:`noun`},{term:`维生素C`,pinyin:`wéishēngsù C`,english:`vitamin C`,kind:`noun`},{term:`食品名称`,pinyin:`shípǐn míngchēng`,english:`product name`,kind:`noun`},{term:`净含量`,pinyin:`jìng hánliàng`,english:`net content`,kind:`noun`},{term:`保质期`,pinyin:`bǎozhìqī`,english:`shelf life`,kind:`noun`},{term:`生产日期`,pinyin:`shēngchǎn rìqī`,english:`production date`,kind:`noun`},{term:`储存条件`,pinyin:`chǔcún tiáojiàn`,english:`storage`,kind:`noun`},{term:`产地`,pinyin:`chǎndì`,english:`origin`,kind:`noun`},{term:`千焦`,pinyin:`qiānjiāo`,english:`kilojoule`,kind:`noun`},{term:`毫克`,pinyin:`háokè`,english:`milligram`,kind:`noun`},{term:`毫升`,pinyin:`háoshēng`,english:`milliliter`,kind:`noun`},{term:`零卡`,pinyin:`líng kǎ`,english:`zero calorie`,kind:`noun`},{term:`低糖`,pinyin:`dī táng`,english:`low sugar`,kind:`noun`},{term:`无糖型`,pinyin:`wú táng xíng`,english:`sugar-free`,kind:`noun`},{term:`不含反式脂肪`,pinyin:`bù hán fǎnshì zhīfáng`,english:`no trans fat`,kind:`noun`},{term:`开封后请冷藏`,pinyin:`kāifēng hòu qǐng lěngcáng`,english:`refrigerate after opening`,kind:`phrase`},{term:`阴凉干燥处`,pinyin:`yīnliáng gānzào chù`,english:`cool dry place`,kind:`phrase`}]},{id:`tattoos`,name:`Tattoos`,blurb:`Flash-sheet Chinese: love, strength, family — plus the real celebrity ink, and the ones that went wrong.`,words:[{term:`纹身`,pinyin:`wénshēn`,english:`tattoo`,kind:`noun`},{term:`汉字`,pinyin:`hànzì`,english:`Chinese character`,hskLevel:1,kind:`noun`},{term:`上臂`,pinyin:`shàngbì`,english:`upper arm (shoulder to elbow)`,kind:`noun`},{term:`手腕`,pinyin:`shǒuwàn`,english:`wrist`,kind:`noun`},{term:`后颈`,pinyin:`hòujǐng`,english:`nape (back of the neck)`,kind:`noun`},{term:`后背`,pinyin:`hòubèi`,english:`back`,kind:`noun`},{term:`肋骨`,pinyin:`lèigǔ`,english:`ribs (side of the chest)`,kind:`noun`},{term:`脚踝`,pinyin:`jiǎohuái`,english:`ankle`,kind:`noun`},{term:`胸口`,pinyin:`xiōngkǒu`,english:`chest`,kind:`noun`},{term:`爱`,pinyin:`ài`,english:`love`,hskLevel:1,kind:`noun`},{term:`力`,pinyin:`lì`,english:`strength`,hskLevel:3,kind:`noun`},{term:`龙`,pinyin:`lóng`,english:`dragon`,hskLevel:1,kind:`noun`},{term:`福`,pinyin:`fú`,english:`fortune`,hskLevel:4,kind:`noun`},{term:`勇`,pinyin:`yǒng`,english:`brave`,hskLevel:4,kind:`noun`},{term:`忍`,pinyin:`rěn`,english:`endure`,hskLevel:4,kind:`noun`},{term:`忠`,pinyin:`zhōng`,english:`loyal`,hskLevel:6,kind:`noun`},{term:`家`,pinyin:`jiā`,english:`family`,hskLevel:1,kind:`noun`},{term:`心`,pinyin:`xīn`,english:`heart`,hskLevel:1,kind:`noun`},{term:`魂`,pinyin:`hún`,english:`soul`,kind:`noun`},{term:`美`,pinyin:`měi`,english:`beauty`,hskLevel:3,kind:`noun`},{term:`梦`,pinyin:`mèng`,english:`dream`,hskLevel:4,kind:`noun`},{term:`自由`,pinyin:`zìyóu`,english:`freedom`,hskLevel:4,kind:`noun`},{term:`和平`,pinyin:`hépíng`,english:`peace`,hskLevel:4,kind:`noun`},{term:`希望`,pinyin:`xīwàng`,english:`hope`,hskLevel:2,kind:`noun`},{term:`勇气`,pinyin:`yǒngqì`,english:`courage`,hskLevel:4,kind:`noun`},{term:`力量`,pinyin:`lìliàng`,english:`power`,hskLevel:5,kind:`noun`},{term:`智慧`,pinyin:`zhìhuì`,english:`wisdom`,hskLevel:5,kind:`noun`},{term:`幸福`,pinyin:`xìngfú`,english:`happiness`,hskLevel:4,kind:`noun`},{term:`命运`,pinyin:`mìngyùn`,english:`fate`,hskLevel:5,kind:`noun`},{term:`永`,pinyin:`yǒng`,english:`perpetual (long stream of water; sound in 泳 swim)`,kind:`noun`},{term:`恒`,pinyin:`héng`,english:`constant`,kind:`noun`},{term:`泳`,pinyin:`yǒng`,english:`swim (water 氵 + 永)`,kind:`noun`},{term:`游泳`,pinyin:`yóuyǒng`,english:`to swim`,hskLevel:2,kind:`noun`},{term:`永恒`,pinyin:`yǒnghéng`,english:`forever (永 perpetual + 恒 constant)`,kind:`noun`},{term:`无畏`,pinyin:`wúwèi`,english:`fearless`,kind:`noun`},{term:`上帝`,pinyin:`shàngdì`,english:`God`,kind:`noun`},{term:`上帝与你常在`,pinyin:`shàngdì yǔ nǐ cháng zài`,english:`God is always with you`,kind:`noun`},{term:`曲`,pinyin:`qǔ`,english:`song`,hskLevel:4,kind:`noun`},{term:`生死有命`,pinyin:`shēngsǐ yǒu mìng`,english:`life and death have their destiny`,kind:`noun`},{term:`富贵在天`,pinyin:`fùguì zài tiān`,english:`wealth and rank are up to heaven`,kind:`noun`},{term:`死`,pinyin:`sǐ`,english:`death`,hskLevel:4,kind:`noun`},{term:`奇`,pinyin:`qí`,english:`odd`,hskLevel:4,kind:`noun`},{term:`氏`,pinyin:`shì`,english:`married-name suffix`,kind:`phrase`}]},{id:`zodiac`,name:`Zodiac`,blurb:`The Great Race: rat through pig, the cat who missed it, and the calendar words around 生肖.`,words:[{term:`十二生肖`,pinyin:`shí'èr shēngxiào`,english:`Chinese zodiac`,kind:`noun`},{term:`生肖`,pinyin:`shēngxiào`,english:`zodiac`,kind:`noun`},{term:`属相`,pinyin:`shǔxiàng`,english:`zodiac sign`,kind:`noun`},{term:`属`,pinyin:`shǔ`,english:`year of`,hskLevel:3,kind:`phrase`},{term:`本命年`,pinyin:`běnmìngnián`,english:`birth-year animal year`,kind:`noun`},{term:`鼠`,pinyin:`shǔ`,english:`rat`,hskLevel:5,kind:`noun`},{term:`牛`,pinyin:`niú`,english:`ox`,hskLevel:3,kind:`noun`}
16,{term:`虎`,pinyin:`hǔ`,english:`tiger`,hskLevel:5,kind:`noun`},{term:`兔`,pinyin:`tù`,english:`rabbit`,hskLevel:5,kind:`noun`},{term:`龙`,pinyin:`lóng`,english:`dragon`,hskLevel:3,kind:`noun`},{term:`蛇`,pinyin:`shé`,english:`snake`,hskLevel:5,kind:`noun`},{term:`马`,pinyin:`mǎ`,english:`horse`,hskLevel:3,kind:`noun`},{term:`羊`,pinyin:`yáng`,english:`goat / sheep`,hskLevel:3,kind:`noun`},{term:`猴`,pinyin:`hóu`,english:`monkey`,hskLevel:5,kind:`noun`},{term:`鸡`,pinyin:`jī`,english:`rooster`,hskLevel:2,kind:`noun`},{term:`狗`,pinyin:`gǒu`,english:`dog`,hskLevel:2,kind:`noun`},{term:`猪`,pinyin:`zhū`,english:`pig`,hskLevel:3,kind:`noun`},{term:`猫`,pinyin:`māo`,english:`cat`,hskLevel:2,kind:`noun`},{term:`鼠年`,pinyin:`shǔnián`,english:`Year of the Rat`,kind:`noun`},{term:`牛年`,pinyin:`niúnián`,english:`Year of the Ox`,kind:`noun`},{term:`虎年`,pinyin:`hǔnián`,english:`Year of the Tiger`,kind:`noun`},{term:`兔年`,pinyin:`tùnián`,english:`Year of the Rabbit`,kind:`noun`},{term:`龙年`,pinyin:`lóngnián`,english:`Year of the Dragon`,kind:`noun`},{term:`蛇年`,pinyin:`shénián`,english:`Year of the Snake`,kind:`noun`},{term:`马年`,pinyin:`mǎnián`,english:`Year of the Horse`,kind:`noun`},{term:`羊年`,pinyin:`yángnián`,english:`Year of the Goat`,kind:`noun`},{term:`猴年`,pinyin:`hóunián`,english:`Year of the Monkey`,kind:`noun`},{term:`鸡年`,pinyin:`jīnián`,english:`Year of the Rooster`,kind:`noun`},{term:`狗年`,pinyin:`gǒunián`,english:`Year of the Dog`,kind:`noun`},{term:`猪年`,pinyin:`zhūnián`,english:`Year of the Pig`,kind:`noun`},{term:`地支`,pinyin:`dìzhī`,english:`Earthly Branches`,kind:`noun`},{term:`子`,pinyin:`zǐ`,english:`zi (rat)`,kind:`noun`},{term:`丑`,pinyin:`chǒu`,english:`chou (ox)`,kind:`noun`},{term:`寅`,pinyin:`yín`,english:`yin (tiger)`,kind:`noun`},{term:`卯`,pinyin:`mǎo`,english:`mao (rabbit)`,kind:`noun`},{term:`辰`,pinyin:`chén`,english:`chen (dragon)`,kind:`noun`},{term:`巳`,pinyin:`sì`,english:`si (snake)`,kind:`noun`},{term:`午`,pinyin:`wǔ`,english:`wu (horse)`,kind:`noun`},{term:`未`,pinyin:`wèi`,english:`wei (goat)`,kind:`noun`},{term:`申`,pinyin:`shēn`,english:`shen (monkey)`,kind:`noun`},{term:`酉`,pinyin:`yǒu`,english:`you (rooster)`,kind:`noun`},{term:`戌`,pinyin:`xū`,english:`xu (dog)`,kind:`noun`},{term:`亥`,pinyin:`hài`,english:`hai (pig)`,kind:`noun`},{term:`天干`,pinyin:`tiāngān`,english:`Heavenly Stems`,kind:`noun`},{term:`五行`,pinyin:`wǔxíng`,english:`five elements`,kind:`noun`},{term:`农历`,pinyin:`nónglì`,english:`lunar calendar`,kind:`noun`},{term:`阴历`,pinyin:`yīnlì`,english:`lunar calendar`,kind:`noun`},{term:`春节`,pinyin:`chūnjié`,english:`Spring Festival`,hskLevel:2,kind:`noun`},{term:`过年`,pinyin:`guònián`,english:`celebrate New Year`,hskLevel:2,kind:`noun`},{term:`除夕`,pinyin:`chúxī`,english:`New Year's Eve`,hskLevel:5,kind:`noun`},{term:`元宵节`,pinyin:`yuánxiāojié`,english:`Lantern Festival`,kind:`noun`},{term:`红包`,pinyin:`hóngbāo`,english:`red envelope`,hskLevel:4,kind:`noun`},{term:`拜年`,pinyin:`bàinián`,english:`New Year visit`,kind:`noun`},{term:`吉祥`,pinyin:`jíxiáng`,english:`auspicious`,hskLevel:6,kind:`noun`},{term:`运势`,pinyin:`yùnshì`,english:`fortune`,kind:`noun`},{term:`相冲`,pinyin:`xiāngchōng`,english:`zodiac clash`,kind:`noun`},{term:`传说`,pinyin:`chuánshuō`,english:`legend`,hskLevel:3,kind:`noun`},{term:`过河`,pinyin:`guòhé`,english:`cross the river`,kind:`noun`},{term:`玉帝`,pinyin:`yùdì`,english:`Jade Emperor`,kind:`noun`},{term:`冠军`,pinyin:`guànjūn`,english:`champion`,hskLevel:5,kind:`noun`},{term:`顺序`,pinyin:`shùnxù`,english:`order`,hskLevel:4,kind:`noun`}]},{id:`posters`,name:`Poster slogans`,blurb:`Museum-wall copy from revolutionary posters: red ground, yellow star, slogans you still see in type specimens.`,words:[{term:`海报`,pinyin:`hǎibào`,english:`poster`,hskLevel:5,kind:`noun`},{term:`宣传画`,pinyin:`xuānchuánhuà`,english:`propaganda poster`,kind:`noun`},{term:`标语`,pinyin:`biāoyǔ`,english:`slogan`,hskLevel:6,kind:`noun`},{term:`口号`,pinyin:`kǒuhào`,english:`watchword`,kind:`noun`},{term:`红旗`,pinyin:`hóngqí`,english:`red flag`,kind:`noun`},{term:`五角星`,pinyin:`wǔjiǎoxīng`,english:`five-pointed star`,kind:`noun`},{term:`工农兵`,pinyin:`gōngnóngbīng`,english:`workers, peasants, soldiers`,kind:`noun`},{term:`为人民服务`,pinyin:`wèi rénmín fúwù`,english:`serve the people`,kind:`phrase`},{term:`自力更生`,pinyin:`zìlì gēngshēng`,english:`self-reliance`,kind:`phrase`},{term:`艰苦奋斗`,pinyin:`jiānkǔ fèndòu`,english:`work hard`,kind:`phrase`},{term:`好好学习`,pinyin:`hǎohǎo xuéxí`,english:`study hard`,kind:`phrase`},{term:`天天向上`,pinyin:`tiāntiān xiàngshàng`,english:`make progress every day`,kind:`phrase`},{term:`妇女能顶半边天`,pinyin:`fùnǚ néng dǐng bànbiāntiān`,english:`women hold up half the sky`,kind:`phrase`},{term:`团结就是力量`,pinyin:`tuánjié jiùshì lìliàng`,english:`unity is strength`,kind:`phrase`},{term:`实事求是`,pinyin:`shíshì qiúshì`,english:`seek truth from facts`,kind:`phrase`},{term:`敢想敢干`,pinyin:`gǎn xiǎng gǎn gàn`,english:`dare to think and act`,kind:`phrase`},{term:`向前进`,pinyin:`xiàng qiánjìn`,english:`forward`,kind:`phrase`},{term:`胜利`,pinyin:`shènglì`,english:`victory`,hskLevel:5,kind:`noun`},{term:`劳动`,pinyin:`láodòng`,english:`labour`,hskLevel:5,kind:`noun`},{term:`革命`,pinyin:`gémìng`,english:`revolution`,hskLevel:6,kind:`noun`},{term:`解放`,pinyin:`jiěfàng`,english:`liberation`,hskLevel:6,kind:`noun`},{term:`建设`,pinyin:`jiànshè`,english:`construction`,hskLevel:5,kind:`noun`},{term:`增产`,pinyin:`zēngchǎn`,english:`increase production`,kind:`phrase`},{term:`节约`,pinyin:`jiéyuē`,english:`practice thrift`,hskLevel:5,kind:`phrase`},{term:`勤俭`,pinyin:`qínjiǎn`,english:`industrious and frugal`,kind:`phrase`},{term:`保家卫国`,pinyin:`bǎojiā wèiguó`,english:`defend the homeland`,kind:`phrase`},{term:`大字报`,pinyin:`dàzìbào`,english:`big-character poster`,kind:`noun`},{term:`知青`,pinyin:`zhīqīng`,english:`educated youth`,kind:`noun`}]},{id:`idioms`,name:`Idioms & phrases`,blurb:`Four-character 成语 plus the 口头禅 you actually hear: 马马虎虎, 加油, 不好意思.`,words:[{term:`成语`,pinyin:`chéngyǔ`,english:`idiom`,hskLevel:5,kind:`noun`},{term:`俗语`,pinyin:`súyǔ`,english:`common saying`,kind:`noun`},{term:`口头禅`,pinyin:`kǒutóuchán`,english:`pet phrase`,kind:`noun`},{term:`成语故事`,pinyin:`chéngyǔ gùshi`,english:`idiom story`,kind:`noun`},{term:`画蛇添足`,pinyin:`huà shé tiān zú`,english:`gild the lily`,kind:`phrase`},{term:`塞翁失马`,pinyin:`sài wēng shī mǎ`,english:`blessing in disguise`,kind:`phrase`},{term:`对牛弹琴`,pinyin:`duì niú tán qín`,english:`cast pearls before swine`,kind:`phrase`},{term:`守株待兔`,pinyin:`shǒu zhū dài tù`,english:`wait for luck to repeat`,kind:`phrase`},{term:`亡羊补牢`,pinyin:`wáng yáng bǔ láo`,english:`better late than never`,kind:`phrase`},{term:`井底之蛙`,pinyin:`jǐng dǐ zhī wā`,english:`frog in a well`,kind:`phrase`},{term:`入乡随俗`,pinyin:`rù xiāng suí sú`,english:`when in Rome`,kind:`phrase`},{term:`半途而废`,pinyin:`bàn tú ér fèi`,english:`give up halfway`,hskLevel:6,kind:`phrase`},{term:`一箭双雕`,pinyin:`yí jiàn shuāng diāo`,english:`kill two birds with one stone`,kind:`phrase`},{term:`雪中送炭`,pinyin:`xuě zhōng sòng tàn`,english:`help in a pinch`,kind:`phrase`},{term:`破釜沉舟`,pinyin:`pò fǔ chén zhōu`,english:`burn one's boats`,kind:`phrase`},{term:`狐假虎威`,pinyin:`hú jiǎ hǔ wēi`,english:`borrowed tiger's might`,kind:`phrase`},{term:`马马虎虎`,pinyin:`mǎmahūhū`,english:`so-so`,kind:`phrase`},{term:`加油`,pinyin:`jiāyóu`,english:`come on`,hskLevel:5,kind:`phrase`},{term:`慢慢来`,pinyin:`mànman lái`,english:`take it slow`,kind:`phrase`},{term:`不好意思`,pinyin:`bùhǎoyìsi`,english:`sorry / excuse me`,hskLevel:4,kind:`phrase`},{term:`无所谓`,pinyin:`wúsuǒwèi`,english:`whatever`,hskLevel:5,kind:`phrase`},{term:`随便`,pinyin:`suíbiàn`,english:`as you like`,hskLevel:4,kind:`phrase`},{term:`差不多`,pinyin:`chàbuduō`,english:`almost / close enough`,hskLevel:3,kind:`phrase`},{term:`没办法`,pinyin:`méi bànfǎ`,english:`nothing to be done`,hskLevel:4,kind:`phrase`},{term:`开玩笑`,pinyin:`kāi wánxiào`,english:`kidding`,hskLevel:4,kind:`phrase`},{term:`好久不见`,pinyin:`hǎojiǔ bújiàn`,english:`long time no see`,hskLevel:3,kind:`phrase`},{term:`有意思`,pinyin:`yǒu yìsi`,english:`interesting`,hskLevel:2,kind:`phrase`},{term:`靠谱`,pinyin:`kàopǔ`,english:`reliable`,kind:`phrase`},{term:`给力`,pinyin:`gěilì`,english:`awesome`,kind:`phrase`},{term:`还好`,pinyin:`háihǎo`,english:`not bad`,kind:`phrase`},{term:`一般般`,pinyin:`yìbānbān`,english:`average`,kind:`phrase`}]},{id:`poetry`,name:`Classic poetry`,blurb:`Famous Tang and Song lines on 宣纸: 静夜思, 春晓, 登鹳雀楼, 悯农.`,words:[{term:`诗`,pinyin:`shī`,english:`poetry`,hskLevel:4,kind:`noun`},{term:`诗词`,pinyin:`shīcí`,english:`poetry and ci`,kind:`noun`},{term:`唐诗`,pinyin:`tángshī`,english:`Tang poetry`,kind:`noun`},{term:`宋词`,pinyin:`sòngcí`,english:`Song ci verse`,kind:`noun`},{term:`绝句`,pinyin:`juéjù`,english:`quatrain`,kind:`noun`}
16,{term:`律诗`,pinyin:`lǜshī`,english:`regulated verse`,kind:`noun`},{term:`诗人`,pinyin:`shīrén`,english:`poet`,hskLevel:5,kind:`noun`},{term:`宣纸`,pinyin:`xuānzhǐ`,english:`xuan paper`,kind:`noun`},{term:`李白`,pinyin:`Lǐ Bái`,english:`Li Bai`,kind:`noun`},{term:`杜甫`,pinyin:`Dù Fǔ`,english:`Du Fu`,kind:`noun`},{term:`苏轼`,pinyin:`Sū Shì`,english:`Su Shi`,kind:`noun`},{term:`静夜思`,pinyin:`Jìng yè sī`,english:`Quiet Night Thought`,kind:`noun`},{term:`春晓`,pinyin:`Chūn xiǎo`,english:`Spring Dawn`,kind:`noun`},{term:`登鹳雀楼`,pinyin:`Dēng Guànquè lóu`,english:`Climbing White Stork Tower`,kind:`noun`},{term:`悯农`,pinyin:`Mǐn nóng`,english:`Pity the Peasant`,kind:`noun`},{term:`江雪`,pinyin:`Jiāng xuě`,english:`River Snow`,kind:`noun`},{term:`清明`,pinyin:`qīngmíng`,english:`Qingming`,hskLevel:5,kind:`noun`},{term:`床前明月光`,pinyin:`chuáng qián míng yuè guāng`,english:`bright moonlight before my bed`,kind:`phrase`},{term:`疑是地上霜`,pinyin:`yí shì dì shàng shuāng`,english:`I took it for frost on the ground`,kind:`phrase`},{term:`举头望明月`,pinyin:`jǔ tóu wàng míng yuè`,english:`raise the head to the bright moon`,kind:`phrase`},{term:`低头思故乡`,pinyin:`dī tóu sī gùxiāng`,english:`lower the head and think of home`,kind:`phrase`},{term:`春眠不觉晓`,pinyin:`chūn mián bù jué xiǎo`,english:`spring sleep, unaware of dawn`,kind:`phrase`},{term:`处处闻啼鸟`,pinyin:`chùchù wén tí niǎo`,english:`everywhere, birdsong`,kind:`phrase`},{term:`夜来风雨声`,pinyin:`yè lái fēngyǔ shēng`,english:`last night, wind and rain`,kind:`phrase`},{term:`花落知多少`,pinyin:`huā luò zhī duōshao`,english:`who knows how many flowers fell`,kind:`phrase`},{term:`欲穷千里目`,pinyin:`yù qióng qiānlǐ mù`,english:`to see a thousand miles`,kind:`phrase`},{term:`更上一层楼`,pinyin:`gèng shàng yì céng lóu`,english:`climb one more storey`,kind:`phrase`},{term:`谁知盘中餐`,pinyin:`shéi zhī pán zhōng cān`,english:`who knows the food in the bowl`,kind:`phrase`},{term:`粒粒皆辛苦`,pinyin:`lìlì jiē xīnkǔ`,english:`every grain is hard work`,kind:`phrase`},{term:`千山鸟飞绝`,pinyin:`qiān shān niǎo fēi jué`,english:`a thousand mountains, no birds`,kind:`phrase`},{term:`万径人踪灭`,pinyin:`wàn jìng rén zōng miè`,english:`ten thousand paths, no footprints`,kind:`phrase`},{term:`清明时节雨纷纷`,pinyin:`qīngmíng shíjié yǔ fēnfēn`,english:`at Qingming the rain falls thick`,kind:`phrase`},{term:`海内存知己`,pinyin:`hǎi nèi cún zhījǐ`,english:`a bosom friend within the seas`,kind:`phrase`},{term:`天涯若比邻`,pinyin:`tiānyá ruò bǐlín`,english:`the far edge of the world feels next door`,kind:`phrase`},{term:`但愿人长久`,pinyin:`dàn yuàn rén chángjiǔ`,english:`may we live long`,kind:`phrase`},{term:`千里共婵娟`,pinyin:`qiānlǐ gòng chánjuān`,english:`share the moon a thousand miles apart`,kind:`phrase`}]},{id:`plaques`,name:`Palace plaques`,blurb:`Blue-and-gold 匾额 over halls and gates: Forbidden City, Temple of Heaven, Summer Palace — the boards you look up at in Beijing.`,words:[{term:`匾额`,pinyin:`biǎn'é`,english:`plaque`,kind:`noun`},{term:`牌匾`,pinyin:`páibiǎn`,english:`inscribed board`,kind:`noun`},{term:`门匾`,pinyin:`ménbiǎn`,english:`door plaque`,kind:`noun`},{term:`故宫`,pinyin:`Gùgōng`,english:`Forbidden City`,kind:`noun`},{term:`紫禁城`,pinyin:`Zǐjìnchéng`,english:`Forbidden City`,kind:`noun`},{term:`殿`,pinyin:`diàn`,english:`hall`,hskLevel:6,kind:`noun`},{term:`宫`,pinyin:`gōng`,english:`palace`,hskLevel:6,kind:`noun`},{term:`宫门`,pinyin:`gōngmén`,english:`palace gate`,kind:`noun`},{term:`屋檐`,pinyin:`wūyán`,english:`eaves`,kind:`noun`},{term:`太和殿`,pinyin:`Tàihé diàn`,english:`Hall of Supreme Harmony`,kind:`noun`},{term:`中和殿`,pinyin:`Zhōnghé diàn`,english:`Hall of Central Harmony`,kind:`noun`},{term:`保和殿`,pinyin:`Bǎohé diàn`,english:`Hall of Preserving Harmony`,kind:`noun`},{term:`乾清宫`,pinyin:`Qiánqīng gōng`,english:`Palace of Heavenly Purity`,kind:`noun`},{term:`坤宁宫`,pinyin:`Kūnníng gōng`,english:`Palace of Earthly Tranquility`,kind:`noun`},{term:`养心殿`,pinyin:`Yǎngxīn diàn`,english:`Hall of Mental Cultivation`,kind:`noun`},{term:`交泰殿`,pinyin:`Jiāotài diàn`,english:`Hall of Union`,kind:`noun`},{term:`正大光明`,pinyin:`zhèngdà guāngmíng`,english:`upright and bright`,kind:`phrase`},{term:`中正仁和`,pinyin:`zhōngzhèng rénhé`,english:`upright and harmonious`,kind:`phrase`},{term:`午门`,pinyin:`Wǔmén`,english:`Meridian Gate`,kind:`noun`},{term:`神武门`,pinyin:`Shénwǔ mén`,english:`Gate of Divine Prowess`,kind:`noun`},{term:`天安门`,pinyin:`Tiān'ānmén`,english:`Tiananmen`,kind:`noun`},{term:`祈年殿`,pinyin:`Qínián diàn`,english:`Hall of Prayer for Good Harvests`,kind:`noun`},{term:`天坛`,pinyin:`Tiāntán`,english:`Temple of Heaven`,kind:`noun`},{term:`颐和园`,pinyin:`Yíhéyuán`,english:`Summer Palace`,kind:`noun`},{term:`仁寿殿`,pinyin:`Rénshòu diàn`,english:`Hall of Benevolence and Longevity`,kind:`noun`},{term:`排云殿`,pinyin:`Páiyún diàn`,english:`Hall of Dispelling Clouds`,kind:`noun`},{term:`雍和宫`,pinyin:`Yōnghé gōng`,english:`Yonghe Temple`,kind:`noun`}]},{id:`taiwan`,name:`Taiwan trip`,blurb:`Taipei, Tainan, and Kaohsiung: night markets, MRT, HSR, and the stall signs you actually order from.`,words:[{term:`台湾`,pinyin:`Táiwān`,english:`Taiwan`,kind:`noun`},{term:`台北`,pinyin:`Táiběi`,english:`Taipei`,kind:`noun`},{term:`台南`,pinyin:`Táinán`,english:`Tainan`,kind:`noun`},{term:`高雄`,pinyin:`Gāoxióng`,english:`Kaohsiung`,kind:`noun`},{term:`高铁`,pinyin:`gāotiě`,english:`high-speed rail`,kind:`noun`},{term:`捷运`,pinyin:`jiéyùn`,english:`MRT`,kind:`noun`},{term:`悠游卡`,pinyin:`Yōuyóu kǎ`,english:`EasyCard`,kind:`noun`},{term:`一卡通`,pinyin:`Yīkǎtōng`,english:`iPass`,kind:`noun`},{term:`左营`,pinyin:`Zuǒyíng`,english:`Zuoying`,kind:`noun`},{term:`西门町`,pinyin:`Xīméndīng`,english:`Ximending`,kind:`noun`},{term:`士林夜市`,pinyin:`Shìlín yèshì`,english:`Shilin Night Market`,kind:`noun`},{term:`饶河街`,pinyin:`Ráohé jiē`,english:`Raohe Street`,kind:`noun`},{term:`台北101`,pinyin:`Táiběi yāo yāo yāo`,english:`Taipei 101`,kind:`noun`},{term:`龙山寺`,pinyin:`Lóngshān sì`,english:`Longshan Temple`,kind:`noun`}
16,{term:`安平`,pinyin:`Ānpíng`,english:`Anping`,kind:`noun`},{term:`赤嵌楼`,pinyin:`Chìkàn lóu`,english:`Chihkan Tower`,kind:`noun`},{term:`花园夜市`,pinyin:`Huāyuán yèshì`,english:`Garden Night Market`,kind:`noun`},{term:`牛肉汤`,pinyin:`niúròu tāng`,english:`beef soup`,kind:`noun`},{term:`驳二`,pinyin:`Bó'èr`,english:`Pier-2`,kind:`noun`},{term:`爱河`,pinyin:`Àihé`,english:`Love River`,kind:`noun`},{term:`六合夜市`,pinyin:`Liùhé yèshì`,english:`Liouhe Night Market`,kind:`noun`},{term:`莲池潭`,pinyin:`Liánchí tán`,english:`Lotus Pond`,kind:`noun`},{term:`旗津`,pinyin:`Qíjīn`,english:`Cijin`,kind:`noun`},{term:`夜市`,pinyin:`yèshì`,english:`night market`,kind:`noun`},{term:`盐酥鸡`,pinyin:`yán sū jī`,english:`popcorn chicken`,kind:`noun`},{term:`臭豆腐`,pinyin:`chòu dòufu`,english:`stinky tofu`,kind:`noun`},{term:`蚵仔煎`,pinyin:`hézǎi jiān`,english:`oyster omelette`,kind:`noun`},{term:`卤肉饭`,pinyin:`lǔròu fàn`,english:`braised pork rice`,kind:`noun`},{term:`内用`,pinyin:`nèiyòng`,english:`for here`,kind:`phrase`},{term:`外带`,pinyin:`wàidài`,english:`to go`,kind:`phrase`}]},{id:`airport`,name:`Airport board`,blurb:`The departure board: 航班, 登机口, 延误, 准点 — what you look up at before you board.`,words:[{term:`航班`,pinyin:`hángbān`,english:`flight`,hskLevel:5,kind:`noun`},{term:`航班号`,pinyin:`hángbān hào`,english:`flight number`,kind:`noun`},{term:`目的地`,pinyin:`mùdìdì`,english:`destination`,hskLevel:5,kind:`noun`},{term:`出发`,pinyin:`chūfā`,english:`departures`,hskLevel:4,kind:`noun`},{term:`到达`,pinyin:`dàodá`,english:`arrivals`,hskLevel:4,kind:`noun`},{term:`登机口`,pinyin:`dēngjīkǒu`,english:`gate`,kind:`noun`},{term:`登机`,pinyin:`dēngjī`,english:`boarding`,kind:`noun`},{term:`登机中`,pinyin:`dēngjī zhōng`,english:`now boarding`,kind:`phrase`},{term:`值机`,pinyin:`zhíjī`,english:`check-in`,kind:`noun`},{term:`安检`,pinyin:`ānjiǎn`,english:`security`,kind:`noun`},{term:`行李`,pinyin:`xíngli`,english:`baggage`,hskLevel:4,kind:`noun`},{term:`延误`,pinyin:`yánwù`,english:`delayed`,kind:`phrase`},{term:`取消`,pinyin:`qǔxiāo`,english:`cancelled`,hskLevel:3,kind:`phrase`},{term:`准点`,pinyin:`zhǔndiǎn`,english:`on time`,kind:`phrase`},{term:`机场`,pinyin:`jīchǎng`,english:`airport`,hskLevel:2,kind:`noun`},{term:`航空`,pinyin:`hángkōng`,english:`airline`,hskLevel:5,kind:`noun`},{term:`登机牌`,pinyin:`dēngjīpái`,english:`boarding pass`,kind:`noun`},{term:`候机`,pinyin:`hòujī`,english:`waiting to board`,kind:`noun`},{term:`起飞`,pinyin:`qǐfēi`,english:`takeoff`,hskLevel:4,kind:`noun`},{term:`降落`,pinyin:`jiàngluò`,english:`landing`,hskLevel:5,kind:`noun`},{term:`海关`,pinyin:`hǎiguān`,english:`customs`,hskLevel:5,kind:`noun`},{term:`桃园`,pinyin:`Táoyuán`,english:`Taoyuan`,kind:`noun`},{term:`松山`,pinyin:`Sōngshān`,english:`Songshan`,kind:`noun`},{term:`高雄`,pinyin:`Gāoxióng`,english:`Kaohsiung`,kind:`noun`},{term:`东京`,pinyin:`Dōngjīng`,english:`Tokyo`,kind:`noun`},{term:`香港`,pinyin:`Xiānggǎng`,english:`Hong Kong`,kind:`noun`},{term:`请尽快登机`,pinyin:`qǐng jǐnkuài dēngjī`,english:`please board immediately`,kind:`phrase`}]},{id:`trains`,name:`Train board`,blurb:`Intercity 高铁/火车 and subway 地铁/捷运: 车次, 站台, 红线, 下一班.`,words:[{term:`高铁`,pinyin:`gāotiě`,english:`high-speed rail`,kind:`noun`},{term:`火车`,pinyin:`huǒchē`,english:`train`,hskLevel:2,kind:`noun`},{term:`动车`,pinyin:`dòngchē`,english:`EMU train`,kind:`noun`},{term:`车次`,pinyin:`chēcì`,english:`train number`,kind:`noun`},{term:`站台`,pinyin:`zhàntái`,english:`platform`,kind:`noun`},{term:`月台`,pinyin:`yuètái`,english:`platform`,kind:`noun`},{term:`检票`,pinyin:`jiǎnpiào`,english:`ticket check`,kind:`noun`},{term:`始发`,pinyin:`shǐfā`,english:`origin`,kind:`noun`},{term:`终点`,pinyin:`zhōngdiǎn`,english:`terminus`,hskLevel:6,kind:`noun`},{term:`晚点`,pinyin:`wǎndiǎn`,english:`running late`,kind:`phrase`},{term:`准点`,pinyin:`zhǔndiǎn`,english:`on time`,kind:`phrase`},{term:`对号入座`,pinyin:`duìhào rùzuò`,english:`reserved seating`,kind:`phrase`},{term:`自由座`,pinyin:`zìyóu zuò`,english:`unreserved seat`,kind:`noun`},{term:`左营`,pinyin:`Zuǒyíng`,english:`Zuoying`,kind:`noun`},{term:`地铁`,pinyin:`dìtiě`,english:`subway`,hskLevel:3,kind:`noun`},{term:`捷运`,pinyin:`jiéyùn`,english:`MRT`,kind:`noun`},{term:`红线`,pinyin:`hóngxiàn`,english:`red line`,kind:`noun`},{term:`蓝线`,pinyin:`lánxiàn`,english:`blue line`,kind:`noun`},{term:`绿线`,pinyin:`lǜxiàn`,english:`green line`,kind:`noun`},{term:`下一班`,pinyin:`xià yì bān`,english:`next train`,kind:`phrase`},{term:`换乘`,pinyin:`huànchéng`,english:`transfer`,kind:`noun`},{term:`末班车`,pinyin:`mòbānchē`,english:`last train`,kind:`noun`},{term:`下一站`,pinyin:`xià yí zhàn`,english:`next station`,kind:`phrase`},{term:`进站`,pinyin:`jìnzhàn`,english:`enter station`,kind:`phrase`},{term:`出站`,pinyin:`chūzhàn`,english:`exit station`,kind:`phrase`}
16,{term:`售票`,pinyin:`shòupiào`,english:`ticket office`,kind:`noun`},{term:`停运`,pinyin:`tíngyùn`,english:`suspended`,kind:`phrase`},{term:`车厢`,pinyin:`chēxiāng`,english:`carriage`,kind:`noun`},{term:`请往内走`,pinyin:`qǐng wǎng nèi zǒu`,english:`please move inside`,kind:`phrase`}]},{id:`clock`,name:`Clock`,blurb:`Every label in the iPhone Clock app. Read these, then flip just Clock to Chinese.`,words:[{term:`时钟`,pinyin:`shízhōng`,english:`clock`,kind:`noun`},{term:`世界时钟`,pinyin:`shìjiè shízhōng`,english:`world clock`,kind:`noun`},{term:`闹钟`,pinyin:`nàozhōng`,english:`alarm`,hskLevel:4,kind:`noun`},{term:`秒表`,pinyin:`miǎobiǎo`,english:`stopwatch`,kind:`noun`},{term:`计时器`,pinyin:`jìshíqì`,english:`timer`,kind:`noun`},{term:`城市`,pinyin:`chéngshì`,english:`city`,hskLevel:3,kind:`noun`},{term:`小时`,pinyin:`xiǎoshí`,english:`hours`,hskLevel:2,kind:`noun`},{term:`分钟`,pinyin:`fēnzhōng`,english:`minutes`,hskLevel:2,kind:`noun`},{term:`秒`,pinyin:`miǎo`,english:`seconds`,hskLevel:2,kind:`noun`},{term:`今天`,pinyin:`jīntiān`,english:`today`,hskLevel:1,kind:`noun`},{term:`明天`,pinyin:`míngtiān`,english:`tomorrow`,hskLevel:1,kind:`noun`},{term:`昨天`,pinyin:`zuótiān`,english:`yesterday`,hskLevel:1,kind:`noun`},{term:`上午`,pinyin:`shàngwǔ`,english:`AM`,hskLevel:1,kind:`noun`},{term:`下午`,pinyin:`xiàwǔ`,english:`PM`,hskLevel:1,kind:`noun`},{term:`睡眠`,pinyin:`shuìmián`,english:`sleep`,hskLevel:5,kind:`noun`},{term:`星期日`,pinyin:`xīngqīrì`,english:`Sunday`,hskLevel:1,kind:`noun`},{term:`星期一`,pinyin:`xīngqīyī`,english:`Monday`,hskLevel:1,kind:`noun`},{term:`星期二`,pinyin:`xīngqīèr`,english:`Tuesday`,hskLevel:1,kind:`noun`},{term:`星期三`,pinyin:`xīngqīsān`,english:`Wednesday`,hskLevel:1,kind:`noun`},{term:`星期四`,pinyin:`xīngqīsì`,english:`Thursday`,hskLevel:1,kind:`noun`},{term:`星期五`,pinyin:`xīngqīwǔ`,english:`Friday`,hskLevel:1,kind:`noun`},{term:`星期六`,pinyin:`xīngqīliù`,english:`Saturday`,hskLevel:1,kind:`noun`},{term:`开始`,pinyin:`kāishǐ`,english:`start (timer)`,hskLevel:2,kind:`phrase`},{term:`启动`,pinyin:`qǐdòng`,english:`start (stopwatch)`,kind:`phrase`},{term:`暂停`,pinyin:`zàntíng`,english:`pause`,kind:`phrase`},{term:`停止`,pinyin:`tíngzhǐ`,english:`stop`,hskLevel:4,kind:`phrase`},{term:`继续`,pinyin:`jìxù`,english:`resume`,hskLevel:4,kind:`phrase`},{term:`稍后提醒`,pinyin:`shāohòu tíxǐng`,english:`snooze`,kind:`phrase`},{term:`取消`,pinyin:`qǔxiāo`,english:`cancel`,hskLevel:3,kind:`phrase`},{term:`删除`,pinyin:`shānchú`,english:`delete`,hskLevel:5,kind:`phrase`},{term:`编辑`,pinyin:`biānjí`,english:`edit`,hskLevel:5,kind:`phrase`},{term:`重复`,pinyin:`chóngfù`,english:`repeat`,hskLevel:3,kind:`phrase`},{term:`标签`,pinyin:`biāoqiān`,english:`label`,hskLevel:5,kind:`phrase`},{term:`提示音`,pinyin:`tíshìyīn`,english:`sound`,kind:`phrase`},{term:`铃声`,pinyin:`língshēng`,english:`ringtone`,kind:`phrase`},{term:`添加`,pinyin:`tiānjiā`,english:`add`,hskLevel:4,kind:`phrase`},{term:`添加城市`,pinyin:`tiānjiā chéngshì`,english:`add city`,kind:`phrase`},{term:`存储`,pinyin:`cúnchǔ`,english:`save`,hskLevel:6,kind:`phrase`},{term:`复位`,pinyin:`fùwèi`,english:`reset`,kind:`phrase`},{term:`计次`,pinyin:`jìcì`,english:`lap`,kind:`phrase`},{term:`完成`,pinyin:`wánchéng`,english:`done`,hskLevel:3,kind:`phrase`},{term:`关闭`,pinyin:`guānbì`,english:`close`,hskLevel:2,kind:`phrase`},{term:`开启`,pinyin:`kāiqǐ`,english:`on`,kind:`phrase`},{term:`永不`,pinyin:`yǒngbù`,english:`never`,kind:`phrase`},{term:`工作日`,pinyin:`gōngzuòrì`,english:`weekdays`,kind:`phrase`},{term:`周末`,pinyin:`zhōumò`,english:`weekends`,hskLevel:3,kind:`phrase`},{term:`每一天`,pinyin:`měi yī tiān`,english:`every day`,kind:`phrase`},{term:`计时结束时`,pinyin:`jìshí jiéshù shí`,english:`when timer ends`,kind:`phrase`},{term:`停止播放`,pinyin:`tíngzhǐ bōfàng`,english:`stop playing`,kind:`phrase`},{term:`起床`,pinyin:`qǐchuáng`,english:`wake up`,hskLevel:2,kind:`phrase`},{term:`就寝`,pinyin:`jiùqǐn`,english:`bedtime`,kind:`phrase`},{term:`更改`,pinyin:`gēnggǎi`,english:`change`,hskLevel:5,kind:`phrase`},{term:`搜索`,pinyin:`sōusuǒ`,english:`search`,hskLevel:5,kind:`phrase`},{term:`其他`,pinyin:`qítā`,english:`other`,hskLevel:3,kind:`phrase`},{term:`最近使用`,pinyin:`zuìjìn shǐyòng`,english:`recents`,kind:`phrase`},{term:`设定`,pinyin:`shèdìng`,english:`set`,hskLevel:5,kind:`phrase`}]},{id:`calendar`,name:`Calendar`,blurb:`The iPhone Calendar app, including lunar dates and holiday calendars. Flip just 
16Calendar after the guide.`,words:[{term:`日历`,pinyin:`rìlì`,english:`calendar`,hskLevel:3,kind:`noun`},{term:`收件箱`,pinyin:`shōujiànxiāng`,english:`inbox`,kind:`noun`},{term:`农历`,pinyin:`nónglì`,english:`lunar calendar`,kind:`noun`},{term:`公历`,pinyin:`gōnglì`,english:`gregorian`,kind:`noun`},{term:`节假日`,pinyin:`jiéjiàrì`,english:`holidays`,kind:`noun`},{term:`中国大陆节假日`,pinyin:`Zhōngguó dàlù jiéjiàrì`,english:`China holidays`,kind:`noun`},{term:`生日`,pinyin:`shēngrì`,english:`birthdays`,hskLevel:2,kind:`noun`},{term:`出行时间`,pinyin:`chūxíng shíjiān`,english:`travel time`,kind:`noun`},{term:`今天`,pinyin:`jīntiān`,english:`today`,hskLevel:1,kind:`noun`},{term:`明天`,pinyin:`míngtiān`,english:`tomorrow`,hskLevel:1,kind:`noun`},{term:`昨天`,pinyin:`zuótiān`,english:`yesterday`,hskLevel:1,kind:`noun`},{term:`上午`,pinyin:`shàngwǔ`,english:`AM`,hskLevel:1,kind:`noun`},{term:`下午`,pinyin:`xiàwǔ`,english:`PM`,hskLevel:1,kind:`noun`},{term:`星期日`,pinyin:`xīngqīrì`,english:`Sunday`,hskLevel:1,kind:`noun`},{term:`星期一`,pinyin:`xīngqīyī`,english:`Monday`,hskLevel:1,kind:`noun`},{term:`星期二`,pinyin:`xīngqīèr`,english:`Tuesday`,hskLevel:1,kind:`noun`},{term:`星期三`,pinyin:`xīngqīsān`,english:`Wednesday`,hskLevel:1,kind:`noun`},{term:`星期四`,pinyin:`xīngqīsì`,english:`Thursday`,hskLevel:1,kind:`noun`},{term:`星期五`,pinyin:`xīngqīwǔ`,english:`Friday`,hskLevel:1,kind:`noun`},{term:`星期六`,pinyin:`xīngqīliù`,english:`Saturday`,hskLevel:1,kind:`noun`},{term:`日`,pinyin:`rì`,english:`day view`,hskLevel:1,kind:`phrase`},{term:`周`,pinyin:`zhōu`,english:`week view`,hskLevel:3,kind:`phrase`},{term:`月`,pinyin:`yuè`,english:`month view`,hskLevel:1,kind:`phrase`},{term:`年`,pinyin:`nián`,english:`year view`,hskLevel:1,kind:`phrase`},{term:`日程`,pinyin:`rìchéng`,english:`event`,kind:`phrase`},{term:`新日程`,pinyin:`xīn rìchéng`,english:`new event`,kind:`phrase`},{term:`全天`,pinyin:`quántiān`,english:`all-day`,kind:`phrase`},{term:`开始`,pinyin:`kāishǐ`,english:`starts`,hskLevel:2,kind:`phrase`},{term:`结束`,pinyin:`jiéshù`,english:`ends`,hskLevel:3,kind:`phrase`},{term:`添加`,pinyin:`tiānjiā`,english:`add`,hskLevel:4,kind:`phrase`},{term:`编辑`,pinyin:`biānjí`,english:`edit`,hskLevel:5,kind:`phrase`},{term:`删除`,pinyin:`shānchú`,english:`delete`,hskLevel:5,kind:`phrase`},{term:`完成`,pinyin:`wánchéng`,english:`done`,hskLevel:3,kind:`phrase`},{term:`取消`,pinyin:`qǔxiāo`,english:`cancel`,hskLevel:3,kind:`phrase`},{term:`存储`,pinyin:`cúnchǔ`,english:`save`,hskLevel:6,kind:`phrase`},{term:`重复`,pinyin:`chóngfù`,english:`repeat`,hskLevel:3,kind:`phrase`},{term:`邀请`,pinyin:`yāoqǐng`,english:`invitees`,hskLevel:5,kind:`phrase`},{term:`忙碌`,pinyin:`mánglù`,english:`busy`,hskLevel:4,kind:`phrase`},{term:`空闲`,pinyin:`kòngxián`,english:`free`,kind:`phrase`},{term:`添加日历`,pinyin:`tiānjiā rìlì`,english:`add calendar`,kind:`phrase`},{term:`添加节假日日历`,pinyin:`tiānjiā jiéjiàrì rìlì`,english:`add holiday calendar`,kind:`phrase`},{term:`添加订阅日历`,pinyin:`tiānjiā dìngyuè rìlì`,english:`add subscription calendar`,kind:`phrase`},{term:`接受`,pinyin:`jiēshòu`,english:`accept`,hskLevel:4,kind:`phrase`},{term:`谢绝`,pinyin:`xièjué`,english:`decline`,kind:`phrase`},{term:`暂定`,pinyin:`zàndìng`,english:`maybe`,kind:`phrase`},{term:`地点`,pinyin:`dìdiǎn`,english:`location`,hskLevel:4,kind:`phrase`},{term:`提醒`,pinyin:`tíxǐng`,english:`alert`,hskLevel:5,kind:`phrase`},{term:`其他历法`,pinyin:`qítā lìfǎ`,english:`alternate calendars`,kind:`phrase`},{term:`星期开始于`,pinyin:`xīngqī kāishǐ yú`,english:`week starts on`,kind:`phrase`},{term:`周数`,pinyin:`zhōushù`,english:`week numbers`,kind:`phrase`},{term:`显示所有日历`,pinyin:`xiǎnshì suǒyǒu rìlì`,english:`show all calendars`,kind:`phrase`},{term:`取消订阅`,pinyin:`qǔxiāo dìngyuè`,english:`unsubscribe`,kind:`phrase`},{term:`日程提醒`,pinyin:`rìchéng tíxǐng`,english:`event alerts`,kind:`phrase`},{term:`查找`,pinyin:`cházhǎo`,english:`find`,hskLevel:3,kind:`phrase`}]},{id:`notes`,name:`Notes`,blurb:`The iPhone Notes app is 备忘录. Read these, then flip just Notes to Chinese.`,words:[{term:`备忘录`,pinyin:`bèiwànglù`,english:`notes`,kind:`noun`},{term:`文件夹`,pinyin:`wénjiànjiā`,english:`folder`,hskLevel:5,kind:`noun`},{term:`智能文件夹`,pinyin:`zhìnéng wénjiànjiā`,english:`smart folder`,kind:`noun`},{term:`快速备忘录`,pinyin:`kuàisù bèiwànglù`,english:`quick note`,kind:`noun`},{term:`核对清单`,pinyin:`héduì qīngdān`,english:`checklist`,kind:`noun`},{term:`附件`,pinyin:`fùjiàn`,english:`attachment`,kind:`noun`},{term:`标签`,pinyin:`biāoqiān`,english:`tag`,hskLevel:5,kind:`noun`},{term:`新建文件夹`,pinyin:`xīnjiàn wénjiànjiā`,english:`new folder`,kind:`phrase`},{term:`置顶`,pinyin:`zhìdǐng`,english:`pin`,kind:`phrase`},{term:`画廊视图`,pinyin:`huàláng shìtú`,english:`gallery view`,kind:`phrase`},{term:`列表视图`,pinyin:`lièbiǎo shìtú`,english:`list view`,kind:`phrase`},{term:`最近删除`,pinyin:`zuìjìn shānchú`,english:`recently deleted`,kind:`phrase`},{term:`恢复`,pinyin:`huīfù`,english:`recover`,hskLevel:5,kind:`phrase`},{term:`扫描`,pinyin:`sǎomiáo`,english:`scan`,kind:`phrase`},{term:`扫描文稿`,pinyin:`sǎomiáo wéngǎo`,english:`scan documents`,kind:`phrase`},{term:`表格`,pinyin:`biǎogé`,english:`table`,hskLevel:5,kind:`phrase`}
16,{term:`标题`,pinyin:`biāotí`,english:`title`,hskLevel:4,kind:`phrase`},{term:`副标题`,pinyin:`fùbiāotí`,english:`heading`,kind:`phrase`},{term:`正文`,pinyin:`zhèngwén`,english:`body`,kind:`phrase`},{term:`锁定`,pinyin:`suǒdìng`,english:`lock`,hskLevel:6,kind:`phrase`},{term:`解锁`,pinyin:`jiěsuǒ`,english:`unlock`,kind:`phrase`},{term:`选择备忘录`,pinyin:`xuǎnzé bèiwànglù`,english:`select notes`,kind:`phrase`},{term:`移动`,pinyin:`yídòng`,english:`move`,hskLevel:5,kind:`phrase`},{term:`存储`,pinyin:`cúnchǔ`,english:`save`,hskLevel:6,kind:`phrase`},{term:`完成`,pinyin:`wánchéng`,english:`done`,hskLevel:3,kind:`phrase`},{term:`删除`,pinyin:`shānchú`,english:`delete`,hskLevel:5,kind:`phrase`},{term:`编写`,pinyin:`biānxiě`,english:`compose`,hskLevel:5,kind:`phrase`},{term:`搜索`,pinyin:`sōusuǒ`,english:`search`,hskLevel:5,kind:`phrase`},{term:`共享`,pinyin:`gòngxiǎng`,english:`share`,hskLevel:4,kind:`phrase`},{term:`取消`,pinyin:`qǔxiāo`,english:`cancel`,hskLevel:3,kind:`phrase`},{term:`更多`,pinyin:`gèngduō`,english:`more`,hskLevel:2,kind:`phrase`},{term:`所有 iCloud`,pinyin:`suǒyǒu iCloud`,english:`all iCloud`,kind:`phrase`}]},{id:`messages`,name:`Messages`,blurb:`The iPhone Messages app is 信息. Flip just Messages after the guide.`,words:[{term:`信息`,pinyin:`xìnxī`,english:`messages`,hskLevel:4,kind:`noun`},{term:`短信`,pinyin:`duǎnxìn`,english:`SMS`,kind:`noun`},{term:`语音信息`,pinyin:`yǔyīn xìnxī`,english:`audio message`,kind:`noun`},{term:`发送`,pinyin:`fāsòng`,english:`send`,hskLevel:5,kind:`phrase`},{term:`新信息`,pinyin:`xīn xìnxī`,english:`new message`,kind:`phrase`},{term:`已读`,pinyin:`yǐdú`,english:`read`,kind:`phrase`},{term:`送达`,pinyin:`sòngdá`,english:`delivered`,kind:`phrase`},{term:`回复`,pinyin:`huífù`,english:`reply`,hskLevel:5,kind:`phrase`},{term:`撤回`,pinyin:`chèhuí`,english:`undo send`,kind:`phrase`},{term:`置顶`,pinyin:`zhìdǐng`,english:`pin`,kind:`phrase`},{term:`隐藏提醒`,pinyin:`yǐncáng tíxǐng`,english:`hide alerts`,kind:`phrase`},{term:`已知发件人`,pinyin:`yǐzhī fājiànrén`,english:`known senders`,kind:`phrase`},{term:`未知发件人`,pinyin:`wèizhī fājiànrén`,english:`unknown senders`,kind:`phrase`},{term:`全部信息`,pinyin:`quánbù xìnxī`,english:`all messages`,kind:`phrase`},{term:`编辑`,pinyin:`biānjí`,english:`edit`,hskLevel:5,kind:`phrase`},{term:`删除`,pinyin:`shānchú`,english:`delete`,hskLevel:5,kind:`phrase`},{term:`完成`,pinyin:`wánchéng`,english:`done`,hskLevel:3,kind:`phrase`},{term:`取消`,pinyin:`qǔxiāo`,english:`cancel`,hskLevel:3,kind:`phrase`},{term:`搜索`,pinyin:`sōusuǒ`,english:`search`,hskLevel:5,kind:`phrase`}]},{id:`safari`,name:`Safari`,blurb:`Safari in Chinese. Tabs, bookmarks, and private browsing after the guide.`,words:[{term:`书签`,pinyin:`shūqiān`,english:`bookmarks`,kind:`noun`},{term:`阅读列表`,pinyin:`yuèdú lièbiǎo`,english:`reading list`,kind:`noun`},{term:`历史记录`,pinyin:`lìshǐ jìlù`,english:`history`,kind:`noun`},{term:`下载项`,pinyin:`xiàzài xiàng`,english:`downloads`,kind:`noun`},{term:`标签页`,pinyin:`biāoqiān yè`,english:`tab`,kind:`phrase`},{term:`专用`,pinyin:`zhuānyòng`,english:`private`,kind:`phrase`},{term:`搜索`,pinyin:`sōusuǒ`,english:`search`,hskLevel:5,kind:`phrase`},{term:`共享`,pinyin:`gòngxiǎng`,english:`share`,hskLevel:4,kind:`phrase`},{term:`新建标签页`,pinyin:`xīnjiàn biāoqiān yè`,english:`new tab`,kind:`phrase`},{term:`关闭标签页`,pinyin:`guānbì biāoqiān yè`,english:`close tab`,kind:`phrase`},{term:`重新载入`,pinyin:`chóngxīn zǎirù`,english:`reload`,kind:`phrase`},{term:`翻译`,pinyin:`fānyì`,english:`translate`,hskLevel:6,kind:`phrase`},{term:`完成`,pinyin:`wánchéng`,english:`done`,hskLevel:3,kind:`phrase`},{term:`取消`,pinyin:`qǔxiāo`,english:`cancel`,hskLevel:3,kind:`phrase`},{term:`添加`,pinyin:`tiānjiā`,english:`add`,hskLevel:4,kind:`phrase`}]},{id:`phone`,name:`Phone`,blurb:`The iPhone Phone app is 电话. Recents, keypad, and voicemail after the guide.`,words:[{term:`电话`,pinyin:`diànhuà`,english:`phone`,hskLevel:1,kind:`noun`},{term:`通讯录`,pinyin:`tōngxùnlù`,english:`contacts`,kind:`noun`},{term:`语音留言`,pinyin:`yǔyīn liúyán`,english:`voicemail`,kind:`noun`},{term:`收藏`,pinyin:`shōucáng`,english:`favorites`,hskLevel:5,kind:`phrase`},{term:`最近通话`,pinyin:`zuìjìn tōnghuà`,english:`recents`,kind:`phrase`},{term:`拨号键盘`,pinyin:`bōhào jiànpán`,english:`keypad`,kind:`phrase`},{term:`未接`,pinyin:`wèijiē`,english:`missed`,kind:`phrase`},{term:`全部`,pinyin:`quánbù`,english:`all`,hskLevel:4,kind:`phrase`},{term:`呼叫`,pinyin:`hūjiào`,english:`call`,kind:`phrase`},{term:`挂断`,pinyin:`guàduàn`,english:`end call`,kind:`phrase`},{term:`静音`,pinyin:`jìngyīn`,english:`mute`,kind:`phrase`},{term:`免提`,pinyin:`miǎntí`,english:`speaker`,kind:`phrase`},{term:`添加通话`,pinyin:`tiānjiā tōnghuà`,english:`add call`,kind:`phrase`},{term:`清除`,pinyin:`qīngchú`,english:`clear`,hskLevel:5,kind:`phrase`}]},{id:`photos`,name:`Photos`,blurb:`The iPhone Photos app is 照片. Library, albums, and select after the guide.`,words:[{term:`照片`,pinyin:`zhàopiàn`,english:`photos`,hskLevel:3,kind:`noun`},{term:`相簿`,pinyin:`xiàngbù`,english:`albums`,kind:`noun`},{term:`资料库`,pinyin:`zīliàokù`,english:`library`,kind:`noun`},{term:`为你推荐`,pinyin:`wèi nǐ tuījiàn`,english:`for you`,kind:`phrase`},{term:`个人收藏`,pinyin:`gèrén shōucáng`,english:`favorites`,kind:`phrase`},{term:`最近项目`,pinyin:`zuìjìn xiàngmù`,english:`recents`,kind:`phrase`},{term:`全部照片`,pinyin:`quánbù zhàopiàn`,english:`all photos`,kind:`phrase`},{term:`选择`,pinyin:`xuǎnzé`,english:`select`,hskLevel:3,kind:`phrase`},{term:`共享`,pinyin:`gòngxiǎng`,english:`share`,hskLevel:4,kind:`phrase`},{term:`编辑`,pinyin:`biānjí`,english:`edit`,hskLevel:5,kind:`phrase`},{term:`删除`,pinyin:`shānchú`,english:`delete`,hskLevel:5,kind:`phrase`},{term:`搜索`,pinyin:`sōusuǒ`,english:`search`,hskLevel:5,kind:`phrase`},{term:`回忆`,pinyin:`huíyì`,english:`memories`,hskLevel:5,kind:`phrase`},{term:`实况`,pinyin:`shíkuàng`,english:`live`,kind:`phrase`}]}
16,{id:`weather`,name:`Weather`,blurb:`The iPhone Weather app is 天气. Forecast chrome after the guide.`,words:[{term:`天气`,pinyin:`tiānqì`,english:`weather`,hskLevel:3,kind:`noun`},{term:`湿度`,pinyin:`shīdù`,english:`humidity`,kind:`noun`},{term:`风速`,pinyin:`fēngsù`,english:`wind`,kind:`noun`},{term:`降水`,pinyin:`jiàngshuǐ`,english:`precipitation`,kind:`noun`},{term:`紫外线`,pinyin:`zǐwàixiàn`,english:`UV`,kind:`noun`},{term:`空气质量`,pinyin:`kōngqì zhìliàng`,english:`air quality`,kind:`noun`},{term:`我的位置`,pinyin:`wǒ de wèizhì`,english:`my location`,kind:`phrase`},{term:`每小时`,pinyin:`měi xiǎoshí`,english:`hourly`,kind:`phrase`},{term:`10日预报`,pinyin:`shí rì yùbào`,english:`10-day forecast`,kind:`phrase`},{term:`体感温度`,pinyin:`tǐgǎn wēndù`,english:`feels like`,kind:`phrase`},{term:`添加`,pinyin:`tiānjiā`,english:`add`,hskLevel:4,kind:`phrase`},{term:`编辑`,pinyin:`biānjí`,english:`edit`,hskLevel:5,kind:`phrase`},{term:`完成`,pinyin:`wánchéng`,english:`done`,hskLevel:3,kind:`phrase`},{term:`位置`,pinyin:`wèizhì`,english:`location`,hskLevel:4,kind:`phrase`}]},{id:`maps`,name:`Maps`,blurb:`The iPhone Maps app is 地图. Directions and transit after the guide.`,words:[{term:`地图`,pinyin:`dìtú`,english:`maps`,hskLevel:3,kind:`noun`},{term:`路线`,pinyin:`lùxiàn`,english:`directions`,hskLevel:5,kind:`noun`},{term:`搜索`,pinyin:`sōusuǒ`,english:`search`,hskLevel:5,kind:`phrase`},{term:`驾车`,pinyin:`jiàchē`,english:`drive`,kind:`phrase`},{term:`步行`,pinyin:`bùxíng`,english:`walk`,hskLevel:2,kind:`phrase`},{term:`公交`,pinyin:`gōngjiāo`,english:`transit`,kind:`phrase`},{term:`骑车`,pinyin:`qíchē`,english:`cycle`,kind:`phrase`},{term:`我的位置`,pinyin:`wǒ de wèizhì`,english:`my location`,kind:`phrase`},{term:`收藏`,pinyin:`shōucáng`,english:`favorites`,hskLevel:5,kind:`phrase`},{term:`指南`,pinyin:`zhǐnán`,english:`guides`,kind:`phrase`},{term:`到达`,pinyin:`dàodá`,english:`arrive`,hskLevel:3,kind:`phrase`},{term:`出发`,pinyin:`chūfā`,english:`depart`,hskLevel:3,kind:`phrase`},{term:`结束`,pinyin:`jiéshù`,english:`end`,hskLevel:3,kind:`phrase`},{term:`报告问题`,pinyin:`bàogào wèntí`,english:`report an issue`,kind:`phrase`}]},{id:`reminders`,name:`Reminders`,blurb:`The iPhone Reminders app is 提醒事项. Today, scheduled, and lists after the guide.`,words:[{term:`提醒事项`,pinyin:`tíxǐng shìxiàng`,english:`reminders`,kind:`noun`},{term:`今天`,pinyin:`jīntiān`,english:`today`,hskLevel:1,kind:`noun`},{term:`计划`,pinyin:`jìhuà`,english:`scheduled`,hskLevel:3,kind:`phrase`},{term:`全部`,pinyin:`quánbù`,english:`all`,hskLevel:4,kind:`phrase`},{term:`已完成`,pinyin:`yǐ wánchéng`,english:`completed`,kind:`phrase`},{term:`旗标`,pinyin:`qíbiāo`,english:`flagged`,kind:`phrase`},{term:`添加`,pinyin:`tiānjiā`,english:`add`,hskLevel:4,kind:`phrase`},{term:`新建列表`,pinyin:`xīnjiàn lièbiǎo`,english:`new list`,kind:`phrase`},{term:`完成`,pinyin:`wánchéng`,english:`done`,hskLevel:3,kind:`phrase`},{term:`取消`,pinyin:`qǔxiāo`,english:`cancel`,hskLevel:3,kind:`phrase`},{term:`删除`,pinyin:`shānchú`,english:`delete`,hskLevel:5,kind:`phrase`},{term:`日期`,pinyin:`rìqī`,english:`date`,hskLevel:3,kind:`phrase`},{term:`时间`,pinyin:`shíjiān`,english:`time`,hskLevel:1,kind:`phrase`},{term:`重复`,pinyin:`chóngfù`,english:`repeat`,hskLevel:3,kind:`phrase`},{term:`优先级`,pinyin:`yōuxiān jí`,english:`priority`,kind:`phrase`},{term:`子任务`,pinyin:`zǐ rènwù`,english:`subtask`,kind:`phrase`}]},{id:`settings`,name:`Settings`,blurb:`Settings follows the phone language — you cannot flip only this app. Learn the chrome before you ever switch the whole phone.`,words:[{term:`设置`,pinyin:`shèzhì`,english:`settings`,hskLevel:5,kind:`noun`},{term:`通知`,pinyin:`tōngzhī`,english:`notifications`,hskLevel:5,kind:`noun`},{term:`电池`,pinyin:`diànchí`,english:`battery`,hskLevel:5,kind:`noun`},{term:`墙纸`,pinyin:`qiángzhǐ`,english:`wallpaper`,kind:`noun`},{term:`无线局域网`,pinyin:`wúxiàn júyùwǎng`,english:`Wi-Fi`,kind:`noun`},{term:`蓝牙`,pinyin:`lányá`,english:`Bluetooth`,kind:`noun`},{term:`蜂窝网络`,pinyin:`fēngwō wǎngluò`,english:`cellular`,kind:`phrase`},{term:`屏幕显示与亮度`,pinyin:`píngmù xiǎnshì yǔ liàngdù`,english:`display`,kind:`phrase`},{term:`面容 ID 与密码`,pinyin:`miànróng ID yǔ mìmǎ`,english:`Face ID`,kind:`phrase`},{term:`隐私与安全性`,pinyin:`yǐnsī yǔ ānquán xìng`,english:`privacy`,kind:`phrase`},{term:`通用`,pinyin:`tōngyòng`,english:`general`,hskLevel:4,kind:`phrase`},{term:`语言与地区`,pinyin:`yǔyán yǔ dìqū`,english:`language and region`,kind:`phrase`},{term:`辅助功能`,pinyin:`fǔzhù gōngnéng`,english:`accessibility`,kind:`phrase`},{term:`关于本机`,pinyin:`guānyú běnjī`,english:`about`,kind:`phrase`},{term:`控制中心`,pinyin:`kòngzhì zhōngxīn`,english:`control center`,kind:`phrase`},{term:`专注模式`,pinyin:`zhuānzhù móshì`,english:`focus`,kind:`phrase`},{term:`密码`,pinyin:`mìmǎ`,english:`passwords`,hskLevel:4,kind:`noun`}]},{id:`ai`,name:`AI`,blurb:`Nouns from pages about models and data. Chrome paints these; it does not guess new jargon.`,words:[{term:`人工智能`,pinyin:`réngōng zhìnéng`,english:`AI`,kind:`noun`},{term:`模型`,pinyin:`móxíng`,english:`model`,hskLevel:5,kind:`noun`},{term:`数据`,pinyin:`shùjù`,english:`data`,hskLevel:4,kind:`noun`},{term:`算法`,pinyin:`suànfǎ`,english:`algorithm`,kind:`noun`},{term:`代码`,pinyin:`dàimǎ`,english:`code`,kind:`noun`},{term:`提示`,pinyin:`tíshì`,english:`prompt`,hskLevel:5,kind:`noun`},{term:`参数`,pinyin:`cānshù`,english:`parameter`,kind:`noun`},{term:`数据集`,pinyin:`shùjùjí`,english:`dataset`,kind:`noun`},{term:`网络`,pinyin:`wǎngluò`,english:`network`,hskLevel:4,kind:`noun`},{term:`训练`,pinyin:`xùnliàn`,english:`training`,hskLevel:5,kind:`phrase`}]}]}.packs,cc=[{title:`Around the house`,ids:[`kitchen`,`bedroom`,`bathroom`,`study`,`signs`]},{title:`Menus and labels`,ids:[`bubble-tea`,`restaurant-names`,`soft-drinks`]},{title:`Walls and verses`,ids:[`posters`,`idioms`,`poetry`,`plaques`]},{title:`On the road`,ids:[`taiwan`,`airport`,`trains`]},{title:`iPhone apps`,ids:[`clock`,`calendar`,`notes`,`messages`,`safari`,`phone`,`photos`,`weather`,`maps`,`reminders`,`settings`]},{title:`Pages`,ids:[`ai`]}];function lc(e=sc){let t=new Map(e.map(e=>[e.id,e])),n=new Set,r=[];for(let e of cc){let i=e.ids.map(e=>t.get(e)).filter(e=>!!e);if(i.length){r.push({title:e.title,packs:i});for(let e of i)n.add(e.id)}}let i=e.filter(e=>!n.has(e.id));return i.length&&r.push({title:`More`,packs:i}),r}function uc(e){return`pack:${e}`}function dc(e){if(!e?.startsWith(`pack:`))return null;let t=e.slice(5);return sc.some(e=>e.id===t)?t:null}function fc(e){let t=new Set;for(let n of e){let e=dc(n.source);e&&t.add(e)}return t}var pc={compounds:[{term:`火山`,pinyin:`huǒshān`,english:`volcano`,kind:`noun`},{term:`火山口`,pinyin:`huǒshānkǒu`,english:`crater`,kind:`noun`},{term:`火山岛`,pinyin:`huǒshāndǎo`,english:`volcanic island`,kind:`noun`},{term:`火锅`,pinyin:`huǒguō`,english:`hotpot`,kind:`noun`},{term:`大火`,pinyin:`dàhuǒ`,english:`blaze`,kind:`noun`},{term:`山火`,pinyin:`shānhuǒ`,english:`wildfire`,kind:`noun`},{term:`火光`,pinyin:`huǒguāng`,english:`firelight`,kind:`noun`},{term:`火车头`,pinyin:`huǒchētóu`,english:`locomotive`,kind:`noun`},{term:`小雨`,pinyin:`xiǎoyǔ`,english:`light rain`,kind:`noun`},{term:`大雨`,pinyin:`dàyǔ`,english:`heavy rain`,kind:`noun`},{term:`大雪`,pinyin:`dàxuě`,english:`heavy snow`,kind:`noun`},{term:`小雪`,pinyin:`xiǎoxuě`,english:`light snow`,kind:`noun`},{term:`雨天`,pinyin:`yǔtiān`,english:`rainy day`,kind:`noun`},{term:`雪天`,pinyin:`xuětiān`,english:`snowy day`,kind:`noun`},{term:`冰山`,pinyin:`bīngshān`,english:`iceberg`,kind:`noun`},{term:`雪人`,pinyin:`xuěrén`,english:`snowman`,kind:`noun`},{term:`雪花`,pinyin:`xuěhuā`,english:`snowflake`,kind:`noun`},{term:`雪球`,pinyin:`xuěqiú`,english:`snowball`,kind:`noun`},{term:`山羊`,pinyin:`shānyáng`,english:`mountain goat`,kind:`noun`},{term:`小河`,pinyin:`xiǎohé`,english:`brook`,kind:`noun`},{term:`大河`,pinyin:`dàhé`,english:`great river`,kind:`noun`},{term:`河水`,pinyin:`héshuǐ`,english:`river water`,kind:`noun`},{term:`河马`,pinyin:`hémǎ`,english:`hippo`,kind:`noun`},{term:`海马`,pinyin:`hǎimǎ`,english:`seahorse`,kind:`noun`},{term:`风车`,pinyin:`fēngchē`,english:`windmill`,kind:`noun`},{term:`金鱼`,pinyin:`jīnyú`,english:`goldfish`,kind:`noun`},{term:`金条`,pinyin:`jīntiáo`,english:`gold bar`,kind:`noun`},{term:`牛肉`,pinyin:`niúròu`,english:`beef`,kind:`noun`},{term:`羊肉`,pinyin:`yángròu`,english:`mutton`,kind:`noun`},{term:`猪肉`,pinyin:`zhūròu`,english:`pork`,kind:`noun`},{term:`鸡肉`,pinyin:`jīròu`,english:`chicken meat`,kind:`noun`},{term:`水杯`,pinyin:`shuǐbēi`,english:`water cup`,kind:`noun`},{term:`茶杯`,pinyin:`chábēi`,english:`teacup`,kind:`noun`},{term:`山水画`,pinyin:`shānshuǐhuà`,english:`landscape painting`,kind:`noun`}
16],hanzi:{杯:1,冰:4,茶:1,车:1,大:1,岛:6,风:1,光:3,锅:5,海:2,河:2,花:1,画:2,火:1,鸡:1,金:3,口:1,马:1,牛:1,球:1,人:1,肉:1,山:1,水:1,天:1,条:1,头:2,小:1,雪:2,羊:3,鱼:2,雨:1,猪:3}},mc=`compounds:auto`,hc=`New compounds`,gc=/\p{Script=Han}/u,_c=pc;function vc(e){return e===mc}function yc(e){return[...String(e||``)].filter(e=>gc.test(e))}function bc(e){let t=new Set;for(let n of e)for(let e of yc(n))t.add(e);return t}function xc(e,t){let n=Array.isArray(t)?new Set(t):null,r=[];for(let t of e)if(!(n&&(!t.id||!n.has(t.id))))for(let e of t.words||[])e?.kind!==`sentence`&&e?.term&&r.push(e.term);return bc(r)}function Sc(e){return(Array.isArray(e)?e.join(`;`):String(e||``)).split(/[;/,]/).map(e=>e.trim()).filter(Boolean)}function Cc(e,t,n,r){if(t.has(e))return!0;if(n<1)return!1;let i=r[e];return typeof i==`number`&&i>=1&&i<=n}function wc(e,t={}){let n=e.hanzi||{},r=e.compounds||[],i=t.knownHanzi instanceof Set?t.knownHanzi:new Set,a=t.skipTerms instanceof Set?t.skipTerms:new Set(t.skipTerms||[]),o=t.skipGlosses instanceof Set?t.skipGlosses:new Set([...t.skipGlosses||[]].map(e=>String(e).toLowerCase())),s=Math.max(0,Number(t.cap)||400),c=Number(t.hskLevel)||0,l=[];for(let e of r){if(l.length>=s)break;let t=String(e?.term||``).trim();if(!t||a.has(t))continue;let r=String(e?.kind||`noun`);if(r===`verb`||r===`phrase`)continue;let u=yc(t);if(u.length<2||!u.every(e=>Cc(e,i,c,n)))continue;let d=Sc(e.english);d.length!==0&&(d.some(e=>o.has(e.toLowerCase()))||l.push({term:t,pinyin:String(e.pinyin||``),english:d,kind:`noun`}))}return l}function Tc(e){return e.find(e=>vc(e.source))??null}function Ec(e){return vc(e)?2:+(String(e||``)===`pages:chrome`)}function Dc(e){return[...e].sort((e,t)=>Ec(t.source)-Ec(e.source))}function Oc(e,t=1e3){let n=new Set,r=[];for(let i of e){let e=String(i||``).trim();if(!(!e||n.has(e))&&(n.add(e),r.push(e),r.length>=t))break}return r}function kc(e,t){let n=Tc(e),r=new Set(n?.dismissed||[]),i=new Set;for(let t of e)for(let e of t.words||[])e?.term&&i.add(e.term);let a=[...n?.words||[]].filter(e=>e.term),o=new Set(a.map(e=>String(e.term))),s=0;for(let e of t){let t=String(e?.term||``).trim();if(!t||r.has(t)||i.has(t)||o.has(t))continue;if(a.length>=300)break;let n=Sc(e.english)[0]||``;a.push({term:t,pinyin:String(e.pinyin||``),english:n,kind:`noun`}),o.add(t),s+=1}return{existing:n,words:a.map(e=>({term:String(e.term||``),pinyin:String(e.pinyin||``),english:String(e.english||``),kind:`noun`,...e.id?{id:e.id}:{}})),dismissed:Oc(n?.dismissed||[]),added:s,shouldCreate:!n&&s>0}}function Ac(e,t){let n=new Set([...t].map(e=>String(e||``).trim()).filter(Boolean));return{words:(e.words||[]).filter(e=>!n.has(String(e.term||``))),dismissed:Oc([...e.dismissed||[],...n])}}var jc=`pages:chrome`;function Mc(e){return e===jc}function Nc(e){if(!e)return``;try{let t=new URL(e);return t.protocol!==`http:`&&t.protocol!==`https:`?``:t.hostname.replace(/^www\./,``)}catch{return``}}function Pc(e){let t=Number(e);if(!Number.isFinite(t)||t<1)return``;let n=t<0xe8d4a51000?t*1e3:t;return new Intl.DateTimeFormat(void 0,{day:`numeric`,month:`short`,year:`numeric`}).format(new Date(n))}function Fc(e){return[Nc(e.sourceUrl),Pc(e.addedAt)].filter(Boolean).join(` · `)}function Ic(e){return[...e].sort((e,t)=>(Number(t.addedAt)||0)-(Number(e.addedAt)||0)||String(e.term||``).localeCompare(String(t.term||``)))}var Lc=/\p{Script=Han}/u;function Rc(e){let t=String(e||``).trim();if(!t)return!1;if(/[。!?!?…]/.test(t))return!0;let n=[...t].filter(e=>Lc.test(e)).length;return!!(n>=8&&/[,、;;]/.test(t)||n>=12)}function zc(e){let t=[];for(let n of String(e||``).replace(/\r\n/g,`
17`).split(`
18`)){let e=n.trim();if(!(!e||e.startsWith(`#`))){if(Rc(e)){t.push({term:e,kind:`sentence`});continue}for(let n of e.split(/[,;、,]+/u)){let e=n.trim();e&&t.push({term:e})}}}let n=new Set,r=[];for(let e of t){let t=e.term.toLowerCase();n.has(t)||(n.add(t),r.push(e))}return r}async function Bc(e,t,n){let r=kc(e,wc(_c,{knownHanzi:xc(e),hskLevel:t}));return r.shouldCreate?(await so({name:hc,language:`zh-Hans`,source:mc,words:r.words,dismissed:r.dismissed},n),!0):r.added>0&&r.existing?.id?(await co(r.existing.id,{name:hc,source:mc,words:r.words,dismissed:r.dismissed},n),!0):!1}function Vc(){return Va()?(0,H.jsx)(Hc,{}):(0,H.jsxs)(`div`,{className:`site-copy`,children:[(0,H.jsx)(`p`,{className:`site-lede`,children:`Your lists`}),(0,H.jsx)(`p`,{className:`site-error`,children:`Sign-in is not configured on this build.`}),(0,H.jsx)(`p`,{children:(0,H.jsx)(`a`,{className:`site-text-link`,href:window.location.pathname,children:`Back to IMMERSION`})})]})}function Hc(){let e=_i(),[t,n]=(0,_.useState)(null),[r,i]=(0,_.useState)([]),[a,o]=(0,_.useState)(null),[s,c]=(0,_.useState)(``),[l,u]=(0,_.useState)(``),[d,f]=(0,_.useState)(!1),[p,m]=(0,_.useState)(null),[h,g]=(0,_.useState)(null),v=(0,_.useCallback)(async()=>e.getToken({skipCache:!0}),[e.getToken]),y=(0,_.useCallback)(async()=>
18{if(m(null),!e.isSignedIn){n(null),i([]),o(null);return}try{let[e,t]=await Promise.all([$a(v),oo(`zh-Hans`,v)]);if(n(e),i(t.lists),o(t.activeListId),e.plusActive)try{if(await Bc(t.lists,e.hskLevel,v)){let e=await oo(`zh-Hans`,v);i(e.lists),o(e.activeListId)}}catch{}}catch(e){m(e instanceof U?e.message:`Could not load lists.`)}},[e.isSignedIn,v]);(0,_.useEffect)(()=>{y()},[y]);let b=r.find(e=>e.id===h)??null,x=async()=>{let e=s.trim(),t=zc(l);if(!(!e||t.length===0)){f(!0),m(null);try{let n=await so({name:e,language:`zh-Hans`,words:t},v);c(``),u(``),await y(),g(n.list.id)}catch(e){m(e instanceof U?e.message:`Could not save list.`)}finally{f(!1)}}},S=async()=>{if(!b)return;let e=zc(l);if(e.length===0)return;let t=new Set(b.words.map(e=>e.term)),n=[...b.words,...e.filter(e=>!t.has(e.term))];f(!0),m(null);try{await co(b.id,{words:n},v),u(``),await y()}catch(e){m(e instanceof U?e.message:`Could not update list.`)}finally{f(!1)}},C=async e=>{f(!0),m(null);try{let t=await G(e,v);o(t)}catch(e){m(e instanceof U?e.message:`Could not set the active list.`)}finally{f(!1)}},w=async e=>{let t=r.find(t=>t.id===e);if(t&&vc(t.source)){if(!confirm(`Clear New compounds? Words you remove stay gone and will not come back.`))return;let e=Ac(t,t.words.map(e=>e.term));f(!0),m(null);try{await co(t.id,{name:hc,source:mc,words:e.words,dismissed:e.dismissed},v),await y()}catch(e){m(e instanceof U?e.message:`Could not update list.`)}finally{f(!1)}return}if(confirm(`Delete this list on the website and iPhone?`)){f(!0),m(null);try{let t=await W(e,v);o(t),h===e&&g(null),await y()}catch(e){m(e instanceof U?e.message:`Could not delete list.`)}finally{f(!1)}}},T=async e=>{if(!fc(r).has(e.id)){f(!0),m(null);try{let t=await so({name:e.name,language:`zh-Hans`,source:uc(e.id),words:e.words.map(e=>({term:e.term,pinyin:e.pinyin,english:e.english,hskLevel:e.hskLevel,kind:e.kind}))},v);await G(t.list.id,v),await y(),g(t.list.id)}catch(e){m(e instanceof U?e.message:`Could not add pack.`)}finally{f(!1)}}},E=!!t?.plusActive,D=fc(r);return(0,H.jsxs)(`div`,{className:`site-copy`,children:[(0,H.jsx)(`p`,{className:`site-lede`,children:`Your lists. They sync on this website. iPhone widgets still use HSK.`}),(0,H.jsxs)(`p`,{className:`site-done-blurb`,children:[`Paste words, phrases, or sentences — Chinese, pinyin, or English. A full sentence stays on one line. HSK hits get pinyin in the app. Add Kitchen, Bedroom, Bathroom, Study, Signs, Bubble tea, Clock, Calendar, Notes, Messages, Safari, or AI, or paste your own. Know 火 from 火车 and 山? 火山 lands in New compounds at HSK 1.`,` `,`Chrome still swaps nouns only. iPhone widgets still rotate HSK.`]}),(0,H.jsx)(`div`,{className:`site-auth-row`,children:(0,H.jsx)(Pa,{signedOut:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(ja,{mode:`modal`,children:(0,H.jsx)(`button`,{type:`button`,className:`site-submit`,children:`Sign in`})}),(0,H.jsx)(Ma,{mode:`modal`,children:(0,H.jsx)(`button`,{type:`button`,className:`site-secondary`,children:`Create account`})}),(0,H.jsx)(za,{})]}),signedIn:(0,H.jsx)(ri,{})})}),e.isSignedIn&&!E&&t?(0,H.jsxs)(`p`,{className:`site-done-blurb`,children:[`Plus is needed to create lists.`,` `,(0,H.jsx)(`a`,{className:`site-text-link`,href:`${window.location.pathname}?subscribe=1`,children:`Subscribe`})]}):null,E?(0,H.jsx)(`div`,{className:`site-pack-stack`,children:lc(sc).map(e=>(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`p`,{className:`site-label`,children:e.title}),e.packs.map(e=>{let t=D.has(e.id);return(0,H.jsxs)(`div`,{className:`site-pack-row`,children:[(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`p`,{className:`site-list-card-name`,children:e.name}),(0,H.jsxs)(`p`,{className:`site-list-card-meta`,children:[e.words.length,` words · `,e.blurb]})]}),(0,H.jsx)(`button`,{type:`button`,className:`site-secondary`,disabled:d||t,onClick:()=>void T(e),children:t?`Added`:`Add`})]},e.id)})]},e.title))}):null,E?(0,H.jsxs)(`form`,{className:`site-form`,onSubmit:e=>{e.preventDefault(),b?S():x()},children:[b?(0,H.jsxs)(`p`,{className:`site-label`,children:[`Add to `,b.name]}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`label`,{className:`site-label`,htmlFor:`list-name`,children:`List name`}),(0,H.jsx)(`input`,{id:`list-name`,className:`site-email`,type:`text`,placeholder:`Week 3`,value:s,onChange:e=>c(e.target.value),maxLength:80})]}),(0,H.jsx)(`label`,{className:`site-label`,htmlFor:`list-paste`,children:`Paste words, phrases, or sentences`}),(0,H.jsx)(`textarea`,{id:`list-paste`,className:`site-email site-list-paste`,placeholder:`Software engineer
19我想喝咖啡。`,value:l,onChange:e=>u(e.target.value),rows:5}),(0,H.jsx)(`button`,{className:`site-submit`,type:`submit`,disabled:d,children:b?`Add to list`:`Save list`}),b?(0,H.jsx)(`button`,{type:`button`,className:`site-secondary`,onClick:()=>{g(null),u(``)},children:`New list`}):null]}):null,r.length>0?(0,H.jsx)(`ul`,{className:`site-list-stack`,children:Dc(r).map(e=>{let t=e.id===a,n=vc(e.source),r=Mc(e.source);return(0,H.jsxs)(`li`,{children:[(0,H.jsxs)(`button`,{type:`button`,className:[`site-list-card`,h===e.id?`is-selected`:``].filter(Boolean).join(` `),onClick:()=>g(e.id),children:[(0,H.jsx)(`span`,{className:`site-list-card-name`,children:e.name}),(0,H.jsxs)(`span`,{className:`site-list-card-meta`,children:[e.words.length,` item`,e.words.length===1?``:`s`,n?` · unlocked`:``,r?` · Chrome`:``,t?` · widgets`:``]})]}),(0,H.jsxs)(`div`,{className:`site-list-card-actions`,children:[E&&!t?(0,H.jsx)(`button`,{type:`button`,className:`site-text-link`,disabled:d,onClick:()=>void C(e.id),children:`Show on widgets`}):null,(0,H.jsx)(`button`,{type:`button`,className:`site-text-link site-list-delete`,disabled:d,onClick:()=>void w(e.id),children:n?`Clear`:`Delete`})]})]},e.id)})}):e.isSignedIn&&E?(0,H.jsx)(`p`,{className:`site-done-blurb`,children:`No lists yet. Name one and paste words, phrases, or sentences.`}):null,b&&b.words.length>0?Mc(b.source)||b.words.some(e=>e.sourceUrl||e.addedAt)?(0,H.jsx)(`ul`,{className:`site-page-words`,children:Ic(b.words).map(e=>{let t=Fc(e);return(0,H.jsxs)(`li`,{children:[(0,H.jsx)(`span`,{className:`site-page-word-term`,children:e.term}),e.pinyin?(0,H.jsx)(`span`,{className:`site-page-word-pinyin`,children:(0,H.jsx)(K,{pinyin:e.pinyin})}):null,e.english?(0,H.jsx)(`span`,{className:`site-page-word-english`,children:e.english}):null,t?e.sourceUrl?(0,H.jsx)(`a`,{className:`site-page-word-meta`,href:e.sourceUrl,target:`_blank`,rel:`noreferrer`,children:t}):(0,H.jsx)(`span`,{className:`site-page-word-meta`,children:t}):null]},e.id||e.term)})}):(0,H.jsxs)(`p`,{className:`site-done-blurb`,children:[b.words.slice(0,12).map(e=>e.term).join(` · `),b.words.length>12?`…`:``]}):null,p?(0,H.jsx)(`p`,{className:`site-error`,children:p}):null,(0,H.jsxs)(`p`,{children:[(0,H.jsx)(`a`,{className:`site-text-link`,href:window.location.pathname,children:`Back to IMMERSION`}),` · `,(0,H.jsx)(`a`,{className:`site-text-link`,href:`${window.location.pathname}?subscribe=1`,children:`Plus`})]})]})}var Uc=`(max-width: 759px)`;function Wc(e){let t=window.matchMedia(Uc);return t.addEventListener(`change`,e),()=>t.removeEventListener(`change`,e)}function Gc(){return window.matchMedia(Uc).matches?`mobile`:`desktop`}function Kc(){return`desktop`}function qc(){return(0,_.useSyncExternalStore)(Wc,Gc,Kc)}function Jc(){return typeof navigator>`u`?!1:/Android/i.test(navigator.userAgent)}var Yc=200,Xc=8,Zc=16,Qc=`/logo.svg`,$c=[{id:`friends`,tab:`Friends`,url:`friends.example/home`},{id:`news`,tab:`News`,url:`news.example/uk/station`}],el=[{name:`Priya Shah`,time:`47m`,initial:`P`,tone:`yellow`,lines:[{kind:`sentence`,level:2,en:`Just got home.`,zh:`刚到家。`,pinyin:`gāng dào jiā`,leftovers:[{kind:`text`,text:`Just got `},{kind:`word`,level:1,en:`home`,zh:`家`,pinyin:`jiā`},{kind:`text`,text:`.`}]},{kind:`sentence`,level:1,en:`Dinner with friends.`,zh:`和朋友吃晚饭。`,pinyin:`hé péng you chī wǎn fàn`},{kind:`sentence`,level:5,en:`The weather was awful but the food was so good.`,zh:`天气很糟糕,但是饭很好吃。`,pinyin:`tiān qì hěn zāo gāo dàn shì fàn hěn hǎo chī`,leftovers:[{kind:`text`,text:`The `},{kind:`word`,level:1,en:`weather`,zh:`天气`,pinyin:`tiān qì`},{kind:`text`,text:` was awful but the food was so good.`}]},{kind:`sentence`,level:1,en:`Maya cooked and we sat around drinking tea until late.`,zh:`Maya做了菜,我们喝茶到很晚。`,pinyin:`Maya zuò le cài wǒ men hē chá dào hěn wǎn`},{kind:`sentence`,level:2,en:`I ate too much.`,zh:`我吃得太多了。`,pinyin:`wǒ chī de tài duō le`},{kind:`sentence`,level:2,en:`Already preparing leftovers for tomorrow.`,zh:`已经准备好明天的饭。`,pinyin:`yǐ 
19jÄ«ng zhǔn bèi hǎo míng tiān de fàn`,leftovers:[{kind:`text`,text:`Already preparing leftovers for `},{kind:`word`,level:1,en:`tomorrow`,zh:`明天`,pinyin:`míng tiān`},{kind:`text`,text:`.`}]},{kind:`sentence`,level:4,en:`The leftovers are in the fridge.`,zh:`饭在冰箱里。`,pinyin:`fàn zài bÄ«ng xiāng lǐ`},{kind:`sentence`,level:3,en:`I really like this photo.`,zh:`我很喜欢这张照片。`,pinyin:`wǒ hěn xǐ huan zhè zhāng zhào piàn`,leftovers:[{kind:`text`,text:`I really like this `},{kind:`word`,level:2,en:`photo`,zh:`照片`,pinyin:`zhào piàn`},{kind:`text`,text:`.`}]},{kind:`sentence`,level:6,en:`The atmosphere was so good.`,zh:`气氛很好。`,pinyin:`qì fēn hěn hǎo`},{kind:`sentence`,level:1,en:`See you tomorrow!`,zh:`明天见!`,pinyin:`míng tiān jiàn`}]},{name:`Jordan Hale`,time:`3h`,initial:`J`,tone:`blue`,lines:[{kind:`sentence`,level:1,en:`Still at work.`,zh:`还在工作。`,pinyin:`hái zài gōng zuò`},{kind:`sentence`,level:2,en:`Someone bring tea.`,zh:`谁带茶来?`,pinyin:`shéi dài chá lái`,leftovers:[{kind:`text`,text:`Someone bring `},{kind:`word`,level:1,en:`tea`,zh:`茶`,pinyin:`chá`},{kind:`text`,text:`.`}]},{kind:`sentence`,level:2,en:`Anyone free this weekend?`,zh:`这周末谁有时间?`,pinyin:`zhè zhōu mò shéi yǒu shí jiān`},{kind:`sentence`,level:2,en:`I'm a bit tired.`,zh:`我有点儿累。`,pinyin:`wǒ yǒu diǎnr lèi`,leftovers:[{kind:`text`,text:`I'm a bit `},{kind:`word`,level:1,en:`tired`,zh:`ç´¯`,pinyin:`lèi`},{kind:`text`,text:`.`}]},{kind:`sentence`,level:2,en:`I feel this week is never going to end.`,zh:`我觉得这星期不会完。`,pinyin:`wǒ jué de zhè xÄ«ng qÄ« bú huì wán`,leftovers:[{kind:`text`,text:`I feel this `},{kind:`word`,level:1,en:`week`,zh:`星期`,pinyin:`xÄ«ng qÄ«`},{kind:`text`,text:` is never going to end.`}]},{kind:`sentence`,level:2,en:`My manager just changed the plan again.`,zh:`我的经理又改了计划。`,pinyin:`wǒ de jÄ«ng lǐ yòu gǎi le jì huà`},{kind:`sentence`,level:4,en:`I still have to work overtime this afternoon.`,zh:`我今天下午还要加班。`,pinyin:`wǒ jÄ«n tiān xià wǔ hái yào jiā bān`,leftovers:[{kind:`text`,text:`I still have to work overtime this `},{kind:`word`,level:1,en:`afternoon`,zh:`下午`,pinyin:`xià wǔ`},{kind:`text`,text:`.`}]},{kind:`sentence`,level:2,en:`If I get home in the evening I can still watch a film.`,zh:`如果晚上回家,我还可以看电影。`,pinyin:`rú guǒ wǎn shang huí jiā wǒ hái kě yǐ kàn diàn yǐng`,leftovers:[{kind:`text`,text:`If I get `},{kind:`word`,level:1,en:`home`,zh:`å®¶`,pinyin:`jiā`},{kind:`text`,text:` in the `},{kind:`word`,level:1,en:`evening`,zh:`晚上`,pinyin:`wǎn shang`},{kind:`text`,text:` I can still watch a `},{kind:`word`,level:1,en:`film`,zh:`电影`,pinyin:`diàn yǐng`},{kind:`text`,text:`.`}]},{kind:`sentence`,level:3,en:`I need coffee first. No, I need sleep.`,zh:`我先要咖啡。不对,我要睡觉。`,pinyin:`wǒ xiān yào kā fēi bú duì wǒ yào shuì jiào`},{kind:`sentence`,level:5,en:`I want to give up.`,zh:`我想放弃。`,pinyin:`wǒ xiǎng fàng qì`},{kind:`sentence`,level:6,en:`I'm just another office worker.`,zh:`我只是上班族。`,pinyin:`wǒ zhǐ shì shàng bān zú`}]},{name:`Lena Ortiz`,time:`Yesterday`,initial:`L`,tone:`red`,lines:[{kind:`sentence`,level:2,en:`The train was late again.`,zh:`火车又晚了。`,pinyin:`huǒ chē yòu wǎn le`,leftovers:[{kind:`text`,text:`The `},{kind:`word`,level:1,en:`train`,zh:`火车`,pinyin:`huǒ chē`},{kind:`text`,text:` was late again.`}]},{kind:`sentence`,level:2,en:`Sorry — we were stuck at the station for an hour.`,zh:`对不起,因为我们在车站等了一小时。`,pinyin:`duì bu qǐ yÄ«n wèi wǒ men zài chē zhàn děng le yì xiǎo shí`,leftovers:[{kind:`word`,level:1,en:`Sorry`,zh:`对不起`,pinyin:`duì bu qǐ`},{kind:`text`,text:` — we were stuck at the `},{kind:`word`,level:1,en:`station`,zh:`车站`,pinyin:`chē zhàn`},{kind:`text`,text:` for an `},{kind:`word`,level:1,en:`hour`,zh:`小时`,pinyin:`xiǎo shí`},{kind:`text`,text:`.`}]},{kind:`sentence`,level:2,en:`But I'm already home.`,zh:`但是æ
19ˆ‘已经到家了。`,pinyin:`dàn shì wǒ yǐ jÄ«ng dào jiā le`,leftovers:[{kind:`text`,text:`But I'm already `},{kind:`word`,level:1,en:`home`,zh:`å®¶`,pinyin:`jiā`},{kind:`text`,text:`.`}]},{kind:`sentence`,level:3,en:`Finally made it.`,zh:`终于到了。`,pinyin:`zhōng yú dào le`},{kind:`sentence`,level:4,en:`I was late.`,zh:`我迟到了。`,pinyin:`wǒ chí dào le`},{kind:`sentence`,level:5,en:`I regret it.`,zh:`我后悔了。`,pinyin:`wǒ hòu huǐ le`},{kind:`sentence`,level:6,en:`The platform had too many people.`,zh:`站台人特别多。`,pinyin:`zhàn tái rén tè bié duō`,leftovers:[{kind:`text`,text:`The platform had too many `},{kind:`word`,level:1,en:`people`,zh:`人`,pinyin:`rén`},{kind:`text`,text:`. It was `},{kind:`word`,level:2,en:`especially`,zh:`特别`,pinyin:`tè bié`},{kind:`text`,text:` crowded.`}]},{kind:`sentence`,level:1,en:`Call me when you arrive.`,zh:`你到了给我打电话。`,pinyin:`nǐ dào le gěi wǒ dǎ diàn huà`},{kind:`sentence`,level:1,en:`I'll wait by the door.`,zh:`我在门那儿等你。`,pinyin:`wǒ zài mén nàr děng nǐ`},{kind:`sentence`,level:1,en:`See you tomorrow?`,zh:`明天见?`,pinyin:`míng tiān jiàn`}]},{name:`Tom Okonkwo`,time:`1d`,initial:`T`,tone:`green`,lines:[{kind:`sentence`,level:1,en:`I'm taking the kids to school.`,zh:`我送孩子去学校。`,pinyin:`wǒ sòng hái zi qù xué xiào`},{kind:`sentence`,level:2,en:`Then going to the park.`,zh:`然后去公园。`,pinyin:`rán hòu qù gōng yuán`},{kind:`sentence`,level:3,en:`Anyone want coffee later?`,zh:`一会儿谁想喝咖啡?`,pinyin:`yí huìr shéi xiǎng hē kā fēi`},{kind:`sentence`,level:2,en:`Sam says the supermarket near the bank is closing early this week, so I need to buy fruit today.`,zh:`Sam说银行旁边的超市这星期关门早,所以我今天要买水果。`,pinyin:`Sam shuō yín háng páng biān de chāo shì zhè xÄ«ng qÄ« guān mén zǎo suǒ yǐ wǒ jÄ«n tiān yào mǎi shuǐ guǒ`,leftovers:[{kind:`text`,text:`Sam says the supermarket near the bank is closing early this `},{kind:`word`,level:1,en:`week`,zh:`星期`,pinyin:`xÄ«ng qÄ«`},{kind:`text`,text:`, so I need to buy `},{kind:`word`,level:1,en:`fruit`,zh:`水果`,pinyin:`shuǐ guǒ`},{kind:`text`,text:` `},{kind:`word`,level:1,en:`today`,zh:`今天`,pinyin:`jÄ«n tiān`},{kind:`text`,text:`.`}]},{kind:`sentence`,level:2,en:`Let me know if you have time.`,zh:`有时间的话告诉我。`,pinyin:`yǒu shí jiān de huà gào su wǒ`,leftovers:[{kind:`text`,text:`Let me know if you have `},{kind:`word`,level:1,en:`time`,zh:`时间`,pinyin:`shí jiān`},{kind:`text`,text:`.`}]},{kind:`sentence`,level:4,en:`I'm a bit worried.`,zh:`我有点儿担心。`,pinyin:`wǒ yǒu diǎnr dān xÄ«n`,leftovers:[{kind:`text`,text:`I'm `},{kind:`phrase`,level:2,en:`a bit`,zh:`有点儿`,pinyin:`yǒu diǎnr`},{kind:`text`,text:` worried.`}]},{kind:`sentence`,level:5,en:`I might get a cake too.`,zh:`我也想买蛋糕。`,pinyin:`wǒ yě xiǎng mǎi dàn gāo`},{kind:`sentence`,level:6,en:`I should ask a few people first.`,zh:`我应该先咨询一下。`,pinyin:`wǒ yÄ«ng gāi xiān zÄ« xún yí xià`,leftovers:[{kind:`text`,text:`I should ask a few `},{kind:`word`,level:1,en:`people`,zh:`人`,pinyin:`rén`},{kind:`text`,text:` first.`}]}]}],tl=[{kind:`sentence`,level:1,en:`A new train station will open next year.`,zh:`新的火车站明年会开。`,pinyin:`xÄ«n de huǒ chē zhàn míng nián huì kāi`},{kind:`sentence`,level:3,en:`Local people were told today.`,zh:`当地人今天得到了这消息。`,pinyin:`dāng dì rén jÄ«n tiān dé dào le zhè xiāo xi`,leftovers:[{kind:`text`,text:`Local `},{kind:`word`,level:1,en:`people`,zh:`人`,pinyin:`rén`},{kind:`text`,text:` were told `},{kind:`word`,level:1,en:`today`,zh:`今天`,pinyin:`jÄ«n tiān`},{kind:`text`,text:`.`}]},{kind:`sentence`,level:4,en:`Officials said it should make it more convenient to get to work, school and the airport.`,zh:`官员说,去工作、学校和机场会更方便。`,pinyin:`guān yuán shuō qù gōng zuò xué xiào hé jÄ« chǎng huì gèng fāng biàn`,leftovers:[{kind:`text`,text:`Officials said it should make it `},{kind:`phrase`,level:2,en:`more convenient`,zh:`更方便`,pinyin:`gèng fāng biàn`},{kind:`text`,text:` to get to `},{kind:`word`,level:1,en:`work`,zh:`工作`,pinyin:`gōng zuò`},{kind:`text`,text:`, `},{kind:`word`,level:1,en:`school`,zh:`学校`,pinyin:`xué xiào`},{kind:`text`,text:` and the `},{kind:`word`,level:1,en:`airport`,zh:`机场`,pinyin:`jÄ« chǎng`},{kind:`text`,text:`.`}]},{kind:`sentence`,level:2,en:`Doctors at the hospital have also warned that this week's weather is a problem for older people.`,zh:`医院的医生还说,这星期的天气对老人是问题。`,pinyin:`yÄ« yuàn de yÄ« shēng hái shuō zhè xÄ«ng qÄ« de tiān qì duì lǎo rén shì wèn tí`,leftovers:[{kind:`word`,level:1,en:`Doctors`,zh:`医生`,pinyin:`yÄ« shēng`},{kind:`text`,text:` at the `},{kind:`word`,level:1,en:`hospital`,zh:`医院`,pinyin:`yÄ« yuàn`},{kind:`text`,text:` have also warned that this week's `},{kind:`word`,level:1,en:`weather`,zh:`天气`,pinyin:`tiān qì`},{kind:`text`,text:` is a problem for `},{kind:`word`,level:1,en:`older people`,zh:`老人`,pinyin:`lǎo rén`},{kind:`text`,text:`.`}]},{kind:`sentence`,level:4,en:`The government said this project will improve traffic for residents nearby.`,zh:`政府说这项目会改善附近居民的交通。`,pinyin:`zhèng fǔ shuō zhè xiàng mù huì gǎi shàn fù jìn jÅ« mín de jiāo tōng`,leftovers:[{kind:`text`,text:`The government said this project will improve `},{kind:`word`,level:2,en:`traffic`,zh:`交通`,pinyin:`jiāo tōng`},{kind:`text`,text:` for residents nearby.`}]},{kind:`sentence`,level:4,en:`New facilities will open, though more time is still needed.`,zh:`新的设施会开放,但是还需要更多时间。`,pinyin:`xÄ«n de shè shÄ« huì kāi fàng dàn shì hái xÅ« yào gèng duō shí jiān`,leftovers:[{kind:`text`,text:`New facilities will open, though more `},{kind:`word`,level:1,en:`time`,zh:`时间`,pinyin:`shí jiān`},{kind:`text`,text:` is still needed.`}]},{kind:`sentence`,level:5,en:`They still need to do more analysis.`,zh:`他们还要做更多分析。`,pinyin:`tā men hái yào zuò gèng duō fēn xÄ«`},{kind:`sentence`,level:6,en:`Further consultation will follow next month.`,zh:`下个月还会继续进行咨询。`,pinyin:`xià ge yuè hái huì jì xù jìn xíng zÄ« xún`,leftovers:[{kind:`text`,text:`Further talks will follow `},{kind:`word`,level:4,en:`next month`,zh:`下个月`,pinyin:`xià ge yuè`},{kind:`text`,text:`.`}]}];function nl(e){return e===`word`?`mkt-swap is-zh is-word`:`mkt-swap is-zh is-${e}`}function rl(){let e=(0,_.useRef)(null),t=(0,_.useRef)(null),n=(0,_.useRef)(null),r=(0,_.useRef)(null),[i,a]=(0,_.useState)(`friends`),[o,s]=(0,_.useState)(1),[c,l]=(0,_.useState)(null),[u,d]=(0,_.useState)(null),f=$c.find(e=>e.id===i)??$c[0],p=()=>{r.current!=null&&(window.clearTimeout(r.current),r.current=null)},m=()=>{l(null),d(null)},h=()=>{p(),r.current=window.setTimeout(m,Yc)},g=t=>{n.current=t;let r=e.current;if(!r)return;let i=r.getBoundingClientRect(),a=t.getBoundingClientRect();d({top:a.top-i.top-Xc,left:a.left-i.left+a.width/2,flip:!1})},v=(e,t)=>
19{p(),l(e),g(t)};(0,_.useLayoutEffect)(()=>{let r=t.current,i=e.current,a=n.current;if(!c||!u||!r||!i||!a)return;let o=i.getBoundingClientRect(),s=a.getBoundingClientRect(),l=r.offsetHeight,f=r.offsetWidth,p=!(s.top-o.top>=l+Xc+Zc),m=p?s.bottom-o.top+Xc:s.top-o.top-Xc,h=f/2+Zc,g=o.width-f/2-Zc,_=s.left-o.left+s.width/2,v=g>=h?Math.min(g,Math.max(h,_)):_;u.flip===p&&Math.abs(u.top-m)<.5&&Math.abs(u.left-v)<.5||d({top:m,left:v,flip:p})},[c,u,i]),(0,_.useEffect)(()=>()=>p(),[]);let y=(e,t)=>({onMouseEnter:n=>{t&&v(e,n.currentTarget)},onFocus:n=>{t&&v(e,n.currentTarget)},onMouseLeave:()=>{t&&h()},onBlur:()=>{t&&h()},onClick:n=>{if(t){if(window.matchMedia(`(pointer: coarse)`).matches&&c===e){m();return}v(e,n.currentTarget)}}});return(0,H.jsx)(`div`,{className:`mkt-chrome-demo`,children:(0,H.jsxs)(`div`,{className:`mkt-browser`,children:[(0,H.jsxs)(`div`,{className:`mkt-chrome-toolbar`,children:[(0,H.jsxs)(`div`,{className:`mkt-chrome-tabs`,children:[(0,H.jsxs)(`span`,{className:`mkt-traffic`,"aria-hidden":`true`,children:[(0,H.jsx)(`i`,{className:`r`}),(0,H.jsx)(`i`,{className:`y`}),(0,H.jsx)(`i`,{className:`g`})]}),$c.map(e=>(0,H.jsxs)(`button`,{type:`button`,className:e.id===i?`mkt-tab is-on`:`mkt-tab`,"aria-pressed":e.id===i,onClick:()=>{a(e.id),m()},children:[(0,H.jsx)(`img`,{src:Qc,width:16,height:16,alt:``}),e.tab]},e.id))]}),(0,H.jsxs)(`div`,{className:`mkt-chrome-omnibox`,"aria-hidden":`true`,children:[(0,H.jsx)(`span`,{className:`mkt-nav`,children:`← → ↻`}),(0,H.jsxs)(`span`,{className:`mkt-url`,children:[(0,H.jsx)(`span`,{className:`mkt-lock`}),f.url]}),(0,H.jsx)(`span`,{className:`mkt-ext-btn`,children:(0,H.jsx)(`img`,{src:Qc,width:18,height:18,alt:``})})]})]}),(0,H.jsxs)(`div`,{className:`mkt-chrome-page`,ref:e,children:[(0,H.jsxs)(`div`,{className:`mkt-ext-popup`,children:[(0,H.jsx)(`div`,{className:`mkt-ext-head`,children:fo}),(0,H.jsxs)(`div`,{className:`mkt-ext-body`,children:[(0,H.jsxs)(`p`,{className:`mkt-ext-live`,children:[(0,H.jsx)(`span`,{children:`Live on this page`}),(0,H.jsx)(`span`,{className:`mkt-ext-switch`,"aria-hidden":`true`})]}),(0,H.jsx)(`p`,{className:`mkt-ext-label`,children:`HSK level`}),(0,H.jsx)(`div`,{className:`mkt-ext-ticks`,role:`group`,"aria-label":`HSK level`,children:[1,2,3,4,5,6].map(e=>(0,H.jsx)(`button`,{type:`button`,className:e===o?`is-on`:e>1?`is-plus`:void 0,"aria-pressed":e===o,onClick:()=>{s(e),m()},children:e},e))}),o>1?(0,H.jsx)(`p`,{className:`mkt-ext-note`,children:q.chrome.plusDemoNote}):null]})]}),i===`friends`?(0,H.jsx)(il,{level:o,hoverHandlers:y}):(0,H.jsx)(al,{level:o,hoverHandlers:y}),c&&u?(0,H.jsxs)(`div`,{ref:t,className:`mkt-ext-tip${u.flip?` is-below`:``}`,style:{top:u.top,left:u.left},role:`tooltip`,onMouseEnter:p,onMouseLeave:h,children:[(0,H.jsx)(`span`,{className:`mkt-ext-tip-en`,children:c.en}),(0,H.jsx)(`span`,{className:`mkt-ext-tip-py`,children:(0,H.jsx)(K,{pinyin:c.pinyin})}),c.kind===`word`?(0,H.jsx)(`a`,{className:`mkt-ext-tip-dict`,href:`https://en.wiktionary.org/wiki/${encodeURIComponent(c.zh)}#Chinese`,target:`_blank`,rel:`noopener noreferrer`,onClick:e=>e.stopPropagation(),children:`Wiktionary`}):null]}):null]})]})})}function il({level:e,hoverHandlers:t}){return(0,H.jsxs)(`div`,{className:`mkt-feed`,children:[(0,H.jsx)(`div`,{className:`mkt-feed-bar`,children:`friends`}),(0,H.jsx)(`div`,{className:`mkt-feed-list`,children:el.map((n,r)=>(0,H.jsxs)(`article`,{className:`mkt-feed-post`,children:[(0,H.jsxs)(`header`,{className:`mkt-feed-who`,children:[(0,H.jsx)(`span`,{className:`mkt-feed-ava is-${n.tone}`,children:n.initial}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`p`,{className:`mkt-feed-name`,children:n.name}),(0,H.jsx)(`p`,{className:`mkt-feed-time`,children:n.time})]})]}),n.lines.map((n,r)=>(0,H.jsx)(`p`,{children:ol(n,e,t)},r)),r===0?(0,H.jsx)(`div`,{className:`mkt-feed-pic`,"aria-hidden":`true`}):null,(0,H.jsx)(`p`,{className:`mkt-feed-acts`,children:`Like · Reply`})]},n.name))})]})}function al({level:e,hoverHandlers:t}){return(0,H.jsxs)(`div`,{className:`mkt-news`,children:[(0,H.jsxs)(`div`,{className:`mkt-news-bar`,children:[(0,H.jsx)(`span`,{children:`NEWS`}),(0,H.jsx)(`span`,{className:`mkt-news-nav`,children:`UK · Travel · Weather`})]}),(0,H.jsxs)(`article`,{className:`mkt-article`,children:[(0,H.jsx)(`p`,{className:`mkt-article-kicker`,children:`UK · 4 min read`}),(0,H.jsx)(`h3`,{children:`New train station to open next year`}),(0,H.jsx)(`p`,{className:`mkt-article-byline`,children:`7 hrs ago · London`}),tl.map((n,r)=>(0,H.jsx)(`p`,{children:ol(n,e,t)},r))]})]})}function ol(e,t,n){return e.kind===`sentence`?e.level<=t?(0,H.jsx)(`button`,{type:`button`,className:nl(`sentence`),...n(e,!0),children:e.zh}):e.leftovers?sl(e.leftovers,t,n):e.en:sl(e.pieces,t,n)}function sl(e,t,n){return e.map((e,r)=>e.kind===`text`?(0,H.jsx)(`span`,{children:e.text},r):e.level<=t?(0,H.jsx)(`button`,{type:`button`,className:nl(e.kind),...n(e,!0),children:e.zh},r):(0,H.jsx)(`span`,{children:e.en},r))}function cl(e,t=``){let n=e===`primary`?`site-submit`:`site-secondary`;return t?`${n} ${t}`:n}function ll({variant:e=`primary`,className:t=``}){let n=po;return n?(0,H.jsx)(`a`,{className:cl(e,t),href:n,children:q.cta.iphoneLive}):(0,H.jsx)(`span`,{className:cl(e,`is-soon ${t}`.trim()),"aria-disabled":`true`,children:q.cta.iphoneSoon})}function ul({variant:e=`primary`,className:t=``,computer:n=!1}){let r=n?q.cta.chromeComputer:q.cta.chrome;return(0,H.jsx)(`a`,{className:cl(e,t),href:mo,children:r})}function dl({surface:e,className:t=``}){return e===`mobile`?(0,H.jsx)(ll,{variant:`primary`,className:t}):(0,H.jsx)(ul,{variant:`primary`,className:t})}function fl({surface:e,className:t=``}){return e===`mobile`?(0,H.jsx)(ul,{variant:`secondary`,computer:!0,className:t}):(0,H.jsx)(ll,{variant:`secondary`,className:t})}var pl=[{id:`ja`,label:q.languages.japanese},{id:`es`,label:q.languages.spanish},{id:`de`,label:q.languages.german},{id:`fr`,label:q.languages.french},{id:`it`,label:q.languages.italian},{id:`other`,label:q.languages.other}];function ml({source:e,idPrefix:t,submitLabel:n,doneTitle:r,alreadyTitle:i,doneBlurb:a}){let[o,s]=(0,_.useState)(``),[c,l]=(0,_.useState)(``),[u,d]=(0,_.useState)(!1),[f,p]=(0,_.useState)(``),[m,h]=(0,_.useState)(`email`),[g,v]=(0,_.useState)(!1),[y,b]=(0,_.useState)(!1),[x,S]=(0,_.useState)(null),C=(t={})=>lo(o,c,e,t),w=async t=>{if(t.preventDefault(),!g){S(null),v(!0);try{let t=await C({marketing:u});b(t.already),h(e===`languages`?`language`:`done`)}catch(e){S(e instanceof U?e.message:`Could not join the list. Try again.`)}finally{v(!1)}}},T=async e=>{if(e.preventDefault(),!(g||!f)){S(null),v(!0);try{let e=await C({interest:f});b(e.already),h(`done`)}catch(e){S(e instanceof U?e.message:`Could not save that. Try again.`)}finally{v(!1)}}};if(m===`done`)return(0,H.jsxs)(`div`,{className:`site-done`,role:`status`,children:[(0,H.jsx)(`p`,{className:`site-done-title`,children:y?i:r}),(0,H.jsx)(`p`,{className:`site-done-blurb`,children:a})]});if(m===`language`){let e=`${t}-interest`;return(0,H.jsxs)(`form`,{className:`site-lang-followup`,onSubmit:e=>void T(e),children:[(0,H.jsx)(`label`,{className:`site-label`,htmlFor:e,children:q.languages.which}),(0,H.jsxs)(`select`,{id:e,className:`site-email`,required:!0,disabled:g,value:f,onChange:e=>p(e.target.value),children:[(0,H.jsx)(`option`,{value:``,children:q.languages.choose}),pl.map(e=>(0,H.jsx)(`option`,{value:e.id,children:e.label},e.id))]}),(0,H.jsx)(`button`,{className:`site-submit`,type:`submit`,disabled:g||!f,children:q.languages.save}),(0,H.jsx)(`button`,{type:`button`,className:`site-text-link`,disabled:g,onClick:()=>h(`done`),children:q.languages.skip}),x?(0,H.jsx)(`p`,{className:`site-error`,children:x}):null]})}return(0,H.jsxs)(`form`,{className:`site-form`,onSubmit:e=>void w(e),children:[(0,H.jsx)(`label`,{className:`site-label`,htmlFor:`${t}-email`,children:`Email`}),(0,H.jsx)(`input`,{id:`${t}-email`,className:`site-email`,type:`email`,name:`email`,autoComplete:`email`,placeholder:`[email protected]`,required:!0,value:o,onChange:e=>s(e.target.value)}),(0,H.jsxs)(`label`,{className:`site-opt-in`,children:[(0,H.jsx)(`input`,{type:`checkbox`,checked:u,onChange:e=>d(e.target.checked)}),(0,H.jsx)(`span`,{children:`Email me about new features (optional)`})]}),(0,H.jsxs)(`div`,{className:`site-hp`,"aria-hidden":`true`,children:[(0,H.jsx)(`label`,{htmlFor:`${t}-website`,children:`Website`}),(0,H.jsx)(`input`,{id:`${t}-website`,type:`text`,name:`website`,tabIndex:-1,autoComplete:`off`,value:c,onChange:e=>l(e.target.value)})]}),(0,H.jsx)(`button`,{className:`site-submit`,type:`submit`,disabled:g,children:n}),x?(0,H.jsx)(`p`,{className:`site-error`,children:x}):null]})}var hl=[{zh:`æ°´`,pinyin:`shuǐ`},{zh:`茶`,pinyin:`chá`},{zh:`人`,pinyin:`rén`},{zh:`å®¶`,pinyin:`jiā`}],gl=[{zh:`今天天气很好。`,pinyin:`jÄ«n tiān tiān qì hěn hǎo`},{zh:`你好,老师。`,pinyin:`nǐ hǎo lǎo shÄ«`}];function _l(){let[e,t]=(0,_.useState)(0),[n,r]=(0,_.useState)(0),i=hl[e],a=gl[n];return(0,_.useEffect)(()=>{let e=window.setInterval(()=>{t(e=>(e+1)%hl.length),r(e=>(e+1)%gl.length)},4200);return()=>window.clearInterval(e)},[]),(0,H.jsxs)(`div`,{className:`mkt-phones`,children:[(0,H.jsxs)(`div`,{className:`mkt-phone`,"aria-label":`iPhone Home Screen`,children:[(0,H.jsx)(`div`,{className:`mkt-phone-bezel`,children:(0,H.jsxs)(`div`,{className:`mkt-phone-screen mkt-phone-home`,children:[(0,H.jsx)(`div`,{className:`mkt-island`,"aria-hidden":`true`}),(0,H.jsxs)(`div`,{className:`mkt-status`,"aria-hidden":`true`,children:[(0,H.jsx)(`span`,{children:`9:41`}),(0,H.jsx)(`span`,{className:`mkt-status-icons`,children:`●●● Wi‑Fi`})]}),(0,H.jsxs)(`div`,{className:`mkt-ios-row`,children:[(0,H.jsxs)(`article`,{className:`mkt-ios-widget mkt-ios-small`,children:[(0,H.jsx)(`p`,{className:`mkt-ios-zh`,children:i.zh}),(0,H.jsx)(`p`,{className:`mkt-ios-py`,children:(0,H.jsx)(K,{pinyin:i.pinyin})})]}),(0,H.jsx)(`article`,{className:`mkt-ios-widget mkt-ios-small`,children:(0,H.jsx)(`p`,{className:`mkt-ios-zh mkt-ios-zh-sm`,children:a.zh})})]}),(0,H.jsxs)(`article`,{className:`mkt-ios-widget mkt-ios-medium`,children:[(0,H.jsx)(`p`,{className:`mkt-ios-zh mkt-ios-zh-md`,children:a.zh}),(0,H.jsx)(`p`,{className:`mkt-ios-py`,children:(0,H.jsx)(K,{pinyin:a.pinyin})})]}),(0,H.jsxs)(`div`,{className:`mkt-dock`,"aria-hidden":`true`,children:[(0,H.jsx)(`i`,{}),(0,H.jsx)(`i`,{}),(0,H.jsx)(`i`,{}),(0,H.jsx)(`i`,{})]})]})}),(0,H.jsx)(`p`,{className:`mkt-phone-caption`,children:`Home Screen`})]}),(0,H.jsxs)(`div`,{className:`mkt-phone`,"aria-label":`iPhone Lock Screen`,children:[(0,H.jsx)(`div`,{className:`mkt-phone-bezel`,children:(0,H.jsxs)(`div`,{className:`mkt-phone-screen mkt-phone-lock`,children:[(0,H.jsx)(`div`,{className:`mkt-island`,"aria-hidden":`true`}),(0,H.jsx)(`p`,{className:`mkt-lock-date`,children:`Monday 24`}),(0,H.jsx)(`p`,{className:`mkt-lock-clock`,children:`9:41`}),(0,H.jsxs)(`div`,{className:`mkt-lock-row`,children:[(0,H.jsx)(`article`,{className:`mkt-lock-circle`,children:(0,H.jsx)(`p`,{children:i.zh})}),(0,H.jsx)(`article`,{className:`mkt-lock-rect`,children:(0,H.jsx)(`p`,{children:a.zh})})]}),(0,H.jsxs)(`div`,{className:`mkt-lock-tools`,"aria-hidden":`true`,children:[(0,H.jsx)(`i`,{}),(0,H.jsx)(`i`,{})]})]})}),(0,H.jsx)(`p`,{className:`mkt-phone-caption`,children:`Lock Screen`})]})]})}function vl({surface:e}){let t=e===`desktop`,n=Jc();return(0,H.jsxs)(`main`,{className:`mkt-main`,children:[(0,H.jsx)(`section`,{className:`mkt-hero mkt-wrap`,children:(0,H.jsxs)(`div`,{className:`mkt-hero-copy`,children:[(0,H.jsx)(`h2`,{children:q.product.headline}),(0,H.jsx)(`p`,{className:`site-lede`,children:q.product.lede}),(0,H.jsx)(dl,{surface:e}),(0,H.jsx)(fl,{surface:e}),n?(0,H.jsx)(`p`,{className:`mkt-aside`,children:q.product.iphoneOnly}):null]})}),t?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(yl,{}),(0,H.jsx)(bl,{})]}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(bl,{}),(0,H.jsx)(yl,{})]}),(0,H.jsx)(`section`,{className:`mkt-section mkt-plus`,children:(0,H.jsxs)(`div`,{className:`mkt-wrap`,children:[(0,H.jsx)(`p`,{className:`site-kicker`,children:q.plus.kicker}),(0,H.jsx)(`h2`,{children:q.plus.headline}),(0,H.jsxs)(`p`,{children:[`Plus is $`,_o.toFixed(2),`/month or $`,vo.toFixed(2),`/year, with a`,` `,7,`-day trial on yearly. Monthly has no trial.`]}),(0,H.jsx)(`p`,{children:q.plus.blurb}),Va()?(0,H.jsx)(`p`,{children:(0,H.jsx)(`a`,{className:`site-submit`,href:`${window.location.pathname}?subscribe=1`,children:q.cta.subscribe})}):null,null]})}),(0,H.jsx)(`section`,{className:`mkt-section`,children:(0,H.jsx)(`div`,{className:`mkt-wrap`,children:(0,H.jsxs)(`aside`,{className:`site-lang-alert`,children:[(0,H.jsx)(`p`,{className:`site-lang-kicker`,children:q.languages.kicker}),(0,H.jsx)(`p`,{className:`site-lede`,children:q.languages.lede}),(0,H.jsx)(ml,{source:`languages`,idPrefix:`languages`,submitLabel:q.languages.button,doneTitle:q.cta.iosNotifyDone,alreadyTitle:q.cta.iosNotifyAlready,doneBlurb:q.languages.doneBlurb})]})})})]})}function yl(){return(0,H.jsx)(`section`,{className:`mkt-section mkt-chrome-section`,children:(0,H.jsxs)(`div`,{className:`mkt-wrap mkt-split`,children:[(0,H.jsxs)(`div`,{className:`mkt-copy-col`,children:[(0,H.jsx)(`p`,{className:`site-kicker`,children:q.chrome.sectionKicker}),(0,H.jsx)(`h2`,{children:q.chrome.sectionTitle}),(0,H.jsx)(`p`,{className:`site-lede`,children:q.chrome.sectionLede}),(0,H.jsx)(ul,{variant:`primary`})]}),(0,H.jsx)(rl,{})]})})}function bl(){return(0,H.jsx)(`section`,{className:`mkt-section mkt-iphone-section`,children:(0,H.jsxs)(`div`,{className:`mkt-wrap mkt-split`,children:[(0,H.jsxs)(`div`,{className:`mkt-copy-col`,children:[(0,H.jsx)(`p`,{className:`site-kicker`,children:q.widgets.sectionKicker}),(0,H.jsx)(`h2`,{children:q.widgets.sectionTitle}),(0,H.jsx)(`p`,{className:`site-lede`,children:q.widgets.sectionLede}),(0,H.jsx)(ll,{variant:`primary`}),null]}),(0,H.jsx)(_l,{})]})})}var xl=[{pinyin:`mā`,tone:1},{pinyin:`má`,tone:2},{pinyin:`mǎ`,tone:3},{pinyin:`mà`,tone:4},{pinyin:`ma`,tone:5}];function Sl({surface:e}){return(0,_.useEffect)(()=>{let e=document.title;return document.title=q.methodology.pageTitle,()=>{document.title=e}},[]),(0,H.jsxs)(`main`,{className:`mkt-main`,children:[(0,H.jsx)(`section`,{className:`mkt-hero mkt-wrap`,children:(0,H.jsxs)(`div`,{className:`mkt-hero-copy`,children:[(0,H.jsx)(`p`,{className:`site-kicker`,children:q.methodology.kicker}),(0,H.jsx)(`h2`,{children:q.methodology.headline}),(0,H.jsx)(`p`,{className:`site-lede`,children:q.methodology.lede}),(0,H.jsx)(`a`,{className:`site-text-link`,href:window.location.pathname,children:q.methodology.home})]})}),(0,H.jsx)(`section`,{className:`mkt-section mkt-method-level`,children:(0,H.jsxs)(`div`,{className:`mkt-wrap`,children:[(0,H.jsx)(`p`,{className:`site-kicker`,children:q.methodology.levelKicker}),(0,H.jsx)(`h2`,{children:q.methodology.levelTitle}),(0,H.jsx)(`p`,{className:`site-lede`,children:q.methodology.levelLede}),(0,H.jsx)(`p`,{children:q.methodology.levelBody})]})}),(0,H.jsx)(`section`,{className:`mkt-section mkt-chrome-section`,children:(0,H.jsxs)(`div`,{className:`mkt-wrap`,children:[(0,H.jsx)(`p`,{className:`site-kicker`,children:q.methodology.lifeKicker}),(0,H.jsx)(`h2`,{children:q.methodology.lifeTitle}),(0,H.jsx)(`p`,{className:`site-lede`,children:q.methodology.lifeLede})]})}),(0,H.jsx)(`section`,{className:`mkt-section`,children:(0,H.jsxs)(`div`,{className:`mkt-wrap mkt-split`,children:[(0,H.jsxs)(`div`,{className:`mkt-copy-col`,children:[(0,H.jsx)(`p`,{className:`site-kicker`,children:q.methodology.tonesKicker}),(0,H.jsx)(`h2`,{children:q.methodology.tonesTitle}),(0,H.jsx)(`p`,{className:`site-lede`,children:q.methodology.tonesLede}),(0,H.jsxs)(`p`,{className:`mkt-tone-example`,children:[(0,H.jsx)(`span`,{className:`han han-sans`,children:q.methodology.tonesExampleHanzi}),(0,H.jsx)(K,{pinyin:q.methodology.tonesExamplePinyin})]}),(0,H.jsx)(`p`,{children:q.methodology.tonesCaption})]}),(0,H.jsx)(Cl,{})]})}),(0,H.jsx)(`section`,{className:`mkt-section mkt-plus`,children:(0,H.jsxs)(`div`,{className:`mkt-wrap mkt-method-ctas`,children:[(0,H.jsx)(dl,{surface:e}),(0,H.jsx)(fl,{surface:e})]})})]})}function Cl(){return(0,H.jsx)(`div`,{className:`mkt-tone-legend`,role:`img`,"aria-label":q.methodology.tonesAria,children:xl.map((e,t)=>(0,H.jsxs)(`div`,{className:`mkt-tone-cell is-t${e.tone}${t===xl.length-1?`
19 is-last`:``}`,children:[(0,H.jsx)(K,{pinyin:e.pinyin}),(0,H.jsx)(`span`,{className:`mkt-tone-num`,children:e.tone})]},e.tone))})}function wl(e){return e.link===`chromeStore`?mo:``}function Tl({step:e}){let t=wl(e),n=e.linkText;if(!t||!n)return e.text;let r=e.text.indexOf(n);return r===-1?e.text:(0,H.jsxs)(H.Fragment,{children:[e.text.slice(0,r),(0,H.jsx)(`a`,{href:t,children:n}),e.text.slice(r+n.length)]})}function El({steps:e}){return(0,H.jsx)(`ol`,{children:e.map((e,t)=>(0,H.jsxs)(`li`,{children:[(0,H.jsx)(`span`,{className:`mkt-guide-num`,children:t+1}),(0,H.jsxs)(`div`,{className:`mkt-guide-step`,children:[(0,H.jsx)(`span`,{children:(0,H.jsx)(Tl,{step:e})}),e.image?(0,H.jsx)(`img`,{className:`mkt-guide-shot${e.image.includes(`chrome-`)?` is-wide`:` is-phone`}`,src:`/${e.image}`,alt:e.alt??``,width:e.image.includes(`chrome-`)?960:440,height:e.image.includes(`chrome-`)?600:780}):null]})]},e.text))})}function Dl({kind:e}){return e===`chrome`?(0,H.jsxs)(`div`,{className:`mkt-guide`,children:[(0,H.jsx)(`h2`,{children:q.chrome.headline}),(0,H.jsx)(El,{steps:q.chrome.steps}),(0,H.jsx)(`p`,{children:q.chrome.blurb})]}):(0,H.jsx)(Ol,{})}function Ol(){let[e,t]=(0,_.useState)(`homeScreen`),n=q.widgets[e];return(0,H.jsxs)(`div`,{className:`mkt-guide`,children:[(0,H.jsx)(`h2`,{children:q.widgets.headline}),(0,H.jsxs)(`div`,{className:`mkt-guide-tabs`,role:`tablist`,"aria-label":q.widgets.headline,children:[(0,H.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":e===`homeScreen`,className:e===`homeScreen`?`is-on`:void 0,onClick:()=>t(`homeScreen`),children:q.widgets.homeScreen.label}),(0,H.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":e===`lockScreen`,className:e===`lockScreen`?`is-on`:void 0,onClick:()=>t(`lockScreen`),children:q.widgets.lockScreen.label})]}),(0,H.jsx)(El,{steps:n.steps}),(0,H.jsx)(`p`,{children:q.widgets.blurb})]})}var kl=`/logo.svg`;function Al({onBrandTap:e,kicker:t,surface:n,menuOpen:r,onOpenMenu:i}){return(0,H.jsx)(`header`,{className:`site-header mkt-header`,children:(0,H.jsxs)(`div`,{className:`site-bar`,children:[(0,H.jsx)(`h1`,{children:(0,H.jsxs)(`button`,{type:`button`,className:`site-brand`,onClick:e,children:[(0,H.jsx)(`img`,{className:`site-logo`,src:kl,width:36,height:36,alt:``}),fo]})}),(0,H.jsxs)(`div`,{className:`site-header-actions`,children:[t?(0,H.jsx)(`p`,{className:`site-kicker`,children:t}):(0,H.jsx)(dl,{surface:n,className:`mkt-header-cta`}),(0,H.jsxs)(`button`,{type:`button`,className:`mkt-burger`,"aria-expanded":r,"aria-controls":`mkt-menu`,onClick:i,children:[(0,H.jsxs)(`span`,{className:`mkt-burger-bars`,"aria-hidden":`true`,children:[(0,H.jsx)(`i`,{}),(0,H.jsx)(`i`,{}),(0,H.jsx)(`i`,{})]}),(0,H.jsx)(`span`,{className:`sr-only`,children:q.cta.menu})]})]})]})})}function jl(){return(0,H.jsx)(`footer`,{className:`site-footer`,children:(0,H.jsxs)(`div`,{className:`site-bar`,children:[(0,H.jsx)(`span`,{children:`iPhone · Chrome`}),(0,H.jsx)(`a`,{href:`/privacy.html`,children:q.cta.privacy}),(0,H.jsx)(`a`,{href:`/terms.html`,children:q.cta.terms}),(0,H.jsx)(`a`,{href:`${window.location.pathname}?method=1`,children:q.methodology.menu}),(0,H.jsx)(`a`,{href:`/support.html`,children:q.cta.support}),(0,H.jsx)(`a`,{href:`mailto:${ho}`,children:ho})]})})}function Ml({panel:e,onPanel:t,surface:n}){return(0,_.useEffect)(()=>{if(!e)return;let n=document.body.style.overflow;document.body.style.overflow=`hidden`;let r=e=>{e.key===`Escape`&&t(null)};return window.addEventListener(`keydown`,r),()=>{document.body.style.overflow=n,window.removeEventListener(`keydown`,r)}},[e,t]),e?(0,H.jsxs)(`div`,{className:`mkt-menu`,id:`mkt-menu`,role:`dialog`,"aria-modal":`true`,"aria-label":q.cta.menu,children:[(0,H.jsxs)(`div`,{className:`mkt-menu-bar`,children:[e===`root`?(0,H.jsx)(`span`,{className:`site-kicker`,children:q.cta.menu}):(0,H.jsx)(`button`,{type:`button`,className:`mkt-menu-back`,onClick:()=>t(`root`),children:q.cta.back}),(0,H.jsx)(`button`,{type:`button`,className:`mkt-menu-close`,onClick:()=>t(null),children:q.cta.close})]}),e===`root`?(0,H.jsxs)(`nav`,{className:`mkt-menu-nav`,children:[(0,H.jsx)(ll,{variant:n===`mobile`?`primary`:`secondary`}),(0,H.jsx)(ul,{variant:n===`desktop`?`primary`:`secondary`,computer:n===`mobile`}),(0,H.jsx)(`button`,{type:`button`,className:`mkt-menu-link`,onClick:()=>t(`widgets`),children:q.widgets.headline}),(0,H.jsx)(`button`,{type:`button`,className:`mkt-menu-link`,onClick:()=>
19t(`chrome`),children:q.chrome.headline}),(0,H.jsx)(`a`,{className:`mkt-menu-link`,href:`${window.location.pathname}?method=1`,children:q.methodology.menu}),(0,H.jsx)(`a`,{className:`mkt-menu-link`,href:`${window.location.pathname}?you=1`,children:`You`}),(0,H.jsx)(`a`,{className:`mkt-menu-link`,href:`${window.location.pathname}?subscribe=1`,children:q.cta.subscribe}),(0,H.jsxs)(`div`,{className:`mkt-menu-legal`,children:[(0,H.jsx)(`a`,{href:`/support.html`,children:q.cta.support}),(0,H.jsx)(`a`,{href:`/privacy.html`,children:q.cta.privacy}),(0,H.jsx)(`a`,{href:`/terms.html`,children:q.cta.terms})]})]}):(0,H.jsx)(Dl,{kind:e})]}):null}function Nl({onUnlock:e}){Gs();let[t,n]=(0,_.useState)(0),[r,i]=(0,_.useState)(null),a=qc(),o=typeof window<`u`&&(new URLSearchParams(window.location.search).get(`subscribe`)===`1`||new URLSearchParams(window.location.search).get(`you`)===`1`),s=typeof window<`u`&&new URLSearchParams(window.location.search).get(`you`)===`1`,c=typeof window<`u`&&new URLSearchParams(window.location.search).get(`lists`)===`1`,l=typeof window<`u`&&new URLSearchParams(window.location.search).get(`method`)===`1`,u=yo(),d=o||c||u,f=()=>{let r=t+1;n(r),r>=7&&(Bs(!0),e())},p=u?`Chrome`:s?`You`:o?`Plus`:c?`Lists`:l?q.methodology.kicker:void 0;return(0,H.jsxs)(`div`,{className:`site${d?``:` site-marketing`}${r?` is-menu-open`:``}`,children:[(0,H.jsx)(`div`,{className:`site-band`,"aria-hidden":`true`}),(0,H.jsx)(Al,{onBrandTap:f,kicker:p,surface:a,menuOpen:r!==null,onOpenMenu:()=>i(`root`)}),o?(0,H.jsx)(`main`,{className:`site-main`,children:(0,H.jsx)(ac,{})}):c?(0,H.jsx)(`main`,{className:`site-main`,children:(0,H.jsx)(Vc,{})}):u?(0,H.jsx)(`main`,{className:`site-main`,children:Va()?(0,H.jsx)(Co,{variant:`hero`}):(0,H.jsxs)(`p`,{className:`site-lede`,children:[`Sign in with Google or Apple to connect the `,fo,` extension.`]})}):l?(0,H.jsx)(Sl,{surface:a}):(0,H.jsx)(vl,{surface:a}),(0,H.jsx)(jl,{}),!d&&a===`mobile`?(0,H.jsx)(`div`,{className:`mkt-sticky`,children:(0,H.jsx)(dl,{surface:a})}):null,(0,H.jsx)(Ml,{panel:r,onPanel:i,surface:a})]})}function Pl({config:e,wordCount:t,dueCount:n,canStart:r,active:i,termText:a,termPinyin:o,options:s,correctOption:c,selected:l,feedback:u,session:d,sessionGoal:f,sessionCount:p,onSessionCountChange:m,speechSupported:h,listenPaused:g=!1,onStart:_,onReplay:v,onPauseListening:y,onSelectOption:b,onNext:x,onStop:S,onChangeMode:C}){return h?t===0?(0,H.jsxs)(`section`,{className:`panel empty-state`,children:[(0,H.jsx)(`h2`,{children:`No words yet`}),(0,H.jsx)(`p`,{children:`Capture or add vocabulary first, then come back to study.`})]}):i?(0,H.jsxs)(`section`,{className:`panel quiz-panel listen-panel`,children:[(0,H.jsx)(ts,{label:g?`${e.termLabel} → English`:`Listen → English`,done:d.reviewed,total:f,correct:d.correct,wrong:d.wrong}),(0,H.jsxs)(`div`,{className:`listen-prompt`,children:[g||u?(0,H.jsxs)(`div`,{className:`prompt-block listen-reveal`,children:[(0,H.jsx)(`p`,{className:`prompt`,children:a}),o&&(0,H.jsx)(`p`,{className:`prompt-pinyin`,children:(0,H.jsx)(K,{pinyin:o})}),g&&!u&&(0,H.jsx)(`p`,{className:`hint`,children:`Listening paused for this session — pick the meaning.`})]}):(0,H.jsx)(`p`,{className:`listen-hidden-label`,children:`Tap play, then pick the meaning`}),!g&&(0,H.jsx)(es,{onClick:v})]}),u?(0,H.jsxs)(`div`,{className:`feedback ${u}`,children:[(0,H.jsx)(`p`,{className:`feedback-title`,children:u===`correct`?`Correct!`:`Not quite`}),(0,H.jsxs)(`div`,{className:`answer-compare`,children:[(0,H.jsxs)(`div`,{className:`compare-row`,children:[(0,H.jsx)(`span`,{className:`compare-label`,children:`Word`}),(0,H.jsxs)(`span`,{className:`compare-value correct`,children:[a,o?` · ${o}`:``]})]}),u===`wrong`&&l&&(0,H.jsxs)(`div`,{className:`compare-row`,children:[(0,H.jsx)(`span`,{className:`compare-label`,children:`You picked`}),(0,H.jsx)(`span`,{className:`compare-value yours`,children:l})]}),(0,H.jsxs)(`div`,{className:`compare-row`,children:[(0,H.jsx)(`span`,{className:`compare-label`,children:`Meaning`}),(0,H.jsx)(`span`,{className:`compare-value correct`,children:c})]})]}),(0,H.jsx)(`button`,{type:`button`,className:`primary`,onClick:x,children:`Continue`})]}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`div`,{className:`choice-options`,role:`group`,"aria-label":`English meanings`,children:s.map(e=>(0,H.jsx)(`button`,{type:`button`,className:`choice-option`,onClick:()=>b(e),children:e},e))}),!g&&(0,H.jsx)(`button`,{type:`button`,className:`text-button listen-pause`,onClick:y,children:`Can’t listen right now`})]}),(0,H.jsx)(`button`,{type:`button`,className:`text-button session-leave`,onClick:S,children:`End session`})]}):(0,H.jsxs)(`section`,{className:`panel`,children:[(0,H.jsx)(`h2`,{children:`Listen`}),(0,H.jsxs)(`div`,{className:`stats-grid`,children:[(0,H.jsxs)(`div`,{className:`stat-card`,children:[(0,H.jsx)(`span`,{className:`stat-value`,children:t}),(0,H.jsx)(`span`,{className:`stat-label`,children:`Total words`})]}),(0,H.jsxs)(`div`,{className:`stat-card accent`,children:[(0,H.jsx)(`span`,{className:`stat-value`,children:n}),(0,H.jsx)(`span`,{className:`stat-label`,children:`Due now`})]})]}),r?n===0?(0,H.jsx)(`p`,{className:`hint`,children:`Nothing due — practice anytime. Due reviews are preferred when available.`}):(0,H.jsxs)(`p`,{className:`hint`,children:[`Hear the `,e.termLabel,` word, then tap the English meaning. Text stays hidden until you answer.`]}):(0,H.jsx)(`p`,{className:`hint`,children:t===0?`Add vocabulary first.`:`Need at least 4 words in your list for multiple-choice distractors.`}),(0,H.jsx)(ns,{count:p,wordCount:t,minimum:4,onChange:m}),(0,H.jsx)(`button`,{type:`button`,className:`primary large`,onClick:_,disabled:!r,children:n===0&&r?`Practice anyway`:`Start listen`}),(0,H.jsx)(`button`,{type:`button`,className:`secondary study-switch`,onClick:C,children:`Change mode`})]}):(0,H.jsxs)(`section`,{className:`panel empty-state`,children:[(0,H.jsx)(`h2`,{children:`Listen unavailable`}),(0,H.jsx)(`p`,{children:`This browser does not support speech synthesis. Try Choice or Match instead.`}),(0,H.jsx)(`button`,{type:`button`,className:`secondary study-switch`,onClick:C,children:`Change mode`})]})}function Fl({config:e,language:t,wordCount:n,dueCount:r,active:i,playing:a,boardSize:o,terms:s,english:c,matchedIds:l,selectedTermId:u,selectedEnglishId:d,wrongPair:f,session:p,sessionComplete:m,sessionGoal:h,sessionProgress:g,targetCount:_,maxTarget:v,onAdjustTarget:y,onStart:b,onStop:x,onSelectTerm:S,onSelectEnglish:C,onChangeMode:w}){if(n===0)return(0,H.jsxs)(`section`,{className:`panel empty-state`,children:[(0,H.jsx)(`h2`,{children:`No words yet`}),(0,H.jsx)(`p`,{children:`Capture or import vocabulary first, then come back to study.`})]});if(!i){let t=n>=2;return(0,H.jsxs)(`section`,{className:`panel`,children:[(0,H.jsx)(`h2`,{children:`Match pairs`}),(0,H.jsxs)(`div`,{className:`stats-grid`,children:[(0,H.jsxs)(`div`,{className:`stat-card`,children:[(0,H.jsx)(`span`,{className:`stat-value`,children:n}),(0,H.jsx)(`span`,{className:`stat-label`,children:`Total words`})]}),(0,H.jsxs)(`div`,{className:`stat-card accent`,children:[(0,H.jsx)(`span`,{className:`stat-value`,children:r}),(0,H.jsx)(`span`,{className:`stat-label`,children:`Due now`})]})]}),(0,H.jsxs)(`div`,{className:`match-target`,children:[(0,H.jsx)(`span`,{className:`match-target-label`,children:`Words this session`}),(0,H.jsxs)(`div`,{className:`match-target-stepper`,children:[(0,H.jsx)(`button`,{type:`button`,className:`stepper-button`,onClick:()=>y(-5),disabled:!t||_<=2,"aria-label":`Fewer words`,children:`−`}),(0,H.jsx)(`span`,{className:`match-target-value`,children:_}),(0,H.jsx)(`button`,{type:`button`,className:`stepper-button`,onClick:()=>y(5),disabled:!t||_>=v,"aria-label":`More words`,children:`+`})]}),(0,H.jsx)(`p`,{className:`match-target-hint`,children:`Shown 5 at a time, then the next set — until you hit your total.`})]}),t?r===0?(0,H.jsx)(`p`,{className:`hint`,children:`Nothing due — practice anytime. Due reviews are preferred when available.`}):(0,H.jsxs)(`p`,{className:`hint`,children:[`Match `,e.termLabel,` on the left with English on the right. Uses the same spaced repetition as the typing quiz.`]}):(0,H.jsx)(`p`,{className:`hint`,children:`Need at least 2 words to start matching.`}),(0,H.jsx)(`button`,{type:`button`,className:`primary large`,onClick:b,disabled:!t,children:r===0&&t?`Practice anyway`:`Start matching`}),(0,H.jsx)(`button`,{type:`button`,className:`secondary study-switch`,onClick:w,children:`Change mode`})]})}return m?(0,H.jsxs)(`section`,{className:`panel`,children:[(0,H.jsx)(`h2`,{children:`Session complete`}),(0,H.jsxs)(`div`,{className:`stats-grid`,children:[(0,H.jsxs)(`div`,{className:`stat-card accent`,children:[(0,H.jsx)(`span`,{className:`stat-value`,children:p.reviewed}),(0,H.jsx)(`span`,{className:`stat-label`,children:`Reviewed`})]}),(0,H.jsxs)(`div`,{className:`stat-card`,children:[(0,H.jsxs)(`span`,{className:`stat-value`,children:[p.correct,`✓ `,p.wrong,`✗`]}),(0,H.jsx)(`span`,{className:`stat-label`,children:`Results`})]})]}),(0,H.jsx)(`button`,{type:`button`,className:`primary large`,onClick:x,children:`Back to setup`}),(0,H.jsx)(`button`,{type:`button`,className:`secondary study-switch`,onClick:w,children:`Change mode`})]}):(0,H.jsxs)(`section`,{className:`panel match-panel`,children:[(0,H.jsx)(ts,{label:`Board ${l.size}/${o}`,done:g+l.size,total:h,correct:p.correct,wrong:p.wrong}),(0,H.jsxs)(`div`,{className:`match-board`,children:[(0,H.jsxs)(`div`,{className:`match-column`,"aria-label":`${e.termLabel} words`,children:[(0,H.jsx)(`h3`,{className:`match-column-title`,children:e.termLabel}),s.map(e=>{let n=l.has(e.id),r=u===e.id,i=f?.termId===e.id;return(0,H.jsxs)(`button`,{type:`button`,className:[`match-item`,n?`matched`:``,r?`selected`:``,i?`wrong`:``].filter(
19Boolean).join(` `),onClick:()=>{Wo(e.text,t),n||S(e.id)},disabled:!a,children:[(0,H.jsx)(`span`,{className:`match-item-text`,children:e.text}),e.pinyin&&(0,H.jsx)(`span`,{className:`match-item-pinyin`,children:(0,H.jsx)(K,{pinyin:e.pinyin})})]},`term-${e.id}`)})]}),(0,H.jsxs)(`div`,{className:`match-column`,"aria-label":`English translations`,children:[(0,H.jsx)(`h3`,{className:`match-column-title`,children:`English`}),c.map(e=>{let t=l.has(e.id),n=d===e.id,r=f?.englishId===e.id;return(0,H.jsx)(`button`,{type:`button`,className:[`match-item`,t?`matched`:``,n?`selected`:``,r?`wrong`:``].filter(Boolean).join(` `),onClick:()=>C(e.id),disabled:t||!a,children:e.text},`en-${e.id}`)})]})]}),(0,H.jsxs)(`p`,{className:`hint match-hint`,children:[`Tap a `,e.termLabel,` word, then its English match. Next set loads automatically.`]}),(0,H.jsx)(`button`,{type:`button`,className:`text-button session-leave`,onClick:x,children:`End session`})]})}var Il=/^(der|die|das|ein|eine|il|lo|la|l'|i|gli|le|les|un|uno|una|un'|une|des|el|los|las|unos|unas)\s+/i;function J(e){return e.toLowerCase().trim().replace(/\s+/g,` `)}function Ll(e){return J(e).replace(/ä/g,`ae`).replace(/ö/g,`oe`).replace(/ü/g,`ue`).replace(/ß/g,`ss`)}function Y(e){return J(e).normalize(`NFD`).replace(/\p{M}/gu,``).replace(/ß/g,`ss`)}function X(e,t){return e.split(/[/;,]/).map(e=>t(e)).filter(Boolean)}function Z(e,t){let n=e.replace(Il,``),r=t.replace(Il,``);return e===t||n===r||n===t||e===r}var Rl=new Set([`a`,`an`,`the`,`to`,`of`,`for`,`as`,`and`,`or`,`in`,`on`,`at`,`sth`,`sb`,`one`,`ones`,`be`]),zl=[[`serious`,`seriously`,`important`,`importance`,`earnest`,`earnestly`],[`happy`,`glad`,`gladly`,`pleased`],[`angry`,`anger`,`mad`],[`sad`,`unhappy`,`sorrow`],[`big`,`large`,`huge`],[`small`,`little`,`tiny`],[`pretty`,`beautiful`,`handsome`],[`buy`,`purchase`,`bought`],[`speak`,`talk`,`say`,`said`]];function Bl(e){return J(e.replace(/\([^)]*\)|\b(to|sth|sb|someone|something|somebody)\b/gi,` `))}function Vl(e){return Bl(e).split(/[^a-z]+/i).map(e=>e.toLowerCase()).filter(e=>e.length>=2&&!Rl.has(e))}function Hl(e,t){return zl.some(n=>n.includes(e)&&n.includes(t))}function Ul(e,t){return t===e||t.length>=4&&e.length>=4&&(t.startsWith(e)||e.startsWith(t))?!0:Hl(t,e)}function Wl(e,t){let n=Bl(e),r=Bl(t);if(!n||!r)return!1;if(n===r||n.length>=4&&r.includes(n)||r.length>=4&&n.includes(r))return!0;let i=Vl(n),a=Vl(r);return i.length>0&&i.every(e=>a.some(t=>Ul(t,e)))}function Gl(e,t,n){return n===`term-en`?t.some(t=>Wl(e,t)):t.some(t=>Z(e,t))}function Kl(e,t,n){let r=Ll(e);if(!r)return{correct:!1,accentWarning:!1};if(Gl(r,X(t,Ll),n))return{correct:!0,accentWarning:!1};let i=Y(e),a=X(t,Y);return i&&Gl(i,a,n)?{correct:!0,accentWarning:!0}:{correct:!1,accentWarning:!1}}function ql(e,t,n){return Kl(e,t,n).correct}function Jl(e,t,n){return Yl(e,t,n,`either`)}function Yl(e,t,n,r=`either`){if(n===`term-en`)return Kl(e,t.english,n);let i=t.pinyin?.trim(),a=Kl(e,t.term,`en-term`);return r===`hanzi`?a:r===`pinyinSoft`||r===`pinyinStrict`?!i||r===`pinyinStrict`&&!xs(e)?{correct:!1,accentWarning:!1}:Ts(e,i)?{correct:!0,accentWarning:!1,viaPinyin:!0}:{correct:!1,accentWarning:!1}:a.correct?a:i&&Ts(e,i)?{correct:!0,accentWarning:!1,viaPinyin:!0}:{correct:!1,accentWarning:!1}}var Xl=[`writtenRecognition`,`writtenProduction`,`listeningRecognition`,`contextComprehension`,`toneRecognition`],Zl={writtenRecognition:`Written recognition`,writtenProduction:`Written production`,listeningRecognition:`Listening recognition`,contextComprehension:`Context comprehension`,toneRecognition:`Tones`},Ql=1440*60*1e3,$l=.15,eu=1,tu=365,nu=21,ru=.95;function iu(e,t,n){let r=Date.now();return{id:crypto.randomUUID(),term:e,english:t,pinyin:n?.pinyin,easeFactor:2.5,interval:0,repetitions:0,nextReview:r,correctCount:0,wrongCount:0,addedAt:r,category:n?.category,source:n?.source??`app`,sourceUrl:n?.sourceUrl,skills:{}}}function au(e,t=Date.now()){return e.nextReview<=t}function ou(e,t=Date.now()){return e.filter(e=>au(e,t))}function su(e,t=Date.now()){let n=ou(e,t);return n.length>0?n:e}function cu(e,t=Date.now(),n){let r=su(n?e.filter(e=>!n.has(e.id)):e,t);return r.length===0?null:r[Math.floor(Math.random()*r.length)]}function lu(e,t,n=1){return Math.min(Math.max(e,n),Math.max(n,Math.min(50,Math.max(t,n))))}function uu(e,t,n=Date.now()){let r={...e},i=au(e,n)||e.repetitions===0;
19if(t){if(r.correctCount+=1,i)r.repetitions+=1,r.repetitions===1?r.interval=1:r.repetitions===2?r.interval=3:r.interval=Math.round(r.interval*r.easeFactor),r.interval=Math.min(tu,Math.max(1,r.interval)),r.easeFactor=Math.max(1.3,r.easeFactor+(.1-1*.1)),r.nextReview=n+r.interval*Ql;else if(r.repetitions>=1){let e=n+Ql;r.nextReview>e&&(r.interval=1,r.nextReview=e)}}else r.wrongCount+=1,r.repetitions=0,r.interval=0,r.easeFactor=Math.max(1.3,r.easeFactor-.2),r.nextReview=n;return mu(r,n)}function du(e,t,n,r=Date.now()){let i={...e.skills??{}},a=i[t],o=+!!n,s=a===void 0?n?eu:0:a.score*(1-$l)+o*$l;return i[t]={score:Math.min(1,Math.max(0,s)),attempts:(a?.attempts??0)+1,correct:(a?.correct??0)+ +!!n,lastPracticedAt:r},{...e,skills:i}}function fu(e,t,n=Date.now()){let r=e.addedAt??t.lastPracticedAt??n,i=Math.max(0,(n-r)/Ql),a=.5+.2*Math.min(1,i)+.3*Math.min(1,i/nu);if(i<14&&(a=Math.min(a,ru)),t.attempts>0){let e=t.correct/t.attempts;a*=.85+.15*e}return Math.min(1,Math.max(0,a))}function pu(e,t,n=Date.now()){let r=e.skills?.[t];return!r||r.attempts===0?null:Math.min(1,Math.max(0,r.score*fu(e,r,n)))}function mu(e,t=Date.now()){let n=Number.isFinite(e.interval)?e.interval:0,r=Number.isFinite(e.nextReview)?e.nextReview:t,i=e.repetitions??0;n=Math.min(tu,Math.max(0,n));let a=r-t,o=e.addedAt??t,s=Math.max(0,(t-o)/Ql);return a>tu*Ql?s<7||i<=2?(n=1,r=t+Ql):(n=Math.max(1,n||1),r=t+n*Ql):i>=1&&a>Ql&&s<1&&(n=1,r=t+Ql),n===e.interval&&r===e.nextReview&&i===e.repetitions?e:{...e,interval:n,nextReview:r,repetitions:i}}function hu(e,t,n,r=Date.now()){return uu(du(e,n,t,r),t,r)}function gu(e,t=Date.now()){let n=null;for(let r of Xl){let i=pu(e,r,t);i!==null&&(!n||i<n.score)&&(n={skillId:r,label:Zl[r],score:i})}return n}function _u(e){return e===`term-en`?`writtenRecognition`:`writtenProduction`}function vu(e,t,n=Date.now()){let r=e.skills?.[t];if(!r)return!1;let i=pu(e,t,n);return i!==null&&r.attempts>=2&&i>=.55}function yu(e,t,n){return!n||!e.pinyin?.trim()?!1:!vu(e,_u(t))}function bu(e,t=Date.now()){let n=e-t;if(n<=0)return`Due now`;let r=Math.ceil(n/Ql);if(r===1)return`Tomorrow`;if(r<7)return`In ${r} days`;let i=Math.round(r/7);if(i<5)return`In ${i} week${i===1?``:`s`}`;let a=Math.round(r/30);return`In ${a} month${a===1?``:`s`}`}function xu(e){return new Intl.DateTimeFormat(void 0,{dateStyle:`medium`,timeStyle:`short`}).format(new Date(e))}var Su={noun:[`river`,`window`,`jacket`,`kitchen`,`market`,`shadow`],verb:[`share`,`arrive`,`borrow`,`whisper`,`collect`,`decide`],adjective:[`quiet`,`narrow`,`bitter`,`gentle`,`hollow`,`steady`],adverb:[`quietly`,`suddenly`,`barely`,`forward`,`elsewhere`,`seldom`],phrase:[`over there`,`by the way`,`of course`,`in a hurry`,`at once`,`no wonder`],other:[`river`,`share`,`quietly`,`tomorrow`,`jacket`,`elsewhere`]},Cu=Su.other;function wu(e,t){return!t||t===`other`||e.category===t}function Tu(e){let t=[...e];for(let e=t.length-1;e>0;--e){let n=Math.floor(Math.random()*(e+1));[t[e],t[n]]=[t[n],t[e]]}return t}function Eu(e){return Array.from(e.trim())}function Du(e){let t=Eu(e);return t.length>=2&&new Set(t).size>=2}function Ou(e){let t=Eu(e.toLowerCase());if(t.length<2)return t;for(let e=0;e<8;e+=1){let e=Tu(t);if(e.join(``)!==t.join(``))return e}return Tu(t)}function ku(e,t,n,r){let i=[];for(let a of Tu(e)){if(a.id===t.id)continue;let e=a[n].trim(),o=e.toLowerCase();!e||r.has(o)||(r.add(o),i.push(e))}return i}function Au(e,t,n,r){let i=t[r].trim(),a=new Set([i.toLowerCase()]),o=t.category,s=!!o&&o!==`other`,c=ku(s?e.filter(e=>wu(e,o)):e,t,r,a);if(r===`english`){let e=s?Su[o]:Cu;for(let t of e){if(c.length>=n)break;let e=t.toLowerCase();a.has(e)||(a.add(e),c.push(t))}}if(c.length===0&&(c.push(...ku(e,t,r,a)),r===`english`))for(let e of Cu){if(c.length>=n)break;let t=e.toLowerCase();a.has(t)||(a.add(t),c.push(e))}return c.slice(0,n)}function ju(e,t,n,r=4){let i=n===`term-en`?`english`:`term`,a=t[i];return{options:Tu([a,...Au(e,t,r-1,i)]),correctOption:a}}function Mu(e,t=Date.now()){let n=su(e.filter(e=>Du(e.term)),t);return n.length===0?null:n[Math.floor(Math.random()*n.length)]}function Nu(e,t=Date.now()){return su(e.filter(e=>Du(e.term)),t).length}var Pu={correct:0,wrong:0,reviewed:0};function Fu(e){return e.map((e,t)=>({id:`${t}-${e}`,char:e}))}function Iu(e,t){let n=pu(e,t);return n===null?-.01:n}function Lu(e,t,n,r,i){let a=[{format:`type`,skillId:`writtenRecognition`,direction:`term-en`},{format:`type`,skillId:`writtenProduction`,direction:`en-term`}];return t.length>=4&&(a.push({format:`choice`,skillId:`writtenRecognition`,direction:`term-en`},{format:`choice`,skillId:`writtenProduction`,direction:`en-term`}),n&&r&&a.push({format:`listen`,skillId:`listeningRecognition`,direction:`term-en`})),i&&e.pinyin?.trim()&&a.push({format:`tones`,skillId:`toneRecognition`,direction:`term-en`}),Du(e.term)&&a.push({format:`scramble`,skillId:`writtenProduction`,direction:`en-term`}),a}function Ru(e,t,n){switch(e.format){case`choice`:case`tones`:return!0;case`listen`:return vu(t,`writtenRecognition`);case`scramble`:return vu(t,`writtenProduction`);case`type`:return e.direction===`term-en`?vu(t,`writtenRecognition`):vu(t,`writtenProduction`)?!n||(t.skills?.writtenProduction?.attempts??0)>=3:!1}}function zu(e){let t=e.filter(e=>e.format===`choice`);if(t.length>0)return t;let n=e.filter(e=>e.format===`listen`||e.format===`scramble`);return n.length>0?n:e.filter(e=>e.format===`type`)}function Bu(e,t){let n=Du(e.term),r=t.filter(t=>Ru(t,e,n));return r.length>0?r:zu(t)}
19function Vu(e,t,n,r,i,a){let o=[...Bu(e,Lu(e,t,n,i,a))].sort((t,n)=>Iu(e,t.skillId)-Iu(e,n.skillId)),s=Iu(e,o[0].skillId),c=o.filter(t=>Iu(e,t.skillId)<=s+.05),l=c.filter(e=>e.format!==r),u=l.length>0?l:c;return u[Math.floor(Math.random()*u.length)]}function Hu(e,t,n,r){if(n!==`type`||t!==`en-term`)return`either`;if(!r||!e.pinyin?.trim())return`hanzi`;let i=vu(e,`writtenProduction`)?[`hanzi`,`pinyinStrict`]:[`either`,`pinyinSoft`,`hanzi`];return i[Math.floor(Math.random()*i.length)]}function Uu(e,t,n,r,i,a){let o=Vu(e,t,n,r,i,a);if(o.format===`tones`){let r=Fs(e.pinyin??``);return!r||r.options.length<2?Uu(e,t,n,`tones`,i,!1):{word:e,format:`tones`,skillId:`toneRecognition`,direction:`term-en`,options:r.options,correctOption:r.correctOption,scrambleBank:[],scaffold:!1,typeTarget:`either`}}let s=yu(e,o.direction,a),c=Hu(e,o.direction,o.format,a),l=o.format===`choice`||o.format===`listen`?ju(t,e,o.direction):{options:[],correctOption:``};return{word:e,format:o.format,skillId:o.skillId,direction:o.direction,options:l.options,correctOption:l.correctOption,scrambleBank:o.format===`scramble`?Fu(Ou(e.term)):[],scaffold:s,typeTarget:c}}function Q(e,t,n,r,i,a){let o=i&&e===`choice`?r?` · with pinyin`:` · hanzi only`:``,s=i&&e===`type`&&t===`en-term`?a===`hanzi`?` · hanzi`:a===`pinyinSoft`?` · pinyin`:a===`pinyinStrict`?` · pinyin + tones`:``:``;switch(e){case`type`:return t===`term-en`?`${n} → English`:`English → ${n}${s}`;case`choice`:return t===`term-en`?`Choice · meaning${o}`:`Choice · ${n}${o}`;case`listen`:return`Listen · meaning`;case`scramble`:return`Scramble · ${n}`;case`tones`:return`Tones`}}function Wu({words:e,language:t,onUpdateWord:n,autoSpeak:r,speechSupported:i}){let[a,o]=(0,_.useState)(null),[s,c]=(0,_.useState)(``),[l,u]=(0,_.useState)(null),[d,f]=(0,_.useState)([]),[p,m]=(0,_.useState)(null),[h,g]=(0,_.useState)(!1),[v,y]=(0,_.useState)(!1),[b,x]=(0,_.useState)(Pu),[S,C]=(0,_.useState)(0),[w,T]=(0,_.useState)(10),[E,D]=(0,_.useState)(null),[O,k]=(0,_.useState)(!1),A=(0,_.useRef)(null),j=(0,_.useMemo)(()=>ou(e).length,[e]),M=e.length>=1,N=lu(w,e.length,4),P=i&&!O,F=Ao(t).hasPinyin,I=(0,_.useMemo)(()=>{let t={};for(let n of e){let e=n.pinyin?.trim();e&&(t[n.term]=e)}return t},[e]),L=(t,n,r=P)=>{let a=Uu(t,e,i,n,r,F);o(a),D(a.format),c(``),u(null),f([]),m(null),g(!1),y(!1)},ee=()=>{let t=cu(e);t&&(x(Pu),C(N),k(!1),L(t,null,i))},te=()=>{o(null),c(``),u(null),f([]),m(null),g(!1),y(!1),k(!1)},ne=()=>{k(!0),!(!a||p)&&a.format===`listen`&&L(a.word,`listen`,!1)};(0,_.useEffect)(()=>{a?.format===`type`&&!p&&A.current?.focus()},[a,p]),(0,_.useEffect)(()=>{if(!(!a||!r||p||O)){if(a.format===`listen`){Wo(a.word.term,t);return}a.format===`type`&&a.direction===`term-en`&&Wo(a.word.term,t)}},[a,p,r,t,O]);let re=(e,t=!1,r=!1,i)=>{if(!a)return;let o;o=i?uu(du(a.word,i,e),e):r&&e?uu(a.word,!0):hu(a.word,e,a.skillId),n(o),m(e?`correct`:`wrong`),g(e&&t),y(e&&r&&!i),x(t=>({correct:t.correct+ +!!e,wrong:t.wrong+ +!e,reviewed:t.reviewed+1}))},R=()=>{if(!a||p||a.format!==`type`)return;let e=Yl(s,a.word,a.direction,a.typeTarget);if(a.typeTarget===`pinyinStrict`){re(e.correct,!!e.accentWarning,!1,`toneRecognition`);return}re(e.correct,!!e.accentWarning,!!e.viaPinyin)},z=e=>{!a||p||a.format!==`choice`&&a.format!==`listen`&&a.format!==`tones`||(u(e),re(e===a.correctOption))},ie=()=>{!a||a.format!==`listen`||Wo(a.word.term,t)},ae=e=>{!a||p||a.format!==`scramble`||d.includes(e)||f(t=>[...t,e])},oe=e=>{!a||p||a.format!==`scramble`||f(t=>t.filter(t=>t!==e))},se=()=>{p||f([])},ce=(0,_.useMemo)(()=>{if(!a||a.format!==`scramble`)return``;let e=new Map(a.scrambleBank.map(e=>[e.id,e.char]));return d.map(t=>e.get(t)??``).join(``)},[a,d]),le=()=>{!a||p||a.format!==`scramble`||!ce||re(ql(ce,a.word.term,`en-term`))},ue=()=>{if(b.reviewed>=S){te();return}let t=cu(e);if(!t){te();return}L(t,E,P)},de=(0,_.useMemo)(()=>a?a.scrambleBank.filter(e=>!d.includes(e.id)):[],[a,d]),fe=(0,_.useMemo)(()=>{if(!a)return[];let e=new Map(a.scrambleBank.map(e=>[e.id,e]));return d.map(t=>e.get(t)).filter(e=>!!e)},[a,d]),pe=!a||a.format===`listen`?``:a.format===`tones`||a.direction===`term-en`?a.word.term:a.word.english,me=a&&a.format!==`tones`&&a.direction===`term-en`&&a.scaffold?a.word.pinyin:void 0,he=a?.format===`choice`&&a.direction===`en-term`&&a.scaffold?I:void 0,ge=a?.format===`type`&&a.direction===`en-term`||a?.format===`scramble`?a.word.pinyin:void 0,_e=a?a.direction===`term-en`?a.word.english:a.word.term:``;return{active:!!a,round:a,prompt:pe,promptPinyin:me,optionPinyin:he,answerPinyin:ge,scaffold:a?.scaffold??!1,typeTarget:a?.typeTarget??`either`,expectedAnswer:_e,termText:a?.word.term??``,answer:s,setAnswer:c,selected:l,feedback:p,accentWarning:h,viaPinyin:v,listenPaused:O,session:b,sessionGoal:S,sessionCount:N,setSessionCount:T,dueCount:j,canStart:M,inputRef:A,remainingTiles:de,builtTiles:fe,builtAnswer:ce,start:ee,stop:te,pauseListening:ne,submitTyped:R,selectOption:z,replayListen:ie,tapBankTile:ae,tapBuiltTile:oe,clearBuilt:se,submitScramble:le,nextQuestion:ue}}function Gu({term:e,pinyin:t}){let n=t?.trim();return n?(0,H.jsxs)(`span`,{className:`term-answer-reveal`,children:[(0,H.jsx)(`span`,{className:`term-answer-hanzi`,children:e}),(0,H.jsx)(`span`,{className:`term-answer-py`,children:(0,H.jsx)(K,{pinyin:n})}),(0,H.jsx)(`span`,{className:`term-answer-numbered`,children:ws(n)})]}):(0,H.jsx)(`span`,{className:`term-answer-reveal`,children:e})}function Ku({config:e,language:t,wordCount:n,dueCount:r,canStart:i,active:a,format:o,direction:s,prompt:c,promptPinyin:l,optionPinyin:u,answerPinyin:d,scaffold:f=!1,typeTarget:p=`either`,termText:m,expectedAnswer:h,answer:g,selected:_,options:v,correctOption:y,feedback:b,accentWarning:x=!1,viaPinyin:S=!1,listenPaused:C=!1,session:w,sessionGoal:T,sessionCount:E,onSessionCountChange:D,autoSpeak:O,speechSupported:k,inputRef:A,remainingTiles:j,builtTiles:M,builtAnswer:N,onAnswerChange:P,onToggleAutoSpeak:F,onStart:I,onSubmitTyped:L,onSelectOption:ee,onReplayListen:te,onPauseListening:ne,onTa
19pBank:re,onTapBuilt:R,onClearScramble:z,onSubmitScramble:ie,onNext:ae,onStop:oe,onChangeMode:se}){return n===0?(0,H.jsxs)(`section`,{className:`panel empty-state`,children:[(0,H.jsx)(`h2`,{children:`No words yet`}),(0,H.jsx)(`p`,{children:`Capture or add vocabulary first, then come back to study.`})]}):a?(0,H.jsxs)(`section`,{className:`panel quiz-panel mixed-panel`,children:[(0,H.jsx)(ts,{label:o&&s?Q(o,s,e.termLabel,f,e.hasPinyin,p):`Mixed`,done:w.reviewed,total:T,correct:w.correct,wrong:w.wrong}),o===`listen`?(0,H.jsxs)(`div`,{className:`prompt-row`,children:[(0,H.jsx)(`div`,{className:`prompt-block`,children:b?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`p`,{className:`prompt`,children:m}),l&&(0,H.jsx)(`p`,{className:`prompt-pinyin`,children:(0,H.jsx)(K,{pinyin:l})})]}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`p`,{className:`prompt listen-prompt`,children:`🔊`}),(0,H.jsx)(`p`,{className:`hint`,children:`What did you hear?`})]})}),(0,H.jsx)(es,{onClick:te,label:`Replay`})]}):(0,H.jsxs)(`div`,{className:`prompt-row`,children:[(0,H.jsxs)(`div`,{className:`prompt-block`,children:[(0,H.jsx)(`p`,{className:`prompt`,children:c}),l&&(0,H.jsx)(`p`,{className:`prompt-pinyin`,children:(0,H.jsx)(K,{pinyin:l})})]}),k&&m&&o!==`tones`&&(0,H.jsx)(es,{onClick:()=>Wo(m,t),label:o===`scramble`?`Audio hint: hear ${m}`:`Hear ${m}`}),k&&m&&o===`tones`&&(0,H.jsx)(es,{onClick:()=>Wo(m,t),label:`Listen`})]}),!b&&o===`type`&&(0,H.jsxs)(`form`,{className:`answer-form`,onSubmit:e=>{e.preventDefault(),L()},children:[(0,H.jsx)(`input`,{ref:A,type:`text`,className:`answer-input`,value:g,onChange:e=>P(e.target.value),placeholder:s===`term-en`?`Type English…`:s===`en-term`&&e.hasPinyin?p===`hanzi`?`Type ${e.shortName} only…`:p===`pinyinSoft`?`Type pinyin…`:p===`pinyinStrict`?`Type pinyin with tones (ni3hao3)…`:`Type ${e.shortName} or pinyin (ni3hao3)…`:s===`en-term`?`Type ${e.termLabel}…`:`Type your answer…`,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1}),(0,H.jsx)(`button`,{type:`submit`,className:`primary`,disabled:!g.trim(),children:`Check`})]}),!b&&(o===`choice`||o===`listen`||o===`tones`)&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`div`,{className:`choice-options`,children:v.map(e=>{let t=o===`choice`&&u?u[e]:void 0;return(0,H.jsx)(`button`,{type:`button`,className:`choice-option`,onClick:()=>ee(e),children:o===`tones`?(0,H.jsx)(K,{pinyin:e}):t?(0,H.jsxs)(`span`,{className:`choice-option-stack`,children:[(0,H.jsx)(`span`,{className:`choice-option-text`,children:e}),(0,H.jsx)(`span`,{className:`choice-option-pinyin`,children:(0,H.jsx)(K,{pinyin:t})})]}):e},e)})}),o===`listen`&&!C&&(0,H.jsx)(`button`,{type:`button`,className:`text-button listen-pause`,onClick:ne,children:`Can’t listen right now`})]}),!b&&o===`scramble`&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`div`,{className:`scramble-built`,"aria-label":`Your answer`,children:M.length===0?(0,H.jsx)(`span`,{className:`scramble-placeholder`,children:`Tap letters below`}):M.map(e=>(0,H.jsx)(`button`,{type:`button`,className:`scramble-tile built`,onClick:()=>R(e.id),children:e.char},e.id))}),(0,H.jsx)(`div`,{className:`scramble-bank`,role:`group`,"aria-label":`Letter bank`,children:j.map(e=>(0,H.jsx)(`button`,{type:`button`,className:`scramble-tile`,onClick:()=>re(e.id),children:e.char},e.id))}),(0,H.jsxs)(`div`,{className:`scramble-actions`,children:[(0,H.jsx)(`button`,{type:`button`,className:`secondary`,onClick:z,disabled:M.length===0,children:`Clear`}),(0,H.jsx)(`button`,{type:`button`,className:`primary`,onClick:ie,disabled:!N,children:`Check`})]})]}),b&&(0,H.jsxs)(`div`,{className:`feedback ${b}`,children:[(0,H.jsx)(`p`,{className:`feedback-title`,children:b===`correct`?`Correct!`:`Not quite`}),x&&(0,H.jsxs)(`p`,{className:`accent-warning`,children:[`Accepted — preferred spelling uses special characters:`,` `,(0,H.jsx)(`strong`,{children:h})]}),S&&(0,H.jsxs)(`p`,{className:`accent-warning`,children:[`Accepted via pinyin — doesn’t count as hanzi writing or tone skill. Preferred:`,` `,(0,H.jsx)(Gu,{term:h,pinyin:d})]}),(0,H.jsxs)(`div`,{className:`answer-compare`,children:[o===`listen`&&(0,H.jsxs)(`div`,{className:`compare-row`,children:[(0,H.jsx)(`span`,{className:`compare-label`,children:`Word`}),(0,H.jsx)(`span`,{className:`compare-value correct`,children:m})]}),b===`wrong`&&(0,H.jsxs)(H.Fragment,{children:[(o===`choice`||o===`listen`||o===`tone
19s`)&&_&&(0,H.jsxs)(`div`,{className:`compare-row`,children:[(0,H.jsx)(`span`,{className:`compare-label`,children:`You picked`}),(0,H.jsx)(`span`,{className:`compare-value yours`,children:o===`tones`?(0,H.jsx)(K,{pinyin:_}):_})]}),o===`type`&&(0,H.jsxs)(`div`,{className:`compare-row`,children:[(0,H.jsx)(`span`,{className:`compare-label`,children:`You wrote`}),(0,H.jsx)(`span`,{className:`compare-value yours`,children:g||`—`})]}),o===`scramble`&&(0,H.jsxs)(`div`,{className:`compare-row`,children:[(0,H.jsx)(`span`,{className:`compare-label`,children:`You built`}),(0,H.jsx)(`span`,{className:`compare-value yours`,children:N||`—`})]})]}),(b===`wrong`||o===`listen`)&&(0,H.jsxs)(`div`,{className:`compare-row`,children:[(0,H.jsx)(`span`,{className:`compare-label`,children:o===`listen`?`Meaning`:`Correct`}),(0,H.jsx)(`span`,{className:`compare-value correct`,children:o===`tones`?(0,H.jsx)(K,{pinyin:y}):o===`choice`||o===`listen`?y:(o===`type`||o===`scramble`)&&s===`en-term`?(0,H.jsx)(Gu,{term:h,pinyin:d}):h})]})]}),(0,H.jsx)(`button`,{type:`button`,className:`primary`,onClick:ae,children:`Continue`})]}),(0,H.jsx)(`button`,{type:`button`,className:`text-button session-leave`,onClick:oe,children:`End session`})]}):(0,H.jsxs)(`section`,{className:`panel`,children:[(0,H.jsx)(`h2`,{children:`Mixed`}),(0,H.jsxs)(`div`,{className:`stats-grid`,children:[(0,H.jsxs)(`div`,{className:`stat-card`,children:[(0,H.jsx)(`span`,{className:`stat-value`,children:n}),(0,H.jsx)(`span`,{className:`stat-label`,children:`Total words`})]}),(0,H.jsxs)(`div`,{className:`stat-card accent`,children:[(0,H.jsx)(`span`,{className:`stat-value`,children:r}),(0,H.jsx)(`span`,{className:`stat-label`,children:`Due now`})]})]}),i?r===0?(0,H.jsxs)(`p`,{className:`hint`,children:[`Nothing due — practice anytime across type, choice`,e.hasPinyin?`, tones`:``,`, listen, and scramble. Due reviews are preferred when available.`]}):(0,H.jsxs)(`p`,{className:`hint`,children:[`General revision across type, choice`,e.hasPinyin?`, tones`:``,`, listen, and scramble — starts with easier formats for each word, then unlocks harder ones as skills improve.`]}):(0,H.jsx)(`p`,{className:`hint`,children:`Add vocabulary first to start mixed revision.`}),k&&(0,H.jsxs)(`label`,{className:`speak-toggle`,children:[(0,H.jsx)(`input`,{type:`checkbox`,checked:O,onChange:F}),`Auto-play `,e.termLabel,` pronunciation`]}),(0,H.jsx)(ns,{count:E,wordCount:n,minimum:4,onChange:D}),(0,H.jsx)(`button`,{type:`button`,className:`primary large`,onClick:I,disabled:!i,children:r===0&&i?`Practice anyway`:`Start mixed session`}),(0,H.jsx)(`button`,{type:`button`,className:`secondary study-switch`,onClick:se,children:`Change mode`})]})}function qu({config:e,language:t,wordCount:n,dueCount:r,quizActive:i,prompt:a,promptPinyin:o,termText:s,direction:c,answer:l,feedback:u,accentWarning:d=!1,viaPinyin:f=!1,expectedAnswer:p,answerPinyin:m,session:h,autoSpeak:g,speechSupported:_,inputRef:v,onAnswerChange:y,onToggleAutoSpeak:b,onStart:x,onSubmit:S,onNext:C,onStop:w,onChangeMode:T,sessionGoal:E,sessionCount:D,onSessionCountChange:O}){if(n===0)return(0,H.jsxs)(`section`,{className:`panel empty-state`,children:[(0,H.jsx)(`h2`,{children:`No words yet`}),(0,H.jsx)(`p`,{children:`Capture or add vocabulary first, then come back to study.`})]});if(!i)return(0,H.jsxs)(`section`,{className:`panel`,children:[(0,H.jsx)(`h2`,{children:`Type`}),(0,H.jsxs)(`div`,{className:`stats-grid`,children:[(0,H.jsxs)(`div`,{className:`stat-card`,children:[(0,H.jsx)(`span`,{className:`stat-value`,children:n}),(0,H.jsx)(`span`,{className:`stat-label`,children:`Total words`})]}),(0,H.jsxs)(`div`,{className:`stat-card accent`,children:[(0,H.jsx)(`span`,{className:`stat-value`,children:r}),(0,H.jsx)(`span`,{className:`stat-label`,children:`Due now`})]})]}),r===0?(0,H.jsx)(`p`,{className:`hint`,children:`Nothing due right now — start a practice session anytime. Due reviews are preferred when available.`}):(0,H.jsxs)(`p`,{className:`hint`,children:[r,` word`,r===1?``:`s`,` waiting for review.`]}),e.hasPinyin&&(0,H.jsxs)(`p`,{className:`hint`,children:[`Follow the direction label: type English, or type `,e.shortName,` / pinyin when asked for the term.`]}),_&&(0,H.jsxs)(`label`,{className:`speak-toggle`,children:[(0,H.jsx)(`input`,{type:`checkbox`,checked:g,onChange:b}),`Auto-play `,e.termLabel,` pronunciation`]}),(0,H.jsx)(ns,{count:D,wordCount:n,onChange:O}),(0,H.jsx)(`button`,{type:`button`,className:`primary large`,onClick:x,disabled:n===0,children:r===0?`Practice anyway`:`Start t
19yping quiz`}),(0,H.jsx)(`button`,{type:`button`,className:`secondary study-switch`,onClick:T,children:`Change mode`})]});let k=c===`term-en`?`${e.termLabel} → English`:`English → ${e.termLabel}`,A=_&&s&&(c===`term-en`||u===`wrong`&&c===`en-term`);return(0,H.jsxs)(`section`,{className:`panel quiz-panel`,children:[(0,H.jsx)(ts,{label:k,done:h.reviewed,total:E,correct:h.correct,wrong:h.wrong}),(0,H.jsxs)(`div`,{className:`prompt-row`,children:[(0,H.jsxs)(`div`,{className:`prompt-block`,children:[(0,H.jsx)(`p`,{className:`prompt`,children:a}),o&&(0,H.jsx)(`p`,{className:`prompt-pinyin`,children:(0,H.jsx)(K,{pinyin:o})})]}),A&&(0,H.jsx)(es,{onClick:()=>Wo(s,t)})]}),u?(0,H.jsxs)(`div`,{className:`feedback ${u}`,children:[(0,H.jsx)(`p`,{className:`feedback-title`,children:u===`correct`?`Correct!`:`Not quite`}),d&&(0,H.jsxs)(`p`,{className:`accent-warning`,children:[`Accepted — preferred spelling uses special characters:`,` `,(0,H.jsx)(`strong`,{children:p})]}),f&&(0,H.jsxs)(`p`,{className:`accent-warning`,children:[`Accepted via pinyin — doesn’t count as hanzi writing or tone skill. Preferred:`,` `,(0,H.jsx)(Gu,{term:p,pinyin:m})]}),u===`wrong`&&(0,H.jsxs)(`div`,{className:`answer-compare`,children:[(0,H.jsxs)(`div`,{className:`compare-row`,children:[(0,H.jsx)(`span`,{className:`compare-label`,children:`You wrote`}),(0,H.jsx)(`span`,{className:`compare-value yours`,children:l})]}),(0,H.jsxs)(`div`,{className:`compare-row`,children:[(0,H.jsx)(`span`,{className:`compare-label`,children:`Correct`}),(0,H.jsx)(`span`,{className:`compare-value correct`,children:c===`en-term`?(0,H.jsx)(Gu,{term:p,pinyin:m}):p})]})]}),(0,H.jsx)(`button`,{type:`button`,className:`primary`,onClick:C,children:`Continue`})]}):(0,H.jsxs)(`form`,{className:`answer-form`,onSubmit:e=>{e.preventDefault(),S()},children:[(0,H.jsx)(`input`,{ref:v,type:`text`,className:`answer-input`,value:l,onChange:e=>y(e.target.value),placeholder:c===`term-en`?`Type English…`:c===`en-term`&&e.hasPinyin?`Type ${e.shortName} or pinyin (ni3hao3)…`:c===`en-term`?`Type ${e.termLabel}…`:`Type your answer…`,autoComplete:`off`,autoCapitalize:`off`,spellCheck:!1}),(0,H.jsx)(`button`,{type:`submit`,className:`primary`,disabled:!l.trim(),children:`Check`})]}),(0,H.jsx)(`button`,{type:`button`,className:`text-button session-leave`,onClick:w,children:`End session`})]})}var Ju=[/\|/,/\t/,/ — /,/ – /,/ - /,/: /];function Yu(e){let t=e.trim();for(let e of Ju){let n=t.match(e);if(n&&n.index!==void 0){let e=t.slice(0,n.index).trim(),r=t.slice(n.index+n[0].length).trim();if(e&&r)return{term:e,english:r};if(e)return{term:e}}}return{term:t}}function Xu(e){let t=[];for(let n of e.split(`
20`)){let e=n.trim();if(!e||e.startsWith(`#`))continue;let{term:r,english:i}=Yu(e);!r||!i||t.push({term:r,english:i})}return t}function Zu(e){let t=new Set,n=[];for(let r of e.split(`
21`)){let e=r.trim();if(!e||e.startsWith(`#`))continue;let{term:i,english:a}=Yu(e);if(!i)continue;let o=i.toLowerCase();t.has(o)||(t.add(o),n.push({rawInput:e,term:i,english:a}))}return n}var Qu=`https://translate.googleapis.com/translate_a/single`,$u=/^(der|die|das|ein|eine|einen|einem|einer|eines)\s+/i,ed=/^(l'|lo|gli|il|la|le|i|un'|uno|una|un)\s+/i,td=/^(l'|le|la|les|un|une|des)\s+/i,nd=/^(el|la|los|las|un|una|unos|unas)\s+/i,rd=/^(der|die|das|il|lo|la|l'|i|gli|le|les|el|los|las)\s+(.+)$/i,id=[`noun`,`verb`,`adjective`,`adverb`,`phrase`,`other`];async function ad(e,t){let n=e.trim();if(!n)throw Error(`Empty word`);let r=Ao(t),i=await dd({sl:r.translateCode,tl:`en`,q:n,dt:[`t`,`bd`,`qca`,`rm`]}),a=gd(i),o=fd(i);if(!o&&!a.preferredEnglish)throw Error(`No translation returned`);let s=hd(i,n),c=_d(o??``,a,n,t),l=Fd(n,c,t)&&!s,u=r.hasPinyin?pd(i):void 0;return{english:c,pos:a.pos,category:vd(n,a.pos,t),lemma:a.lemma,suggestion:s,untranslated:l,pinyin:u}}async function od(e,t){let n=e.trim();if(!n)throw Error(`Empty word`);let r=Ao(t),i=await dd({sl:`en`,tl:r.translateCode,q:n,dt:[`t`,`bd`,`qca`,`rm`]}),a=fd(i)?.trim();if(!a)throw Error(`No translation returned`);let o=hd(i,n),s=gd(i),c=Fd(n,a,t)&&!o,l=r.hasPinyin?pd(i):void 0,u=vd(a,s.pos,t),d=s.pos,f=s.lemma;if(r.hasPinyin&&!l&&!c)try{let e=await ad(a,t);l=e.pinyin??l,u=e.category||u,d=e.pos??d,f=e.lemma??f}catch{}return{term:a,english:n,pos:d,category:u,lemma:f,suggestion:o,untranslated:c,pinyin:l}}async function sd(e,t,n,r,i,a){let o=Ao(n),s=e.trim(),c=t.trim(),l=s,u=c,d=a?.trim()||void 0,f=!1,p=!1,m=r||bd(s,c,n),h=kd(s,n);if(m===`verb`&&n!==`zh-Hans`)u=Nd(u),l=o.hasArticles?h.toLowerCase():h;else if(o.hasArticles&&o.singularizeNouns&&yd(m,h,n)){let e=await cd(
21h,u,n,i),t=e?.term??Ad(h,n);u=Pd(e?.english??u),p=!!(e&&Id(e.term)!==Id(h));let r=await ld(t,u,n);r?(l=r,f=!Od(s,n)||Id(s)!==Id(r)):l=Od(s,n)?`${s.match(Dd(n))?.[1]?.toLowerCase()} ${t}`.replace(/\s+/g,` `):t}else if(o.hasPinyin){if(l=h,u=Pd(u),!d)try{d=(await ad(l,n)).pinyin}catch{}}else l=h;return{term:l,english:u,pinyin:d,changed:Id(l)!==Id(s)||Id(u)!==Id(c)||!!(d&&d!==a),articleAdded:f,singularized:p}}async function cd(e,t,n,r){let i=Pd(t),a=Ed(i);if(r&&Cd(r)&&Id(r)!==Id(e)&&wd(e,r))return{term:Ad(r,n),english:a};if(!a||Id(a)===Id(i)&&(!r||!Cd(r)||Id(r)===Id(e))&&!Sd(e,n))return null;let o=await ud(`the ${a}`,n),s=rd.exec(o.trim());if(!s)return null;let c=s[2].trim();return Id(c)===Id(e)||!wd(e,c)?null:{term:Ad(c,n),english:a}}async function ld(e,t,n){let r=await ud(`the ${e}`,n);if(jd(r,e))return Md(r,e,n);if(t){let r=await ud(`the ${t}`,n);if(jd(r,e))return Md(r,e,n)}return null}async function ud(e,t){return fd(await dd({sl:`en`,tl:Ao(t).translateCode,q:e,dt:[`t`]}))??``}async function dd(e){let t=new URL(Qu);t.searchParams.set(`client`,`gtx`),t.searchParams.set(`sl`,e.sl),t.searchParams.set(`tl`,e.tl);for(let n of e.dt)t.searchParams.append(`dt`,n);t.searchParams.set(`q`,e.q);let n=await fetch(t);if(!n.ok)throw Error(`Translate failed (${n.status})`);return n.json()}function fd(e){if(!Array.isArray(e)||!Array.isArray(e[0]))return null;let t=[];for(let n of e[0])Array.isArray(n)&&typeof n[0]==`string`&&t.push(n[0]);return t.join(``).trim()||null}function pd(e){if(!Array.isArray(e)||!Array.isArray(e[0]))return;let t=[];for(let n of e[0])if(Array.isArray(n))for(let e=2;e<n.length;e+=1){let r=n[e];if(typeof r==`string`&&md(r)){t.push(r.trim());break}if(Array.isArray(r)){for(let e of r)if(typeof e==`string`&&md(e)){t.push(e.trim());break}}}return t.join(` `).replace(/\s+/g,` `).trim()||void 0}function md(e){let t=e.trim();return!t||t.length>80||!/[a-zA-ZüÜvV]/.test(t)||/[\u4e00-\u9fff]/.test(t)?!1:/[āáǎàēéěèīíǐìōóǒòūúǔùǖǘǚǜü]/i.test(t)||/\s/.test(t)}function hd(e,t){if(!Array.isArray(e))return;let n=e[7];if(!Array.isArray(n)||n.length===0)return;let r=typeof n[1]==`string`?n[1].trim():``;if(r&&Id(r)!==Id(t))return r}function gd(e){if(!Array.isArray(e)||!Array.isArray(e[1]))return{};let t=[];for(let n of e[1]){if(!Array.isArray(n))continue;let e=typeof n[0]==`string`?n[0].toLowerCase():``,r=n[1],i=Array.isArray(r)&&typeof r[0]==`string`?r[0].trim():``,a=typeof n[3]==`string`?n[3].trim():void 0;e&&i&&t.push({pos:e,gloss:i,lemma:a})}if(t.length===0)return{};let n=t.find(e=>e.pos===`noun`)??t[0],r=n.lemma&&Cd(n.lemma)?n.lemma:void 0;return{pos:n.pos,preferredEnglish:n.gloss,lemma:r}}function _d(e,t,n,r){let i=kd(n,r);return t.preferredEnglish&&(t.pos===`noun`||xd(i,r)||!e||Fd(n,e,r))?t.preferredEnglish:e}function vd(e,t,n){let r=Ao(n),i=kd(e.trim(),n),a=i.split(/\s+/).filter(Boolean);return r.hasArticles&&a.length>1||!r.hasArticles&&i.length>4&&/\s/.test(i)?`phrase`:$(t)||(xd(i,n)?`noun`:`other`)}function $(e){if(!e)return;let t=e.toLowerCase().trim();if(t===`noun`||t.includes(`noun`)||t.includes(`substant`))return`noun`;if(t===`verb`||t.includes(`verb`))return`verb`;if(t===`adjective`||t.startsWith(`adj`))return`adjective`;if(t===`adverb`||t.startsWith(`adv`))return`adverb`;if(t.includes(`phrase`)||t.includes(`expression`))return`phrase`}function yd(e,t,n){return e===`verb`||e===`adverb`||e===`adjective`?!1:e===`noun`||xd(t,n)}function bd(e,t,n){if(xd(kd(e,n),n))return`noun`;if(t.toLowerCase().startsWith(`to `))return`verb`}function xd(e,t){if(!e||!Ao(t).hasArticles||t!==`de`)return!1;let n=e.charAt(0);return n!==n.toLowerCase()&&n===n.toUpperCase()}function Sd(e,t){let n=e.toLowerCase();return t===`de`?/(?:en|er|e|n|s)$/i.test(n)&&n.length>3:t===`it`?/(?:i|e)$/i.test(n)&&n.length>3:t===`fr`?/(?:s|x)$/i.test(n)&&n.length>3:t===`es`&&/(?:s|es)$/i.test(n)&&n.length>3}function Cd(e){return!!e&&!e.endsWith(`-`)&&!e.includes(` `)}function wd(e,t){let n=Td(Id(e)),r=Td(Id(t));if(!n||!r||n===r||r.length>n.length+1)return!1;let i=0;for(;i<n.length&&i<r.length&&n[i]===r[i];)i+=1;return!!(i>=Math.min(3,r.length)||r.length>=3&&n.startsWith(r))}function Td(e){return e.replaceAll(`ä`,`a`).replaceAll(`ö`,`o`).replaceAll(`ü`,`u`).replaceAll(`ß`,`ss`).replaceAll(`à`,`a`).replaceAll(`è`,`e`).replaceAll(`é`,`e`).replaceAll(`ì`,`i`).replaceAll(`ò`,`o`).replaceAll(`ù`,`u`)}function Ed(e){let t=e.trim().toLowerCase();if(!t)return e.trim();t.endsWith(`folk`)&&t.length>4&&(t=t.slice(0,-4));let n={children:`child`,men:`man`,women:`woman`,people:`person`,teeth:`tooth`,feet:`foot`,mice:`mouse`,geese:`goose`,leaves:`leaf`,lives:`life`,knives:`knife`,wolves:`wolf`,selves:`self`};return n[t]?n[t]:t.endsWith(`ies`)&&t.length>4?`${t.slice(0,-3)}y`:/(?:ches|shes|sses|xes|zes)$/.test(t)&&t.length>4||t.endsWith(`oes`)&&t.length>4?t.slice(0,-2):t.endsWith(`ves`)&&t.length>4?`${t.slice(0,-3)}f`:t.endsWith(`s`)&&!t.endsWith(`ss`)&&t.length>3?t.slice(0,-1):e.trim()}function Dd(e){switch(e){case`it`:return ed;case`fr`:return td;case`es`:return nd;default:return $u}}function Od(e,t){return Ao(t).hasArticles?Dd(t).test(e):!1}function kd(e,t){return Ao(t).hasArticles?e.replace(Dd(t),``).trim():e.trim()}function Ad(e,t){return e&&(t&&t!==`de`?e.charAt(0).toLowerCase()+e.slice(1):e.charAt(0).toUpperCase()+e.slice(1))}
21function jd(e,t){let n=rd.exec(e.trim());return n?Id(n[2])===Id(t):!1}function Md(e,t,n){let r=rd.exec(e.trim());if(!r)return t;let i=r[1].toLowerCase(),a=Ad(t,n);return i.endsWith(`'`)?`${i}${a}`:`${i} ${a}`}function Nd(e){let t=e.trim();return t&&(/^to\s+/i.test(t)?`to ${t.replace(/^to\s+/i,``)}`:`to ${t}`)}function Pd(e){return e.replace(/^to\s+/i,``).trim()}function Fd(e,t,n){return Id(kd(e,n))===Id(t)}function Id(e){return e.trim().toLowerCase()}var Ld=350;function Rd(e,t,n){Qa({language:t,term:e.term,english:e.english,pinyin:e.pinyin,source:`quick_add`},n)}function zd(e,t,n){let r=t.trim().toLowerCase();return e.find(e=>e.term.toLowerCase()===r)}function Bd({language:e,words:t,getToken:n}){let[r,i]=(0,_.useState)(``),[a,o]=(0,_.useState)(`to-en`),[s,c]=(0,_.useState)(`idle`),[l,u]=(0,_.useState)(null),[d,f]=(0,_.useState)(null),[p,m]=(0,_.useState)(null),h=(0,_.useRef)(0),g=(0,_.useRef)(e),v=(0,_.useRef)(t),y=(0,_.useRef)(a),b=(0,_.useRef)(n);(0,_.useEffect)(()=>{b.current=n},[n]);let x=(0,_.useRef)(null);(0,_.useEffect)(()=>{g.current=e},[e]),(0,_.useEffect)(()=>{v.current=t},[t]),(0,_.useEffect)(()=>{y.current=a},[a]);let S=(0,_.useCallback)(()=>{h.current+=1,i(``),c(`idle`),u(null),f(null),m(null),window.setTimeout(()=>x.current?.focus(),0)},[]),C=(0,_.useCallback)(e=>{e!==y.current&&(h.current+=1,o(e),c(`idle`),u(null),f(null),m(null),window.setTimeout(()=>x.current?.focus(),0))},[]),w=(0,_.useCallback)(()=>{l?.suggestion&&i(l.suggestion)},[l]),T=(0,_.useCallback)(async(e,t)=>{let n=e.trim();if(!n){c(`idle`),u(null),f(null),m(null);return}let r=++h.current,i=g.current,{term:a,english:o}=Yu(n);if(!a){c(`idle`),u(null);return}c(`translating`),f(null),m(null);try{if(t===`from-en`){let e=a,t=o;if(t){let n,a,o,s;try{let e=await ad(t,i);if(r!==h.current)return;n=e.category,a=e.pinyin,o=e.pos,s=e.lemma}catch{}let l=await sd(t,e,i,o,s,a);if(r!==h.current)return;let d={term:l.term,english:l.english,pinyin:l.pinyin??a,category:n,hardcoded:!0},f=zd(v.current,d.term,d.english);u(d),c(f?`duplicate`:`ready`),Rd(d,i,b.current);return}let n=await od(e,i);if(r!==h.current)return;if(n.suggestion){u({term:n.term,english:e,pinyin:n.pinyin,category:n.category,suggestion:n.suggestion,hardcoded:!1}),c(`typo`);return}if(n.untranslated){u({term:n.term,english:e,pinyin:n.pinyin,category:n.category,hardcoded:!1}),f(`No translation found — check spelling`),c(`error`);return}let s=await sd(n.term,e,i,n.pos,n.lemma,n.pinyin);if(r!==h.current)return;let l={term:s.term,english:s.english,pinyin:s.pinyin??n.pinyin,category:n.category,hardcoded:!1},d=zd(v.current,l.term,l.english);u(l),c(d?`duplicate`:`ready`),Rd(l,i,b.current);return}let e=a,n=o;if(n){let t,a,o,s;try{let n=await ad(e,i);if(r!==h.current)return;t=n.category,a=n.pinyin,o=n.pos,s=n.lemma}catch{}let l=await sd(e,n,i,o,s,a);if(r!==h.current)return;let d={term:l.term,english:l.english,pinyin:l.pinyin??a,category:t,hardcoded:!0},f=zd(v.current,d.term,d.english);u(d),c(f?`duplicate`:`ready`),Rd(d,i,b.current);return}let s=await ad(e,i);if(r!==h.current)return;if(s.suggestion){u({term:e,english:s.english,pinyin:s.pinyin,category:s.category,suggestion:s.suggestion,hardcoded:!1}),c(`typo`);return}if(s.untranslated){u({term:e,english:s.english,pinyin:s.pinyin,category:s.category,hardcoded:!1}),f(`No translation found — check spelling`),c(`error`);return}let l=await sd(e,s.english,i,s.pos,s.lemma,s.pinyin);if(r!==h.current)return;let d={term:l.term,english:l.english,pinyin:l.pinyin??s.pinyin,category:s.category,hardcoded:!1},p=zd(v.current,d.term,d.english);u(d),c(p?`duplicate`:`ready`),Rd(d,i,b.current)}catch(e){if(r!==h.current)return;u(null),f(e instanceof Error?e.message:`Translate failed`),c(`error`)}},[]);return(0,_.useEffect)(()=>{if(!r.trim()){h.current+=1,c(`idle`),u(null),f(null),m(null);return}let e=window.setTimeout(()=>{T(r,a)},Ld);return()=>window.clearTimeout(e)},[r,e,a,T]),{query:r,setQuery:i,direction:a,setDirection:C,status:s,result:l,error:d,savedMessage:p,inputRef:x,lookupNow:(0,_.useCallback)(()=>{T(r,a)},[T,r,a]),applySuggestion:w,save:(0,_.useCallback)(e=>{if(!l?.term||!l.english.trim()||s===`duplicate`)return!1;let{imported:t,total:n}=e([{term:l.term,english:l.english.trim(),category:l.category,pinyin:l.pinyin}],`append`);return t===0?(c(`duplicate`),m(`Already in your study list`),!1):(c(`saved`),m(`Saved · ${n} words total`),i(``),u(null),window.setTimeout(()=>
21{c(`idle`),m(null),x.current?.focus()},900),!0)},[l,s]),reset:S}}function Vd(e,t){let n=(e.trim()||t).trim()||t,r=[...n].length>6?[...n][0]??n:n,i=[...r].length>1?` `:``;return Array.from({length:8},()=>r).join(i)}function Hd({config:e,language:t,words:n,onSave:r,enterBurstKey:i=0,getToken:a}){let o=Bd({language:t,words:n,getToken:a}),s=Uo(),c=o.direction===`from-en`,[l,u]=(0,_.useState)(null),d=(0,_.useRef)(null),f=e=>{window.matchMedia(`(prefers-reduced-motion: reduce)`).matches||(d.current&&window.clearTimeout(d.current),u(null),requestAnimationFrame(()=>{u(e),d.current=window.setTimeout(()=>u(null),700)}))};(0,_.useEffect)(()=>(f(i%2==0?`burst`:`burst-alt`),()=>{d.current&&window.clearTimeout(d.current)}),[i]);let p=e=>{e!==o.direction&&(o.setDirection(e),f(e===`from-en`?`burst`:`burst-alt`))},m=e=>{e.preventDefault(),o.lookupNow()},h=c?`English`:e.shortName,g=c?o.result?.term:o.result?.english,v=c?o.result?.english:o.result?.term,y=$o(t),b=Qo(`${t}:${o.result?.term??``}:${o.result?.english??``}`),x=c&&y,S=!c&&y,C=Vd(o.result?.term?.trim()||(c?``:o.query.trim())||e.shortName,e.shortName);return(0,H.jsxs)(`section`,{className:[`quick-panel`,`quick-panel-bleed`,l===`burst`?`disc-burst`:``,l===`burst-alt`?`disc-burst-alt`:``].filter(Boolean).join(` `),children:[(0,H.jsxs)(`div`,{className:`mode-toggle quick-direction-toggle`,children:[(0,H.jsxs)(`button`,{type:`button`,className:c?``:`active`,onClick:()=>p(`to-en`),children:[e.shortName,` → EN`]}),(0,H.jsxs)(`button`,{type:`button`,className:c?`active`:``,onClick:()=>p(`from-en`),children:[`EN → `,e.shortName]})]}),(0,H.jsx)(`form`,{className:`quick-form`,onSubmit:m,children:(0,H.jsxs)(`div`,{className:`quick-input-wrap`,children:[(0,H.jsxs)(`p`,{className:`quick-input-meta`,children:[`Query · `,h]}),(0,H.jsx)(`input`,{ref:o.inputRef,type:`text`,className:[`quick-input`,!c&&y?`han han-sans`:``].filter(Boolean).join(` `),value:o.query,onChange:e=>o.setQuery(e.target.value),placeholder:c?`type an English word…`:`type ${e.shortName}…`,autoComplete:`off`,autoCapitalize:`off`,spellCheck:!1,autoFocus:!0}),o.status===`translating`&&(0,H.jsx)(`span`,{className:`quick-spinner`,"aria-label":`Looking up`})]})}),o.status===`saved`&&o.savedMessage&&(0,H.jsxs)(`div`,{className:`type-wall type-wall-saved`,role:`status`,children:[(0,H.jsx)(`p`,{className:[`type-wall-repeat`,y?Xo(b):``].filter(
21Boolean).join(` `),"aria-hidden":`true`,children:C}),(0,H.jsx)(`p`,{className:`type-wall-answer`,children:`Saved`}),(0,H.jsx)(`div`,{className:`type-wall-gloss`,children:(0,H.jsx)(`p`,{className:`type-wall-gloss-en`,children:o.savedMessage})})]}),(o.status===`ready`||o.status===`typo`||o.status===`duplicate`||o.status===`error`)&&o.result&&(0,H.jsxs)(`div`,{className:[`type-wall`,o.status===`typo`?`type-wall-typo`:``,o.status===`error`?`type-wall-error`:``,o.status===`duplicate`?`type-wall-duplicate`:``].filter(Boolean).join(` `),children:[(0,H.jsx)(`p`,{className:[`type-wall-repeat`,y?Xo(b):``].filter(Boolean).join(` `),"aria-hidden":`true`,children:C}),(0,H.jsxs)(`div`,{className:`type-wall-answer-row`,children:[(0,H.jsxs)(`p`,{className:[`type-wall-answer`,x?Xo(b):``].filter(Boolean).join(` `),children:[g||`—`,o.status===`ready`&&(0,H.jsx)(`span`,{className:`type-wall-dot`,"aria-hidden":`true`})]}),s&&(0,H.jsx)(es,{onClick:()=>Wo(o.result.term,t)})]}),c&&o.result.pinyin&&(0,H.jsx)(`p`,{className:`quick-pinyin`,children:(0,H.jsx)(K,{pinyin:o.result.pinyin})}),(0,H.jsxs)(`div`,{className:`type-wall-gloss`,children:[(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`p`,{className:`quick-result-label`,children:h}),(0,H.jsx)(`p`,{className:[`type-wall-gloss-en`,S?Xo(b):``].filter(
21Boolean).join(` `),children:v||`—`}),!c&&o.result.pinyin&&(0,H.jsx)(`p`,{className:`quick-pinyin`,children:(0,H.jsx)(K,{pinyin:o.result.pinyin})})]}),o.result.category&&o.result.category!==`other`&&(0,H.jsx)(`span`,{className:`word-tag quick-category`,children:o.result.category})]}),o.status===`typo`&&o.result.suggestion&&(0,H.jsxs)(`div`,{className:`quick-suggestion`,children:[(0,H.jsxs)(`span`,{children:[`Did you mean `,(0,H.jsx)(`strong`,{children:o.result.suggestion}),`?`]}),(0,H.jsx)(`button`,{type:`button`,className:`suggestion-button`,onClick:o.applySuggestion,children:`Use this`})]}),o.status===`error`&&o.error&&(0,H.jsx)(`p`,{className:`quick-error`,children:o.error}),o.status===`duplicate`&&(0,H.jsx)(`p`,{className:`quick-duplicate`,children:`Already in your study list`}),o.status===`ready`&&(0,H.jsxs)(`button`,{type:`button`,className:`type-wall-save`,onClick:()=>o.save(r),children:[(0,H.jsx)(`span`,{children:`Save to study`}),(0,H.jsx)(`span`,{className:`type-wall-save-chip`,children:`NEW`})]})]}),o.status===`error`&&!o.result&&o.error&&(0,H.jsx)(`div`,{className:`type-wall type-wall-error`,children:(0,H.jsx)(`p`,{className:`quick-error`,children:o.error})}),o.query.trim()&&o.status!==`idle`&&o.status!==`saved`&&(0,H.jsx)(`div`,{className:`quick-footer`,children:(0,H.jsx)(`button`,{type:`button`,className:`text-button quick-clear`,onClick:o.reset,children:`Clear`})})]})}function Ud({config:e,language:t,wordCount:n,dueCount:r,canStart:i,active:a,prompt:o,termText:s,expectedAnswer:c,remainingTiles:l,builtTiles:u,builtAnswer:d,feedback:f,session:p,sessionGoal:m,sessionCount:h,onSessionCountChange:g,speechSupported:_,onStart:v,onTapBank:y,onTapBuilt:b,onClear:x,onSubmit:S,onNext:C,onStop:w,onChangeMode:T}){return n===0?(0,H.jsxs)(`section`,{className:`panel empty-state`,children:[(0,H.jsx)(`h2`,{children:`No words yet`}),(0,H.jsx)(`p`,{children:`Capture or add vocabulary first, then come back to study.`})]}):a?(0,H.jsxs)(`section`,{className:`panel quiz-panel scramble-panel`,children:[(0,H.jsx)(ts,{label:`English → ${e.termLabel}`,done:p.reviewed,total:m,correct:p.correct,wrong:p.wrong}),(0,H.jsxs)(`div`,{className:`prompt-row`,children:[(0,H.jsx)(`div`,{className:`prompt-block`,children:(0,H.jsx)(`p`,{className:`prompt`,children:o})}),_&&s&&(0,H.jsx)(es,{onClick:()=>Wo(s,t),label:`Audio hint: hear ${s}`})]}),(0,H.jsx)(`div`,{className:`scramble-built`,"aria-label":`Your answer`,children:u.length===0?(0,H.jsx)(`span`,{className:`scramble-placeholder`,children:`Tap letters below`}):u.map(e=>(0,H.jsx)(`button`,{type:`button`,className:`scramble-tile built`,onClick:()=>b(e.id),disabled:!!f,children:e.char},e.id))}),f?(0,H.jsxs)(`div`,{className:`feedback ${f}`,children:[(0,H.jsx)(`p`,{className:`feedback-title`,children:f===`correct`?`Correct!`:`Not quite`}),f===`wrong`&&(0,H.jsxs)(`div`,{className:`answer-compare`,children:[(0,H.jsxs)(`div`,{className:`compare-row`,children:[(0,H.jsx)(`span`,{className:`compare-label`,children:`You built`}),(0,H.jsx)(`span`,{className:`compare-value yours`,children:d||`—`})]}),(0,H.jsxs)(`div`,{className:`compare-row`,children:[(0,H.jsx)(`span`,{className:`compare-label`,children:`Correct`}),(0,H.jsx)(`span`,{className:`compare-value correct`,children:c})]})]}),(0,H.jsx)(`button`,{type:`button`,className:`primary`,onClick:C,children:`Continue`})]}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`div`,{className:`scramble-bank`,role:`group`,"aria-label":`Letter bank`,children:l.map(e=>(0,H.jsx)(`button`,{type:`button`,className:`scramble-tile`,onClick:()=>y(e.id),children:e.char},e.id))}),(0,H.jsxs)(`div`,{className:`scramble-actions`,children:[(0,H.jsx)(`button`,{type:`button`,className:`secondary`,onClick:x,disabled:u.length===0,children:`Clear`}),(0,H.jsx)(`button`,{type:`button`,className:`primary`,onClick:S,disabled:!d,children:`Check`})]})]}),(0,H.jsx)(`button`,{type:`button`,className:`text-button session-leave`,onClick:w,children:`End session`})]}):(0,H.jsxs)(`section`,{className:`panel`,children:[(0,H.jsx)(`h2`,{children:`Scramble`}),(0,H.jsxs)(`div`,{className:`stats-grid`,children:[(0,H.jsxs)(`div`,{className:`stat-card`,children:[(0,H.jsx)(`span`,{className:`stat-value`,children:n}),(0,H.jsx)(`span`,{className:`stat-label`,children:`Total words`})]}),(0,H.jsxs)(`div`,{className:`stat-card accent`,children:[(0,H.jsx)(`span`,{className:`stat-value`,children:r}),(0,H.jsx)(`span`,{className:`stat-label`,children:`Due (2+ chars)`})]})]}),i?(0,H.jsxs)(`p`,{className:`hint`,children:[`See the English meaning, then tap letters to rebuild the `,e.termLabel,` word. Use the audio hint if you get stuck.`,r===0?` Nothing due — practicing from your full list.`:``]}):(0,H.jsx)(`p`,{className:`hint`,children:`Need a word with at least two different characters to scramble.`}),(0,H.jsx)(ns,{count:h,wordCount:n,onChange:g}),(0,H.jsx)(`button`,{type:`button`,className:`primary large`,onClick:v,disabled:!i,children:i&&r===0?`Practice anyway`:`Start scramble`}),(0,H.jsx)(`button`,{type:`button`,className:`secondary study-switch`,onClick:T,children:`Change mode`})]})}function Wd({config:e,decorative:t=!1,className:n,size:r=`md`}){return(0,H.jsx)(`span`,{className:[`lang-chip`,r===`sm`?`lang-chip-sm`:``,n].filter(
21Boolean).join(` `),style:{background:e.chipFill,color:e.chipText},"aria-hidden":t?!0:void 0,"aria-label":t?void 0:e.label,children:e.code})}function Gd({onSelect:e}){return Gs(),(0,H.jsxs)(`div`,{className:`app setup-app`,children:[(0,H.jsx)(`header`,{className:`app-header setup-header`,children:(0,H.jsx)(`div`,{className:`app-header-row`,children:(0,H.jsxs)(`div`,{className:`app-brand-lockup`,children:[(0,H.jsx)(`h1`,{children:fo}),(0,H.jsx)(`p`,{className:`app-header-meta`,children:`Pick a language`})]})})}),(0,H.jsx)(`main`,{className:`app-main`,children:(0,H.jsxs)(`section`,{className:`setup-panel`,children:[(0,H.jsx)(`ul`,{className:`setup-language-list`,children:Do.map(t=>{let n=Oo[t];return(0,H.jsx)(`li`,{children:(0,H.jsxs)(`button`,{type:`button`,className:`setup-language-button`,onClick:()=>e(t),children:[(0,H.jsx)(Wd,{config:n,decorative:!0}),(0,H.jsxs)(`span`,{className:`setup-language-copy`,children:[(0,H.jsx)(`span`,{className:`setup-language-name`,children:n.label}),(0,H.jsx)(`span`,{className:`setup-language-short`,children:n.shortName})]})]})},t)})}),(0,H.jsx)(`p`,{className:`hint setup-hint`,children:`After choosing, Add to Home Screen for a separate app icon.`})]})})]})}var Kd=4,qd=8,Jd=12;function Yd(e){let t=[...e];for(let e=t.length-1;e>0;--e){let n=Math.floor(Math.random()*(e+1));[t[e],t[n]]=[t[n],t[e]]}return t}function Xd(e){return{term:e.term,english:e.english,pinyin:e.pinyin}}function Zd(e){return e.trim().toLowerCase()}function Qd(e,t){let n=Math.min(t,e.length),r=Yd(ou(e)),i=new Set(r.map(e=>e.id)),a=Yd(e.filter(e=>!i.has(e.id)));return[...r,...a].slice(0,n).map(Xd)}var $d={correct:0,wrong:0,reviewed:0};function ef({language:e,words:t,onAddPairs:n,onUpdateWord:r,getToken:i}){let a=Math.min(Jd,Math.max(t.length,Kd)),[o,s]=(0,_.useState)(()=>Math.min(qd,Math.max(Kd,t.length||Kd))),[c,l]=(0,_.useState)(`setup`),[u,d]=(0,_.useState)(null),[f,p]=(0,_.useState)(null),[m,h]=(0,_.useState)(null),[g,v]=(0,_.useState)(null),[y,b]=(0,_.useState)(!1),[x,S]=(0,_.useState)(null),[C,w]=(0,_.useState)(0),[T,E]=(0,_.useState)(null),[D,O]=(0,_.useState)(null),[k,A]=(0,_.useState)($d),j=(0,_.useRef)(t),M=(0,_.useRef)(0);(0,_.useEffect)(()=>{j.current=t},[t]),(0,_.useEffect)(()=>{s(e=>Math.min(Math.max(e,Kd),Math.min(Jd,Math.max(t.length,Kd))))},[t.length]);let N=t.length>=Kd,P=(0,_.useMemo)(()=>u?.quiz&&u.quiz.length>0?u.quiz:[],[u]),F=P.length>0,I=c===`quiz`?P[C]??null:null,L=(0,_.useCallback)(e=>{s(n=>{let r=Math.min(Jd,Math.max(t.length,Kd));return Math.min(r,Math.max(Kd,n+e))})},[t.length]),ee=(0,_.useCallback)(()=>{w(0),E(null),O(null),A($d)},[]),te=(0,_.useCallback)((e,t)=>{let n=Zd(e),r=e=>e.find(e=>Zd(e.term)===n)||[...e].sort((e,t)=>t.term.length-e.term.length).find(e=>{let t=Zd(e.term);return t.length>=3&&n.startsWith(t)}),i=r(t),a=r(j.current)??j.current.find(e=>Zd(e.term)===n);return i||a?{term:i?.term??a.term,english:i?.english??a.english,pinyin:i?.pinyin??a?.pinyin,category:a?.category,inList:!!a,isTargetVocab:!!i,status:`ready`}:null},[]),ne=(0,_.useCallback)(t=>{M.current+=1;let n=M.current;if(S(null),!t||!u){h(null),v(null);return}let r=t.trim();if(!r){h(null),v(null);return}h(r);let a=te(r,u.usedWords);if(a&&a.status===`ready`){v(a),Qa({language:e,term:a.term,english:a.english,pinyin:a.pinyin,source:`story`},i);return}v({term:r,status:`loading`}),(async()=>{try{let t=await ad(r,e);if(M.current!==n)return;if(t.untranslated&&!t.english){v({term:r,status:`error`,error:`No translation found`});return}let a=j.current.some(e=>Zd(e.term)===Zd(r));v({term:t.lemma?.trim()||r,english:t.english,pinyin:t.pinyin,category:t.category,inList:a,isTargetVocab:!1,status:`ready`}),Qa({language:e,term:t.lemma?.trim()||r,english:t.english,pinyin:t.pinyin,source:`story`},i)}catch(e){if(M.current!==n)return;v({term:r,status:`error`,error:e instanceof Error?e.message:`Lookup failed`})}})()},[e,te,u,i]),re=(0,_.useCallback)(async()=>{if(!N)return;l(`loading`),p(null),h(null),v(null),S(null),b(!1),ee();let n=Qd(t,o);try{let t=await Ga({language:e,words:n,wordCount:n.length});d(t),l(`ready`)}catch(e){let t=e instanceof U||e instanceof Error?e.message:`Could not generate story`;p(t),d(null),l(`error`)}},[N,e,t,o,ee]),R=(0,_.useCallback)(()=>{M.current+=1,l(`setup`),d(null),p(null),h(null),v(null),S(null),b(!1),ee()},[ee]),z=(0,_.useCallback)(()=>{u?.quiz?.length&&(h(null),v(null),b(!1),ee(),l(`quiz`))},[u,ee]),ie=(0,_.useCallback)(e=>{if(c!==`quiz`||D||!I)return;let t=e===I.correctIndex,n=j.current.find(e=>Zd(e.term)===Zd(I.term));n&&r(hu(n,t,`contextComprehension`)),E(e),O(t?`correct`:`wrong`),A(e=>({correct:e.correct+ +!!t,wrong:e.wrong+ +!t,reviewed:e.reviewed+1}))},[c,D,I,r]),ae=(0,_.useCallback)(()=>
21{if(!D)return;let e=C+1;if(e>=P.length){l(`quizDone`),E(null),O(null);return}w(e),E(null),O(null)},[D,C,P.length]),oe=(0,_.useCallback)(()=>{if(!g||g.status!==`ready`||g.inList)return;let{imported:e}=n([{term:g.term,english:g.english,pinyin:g.pinyin,category:g.category,source:`story`}]);e>0?(v({...g,inList:!0}),S(`Added to your list`)):(v({...g,inList:!0}),S(`Already in your list`))},[n,g]),se=(0,_.useMemo)(()=>u?.englishParagraphs?.length?u.englishParagraphs.some(e=>e.trim()):!1,[u]),ce=c===`quizDone`||!F&&c===`ready`;return{phase:c,story:u,error:f,targetCount:o,maxTarget:a,minTarget:Kd,canGenerate:N,selectedTerm:m,selection:g,selectTerm:ne,showEnglish:y,setShowEnglish:(0,_.useCallback)(e=>{e&&!ce||b(e)},[ce]),hasEnglish:se,englishUnlocked:ce,saveMessage:x,adjustTarget:L,generate:re,regenerate:re,backToSetup:R,addSelectedWord:oe,hasQuiz:F,quizItems:P,quizIndex:C,currentQuizItem:I,quizSelected:T,quizFeedback:D,quizSession:k,startQuiz:z,selectQuizOption:ie,nextQuizQuestion:ae}}function tf({config:e,language:t,words:n,onAddPairs:r,onUpdateWord:i,onChangeMode:a,getToken:o}){let s=ef({language:t,words:n,onAddPairs:r,onUpdateWord:i,getToken:o}),[c,l]=(0,_.useState)(!1),u=async()=>{l(!0);try{await s.generate()}finally{l(!1)}};if(n.length===0)return(0,H.jsxs)(`section`,{className:`panel empty-state`,children:[(0,H.jsx)(`h2`,{children:`No words yet`}),(0,H.jsx)(`p`,{children:`Add vocabulary first, then come back for a practice story.`})]});if(s.phase===`setup`||s.phase===`error`){let t=s.canGenerate;return(0,H.jsxs)(`section`,{className:`panel`,children:[(0,H.jsx)(`h2`,{children:`Story`}),(0,H.jsxs)(`div`,{className:`stats-grid`,children:[(0,H.jsxs)(`div`,{className:`stat-card`,children:[(0,H.jsx)(`span`,{className:`stat-value`,children:n.length}),(0,H.jsx)(`span`,{className:`stat-label`,children:`Total words`})]}),(0,H.jsxs)(`div`,{className:`stat-card accent`,children:[(0,H.jsx)(`span`,{className:`stat-value`,children:s.targetCount}),(0,H.jsx)(`span`,{className:`stat-label`,children:`In this story`})]})]}),(0,H.jsxs)(`div`,{className:`match-target`,children:[(0,H.jsx)(`span`,{className:`match-target-label`,children:`Words to include`}),(0,H.jsxs)(`div`,{className:`match-target-stepper`,children:[(0,H.jsx)(`button`,{type:`button`,className:`stepper-button`,onClick:()=>s.adjustTarget(-1),disabled:!t||s.targetCount<=s.minTarget,"aria-label":`Fewer words`,children:`−`}),(0,H.jsx)(`span`,{className:`match-target-value`,children:s.targetCount}),(0,H.jsx)(`button`,{type:`button`,className:`stepper-button`,onClick:()=>s.adjustTarget(1),disabled:!t||s.targetCount>=s.maxTarget,"aria-label":`More words`,children:`+`})]}),(0,H.jsx)(`p`,{className:`match-target-hint`,children:`Prefers due words, then fills from the rest of your list.`})]}),t?(0,H.jsxs)(`p`,{className:`hint`,children:[`A short `,e.termLabel,` story using your vocab. Tap any word for English; add new ones to your list. Then take a comprehension quiz — English stays locked until you finish.`]}):(0,H.jsxs)(`p`,{className:`hint`,children:[`Need at least `,s.minTarget,` words to generate a story.`]}),s.phase===`error`&&s.error&&(0,H.jsx)(`p`,{className:`story-error`,children:s.error}),(0,H.jsx)(`button`,{type:`button`,className:`primary large`,onClick:()=>{u()},disabled:!t||c,children:c?`Generating…`:`Generate story`}),(0,H.jsx)(`button`,{type:`button`,className:`secondary study-switch`,onClick:a,children:`Change mode`})]})}if(s.phase===`loading`)return(0,H.jsxs)(`section`,{className:`panel empty-state`,children:[(0,H.jsx)(`h2`,{children:`Writing…`}),(0,H.jsxs)(`p`,{className:`hint`,children:[`Crafting a short `,e.termLabel,` story from your words.`]}),(0,H.jsx)(`div`,{className:`story-loading-spinner`,"aria-hidden":`true`})]});if(!s.story)return null;let d=s.selection,f=s.phase===`quiz`||s.phase===`quizDone`,p=s.currentQuizItem;return(0,H.jsxs)(`section`,{className:`panel story-panel`,children:[(0,H.jsxs)(`div`,{className:`story-header`,children:[(0,H.jsx)(`h2`,{className:`story-title`,children:s.story.title}),!f&&(0,H.jsx)(es,{onClick:()=>Wo(s.story.paragraphs.join(` `),t),label:`Hear story`})]}),(0,H.jsx)(`div`,{className:`story-body`,children:s.story.paragraphs.map((e,t)=>
21(0,H.jsx)(`p`,{className:`story-paragraph`,children:(0,H.jsx)(nf,{text:e,usedWords:s.story.usedWords,selectedTerm:f?null:s.selectedTerm,onSelect:f?()=>void 0:s.selectTerm,interactive:!f})},t))}),s.phase===`ready`&&(0,H.jsxs)(H.Fragment,{children:[s.hasEnglish&&(0,H.jsx)(`div`,{className:`story-english-controls`,children:(0,H.jsx)(`button`,{type:`button`,className:[`secondary`,`story-english-toggle`,s.showEnglish?`active`:``].filter(Boolean).join(` `),onClick:()=>s.setShowEnglish(!s.showEnglish),disabled:!s.englishUnlocked,"aria-pressed":s.showEnglish,title:s.englishUnlocked?void 0:`Finish the comprehension quiz to unlock English`,children:s.showEnglish?`Hide English`:s.englishUnlocked?`Show English`:`English locked`})}),s.showEnglish&&s.hasEnglish&&(0,H.jsxs)(`div`,{className:`story-english`,lang:`en`,children:[s.story.englishTitle&&(0,H.jsx)(`h3`,{className:`story-english-title`,children:s.story.englishTitle}),s.story.englishParagraphs.map((e,t)=>(0,H.jsx)(`p`,{className:`story-english-paragraph`,children:e},t))]}),d?.status===`loading`&&(0,H.jsx)(`div`,{className:`story-gloss`,role:`status`,children:(0,H.jsxs)(`p`,{className:`hint story-gloss-hint`,children:[`Looking up “`,d.term,`”…`]})}),d?.status===`error`&&(0,H.jsx)(`div`,{className:`story-gloss`,role:`status`,children:(0,H.jsx)(`p`,{className:`story-error`,children:d.error})}),d?.status===`ready`&&(0,H.jsxs)(`div`,{className:`story-gloss`,role:`status`,children:[(0,H.jsxs)(`div`,{className:`story-gloss-main`,children:[(0,H.jsx)(`span`,{className:`story-gloss-term`,children:d.term}),d.pinyin&&(0,H.jsx)(`span`,{className:`story-gloss-pinyin`,children:(0,H.jsx)(K,{pinyin:d.pinyin})}),(0,H.jsx)(`span`,{className:`story-gloss-english`,children:d.english}),d.inList?(0,H.jsx)(`span`,{className:`story-gloss-meta`,children:`In your list`}):(0,H.jsx)(`span`,{className:`story-gloss-meta`,children:`Not in your list yet`}),s.saveMessage&&(0,H.jsx)(`span`,{className:`story-gloss-saved`,children:s.saveMessage})]}),(0,H.jsxs)(`div`,{className:`story-gloss-actions`,children:[(0,H.jsx)(es,{onClick:()=>Wo(d.term,t),label:`Hear ${d.term}`}),!d.inList&&(0,H.jsx)(`button`,{type:`button`,className:`primary story-add-button`,onClick:s.addSelectedWord,children:`Add`})]})]}),!d&&(0,H.jsx)(`p`,{className:`hint story-gloss-hint`,children:`Tap any word for English. Target vocab is highlighted — add unknown words to your list.`}),s.hasQuiz?(0,H.jsx)(`button`,{type:`button`,className:`primary large`,onClick:s.startQuiz,children:`Check understanding`}):(0,H.jsx)(`p`,{className:`hint`,children:`No quiz returned for this story — try regenerating.`}),(0,H.jsx)(`button`,{type:`button`,className:`secondary`,onClick:()=>{u()},disabled:c,children:c?`Generating…`:`Regenerate`}),(0,H.jsx)(`button`,{type:`button`,className:`secondary study-switch`,onClick:s.backToSetup,children:`Back to setup`}),(0,H.jsx)(`button`,{type:`button`,className:`text-button`,onClick:a,children:`Change mode`})]}),s.phase===`quiz`&&p&&(0,H.jsxs)(`div`,{className:`story-quiz`,children:[(0,H.jsxs)(`p`,{className:`hint story-quiz-progress`,children:[`Question `,s.quizIndex+1,` of `,s.quizItems.length,` ·`,` `,s.quizSession.correct,` correct`]}),(0,H.jsx)(`p`,{className:`story-quiz-prompt`,children:p.prompt}),(0,H.jsx)(`div`,{className:`choice-options`,children:p.options.map((e,t)=>{let n=`choice-option`;return s.quizFeedback&&(t===p.correctIndex?n+=` correct`:t===s.quizSelected?n+=` wrong`:n+=` static`),(0,H.jsx)(`button`,{type:`button`,className:n,disabled:!!s.quizFeedback,onClick:()=>s.selectQuizOption(t),children:e},`${p.term}-${t}`)})}),s.quizFeedback&&(0,H.jsx)(`button`,{type:`button`,className:`primary`,onClick:s.nextQuizQuestion,children:s.quizIndex+1>=s.quizItems.length?`See results`:`Next`})]}),s.phase===`quizDone`&&(0,H.jsxs)(`div`,{className:`story-quiz-summary`,children:[(0,H.jsx)(`h3`,{children:`Quiz complete`}),(0,H.jsxs)(`div`,{className:`stats-grid`,children:[(0,H.jsxs)(`div`,{className:`stat-card accent`,children:[(0,H.jsx)(`span`,{className:`stat-value`,children:s.quizSession.correct}),(0,H.jsx)(`span`,{className:`stat-label`,children:`Correct`})]}),(0,H.jsxs)(`div`,{className:`stat-card`,children:[(0,H.jsx)(`span`,{className:`stat-value`,children:s.quizSession.wrong}),(0,H.jsx)(`span`,{className:`stat-label`,children:`Wrong`})]})]}),(0,H.jsx)(`p`,{className:`hint`,children:`Context scores updated for words on your list. English translation is unlocked.`}),s.hasEnglish&&(0,H.jsx)(`div`,{className:`story-english-controls`,children:(0,H.jsx)(`button`,{type:`button`,className:[`secondary`,`story-english-toggle`,s.showEnglish?`active`:``].filter(
21Boolean).join(` `),onClick:()=>s.setShowEnglish(!s.showEnglish),"aria-pressed":s.showEnglish,children:s.showEnglish?`Hide English`:`Show English`})}),s.showEnglish&&s.hasEnglish&&(0,H.jsxs)(`div`,{className:`story-english`,lang:`en`,children:[s.story.englishTitle&&(0,H.jsx)(`h3`,{className:`story-english-title`,children:s.story.englishTitle}),s.story.englishParagraphs.map((e,t)=>(0,H.jsx)(`p`,{className:`story-english-paragraph`,children:e},t))]}),(0,H.jsx)(`button`,{type:`button`,className:`primary`,onClick:s.backToSetup,children:`New story`}),(0,H.jsx)(`button`,{type:`button`,className:`secondary`,onClick:()=>{u()},disabled:c,children:c?`Generating…`:`Regenerate`}),(0,H.jsx)(`button`,{type:`button`,className:`text-button`,onClick:a,children:`Change mode`})]})]})}function nf({text:e,usedWords:t,selectedTerm:n,onSelect:r,interactive:i=!0}){return(0,H.jsx)(H.Fragment,{children:(0,_.useMemo)(()=>rf(e,t),[e,t]).map((e,t)=>{if(e.kind===`space`)return(0,H.jsx)(`span`,{children:e.text},`s-${t}`);let a=n!=null&&n.toLowerCase()===e.term.toLowerCase();return i?(0,H.jsx)(`button`,{type:`button`,className:[e.kind===`vocab`?`story-vocab`:`story-token`,a?`selected`:``].filter(Boolean).join(` `),onClick:()=>r(a?null:e.term),children:e.text},`${e.term}-${t}`):(0,H.jsx)(`span`,{className:e.kind===`vocab`?`story-vocab static`:void 0,children:e.text},`${e.term}-${t}`)})})}function rf(e,t){let n=af(e,t),r=[],i=0;for(let t of n)t.start>i&&r.push(...sf(e.slice(i,t.start))),r.push({kind:`vocab`,text:e.slice(t.start,t.end),term:t.term}),i=t.end;return i<e.length&&r.push(...sf(e.slice(i))),r.length>0?r:[{kind:`space`,text:e}]}function af(e,t){if(t.length===0)return[];let n=[...t].sort((e,t)=>t.term.length-e.term.length),r=[];for(let t of n){if(!/\s/.test(t.term))continue;let n=new RegExp(cf(t.term),`gi`),i;for(;(i=n.exec(e))!==null;){let e=i.index,n=e+i[0].length;r.some(t=>e<t.end&&n>t.start)||r.push({start:e,end:n,term:t.term})}}let i=/[\p{L}\p{M}\p{N}]+/gu,a;for(;(a=i.exec(e))!==null;){let e=a.index,t=e+a[0].length;if(r.some(n=>e<n.end&&t>n.start))continue;let i=a[0].toLowerCase(),o=n.find(e=>{if(/\s/.test(e.term))return!1;let t=e.term.toLowerCase();if(!t||!i.startsWith(t))return!1;let n=i.slice(t.length);return n.length===0||of(n,t.length)});o&&r.push({start:e,end:t,term:o.term})}return r.sort((e,t)=>e.start-t.start)}function of(e,t){return!e||e.length>8?!1:!!(/^(e|en|er|es|em|et|te|ten|test|tet|tem|ter|tes|t|st|n|s|end|ende|endem|enden|ender|endes|ung|ungen|chen|lein|heit|keit|isch|ische|ischen|ischer|isches|ig|ige|igen|iger|iges|igem|lich|liche|lichen|licher|liches|bar|bare|baren|los|lose|losen|iert|ierte|ierten|ando|endo|ato|ata|ati|ito|ita|iti|mente|ment|ments|tion|tions|zione|zioni|ción|ciones|dad|dades|ando|iendo|ado|ada|idos|idas|o|a|i|os|as|és|ées|és?)$/i.test(e)||t>=4&&e.length<=3&&/^[\p{L}]+$/u.test(e))}function sf(e){if(!e)return[];if(typeof Intl<`u`&&`Segmenter`in Intl)try{let t=new Intl.Segmenter(void 0,{granularity:`word`}),n=[];for(let{segment:r,isWordLike:i}of t.segment(e))i?n.push({kind:`word`,text:r,term:r}):n.push({kind:`space`,text:r});return n}catch{}let t=[],n=/[\p{L}\p{M}\p{N}]+|[^\p{L}\p{M}\p{N}]+/gu,r;for(;(r=n.exec(e))!==null;){let e=r[0];/^[\p{L}\p{M}\p{N}]+$/u.test(e)?t.push({kind:`word`,text:e,term:e}):t.push({kind:`space`,text:e})}return t}function cf(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}var lf={choice:`hub-sw-red`,match:`hub-sw-blue`,quiz:`hub-sw-green`,listen:`hub-sw-yellow`,scramble:`hub-sw-orange`,mixed:`hub-sw-magenta`,story:`hub-sw-cyan`,tones:`hub-sw-yellow`};function uf({config:e,wordCount:t,dueCount:n,modes:r,onSelectMode:i}){return t===0?(0,H.jsxs)(`section`,{className:`empty-state`,children:[(0,H.jsx)(`h2`,{children:`No words yet`}),(0,H.jsx)(`p`,{children:`Capture or add vocabulary first, then come back to study.`})]}):(0,H.jsxs)(`section`,{className:`study-hub`,children:[(0,H.jsxs)(`div`,{className:`hub-stats`,children:[(0,H.jsxs)(`div`,{className:`hub-stat hub-stat-total`,children:[(0,H.jsx)(`span`,{className:`hub-stat-n`,children:t}),(0,H.jsx)(`span`,{className:`hub-stat-label`,children:`Words`})]}),(0,H.jsxs)(`div`,{className:`hub-stat`,children:[(0,H.jsx)(`span`,{className:`hub-stat-n`,children:n}),(0,H.jsx)(`span`,{className:`hub-stat-label`,children:`Due`})]})]}),(0,H.jsx)(`p`,{className:`hub-meta`,children:n===0?`Practice anytime · due preferred when available`:`${n} due · ${e.termLabel} SRS`}),(0,H.jsx)(`div`,{className:`hub-modes`,children:r.map(e=>(0,H.jsxs)(`button`,{type:`button`,className:[`hub-mode`,e.ready?``:`disabled`].filter(
21Boolean).join(` `),onClick:()=>i(e.id),disabled:!e.ready,children:[(0,H.jsx)(`span`,{className:[`hub-sw`,lf[e.id]].join(` `),"aria-hidden":`true`}),(0,H.jsxs)(`span`,{className:`hub-mode-copy`,children:[(0,H.jsx)(`span`,{className:`hub-mode-title`,children:e.title}),(0,H.jsx)(`span`,{className:`hub-mode-blurb`,children:e.hint??e.blurb})]}),(0,H.jsx)(`span`,{className:`hub-mode-due`,children:e.ready?`Go`:`—`})]},e.id))})]})}function df({language:e,wordCount:t,pinyinWordCount:n,dueCount:r,canStart:i,active:a,prompt:o,termText:s,options:c,correctOption:l,selected:u,feedback:d,session:f,sessionGoal:p,sessionCount:m,onSessionCountChange:h,speechSupported:g,onStart:_,onSelectOption:v,onNext:y,onStop:b,onChangeMode:x}){let S=$o(e);if(t===0)return(0,H.jsxs)(`section`,{className:`panel empty-state`,children:[(0,H.jsx)(`h2`,{children:`No words yet`}),(0,H.jsx)(`p`,{children:`Capture or add vocabulary first, then come back to study.`})]});if(!a)return(0,H.jsxs)(`section`,{className:`panel`,children:[(0,H.jsx)(`h2`,{children:`Tones`}),(0,H.jsxs)(`div`,{className:`stats-grid`,children:[(0,H.jsxs)(`div`,{className:`stat-card`,children:[(0,H.jsx)(`span`,{className:`stat-value`,children:n}),(0,H.jsx)(`span`,{className:`stat-label`,children:`With pinyin`})]}),(0,H.jsxs)(`div`,{className:`stat-card accent`,children:[(0,H.jsx)(`span`,{className:`stat-value`,children:r}),(0,H.jsx)(`span`,{className:`stat-label`,children:`Due now`})]})]}),i?(0,H.jsx)(`p`,{className:`hint`,children:`See the characters, pick the matching pinyin tones. Same letters, different tone patterns.`}):(0,H.jsx)(`p`,{className:`hint`,children:`Add words that include pinyin to practice tones.`}),(0,H.jsx)(ns,{count:m,wordCount:n,onChange:h}),(0,H.jsx)(`button`,{type:`button`,className:`primary large`,onClick:_,disabled:!i,children:r===0&&i?`Practice anyway`:`Start tones`}),(0,H.jsx)(`button`,{type:`button`,className:`secondary study-switch`,onClick:x,children:`Change mode`})]});let C=g&&!!s,w=Jo(`${e}:tones:${o}`);return(0,H.jsxs)(`section`,{className:`panel quiz-panel choice-panel`,children:[(0,H.jsx)(ts,{label:`Tones`,done:f.reviewed,total:p,correct:f.correct,wrong:f.wrong}),(0,H.jsxs)(`div`,{className:`prompt-zone corner-burst`,children:[(0,H.jsx)(`div`,{className:`prompt-block`,children:(0,H.jsx)(`p`,{className:[`prompt`,`prompt-stack`,S?Xo(w):``].filter(
21Boolean).join(` `),children:o})}),C&&(0,H.jsx)(es,{onClick:()=>Wo(s,e)}),(0,H.jsx)(`span`,{className:`prompt-corner-dot`,"aria-hidden":`true`})]},o),d?(0,H.jsxs)(`div`,{className:`feedback ${d}`,children:[(0,H.jsx)(`p`,{className:`feedback-title`,children:d===`correct`?`Correct!`:`Not quite`}),d===`wrong`&&(0,H.jsxs)(`div`,{className:`answer-compare`,children:[(0,H.jsxs)(`div`,{className:`compare-row`,children:[(0,H.jsx)(`span`,{className:`compare-label`,children:`You picked`}),(0,H.jsx)(`span`,{className:`compare-value yours`,children:(0,H.jsx)(K,{pinyin:u??``})})]}),(0,H.jsxs)(`div`,{className:`compare-row`,children:[(0,H.jsx)(`span`,{className:`compare-label`,children:`Correct`}),(0,H.jsx)(`span`,{className:`compare-value correct`,children:(0,H.jsx)(K,{pinyin:l})})]})]}),(0,H.jsx)(`div`,{className:`choice-options choice-options-revealed`,"aria-hidden":`true`,children:c.map((e,t)=>{let n=e===l,r=e===u;return(0,H.jsxs)(`div`,{className:[`choice-option`,`static`,`swatch-${t%4}`,n?`correct`:``,r&&!n?`wrong`:``].filter(Boolean).join(` `),children:[(0,H.jsx)(`span`,{className:`choice-letter`,children:String.fromCharCode(65+t)}),(0,H.jsx)(`span`,{className:`choice-option-text`,children:(0,H.jsx)(K,{pinyin:e})})]},e)})}),(0,H.jsx)(`button`,{type:`button`,className:`primary`,onClick:y,children:`Continue`})]}):(0,H.jsxs)(H.Fragment,{children:[g&&s?(0,H.jsx)(`button`,{type:`button`,className:`text-button listen-pause`,onClick:()=>Wo(s,e),children:`Listen`}):null,(0,H.jsx)(`div`,{className:`choice-options`,role:`group`,"aria-label":`Tone choices`,children:c.map((e,t)=>(0,H.jsxs)(`button`,{type:`button`,className:`choice-option swatch-${t%4}`,onClick:()=>v(e),children:[(0,H.jsx)(`span`,{className:`choice-letter`,children:String.fromCharCode(65+t)}),(0,H.jsx)(`span`,{className:`choice-option-text`,children:(0,H.jsx)(K,{pinyin:e})})]},e))})]}),(0,H.jsx)(`button`,{type:`button`,className:`text-button session-leave`,onClick:b,children:`End session`})]})}var ff=(0,_.createContext)({syncEnabled:!0,syncUserKey:`local`,getToken:async()=>null});function pf({children:e}){let{isSignedIn:t,userId:n,getToken:r}=_i();(0,_.useEffect)(()=>{t&&Ia()&&ao({marketingEmail:!0},async()=>await r()??null).then(()=>Ra()).catch(()=>{})},[t,r]);let i=(0,_.useMemo)(()=>({syncEnabled:!!t,syncUserKey:n??null,getToken:async()=>await r()??null}),[t,n,r]);return(0,H.jsx)(ff.Provider,{value:i,children:e})}function mf({children:e}){return Va()?(0,H.jsx)(pf,{children:e}):(0,H.jsx)(ff.Provider,{value:{syncEnabled:!1,syncUserKey:null,getToken:async()=>null},children:e})}function hf(){return(0,_.useContext)(ff)}function gf({language:e,onSelect:t}){let[n,r]=(0,_.useState)(!1),i=(0,_.useRef)(null),a=Ao(e);return(0,_.useEffect)(()=>{if(!n)return;let e=e=>{i.current?.contains(e.target)||r(!1)},t=e=>{e.key===`Escape`&&r(!1)};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[n]),(0,H.jsxs)(`div`,{className:`lang-switcher`,ref:i,children:[(0,H.jsx)(`button`,{type:`button`,className:`lang-switcher-trigger`,"aria-label":`Language: ${a.label}. Change language`,"aria-expanded":n,"aria-haspopup":`listbox`,title:a.label,onClick:()=>r(e=>!e),children:(0,H.jsx)(Wd,{config:a,size:`sm`,decorative:!0})}),n&&(0,H.jsx)(`div`,{className:`lang-switcher-menu`,role:`listbox`,"aria-label":`Learning language`,children:Do.map(n=>{let i=Ao(n),a=n===e;return(0,H.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":a,className:[`lang-switcher-option`,a?`selected`:``].filter(Boolean).join(` `),onClick:()=>{t(n),r(!1)},children:[(0,H.jsx)(Wd,{config:i,size:`sm`,decorative:!0}),(0,H.jsx)(`span`,{className:`lang-switcher-option-label`,children:i.label})]},n)})})]})}var _f=new Set(Xl);function vf(e){if(!e||typeof e!=`object`||Array.isArray(e))return{};let t={};for(let[n,r]of Object.entries(e)){if(!_f.has(n)||!r||typeof r!=`object`)continue;let e=r;typeof e.score!=`number`||typeof e.attempts!=`number`||typeof e.correct==`number`&&(t[n]={score:Math.min(1,Math.max(0,e.score)),attempts:Math.max(0,Math.floor(e.attempts)),correct:Math.max(0,Math.floor(e.correct)),lastPracticedAt:typeof e.lastPracticedAt==`number`?e.lastPracticedAt:void 0})}return t}var yf=new Set([`app`,`extension`,`story`,`import`,`hsk`]);function bf(e){if(typeof e==`string`)return yf.has(e)?e:void 0}function xf(e){switch(e){case`extension`:return`Chrome`;case`story`:return`Story`;case`import`:return`Import`;case`hsk`:return`HSK`;case`app`:return`App`;default:return`App`}}function Sf(e){try{return new URL(e).hostname.replace(/^www\./,``)}catch{return`link`}}function Cf(e){return mu({id:e.id,term:e.term,english:e.english,pinyin:e.pinyin,category:e.category,source:bf(e.source)??`app`,sourceUrl:e.sourceUrl,easeFactor:e.easeFactor,interval:e.interval,repetitions:e.repetitions,nextReview:e.nextReview,correctCount:e.correctCount,wrongCount:e.wrongCount,addedAt:e.addedAt,skills:vf(e.skills)})}function wf(e){return{id:e.id,term:e.term,english:e.english,pinyin:e.pinyin,category:e.category,source:e.source??`app`,sourceUrl:e.sourceUrl,easeFactor:e.easeFactor,interval:e.interval,repetitions:e.repetitions,nextReview:e.nextReview,correctCount:e.correctCount,wrongCount:e.wrongCount,addedAt:e.addedAt,skills:e.skills??{}}}var Tf={de:`der Hund
22die Katze
23laufen | to run
24Überraschung`,it:`il cane
25la gatta
26correre | to run
27sorpresa`,fr:`le chien
28la chatte
29courir | to run
30surprise`,es:`el perro
31la gata
32correr | to run
33sorpresa`,ja:`犬
34猫
35走る | to run
36驚き`,"zh-Hans":`狗
37猫
38跑步 | to run
39惊喜`};function Ef({config:e,items:t,translating:n,progress:r,onAdd:i,onUpdateEnglish:a,onUpdateTerm:o,onUpdatePinyin:s,onUpdateCategory:c,onApplySuggestion:l,onRemove:u,onClear:d,onTranslate:f,onStandardize:p,onSave:m,onSaved:h}){let[g,v]=(0,_.useState)(``),[y,b]=(0,_.useState)(new Set),[x,S]=(0,_.useState)(null),C=(0,_.useMemo)(()=>t.filter(e=>e.status===`typo`),[t]),w=(0,_.useMemo)(()=>t.filter(e=>e.status!==`typo`),[t]),T=(0,_.useMemo)(()=>t.filter(e=>e.status===`pending`||e.status===`error`||e.status===`typo`).length,[t]),E=(0,_.useMemo)(()=>t.filter(e=>e.status===`translated`&&e.english.trim()),[t]),D=(0,_.useMemo)(()=>E.filter(e=>y.has(e.id)),[E,y]),O=e=>{b(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})};return(0,H.jsxs)(`section`,{className:`panel`,children:[(0,H.jsx)(`h2`,{children:`Bulk add`}),(0,H.jsxs)(`p`,{className:`hint`,children:[`One `,e.termLabel,` word per line — translates automatically. Add`,` `,(0,H.jsx)(`code`,{children:`| english`}),` to set the translation yourself. `,e.standardizeHint]}),(0,H.jsx)(`textarea`,{className:`import-textarea capture-textarea`,value:g,onChange:e=>v(e.target.value),placeholder:Tf[e.id]??``,rows:6,disabled:n}),(0,H.jsx)(`button`,{type:`button`,className:`primary`,onClick:()=>{let t=i(g);S(t>0?`Added ${t} word${t===1?``:`s`}. Bare words translate automatically; pairs with | keep your English.`:`No new ${e.termLabel} words found (empty or already in list).`),t>0&&v(``)},disabled:!g.trim()||n,children:n?`Translating…`:`Add to list`}),t.length>0&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`div`,{className:`capture-toolbar`,children:[(0,H.jsxs)(`div`,{className:`capture-toolbar-meta`,children:[(0,H.jsxs)(`span`,{children:[t.length,` captured · `,C.length,` possible typo`,C.length===1?``:`s`,` · `,E.length,` ready`]}),r&&(0,H.jsxs)(`span`,{className:`capture-progress`,children:[r.label,` `,r.done,`/`,r.total,`…`]})]}),(0,H.jsxs)(`div`,{className:`capture-actions`,children:[(0,H.jsx)(`button`,{type:`button`,className:`secondary`,onClick:f,disabled:n||T===0,children:n?`Working…`:`Retry failed`}),(0,H.jsx)(`button`,{type:`button`,className:`secondary`,onClick:p,disabled:n||E.length===0,children:`Standardize`}),(0,H.jsx)(`button`,{type:`button`,className:`secondary`,onClick:()=>{b(new Set(E.map(e=>e.id)))},disabled:E.length===0,children:`Select ready`}),(0,H.jsx)(`button`,{type:`button`,className:`danger subtle`,onClick:()=>{confirm(`Clear the whole capture list?`)&&d()},disabled:n,children:`Clear`})]})]}),C.length>0&&(0,H.jsxs)(`div`,{className:`capture-section`,children:[(0,H.jsx)(`h3`,{className:`capture-section-title`,children:`Possible typos`}),(0,H.jsxs)(`p`,{className:`capture-section-hint`,children:[`These look misspelled or didn’t translate cleanly. Accept a suggestion or fix the`,` `,e.termLabel,` spelling, then retry.`]}),(0,H.jsx)(Df,{config:e,items:C,selected:y,translating:n,showSuggestions:!0,onToggleSelected:O,onUpdateEnglish:a,onUpdateTerm:o,onUpdatePinyin:s,onUpdateCategory:c,onApplySuggestion:l,onRemove:u})]}),w.length>0&&(0,H.jsxs)(`div`,{className:`capture-section`,children:[C.length>0&&(0,H.jsx)(`h3`,{className:`capture-section-title`,children:`Ready to review`}),(0,H.jsx)(Df,{config:e,items:w,selected:y,translating:n,showSuggestions:!1,onToggleSelected:O,onUpdateEnglish:a,onUpdateTerm:o,onUpdatePinyin:s,onUpdateCategory:c,onApplySuggestion:l,onRemove:u})]}),(0,H.jsx)(`button`,{type:`button`,className:`primary`,onClick:()=>{let e=D.length>0?D:E;if(e.length===0){S(`Translate words first, then save.`);return}let{imported:t,total:n}=m(e.map(e=>({term:e.term,english:e.english.trim(),category:e.category,pinyin:e.pinyin})));h(e.map(e=>e.id)),b(new Set),S(t>0?`Saved ${t} word${t===1?``:`s`} to your study list (${n} total).`:`Those words were already in your study list.`)},disabled:E.length===0||n,children:D.length>0?`Save selected (${D.length})`:`Save all ready (${E.length})`})]}),x&&(0,H.jsx)(`p`,{className:`message`,children:x})]})}function Df({config:e,items:t,selected:n,translating:r,showSuggestions:i,onToggleSelected:a,onUpdateEnglish:o,onUpdateTerm:s,onUpdatePinyin:c,onUpdateCategory:l,onApplySuggestion:u,onRemove:d}){let f=e=>e.rawInput||e.term;return(0,H.jsx)(`div`,{className:`capture-table-wrap`,children:(0,H.jsxs)(`table`,{className:`capture-table`,children:[(0,H.jsx)(`thead`,{children:(0,H.jsxs)(`tr`,{children:[(0,H.jsx)(`th`,{className:`capture-col-check`,scope:`col`,children:(0,H.jsx)(`span`,{className:`sr-only`,children:`Select`})}),(0,H.jsx)(`th`,{scope:`col`,children:`Raw Input`}),(0,H.jsxs)(`th`,{scope:`col`,children:[`Standardised `,e.termLabel]}),e.hasPinyin&&(0,H.jsx)(`th`,{scope:`col`,children:e.romanizationLabel??`Pinyin`}),(0,H.jsx)(`th`,{scope:`col`,children:`English Translation`}),(0,H.jsx)(`th`,{className:`capture-col-category`,scope:`col`,children:`Part of speech`}),(0,H.jsx)(`th`,{className:`capture-col-action`,scope:`col`,children:(0,H.jsx)(`span`,{className:`sr-only`,children:`Remove`})})]})}),(0,H.jsx)(`tbody`,{children:t.map(t=>(0,H.jsxs)(`tr`,{className:`status-${t.status}`,children:[(0,H.jsx)(`td`,{className:`capture-col-check`,children:(0,H.jsx)(`input`,{type:`checkbox`,checked:n.has(t.id),disabled:t.status!==`translated`||!t.english.trim(),onChange:()=>a(t.id),"aria-label":`Select ${f(t)}`})}),(0,H.jsxs)(`td`,{className:`capture-col-raw`,children:[(0,H.jsx)(`span`,{className:`raw-input`,children:f(t)}),i&&t.suggestion&&(0,H.jsxs)(`div`,{className:`capture-suggestion`,children:[(0,H.jsxs)(`span`,{children:[`Did 
39you mean `,(0,H.jsx)(`strong`,{children:t.suggestion}),`?`]}),(0,H.jsx)(`button`,{type:`button`,className:`suggestion-button`,onClick:()=>u(t.id),disabled:r,children:`Use this`})]}),t.status===`typo`&&!t.suggestion&&t.error&&(0,H.jsx)(`span`,{className:`capture-error`,children:t.error}),t.status===`error`&&t.error&&(0,H.jsx)(`span`,{className:`capture-error`,children:t.error})]}),(0,H.jsx)(`td`,{className:`capture-col-term`,children:(0,H.jsx)(`input`,{className:`capture-term`,value:t.term,onChange:e=>s(t.id,e.target.value),placeholder:t.status===`pending`?`…`:e.termLabel,"aria-label":`Standardised ${e.termLabel} for ${f(t)}`})}),e.hasPinyin&&(0,H.jsx)(`td`,{className:`capture-col-pinyin`,children:(0,H.jsx)(`input`,{className:`capture-pinyin`,value:t.pinyin??``,onChange:e=>c(t.id,e.target.value),placeholder:e.romanizationLabel?.toLowerCase()??`pinyin`,"aria-label":`${e.romanizationLabel??`Pinyin`} for ${f(t)}`})}),(0,H.jsx)(`td`,{className:`capture-col-english`,children:(0,H.jsx)(`input`,{className:`capture-english`,value:t.english,onChange:e=>o(t.id,e.target.value),placeholder:t.status===`error`?t.error||`Translation failed`:t.status===`pending`?`…`:t.status===`typo`?`Fix spelling first`:`English`,"aria-label":`English for ${f(t)}`})}),(0,H.jsx)(`td`,{className:`capture-col-category`,children:(0,H.jsxs)(`select`,{className:`capture-category`,value:t.category??``,onChange:e=>l(t.id,e.target.value),"aria-label":`Part of speech for ${f(t)}`,children:[(0,H.jsx)(`option`,{value:``,disabled:!0,children:`—`}),id.map(e=>(0,H.jsx)(`option`,{value:e,children:e},e))]})}),(0,H.jsx)(`td`,{className:`capture-col-action`,children:(0,H.jsx)(`button`,{type:`button`,className:`icon-button`,onClick:()=>d(t.id),"aria-label":`Remove ${f(t)}`,disabled:r,children:`×`})})]},t.id))})]})})}var Of=300,kf=Of/2,Af=78,jf=112;function Mf(e,t){return{x:kf+t*Math.sin(e),y:kf-t*Math.cos(e)}}function Nf(e){let t=Zl[e],n=t.lastIndexOf(` `);return n<=0?[t]:[t.slice(0,n),t.slice(n+1)]}function Pf({word:e}){let t=Xl.length,n=Xl.map(t=>{let n=pu(e,t),r=n!==null;return{id:t,label:Zl[t],measured:r,score:r?n:0}}),r=n.map((e,n)=>{let{x:r,y:i}=Mf(n/t*Math.PI*2,e.measured?Af*e.score:0);return`${r},${i}`}).join(` `),i=n.some(e=>e.measured);return(0,H.jsxs)(`div`,{className:`skill-radar`,children:[(0,H.jsxs)(`svg`,{className:`skill-radar-svg`,viewBox:`0 0 ${Of} ${Of}`,width:Of,height:Of,role:`img`,"aria-label":`Skill profile radar chart`,children:[[.25,.5,.75,1].map(e=>(0,H.jsx)(`polygon`,{className:`skill-radar-ring`,points:Xl.map((n,r)=>{let{x:i,y:a}=Mf(r/t*Math.PI*2,Af*e);return`${i},${a}`}).join(` `),fill:`none`},e)),Xl.map((e,n)=>{let r=Mf(n/t*Math.PI*2,Af);return(0,H.jsx)(`line`,{className:`skill-radar-axis`,x1:kf,y1:kf,x2:r.x,y2:r.y},n)}),i&&(0,H.jsx)(`polygon`,{className:`skill-radar-fill`,points:r}),n.map((e,n)=>{if(!e.measured)return null;let r=Mf(n/t*Math.PI*2,Af*e.score);return(0,H.jsx)(`circle`,{className:`skill-radar-dot`,cx:r.x,cy:r.y,r:3.5},e.id)}),n.map((e,n)=>{let{x:r,y:i}=Mf(n/t*Math.PI*2,jf),a=Nf(e.id),o=i-(a.length-1)*11/2;return(0,H.jsx)(`text`,{className:[`skill-radar-label`,e.measured?``:`unmeasured`].filter(Boolean).join(` `),x:r,y:o,textAnchor:`middle`,dominantBaseline:`middle`,children:a.map((e,t)=>(0,H.jsx)(`tspan`,{x:r,dy:t===0?0:11,children:e},e))},`label-${e.id}`)})]}),(0,H.jsx)(`ul`,{className:`skill-radar-legend`,children:n.map(e=>(0,H.jsxs)(`li`,{className:e.measured?``:`unmeasured`,children:[(0,H.jsx)(`span`,{className:`skill-radar-legend-label`,children:e.label}),(0,H.jsx)(`span`,{className:`skill-radar-legend-value`,children:e.measured?`${Math.round(e.score*100)}%`:`—`})]},e.id))})]})}function Ff({word:e,config:t,onClose:n,onDelete:r}){let i=gu(e);return(0,_.useEffect)(()=>{let e=e=>{e.key===`Escape`&&n()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[n]),(0,H.jsx)(`div`,{className:`word-detail-backdrop`,role:`presentation`,onClick:n,children:(0,H.jsxs)(`div`,{className:`word-detail-modal`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`word-detail-title`,onClick:e=>e.stopPropagation(),children:[(0,H.jsxs)(`div`,{className:`word-detail-header`,children:[(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`h2`,{id:`word-detail-title`,className:`word-detail-term`,children:e.term}),e.pinyin&&(0,H.jsx)(`p`,{className:`word-detail-pinyin`,children:(0,H.jsx)(K,{pinyin:e.pinyin})}),(0,H.jsx)(`p`,{className:`word-detail-english`,children:e.english})]}),(0,H.jsx)(`button`,{type:`button`,className:`icon-button`,onClick:n,"aria-label":`Close`,children:`×`})]}),(0,H.jsxs)(`div`,{className:`word-detail-meta`,children:[(0,H.jsx)(`span`,{children:bu(e.nextReview)}),(0,H.jsxs)(`span`,{children:[e.correctCount,`✓ `,e.wrongCount,`✗`]}),e.category&&e.category!==`other`&&(0,H.jsx)(`span`,{className:`word-tag`,children:e.category}),(0,H.jsx)(`span`,{className:`word-tag word-source`,children:xf(e.source)}),e.sourceUrl&&(0,H.jsx)(`a`,{className:`word-tag word-source-url`,href:e.sourceUrl,target:`_blank`,rel:`noreferrer`,children:Sf(e.sourceUrl)}),e.addedAt&&(0,H.jsxs)(`span`,{className:`added-at`,children:[`Added `,xu(e.addedAt)]})]}),(0,H.jsxs)(`h3`,{className:`word-detail-section-title`,children:[`How you know this `,t.termLabel.toLowerCase(),` word`]}),(0,H.jsx)(Pf,{word:e}),i?(0,H.jsxs)(`p`,{className:`hint word-detail-focus`,children:[`Next focus: `,i.label,` (`,Math.round(i.score*100),`%)`]}):(0,H.jsx)(`p`,{className:`hint word-detail-focus`,children:`Practice this word 
39in study modes to build a skill profile.`}),r&&(0,H.jsx)(`button`,{type:`button`,className:`text-button word-detail-delete`,onClick:()=>{r(e.id),n()},children:`Delete word`})]})})}function If({config:e,words:t,captureItems:n,translating:r,progress:i,onCaptureAdd:a,onUpdateEnglish:o,onUpdateTerm:s,onUpdatePinyin:c,onUpdateCategory:l,onApplySuggestion:u,onRemove:d,onClearCapture:f,onTranslate:p,onStandardize:m,onSaved:h,onSavePairs:g,onDelete:v,onClear:y,language:b,getToken:x}){let[S,C]=(0,_.useState)(``),[w,T]=(0,_.useState)(`all`),[E,D]=(0,_.useState)(`all`),[O,k]=(0,_.useState)(`term`),[A,j]=(0,_.useState)(`asc`),[M,N]=(0,_.useState)(null),[P,F]=(0,_.useState)(!1),[I,L]=(0,_.useState)(!1),[ee,te]=(0,_.useState)([]),ne=(0,_.useRef)(null);(0,_.useEffect)(()=>{if(!x){te([]);return}let e=!1;return Za(b,x).then(t=>{e||te(t)}).catch(()=>{e||te([])}),()=>{e=!0}},[b,x,t.length]);let re=ou(t).length,R=S.trim().toLowerCase(),z=(0,_.useMemo)(()=>[{value:`term`,label:e.shortName},{value:`english`,label:`English`},{value:`category`,label:`Part of speech`},{value:`source`,label:`Source`},{value:`addedAt`,label:`Date added`},{value:`nextReview`,label:`Next review`}],[e.shortName]),ie=(0,_.useMemo)(()=>{let e=new Set;for(let n of t)n.category&&n.category!==`other`&&e.add(n.category);return id.filter(t=>t!==`other`&&e.has(t))},[t]),ae=(0,_.useMemo)(()=>{let e=new Set;for(let n of t)e.add(n.source??`app`);return[`app`,`extension`,`story`,`import`,`hsk`].filter(t=>e.has(t))},[t]),oe=(0,_.useMemo)(()=>t.filter(e=>!e.category).length,[t]),se=(0,_.useMemo)(()=>[...t.filter(e=>{if(w===`uncategorised`&&e.category||w!==`all`&&w!==`uncategorised`&&e.category!==w)return!1;let t=e.source??`app`;return E!==`all`&&t!==E?!1:!R||e.term.toLowerCase().includes(R)||e.english.toLowerCase().includes(R)||(e.pinyin?.toLowerCase().includes(R)??!1)||(e.category?.toLowerCase().includes(R)??!1)||xf(t).toLowerCase().includes(R)})].sort((e,t)=>zf(e,t,O,A)),[t,w,E,O,A,R]),ce=w!==`all`||E!==`all`||O!==`term`||A!==`asc`,le=R.length>0,ue=Lf(w,E,O),de=M?t.find(e=>e.id===M)??null:null,fe=$o(e.id),pe=Uo();return(0,_.useEffect)(()=>{if(!I)return;let e=e=>{ne.current?.contains(e.target)||L(!1)},t=e=>{e.key===`Escape`&&L(!1)};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[I]),P?(0,H.jsxs)(`div`,{className:`lexicon-bulk-wrap`,children:[(0,H.jsx)(`button`,{type:`button`,className:`text-button quick-back`,onClick:()=>F(!1),children:`← Back to Lexicon`}),(0,H.jsx)(Ef,{config:e,items:n,translating:r,progress:i,onAdd:a,onUpdateEnglish:o,onUpdateTerm:s,onUpdatePinyin:c,onUpdateCategory:l,onApplySuggestion:u,onRemove:d,onClear:f,onTranslate:p,onStandardize:m,onSave:e=>g(e,`append`),onSaved:h})]}):t.length===0?(0,H.jsxs)(`section`,{className:`empty-state`,children:[(0,H.jsx)(`h2`,{children:`Lexicon`}),(0,H.jsx)(`p`,{children:`No words yet — translate one, or bulk-add a list.`}),(0,H.jsxs)(`button`,{type:`button`,className:`primary`,onClick:()=>F(!0),children:[`Bulk add`,n.length>0?` (${n.length})`:``]})]}):(0,H.jsxs)(`section`,{className:`panel lexicon-panel`,children:[(0,H.jsxs)(`div`,{className:`words-header`,children:[(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`h2`,{className:`words-title`,children:`Lexicon`}),(0,H.jsxs)(`p`,{className:`hub-meta`,children:[t.length,` words · `,re,` due`,le||ce?` · showing ${se.length}`:``]})]}),(0,H.jsxs)(`div`,{className:`words-header-actions`,children:[(0,H.jsxs)(`button`,{type:`button`,className:`text-button`,onClick:()=>F(!0),children:[`Bulk add`,n.length>0?` (${n.length})`:``]}),(0,H.jsx)(`button`,{type:`button`,className:`text-button`,onClick:y,children:`Clear all`})]})]}),ee.length>0&&(0,H.jsxs)(`section`,{className:`lookups-recents`,children:[(0,H.jsx)(`h3`,{className:`lookups-title`,children:`Looked up`}),(0,H.jsx)(`ul`,{className:`lookups-list`,children:ee.slice(0,8).map(e=>(0,H.jsxs)(`li`,{className:`lookups-item`,children:[(0,H.jsx)(`span`,{className:`lookups-term`,children:e.term}),e.english?(0,H.jsx)(`span`,{className:`lookups-en`,children:e.english}):null,(0,H.jsxs)(`span`,{className:`lookups-count`,children:[`×`,e.lookupCount]})]},e.id))})]}),(0,H.jsxs)(`div`,{className:`lexicon-toolbar`,children:[(0,H.jsxs)(`label`,{className:`words-search lexicon-search`,children:[(0,H.jsx)(`span`,{className:`sr-only`,children:`Search words`}),(0,H.jsx)(`input`,{type:`search`,value:S,onChange:e=>C(e.target.value),placeholder:`Search ${e.shortName}, English${e.hasPinyin?`, ${(e.romanizationLabel??`pinyin`).toLowerCase()}`:``}
39…`,autoComplete:`off`,spellCheck:!1})]}),(0,H.jsxs)(`div`,{className:`lexicon-filter`,ref:ne,children:[(0,H.jsxs)(`button`,{type:`button`,className:[`lexicon-filter-btn`,I||ce?`active`:``].filter(Boolean).join(` `),"aria-label":`Filters and sort`,"aria-expanded":I,"aria-haspopup":`dialog`,onClick:()=>L(e=>!e),children:[(0,H.jsx)(Rf,{}),ce&&(0,H.jsx)(`span`,{className:`lexicon-filter-dot`,"aria-hidden":`true`})]}),I&&(0,H.jsxs)(`div`,{className:`lexicon-filter-popover`,role:`dialog`,"aria-label":`Filters and sort`,children:[(0,H.jsxs)(`label`,{className:`words-control`,children:[(0,H.jsx)(`span`,{children:`Part of speech`}),(0,H.jsxs)(`select`,{value:w,onChange:e=>T(e.target.value),children:[(0,H.jsx)(`option`,{value:`all`,children:`All`}),ie.map(e=>(0,H.jsx)(`option`,{value:e,children:e},e)),oe>0&&(0,H.jsxs)(`option`,{value:`uncategorised`,children:[`uncategorised (`,oe,`)`]})]})]}),(0,H.jsxs)(`label`,{className:`words-control`,children:[(0,H.jsx)(`span`,{children:`Source`}),(0,H.jsxs)(`select`,{value:E,onChange:e=>D(e.target.value),children:[(0,H.jsx)(`option`,{value:`all`,children:`All`}),ae.map(e=>(0,H.jsx)(`option`,{value:e,children:xf(e)},e))]})]}),(0,H.jsxs)(`label`,{className:`words-control`,children:[(0,H.jsx)(`span`,{children:`Sort by`}),(0,H.jsx)(`select`,{value:O,onChange:e=>k(e.target.value),children:z.map(e=>(0,H.jsx)(`option`,{value:e.value,children:e.label},e.value))})]}),(0,H.jsxs)(`label`,{className:`words-control`,children:[(0,H.jsx)(`span`,{children:`Order`}),(0,H.jsxs)(`select`,{value:A,onChange:e=>j(e.target.value),children:[(0,H.jsx)(`option`,{value:`asc`,children:`A → Z / oldest`}),(0,H.jsx)(`option`,{value:`desc`,children:`Z → A / newest`})]})]})]})]})]}),se.length===0?(0,H.jsx)(`p`,{className:`words-empty-filter`,children:R?`No words match “${S.trim()}”.`:`No words match these filters.`}):(0,H.jsx)(`ul`,{className:`word-list lexicon-list`,children:se.map((t,n)=>{let r=Yo(n);return(0,H.jsxs)(`li`,{className:[`lexicon-row`,t.nextReview<=Date.now()?`due`:``].filter(Boolean).join(` `),children:[(0,H.jsxs)(`button`,{type:`button`,className:`lexicon-row-main`,onClick:()=>N(t.id),children:[(0,H.jsx)(`span`,{className:[`term`,fe?Xo(r):``].filter(
39Boolean).join(` `),children:t.term}),(0,H.jsxs)(`span`,{className:`lexicon-row-sub`,children:[t.pinyin&&(0,H.jsx)(`span`,{className:`word-pinyin`,children:(0,H.jsx)(K,{pinyin:t.pinyin})}),t.pinyin?(0,H.jsx)(`span`,{className:`lexicon-row-sep`,"aria-hidden":`true`,children:`·`}):null,(0,H.jsx)(`span`,{className:`english`,children:t.english})]}),ue.showAdded&&t.addedAt?(0,H.jsx)(`span`,{className:`lexicon-row-meta`,children:xu(t.addedAt)}):null,ue.showReview?(0,H.jsx)(`span`,{className:`lexicon-row-meta`,children:bu(t.nextReview)}):null,ue.showSource?(0,H.jsx)(`span`,{className:`lexicon-row-meta`,children:xf(t.source)}):null,ue.showCategory&&t.category&&t.category!==`other`?(0,H.jsx)(`span`,{className:`lexicon-row-meta`,children:t.category}):ue.showCategory&&!t.category?(0,H.jsx)(`span`,{className:`lexicon-row-meta`,children:`uncategorised`}):null]}),pe&&(0,H.jsx)(es,{className:`lexicon-speak`,onClick:()=>Wo(t.term,e.id)})]},t.id)})}),de&&(0,H.jsx)(Ff,{word:de,config:e,onClose:()=>N(null),onDelete:v})]})}function Lf(e,t,n){return{showAdded:n===`addedAt`,showReview:n===`nextReview`,showSource:n===`source`||t!==`all`,showCategory:n===`category`||e!==`all`}}function Rf(){return(0,H.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,"aria-hidden":`true`,focusable:`false`,children:(0,H.jsx)(`path`,{fill:`currentColor`,d:`M2 3h12l-4.5 5.2V13l-3-1.5V8.2L2 3z`})})}function zf(e,t,n,r){let i=r===`asc`?1:-1;switch(n){case`term`:return e.term.localeCompare(t.term)*i;case`english`:return e.english.localeCompare(t.english,`en`)*i;case`category`:{let n=e.category??`zzz`,r=t.category??`zzz`,a=n.localeCompare(r)*i;return a===0?e.term.localeCompare(t.term):a}case`source`:{let n=xf(e.source),r=xf(t.source),a=n.localeCompare(r)*i;return a===0?e.term.localeCompare(t.term):a}case`addedAt`:return((e.addedAt??0)-(t.addedAt??0))*i;case`nextReview`:return(e.nextReview-t.nextReview)*i;default:return 0}}var Bf=`german-vocab-words`,Vf=`german-vocab-capture`;function Hf(e){return`vocab-words:${e}`}function Uf(e){return`vocab-capture:${e}`}function Wf(){let e=`vocab-migrated-de-v1`;if(!localStorage.getItem(e)){if(!localStorage.getItem(Hf(`de`))){let e=localStorage.getItem(Bf);e&&localStorage.setItem(Hf(`de`),e)}if(!localStorage.getItem(Uf(`de`))){let e=localStorage.getItem(Vf);e&&localStorage.setItem(Uf(`de`),e)}localStorage.setItem(e,`1`)}}function Gf(e){return mu({...e,term:e.term||e.german||``,skills:e.skills??{}})}function Kf(e){return{...e,term:e.term||e.german||``,rawInput:e.rawInput||e.term||e.german||``}}function qf(e){Wf();try{let t=localStorage.getItem(Hf(e));if(!t)return[];let n=JSON.parse(t);if(!Array.isArray(n))return[];let r=!1,i=n.map(e=>{let t=Gf(e);return(t.interval!==e.interval||t.nextReview!==e.nextReview||t.repetitions!==e.repetitions)&&(r=!0),t}).filter(e=>e.term&&e.english);return r&&Jf(e,i),i}catch{return[]}}function Jf(e,t){localStorage.setItem(Hf(e),JSON.stringify(t))}function Yf(e){Wf();try{let t=localStorage.getItem(Uf(e));if(!t)return[];let n=JSON.parse(t);return Array.isArray(n)?n.map(Kf):[]}catch{return[]}}function Xf(e,t){localStorage.setItem(Uf(e),JSON.stringify(t))}function Zf(e){return e.status===`pending`&&e.term&&e.term!==e.rawInput?e.term:e.rawInput.includes(`|`)||/\t| — | – | - |: /.test(e.rawInput)?e.term||e.rawInput:e.rawInput||e.term}function Qf(e){return e.suggestion?{english:e.english,category:e.category,status:`typo`,suggestion:e.suggestion,error:void 0,pinyin:e.pinyin}:e.untranslated?{english:e.english,category:e.category,status:`typo`,suggestion:void 0,error:`No translation found — check spelling`,pinyin:e.pinyin}:{english:e.english,category:e.category,status:`translated`,suggestion:void 0,error:void 0,pinyin:e.pinyin}}function $f(e){let[t,n]=(0,_.useState)(()=>Yf(e)),r=(0,_.useRef)(t),i=(0,_.useRef)(e),a=(0,_.useRef)(!1),[o,s]=(0,_.useState)(!1),[c,l]=(0,_.useState)(null);(0,_.useEffect)(()=>{i.current=e,n(Yf(e))},[e]),(0,_.useEffect)(()=>{r.current=t},[t]),(0,_.useEffect)(()=>{Xf(e,t)},[e,t]);let u=(0,_.useCallback)(async e=>{for(;a.current;)await new Promise(e=>setTimeout(e,40));a.current=!0,s(!0);try{await e()}finally{a.current=!1,s(!1),l(null)}},[]),d=(0,_.useCallback)(async e=>{if(e.length===0)return;let t=i.current;await u(async()=>
39{l({done:0,total:e.length,label:`Translating`});for(let r=0;r<e.length;r+=1){let i=e[r],a=Zf(i);try{let e=await ad(a,t),r=Qf(e);if(r.status===`translated`)try{let o=await sd(a,r.english,t,e.pos,e.lemma,e.pinyin);n(e=>e.map(e=>e.id===i.id?{...e,...r,term:o.term,english:o.english,pinyin:o.pinyin??r.pinyin}:e))}catch{n(e=>e.map(e=>e.id===i.id?{...e,...r,term:a}:e))}else n(e=>e.map(e=>e.id===i.id?{...e,...r,term:a}:e))}catch(e){n(t=>t.map(t=>t.id===i.id?{...t,status:`error`,suggestion:void 0,error:e instanceof Error?e.message:`Translate failed`}:t))}l({done:r+1,total:e.length,label:`Translating`})}})},[u]),f=(0,_.useCallback)(async e=>{if(e.length===0)return;let t=i.current;await u(async()=>{l({done:0,total:e.length,label:`Standardizing`});for(let r=0;r<e.length;r+=1){let i=e[r];try{let e=ep(i.term)||i.term,r,a,o=i.category,s=i.pinyin;try{let n=await ad(e,t);r=n.pos,a=n.lemma,o=n.category,s=n.pinyin??s}catch{}let c=await sd(e,i.english,t,r,a,s);n(e=>e.map(e=>e.id===i.id?{...e,term:c.term,english:c.english,pinyin:c.pinyin??s,category:o,status:`translated`,suggestion:void 0,error:void 0}:e))}catch{}l({done:r+1,total:e.length,label:`Standardizing`})}})},[u]),p=(0,_.useCallback)(async()=>{let e=r.current.filter(e=>e.status===`translated`&&e.english.trim());if(e.length===0)return;let t=i.current;await u(async()=>{l({done:0,total:e.length,label:`Standardizing`});for(let r=0;r<e.length;r+=1){let i=e[r];try{let e=ep(i.term)||i.rawInput,r=await ad(e,t),a=await sd(e,i.english||r.english,t,r.pos,r.lemma,r.pinyin??i.pinyin);n(e=>e.map(e=>e.id===i.id?{...e,term:a.term,english:a.english,pinyin:a.pinyin??r.pinyin??e.pinyin,category:r.category,status:`translated`,suggestion:void 0,error:void 0}:e))}catch{}l({done:r+1,total:e.length,label:`Standardizing`})}})},[u]),m=(0,_.useCallback)(async()=>{let e=r.current.filter(e=>e.status===`pending`||e.status===`error`||e.status===`typo`||e.status===`translated`&&e.term.trim().toLowerCase()===e.english.trim().toLowerCase());await d(e)},[d]),h=(0,_.useCallback)(e=>{let t=Zu(e);if(t.length===0)return 0;let i=new Set(r.current.map(e=>tp(e.term||e.rawInput))),a=[],o=[];for(let e of t){let t=tp(e.term);i.has(t)||(i.add(t),e.english?o.push({id:crypto.randomUUID(),rawInput:e.rawInput,term:e.term,english:e.english,status:`translated`,createdAt:Date.now()}):a.push({id:crypto.randomUUID(),rawInput:e.rawInput,term:e.term,english:``,status:`pending`,createdAt:Date.now()}))}let s=[...o,...a];if(s.length===0)return 0;let c=[...r.current,...s];return r.current=c,n(c),(async()=>{o.length>0&&await f(o),a.length>0&&await d(a)})(),s.length},[f,d]),g=(0,_.useCallback)((e,t)=>{n(n=>n.map(n=>{if(n.id!==e)return n;let r=t.trim();return{...n,english:t,status:r?`translated`:n.status===`error`?`error`:`pending`,suggestion:void 0,error:void 0}}))},[]),v=(0,_.useCallback)((e,t)=>{n(n=>n.map(n=>n.id===e?{...n,term:t,status:n.english.trim()?`translated`:n.status,suggestion:void 0,error:void 0}:n))},[]),y=(0,_.useCallback)((e,t)=>{n(n=>n.map(n=>n.id===e?{...n,pinyin:t.trim()||void 0}:n))},[]),b=(0,_.useCallback)((e,t)=>{n(n=>n.map(n=>n.id===e?{...n,category:t}:n))},[]),x=(0,_.useCallback)(e=>{let t=r.current.find(t=>t.id===e);if(!t?.suggestion)return;let i={...t,term:t.suggestion,status:`pending`,suggestion:void 0,error:void 0};n(t=>t.map(t=>t.id===e?i:t)),r.current=r.current.map(t=>t.id===e?i:t),d([i])},[d]),S=(0,_.useCallback)(e=>{n(t=>t.filter(t=>t.id!==e))},[]),C=(0,_.useCallback)(()=>{n([])},[]);return{items:t,translating:o,progress:c,addTermText:h,updateEnglish:g,updateTerm:v,updatePinyin:y,updateCategory:b,applySuggestion:x,removeItem:S,removeMany:(0,_.useCallback)(e=>{let t=new Set(e);n(e=>e.filter(e=>!t.has(e.id)))},[]),clearItems:C,translatePending:m,standardizeReady:p}}function ep(e){return e.replace(/^(der|die|das|ein|eine|einen|einem|einer|eines)\s+/i,``).replace(/^(l'|lo|gli|il|la|le|i|un'|uno|una|un)\s+/i,``).replace(/^(l'|le|la|les|un|une|des)\s+/i,``).replace(/^(el|la|los|las|un|una|unos|unas)\s+/i,``).trim()}function tp(e){return e.trim().toLowerCase()}var np={correct:0,wrong:0,reviewed:0};function rp(e){let t={};for(let n of e){let e=n.pinyin?.trim();e&&(t[n.term]=e)}return t}function ip({words:e,hasPinyin:t,onUpdateWord:n}){let[r,i]=(0,_.useState)(null),[a,o]=(0,_.useState)(null),[s,c]=(0,_.useState)(null),[l,u]=(0,_.useState)(np),[d,f]=(0,_.useState)(0),[p,m]=(0,_.useState)(10),h=(0,_.useMemo)(()=>ou(e).length,[e]),g=e.length>=4,v=lu(p,e.length,4),y=(0,_.useMemo)(()=>rp(e),[e]),b=n=>{let r=Math.random()<.5?`term-en`:`en-term`,a=yu(n,r,t),{options:s,correctOption:l}=ju(e,n,r);i({word:n,direction:r,options:s,correctOption:l,scaffold:a}),o(null),c(null)},x=()=>{let t=cu(e);!t||e.length<4||(u(np),f(v),b(t))},S=e=>{if(!r||s)return;let t=e===r.correctOption;n(hu(r.word,t,_u(r.direction))),o(e),c(t?`correct`:`wrong`),u(e=>({correct:e.correct+ +!!t,wrong:e.wrong+ +!t,reviewed:e.reviewed+1}))},C=()=>
39{if(l.reviewed>=d||e.length<4){i(null),o(null),c(null);return}let t=cu(e);if(!t){i(null),o(null),c(null);return}b(t)},w=()=>{i(null),o(null),c(null)},T=r?r.direction===`term-en`?r.word.term:r.word.english:``,E=r?.direction===`term-en`&&r.scaffold?r.word.pinyin:void 0,D=r?.direction===`en-term`&&r.scaffold?y:void 0,O=r?.word.term??``;return{active:!!r,prompt:T,promptPinyin:E,optionPinyin:D,scaffold:r?.scaffold??!1,termText:O,direction:r?.direction,options:r?.options??[],correctOption:r?.correctOption??``,selected:a,feedback:s,session:l,sessionGoal:d,sessionCount:v,setSessionCount:m,dueCount:h,canStart:g,start:x,selectOption:S,nextQuestion:C,stop:w}}var ap=`#f7f7f5`,op=`#0a0a0a`,sp=new Map;function cp(e,t){let n=document.createElement(`canvas`);n.width=e,n.height=e;let r=n.getContext(`2d`);if(!r)return``;let i=Ao(t);r.fillStyle=ap,r.fillRect(0,0,e,e);let a=e*.08;r.strokeStyle=op,r.lineWidth=Math.max(2,e*.035),r.strokeRect(a,a,e-a*2,e-a*2);let o=e*.22;r.fillStyle=i.chipFill,r.fillRect(o,o,e-o*2,e-o*2),r.strokeStyle=op,r.lineWidth=Math.max(2,e*.028),r.strokeRect(o,o,e-o*2,e-o*2);let s=Math.round(e*.22);return r.fillStyle=i.chipText,r.font=`500 ${s}px "IBM Plex Mono", "SF Mono", ui-monospace, monospace`,r.textAlign=`center`,r.textBaseline=`middle`,r.fillText(i.code,e/2,e/2+e*.01),n.toDataURL(`image/png`)}function lp(e){let t=sp.get(e);if(t)return t;let n={apple:cp(180,e),icon192:cp(192,e),icon512:cp(512,e)};return sp.set(e,n),n}function up(e){let t=lp(e),n=(e,t,n)=>{let r=document.querySelector(`link[rel="${e}"][data-lang-icon="true"]`);r||=e===`apple-touch-icon`?document.querySelector(`link[rel="apple-touch-icon"]`):document.querySelector(`link[rel="icon"]`),r||(r=document.createElement(`link`),r.rel=e,document.head.appendChild(r)),r.dataset.langIcon=`true`,r.href=t,n&&r.setAttribute(`sizes`,n),e===`icon`&&(r.type=`image/png`)};return n(`apple-touch-icon`,t.apple,`180x180`),n(`icon`,t.icon192,`192x192`),t}function dp(e){let t=Ao(e),n=new URL(window.location.href);n.searchParams.set(`lang`,e),n.hash=``;let r=up(e),i={id:`/?lang=${e}`,name:t.appName,short_name:t.shortName,description:`${t.label} vocabulary revision with spaced repetition`,theme_color:`#0f0f12`,background_color:`#0f0f12`,display:`standalone`,orientation:`portrait`,start_url:`${n.pathname}${n.search}`,scope:`/`,icons:[{src:r.icon192,sizes:`192x192`,type:`image/png`,purpose:`any`},{src:r.icon512,sizes:`512x512`,type:`image/png`,purpose:`any`},{src:r.icon512,sizes:`512x512`,type:`image/png`,purpose:`maskable`}]},a=new Blob([JSON.stringify(i)],{type:`application/manifest+json`}),o=URL.createObjectURL(a),s=document.querySelector(`link[rel="manifest"][data-dynamic="true"]`)||document.querySelector(`link[rel="manifest"]`);s?s.href.startsWith(`blob:`)&&URL.revokeObjectURL(s.href):(s=document.createElement(`link`),s.rel=`manifest`,document.head.appendChild(s)),s.dataset.dynamic=`true`,s.href=o,document.title=t.appName;let c=document.querySelector(`meta[name="description"]`);c&&c.setAttribute(`content`,`${t.label} vocabulary revision with spaced repetition`)}function fp(e){return window.addEventListener(`popstate`,e),()=>window.removeEventListener(`popstate`,e)}function pp(){return window.location.search}function mp(){let e=(0,_.useSyncExternalStore)(fp,pp,()=>``),t=(0,_.useMemo)(()=>jo(e),[e]);(0,_.useEffect)(()=>{t?(dp(t),Go(t)):document.title=fo},[t]);let n=(0,_.useCallback)(e=>{window.history.pushState({},``,Mo(e)),dp(e),Go(e),window.dispatchEvent(new PopStateEvent(`popstate`))},[]);return{language:t,config:t?Ao(t):null,selectLanguage:n}}var hp={correct:0,wrong:0,reviewed:0};function gp({words:e,language:t,onUpdateWord:n}){let[r,i]=(0,_.useState)(null),[a,o]=(0,_.useState)(null),[s,c]=(0,_.useState)(null),[l,u]=(0,_.useState)(hp),[d,f]=(0,_.useState)(0),[p,m]=(0,_.useState)(10),[h,g]=(0,_.useState)(!1),v=(0,_.useMemo)(()=>ou(e).length,[e]),y=e.length>=4,b=lu(p,e.length,4),x=(n,r)=>{let{options:a,correctOption:s}=ju(e,n,`term-en`);i({word:n,options:a,correctOption:s}),o(null),c(null),r||Wo(n.term,t)};return{active:!!r,termText:r?.word.term??``,termPinyin:r?.word.pinyin,options:r?.options??[],correctOption:r?.correctOption??``,selected:a,feedback:s,session:l,sessionGoal:d,sessionCount:b,setSessionCount:m,dueCount:v,canStart:y,listenPaused:h,start:()=>{let t=cu(e);!t||e.length<4||(u(hp),f(b),g(!1),x(t,!1))},replay:()=>{!r||h||Wo(r.word.term,t)},pauseListening:()=>{g(!0)},selectOption:e=>{if(!r||s)return;let t=e===r.correctOption,i=h?`writtenRecognition`:`listeningRecognition`;
39n(hu(r.word,t,i)),o(e),c(t?`correct`:`wrong`),u(e=>({correct:e.correct+ +!!t,wrong:e.wrong+ +!t,reviewed:e.reviewed+1}))},nextQuestion:()=>{if(l.reviewed>=d||e.length<4){i(null),o(null),c(null);return}let t=cu(e);if(!t){i(null),o(null),c(null);return}x(t,h)},stop:()=>{i(null),o(null),c(null),g(!1)}}}var _p=5,vp=2;function yp(e){let t=[...e];for(let e=t.length-1;e>0;--e){let n=Math.floor(Math.random()*(e+1));[t[e],t[n]]=[t[n],t[e]]}return t}function bp(e,t,n){if(n<1)return null;let r=yp(su(e).filter(e=>!t.has(e.id))),i=Math.min(_p,n,r.length);if(i<2)return null;let a=r.slice(0,i);return{words:a,terms:a.map(e=>({id:e.id,text:e.term,pinyin:e.pinyin})),english:yp(a.map(e=>({id:e.id,text:e.english})))}}function xp({words:e,onUpdateWord:t}){let n=(0,_.useMemo)(()=>ou(e).length,[e]),r=(0,_.useMemo)(()=>su(e).length,[e]),i=Math.max(vp,Math.min(50,r)),[a,o]=(0,_.useState)(Math.min(10,Math.max(vp,r||vp))),[s,c]=(0,_.useState)(0),[l,u]=(0,_.useState)(new Set),[d,f]=(0,_.useState)(null),[p,m]=(0,_.useState)(new Set),[h,g]=(0,_.useState)(new Set),[v,y]=(0,_.useState)(null),[b,x]=(0,_.useState)(null),[S,C]=(0,_.useState)(null),[w,T]=(0,_.useState)({correct:0,wrong:0,reviewed:0}),[E,D]=(0,_.useState)(!1),O=(0,_.useRef)(null);(0,_.useEffect)(()=>{d||o(e=>Math.min(Math.max(e,vp),Math.max(vp,Math.min(50,r))))},[r,d]);let k=(0,_.useCallback)(()=>{O.current!==null&&(window.clearTimeout(O.current),O.current=null)},[]),A=(0,_.useCallback)(()=>{m(new Set),g(new Set),y(null),x(null),C(null)},[]),j=(0,_.useCallback)((t,n)=>{let r=bp(e,t,n-t.size);return r?(f(r),A(),D(!1),!0):(f(null),D(t.size>0),!1)},[e,A]),M=(0,_.useCallback)(e=>{o(t=>Math.min(Math.max(vp,Math.min(50,r)),Math.max(vp,t+e)))},[r]),N=(0,_.useCallback)(()=>{k();let e=Math.min(a,r);e<vp||(c(e),u(new Set),T({correct:0,wrong:0,reviewed:0}),D(!1),j(new Set,e))},[k,a,r,j]),P=(0,_.useCallback)(()=>{k(),f(null),u(new Set),c(0),D(!1),A()},[k,A]),F=(0,_.useCallback)((e,n,r)=>{let i=0,a=0;for(let r of e.words){let e=!n.has(r.id);t(hu(r,e,`writtenRecognition`)),e?i+=1:a+=1}let o=new Set(r);for(let t of e.words)o.add(t.id);if(u(o),T(t=>({correct:t.correct+i,wrong:t.wrong+a,reviewed:t.reviewed+e.words.length})),o.size>=s){D(!0),f(null),A();return}k(),O.current=window.setTimeout(()=>{j(o,s)||D(!0)},650)},[t,s,k,j,A]),I=(0,_.useCallback)((e,t)=>{if(!d||p.has(e)||S||E)return;if(e===t){let t=new Set(p);t.add(e),m(t),y(null),x(null),t.size===d.words.length&&F(d,h,l);return}let n=new Set(h);n.add(e),g(n),C({termId:e,englishId:t}),y(null),x(null),window.setTimeout(()=>{C(null)},450)},[d,p,h,S,E,l,F]),L=(0,_.useCallback)(e=>{if(!(!d||p.has(e)||E||S)){if(b){I(e,b);return}y(t=>t===e?null:e)}},[d,p,E,S,b,I]),ee=(0,_.useCallback)(e=>{if(!(!d||p.has(e)||E||S)){if(v){I(v,e);return}x(t=>t===e?null:e)}},[d,p,E,S,v,I]);return(0,_.useEffect)(()=>()=>k(),[k]),{active:!!d||E,playing:!!d,boardSize:d?.words.length??0,terms:d?.terms??[],english:d?.english??[],matchedIds:p,selectedTermId:v,selectedEnglishId:b,wrongPair:S,session:w,sessionComplete:E,sessionGoal:s,sessionProgress:l.size,targetCount:a,maxTarget:i,dueCount:n,adjustTarget:M,setTargetCount:o,start:N,stop:P,selectTerm:L,selectEnglish:ee}}var Sp={correct:0,wrong:0,reviewed:0};function Cp({words:e,language:t,onUpdateWord:n,autoSpeak:r}){let[i,a]=(0,_.useState)(null),[o,s]=(0,_.useState)(``),[c,l]=(0,_.useState)(null),[u,d]=(0,_.useState)(!1),[f,p]=(0,_.useState)(!1),[m,h]=(0,_.useState)(Sp),[g,v]=(0,_.useState)(0),[y,b]=(0,_.useState)(10),x=(0,_.useRef)(null),S=(0,_.useMemo)(()=>ou(e).length,[e]),C=e.length>=1,w=lu(y,e.length),T=()=>{let t=cu(e);t&&(h(Sp),v(w),a({word:t,direction:Math.random()<.5?`term-en`:`en-term`}),s(``),l(null),d(!1),p(!1))},E=()=>{a(null),s(``),l(null),d(!1),p(!1)};(0,_.useEffect)(()=>{i&&!c&&x.current?.focus()},[i,c]),(0,_.useEffect)(()=>{if(!(!i||!r)){if(i.direction===`term-en`&&!c){Wo(i.word.term,t);return}c===`wrong`&&i.direction===`en-term`&&Wo(i.word.term,t)}},[i,c,r,t]);let D=()=>{if(!i||c)return;let e=Jl(o,i.word,i.direction);n(e.viaPinyin?uu(i.word,e.correct):hu(i.word,e.correct,_u(i.direction))),l(e.correct?`correct`:`wrong`),d(!!(e.correct&&e.accentWarning)),p(!!(e.correct&&e.viaPinyin)),h(t=>({correct:t.correct+ +!!e.correct,wrong:t.wrong+ +!e.correct,reviewed:t.reviewed+1}))},O=()=>{if(m.reviewed>=g){a(null),s(``),l(null),d(!1),p(!1);return}let t=cu(e);if(!t){a(null),s(``),l(null),d(!1),p(!1);return}a({word:t,direction:Math.random()<.5?`term-en`:`en-term`}),s(``),l(null),d(!1),p(!1)},k=i?i.direction===`term-en`?i.word.term:i.word.english:``,A=i?i.direction===`term-en`?i.word.english:i.word.term:``,j=i?.word.term??``;return{quiz:i,prompt:k,promptPinyin:i?.direction===`term-en`?i.word.pinyin:void 0,answerPinyin:i?.direction===`en-term`?i.word.pinyin:void 0,expectedAnswer:A,termText:j,direction:i?.direction,answer:o,setAnswer:s,feedback:c,accentWarning:u,viaPinyin:f,session:m,sessionGoal:g,sessionCount:w,setSessionCount:b,dueCount:S,canStart:C,inputRef:x,startQuiz:T,stop:E,submitAnswer:D,nextQuestion:O}}var wp={correct:0,wrong:0,reviewed:0};function Tp(e){return e.map((e,t)=>({id:`${t}-${e}`,char:e}))}function Ep({words:e,onUpdateWord:t}){let[n,r]=(0,_.useState)(null),[i,a]=(0,_.useState)([]),[o,s]=(0,_.useState)(null),[c,l]=(0,_.useState)(wp),[u,d]=(0,_.useState)(0),f=(0,_.useMemo)(()=>e.filter(e=>Du(e.term)),[e]),p=(0,_.useMemo)(()=>Nu(e),[e]),m=f.length>=1,[h,g]=(0,_.useState)(10),v=lu(h,f.length),y=e=>{r({word:e,bank:Tp(Ou(e.term))}),a([]),s(null)},b=()=>{let t=Mu(e);t&&(l(wp),d(v),y(t))},x=e=>{!n||o||i.includes(e)||a(t=>[...t,e])},S=e=>{!n||o||a(t=>t.filter(t=>t!==e))},C=()=>{o||a([])},w=(0,_.useMemo)(()=>
39{if(!n)return``;let e=new Map(n.bank.map(e=>[e.id,e.char]));return i.map(t=>e.get(t)??``).join(``)},[n,i]),T=()=>{if(!n||o||!w)return;let e=ql(w,n.word.term,`en-term`);t(hu(n.word,e,`writtenProduction`)),s(e?`correct`:`wrong`),l(t=>({correct:t.correct+ +!!e,wrong:t.wrong+ +!e,reviewed:t.reviewed+1}))},E=()=>{if(c.reviewed>=u){r(null),a([]),s(null);return}let t=Mu(e);if(!t){r(null),a([]),s(null);return}y(t)},D=()=>{r(null),a([]),s(null)},O=n?.bank.filter(e=>!i.includes(e.id))??[],k=n?.bank.filter(e=>i.includes(e.id)).sort((e,t)=>i.indexOf(e.id)-i.indexOf(t.id))??[];return{active:!!n,prompt:n?.word.english??``,termText:n?.word.term??``,expectedAnswer:n?.word.term??``,charCount:n?Eu(n.word.term).length:0,remainingTiles:O,builtTiles:k,builtAnswer:w,feedback:o,session:c,sessionGoal:u,sessionCount:v,setSessionCount:g,dueCount:p,canStart:m,start:b,tapBankTile:x,tapBuiltTile:S,clearBuilt:C,submit:T,nextQuestion:E,stop:D}}var Dp=`german-vocab-auto-speak`;function Op(){try{let e=localStorage.getItem(Dp);return e===null||e===`true`}catch{return!0}}function kp(){let[e,t]=(0,_.useState)(Op);return{autoSpeak:e,toggleAutoSpeak:(0,_.useCallback)(()=>{t(e=>{let t=!e;return localStorage.setItem(Dp,String(t)),t})},[])}}var Ap={correct:0,wrong:0,reviewed:0};function jp(e){return e.filter(e=>!!e.pinyin?.trim())}function Mp(e){let t=Fs(e.pinyin??``);return!t||t.options.length<2?null:{word:e,options:t.options,correctOption:t.correctOption}}function Np(e,t){let n=new Set(t??[]);for(let t=0;t<e.length;t++){let t=cu(e,Date.now(),n);if(!t)return null;let r=Mp(t);if(r)return r;n.add(t.id)}return null}function Pp({words:e,onUpdateWord:t}){let[n,r]=(0,_.useState)(null),[i,a]=(0,_.useState)(null),[o,s]=(0,_.useState)(null),[c,l]=(0,_.useState)(Ap),[u,d]=(0,_.useState)(0),[f,p]=(0,_.useState)(10),m=(0,_.useMemo)(()=>jp(e),[e]),h=(0,_.useMemo)(()=>ou(m).length,[m]),g=m.length>=1,v=lu(f,m.length);return{active:!!n,prompt:n?.word.term??``,termText:n?.word.term??``,options:n?.options??[],correctOption:n?.correctOption??``,selected:i,feedback:o,session:c,sessionGoal:u,sessionCount:v,setSessionCount:p,dueCount:h,canStart:g,pinyinWordCount:m.length,start:()=>{let e=Np(m);e&&(l(Ap),d(v),r(e),a(null),s(null))},selectOption:e=>{if(!n||o)return;let r=e===n.correctOption;t(hu(n.word,r,`toneRecognition`)),a(e),s(r?`correct`:`wrong`),l(e=>({correct:e.correct+ +!!r,wrong:e.wrong+ +!r,reviewed:e.reviewed+1}))},nextQuestion:()=>{if(c.reviewed>=u||m.length<1){r(null),a(null),s(null);return}let e=Np(m);if(!e){r(null),a(null),s(null);return}r(e),a(null),s(null)},stop:()=>{r(null),a(null),s(null)}}}function Fp(e,t,n){let r=t.map(e=>({term:e.term.trim(),english:e.english.trim(),category:e.category,pinyin:e.pinyin?.trim()||void 0,source:e.source,sourceUrl:e.sourceUrl?.trim()||void 0})).filter(e=>e.term&&e.english).map(e=>iu(e.term,e.english,{category:e.category,pinyin:e.pinyin,source:e.source??`app`,sourceUrl:e.sourceUrl}));if(n===`replace`)return{words:r,imported:r.length,added:r};let i=new Set(e.map(e=>e.term.toLowerCase())),a=[...e],o=[];for(let e of r){let t=e.term.toLowerCase();i.has(t)||(i.add(t),a.push(e),o.push(e))}return{words:a,imported:o.length,added:o}}function Ip(e,t){return`vocab-cloud-migrated:${e}:${t}`}function Lp(e,t={}){let{getToken:n,syncEnabled:r=!1,syncUserKey:i=null}=t,[a,o]=(0,_.useState)(()=>qf(e)),[s,c]=(0,_.useState)(`idle`),[l,u]=(0,_.useState)(null),d=(0,_.useRef)(a),f=(0,_.useRef)(n),p=(0,_.useRef)(r);(0,_.useEffect)(()=>{f.current=n},[n]),(0,_.useEffect)(()=>{p.current=r},[r]),(0,_.useEffect)(()=>{d.current=a},[a]),(0,_.useEffect)(()=>{Jf(e,a)},[e,a]),(0,_.useEffect)(()=>{o(qf(e))},[e]),(0,_.useEffect)(()=>{if(!r)return;let t=!1;return(async()=>{c(`syncing`),u(null);try{let n=f.current,r=await Ka(e,n);if(t)return;let a=qf(e),s=Ip(i||(Va()?`signed-in`:`local`),e);if(r.length===0&&a.length>0){let r=await qa(e,a.map(wf),n);if(t)return;localStorage.setItem(s,`1`),o(r.words.map(Cf))}else if(r.length>0){let i=new Set(r.map(e=>e.term.toLowerCase())),c=a.filter(e=>!i.has(e.term.toLowerCase())),l=r.map(Cf);if(c.length>0){let r=await qa(e,c.map(wf),n);if(t)return;let i=new Map(l.map(e=>[e.id,e]));for(let e of r.words.map(Cf))i.set(e.id,e);l=[...i.values()]}localStorage.setItem(s,`1`),o(l)}t||c(`idle`)}catch(e){if(t)return;c(`error`),u(e instanceof Error?e.message:`Sync failed`)}})(),()=>{t=!0}},[e,r,i]);let m=(0,_.useCallback)((t,n=`append`)=>{let r=Fp(d.current,t,n);return o(r.words),p.current&&r.added.length>0&&qa(e,r.added.map(wf),f.current).catch(e=>{u(e instanceof Error?e.message:`Failed to sync new words`)}),p.current&&n===`replace`&&(async()=>{try{await Xa(e,f.current),r.words.length>0&&await qa(e,r.words.map(wf),f.current)}catch(e){u(e instanceof Error?e.message:`Failed to replace cloud list`)}})(),{imported:r.imported,total:r.words.length}},[e]);return{words:a,importWords:(0,_.useCallback)((e,t)=>{let n=Xu(e);return m(n.map(e=>({term:e.term,english:e.english,source:`import`})),t)},[m]),addPairs:m,updateWord:(0,_.useCallback)(e=>{o(t=>t.map(t=>
39t.id===e.id?e:t)),p.current&&Ja(e.id,wf(e),f.current).catch(e=>{u(e instanceof Error?e.message:`Failed to sync word update`)})},[]),deleteWord:(0,_.useCallback)(e=>{o(t=>t.filter(t=>t.id!==e)),p.current&&Ya(e,f.current).catch(e=>{u(e instanceof Error?e.message:`Failed to sync delete`)})},[]),clearWords:(0,_.useCallback)(()=>{o([]),p.current&&Xa(e,f.current).catch(e=>{u(e instanceof Error?e.message:`Failed to clear cloud list`)})},[e]),syncStatus:s,syncError:l}}var Rp={chrome:{name:`IMMERSION`,summary:`Swap English for Chinese as you read. HSK 1 is free. Plus unlocks HSK 2–6 and your lists, same account as the iPhone app.`,description:`IMMERSE yourself in Chinese at your level — without changing your behaviour.
40
41Turn Immersion on and keep reading the pages you already open. You only see Chinese words and sentences you will understand; harder English stays. Hover a swap for English, tone-colored pinyin, and a Wiktionary link. Optional speak-on-hover reads the Chinese aloud with your system voice.
42
43Passively learn Chinese. Effortlessly make Chinese part of your daily life.
44
45• HSK 1 is free — no account
46• HSK 2–6 and your own lists with IMMERSION Plus ($3.99/month, or $29.99/year with a 7-day trial) on theimmersionapp.com or the iPhone app. Monthly has no trial. Isolated verbs stay English. In-level sentences can become Chinese.
47• Same Apple or Google account as the iPhone app
48• Your lists join HSK on the page (Mix). Tick lists off in Settings if you need to. Widgets on iPhone pick which list to focus on. Leftover English on the page can suggest unused words.
49• While Immersion is on, matching words swap on open http(s) pages (and after you navigate)
50• Privacy-first: word swaps run in your browser. We do not upload the page HTML to IMMERSION. In-level English sentences may be sent to Google Translate (sentence text only) so we can check Chinese against your HSK.
51
52How to use
531. Open an English webpage
542. Click the IMMERSION icon
553. Choose HSK 1 and enable “Immersion”
564. For higher levels, sign in and Unlock Plus
575. Isolated verbs stay English. In-level sentences can become Chinese.
58
59This extension is not affiliated with HSK or Chinese Testing International.`,category:`Education`,language:`English`,homepageUrl:`https://theimmersionapp.com`,supportUrl:`https://theimmersionapp.com/support.html`,privacyUrl:`https://theimmersionapp.com/privacy.html`,icon:`icon-128.png`,screenshots:[{file:`01-popup-hsk1.png`,alt:`Popup, HSK 1, Immersion on`},{file:`02-friends-before-after.png`,alt:`Overlapping Before | After, same Friends feed`},{file:`03-news-before-after.png`,alt:`Overlapping Before | After, same news page`},{file:`03-hover-tooltip.png`,alt:`Hover tooltip`},{file:`04-plus-lock.png`,alt:`Locked HSK 2–6 + Unlock Plus`}],smallPromoTile:`tile-440x280.png`,marqueePromoTile:`marquee-1400x560.png`,singlePurpose:`Chinese immersion reading aid via HSK word replacement on web pages.`,remoteCodeJustification:`This extension does not execute remote code. All JavaScript is packaged in the zip. Calls to api.theimmersionapp.com return JSON (Plus status, HSK level, lists, seen counts) only, never executable code. Calls to translate.googleapis.com return translation JSON for in-level sentences, never executable code.`,permissions:{storage:`Save HSK level, list source, immersion on/off, and an optional sign-in token on this device.`,activeTab:`Inject immersion into the page the user is viewing when they turn Immersion on from the popup.`,tabs:`Read the current tab URL so we can inject or skip the rewrite (including after navigation while Immersion is on).`,scripting:`Inject the immersion script into pages the user has granted access to, so matching English words can be swapped for Chinese.`,tts:`Optional Mandarin speak-on-hover: read the Chinese word with the system voice.`},hostPermissionUse:`Required hosts: https://theimmersionapp.com/* for sign-in on the IMMERSION website;
59 https://api.theimmersionapp.com/* to check Plus, HSK level, lists, and seen counts; https://translate.googleapis.com/* to translate in-level English sentences (sentence text only, not the page HTML). Optional http://*/* and https://*/* are requested only when the user turns Immersion on, so matching English words can be swapped on pages they browse. Page HTML is never uploaded to IMMERSION.`,testInstructions:`HSK 1 works with no account.
60
611. Install. Open any English webpage (for example a news article).
622. Click the IMMERSION icon. HSK 1 is selected. Turn Immersion on and allow site access when Chrome asks.
633. Matching English nouns/adjectives/time words swap for Chinese. Verbs stay in English. Hover a swapped word for English, pinyin, and Wiktionary.
644. Tapping HSK 2–6 shows Unlock Plus. Plus is billed on theimmersionapp.com or the iPhone app, not in the extension. Same Apple or Google account.
65
66Demo account: none required for HSK 1. Do not require a Plus purchase to review basic functionality.`,visibility:`Public`,price:`Free`,regions:`All regions`,version:`1.1.0`,developer:`IMMERSION`},ios:{name:`the IMMERSION app`,subtitle:`Chinese on your Home Screen`,category:`Education`,age:`4+`,devices:`iPhone only`,description:`IMMERSION puts Chinese on your Home Screen.
67
68Add Word or Sentence widgets. On the Home Screen: small Word, small Sentence, or medium Sentence. They rotate at your level — hanzi, pinyin, and English — on the Home Screen and Lock Screen. Tap a widget to open the word or sentence in the app. In Settings you can turn pinyin on the widgets off.
69
70HSK 1 is free. No account required.
71
72IMMERSION Plus ($3.99/month, or $29.99/year with a 7-day free trial) unlocks HSK 2–6 on widgets and in the Chrome extension, plus your own lists of words, phrases, and sentences. Same lists on iPhone, theimmersionapp.com, and Chrome. Subscribe in the app (Apple) or on theimmersionapp.com with the same Apple or Google account.
73
74Terms of Use: https://theimmersionapp.com/terms.html
75Privacy Policy: https://theimmersionapp.com/privacy.html
76
77This app is not affiliated with HSK or Chinese Testing International.`,whatsNew:`Named lists. Paste words, phrases, or sentences — or add a Kitchen, Clock, or other IMMERSION pack. Plus drives Word and Sentence widgets from those lists (My lists or Mix). Same lists on the website and in Chrome. HSK 1 stays free.`,keywords:`Chinese,HSK,Mandarin,widget,hanzi,pinyin,Home Screen,vocabulary,lists`,promotionalText:``,privacyUrl:`https://theimmersionapp.com/privacy.html`,termsUrl:`https://theimmersionapp.com/terms.html`,supportUrl:`https://theimmersionapp.com/support.html`,email:`[email protected]`,copyright:`2026 IMMERSION`,reviewNotes:`HSK 1 widgets work without an account. HSK 2–6 and named lists require Plus (same subscription as 1.0).
78
791. Install. Add Word and Sentence widgets (Home and Lock Screen).
802. On Home, HSK 1 is selected. Tapping 2–6 opens the Plus paywall.
813. Paywall shows Plus Yearly / Plus Monthly, 1 year / 1 month, live prices, 7-day trial on yearly only, Privacy Policy, and Terms of Use (EULA). Lede mentions HSK 2–6 and lists.
824. Sandbox Apple ID: start the yearly 7-day trial. Sign in with Apple or Google.
835. Words tab → paste a list (a word, a phrase, and a Chinese sentence on their own lines) or Add Kitchen. Settings → Widgets → My lists. Confirm the Word widget shows a list term and the Sentence widget shows a list or pack line.
846. Restore purchases. Delete account in Settings.
85
86Demo account: none. Sandbox IAP is enough. HSK content is bundled. Lists sync with theimmersionapp.com/?lists=1 on the same Clerk account.`,seller:`IMMERSION`,screenshots:[{id:`home-widgets`,alt:`Home Screen Word and Sentence widgets`},{id:`lock-widgets`,alt:`Lock Screen Word and Sentence widgets`},{id:`word-detail`,alt:`Word detail for 你好`}]}},zp=`immersion-store-listings-draft`,Bp={name:75,summary:132,description:16e3},Vp={name:30,subtitle:30,promotionalText:170,description:4e3,keywords:100,whatsNew:4e3,reviewNotes:4e3},Hp=[{path:`name`,label:`Name`,limit:Bp.name},{path:`summary`,label:`Summary`,limit:Bp.summary,rows:3},{path:`description`,label:`Description`,limit:Bp.description,rows:16},{path:`category`,label:`Category`},{path:`language`,label:`Language`},{path:`homepageUrl`,label:`Homepage URL`}
86,{path:`supportUrl`,label:`Support URL`},{path:`privacyUrl`,label:`Privacy policy URL`},{path:`singlePurpose`,label:`Single purpose description`,rows:3},{path:`remoteCodeJustification`,label:`Remote code justification`,rows:6},{path:`permissions.storage`,label:`Permission: storage`,rows:3},{path:`permissions.activeTab`,label:`Permission: activeTab`,rows:3},{path:`permissions.tabs`,label:`Permission: tabs`,rows:3},{path:`permissions.scripting`,label:`Permission: scripting`,rows:3},{path:`permissions.tts`,label:`Permission: tts`,rows:3},{path:`hostPermissionUse`,label:`Host permission use`,rows:8},{path:`testInstructions`,label:`Test instructions`,rows:10},{path:`visibility`,label:`Visibility`},{path:`price`,label:`Price`},{path:`regions`,label:`Regions`}],Up=[{path:`name`,label:`Name`,limit:Vp.name},{path:`subtitle`,label:`Subtitle`,limit:Vp.subtitle},{path:`promotionalText`,label:`Promotional text`,limit:Vp.promotionalText,rows:3},{path:`description`,label:`Description`,limit:Vp.description,rows:14},{path:`whatsNew`,label:`What’s New`,limit:Vp.whatsNew,rows:6},{path:`keywords`,label:`Keywords`,limit:Vp.keywords,rows:2},{path:`category`,label:`Category`},{path:`age`,label:`Age`},{path:`devices`,label:`Devices`},{path:`privacyUrl`,label:`Privacy Policy URL`},{path:`termsUrl`,label:`Terms of Use URL`},{path:`supportUrl`,label:`Support URL`},{path:`email`,label:`Email`},{path:`copyright`,label:`Copyright`},{path:`reviewNotes`,label:`Review notes`,limit:Vp.reviewNotes,rows:12}];function Wp(e){return typeof window>`u`||new URLSearchParams(e).get(`store`)!==`1`?!1:zs()}function Gp(e,t){let n=t.split(`.`).reduce((e,t)=>{if(e&&typeof e==`object`&&t in e)return e[t]},e);return typeof n==`string`?n:``}function Kp(e,t,n){let r=t.split(`.`),i=structuredClone(e),a=i;for(let e=0;e<r.length-1;e+=1){let t=r[e],n=a[t];a[t]=n&&typeof n==`object`?{...n}:{},a=a[t]}return a[r[r.length-1]]=n,i}function qp(e){if(!e||typeof e!=`object`)return!1;let t=e.chrome,n=e.ios;return!!(t&&n&&typeof t.name==`string`&&typeof n.name==`string`)}function Jp(){try{let e=localStorage.getItem(zp);if(!e)return{listings:structuredClone(Rp),dirty:!1};let t=JSON.parse(e);return qp(t)?{listings:t,dirty:!0}:{listings:structuredClone(Rp),dirty:!1}}catch{return{listings:structuredClone(Rp),dirty:!1}}}function Yp(e){try{localStorage.setItem(zp,JSON.stringify(e))}catch{}}function Xp(){try{localStorage.removeItem(zp)}catch{}}function Zp(e,t){let n=e===`chrome`?Hp:Up,r=e===`chrome`?t.chrome:t.ios;return n.map(e=>`${e.label}:\n${Gp(r,e.path)}`).join(`
87
88`)}function Qp(e){return e.screenshots.map(e=>e.file).join(`
89`)}var $p=`modulepreload`,em=function(e){return`/`+e},tm={},nm=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=em(t,n),t=s(t),t in tm)return;tm[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:$p,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},rm=(0,_.lazy)(async()=>({default:(await nm(()=>import(`./StorePreviewPage-kTGjejDo.js`),__vite__mapDeps([0,1]))).StorePreviewPage}));function im(e){return window.addEventListener(`popstate`,e),()=>window.removeEventListener(`popstate`,e)}function am(){return window.location.search}function om({language:e,config:t,onSelectLanguage:n}){let r=(0,_.useSyncExternalStore)(im,am,()=>``),[i,a]=(0,_.useState)(()=>Fo(window.location.search)??`quick`),[o,s]=(0,_.useState)(()=>Io(window.location.search)??`hub`),[c,l]=(0,_.useState)(0),[u,d]=(0,_.useState)(0);(0,_.useEffect)(()=>{let e=Fo(r),t=Io(r);e&&a(e),t&&(s(t),e||a(`study`))},[r]);let f=e=>{e!==i&&(l(e=>e+1),e===`quick`&&d(e=>e+1)),a(e),Lo(e,e===`study`?o:void 0)},p=e=>{(i!==`study`||e!==o)&&l(e=>e+1),s(e),a(`study`),Lo(`study`,e)},{syncEnabled:m,syncUserKey:h,getToken:g}=hf(),{words:v,addPairs:y,updateWord:b,deleteWord:x,clearWords:S,syncStatus:C,syncError:w}=Lp(e,{syncEnabled:m,syncUserKey:h,getToken:g}),T=$f(e),{autoSpeak:E,toggleAutoSpeak:D}=kp();Gs();let O=Uo(),k=Cp({words:v,language:e,onUpdateWord:b,autoSpeak:E}),A=Wu({words:v,language:e,onUpdateWord:b,autoSpeak:E,speechSupported:O}),j=xp({words:v,onUpdateWord:b}),M=ip({words:v,hasPinyin:!!t.hasPinyin,onUpdateWord:b}),N=gp({words:v,language:e,onUpdateWord:b}),P=Ep({words:v,onUpdateWord:b}),F=Pp({words:v,onUpdateWord:b}),I=(0,_.useMemo)(()=>Nu(v),[v]),L=(0,_.useMemo)(()=>v.filter(e=>!!e.pinyin?.trim()).length,[v]),ee=(0,_.useMemo)(()=>{let e=v.length>=1,n=[{id:`mixed`,title:`Mixed`,blurb:t.hasPinyin?`General revision — type, choice, tones, listen, scramble`:`General revision — type, choice, listen, scramble`,ready:e,hint:e?void 0:`Add words first`},{id:`match`,title:`Match`,blurb:`Pair ${t.termLabel} with English`,ready:v.length>=2,hint:v.length<2?`Need 2+ words`:void 0}
89,{id:`quiz`,title:`Type`,blurb:`Type the translation from memory`,ready:e,hint:e?void 0:`Add words first`},{id:`choice`,title:`Choice`,blurb:t.hasPinyin?`Pick meaning — pinyin scaffold, then bare hanzi`:`Pick the right meaning from four options`,ready:v.length>=4,hint:v.length<4?`Need 4+ words in list`:void 0}];return t.hasPinyin&&n.push({id:`tones`,title:`Tones`,blurb:`See the characters, pick the right tones`,ready:L>=1,hint:L<1?`Need words with pinyin`:void 0}),n.push({id:`listen`,title:`Listen`,blurb:`Hear the word, tap the English meaning`,ready:O&&v.length>=4,hint:O?v.length<4?`Need 4+ words in list`:void 0:`Speech not supported`},{id:`scramble`,title:`Scramble`,blurb:`Rebuild the ${t.termLabel} word from letters`,ready:I>=1,hint:I<1?`Need a word with 2+ different characters`:void 0},{id:`story`,title:`Story`,blurb:`Read an AI story built from your vocab`,ready:v.length>=4,hint:v.length<4?`Need 4+ words`:void 0}),n},[t.hasPinyin,t.termLabel,L,I,O,v.length]);return(0,H.jsxs)(`div`,{className:[`app`,i===`quick`?`app-quick`:``].filter(Boolean).join(` `),children:[(0,H.jsxs)(`header`,{className:[`app-header`,i===`quick`?`app-header-compact`:``].join(` `),children:[(0,H.jsxs)(`div`,{className:`app-header-row`,children:[(0,H.jsxs)(`div`,{className:`app-brand-lockup`,children:[(0,H.jsx)(`h1`,{children:fo}),(0,H.jsxs)(`p`,{className:`app-header-meta`,children:[t.code,` · `,i===`quick`?`Translate`:i===`study`?`Study`:`Lexicon`]})]}),(0,H.jsxs)(`div`,{className:`app-header-actions`,children:[(0,H.jsx)(To,{}),(0,H.jsx)(gf,{language:e,onSelect:n})]})]}),!Va()&&(0,H.jsxs)(`p`,{className:`sync-status`,children:[`Cloud sync needs Google sign-in. Add `,(0,H.jsx)(`code`,{children:`VITE_CLERK_PUBLISHABLE_KEY`}),` to`,` `,(0,H.jsx)(`code`,{children:`.env.local`}),` — see`,` `,(0,H.jsx)(`a`,{href:`https://clerk.com/docs/react/getting-started/quickstart`,children:`Clerk React setup`}),`.`]}),C===`syncing`&&(0,H.jsx)(`p`,{className:`sync-status`,children:`Syncing…`}),w&&(0,H.jsx)(`p`,{className:`sync-error`,children:w})]}),(0,H.jsxs)(`main`,{className:`app-main page-enter`,children:[i===`quick`&&(0,H.jsx)(Hd,{config:t,language:e,words:v,onSave:y,enterBurstKey:u,getToken:g}),i===`study`&&o===`hub`&&(0,H.jsx)(uf,{config:t,wordCount:v.length,dueCount:k.dueCount,scrambleDueCount:I,speechSupported:O,modes:ee,onSelectMode:p}),i===`study`&&o===`mixed`&&(0,H.jsx)(Ku,{config:t,language:e,wordCount:v.length,dueCount:A.dueCount,canStart:A.canStart,active:A.active,format:A.round?.format,direction:A.round?.direction,prompt:A.prompt,promptPinyin:A.promptPinyin,optionPinyin:A.optionPinyin,answerPinyin:A.answerPinyin,scaffold:A.scaffold,typeTarget:A.typeTarget,termText:A.termText,expectedAnswer:A.expectedAnswer,answer:A.answer,selected:A.selected,options:A.round?.options??[],correctOption:A.round?.correctOption??``,feedback:A.feedback,accentWarning:A.accentWarning,viaPinyin:A.viaPinyin,session:A.session,sessionGoal:A.sessionGoal,sessionCount:A.sessionCount,onSessionCountChange:A.setSessionCount,autoSpeak:E,speechSupported:O,inputRef:A.inputRef,remainingTiles:A.remainingTiles,builtTiles:A.builtTiles,builtAnswer:A.builtAnswer,onAnswerChange:A.setAnswer,onToggleAutoSpeak:D,onStart:A.start,onSubmitTyped:A.submitTyped,onSelectOption:A.selectOption,onReplayListen:A.replayListen,onPauseListening:A.pauseListening,onTapBank:A.tapBankTile,onTapBuilt:A.tapBuiltTile,onClearScramble:A.clearBuilt,onSubmitScramble:A.submitScramble,onNext:A.nextQuestion,onStop:A.stop,onChangeMode:()=>p(`hub`),listenPaused:A.listenPaused}),i===`study`&&o===`quiz`&&(0,H.jsx)(qu,{config:t,language:e,wordCount:v.length,dueCount:k.dueCount,quizActive:!!k.quiz,prompt:k.prompt,promptPinyin:k.promptPinyin,termText:k.termText,direction:k.direction,answer:k.answer,feedback:k.feedback,accentWarning:k.accentWarning,viaPinyin:k.viaPinyin,expectedAnswer:k.expectedAnswer,answerPinyin:k.answerPinyin,session:k.session,autoSpeak:E,speechSupported:O,inputRef:k.inputRef,onAnswerChange:k.setAnswer,onToggleAutoSpeak:D,onStart:k.startQuiz,onSubmit:k.submitAnswer,onNext:k.nextQuestion,onStop:k.stop,onChangeMode:()=>p(`hub`),sessionGoal:k.sessionGoal,sessionCount:k.sessionCount,onSessionCountChange:k.setSessionCount}),i===`study`&&o===`match`&&(0,H.jsx)(Fl,{config:t,language:e,wordCount:v.length,dueCount:j.dueCount,active:j.active,playing:j.playing,boardSize:j.boardSize,terms:j.terms,english:j.english,matchedIds:j.matchedIds,selectedTermId:j.selectedTermId,selectedEnglishId:j.selectedEnglishId,wrongPair:j.wrongPair,session:j.session,sessionComplete:j.sessionComplete,sessionGoal:j.sessionGoal,sessionProgress:j.sessionProgress,targetCount:j.targetCount,maxTarget:j.maxTarget,onAdjustTarget:j.adjustTarget,onStart:j.start,onStop:j.stop,onSelectTerm:j.selectTerm,onSelectEnglish:j.selectEnglish,onChangeMode:()=>p(`hub`)}),i===`study`&&o===`choice`&&(0,H.jsx)(Ls,{config:t,language:e,wordCount:v.length,dueCount:M.dueCount,canStart:M.canStart,active:M.active,prompt:M.prompt,promptPinyin:M.promptPinyin,optionPinyin:M.optionPinyin,scaffold:M.scaffold,termText:M.termText,direction:M.direction,options:M.options,correctOption:M.correctOption,selected:M.selected,feedback:M.feedback,session:M.session,sessionGoal:M.sessionGoal,sessionCount:M.sessionCount,onSessionCountChange:M.setSessionCount,speechSupported:O,onStart:M.start,onSelectOption:M.selectOption,onNext:M.nextQuestion,onStop:M.stop,onChangeMode:()=>p(`hub`)}
89),i===`study`&&o===`tones`&&t.hasPinyin&&(0,H.jsx)(df,{config:t,language:e,wordCount:v.length,pinyinWordCount:F.pinyinWordCount,dueCount:F.dueCount,canStart:F.canStart,active:F.active,prompt:F.prompt,termText:F.termText,options:F.options,correctOption:F.correctOption,selected:F.selected,feedback:F.feedback,session:F.session,sessionGoal:F.sessionGoal,sessionCount:F.sessionCount,onSessionCountChange:F.setSessionCount,speechSupported:O,onStart:F.start,onSelectOption:F.selectOption,onNext:F.nextQuestion,onStop:F.stop,onChangeMode:()=>p(`hub`)}),i===`study`&&o===`listen`&&(0,H.jsx)(Pl,{config:t,wordCount:v.length,dueCount:N.dueCount,canStart:N.canStart,active:N.active,termText:N.termText,termPinyin:N.termPinyin,options:N.options,correctOption:N.correctOption,selected:N.selected,feedback:N.feedback,session:N.session,sessionGoal:N.sessionGoal,sessionCount:N.sessionCount,onSessionCountChange:N.setSessionCount,speechSupported:O,listenPaused:N.listenPaused,onStart:N.start,onReplay:N.replay,onPauseListening:N.pauseListening,onSelectOption:N.selectOption,onNext:N.nextQuestion,onStop:N.stop,onChangeMode:()=>p(`hub`)}),i===`study`&&o===`scramble`&&(0,H.jsx)(Ud,{config:t,language:e,wordCount:v.length,dueCount:P.dueCount,canStart:P.canStart,active:P.active,prompt:P.prompt,termText:P.termText,expectedAnswer:P.expectedAnswer,remainingTiles:P.remainingTiles,builtTiles:P.builtTiles,builtAnswer:P.builtAnswer,feedback:P.feedback,session:P.session,sessionGoal:P.sessionGoal,sessionCount:P.sessionCount,onSessionCountChange:P.setSessionCount,speechSupported:O,onStart:P.start,onTapBank:P.tapBankTile,onTapBuilt:P.tapBuiltTile,onClear:P.clearBuilt,onSubmit:P.submit,onNext:P.nextQuestion,onStop:P.stop,onChangeMode:()=>p(`hub`)}),i===`study`&&o===`story`&&(0,H.jsx)(tf,{config:t,language:e,words:v,onAddPairs:y,onUpdateWord:b,onChangeMode:()=>p(`hub`),getToken:g}),i===`words`&&(0,H.jsx)(If,{config:t,words:v,captureItems:T.items,translating:T.translating,progress:T.progress,onCaptureAdd:T.addTermText,onUpdateEnglish:T.updateEnglish,onUpdateTerm:T.updateTerm,onUpdatePinyin:T.updatePinyin,onUpdateCategory:T.updateCategory,onApplySuggestion:T.applySuggestion,onRemove:T.removeItem,onClearCapture:T.clearItems,onTranslate:()=>{T.translatePending()},onStandardize:()=>{T.standardizeReady()},onSaved:T.removeMany,onSavePairs:y,onDelete:x,onClear:()=>{confirm(`Delete all words? This cannot be undone.`)&&S()},language:e,getToken:g})]},c),(0,H.jsxs)(`nav`,{className:`tab-bar`,children:[(0,H.jsx)(`button`,{type:`button`,className:i===`quick`?`active`:``,onClick:()=>f(`quick`),children:`Translate`}),(0,H.jsx)(`button`,{type:`button`,className:i===`study`?`active`:``,onClick:()=>f(`study`),children:`Study`}),(0,H.jsxs)(`button`,{type:`button`,className:i===`words`?`active`:``,onClick:()=>f(`words`),children:[`Lexicon`,T.items.length>0&&(0,H.jsx)(`span`,{className:`tab-badge`,children:T.items.length})]})]})]})}function sm(){let{language:e,config:t,selectLanguage:n}=mp(),r=(0,_.useSyncExternalStore)(im,am,()=>``),[i,a]=(0,_.useState)(()=>Hs());return Wp(r)?(0,H.jsx)(_.Suspense,{fallback:(0,H.jsx)(`p`,{style:{padding:`2rem`,fontFamily:`system-ui`},children:`Loading store preview…`}),children:(0,H.jsx)(rm,{})}):i?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(So,{showExtensionBanner:!1}),(0,H.jsx)(Nl,{onUnlock:()=>a(!1)})]}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(So,{}),!e||!t?(0,H.jsx)(Gd,{onSelect:n}):(0,H.jsx)(om,{language:e,config:t,onSelectLanguage:n})]})}var cm=`#0a0a0a`,lm=`#f7f7f5`,um=`#ffffff`,dm=`#0047ff`,fm=`#e10600`,pm=`#667085`,mm=`"Archivo Black", Impact, sans-serif`,hm=`"Syne", system-ui, sans-serif`,gm={theme:`simple`,options:{socialButtonsPlacement:`top`,socialButtonsVariant:`blockButton`,shimmer:!1,logoPlacement:`none`,privacyPageUrl:`${go}/privacy.html`,termsPageUrl:`${go}/terms.html`},variables:{colorPrimary:cm,colorPrimaryForeground:um,colorDanger:fm,colorSuccess:`#00a651`,colorNeutral:cm,colorForeground:cm,colorMutedForeground:pm,colorBackground:um,colorInput:um,colorInputForeground:cm,colorBorder:cm,colorModalBackdrop:`rgba(10, 10, 10, 0.45)`,colorShadow:`transparent`,borderRadius:`0px`,fontFamily:hm,fontFamilyButtons:mm},elements:{modalContent:{boxShadow:`none`},card:{borderRadius:`0`,boxShadow:`none`,border:`3px solid ${cm}`,background:um},headerTitle:{fontFamily:mm,fontSize:`1.35rem`,letterSpacing:`-0.02em`,textTransform:`uppercase`},headerSubtitle:{fontFamily:hm,color:pm},socialButtonsBlockButton:{borderRadius:`0`,border:`2px solid ${cm}`,background:um,fontFamily:mm,textTransform:`uppercase`,boxShadow:`none`},socialButtonsBlockButtonText:{fontFamily:mm,fontWeight:`400`},formFieldLabel:{fontFamily:hm,textTransform:`uppercase`,fontSize:`0.7rem`,letterSpacing:`0.06em`},formFieldInput:{borderRadius:`0`,border:`2px solid ${cm}`,boxShadow:`none`},formButtonPrimary:{borderRadius:`0`,background:cm,color:um,fontFamily:mm,textTransform:`uppercase`,boxShadow:`none`,border:`3px solid ${cm}`},footerActionLink:{color:dm,fontFamily:hm},footer:{background:lm,borderTop:`3px solid ${cm}`},dividerLine:{background:cm},identityPreviewEditButton:{color:dm}}},_m={signIn:{start:{title:`Sign in to ${fo}`,subtitle:`Apple or Google — same account as iPhone and Chrome.`}},signUp:{start:{title:`Join ${fo}`,subtitle:`One account for the website, Chrome, and iPhone.`}}},vm=(0,H.jsx)(mf,{children:(0,H.jsx)(sm,{})});(0,v.createRoot)(document.getElementById(`root`)).render((0,H.jsx)(_.StrictMode,{children:Va()?(0,H.jsx)(Ea,{publishableKey:`pk_live_Y2xlcmsudGhlaW1tZXJzaW9uYXBwLmNvbSQ`,afterSignOutUrl:`/`,appearance:gm,localization:_m,children:vm}):vm}));export{Xp as a,Jp as c,Kp as d,K as f,c as h,zp as i,Yp as l,u as m,Up as n,Zp as o,Aa as p,Rp as r,Gp as s,Hp as t,Qp as u};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.